hexsha
stringlengths 40
40
| size
int64 5
1.05M
| ext
stringclasses 98
values | lang
stringclasses 21
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
118
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequencelengths 1
10
| max_stars_count
int64 1
368k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
118
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequencelengths 1
10
| max_issues_count
int64 1
134k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
135
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequencelengths 1
10
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 5
1.05M
| avg_line_length
float64 1
1.03M
| max_line_length
int64 2
1.03M
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ed3b1e6a74cf72a6dc9a9d90810c63efa816375d | 384 | kt | Kotlin | app/src/main/java/com/niicz/sunshinekotlin/detail/DetailContract.kt | niicz/GoogleSunshineKotlin | f7a87d6b8154b31f67498729614e0ed6b90f7b44 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/niicz/sunshinekotlin/detail/DetailContract.kt | niicz/GoogleSunshineKotlin | f7a87d6b8154b31f67498729614e0ed6b90f7b44 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/niicz/sunshinekotlin/detail/DetailContract.kt | niicz/GoogleSunshineKotlin | f7a87d6b8154b31f67498729614e0ed6b90f7b44 | [
"Apache-2.0"
] | null | null | null | package com.niicz.sunshinekotlin.detail
import com.niicz.sunshinekotlin.BasePresenter
import com.niicz.sunshinekotlin.BaseView
interface DetailContract {
interface View : BaseView<Presenter> {
fun showWeatherDetails()
}
interface Presenter : BasePresenter<View> {
override fun takeView(view: DetailContract.View)
override fun dropView()
}
} | 24 | 56 | 0.731771 |
f147401d1c6ec30abf8f5a937ae2a56d2c6e0fde | 2,284 | rb | Ruby | lib/kurchatov/monitor.rb | vadv/kurchatov | ba27daea79e2ae093978f9efdde2345e00f566fb | [
"MIT"
] | 4 | 2015-09-29T10:39:15.000Z | 2021-02-26T22:53:05.000Z | lib/kurchatov/monitor.rb | vadv/kurchatov | ba27daea79e2ae093978f9efdde2345e00f566fb | [
"MIT"
] | null | null | null | lib/kurchatov/monitor.rb | vadv/kurchatov | ba27daea79e2ae093978f9efdde2345e00f566fb | [
"MIT"
] | 1 | 2016-04-04T13:07:54.000Z | 2016-04-04T13:07:54.000Z | module Kurchatov
class Monitor
class Task
include Kurchatov::Mixin::Event
attr_accessor :thread, :instance
attr_reader :count_errors, :last_error, :last_error_at
def initialize(plugin)
@plugin = plugin
@thread = Thread.new { @plugin.start! }
@count_errors = 0
@last_error = nil
@last_error_at = nil
@last_error_count = 0
end
def name
@plugin.name
end
def config
@plugin.plugin_config
end
def stop!
Thread.kill(@thread)
end
def stopped?
@plugin.stopped?
end
def died?
if @thread.alive?
@last_error_count = 0
return false
end
# thread died, join and extract error
begin
@thread.join # call error
rescue => e
desc = "Plugin '#{@plugin.name}' died. #{e.class}: #{e}.\n" +
"Trace: #{e.backtrace.join("\n")}"
@count_errors += 1
@last_error_count += 1
@last_error = desc
@last_error_at = Time.now
Log.error(desc)
if @plugin.ignore_errors == false || (@plugin.ignore_errors.class == 'Fixnum' && @plugin.ignore_errors > @plugin.last_error_count)
event(:service => "plugin #{@plugin.name} errors", :desc => desc, :state => 'critical')
end
end
true
end
def start!
@thread = Thread.new { @plugin.start! }
end
end
attr_accessor :tasks
CHECK_ALIVE_TIMEOUT = 5
def initialize
@tasks = Array.new
end
def <<(plugin)
Log.debug("Add new plugin: #{plugin.inspect}")
tasks << Task.new(plugin)
end
def start!
loop do
tasks.each do |task|
task.start! if task.died?
if task.stopped?
task.stop!
tasks.delete(task)
end
end
Log.debug("Check alive plugins [#{tasks.count}]")
sleep CHECK_ALIVE_TIMEOUT
end
end
def inspect
tasks.map do |t|
{
"name" => t.name,
"config" => t.config,
"errors" => {"count" => t.count_errors, "last" => t.last_error, "time" => t.last_error_at}
}
end
end
end
end
| 22.613861 | 140 | 0.524518 |
0ff2a8b6d1a72c706df715b01c61d59991920bb5 | 10,259 | kt | Kotlin | baseLib/src/main/java/com/gas/ext/file/ZipExt.kt | alinainai/MvvmJetpack | 7a7d524ec6d5adb013e4aa83bc6e01ec689c435a | [
"Apache-2.0"
] | null | null | null | baseLib/src/main/java/com/gas/ext/file/ZipExt.kt | alinainai/MvvmJetpack | 7a7d524ec6d5adb013e4aa83bc6e01ec689c435a | [
"Apache-2.0"
] | null | null | null | baseLib/src/main/java/com/gas/ext/file/ZipExt.kt | alinainai/MvvmJetpack | 7a7d524ec6d5adb013e4aa83bc6e01ec689c435a | [
"Apache-2.0"
] | null | null | null | package com.gas.ext.file
import android.util.Log
import com.gas.ext.app.debug
import com.gas.ext.io.toFile
import com.gas.ext.isSpace
import java.io.*
import java.util.*
import java.util.zip.ZipEntry
import java.util.zip.ZipException
import java.util.zip.ZipFile
import java.util.zip.ZipOutputStream
/**
* ================================================
* zipFiles : 批量压缩文件
* zipFile : 压缩文件
* unzipFile : 解压文件
* unzipFileByKeyword: 解压带有关键字的文件
* getFilesPath : 获取压缩文件中的文件路径链表
* getComments : 获取压缩文件中的注释链表*
* ================================================
*/
private const val BUFFER_LEN = 8192
/**
* Zip the files.
*
* @param srcFilePaths The paths of source files.
* @param zipFilePath The path of ZIP file.
* @param comment The comment.
* @return `true`: success<br></br>`false`: fail
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun zipFiles(srcFilePaths: Collection<String>, zipFilePath: String, comment: String?=null): Boolean {
var zos: ZipOutputStream? = null
return try {
zos = ZipOutputStream(FileOutputStream(zipFilePath))
for (srcFile in srcFilePaths) {
if (!zipFile(srcFile.pathToFile(), "", zos, comment)) return false
}
true
} finally {
zos?.let {
it.finish()
it.close()
}
}
}
/**
* Zip the files.
*
* @param srcFiles The source of files.
* @param zipFile The ZIP file.
* @return `true`: success<br></br>`false`: fail
* @throws IOException if an I/O error has occurred
*/
@JvmOverloads
@Throws(IOException::class)
fun zipFiles(srcFiles: Collection<File?>, zipFile: File, comment: String? = null): Boolean {
var zos: ZipOutputStream? = null
return try {
zos = ZipOutputStream(FileOutputStream(zipFile))
for (srcFile in srcFiles) {
if (!zipFile(srcFile, "", zos, comment)) return false
}
true
} finally {
if (zos != null) {
zos.finish()
zos.close()
}
}
}
/**
* Zip the file.
*
* @param srcFilePath The path of source file.
* @param zipFilePath The path of ZIP file.
* @param comment The comment.
* @return `true`: success<br></br>`false`: fail
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun zipFile(srcFilePath: String, zipFilePath: String, comment: String?=null): Boolean {
return zipFile(srcFilePath.pathToFile() ,zipFilePath.pathToFile(), comment)
}
/**
* Zip the file.
*
* @param srcFile The source of file.
* @param zipFile The ZIP file.
* @return `true`: success<br></br>`false`: fail
* @throws IOException if an I/O error has occurred
*/
@JvmOverloads
@Throws(IOException::class)
fun zipFile(srcFile: File?, zipFile: File?, comment: String? = null): Boolean {
if (srcFile == null || zipFile == null) return false
var zos: ZipOutputStream? = null
return try {
zos = ZipOutputStream(FileOutputStream(zipFile))
zipFile(srcFile, "", zos, comment)
} finally {
zos?.close()
}
}
@Throws(IOException::class)
private fun zipFile(srcFile: File?, rootPath: String, zos: ZipOutputStream, comment: String?): Boolean {
val rootPathNx = rootPath + (if (rootPath.isSpace()) "" else File.separator) + srcFile!!.name
if (srcFile.isDirectory) {
val fileList = srcFile.listFiles()
if (fileList == null || fileList.isEmpty()) {
val entry = ZipEntry("$rootPathNx/")
entry.comment = comment
zos.putNextEntry(entry)
zos.closeEntry()
} else {
for (file in fileList) {
if (!zipFile(file, rootPathNx, zos, comment)) return false
}
}
} else {
var input: InputStream? = null
try {
input = BufferedInputStream(FileInputStream(srcFile))
val entry = ZipEntry(rootPath)
entry.comment = comment
zos.putNextEntry(entry)
val buffer = ByteArray(BUFFER_LEN)
var len: Int
while (input.read(buffer, 0, BUFFER_LEN).also { len = it } != -1) {
zos.write(buffer, 0, len)
}
zos.closeEntry()
} finally {
input?.close()
}
}
return true
}
/**
* Unzip the file by keyword.
*
* @param zipFilePath The path of ZIP file.
* @param destDirPath The path of destination directory.
* @param keyword The keyboard.
* @return the unzipped files
* @throws IOException if unzip unsuccessfully
*/
@Throws(IOException::class)
fun unzipFileByKeyword(zipFilePath: String, destDirPath: String, keyword: String?=null): List<File>? {
return unzipFileByKeyword(zipFilePath.pathToFile(), destDirPath.pathToFile(), keyword)
}
/**
* Unzip the file by keyword.
*
* @param zipFile The ZIP file.
* @param destDir The destination directory.
* @param keyword The keyboard.
* @return the unzipped files
* @throws IOException if unzip unsuccessfully
*/
@Throws(IOException::class)
fun unzipFileByKeyword(zipFile: File?, destDir: File?, keyword: String?=null): List<File>? {
if (zipFile == null || destDir == null) return null
val files: MutableList<File> = ArrayList()
val zip = ZipFile(zipFile)
val entries: Enumeration<*> = zip.entries()
zip.use { zipClose ->
if (keyword.isNullOrEmpty()||keyword.isSpace()) {
while (entries.hasMoreElements()) {
val entry = entries.nextElement() as ZipEntry
val entryName = entry.name.replace("\\", "/")
if (entryName.contains("../")) {
Log.d("ZipUtils", "entryName: $entryName is dangerous!")
continue
}
if (!unzipChildFile(destDir, files, zipClose, entry, entryName)) return files
}
} else {
while (entries.hasMoreElements()) {
val entry = entries.nextElement() as ZipEntry
val entryName = entry.name.replace("\\", "/")
if (entryName.contains("../")) {
Log.d( "ZipUtils","entryName: $entryName is dangerous!")
continue
}
if (entryName.contains(keyword)) {
if (!unzipChildFile(destDir, files, zipClose, entry, entryName)) return files
}
}
}
}
return files
}
@Throws(IOException::class)
private fun unzipChildFile(destDir: File, files: MutableList<File>, zip: ZipFile, entry: ZipEntry, name: String): Boolean {
val file = File(destDir, name)
files.add(file)
if (entry.isDirectory) {
return file.existOrCreateDir()
} else {
if (file.existOrCreateFile()) return false
var input: InputStream? = null
var out: OutputStream? = null
try {
input = BufferedInputStream(zip.getInputStream(entry))
out = BufferedOutputStream(FileOutputStream(file))
val buffer = ByteArray(BUFFER_LEN)
var len: Int
while (input.read(buffer).also { len = it } != -1) {
out.write(buffer, 0, len)
}
} finally {
input?.close()
out?.close()
}
}
return true
}
/**
* Return the files' path in ZIP file.
*
* @param zipFilePath The path of ZIP file.
* @return the files' path in ZIP file
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun getFilesPath(zipFilePath: String): List<String>? {
return getFilesPath(zipFilePath.pathToFile())
}
/**
* Return the files' path in ZIP file.
*
* @param zipFile The ZIP file.
* @return the files' path in ZIP file
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun getFilesPath(zipFile: File?): List<String>? {
if (zipFile == null) return null
val paths: MutableList<String> = ArrayList()
val zip = ZipFile(zipFile)
val entries: Enumeration<*> = zip.entries()
while (entries.hasMoreElements()) {
val entryName = (entries.nextElement() as ZipEntry).name.replace("\\", "/")
if (entryName.contains("../")) {
Log.e("ZipUtils", "entryName: $entryName is dangerous!")
paths.add(entryName)
} else {
paths.add(entryName)
}
}
zip.close()
return paths
}
/**
* Return the files' comment in ZIP file.
*
* @param zipFilePath The path of ZIP file.
* @return the files' comment in ZIP file
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun getComments(zipFilePath: String): List<String>? {
return getComments(zipFilePath.pathToFile())
}
/**
* Return the files' comment in ZIP file.
*
* @param zipFile The ZIP file.
* @return the files' comment in ZIP file
* @throws IOException if an I/O error has occurred
*/
@Throws(IOException::class)
fun getComments(zipFile: File?): List<String>? {
if (zipFile == null) return null
val comments: MutableList<String> = ArrayList()
val zip = ZipFile(zipFile)
val entries: Enumeration<*> = zip.entries()
while (entries.hasMoreElements()) {
val entry = entries.nextElement() as ZipEntry
comments.add(entry.comment)
}
zip.close()
return comments
}
/**
* 解压缩一个文件
* @param zipFile 压缩文件
* @param folderPath 解压缩的目标目录
* @throws IOException 当解压缩过程出错时抛出
*/
@Throws(ZipException::class, IOException::class)
fun File.unzipFile(folderPath: String) {
File(folderPath).ensureFolder()
val zf = ZipFile(this)
val entries = zf.entries()
while (entries.hasMoreElements()) {
val entry = entries.nextElement()
if (entry.isDirectory) {
continue
}
zf.getInputStream(entry).toFile(File(folderPath + File.separator + entry.name))
}
}
/**
* 解压文件时,如果文件解压失败,会删除异常的文件,但仍然向外抛出异常
* @param zipFile 压缩文件
* @param folderPath 解压缩的目标目录
* @throws IOException 当解压缩过程出错时抛出
*/
@Throws(ZipException::class, IOException::class)
fun File.unzipAndSafeDelete(folderPath: String) {
try {
unzipFile(folderPath)
} catch (t: Throwable) {
throw t
} finally {
safeDelete()
}
}
| 29.736232 | 123 | 0.610001 |
6e3c721249bfad37b202460b029ee0f3ffb32a4e | 2,467 | html | HTML | client/app/common/quoteForm/quoteForm.html | chibui/NG6-starter | 6f42d8559bb159323925dc970a8d0ee810e6e7c7 | [
"Apache-2.0"
] | null | null | null | client/app/common/quoteForm/quoteForm.html | chibui/NG6-starter | 6f42d8559bb159323925dc970a8d0ee810e6e7c7 | [
"Apache-2.0"
] | null | null | null | client/app/common/quoteForm/quoteForm.html | chibui/NG6-starter | 6f42d8559bb159323925dc970a8d0ee810e6e7c7 | [
"Apache-2.0"
] | null | null | null | <section class="quoteForm">
<h1>Let's get started on your quote</h1>
<h3>We'll just need some information about you to provide you with a preliminary quote</h3>
<form ng-if="!$ctrl.quoteComplete" class="quoteForm" name="$ctrl.quoteForm" ng-submit="$ctrl.performQuote()" novalidate>
<label class="quoteForm__label" ng-class="{'invalid': $ctrl.quoteForm.name.$invalid && $ctrl.quoteForm.name.$dirty && $ctrl.quoteForm.name.$touched}">
<div class="quoteForm__label__value">name</div>
<input class="quoteForm__label__input"
type="text"
name="name"
ng-model="$ctrl.customer.name"
placeholder="name"
ng-minlength="3"
ng-maxlength="50"
ng-disabled="$ctrl.quoteComplete"
required>
<div class="quoteForm__validation-error">must be between 3-50 characters</div>
</label>
<label class="quoteForm__label" ng-class="{'invalid': $ctrl.quoteForm.age.$invalid && $ctrl.quoteForm.age.$dirty && $ctrl.quoteForm.age.$touched}">
<div class="quoteForm__label__value">age</div>
<input class="quoteForm__label__input"
type="number"
name="age"
ng-model="$ctrl.customer.age"
placeholder="age"
ng-disabled="$ctrl.quoteComplete"
min="18"
max="65"
required>
<div class="quoteForm__validation-error">Must be between 18 - 65 for a quote</div>
</label>
<label class="quoteForm__label" ng-class="{'invalid': $ctrl.quoteForm.gender.$touched && $ctrl.quoteForm.gender.$invalid}">
<div class="quoteForm__label__value">gender</div>
<select class="quoteForm__label__select"
name="gender"
ng-model="$ctrl.customer.gender"
ng-options="gender.name for gender in $ctrl.gender"
value="$ctrl.customer.gender.default"
ng-disabled="$ctrl.quoteComplete"
required>
<option value="" selected="selected">Choose one</option>
</select>
<div class="quoteForm__validation-error">Please select a gender</div>
</label>
<button class="quoteForm__submit" ng-class="{'quoteForm__submit-active': !$ctrl.disabled() }" type="submit" ng-disabled="$ctrl.disabled()">submit</button>
</form>
<result ng-if="$ctrl.quoteComplete" result="$ctrl.result" name="$ctrl.customer.name" reset-quote="$ctrl.resetForm()"></result>
</section>
| 47.442308 | 158 | 0.628699 |
008bb50bf9037107aa3132b5fadb131c21bac5a8 | 55,390 | sql | SQL | Sources/data_browser3/data_browser_diagram_pipes.sql | dstrack/Schema_Data_Browser | c86fb79c87fbe18910c15e2e1ee2d65466f42aa1 | [
"BSD-3-Clause"
] | 5 | 2019-11-28T01:00:45.000Z | 2021-11-15T18:47:47.000Z | Sources/data_browser3/data_browser_diagram_pipes.sql | dstrack/Schema_Data_Browser | c86fb79c87fbe18910c15e2e1ee2d65466f42aa1 | [
"BSD-3-Clause"
] | null | null | null | Sources/data_browser3/data_browser_diagram_pipes.sql | dstrack/Schema_Data_Browser | c86fb79c87fbe18910c15e2e1ee2d65466f42aa1 | [
"BSD-3-Clause"
] | 1 | 2020-05-21T18:34:47.000Z | 2020-05-21T18:34:47.000Z | /*
Copyright 2020 Dirk Strack, Strack Software Development
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
function render_dynamic_actions_legend () {
jQuery(function(){
var graph = new Springy.Graph();
var n_R = graph.newNode({label: 'Menu Name', name: 'M', shape: 'tab', color: 'BurlyWood', y: -0.01, x: -1.4, mass: 100.0}); // Menu
var n_I = graph.newNode({label: 'Page Item Name', name: 'I', shape: 'box', color: 'YellowGreen', y: -0.01, x: -1.2, mass: 100.0});
var n_B = graph.newNode({label: 'Button Name', name: 'B', shape: 'octagon', color: 'Plum', y: -0.01, x: -1.0, mass: 100.0});
var n_R = graph.newNode({label: 'Region Name', name: 'R', shape: 'doubleoctagon', color: 'BurlyWood', y: -0.01, x: -0.8, mass: 100.0}); // Region
var n_J = graph.newNode({label: 'jQuery Selector', name: 'J', shape: 'parallelogram', color: 'MediumAquamarine', y: -0.01, x: -0.6, mass: 100.0});
var n_D = graph.newNode({label: 'Dynamic Action', name: 'D', shape: 'ellipse', color: 'Khaki', y: -0.01, x: -0.4, mass: 100.0}); // DA name
var n_T = graph.newNode({label: 'True', name: 'T', shape: 'house', color: 'PowderBlue', y: -0.01, x: -0.2, mass: 100.0}); // DA true
var n_F = graph.newNode({label: 'False', name: 'F', shape: 'invhouse', color: 'PowderBlue', y: -0.01, x: 0.0, mass: 100.0}); // DA false
var n_C = graph.newNode({label: 'Performed Code', name: 'C', shape: 'trapezium', color: 'MistyRose', y: -0.01, x: 0.2, mass: 100.0}); // DA code step
var n_X = graph.newNode({label: 'Execute on init', name: 'X', shape: 'trapezium', color: 'LightPink', y: -0.01, x: 0.4, mass: 100.0}); // DA code on init
var n_Q = graph.newNode({label: 'Request Name', name: 'Q', shape: 'octagon', color: 'Orange', y: -0.01, x: 0.6, mass: 100.0});
var n_L = graph.newNode({label: 'Branch', name: 'L', shape: 'righttriangle', color: 'YellowGreen', y: -0.01, x: 0.8, mass: 100.0}); // page branch;
// List Link
var n_A = graph.newNode({label: 'Link', name: 'A', shape: 'righttriangle', color: 'LightSkyBlue', y: -0.01, x: 1.0, mass: 100.0}); // R region list link; target_id: region_id_list-entry
var n_E = graph.newNode({label: 'Performed Code', name: 'E', shape: 'trapezium', color: 'MistyRose', y: -0.01, x: 1.0, mass: 100.0}); // R region list link; target_id: region_id_list-entry
// Report Link
var n_K = graph.newNode({label: 'Link', name: 'K', shape: 'righttriangle', color: 'LightSkyBlue', y: -0.01, x: 1.0, mass: 100.0}); // R region column link; target_id: region_id_display_sequence
var n_N = graph.newNode({label: 'Performed Code', name: 'N', shape: 'trapezium', color: 'MistyRose', y: -0.01, x: 1.0, mass: 100.0}); // R region column link; target_id: region_id_display_sequence
// Menu Link
var n_G = graph.newNode({label: 'Link', name: 'G', shape: 'righttriangle', color: 'LightSkyBlue', y: -0.01, x: 1.0, mass: 100.0}); // M menu list entry link; target_id: list_id_list-entry
var n_H = graph.newNode({label: 'Performed Code', name: 'H', shape: 'trapezium', color: 'MistyRose', y: -0.01, x: 1.0, mass: 100.0}); // M menu list entry link; target_id: list_id_list-entry
var n_P = graph.newNode({label: 'Process Point', name: 'P', shape: 'star', color: 'LightCyan', y: -0.01, x: 1.2, mass: 100.0}); // Processing point
var springy = jQuery('#legend_diagram').springy({
graph: graph,
fontsize: 8.0,
zoomFactor: 1.0,
minEnergyThreshold: 5.0,
stiffness : 400.0,
repulsion : 800.0
});
});
}
function render_dependencies_legend () {
jQuery(function(){
var graph = new Springy.Graph();
var n_Fn = graph.newNode({label: 'Function', name: 'Function', shape: 'ellipse', color: 'Aqua', y: -0.01, x: -1.0, mass: 100.0});
var n_Pa = graph.newNode({label: 'Type', name: 'Type', shape: 'house', color: 'Lightskyblue', y: -0.01, x: -0.8, mass: 100.0});
var n_Pa = graph.newNode({label: 'Package', name: 'Package', shape: 'house', color: 'Lightseagreen', y: -0.01, x: -0.6, mass: 100.0});
var n_Pr = graph.newNode({label: 'Procedure', name: 'Procedure', shape: 'trapezium', color: 'Darkturquoise', y: -0.01, x: -0.4, mass: 100.0});
var n_Ta = graph.newNode({label: 'Table', name: 'Table', shape: 'doubleoctagon', color: 'Khaki', y: -0.01, x: -0.2, mass: 100.0});
var n_Vw = graph.newNode({label: 'View', name: 'View', shape: 'octagon', color: 'Powderblue', y: -0.01, x: 0.0, mass: 100.0});
var n_Tr = graph.newNode({label: 'Trigger', name: 'Trigger', shape: 'component', color: 'LightSalmon', y: -0.01, x: 0.2, mass: 100.0});
var n_Mv = graph.newNode({label: 'Materialized View', name: 'Materialized View', shape: 'octagon', color: 'Goldenrod', y: -0.01, x: 0.4, mass: 100.0});
var n_Oo = graph.newNode({label: 'Other Objects', name: 'User_Objects', shape: 'box', color: 'Yellowgreen', y: -0.01, x: 0.6, mass: 100.0});
var n_Eo = graph.newNode({label: 'External Objects', name: 'External_Objects', shape: 'octagon', color: 'Orchid', y: -0.01, x: 0.8, mass: 100.0});
var n_Io = graph.newNode({label: 'Invalid Objects', name: 'Invalid_Objects', shape: 'octagon', color: 'Red', y: -0.01, x: 1.0, mass: 100.0});
var springy = jQuery('#legend_diagram').springy({
graph: graph,
fontsize: 8.0,
zoomFactor: 1.0,
minEnergyThreshold: 5.0,
stiffness : 400.0,
repulsion : 800.0
});
});
}
if ($v('P28_SOURCE_TYPE') === 'DYNAMIC_ACTIONS') {
-- legende: Dynamic Actions
render_dynamic_actions_legend ()
}
if ($v('P28_SOURCE_TYPE') === 'DEPENDENCIES') {
-- Legende: Object Dependences
render_dependencies_legend ();
}
*/
CREATE OR REPLACE PACKAGE data_browser_diagram_pipes
AUTHID CURRENT_USER
IS
TYPE rec_apex_dyn_actions IS RECORD (
SOURCE_ID VARCHAR2(128),
OBJECT_TYPE VARCHAR2(4),
SOURCE_NODE VARCHAR2(128),
EDGE_LABEL VARCHAR2(128),
DEST_NODE VARCHAR2(128),
DEST_ID VARCHAR2(128),
DEST_OBJECT_TYPE VARCHAR2(4),
EXECUTE_ON_PAGE_INIT VARCHAR2(4),
APPLICATION_ID NUMBER,
PAGE_ID NUMBER
);
TYPE tab_apex_dyn_actions IS TABLE OF rec_apex_dyn_actions;
FUNCTION FN_Pipe_apex_dyn_actions(p_Application_ID NUMBER, p_App_Page_ID NUMBER)
RETURN data_browser_diagram_pipes.tab_apex_dyn_actions PIPELINED;
TYPE rec_object_dependences IS RECORD (
NODE_NAME VARCHAR2(512),
OBJECT_TYPE VARCHAR2(30),
OBJECT_NAME VARCHAR2(512),
OBJECT_OWNER VARCHAR2(128),
STATUS VARCHAR2(30),
TARGET_NODE_NAME VARCHAR2(512),
TARGET_OBJECT_TYPE VARCHAR2(30),
TARGET_OBJECT_NAME VARCHAR2(512),
TARGET_OBJECT_OWNER VARCHAR2(128),
TARGET_STATUS VARCHAR2(30),
LABEL VARCHAR2(30),
TABLE_NAME VARCHAR2(128),
TARGET_TABLE_NAME VARCHAR2(128)
);
TYPE tab_object_dependences IS TABLE OF rec_object_dependences;
TYPE rec_object_list IS RECORD (
NODE_NAME VARCHAR2(512),
OBJECT_TYPE VARCHAR2(30),
OBJECT_NAME VARCHAR2(512),
OBJECT_OWNER VARCHAR2(128),
STATUS VARCHAR2(30),
TABLE_NAME VARCHAR2(128),
NODE_LABEL VARCHAR2(512)
);
TYPE tab_object_list IS TABLE OF rec_object_list;
FUNCTION FN_Pipe_object_dependences (
p_Exclude_Singles IN VARCHAR2 DEFAULT 'YES',
p_Include_App_Objects IN VARCHAR2 DEFAULT 'NO',
p_Include_External IN VARCHAR2 DEFAULT 'YES',
p_Include_Sys IN VARCHAR2 DEFAULT 'NO',
p_Object_Owner IN VARCHAR2 DEFAULT SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'),
p_Object_Types IN VARCHAR2 DEFAULT 'KEY CONSTRAINT:CHECK CONSTRAINT:NOT NULL CONSTRAINT:FUNCTION:INDEX:MATERIALIZED VIEW:PACKAGE:PACKAGE BODY:PROCEDURE:SEQUENCE:SYNONYM:TABLE:TRIGGER:TYPE:TYPE BODY:VIEW',
p_Object_Name IN VARCHAR2 DEFAULT NULL
)
RETURN data_browser_diagram_pipes.tab_object_dependences PIPELINED;
END data_browser_diagram_pipes;
/
CREATE OR REPLACE PACKAGE BODY data_browser_diagram_pipes
IS
FUNCTION FN_Pipe_Apex_Dyn_Actions(p_Application_ID NUMBER, p_App_Page_ID NUMBER)
RETURN data_browser_diagram_pipes.tab_apex_dyn_actions PIPELINED
IS
CURSOR dyn_actions_cur
IS
WITH list_q as ( -- list entries; Region -> Branch
select R.REGION_ID, R.REGION_NAME, R.LIST_ID, L.LIST_NAME,
E.LIST_ENTRY_ID, E.ENTRY_TEXT, E.ENTRY_TARGET,
case when E.ENTRY_TARGET LIKE 'javascript%' then
case when E.ENTRY_TARGET LIKE '%apex.submit%'
or E.ENTRY_TARGET LIKE '%apex.confirm%'
then 'Submit'
else 'Javascript'
end
when E.ENTRY_TARGET LIKE 'f?p=%'
then 'Link'
end TARGET_TYPE, -- Submit / Javascript / Link / NUll
E.DISPLAY_SEQUENCE,
R.APPLICATION_ID, R.PAGE_ID
from APEX_APPLICATION_PAGE_REGIONS R
join APEX_APPLICATION_LISTS L ON L.APPLICATION_ID = R.APPLICATION_ID AND L.LIST_ID = R.LIST_ID
join APEX_APPLICATION_LIST_ENTRIES E ON E.APPLICATION_ID = R.APPLICATION_ID AND E.LIST_ID = R.LIST_ID
where R.SOURCE_TYPE = 'List'
and R.SOURCE_TYPE_PLUGIN_NAME = 'NATIVE_LIST'
and L.LIST_TYPE_CODE = 'STATIC'
and R.APPLICATION_ID = p_Application_ID
and R.PAGE_ID = p_App_Page_ID
) , list_q2 as (
select P.*, P.REGION_ID||'_'||P.LIST_ENTRY_ID TARGET_ID -- used in node type A / E
from (
select *
from (
select REGION_ID, REGION_NAME, LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
REGEXP_SUBSTR(ENTRY_TARGET, '.*'||q.op||'\s*\(.*[''"](\S+)[''"]', 1, 1, 'in', 1) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from list_q P, (select COLUMN_VALUE op FROM TABLE(apex_string.split('apex\.confirm:apex\.submit', ':'))) Q
where TARGET_TYPE = 'Submit'
) where REQUEST IS NOT NULL
union
select *
from (
select REGION_ID, REGION_NAME, LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 4) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from list_q P
where TARGET_TYPE = 'Link'
)
union
select REGION_ID, REGION_NAME, LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
NULL REQUEST, APPLICATION_ID, PAGE_ID
from list_q P
where TARGET_TYPE = 'Javascript'
) P
), page_procs as (
select PROCESS_NAME,EXECUTION_SEQUENCE,
case when PROCESS_TYPE_CODE = 'PLSQL'
then 'PL/SQL'
else PROCESS_TYPE
end PROCESS_TYPE, PROCESS_ID,
case when WHEN_BUTTON_PRESSED IS NOT NULL
then WHEN_BUTTON_PRESSED
when CONDITION_TYPE_CODE = 'REQUEST_EQUALS_CONDITION'
then CONDITION_EXPRESSION1
end WHEN_BUTTON_PRESSED,
case when PROCESS_POINT_CODE IN ('AFTER_SUBMIT','ON_SUBMIT_BEFORE_COMPUTATION')
then 'No' else 'Yes'
end EXECUTE_ON_PAGE_INIT,
PROCESS_POINT_CODE, PROCESS_POINT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_PROC
where (WHEN_BUTTON_PRESSED IS NOT NULL or CONDITION_TYPE_CODE = 'REQUEST_EQUALS_CONDITION' )
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all
select PROCESS_NAME,EXECUTION_SEQUENCE,
case when PROCESS_TYPE_CODE = 'PLSQL'
then 'PL/SQL'
else PROCESS_TYPE
end PROCESS_TYPE, PROCESS_ID,
REGEXP_REPLACE(TRIM(COLUMN_VALUE), '^''(.*)''$', '\1') WHEN_BUTTON_PRESSED,
case when PROCESS_POINT_CODE IN ('AFTER_SUBMIT','ON_SUBMIT_BEFORE_COMPUTATION')
then 'No' else 'Yes'
end EXECUTE_ON_PAGE_INIT,
PROCESS_POINT_CODE, PROCESS_POINT,
APPLICATION_ID, PAGE_ID
from (
select PROCESS_NAME,EXECUTION_SEQUENCE,
PROCESS_TYPE,PROCESS_TYPE_CODE,PROCESS_ID,
REGEXP_SUBSTR(CONDITION_EXPRESSION1, ':REQUEST\s+'||q.op||'\s*\((.+)\)', 1, 1, 'in', 1) REQUEST_IN_LIST,
PROCESS_POINT_CODE, PROCESS_POINT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_PROC p
, (select COLUMN_VALUE op FROM TABLE(apex_string.split('in:not in', ':'))) q
where CONDITION_TYPE_CODE = 'PLSQL_EXPRESSION'
and REGEXP_INSTR(CONDITION_EXPRESSION1, ':REQUEST', 1, 1, 1, 'i') > 0
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
) S,
TABLE( apex_string.split(S.REQUEST_IN_LIST, ',') ) P
where REQUEST_IN_LIST is not null
union all
select PROCESS_NAME,EXECUTION_SEQUENCE,
PROCESS_TYPE, PROCESS_ID,
REQUEST_IN_LIST WHEN_BUTTON_PRESSED,
case when PROCESS_POINT_CODE IN ('AFTER_SUBMIT','ON_SUBMIT_BEFORE_COMPUTATION')
then 'No' else 'Yes'
end EXECUTE_ON_PAGE_INIT,
PROCESS_POINT_CODE, PROCESS_POINT,
APPLICATION_ID, PAGE_ID
from (
select PROCESS_NAME,EXECUTION_SEQUENCE,
case when PROCESS_TYPE_CODE = 'PLSQL'
then 'PL/SQL'
else PROCESS_TYPE
end PROCESS_TYPE, PROCESS_ID,
REGEXP_SUBSTR(CONDITION_EXPRESSION1, ':REQUEST\s+'||q.op||'\s*''(\S+)''', 1, 1, 'in', 1) REQUEST_IN_LIST,
PROCESS_POINT_CODE, PROCESS_POINT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_PROC p
, (select COLUMN_VALUE op FROM TABLE(apex_string.split(',:=:like:not like', ':'))) q
where CONDITION_TYPE_CODE = 'PLSQL_EXPRESSION'
and REGEXP_INSTR(CONDITION_EXPRESSION1, ':REQUEST', 1, 1, 1, 'i') > 0
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
) where REQUEST_IN_LIST is not null
), buttons_q as (
select -- DA - when Button
'B'||A.WHEN_BUTTON_ID SOURCE_ID, 'B' OBJECT_TYPE,
NVL(B.LABEL, A.WHEN_BUTTON) SOURCE_NODE, A.WHEN_EVENT_NAME EDGE_LABEL, A.DYNAMIC_ACTION_NAME DEST_NODE,
'D' || A.DYNAMIC_ACTION_ID DEST_ID,
'D' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
B.REGION_ID, B.REGION, B.BUTTON_SEQUENCE,
A.APPLICATION_ID, A.PAGE_ID
from APEX_APPLICATION_PAGE_DA A
join APEX_APPLICATION_PAGE_BUTTONS B on A.WHEN_BUTTON_ID = B.BUTTON_ID and A.APPLICATION_ID = B.APPLICATION_ID
where A.WHEN_SELECTION_TYPE = 'Button'
and A.APPLICATION_ID = p_Application_ID
and A.PAGE_ID = p_App_Page_ID
union all -- other Buttons BUTTON -> REQUEST
select 'B'||BUTTON_ID SOURCE_ID, 'B' OBJECT_TYPE,
NVL(LABEL, BUTTON_NAME) SOURCE_NODE, BUTTON_ACTION EDGE_LABEL, BUTTON_NAME DEST_NODE,
'Q' || BUTTON_NAME DEST_ID,
'Q' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
REGION_ID, REGION, BUTTON_SEQUENCE,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_BUTTONS
where (BUTTON_ACTION_CODE = 'SUBMIT'
OR BUTTON_ACTION_CODE = 'REDIRECT_URL'
and REDIRECT_URL LIKE 'javascript:%'
)
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- other Buttons -> BUTTON
select 'B'||BUTTON_ID SOURCE_ID, 'B' OBJECT_TYPE,
NVL(LABEL, BUTTON_NAME) SOURCE_NODE, 'Redirect' EDGE_LABEL, BUTTON_ACTION DEST_NODE,
'C' || BUTTON_ID DEST_ID,
'C' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
REGION_ID, REGION, BUTTON_SEQUENCE,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_BUTTONS
where BUTTON_ACTION_CODE = 'REDIRECT_URL'
and REDIRECT_URL NOT LIKE 'javascript:%'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
), report_links_q as (
select REGION_NAME, REGION_ID, ENTRY_TEXT, COLUMN_ALIAS,
ENTRY_TARGET,
case when ENTRY_TARGET LIKE 'javascript%' then
case when ENTRY_TARGET LIKE '%apex.submit%'
or ENTRY_TARGET LIKE '%apex.confirm%'
then 'Submit'
else 'Javascript'
end
when ENTRY_TARGET LIKE 'f?p=%'
then 'Link'
end TARGET_TYPE, -- Submit / Javascript / Link / Null
DISPLAY_SEQUENCE, APPLICATION_ID, PAGE_ID
from (
select REGION_NAME, REGION_ID, -- classic report.
HEADING ENTRY_TEXT,
COLUMN_ALIAS,
COLUMN_LINK_URL ENTRY_TARGET,
DISPLAY_SEQUENCE, APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_RPT_COLS
where APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
and COLUMN_LINK_URL IS NOT NULL
union all
select REGION_NAME, REGION_ID, -- interactive report.
REPORT_LABEL ENTRY_TEXT,
COLUMN_ALIAS,
COLUMN_LINK ENTRY_TARGET,
DISPLAY_ORDER, APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_IR_COL
where APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
and COLUMN_LINK IS NOT NULL
union all
select REGION_NAME, REGION_ID, -- interactive grid
NVL(HEADING, NAME) ENTRY_TEXT,
NAME COLUMN_ALIAS,
LINK_TARGET ENTRY_TARGET,
DISPLAY_SEQUENCE, APPLICATION_ID, PAGE_ID
from APEX_APPL_PAGE_IG_COLUMNS
where APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
and LINK_TARGET IS NOT NULL
)
), report_links_q2 as (
select P.*, P.REGION_ID||'_'||P.DISPLAY_SEQUENCE TARGET_ID
from (
select *
from (
select REGION_ID, REGION_NAME, COLUMN_ALIAS, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
REGEXP_SUBSTR(ENTRY_TARGET, '.*'||q.op||'\s*\(.*[''"](\S+)[''"]', 1, 1, 'in', 1) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from report_links_q P, (select COLUMN_VALUE op FROM TABLE(apex_string.split('apex\.confirm:apex\.submit', ':'))) Q
where TARGET_TYPE = 'Submit'
) where REQUEST IS NOT NULL
union
select *
from (
select REGION_ID, REGION_NAME, COLUMN_ALIAS, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 4) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from report_links_q P
where TARGET_TYPE = 'Link'
)
union
select REGION_ID, REGION_NAME, COLUMN_ALIAS, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
NULL REQUEST, APPLICATION_ID, PAGE_ID
from report_links_q P
where TARGET_TYPE = 'Javascript'
) P
)
-----------------------------------------------------------------------------------
-- event sources => action name
select 'I'||TRIM(N.COLUMN_VALUE) SOURCE_ID, 'I' OBJECT_TYPE,
TRIM(N.COLUMN_VALUE) SOURCE_NODE, WHEN_EVENT_NAME EDGE_LABEL, DYNAMIC_ACTION_NAME DEST_NODE,
'D' || DYNAMIC_ACTION_ID DEST_ID,
'D' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA A, TABLE( apex_string.split(A.WHEN_ELEMENT, ',')) N
where WHEN_SELECTION_TYPE = 'Item'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all
select SOURCE_ID, OBJECT_TYPE, SOURCE_NODE, EDGE_LABEL,
DEST_NODE, DEST_ID, DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from buttons_q
UNION ALL -- region => button
select 'R'||REGION_ID SOURCE_ID, 'R' OBJECT_TYPE, REGION SOURCE_NODE,
TO_CHAR(BUTTON_SEQUENCE) EDGE_LABEL,
SOURCE_NODE DEST_NODE,
SOURCE_ID DEST_ID,
OBJECT_TYPE DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from buttons_q
union all -- region -> Dynamic_Action
select 'R'||WHEN_REGION_ID SOURCE_ID, 'R' OBJECT_TYPE,
WHEN_REGION SOURCE_NODE, WHEN_EVENT_NAME EDGE_LABEL, DYNAMIC_ACTION_NAME DEST_NODE,
'D' || DYNAMIC_ACTION_ID DEST_ID,
'D' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA
where WHEN_SELECTION_TYPE = 'Region'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- jquery -> Dynamic_Action
select 'J'||DYNAMIC_ACTION_ID SOURCE_ID, 'J' OBJECT_TYPE,
WHEN_ELEMENT SOURCE_NODE, WHEN_EVENT_NAME EDGE_LABEL, DYNAMIC_ACTION_NAME DEST_NODE,
'D' || DYNAMIC_ACTION_ID DEST_ID,
'D' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA
where WHEN_SELECTION_TYPE = 'jQuery Selector'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
-------------------- action name => true / false ---------------------------------------
union all -- Dynamic Action / TRUE
select 'D'||DYNAMIC_ACTION_ID SOURCE_ID, 'D' OBJECT_TYPE,
DYNAMIC_ACTION_NAME SOURCE_NODE,
null EDGE_LABEL,
'True' DEST_NODE, 'T'||DYNAMIC_ACTION_ID DEST_ID,
'T' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA
where APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- Dynamic Action / FALSE
select 'D'||DYNAMIC_ACTION_ID SOURCE_ID, 'D' OBJECT_TYPE,
DYNAMIC_ACTION_NAME SOURCE_NODE,
null EDGE_LABEL,
'False' DEST_NODE, 'F'||DYNAMIC_ACTION_ID DEST_ID,
'F' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA A
where WHEN_CONDITION IS NOT NULL
and exists (
select 1
from APEX_APPLICATION_PAGE_DA_ACTS B
where B.DYNAMIC_ACTION_ID = A.DYNAMIC_ACTION_ID
and B.APPLICATION_ID = A.APPLICATION_ID
and B.PAGE_ID = A.PAGE_ID
and DYNAMIC_ACTION_EVENT_RESULT = 'False'
)
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
-------------------- true / false => function ---------------------------------------
union all
select distinct substr(DYNAMIC_ACTION_EVENT_RESULT, 1, 1) || DYNAMIC_ACTION_ID SOURCE_ID,
substr(DYNAMIC_ACTION_EVENT_RESULT, 1, 1) OBJECT_TYPE,
DYNAMIC_ACTION_EVENT_RESULT SOURCE_NODE,
TO_CHAR(ACTION_SEQUENCE) EDGE_LABEL,
case when ACTION_CODE = 'NATIVE_JAVASCRIPT_CODE' then 'Javascript'
when ACTION_CODE = 'NATIVE_EXECUTE_PLSQL_CODE' then 'PL/SQL'
else ACTION_NAME end DEST_NODE,
'C'||ACTION_ID DEST_ID,
'C' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A
where APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
----------------- function => affected elements --------------------------------------
union all -- Submit or Code => REQUEST
select 'C'||ACTION_ID SOURCE_ID,
'C' OBJECT_TYPE,
ACTION_NAME SOURCE_NODE,
TO_CHAR(ACTION_SEQUENCE) EDGE_LABEL,
ATTRIBUTE_01 DEST_NODE, 'Q'||ATTRIBUTE_01 DEST_ID,
'Q' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A
where ACTION_CODE = 'NATIVE_SUBMIT_PAGE'
and ATTRIBUTE_01 IS NOT NULL
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- Processing Point => affected REQUEST
select distinct
'P'||PROCESS_POINT_CODE SOURCE_ID,
'P' OBJECT_TYPE,
PROCESS_POINT SOURCE_NODE,
'' EDGE_LABEL,
WHEN_BUTTON_PRESSED DEST_NODE,
'Q'||WHEN_BUTTON_PRESSED DEST_ID,
'Q' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from page_procs
union all -- affected REQUEST => Submit Page Processing
select 'Q'||WHEN_BUTTON_PRESSED SOURCE_ID,
'Q' OBJECT_TYPE,
WHEN_BUTTON_PRESSED SOURCE_NODE,
TO_CHAR(EXECUTION_SEQUENCE) EDGE_LABEL,
PROCESS_NAME DEST_NODE,
'X'||PROCESS_ID DEST_ID,
'X' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from page_procs
------------------------------------------------------------------------------
union all -- Processing Point => page process
select
'P'||PROCESS_POINT_CODE SOURCE_ID,
'P' OBJECT_TYPE,
PROCESS_POINT SOURCE_NODE,
TO_CHAR(EXECUTION_SEQUENCE) EDGE_LABEL,
PROCESS_NAME DEST_NODE,
'X'||PROCESS_ID DEST_ID,
'X' DEST_OBJECT_TYPE,
case when PROCESS_POINT_CODE IN ('AFTER_SUBMIT','ON_SUBMIT_BEFORE_COMPUTATION')
then 'No' else 'Yes'
end EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_PROC S
where not exists ( -- skip already linked processes
select 1 from page_procs T
where S.PROCESS_ID = T.PROCESS_ID
and S.APPLICATION_ID = T.APPLICATION_ID
and S.PAGE_ID = T.PAGE_ID
)
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
------------------------------------------------------------------------------
union all -- Branches -- affected REQUEST => Submit Page Processing
select 'Q'||WHEN_BUTTON_PRESSED SOURCE_ID,
'Q' OBJECT_TYPE,
WHEN_BUTTON_PRESSED SOURCE_NODE,
TO_CHAR(PROCESS_SEQUENCE) EDGE_LABEL,
NVL(BRANCH_NAME, BRANCH_TYPE)
|| case
when BRANCH_TYPE = 'Branch to Page' then
' ' || BRANCH_ACTION
when BRANCH_TYPE = 'Branch to Page or URL' then
' ' || data_browser_conf.Get_APEX_URL_Element(BRANCH_ACTION, 2) -- extract page id
end DEST_NODE,
'L'||BRANCH_ID DEST_ID,
'L' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from (
select BRANCH_NAME, BRANCH_ACTION, PROCESS_SEQUENCE,
BRANCH_TYPE, BRANCH_ID,
case when WHEN_BUTTON_PRESSED IS NOT NULL
then WHEN_BUTTON_PRESSED
when CONDITION_TYPE_CODE = 'REQUEST_EQUALS_CONDITION'
then CONDITION_EXPRESSION1
end WHEN_BUTTON_PRESSED,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_BRANCHES
where (WHEN_BUTTON_PRESSED IS NOT NULL or CONDITION_TYPE_CODE = 'REQUEST_EQUALS_CONDITION' )
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all
select BRANCH_NAME, BRANCH_ACTION,PROCESS_SEQUENCE,
BRANCH_TYPE, BRANCH_ID,
REGEXP_REPLACE(TRIM(COLUMN_VALUE), '^''(.*)''$', '\1') WHEN_BUTTON_PRESSED,
APPLICATION_ID, PAGE_ID
from (
select BRANCH_NAME, BRANCH_ACTION,PROCESS_SEQUENCE,BRANCH_POINT,
BRANCH_TYPE,BRANCH_ID,
REGEXP_SUBSTR(CONDITION_EXPRESSION1, ':REQUEST\s+'||q.op||'\s*\((.+)\)', 1, 1, 'in', 1) REQUEST_IN_LIST,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_BRANCHES p
, (select COLUMN_VALUE op FROM TABLE(apex_string.split('in:not in', ':'))) q
where CONDITION_TYPE_CODE = 'PLSQL_EXPRESSION'
and REGEXP_INSTR(CONDITION_EXPRESSION1, ':REQUEST', 1, 1, 1, 'i') > 0
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
) S,
TABLE( apex_string.split(S.REQUEST_IN_LIST, ',') ) P
where REQUEST_IN_LIST is not null
union all
select BRANCH_NAME, BRANCH_ACTION,PROCESS_SEQUENCE,
BRANCH_TYPE, BRANCH_ID,
REQUEST_IN_LIST WHEN_BUTTON_PRESSED,
APPLICATION_ID, PAGE_ID
from (
select BRANCH_NAME, BRANCH_ACTION,PROCESS_SEQUENCE,
BRANCH_TYPE, BRANCH_ID,
REGEXP_SUBSTR(CONDITION_EXPRESSION1, ':REQUEST\s+'||q.op||'\s*''(\S+)''', 1, 1, 'in', 1) REQUEST_IN_LIST,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_BRANCHES p
, (select COLUMN_VALUE op FROM TABLE(apex_string.split(',:=:like:not like', ':'))) q
where CONDITION_TYPE_CODE = 'PLSQL_EXPRESSION'
and REGEXP_INSTR(CONDITION_EXPRESSION1, ':REQUEST', 1, 1, 1, 'i') > 0
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
) where REQUEST_IN_LIST is not null
)
------------------------------------------------------------------------------
union all -- affected BUTTON elements
select 'C'||A.ACTION_ID SOURCE_ID,
'C' OBJECT_TYPE,
A.ACTION_NAME SOURCE_NODE,
TO_CHAR(A.ACTION_SEQUENCE) EDGE_LABEL,
NVL(B.LABEL, A.AFFECTED_BUTTON) DEST_NODE, 'B'||A.AFFECTED_BUTTON_ID DEST_ID,
'B' DEST_OBJECT_TYPE, A.EXECUTE_ON_PAGE_INIT,
A.APPLICATION_ID, A.PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A
join APEX_APPLICATION_PAGE_BUTTONS B on A.AFFECTED_BUTTON_ID = B.BUTTON_ID and A.APPLICATION_ID = B.APPLICATION_ID
where A.AFFECTED_ELEMENTS_TYPE_CODE = 'BUTTON'
and A.APPLICATION_ID = p_Application_ID
and A.PAGE_ID = p_App_Page_ID
union all -- affected ITEM
select 'C'||ACTION_ID SOURCE_ID,
'C' OBJECT_TYPE,
ACTION_NAME SOURCE_NODE,
TO_CHAR(ACTION_SEQUENCE) EDGE_LABEL,
TRIM(N.COLUMN_VALUE) DEST_NODE, 'I'||TRIM(N.COLUMN_VALUE) DEST_ID,
'I' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A, TABLE( apex_string.split(A.AFFECTED_ELEMENTS, ',')) N
where AFFECTED_ELEMENTS_TYPE_CODE = 'ITEM'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- PL/SQL Code input ITEM ------------------------------------
select 'I'||TRIM(N.COLUMN_VALUE) SOURCE_ID, 'I' OBJECT_TYPE,
TRIM(N.COLUMN_VALUE) SOURCE_NODE,
'Input' EDGE_LABEL,
case when ACTION_CODE = 'NATIVE_JAVASCRIPT_CODE' then 'Javascript'
when ACTION_CODE = 'NATIVE_EXECUTE_PLSQL_CODE' then 'PL/SQL'
else ACTION_NAME end DEST_NODE,
'C'||ACTION_ID DEST_ID,
'C' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A, TABLE( apex_string.split(A.ATTRIBUTE_02, ',')) N
where ACTION_CODE = 'NATIVE_EXECUTE_PLSQL_CODE'
and ATTRIBUTE_02 IS NOT NULL
and exists (
select 1
from APEX_APPLICATION_PAGE_DA_ACTS B, TABLE( apex_string.split(B.AFFECTED_ELEMENTS, ',')) C
where B.APPLICATION_ID = A.APPLICATION_ID
and B.PAGE_ID = A.PAGE_ID
and B.AFFECTED_ELEMENTS_TYPE_CODE = 'ITEM'
AND TRIM(C.COLUMN_VALUE) = TRIM(N.COLUMN_VALUE)
)
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- affected REGION; code -> region
select 'C'||ACTION_ID SOURCE_ID,
'C' OBJECT_TYPE,
case when ACTION_CODE = 'NATIVE_JAVASCRIPT_CODE' then 'Javascript' else ACTION_NAME end SOURCE_NODE,
TO_CHAR(ACTION_SEQUENCE) EDGE_LABEL,
AFFECTED_REGION DEST_NODE, 'R'||AFFECTED_REGION_ID DEST_ID,
'R' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS
where ACTION_CODE != 'NATIVE_EXECUTE_PLSQL_CODE'
and AFFECTED_ELEMENTS_TYPE_CODE = 'REGION'
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- PL/SQL Code affected ITEM --
select 'C'||ACTION_ID SOURCE_ID,
'C' OBJECT_TYPE,
'PL/SQL' SOURCE_NODE,
TO_CHAR(ACTION_SEQUENCE) EDGE_LABEL,
TRIM(N.COLUMN_VALUE) DEST_NODE,
'I'||TRIM(N.COLUMN_VALUE) DEST_ID,
'I' DEST_OBJECT_TYPE, EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_DA_ACTS A, TABLE( apex_string.split(A.ATTRIBUTE_03, ',')) N
where ACTION_CODE = 'NATIVE_EXECUTE_PLSQL_CODE'
and ATTRIBUTE_03 IS NOT NULL
and AFFECTED_ELEMENTS_TYPE_CODE IS NULL
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
union all -- Page Items to Submit -> Region
select 'I'||TRIM(N.COLUMN_VALUE) SOURCE_ID,
'I' OBJECT_TYPE,
TRIM(N.COLUMN_VALUE) SOURCE_NODE,
'Input' EDGE_LABEL,
REGION_NAME DEST_NODE, 'R'||REGION_ID DEST_ID,
'R' DEST_OBJECT_TYPE, 'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from APEX_APPLICATION_PAGE_REGIONS R, TABLE( apex_string.split(R.AJAX_ITEMS_TO_SUBMIT, ',')) N
where AJAX_ITEMS_TO_SUBMIT IS NOT NULL
and APPLICATION_ID = p_Application_ID
and PAGE_ID = p_App_Page_ID
-----------------------------------------------------------------------------------------
union all -- List-Regions -> REQUEST (in Submit, Link)
select 'R'||REGION_ID SOURCE_ID,
'R' OBJECT_TYPE, -- Region
REGION_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
DEST_NODE,
'A'||TARGET_ID DEST_ID,
'A' DEST_OBJECT_TYPE, -- Link
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from list_q2
where TARGET_TYPE = 'Link'
union all -- Link => Request
select
'A'||TARGET_ID SOURCE_ID,
'A' OBJECT_TYPE, -- Link
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from list_q2
where REQUEST IS NOT NULL
and TARGET_TYPE = 'Link'
union all -- region -> Code / Link
select 'R'||REGION_ID SOURCE_ID,
'R' OBJECT_TYPE,
REGION_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| case when TARGET_TYPE = 'Link' then
' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
end DEST_NODE,
case when TARGET_TYPE = 'Link' then 'A'||TARGET_ID else 'E'||TARGET_ID end DEST_ID,
case when TARGET_TYPE = 'Link' then 'A' else 'E' end DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from list_q2
union all -- Code -> Request
select 'E'||TARGET_ID SOURCE_ID,
'E' OBJECT_TYPE,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT) SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from list_q2
where REQUEST IS NOT NULL
and TARGET_TYPE IN ('Javascript', 'Submit')
-----------------------------------------------------------------------------------------
union all -- report links --
select 'R'||REGION_ID SOURCE_ID,
'R' OBJECT_TYPE, -- Reqion
REGION_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
DEST_NODE,
'K'||TARGET_ID DEST_ID,
'K' DEST_OBJECT_TYPE, -- Link
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from report_links_q2
where TARGET_TYPE = 'Link'
union all -- Link => Request
select
'K'||TARGET_ID SOURCE_ID,
'K' OBJECT_TYPE, -- Link
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from report_links_q2
where REQUEST IS NOT NULL
and TARGET_TYPE = 'Link'
union all -- region -> Code / Link
select 'R'||REGION_ID SOURCE_ID,
'R' OBJECT_TYPE,
REGION_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| case when TARGET_TYPE = 'Link' then
' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
end DEST_NODE,
case when TARGET_TYPE = 'Link' then 'K'||TARGET_ID else 'N'||TARGET_ID end DEST_ID,
case when TARGET_TYPE = 'Link' then 'K' else 'N' end DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from report_links_q2
union all -- Code -> Request
select 'N'||TARGET_ID SOURCE_ID,
'N' OBJECT_TYPE,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT) SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from report_links_q2
where REQUEST IS NOT NULL
and TARGET_TYPE IN ('Javascript', 'Submit')
;
CURSOR menues_cur
IS
with menues_q as (
select AP.THEME_NUMBER, AT.UI_TYPE_ID,
UI.UI_TYPE_NAME, Ui.GLOBAL_PAGE_ID,
UI.NAV_BAR_LIST, UI.NAV_BAR_LIST_ID,
UI.NAVIGATION_LIST, UI.NAVIGATION_LIST_ID,
AP.APPLICATION_ID
from APEX_APPLICATIONS AP
join APEX_APPLICATION_THEMES AT on AP.APPLICATION_ID = AT.APPLICATION_ID and AP.THEME_NUMBER = AT.THEME_NUMBER
join APEX_APPL_USER_INTERFACES UI on AP.APPLICATION_ID = UI.APPLICATION_ID and AT.UI_TYPE_ID = UI.UI_TYPE_ID
where AP.APPLICATION_ID = p_Application_ID
), menu_lists_q as (
select M.NAVIGATION_LIST_ID LIST_ID, M.NAVIGATION_LIST LIST_NAME,
E.LIST_ENTRY_ID, E.ENTRY_TEXT, E.ENTRY_TARGET,
case when E.ENTRY_TARGET LIKE 'javascript%' then
case when E.ENTRY_TARGET LIKE '%apex.submit%'
or E.ENTRY_TARGET LIKE '%apex.confirm%'
then 'Submit'
else 'Javascript'
end
when E.ENTRY_TARGET LIKE 'f?p=%'
then 'Link'
end TARGET_TYPE, -- Submit / Javascript / Link / Null
E.DISPLAY_SEQUENCE,
M.APPLICATION_ID,
M.GLOBAL_PAGE_ID PAGE_ID
from menues_q M
join APEX_APPLICATION_LIST_ENTRIES E ON E.APPLICATION_ID = M.APPLICATION_ID AND E.LIST_ID = M.NAVIGATION_LIST_ID
union all
select M.NAV_BAR_LIST_ID LIST_ID, M.NAV_BAR_LIST LIST_NAME,
E.LIST_ENTRY_ID, E.ENTRY_TEXT, E.ENTRY_TARGET,
case when E.ENTRY_TARGET LIKE 'javascript%' then
case when E.ENTRY_TARGET LIKE '%apex.submit%'
or E.ENTRY_TARGET LIKE '%apex.confirm%'
then 'Submit'
else 'Javascript'
end
when E.ENTRY_TARGET LIKE 'f?p=%'
then 'Link'
end TARGET_TYPE, -- Submit / Javascript / Link / Null
E.DISPLAY_SEQUENCE,
M.APPLICATION_ID,
M.GLOBAL_PAGE_ID PAGE_ID
from menues_q M
join APEX_APPLICATION_LIST_ENTRIES E ON E.APPLICATION_ID = M.APPLICATION_ID AND E.LIST_ID = M.NAV_BAR_LIST_ID
), menu_lists_q2 as (
select P.*, P.LIST_ID||'_'||P.LIST_ENTRY_ID TARGET_ID
from (
select *
from (
select LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
REGEXP_SUBSTR(ENTRY_TARGET, '.*'||q.op||'\s*\(.*[''"](\S+)[''"]', 1, 1, 'in', 1) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from menu_lists_q P, (select COLUMN_VALUE op FROM TABLE(apex_string.split('apex\.confirm:apex\.submit', ':'))) Q
where TARGET_TYPE = 'Submit'
) where REQUEST IS NOT NULL
union
select *
from (
select LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 4) REQUEST, -- extract request
APPLICATION_ID, PAGE_ID
from menu_lists_q P
where TARGET_TYPE = 'Link'
)
union
select LIST_ID, LIST_NAME, LIST_ENTRY_ID, ENTRY_TEXT, ENTRY_TARGET, TARGET_TYPE, DISPLAY_SEQUENCE,
NULL REQUEST, APPLICATION_ID, PAGE_ID
from menu_lists_q P
where TARGET_TYPE = 'Javascript'
) P
)
select 'M'||LIST_ID SOURCE_ID,
'M' OBJECT_TYPE, -- Menu
LIST_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
DEST_NODE,
'G'||TARGET_ID DEST_ID,
'G' DEST_OBJECT_TYPE, -- Link
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from menu_lists_q2
where TARGET_TYPE = 'Link'
union all -- Link => Request
select
'G'||TARGET_ID SOURCE_ID,
'G' OBJECT_TYPE, -- Link
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| ' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from menu_lists_q2
where REQUEST IS NOT NULL
and TARGET_TYPE = 'Link'
union all -- region -> Code / Link
select 'M'||LIST_ID SOURCE_ID,
'M' OBJECT_TYPE,
LIST_NAME SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT)
|| case when TARGET_TYPE = 'Link' then
' P ' || data_browser_conf.Get_APEX_URL_Element(ENTRY_TARGET, 2) -- extract page id
end DEST_NODE,
case when TARGET_TYPE = 'Link' then 'G'||TARGET_ID else 'H'||TARGET_ID end DEST_ID,
case when TARGET_TYPE = 'Link' then 'G' else 'H' end DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from menu_lists_q2
union all -- Code -> Request
select 'H'||TARGET_ID SOURCE_ID,
'H' OBJECT_TYPE,
NVL(apex_plugin_util.replace_substitutions(ENTRY_TEXT), ENTRY_TEXT) SOURCE_NODE,
TO_CHAR(TARGET_TYPE) EDGE_LABEL,
REQUEST DEST_NODE,
'Q'||REQUEST DEST_ID, -- Request
'Q' DEST_OBJECT_TYPE,
'No' EXECUTE_ON_PAGE_INIT,
APPLICATION_ID, PAGE_ID
from menu_lists_q2
where REQUEST IS NOT NULL
and TARGET_TYPE = 'Javascript'
;
v_limit CONSTANT PLS_INTEGER := 100;
v_in_rows tab_apex_dyn_actions;
BEGIN
OPEN dyn_actions_cur;
LOOP
FETCH dyn_actions_cur BULK COLLECT INTO v_in_rows LIMIT v_limit;
EXIT WHEN v_in_rows.COUNT = 0;
FOR ind IN 1 .. v_in_rows.COUNT LOOP
pipe row (v_in_rows(ind));
END LOOP;
END LOOP;
CLOSE dyn_actions_cur;
if p_App_Page_ID IN (0, 1) then
OPEN menues_cur;
LOOP
FETCH menues_cur BULK COLLECT INTO v_in_rows LIMIT v_limit;
EXIT WHEN v_in_rows.COUNT = 0;
FOR ind IN 1 .. v_in_rows.COUNT LOOP
pipe row (v_in_rows(ind));
END LOOP;
END LOOP;
CLOSE menues_cur;
end if;
END FN_Pipe_Apex_Dyn_Actions;
FUNCTION FN_Pipe_object_dependences (
p_Exclude_Singles IN VARCHAR2 DEFAULT 'YES',
p_Include_App_Objects IN VARCHAR2 DEFAULT 'NO',
p_Include_External IN VARCHAR2 DEFAULT 'YES',
p_Include_Sys IN VARCHAR2 DEFAULT 'NO',
p_Object_Owner IN VARCHAR2 DEFAULT SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'),
p_Object_Types IN VARCHAR2 DEFAULT 'KEY CONSTRAINT:CHECK CONSTRAINT:NOT NULL CONSTRAINT:FUNCTION:INDEX:MATERIALIZED VIEW:PACKAGE:PACKAGE BODY:PROCEDURE:SEQUENCE:SYNONYM:TABLE:TRIGGER:TYPE:TYPE BODY:VIEW',
p_Object_Name IN VARCHAR2 DEFAULT NULL
)
RETURN data_browser_diagram_pipes.tab_object_dependences PIPELINED
IS
CURSOR all_objects_cur
IS
WITH Sys_Objects as (
select * from table(data_browser_pipes.FN_Pipe_Sys_Objects(p_Include_External))
), PARAM AS (
SELECT p_Object_Types Object_Types,
p_Include_Sys Include_Sys, -- YES/NO
p_Include_External Include_External, -- YES/NO
p_Object_Owner Current_Schema
FROM DUAL
), Depend_q as (
SELECT TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE,
SO.OBJECT_NAME,
SO.OWNER OBJECT_OWNER,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.OWNER TARGET_OBJECT_OWNER,
TA.STATUS TARGET_STATUS,
INITCAP(TA.OBJECT_TYPE) LABEL,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM Sys_Objects TA
LEFT OUTER JOIN SYS.ALL_DEPENDENCIES D ON D.REFERENCED_OWNER = TA.OWNER
AND D.REFERENCED_NAME = TA.OBJECT_NAME
AND D.REFERENCED_TYPE = TA.OBJECT_TYPE
LEFT OUTER JOIN Sys_Objects SO ON D.OWNER = SO.OWNER
AND D.NAME = SO.OBJECT_NAME
AND D.TYPE = SO.OBJECT_TYPE
UNION ALL -- All Indexes --
SELECT TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE,
SO.OBJECT_NAME,
SO.OWNER OBJECT_OWNER,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.OWNER TARGET_OBJECT_OWNER,
TA.STATUS TARGET_STATUS,
INITCAP(TA.OBJECT_TYPE) LABEL,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM Sys_Objects TA, SYS.ALL_INDEXES D, Sys_Objects SO
WHERE D.TABLE_OWNER = TA.OWNER
AND D.TABLE_NAME = TA.OBJECT_NAME
AND D.TABLE_TYPE = TA.OBJECT_TYPE
AND D.OWNER = SO.OWNER
AND D.INDEX_NAME = SO.OBJECT_NAME
AND SO.OBJECT_TYPE = 'INDEX'
UNION ALL -- All FK Constraints --
SELECT TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') NODE_NAME,
'REF CONSTRAINT' OBJECT_TYPE,
TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') OBJECT_NAME,
SO.OWNER OBJECT_OWNER,
SO.STATUS,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_NODE_NAME,
'KEY CONSTRAINT' TARGET_OBJECT_TYPE,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_OBJECT_NAME,
TA.OWNER TARGET_OBJECT_OWNER,
TA.STATUS TARGET_STATUS,
case SO.CONSTRAINT_TYPE when 'C' then 'Check' when 'P' then 'Primary' when 'R' then 'Reference' when 'U' then 'Unique' else SO.CONSTRAINT_TYPE end LABEL,
case when SO.VIEW_RELATED IS NULL then SO.TABLE_NAME end TABLE_NAME,
case when TA.VIEW_RELATED IS NULL then TA.TABLE_NAME end TARGET_TABLE_NAME
FROM SYS.ALL_CONSTRAINTS SO, SYS.ALL_CONSTRAINTS TA
WHERE SO.R_OWNER = TA.OWNER
AND SO.R_CONSTRAINT_NAME = TA.CONSTRAINT_NAME
UNION ALL -- All_Object Constrants --
SELECT TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') NODE_NAME,
case SO.CONSTRAINT_TYPE
when 'C' then
case when SO.SEARCH_CONDITION_VC LIKE DBMS_ASSERT.ENQUOTE_NAME('%') || ' IS NOT NULL' then
'NOT NULL CONSTRAINT' else 'CHECK CONSTRAINT'
end
else 'KEY CONSTRAINT'
end OBJECT_TYPE,
TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') OBJECT_NAME,
SO.OWNER OBJECT_OWNER,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.OWNER TARGET_OBJECT_OWNER,
TA.STATUS TARGET_STATUS,
case SO.CONSTRAINT_TYPE when 'C' then 'Check' when 'P' then 'Primary' when 'R' then 'Reference' when 'U' then 'Unique' else SO.CONSTRAINT_TYPE end LABEL,
case when SO.VIEW_RELATED IS NULL then SO.TABLE_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM SYS.ALL_CONSTRAINTS SO, Sys_Objects TA
WHERE SO.OWNER = TA.OWNER
AND SO.TABLE_NAME = TA.OBJECT_NAME
AND TA.OBJECT_TYPE = case when SO.VIEW_RELATED = 'DEPEND ON VIEW' then 'VIEW' else 'TABLE' end
AND SO.CONSTRAINT_TYPE != 'R'
UNION ALL -- All_Object Constrants --
SELECT
TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE OBJECT_TYPE,
SO.OBJECT_NAME OBJECT_NAME,
SO.OWNER OBJECT_OWNER,
SO.STATUS,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_NODE_NAME,
'REF CONSTRAINT' TARGET_OBJECT_TYPE,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_OBJECT_NAME,
TA.OWNER TARGET_OBJECT_OWNER,
TA.STATUS TARGET_STATUS,
'Reference' LABEL,
case when TA.VIEW_RELATED IS NULL then TA.TABLE_NAME end TABLE_NAME,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TARGET_TABLE_NAME
FROM SYS.ALL_CONSTRAINTS TA, Sys_Objects SO
WHERE SO.OWNER = TA.OWNER
AND TA.TABLE_NAME = SO.OBJECT_NAME
AND SO.OBJECT_TYPE = case when TA.VIEW_RELATED = 'DEPEND ON VIEW' then 'VIEW' else 'TABLE' end
AND TA.CONSTRAINT_TYPE = 'R'
)
SELECT /*+ RESULT_CACHE */ NODE_NAME, OBJECT_TYPE, OBJECT_NAME, OBJECT_OWNER,
STATUS, TARGET_NODE_NAME, TARGET_OBJECT_TYPE, TARGET_OBJECT_NAME,
TARGET_OBJECT_OWNER, TARGET_STATUS, LABEL, TABLE_NAME, TARGET_TABLE_NAME
FROM Depend_q, param
WHERE ((TARGET_OBJECT_OWNER NOT IN ('PUBLIC', 'SYS') and TARGET_OBJECT_OWNER NOT LIKE 'APEX%') or Include_Sys = 'YES')
AND (OBJECT_OWNER IS NULL or (OBJECT_OWNER NOT IN ('PUBLIC', 'SYS') and OBJECT_OWNER NOT LIKE 'APEX%') or Include_Sys = 'YES')
AND (TARGET_OBJECT_OWNER = Current_Schema or Include_External = 'YES')
AND (OBJECT_OWNER IS NULL or OBJECT_OWNER = Current_Schema or Include_External = 'YES')
AND (OBJECT_NAME IS NOT NULL or p_Exclude_Singles = 'NO')
AND Current_Schema IN (TARGET_OBJECT_OWNER, OBJECT_OWNER)
AND (p_Object_Name IN (OBJECT_NAME, TARGET_OBJECT_NAME) OR p_Object_Name IS NULL) -- optional search for one object_name
AND (OBJECT_NAME IS NOT NULL or p_Exclude_Singles = 'NO')
AND (OBJECT_TYPE IS NULL or OBJECT_TYPE IN (SELECT COLUMN_VALUE FROM table(apex_string.split(Object_Types,':'))))
AND TARGET_OBJECT_TYPE IN (SELECT COLUMN_VALUE FROM table(apex_string.split(Object_Types,':')))
AND (case when TABLE_NAME IS NULL then 'VIEW' else 'TABLE' end IN (SELECT COLUMN_VALUE FROM table(apex_string.split(Object_Types,':')))
or OBJECT_TYPE IS NULL or OBJECT_TYPE NOT IN ('KEY CONSTRAINT', 'CHECK CONSTRAINT', 'NOT NULL CONSTRAINT', 'REF CONSTRAINT'))
AND (case when TARGET_TABLE_NAME IS NULL then 'VIEW' else 'TABLE' end IN (SELECT COLUMN_VALUE FROM table(apex_string.split(Object_Types,':')))
or TARGET_OBJECT_TYPE IS NULL or TARGET_OBJECT_TYPE NOT IN ('KEY CONSTRAINT', 'CHECK CONSTRAINT', 'NOT NULL CONSTRAINT', 'REF CONSTRAINT'))
;
CURSOR user_objects_cur
IS
WITH Sys_Objects as (
select * from table(data_browser_pipes.FN_Pipe_Sys_Objects(p_Include_External))
), Depend_q as (
SELECT TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE,
SO.OBJECT_NAME,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.STATUS TARGET_STATUS,
INITCAP(TA.OBJECT_TYPE) LABEL,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM Sys_Objects TA
LEFT OUTER JOIN SYS.USER_DEPENDENCIES D ON D.REFERENCED_NAME = TA.OBJECT_NAME
AND D.REFERENCED_TYPE = TA.OBJECT_TYPE
AND D.REFERENCED_OWNER = SYS_CONTEXT ('USERENV', 'CURRENT_SCHEMA')
LEFT OUTER JOIN Sys_Objects SO ON D.NAME = SO.OBJECT_NAME
AND D.TYPE = SO.OBJECT_TYPE
UNION ALL -- All Indexes --
SELECT TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE,
SO.OBJECT_NAME,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.STATUS TARGET_STATUS,
INITCAP(TA.OBJECT_TYPE) LABEL,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM Sys_Objects TA, SYS.USER_INDEXES D, Sys_Objects SO
WHERE D.TABLE_NAME = TA.OBJECT_NAME
AND D.TABLE_TYPE = TA.OBJECT_TYPE
AND D.INDEX_NAME = SO.OBJECT_NAME
AND SO.OBJECT_TYPE = 'INDEX'
UNION ALL -- All FK Constraints --
SELECT TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') NODE_NAME,
'REF CONSTRAINT' OBJECT_TYPE,
TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') OBJECT_NAME,
SO.STATUS,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_NODE_NAME,
'KEY CONSTRAINT' TARGET_OBJECT_TYPE,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_OBJECT_NAME,
TA.STATUS TARGET_STATUS,
case SO.CONSTRAINT_TYPE when 'C' then 'Check' when 'P' then 'Primary' when 'R' then 'Reference' when 'U' then 'Unique' else SO.CONSTRAINT_TYPE end LABEL,
case when SO.VIEW_RELATED IS NULL then SO.TABLE_NAME end TABLE_NAME,
case when TA.VIEW_RELATED IS NULL then TA.TABLE_NAME end TARGET_TABLE_NAME
FROM SYS.USER_CONSTRAINTS SO, SYS.USER_CONSTRAINTS TA
WHERE SO.R_CONSTRAINT_NAME = TA.CONSTRAINT_NAME
AND SO.R_OWNER = TA.OWNER
UNION ALL -- All_Object Constrants --
SELECT TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') NODE_NAME,
case SO.CONSTRAINT_TYPE when 'C' then
case when SO.SEARCH_CONDITION_VC LIKE DBMS_ASSERT.ENQUOTE_NAME('%') || ' IS NOT NULL' then
'NOT NULL CONSTRAINT' else 'CHECK CONSTRAINT'
end
else 'KEY CONSTRAINT'
end OBJECT_TYPE,
TRANSLATE(SO.CONSTRAINT_NAME, ', ', '__') OBJECT_NAME,
SO.STATUS,
TO_CHAR(TA.OBJECT_ID) TARGET_NODE_NAME,
TA.OBJECT_TYPE TARGET_OBJECT_TYPE,
TA.OBJECT_NAME TARGET_OBJECT_NAME,
TA.STATUS TARGET_STATUS,
case SO.CONSTRAINT_TYPE when 'C' then 'Check' when 'P' then 'Primary' when 'R' then 'Reference' when 'U' then 'Unique' else SO.CONSTRAINT_TYPE end LABEL,
case when SO.VIEW_RELATED IS NULL then SO.TABLE_NAME end TABLE_NAME,
case when TA.OBJECT_TYPE = 'TABLE' then TA.OBJECT_NAME end TARGET_TABLE_NAME
FROM SYS.USER_CONSTRAINTS SO, Sys_Objects TA
WHERE SO.TABLE_NAME = TA.OBJECT_NAME
AND SO.OWNER = TA.OWNER
AND TA.OBJECT_TYPE = case when SO.VIEW_RELATED = 'DEPEND ON VIEW' then 'VIEW' else 'TABLE' end
AND SO.CONSTRAINT_TYPE != 'R'
UNION ALL -- All_Object Constrants --
SELECT
TO_CHAR(SO.OBJECT_ID) NODE_NAME,
SO.OBJECT_TYPE OBJECT_TYPE,
SO.OBJECT_NAME OBJECT_NAME,
SO.STATUS,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_NODE_NAME,
'REF CONSTRAINT' TARGET_OBJECT_TYPE,
TRANSLATE(TA.CONSTRAINT_NAME, ', ', '__') TARGET_OBJECT_NAME,
TA.STATUS TARGET_STATUS,
'Reference' LABEL,
case when TA.VIEW_RELATED IS NULL then TA.TABLE_NAME end TABLE_NAME,
case when SO.OBJECT_TYPE = 'TABLE' then SO.OBJECT_NAME end TARGET_TABLE_NAME
FROM SYS.USER_CONSTRAINTS TA, Sys_Objects SO
WHERE TA.TABLE_NAME = SO.OBJECT_NAME
AND SO.OWNER = TA.OWNER
AND SO.OBJECT_TYPE = case when TA.VIEW_RELATED = 'DEPEND ON VIEW' then 'VIEW' else 'TABLE' end
AND TA.CONSTRAINT_TYPE = 'R'
)
SELECT /*+ RESULT_CACHE */ NODE_NAME, OBJECT_TYPE, OBJECT_NAME,
SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') OBJECT_OWNER,
STATUS,
TARGET_NODE_NAME, TARGET_OBJECT_TYPE, TARGET_OBJECT_NAME,
SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') TARGET_OBJECT_OWNER,
TARGET_STATUS,
LABEL, TABLE_NAME, TARGET_TABLE_NAME
FROM Depend_q
WHERE (OBJECT_NAME IS NOT NULL or p_Exclude_Singles = 'NO')
AND (p_Object_Name IN (OBJECT_NAME, TARGET_OBJECT_NAME) OR p_Object_Name IS NULL) -- optional search for one object_name
AND (OBJECT_TYPE IS NULL or OBJECT_TYPE IN (SELECT COLUMN_VALUE FROM table(apex_string.split(p_Object_Types,':'))))
AND TARGET_OBJECT_TYPE IN (SELECT COLUMN_VALUE FROM table(apex_string.split(p_Object_Types,':')))
AND (case when TABLE_NAME IS NULL then 'VIEW' else 'TABLE' end IN (SELECT COLUMN_VALUE FROM table(apex_string.split(p_Object_Types,':')))
or OBJECT_TYPE IS NULL or OBJECT_TYPE NOT IN ('KEY CONSTRAINT', 'CHECK CONSTRAINT', 'NOT NULL CONSTRAINT', 'REF CONSTRAINT'))
AND (case when TARGET_TABLE_NAME IS NULL then 'VIEW' else 'TABLE' end IN (SELECT COLUMN_VALUE FROM table(apex_string.split(p_Object_Types,':')))
or TARGET_OBJECT_TYPE IS NULL or TARGET_OBJECT_TYPE NOT IN ('KEY CONSTRAINT', 'CHECK CONSTRAINT', 'NOT NULL CONSTRAINT', 'REF CONSTRAINT'))
;
v_limit CONSTANT PLS_INTEGER := 100;
v_in_rows tab_object_dependences;
BEGIN
if p_Include_External = 'YES' then
OPEN all_objects_cur;
LOOP
FETCH all_objects_cur BULK COLLECT INTO v_in_rows LIMIT v_limit;
EXIT WHEN v_in_rows.COUNT = 0;
FOR ind IN 1 .. v_in_rows.COUNT LOOP
pipe row (v_in_rows(ind));
END LOOP;
END LOOP;
CLOSE all_objects_cur;
else
OPEN user_objects_cur;
LOOP
FETCH user_objects_cur BULK COLLECT INTO v_in_rows LIMIT v_limit;
EXIT WHEN v_in_rows.COUNT = 0;
FOR ind IN 1 .. v_in_rows.COUNT LOOP
pipe row (v_in_rows(ind));
END LOOP;
END LOOP;
CLOSE user_objects_cur;
end if;
END FN_Pipe_object_dependences;
END data_browser_diagram_pipes;
/
| 44.030207 | 206 | 0.702004 |
8599ffe35407070cd185c4dc33fdccea1859108b | 3,269 | js | JavaScript | pages/product.js | DCKT/next-blog | 85d0cd455685929f841c07dfad8d6abf5af99780 | [
"MIT"
] | null | null | null | pages/product.js | DCKT/next-blog | 85d0cd455685929f841c07dfad8d6abf5af99780 | [
"MIT"
] | 14 | 2020-06-11T05:36:12.000Z | 2022-03-15T20:23:36.000Z | pages/product.js | DCKT/next-blog | 85d0cd455685929f841c07dfad8d6abf5af99780 | [
"MIT"
] | null | null | null | // @flow
import React from 'react'
import Layout from '../components/Layout'
import * as Moltin from '../utils/js/moltin'
import Button from '../components/Button'
import { addProduct } from '../actions/cart'
import type { TMoltinProduct, TMoltinImage } from '../utils/js/types'
import classNames from 'classnames'
import providerConnect from '../components/_Provider'
type Props = {
product: TMoltinProduct,
dispatch: () => any,
isServer: boolean,
initialState: Object
}
type State = {
currentPicture: TMoltinImage,
isLoading: boolean
}
class ProductDetails extends React.Component {
props: Props
state: State
store: Object
static async getInitialProps ({ query, req }) {
const id = query.id || query.slug.split('_')[1]
const product = await Moltin.fetchProduct(id)
return { product }
}
componentDidMount () {
this.setState({ currentPicture: this.props.product.images[0] })
}
componentDidUpdate (prevProps, prevState) {
if (prevProps.product.id !== this.props.product.id) {
this.setState({ currentPicture: this.props.product.images[0] }) // eslint-disable-line react/no-did-update-set-state
}
}
constructor (props: Props) {
super(props)
this.state = {
currentPicture: null,
isLoading: false
}
}
render () {
const { product } = this.props
const { currentPicture, isLoading } = this.state
const { title, description, brand, images } = product
const addButtonCartClassName = classNames({
'is-loading': isLoading
})
return product ? (
<Layout title={title}>
<div className='container'>
<div className='columns'>
<div className='column is-half'>
<div>
{
currentPicture ? <img src={currentPicture.url.http} alt={currentPicture.name} /> : null
}
</div>
<div className='columns'>
{
images.map(this._renderPictures)
}
</div>
</div>
<div className='column is-half'>
<section className='section'>
<div className='heading'>
<h1 className='title'>{ title }</h1>
<h2 className='subtitle'>{ brand.value }</h2>
</div>
<p className='content'>
{ description }
</p>
<div>
<Button type='primary' onClick={this._addProduct} className={addButtonCartClassName}>
Ajouter au panier
</Button>
</div>
</section>
</div>
</div>
</div>
</Layout>
) : null
}
_renderPictures = (picture: TMoltinImage, i: number): React$Element<*> =>
<div className='column' key={i}>
<img src={picture.url.http} alt={picture.name} onClick={this._changeCurrentPicture(picture)} />
</div>
_changeCurrentPicture = (picture: TMoltinImage): Function => () => {
this.setState({ currentPicture: picture })
}
_addProduct = (): void => {
const { product } = this.props
this.props.dispatch(addProduct(product))
}
}
export default providerConnect()(ProductDetails)
| 27.940171 | 122 | 0.576017 |
186321f0ff7a2d4e409307608697b82b57b3c26f | 306 | css | CSS | angular-src/src/app/general/login/login.component.css | inesseq/GCE-NEIIST-webapp | e37b0511a52c98a6066df333274af5cf136dbc4c | [
"MIT"
] | 1 | 2020-03-15T18:53:12.000Z | 2020-03-15T18:53:12.000Z | angular-src/src/app/general/login/login.component.css | facasaca/GCE-NEIIST-webapp | 99595c7d3ab9b69a889aada3c82939cc6dd98247 | [
"MIT"
] | null | null | null | angular-src/src/app/general/login/login.component.css | facasaca/GCE-NEIIST-webapp | 99595c7d3ab9b69a889aada3c82939cc6dd98247 | [
"MIT"
] | null | null | null | .middlePage {
width: 70%;
height: auto;
margin-bottom: 5em;
margin-top: 5em;
}
.spacing {
padding-top:7px;
padding-bottom:7px;
}
.centered {
text-align: center;
}
#singlebutton {
margin-bottom:10px;
}
.btn-primary:hover {
background-color: #2d3e43;
}
.panel {
width: 70em;
} | 11.333333 | 28 | 0.624183 |
0c9cc769c2da13b0f56a2dafc87c5ee151893048 | 1,992 | sql | SQL | sql file/todolist.sql | Majd-Rajab1994/to | 78f65a5dd7545b77739dbdf1dbd786514f8d248c | [
"MIT"
] | null | null | null | sql file/todolist.sql | Majd-Rajab1994/to | 78f65a5dd7545b77739dbdf1dbd786514f8d248c | [
"MIT"
] | null | null | null | sql file/todolist.sql | Majd-Rajab1994/to | 78f65a5dd7545b77739dbdf1dbd786514f8d248c | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 14, 2020 at 07:49 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `todolist`
--
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `migrations` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`version` varchar(255) NOT NULL,
`class` text NOT NULL,
`group` varchar(255) NOT NULL,
`namespace` varchar(255) NOT NULL,
`time` int(11) NOT NULL,
`batch` int(11) UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
(1, '2020-10-13-083315', 'App\\Database\\Migrations\\Todo', 'default', 'App', 1602578820, 1);
-- --------------------------------------------------------
--
-- Table structure for table `todo`
--
DROP TABLE IF EXISTS `todo`;
CREATE TABLE IF NOT EXISTS `todo` (
`id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`is_deleted` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `todo`
--
INSERT INTO `todo` (`id`, `name`, `is_deleted`) VALUES
(1, 'work', 0);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 26.56 | 97 | 0.657129 |
c4aae14147ec5aa6fad44d253a208e718fe33fdf | 8,060 | kt | Kotlin | mightypreferences/src/main/kotlin/com/illuzor/mightypreferences/Prefs.kt | illuzor/Mighty-Preferences | 0c9f1d392b66c82082e75dab8e65a0f3e8674af7 | [
"MIT"
] | 1 | 2018-11-13T05:44:28.000Z | 2018-11-13T05:44:28.000Z | mightypreferences/src/main/kotlin/com/illuzor/mightypreferences/Prefs.kt | illuzor/Mighty-Preferences | 0c9f1d392b66c82082e75dab8e65a0f3e8674af7 | [
"MIT"
] | 1 | 2021-02-04T09:36:22.000Z | 2021-02-23T08:53:55.000Z | mightypreferences/src/main/kotlin/com/illuzor/mightypreferences/Prefs.kt | illuzor/Mighty-Preferences | 0c9f1d392b66c82082e75dab8e65a0f3e8674af7 | [
"MIT"
] | null | null | null | package com.illuzor.mightypreferences
import android.content.SharedPreferences
@Suppress("NOTHING_TO_INLINE")
class Prefs(private val prefs: SharedPreferences) {
class PutHelper internal constructor(prefs: SharedPreferences) {
private val editor = prefs.edit()
fun bool(key: String, value: Boolean) {
editor.putBoolean(key, value)
}
fun byte(key: String, value: Byte) {
editor.putInt(key, value.toInt())
}
fun short(key: String, value: Short) {
editor.putInt(key, value.toInt())
}
fun int(key: String, value: Int) {
editor.putInt(key, value)
}
fun long(key: String, value: Long) {
editor.putLong(key, value)
}
fun float(key: String, value: Float) {
editor.putFloat(key, value)
}
fun double(key: String, value: Double) {
editor.putString(key, value.toString())
}
fun string(key: String, value: String) {
editor.putString(key, value)
}
fun <K : Any, V : Any> map(
key: String,
map: Map<K, V>,
separator1: String = ":",
separator2: String = ","
) {
if (map.isEmpty()) return
val keyClass = map.keys.iterator().next().javaClass.simpleName
val valueClass = map.values.iterator().next().javaClass.simpleName
editor.putString(key, mapToString(map, separator1, separator2))
editor.putString(key + M_POSTFIX, "$keyClass:$valueClass")
}
fun <T : Any> array(key: String, array: Array<T>, separator: String = ",") {
if (array.isEmpty()) return
val type = array.elementAt(0).javaClass.simpleName
editor.putString(key, arrayToString(array, separator))
editor.putString(key + A_POSTFIX, type)
}
inline fun <reified T : Any> list(key: String, list: List<T>, separator: String = ",") =
array(key, list.toTypedArray(), separator)
inline fun <reified T : Any> set(key: String, set: Set<T>, separator: String = ",") =
array(key, set.toTypedArray(), separator)
internal fun save() = editor.apply()
}
companion object {
var DEFAULT_BOOL = false
var DEFAULT_BYTE: Byte = 0x00
var DEFAULT_SHORT: Short = 0
var DEFAULT_INT: Int = 0
var DEFAULT_LONG: Long = 0L
var DEFAULT_FLOAT: Float = 0.0f
var DEFAULT_DOUBLE: Double = 0.0
var DEFAULT_STRING = "undefined"
private val M_POSTFIX = "_mapClasses"
private val A_POSTFIX = "_arrayClasses"
}
private val listeners = mutableListOf<(SharedPreferences, String) -> Unit>()
private val changeListener by lazy {
SharedPreferences.OnSharedPreferenceChangeListener { prefs, key ->
listeners.forEach { it(prefs, key) }
}
}
fun put(actions: PutHelper.() -> Unit) = PutHelper(prefs).apply(actions).save()
fun putBool(key: String, value: Boolean) = prefs.edit().putBoolean(key, value).apply()
fun getBool(key: String, default: Boolean = DEFAULT_BOOL) = prefs.getBoolean(key, default)
fun putByte(key: String, value: Byte) = prefs.edit().putInt(key, value.toInt()).apply()
fun getByte(key: String, default: Byte = DEFAULT_BYTE) =
prefs.getInt(key, default.toInt()).toByte()
fun putShort(key: String, value: Short) = prefs.edit().putInt(key, value.toInt()).apply()
fun getShort(key: String, default: Short = DEFAULT_SHORT) =
prefs.getInt(key, default.toInt()).toShort()
fun putInt(key: String, value: Int) = prefs.edit().putInt(key, value).apply()
fun getInt(key: String, default: Int = DEFAULT_INT) = prefs.getInt(key, default)
fun putLong(key: String, value: Long) = prefs.edit().putLong(key, value).apply()
fun getLong(key: String, default: Long = DEFAULT_LONG) = prefs.getLong(key, default)
fun putFloat(key: String, value: Float) = prefs.edit().putFloat(key, value).apply()
fun getFloat(key: String, default: Float = DEFAULT_FLOAT) = prefs.getFloat(key, default)
fun putDouble(key: String, value: Double) = prefs.edit()
.putString(key, value.toString())
.apply()
fun getDouble(key: String, default: Double = DEFAULT_DOUBLE) =
prefs.getString(key, default.toString())!!.toDouble()
fun putString(key: String, value: String) = prefs.edit().putString(key, value).apply()
fun getString(key: String, default: String = DEFAULT_STRING) = prefs.getString(key, default)!!
fun <K : Any, V : Any> putMap(
key: String,
map: Map<K, V>,
separator1: String = ":",
separator2: String = ","
) {
if (map.isEmpty()) return
val keyClass = map.keys.iterator().next().javaClass.simpleName
val valueClass = map.values.iterator().next().javaClass.simpleName
prefs.edit().apply {
putString(key, mapToString(map, separator1, separator2))
putString(key + M_POSTFIX, "$keyClass:$valueClass")
}.apply()
}
@Suppress("UNCHECKED_CAST")
fun <K, V> getMap(key: String, separator1: String = ":", separator2: String = ","): Map<K, V> {
if (notContains(key) || notContains(key + M_POSTFIX)) return emptyMap()
val types = getString(key + M_POSTFIX)
val keyType = types.substringBeforeLast(":").substringAfter(":")
val valueType = types.substringAfterLast(":")
return stringToMap<Any, Any>(
getString(key),
keyType,
valueType,
separator1,
separator2
) as Map<K, V>
}
fun <T : Any> putArray(key: String, array: Array<T>, separator: String = ",") {
if (array.isEmpty()) return
val type = array.elementAt(0).javaClass.simpleName
prefs.edit().apply {
putString(key, arrayToString(array, separator))
putString(key + A_POSTFIX, type)
}.apply()
}
@Suppress("UNCHECKED_CAST")
fun <T> getArray(key: String, separator: String = ","): Array<T> {
if (notContains(key) || notContains(key + A_POSTFIX))
return emptyArray<Any>() as Array<T>
val type = getString(key + A_POSTFIX)
return stringToArray<Any>(getString(key), type, separator) as Array<T>
}
inline fun <reified T : Any> putList(key: String, list: List<T>, separator: String = ",") =
putArray(key, list.toTypedArray(), separator)
inline fun <T> getList(key: String, separator: String = ","): List<T> =
getArray<T>(key, separator).toList()
inline fun <reified T : Any> putSet(key: String, set: Set<T>, separator: String = ",") =
putArray(key, set.toTypedArray(), separator)
inline fun <T> getSet(key: String, separator: String = ","): Set<T> =
getArray<T>(key, separator).toSet()
fun contains(key: String) = prefs.contains(key)
fun containsAll(keys: Iterable<String>) = keys.all { contains(it) }
fun notContains(key: String) = !prefs.contains(key)
fun clear() = prefs.edit().clear().apply()
fun remove(key: String) {
val editor = prefs.edit()
editor.remove(key)
when {
contains(key + M_POSTFIX) -> editor.remove(key + M_POSTFIX)
contains(key + A_POSTFIX) -> editor.remove(key + A_POSTFIX)
}
editor.apply()
}
fun addListener(listener: (SharedPreferences, String) -> Unit) {
if (listeners.isEmpty()) {
prefs.registerOnSharedPreferenceChangeListener(changeListener)
}
listeners.add(listener)
}
fun removeListener(listener: (SharedPreferences, String) -> Unit) {
listeners.remove(listener)
if (listeners.isEmpty()) {
prefs.unregisterOnSharedPreferenceChangeListener(changeListener)
}
}
fun clearListeners() {
prefs.unregisterOnSharedPreferenceChangeListener(changeListener)
listeners.clear()
}
}
| 36.636364 | 99 | 0.606079 |
c460529abed202d6c85d2bf557806283b095a2f4 | 890 | h | C | DirectXTKTutorial_SimpleRendering_7.6/DirectXTKTutorial/Mesh.h | yoshimune/DirectXTKTutorial | f324d902db603d67c96e2e5fa350a1366a28b020 | [
"MIT"
] | 1 | 2020-04-07T14:17:33.000Z | 2020-04-07T14:17:33.000Z | DirectXTKTutorial_SimpleRendering_7.6/DirectXTKTutorial/Mesh.h | yoshimune/DirectXTKTutorial | f324d902db603d67c96e2e5fa350a1366a28b020 | [
"MIT"
] | null | null | null | DirectXTKTutorial_SimpleRendering_7.6/DirectXTKTutorial/Mesh.h | yoshimune/DirectXTKTutorial | f324d902db603d67c96e2e5fa350a1366a28b020 | [
"MIT"
] | null | null | null | #pragma once
#include "pch.h"
class Mesh
{
public:
Mesh(D3D_PRIMITIVE_TOPOLOGY topology,
DirectX::VertexPositionColor vertices[],
int count,
DirectX::SimpleMath::Vector3 position,
DirectX::SimpleMath::Vector3 scale);
~Mesh();
const D3D_PRIMITIVE_TOPOLOGY GetTopology() const;
const int GetCount() const;
const DirectX::VertexPositionColor* GetVertices(std::unique_ptr<DirectX::VertexPositionColor[]>& result);
void SetPosition(DirectX::SimpleMath::Vector3 position);
private:
const D3D_PRIMITIVE_TOPOLOGY topology;
std::unique_ptr<DirectX::VertexPositionColor[]> vertices;
int count;
DirectX::SimpleMath::Vector3 position;
DirectX::SimpleMath::Vector3 scale;
DirectX::SimpleMath::Vector3 ApplyPosition(DirectX::SimpleMath::Vector3 origin) const;
DirectX::SimpleMath::Vector3 ApplyScale(DirectX::SimpleMath::Vector3 origin) const;
};
| 29.666667 | 107 | 0.757303 |
38c3bdecb4badfb663b81a23befeec5757dffc6f | 1,977 | h | C | kernel/nvidia/include/media/imx274.h | rubedos/l4t_R32.5.1_viper | 6aed0062084d9031546f946e63fc74303555e0a6 | [
"MIT"
] | null | null | null | kernel/nvidia/include/media/imx274.h | rubedos/l4t_R32.5.1_viper | 6aed0062084d9031546f946e63fc74303555e0a6 | [
"MIT"
] | null | null | null | kernel/nvidia/include/media/imx274.h | rubedos/l4t_R32.5.1_viper | 6aed0062084d9031546f946e63fc74303555e0a6 | [
"MIT"
] | null | null | null | /**
* Copyright (c) 2016-2019, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __IMX274_H__
#define __IMX274_H__
#include <uapi/media/imx274.h>
#define IMX274_SVR_ADDR 0x300E
#define IMX274_SHR_ADDR_LSB 0x300C
#define IMX274_SHR_ADDR_MSB 0x300D
#define IMX274_SHR_DOL1_ADDR_LSB 0x302E
#define IMX274_SHR_DOL1_ADDR_MSB 0x302F
#define IMX274_SHR_DOL2_ADDR_LSB 0x3030
#define IMX274_SHR_DOL2_ADDR_MSB 0x3031
#define IMX274_RHS1_ADDR_LSB 0x3032
#define IMX274_RHS1_ADDR_MSB 0x3033
#define IMX274_VMAX_ADDR_LSB 0x30F8
#define IMX274_VMAX_ADDR_MID 0x30F9
#define IMX274_VMAX_ADDR_MSB 0x30FA
#define IMX274_ANALOG_GAIN_ADDR_LSB 0x300A
#define IMX274_ANALOG_GAIN_ADDR_MSB 0x300B
#define IMX274_DIGITAL_GAIN_ADDR 0x3012
#define IMX274_GROUP_HOLD_ADDR 0x302D
struct imx274_power_rail {
struct regulator *dvdd;
struct regulator *avdd;
struct regulator *iovdd;
struct regulator *ext_reg1;
struct regulator *ext_reg2;
struct clk *mclk;
unsigned int pwdn_gpio;
unsigned int cam1_gpio;
unsigned int reset_gpio;
unsigned int af_gpio;
};
struct imx274_platform_data {
const char *mclk_name; /* NULL for default default_mclk */
unsigned int cam1_gpio;
unsigned int reset_gpio;
unsigned int af_gpio;
bool ext_reg;
int (*power_on)(struct imx274_power_rail *pw);
int (*power_off)(struct imx274_power_rail *pw);
};
#endif /* __IMX274_H__ */
| 29.073529 | 76 | 0.78351 |
16a20347ca2e6be70b88b21ce8cadc22320f1b32 | 4,373 | h | C | kgl_genomics/kgl_sequence/kgl_sequence_amino.h | kellerberrin/OSM_Gene_Cpp | 4ec4d1244f3f1b16213cf05f0056d8e5f85d68c4 | [
"MIT"
] | 1 | 2021-04-09T16:24:06.000Z | 2021-04-09T16:24:06.000Z | kgl_genomics/kgl_sequence/kgl_sequence_amino.h | kellerberrin/KGL_Gene | f8e6c14b8b2009d82d692b28354561b5f0513c5e | [
"MIT"
] | null | null | null | kgl_genomics/kgl_sequence/kgl_sequence_amino.h | kellerberrin/KGL_Gene | f8e6c14b8b2009d82d692b28354561b5f0513c5e | [
"MIT"
] | null | null | null | //
// Created by kellerberrin on 31/10/17.
//
#ifndef KGL_SEQUENCE_AMINO_H
#define KGL_SEQUENCE_AMINO_H
#include <string>
#include "kgl_sequence_base.h"
#include "kgl_table.h"
#include "kgl_sequence_virtual.h"
namespace kellerberrin::genome { // organization::project level namespace
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The Amino alphabet strings are defined here.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
using StringAminoAcid = AlphabetString<AminoAcid>;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Amino Sequence - A container for Amino Acid (protein) sequences.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class AminoSequence: public AlphabetSequence<AminoAcid> {
public:
AminoSequence(AminoSequence&& sequence) noexcept : AlphabetSequence<AminoAcid>(std::move(sequence)) {};
explicit AminoSequence(StringAminoAcid&& sequence_string) noexcept : AlphabetSequence<AminoAcid>(std::move(sequence_string)) {};
AminoSequence(AminoSequence& sequence) = delete; // For Performance reasons, don't allow copy constructors.
AminoSequence() = default; // Allow the creation of empty sequences
~AminoSequence() override = default;
// For Performance reasons, don't allow naive assignments.
AminoSequence& operator=(const AminoSequence&) = delete;
// Only allow move assignments
AminoSequence& operator=(AminoSequence&& moved) noexcept {
AlphabetSequence<AminoAcid>::operator=(std::move(moved));
return *this;
}
[[nodiscard]] bool removeTrailingStop(); // Remove the stop codon (if present).
// Returns a sub-sequence
[[nodiscard]] AminoSequence subSequence( ContigOffset_t sub_sequence_offset, ContigSize_t sub_sequence_length) const;
private:
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TranslateToAmino - Convert DNA/RNA base sequences to Amino acid sequences.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class TranslateToAmino {
public:
TranslateToAmino() : table_ptr_(std::make_shared<AminoTranslationTable>()) {}
~TranslateToAmino() = default;
[[nodiscard]] std::string translationTableName() const { return table_ptr_->TableName(); }
[[nodiscard]] std::string translationTableDescription() const { return table_ptr_->TableDescription(); }
[[nodiscard]] bool settranslationTable(const std::string& table_name) { return table_ptr_->setTranslationTable(table_name); }
[[nodiscard]] Codon firstCodon(const DNA5SequenceCoding& coding_sequence) const {
return Codon(coding_sequence, 0);
}
[[nodiscard]] bool checkStartCodon(const DNA5SequenceCoding& coding_sequence) const {
return table_ptr_->isStartCodon(firstCodon(coding_sequence));
}
[[nodiscard]] bool checkStartCodon(const AminoSequence& amino_sequence) const;
[[nodiscard]] bool checkStopCodon(const AminoSequence& amino_sequence) const;
[[nodiscard]] size_t checkNonsenseMutation(const AminoSequence& amino_sequence) const;
[[nodiscard]] AminoSequence getAminoSequence(const DNA5SequenceCoding& coding_sequence) const;
[[nodiscard]] AminoSequence getAminoSequence( const std::shared_ptr<const CodingSequence>& coding_seq_ptr,
const DNA5SequenceContig& contig_sequence) const;
[[nodiscard]] Codon lastCodon(const DNA5SequenceCoding& coding_sequence) const {
return Codon(coding_sequence, Codon::codonLength(coding_sequence) - 1);
}
[[nodiscard]] bool checkStopCodon(const DNA5SequenceCoding& coding_sequence) const {
return table_ptr_->isStopCodon(lastCodon(coding_sequence));
}
[[nodiscard]] size_t checkNonsenseMutation(const DNA5SequenceCoding& coding_sequence) const;
[[nodiscard]] AminoAcid::Alphabet getAmino(const DNA5SequenceCoding& coding_sequence, ContigSize_t codon_index) const;
[[nodiscard]] AminoAcid::Alphabet getAmino(const Codon& codon) const;
private:
std::shared_ptr<AminoTranslationTable> table_ptr_;
};
} // end namespace
#endif //KGL_SEQUENCE_AMINO_H
| 33.381679 | 130 | 0.638006 |
1628595432a29ef74ad250e1a80504df2c0ec85f | 6,492 | h | C | thirdparty/cgal/CGAL-4.13/include/CGAL/Gps_traits_2.h | st4ll1/dust3d | c1de02f7ddcfdacc730cc96740f8073f87e7818c | [
"MIT"
] | null | null | null | thirdparty/cgal/CGAL-4.13/include/CGAL/Gps_traits_2.h | st4ll1/dust3d | c1de02f7ddcfdacc730cc96740f8073f87e7818c | [
"MIT"
] | null | null | null | thirdparty/cgal/CGAL-4.13/include/CGAL/Gps_traits_2.h | st4ll1/dust3d | c1de02f7ddcfdacc730cc96740f8073f87e7818c | [
"MIT"
] | null | null | null | // Copyright (c) 2005 Tel-Aviv University (Israel).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0+
//
//
// Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il>
#ifndef CGAL_GPS_TRAITS_2_H
#define CGAL_GPS_TRAITS_2_H
#include <CGAL/license/Boolean_set_operations_2.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/General_polygon_2.h>
#include <CGAL/General_polygon_with_holes_2.h>
#include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
#include <CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h>
namespace CGAL {
template <typename Arr_traits,
typename General_polygon_t = General_polygon_2<Arr_traits> >
class Gps_traits_2 : public Arr_traits
{
typedef Arr_traits Base;
typedef Gps_traits_2<Arr_traits,General_polygon_t> Self;
public:
typedef typename Base::Point_2 Point_2;
typedef typename Base::X_monotone_curve_2 X_monotone_curve_2;
//Polygon_2 type is required by GeneralPolygonSetTraits Concept
typedef General_polygon_t Polygon_2;
//Polygon_2 is a model of the GeneralPolygon2 concept
typedef Polygon_2 General_polygon_2;
//Polygon_with_holes_2 type required by GeneralPolygonSetTraits Concept.
typedef CGAL::General_polygon_with_holes_2<General_polygon_2>
Polygon_with_holes_2;
//Polygon_with_Holes_2 is a model of the GeneralPolygonWithHoles2 concept.
typedef Polygon_with_holes_2
General_polygon_with_holes_2;
typedef typename General_polygon_2::Curve_const_iterator
Curve_const_iterator;
typedef typename General_polygon_with_holes_2::Hole_const_iterator
Hole_const_iterator;
typedef typename Base::Equal_2 Equal_2;
typedef typename Base::Compare_endpoints_xy_2 Compare_endpoints_xy_2;
typedef typename Base::Construct_min_vertex_2 Construct_min_vertex_2;
typedef typename Base::Construct_max_vertex_2 Construct_max_vertex_2;
/*!
* A functor for constructing a polygon from a range of x-monotone curves.
*/
class Construct_polygon_2 {
public:
template<class XCurveIterator>
void operator()(XCurveIterator begin, XCurveIterator end,
General_polygon_2& pgn) const
{ pgn.init(begin, end); }
};
Construct_polygon_2 construct_polygon_2_object() const
{ return Construct_polygon_2(); }
/*!
* A functor for scanning all x-monotone curves that form a polygon boundary.
*/
class Construct_curves_2
{
public:
std::pair<Curve_const_iterator, Curve_const_iterator>
operator()(const General_polygon_2& pgn) const
{ return std::make_pair(pgn.curves_begin(), pgn.curves_end()); }
};
Construct_curves_2 construct_curves_2_object() const
{ return Construct_curves_2(); }
/*!
* An auxiliary functor used for validity checks.
*/
typedef Gps_traits_adaptor<Base> Traits_adaptor;
/*typedef CGAL::Is_valid_2<Self, Traits_adaptor> Is_valid_2;
Is_valid_2 is_valid_2_object() const
{
Traits_adaptor tr_adp;
return (Is_valid_2 (*this, tr_adp));
}*/
//Added Functionality from GeneralPolygonWithHoles Concept to the traits.
/*A functor for constructing the outer boundary of a polygon with holes*/
class Construct_outer_boundary {
public:
General_polygon_2 operator()(const General_polygon_with_holes_2& pol_wh)
const
{ return pol_wh.outer_boundary(); }
};
Construct_outer_boundary construct_outer_boundary_object() const
{ return Construct_outer_boundary(); }
/* typedef from General_polygon_with_holes_2. Hole_const_iterator nested type
* is required by GeneralPolygonWithHoles2 concept
*/
/*A functor for constructing the container of holes of a polygon with holes*/
class Construct_holes {
public:
std::pair<Hole_const_iterator, Hole_const_iterator>
operator()(const General_polygon_with_holes_2& pol_wh) const
{ return std::make_pair(pol_wh.holes_begin(), pol_wh.holes_end()); }
};
Construct_holes construct_holes_object() const
{ return Construct_holes(); }
/* A functor for constructing a General_polygon_with_holes from a
* General_Polygon (and possibly a range of holes).
*
* constructs a general polygon with holes using a given general polygon
* outer as the outer boundary and a given range of holes. If outer is an
* empty general polygon, then an unbounded polygon with holes will be
* created. The holes must be contained inside the outer boundary, and the
* polygons representing the holes must be strictly simple and pairwise
* disjoint, except perhaps at the vertices.
*/
class Construct_general_polygon_with_holes_2 {
public:
General_polygon_with_holes_2
operator()(const General_polygon_2& pgn_boundary) const
{ return General_polygon_with_holes_2(pgn_boundary); }
template <class HolesInputIterator>
General_polygon_with_holes_2
operator()(const General_polygon_2& pgn_boundary,
HolesInputIterator h_begin,
HolesInputIterator h_end) const
{ return General_polygon_with_holes_2(pgn_boundary, h_begin,h_end); }
};
Construct_general_polygon_with_holes_2 construct_polygon_with_holes_2_object()
const
{ return Construct_general_polygon_with_holes_2(); }
// Return true if the outer boundary is empty, and false otherwise.
class Is_unbounded {
public:
bool operator()(const General_polygon_with_holes_2& pol_wh) const
{ return pol_wh.is_unbounded(); }
};
Is_unbounded construct_is_unbounded_object() const { return Is_unbounded(); }
};
} //namespace CGAL
#include <CGAL/enable_warnings.h>
#endif
| 35.47541 | 80 | 0.718731 |
959a9afcaf81c70b6bf144bdb2278b27edf6af37 | 1,132 | css | CSS | ajax/libs/codemirror/2.36.0/rubyblue.min.css | Versal/cdnjs | 372ae9db89f58f98b90208dacac2141ffcb9385d | [
"MIT"
] | 5 | 2015-02-20T16:11:30.000Z | 2017-05-15T11:50:44.000Z | ajax/libs/codemirror/2.36.0/rubyblue.min.css | kangax/cdnjs | 5f8c56315223f7d9325e39bd1da7bd5e192c7d32 | [
"MIT"
] | null | null | null | ajax/libs/codemirror/2.36.0/rubyblue.min.css | kangax/cdnjs | 5f8c56315223f7d9325e39bd1da7bd5e192c7d32 | [
"MIT"
] | 4 | 2015-07-14T16:16:05.000Z | 2021-03-10T08:15:54.000Z | .cm-s-rubyblue{font:13px/1.4em Trebuchet,Verdana,sans-serif}.cm-s-rubyblue{background:#112435;color:#fff}.cm-s-rubyblue div.CodeMirror-selected{background:#38566F!important}.cm-s-rubyblue .CodeMirror-gutter{background:#1F4661;border-right:7px solid #3E7087;min-width:2.5em}.cm-s-rubyblue .CodeMirror-gutter-text{color:#fff}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-rubyblue span.cm-comment{color:#999;font-style:italic;line-height:1em}.cm-s-rubyblue span.cm-atom{color:#F4C20B}.cm-s-rubyblue span.cm-number,.cm-s-rubyblue span.cm-attribute{color:#82C6E0}.cm-s-rubyblue span.cm-keyword{color:#F0F}.cm-s-rubyblue span.cm-string{color:#F08047}.cm-s-rubyblue span.cm-meta{color:#F0F}.cm-s-rubyblue span.cm-variable-2,.cm-s-rubyblue span.cm-tag{color:#7BD827}.cm-s-rubyblue span.cm-variable-3,.cm-s-rubyblue span.cm-def{color:#fff}.cm-s-rubyblue span.cm-error{color:#AF2018}.cm-s-rubyblue span.cm-bracket{color:#F0F}.cm-s-rubyblue span.cm-link{color:#F4C20B}.cm-s-rubyblue span.CodeMirror-matchingbracket{color:#F0F!important}.cm-s-rubyblue span.cm-builtin,.cm-s-rubyblue span.cm-special{color:#FF9D00} | 1,132 | 1,132 | 0.783569 |
4a31c5648d8f0f7272b1cedc85c66ce846897bff | 204 | js | JavaScript | src/modules/account/signup/types.js | felpin/churrasco-garantido-web | b99324a91ca6fdf9124a96a469e4907e66f40506 | [
"MIT"
] | null | null | null | src/modules/account/signup/types.js | felpin/churrasco-garantido-web | b99324a91ca6fdf9124a96a469e4907e66f40506 | [
"MIT"
] | null | null | null | src/modules/account/signup/types.js | felpin/churrasco-garantido-web | b99324a91ca6fdf9124a96a469e4907e66f40506 | [
"MIT"
] | null | null | null | export const ACCOUNT_CREATION_FAILURE = 'ACCOUNT_CREATION_FAILURE';
export const ACCOUNT_CREATION_REQUEST = 'ACCOUNT_CREATION_REQUEST';
export const ACCOUNT_CREATION_SUCCESS = 'ACCOUNT_CREATION_SUCCESS';
| 51 | 67 | 0.867647 |
5829c7f9c672e083dd723a942a23c20e5bdf0887 | 21,559 | c | C | packages/pips-gfc/gcc-4.4.5/gcc/fortran/data.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | packages/pips-gfc/gcc-4.4.5/gcc/fortran/data.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | packages/pips-gfc/gcc-4.4.5/gcc/fortran/data.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | /* Supporting functions for resolving DATA statement.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Lifang Zeng <zlf605@hotmail.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Notes for DATA statement implementation:
We first assign initial value to each symbol by gfc_assign_data_value
during resolving DATA statement. Refer to check_data_variable and
traverse_data_list in resolve.c.
The complexity exists in the handling of array section, implied do
and array of struct appeared in DATA statement.
We call gfc_conv_structure, gfc_con_array_array_initializer,
etc., to convert the initial value. Refer to trans-expr.c and
trans-array.c. */
#include "config.h"
#include "gfortran.h"
#include "data.h"
static void formalize_init_expr (gfc_expr *);
/* Calculate the array element offset. */
static void
get_array_index (gfc_array_ref *ar, mpz_t *offset)
{
gfc_expr *e;
int i;
gfc_try re;
mpz_t delta;
mpz_t tmp;
mpz_init (tmp);
mpz_set_si (*offset, 0);
mpz_init_set_si (delta, 1);
for (i = 0; i < ar->dimen; i++)
{
e = gfc_copy_expr (ar->start[i]);
re = gfc_simplify_expr (e, 1);
if ((gfc_is_constant_expr (ar->as->lower[i]) == 0)
|| (gfc_is_constant_expr (ar->as->upper[i]) == 0)
|| (gfc_is_constant_expr (e) == 0))
gfc_error ("non-constant array in DATA statement %L", &ar->where);
mpz_set (tmp, e->value.integer);
mpz_sub (tmp, tmp, ar->as->lower[i]->value.integer);
mpz_mul (tmp, tmp, delta);
mpz_add (*offset, tmp, *offset);
mpz_sub (tmp, ar->as->upper[i]->value.integer,
ar->as->lower[i]->value.integer);
mpz_add_ui (tmp, tmp, 1);
mpz_mul (delta, tmp, delta);
}
mpz_clear (delta);
mpz_clear (tmp);
}
/* Find if there is a constructor which offset is equal to OFFSET. */
static gfc_constructor *
find_con_by_offset (splay_tree spt, mpz_t offset)
{
mpz_t tmp;
gfc_constructor *ret = NULL;
gfc_constructor *con;
splay_tree_node sptn;
/* The complexity is due to needing quick access to the linked list of
constructors. Both a linked list and a splay tree are used, and both
are kept up to date if they are array elements (which is the only time
that a specific constructor has to be found). */
gcc_assert (spt != NULL);
mpz_init (tmp);
sptn = splay_tree_lookup (spt, (splay_tree_key) mpz_get_si (offset));
if (sptn)
ret = (gfc_constructor*) sptn->value;
else
{
/* Need to check and see if we match a range, so we will pull
the next lowest index and see if the range matches. */
sptn = splay_tree_predecessor (spt,
(splay_tree_key) mpz_get_si (offset));
if (sptn)
{
con = (gfc_constructor*) sptn->value;
if (mpz_cmp_ui (con->repeat, 1) > 0)
{
mpz_init (tmp);
mpz_add (tmp, con->n.offset, con->repeat);
if (mpz_cmp (offset, tmp) < 0)
ret = con;
mpz_clear (tmp);
}
else
ret = NULL; /* The range did not match. */
}
else
ret = NULL; /* No pred, so no match. */
}
return ret;
}
/* Find if there is a constructor which component is equal to COM. */
static gfc_constructor *
find_con_by_component (gfc_component *com, gfc_constructor *con)
{
for (; con; con = con->next)
{
if (com == con->n.component)
return con;
}
return NULL;
}
/* Create a character type initialization expression from RVALUE.
TS [and REF] describe [the substring of] the variable being initialized.
INIT is the existing initializer, not NULL. Initialization is performed
according to normal assignment rules. */
static gfc_expr *
create_character_intializer (gfc_expr *init, gfc_typespec *ts,
gfc_ref *ref, gfc_expr *rvalue)
{
int len, start, end;
gfc_char_t *dest;
gfc_extract_int (ts->cl->length, &len);
if (init == NULL)
{
/* Create a new initializer. */
init = gfc_get_expr ();
init->expr_type = EXPR_CONSTANT;
init->ts = *ts;
dest = gfc_get_wide_string (len + 1);
dest[len] = '\0';
init->value.character.length = len;
init->value.character.string = dest;
/* Blank the string if we're only setting a substring. */
if (ref != NULL)
gfc_wide_memset (dest, ' ', len);
}
else
dest = init->value.character.string;
if (ref)
{
gfc_expr *start_expr, *end_expr;
gcc_assert (ref->type == REF_SUBSTRING);
/* Only set a substring of the destination. Fortran substring bounds
are one-based [start, end], we want zero based [start, end). */
start_expr = gfc_copy_expr (ref->u.ss.start);
end_expr = gfc_copy_expr (ref->u.ss.end);
if ((gfc_simplify_expr (start_expr, 1) == FAILURE)
|| (gfc_simplify_expr (end_expr, 1)) == FAILURE)
{
gfc_error ("failure to simplify substring reference in DATA "
"statement at %L", &ref->u.ss.start->where);
return NULL;
}
gfc_extract_int (start_expr, &start);
start--;
gfc_extract_int (end_expr, &end);
}
else
{
/* Set the whole string. */
start = 0;
end = len;
}
/* Copy the initial value. */
if (rvalue->ts.type == BT_HOLLERITH)
len = rvalue->representation.length;
else
len = rvalue->value.character.length;
if (len > end - start)
{
len = end - start;
gfc_warning_now ("initialization string truncated to match variable "
"at %L", &rvalue->where);
}
if (rvalue->ts.type == BT_HOLLERITH)
{
int i;
for (i = 0; i < len; i++)
dest[start+i] = rvalue->representation.string[i];
}
else
memcpy (&dest[start], rvalue->value.character.string,
len * sizeof (gfc_char_t));
/* Pad with spaces. Substrings will already be blanked. */
if (len < end - start && ref == NULL)
gfc_wide_memset (&dest[start + len], ' ', end - (start + len));
if (rvalue->ts.type == BT_HOLLERITH)
{
init->representation.length = init->value.character.length;
init->representation.string
= gfc_widechar_to_char (init->value.character.string,
init->value.character.length);
}
return init;
}
/* Assign the initial value RVALUE to LVALUE's symbol->value. If the
LVALUE already has an initialization, we extend this, otherwise we
create a new one. */
gfc_try
gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
{
gfc_ref *ref;
gfc_expr *init;
gfc_expr *expr;
gfc_constructor *con;
gfc_constructor *last_con;
gfc_constructor *pred;
gfc_symbol *symbol;
gfc_typespec *last_ts;
mpz_t offset;
splay_tree spt;
splay_tree_node sptn;
symbol = lvalue->symtree->n.sym;
init = symbol->value;
last_ts = &symbol->ts;
last_con = NULL;
mpz_init_set_si (offset, 0);
/* Find/create the parent expressions for subobject references. */
for (ref = lvalue->ref; ref; ref = ref->next)
{
/* Break out of the loop if we find a substring. */
if (ref->type == REF_SUBSTRING)
{
/* A substring should always be the last subobject reference. */
gcc_assert (ref->next == NULL);
break;
}
/* Use the existing initializer expression if it exists. Otherwise
create a new one. */
if (init == NULL)
expr = gfc_get_expr ();
else
expr = init;
/* Find or create this element. */
switch (ref->type)
{
case REF_ARRAY:
if (init && expr->expr_type != EXPR_ARRAY)
{
gfc_error ("'%s' at %L already is initialized at %L",
lvalue->symtree->n.sym->name, &lvalue->where,
&init->where);
return FAILURE;
}
if (init == NULL)
{
/* The element typespec will be the same as the array
typespec. */
expr->ts = *last_ts;
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_ARRAY;
expr->rank = ref->u.ar.as->rank;
}
if (ref->u.ar.type == AR_ELEMENT)
get_array_index (&ref->u.ar, &offset);
else
mpz_set (offset, index);
/* Check the bounds. */
if (mpz_cmp_si (offset, 0) < 0)
{
gfc_error ("Data element below array lower bound at %L",
&lvalue->where);
return FAILURE;
}
else
{
mpz_t size;
if (spec_size (ref->u.ar.as, &size) == SUCCESS)
{
if (mpz_cmp (offset, size) >= 0)
{
mpz_clear (size);
gfc_error ("Data element above array upper bound at %L",
&lvalue->where);
return FAILURE;
}
mpz_clear (size);
}
}
/* Splay tree containing offset and gfc_constructor. */
spt = expr->con_by_offset;
if (spt == NULL)
{
spt = splay_tree_new (splay_tree_compare_ints, NULL, NULL);
expr->con_by_offset = spt;
con = NULL;
}
else
con = find_con_by_offset (spt, offset);
if (con == NULL)
{
splay_tree_key j;
/* Create a new constructor. */
con = gfc_get_constructor ();
mpz_set (con->n.offset, offset);
j = (splay_tree_key) mpz_get_si (offset);
sptn = splay_tree_insert (spt, j, (splay_tree_value) con);
/* Fix up the linked list. */
sptn = splay_tree_predecessor (spt, j);
if (sptn == NULL)
{ /* Insert at the head. */
con->next = expr->value.constructor;
expr->value.constructor = con;
}
else
{ /* Insert in the chain. */
pred = (gfc_constructor*) sptn->value;
con->next = pred->next;
pred->next = con;
}
}
break;
case REF_COMPONENT:
if (init == NULL)
{
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_STRUCTURE;
expr->ts.type = BT_DERIVED;
expr->ts.derived = ref->u.c.sym;
}
else
gcc_assert (expr->expr_type == EXPR_STRUCTURE);
last_ts = &ref->u.c.component->ts;
/* Find the same element in the existing constructor. */
con = expr->value.constructor;
con = find_con_by_component (ref->u.c.component, con);
if (con == NULL)
{
/* Create a new constructor. */
con = gfc_get_constructor ();
con->n.component = ref->u.c.component;
con->next = expr->value.constructor;
expr->value.constructor = con;
}
break;
default:
gcc_unreachable ();
}
if (init == NULL)
{
/* Point the container at the new expression. */
if (last_con == NULL)
symbol->value = expr;
else
last_con->expr = expr;
}
init = con->expr;
last_con = con;
}
if (ref || last_ts->type == BT_CHARACTER)
{
if (lvalue->ts.cl->length == NULL && !(ref && ref->u.ss.length != NULL))
return FAILURE;
expr = create_character_intializer (init, last_ts, ref, rvalue);
}
else
{
/* Overwriting an existing initializer is non-standard but usually only
provokes a warning from other compilers. */
if (init != NULL)
{
/* Order in which the expressions arrive here depends on whether
they are from data statements or F95 style declarations.
Therefore, check which is the most recent. */
expr = (LOCATION_LINE (init->where.lb->location)
> LOCATION_LINE (rvalue->where.lb->location))
? init : rvalue;
gfc_notify_std (GFC_STD_GNU, "Extension: re-initialization "
"of '%s' at %L", symbol->name, &expr->where);
}
expr = gfc_copy_expr (rvalue);
if (!gfc_compare_types (&lvalue->ts, &expr->ts))
gfc_convert_type (expr, &lvalue->ts, 0);
}
if (last_con == NULL)
symbol->value = expr;
else
last_con->expr = expr;
return SUCCESS;
}
/* Similarly, but initialize REPEAT consecutive values in LVALUE the same
value in RVALUE. For the nonce, LVALUE must refer to a full array, not
an array section. */
void
gfc_assign_data_value_range (gfc_expr *lvalue, gfc_expr *rvalue,
mpz_t index, mpz_t repeat)
{
gfc_ref *ref;
gfc_expr *init, *expr;
gfc_constructor *con, *last_con;
gfc_constructor *pred;
gfc_symbol *symbol;
gfc_typespec *last_ts;
mpz_t offset;
splay_tree spt;
splay_tree_node sptn;
symbol = lvalue->symtree->n.sym;
init = symbol->value;
last_ts = &symbol->ts;
last_con = NULL;
mpz_init_set_si (offset, 0);
/* Find/create the parent expressions for subobject references. */
for (ref = lvalue->ref; ref; ref = ref->next)
{
/* Use the existing initializer expression if it exists.
Otherwise create a new one. */
if (init == NULL)
expr = gfc_get_expr ();
else
expr = init;
/* Find or create this element. */
switch (ref->type)
{
case REF_ARRAY:
if (init == NULL)
{
/* The element typespec will be the same as the array
typespec. */
expr->ts = *last_ts;
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_ARRAY;
expr->rank = ref->u.ar.as->rank;
}
else
gcc_assert (expr->expr_type == EXPR_ARRAY);
if (ref->u.ar.type == AR_ELEMENT)
{
get_array_index (&ref->u.ar, &offset);
/* This had better not be the bottom of the reference.
We can still get to a full array via a component. */
gcc_assert (ref->next != NULL);
}
else
{
mpz_set (offset, index);
/* We're at a full array or an array section. This means
that we've better have found a full array, and that we're
at the bottom of the reference. */
gcc_assert (ref->u.ar.type == AR_FULL);
gcc_assert (ref->next == NULL);
}
/* Find the same element in the existing constructor. */
/* Splay tree containing offset and gfc_constructor. */
spt = expr->con_by_offset;
if (spt == NULL)
{
spt = splay_tree_new (splay_tree_compare_ints, NULL, NULL);
expr->con_by_offset = spt;
con = NULL;
}
else
con = find_con_by_offset (spt, offset);
if (con == NULL)
{
splay_tree_key j;
/* Create a new constructor. */
con = gfc_get_constructor ();
mpz_set (con->n.offset, offset);
j = (splay_tree_key) mpz_get_si (offset);
if (ref->next == NULL)
mpz_set (con->repeat, repeat);
sptn = splay_tree_insert (spt, j, (splay_tree_value) con);
/* Fix up the linked list. */
sptn = splay_tree_predecessor (spt, j);
if (sptn == NULL)
{ /* Insert at the head. */
con->next = expr->value.constructor;
expr->value.constructor = con;
}
else
{ /* Insert in the chain. */
pred = (gfc_constructor*) sptn->value;
con->next = pred->next;
pred->next = con;
}
}
else
gcc_assert (ref->next != NULL);
break;
case REF_COMPONENT:
if (init == NULL)
{
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_STRUCTURE;
expr->ts.type = BT_DERIVED;
expr->ts.derived = ref->u.c.sym;
}
else
gcc_assert (expr->expr_type == EXPR_STRUCTURE);
last_ts = &ref->u.c.component->ts;
/* Find the same element in the existing constructor. */
con = expr->value.constructor;
con = find_con_by_component (ref->u.c.component, con);
if (con == NULL)
{
/* Create a new constructor. */
con = gfc_get_constructor ();
con->n.component = ref->u.c.component;
con->next = expr->value.constructor;
expr->value.constructor = con;
}
/* Since we're only intending to initialize arrays here,
there better be an inner reference. */
gcc_assert (ref->next != NULL);
break;
case REF_SUBSTRING:
default:
gcc_unreachable ();
}
if (init == NULL)
{
/* Point the container at the new expression. */
if (last_con == NULL)
symbol->value = expr;
else
last_con->expr = expr;
}
init = con->expr;
last_con = con;
}
if (last_ts->type == BT_CHARACTER)
expr = create_character_intializer (init, last_ts, NULL, rvalue);
else
{
/* We should never be overwriting an existing initializer. */
gcc_assert (!init);
expr = gfc_copy_expr (rvalue);
if (!gfc_compare_types (&lvalue->ts, &expr->ts))
gfc_convert_type (expr, &lvalue->ts, 0);
}
if (last_con == NULL)
symbol->value = expr;
else
last_con->expr = expr;
}
/* Modify the index of array section and re-calculate the array offset. */
void
gfc_advance_section (mpz_t *section_index, gfc_array_ref *ar,
mpz_t *offset_ret)
{
int i;
mpz_t delta;
mpz_t tmp;
bool forwards;
int cmp;
for (i = 0; i < ar->dimen; i++)
{
if (ar->dimen_type[i] != DIMEN_RANGE)
continue;
if (ar->stride[i])
{
mpz_add (section_index[i], section_index[i],
ar->stride[i]->value.integer);
if (mpz_cmp_si (ar->stride[i]->value.integer, 0) >= 0)
forwards = true;
else
forwards = false;
}
else
{
mpz_add_ui (section_index[i], section_index[i], 1);
forwards = true;
}
if (ar->end[i])
cmp = mpz_cmp (section_index[i], ar->end[i]->value.integer);
else
cmp = mpz_cmp (section_index[i], ar->as->upper[i]->value.integer);
if ((cmp > 0 && forwards) || (cmp < 0 && !forwards))
{
/* Reset index to start, then loop to advance the next index. */
if (ar->start[i])
mpz_set (section_index[i], ar->start[i]->value.integer);
else
mpz_set (section_index[i], ar->as->lower[i]->value.integer);
}
else
break;
}
mpz_set_si (*offset_ret, 0);
mpz_init_set_si (delta, 1);
mpz_init (tmp);
for (i = 0; i < ar->dimen; i++)
{
mpz_sub (tmp, section_index[i], ar->as->lower[i]->value.integer);
mpz_mul (tmp, tmp, delta);
mpz_add (*offset_ret, tmp, *offset_ret);
mpz_sub (tmp, ar->as->upper[i]->value.integer,
ar->as->lower[i]->value.integer);
mpz_add_ui (tmp, tmp, 1);
mpz_mul (delta, tmp, delta);
}
mpz_clear (tmp);
mpz_clear (delta);
}
/* Rearrange a structure constructor so the elements are in the specified
order. Also insert NULL entries if necessary. */
static void
formalize_structure_cons (gfc_expr *expr)
{
gfc_constructor *head;
gfc_constructor *tail;
gfc_constructor *cur;
gfc_constructor *last;
gfc_constructor *c;
gfc_component *order;
c = expr->value.constructor;
/* Constructor is already formalized. */
if (!c || c->n.component == NULL)
return;
head = tail = NULL;
for (order = expr->ts.derived->components; order; order = order->next)
{
/* Find the next component. */
last = NULL;
cur = c;
while (cur != NULL && cur->n.component != order)
{
last = cur;
cur = cur->next;
}
if (cur == NULL)
{
/* Create a new one. */
cur = gfc_get_constructor ();
}
else
{
/* Remove it from the chain. */
if (last == NULL)
c = cur->next;
else
last->next = cur->next;
cur->next = NULL;
formalize_init_expr (cur->expr);
}
/* Add it to the new constructor. */
if (head == NULL)
head = tail = cur;
else
{
tail->next = cur;
tail = tail->next;
}
}
gcc_assert (c == NULL);
expr->value.constructor = head;
}
/* Make sure an initialization expression is in normalized form, i.e., all
elements of the constructors are in the correct order. */
static void
formalize_init_expr (gfc_expr *expr)
{
expr_t type;
gfc_constructor *c;
if (expr == NULL)
return;
type = expr->expr_type;
switch (type)
{
case EXPR_ARRAY:
c = expr->value.constructor;
while (c)
{
formalize_init_expr (c->expr);
c = c->next;
}
break;
case EXPR_STRUCTURE:
formalize_structure_cons (expr);
break;
default:
break;
}
}
/* Resolve symbol's initial value after all data statement. */
void
gfc_formalize_init_value (gfc_symbol *sym)
{
formalize_init_expr (sym->value);
}
/* Get the integer value into RET_AS and SECTION from AS and AR, and return
offset. */
void
gfc_get_section_index (gfc_array_ref *ar, mpz_t *section_index, mpz_t *offset)
{
int i;
mpz_t delta;
mpz_t tmp;
mpz_set_si (*offset, 0);
mpz_init (tmp);
mpz_init_set_si (delta, 1);
for (i = 0; i < ar->dimen; i++)
{
mpz_init (section_index[i]);
switch (ar->dimen_type[i])
{
case DIMEN_ELEMENT:
case DIMEN_RANGE:
if (ar->start[i])
{
mpz_sub (tmp, ar->start[i]->value.integer,
ar->as->lower[i]->value.integer);
mpz_mul (tmp, tmp, delta);
mpz_add (*offset, tmp, *offset);
mpz_set (section_index[i], ar->start[i]->value.integer);
}
else
mpz_set (section_index[i], ar->as->lower[i]->value.integer);
break;
case DIMEN_VECTOR:
gfc_internal_error ("TODO: Vector sections in data statements");
default:
gcc_unreachable ();
}
mpz_sub (tmp, ar->as->upper[i]->value.integer,
ar->as->lower[i]->value.integer);
mpz_add_ui (tmp, tmp, 1);
mpz_mul (delta, tmp, delta);
}
mpz_clear (tmp);
mpz_clear (delta);
}
| 25.274326 | 78 | 0.615706 |
79fa2b212057659746f9224f97fb012e1eed02f8 | 5,410 | lua | Lua | PersonalAssistant/PersonalAssistantJunk/PAJunk/PAJunkCustom.lua | Nesferatum/ESO-PersonalAssistant | fb1063438999ab3a7a75923a196591133ec83fee | [
"Zlib"
] | null | null | null | PersonalAssistant/PersonalAssistantJunk/PAJunk/PAJunkCustom.lua | Nesferatum/ESO-PersonalAssistant | fb1063438999ab3a7a75923a196591133ec83fee | [
"Zlib"
] | null | null | null | PersonalAssistant/PersonalAssistantJunk/PAJunk/PAJunkCustom.lua | Nesferatum/ESO-PersonalAssistant | fb1063438999ab3a7a75923a196591133ec83fee | [
"Zlib"
] | null | null | null | -- Local instances of Global tables --
local PA = PersonalAssistant
local PAJ = PA.Junk
local PAHF = PA.HelperFunctions
-- ---------------------------------------------------------------------------------------------------------------------
local function _unmarkAllPAItemIdsFromJunk(paItemId)
PAJ.debugln("#_unmarkAllPAItemIdsFromJunk(%s)", tostring(paItemId))
local customPAItems = {
[paItemId] = {}
}
local excludeJunk, excludeCharacterBound, excludeStolen = false, false, false
local paItemIdComparator = PAHF.getPAItemIdComparator(customPAItems, excludeJunk, excludeCharacterBound, excludeStolen)
local bagCache = SHARED_INVENTORY:GenerateFullSlotData(paItemIdComparator, PAHF.getAccessibleBags())
PAJ.debugln("#bagCache = "..tostring(#bagCache))
for index = #bagCache, 1, -1 do
local itemData = bagCache[index]
local isJunk = IsItemJunk(itemData.bagId, itemData.slotIndex)
if isJunk then
SetItemIsJunk(itemData.bagId, itemData.slotIndex, false)
PlaySound(SOUNDS.INVENTORY_ITEM_UNJUNKED)
end
end
end
local function _markAllPAItemIdsAsJunk(paItemId)
PAJ.debugln("#_markAllPAItemIdsAsJunk(%s)", tostring(paItemId))
local customPAItems = {
[paItemId] = {}
}
local excludeJunk, excludeCharacterBound, excludeStolen = true, false, false
local paItemIdComparator = PAHF.getPAItemIdComparator(customPAItems, excludeJunk, excludeCharacterBound, excludeStolen)
local bagCache = SHARED_INVENTORY:GenerateFullSlotData(paItemIdComparator, PAHF.getAccessibleBags())
PAJ.debugln("#bagCache = "..tostring(#bagCache))
for index = #bagCache, 1, -1 do
local itemData = bagCache[index]
if CanItemBeMarkedAsJunk(itemData.bagId, itemData.slotIndex) then
SetItemIsJunk(itemData.bagId, itemData.slotIndex, true)
PlaySound(SOUNDS.INVENTORY_ITEM_JUNKED)
end
end
end
-- ---------------------------------------------------------------------------------------------------------------------
local function getNonStolenItemLink(itemLink)
-- if itemLink is NOT stolen, directly return it
if not IsItemLinkStolen(itemLink) then return itemLink end
-- if it is stolen, remove first the stolen information
local itemLinkMod = string.gsub(itemLink, "1(:%d+:%d+|h|h)$", "0%1")
-- then also remove the red border
itemLinkMod = string.gsub(itemLinkMod, "%d+(:%d+:%d+:%d+:%d+:%d+:%d+|h|h)$", "0%1")
return itemLinkMod
end
local function isItemLinkPermanentJunk(itemLink)
local PAJCUstomPAItemIds = PAJ.SavedVars.Custom.PAItemIds
local paItemId = PAHF.getPAItemLinkIdentifier(itemLink)
return PAHF.isKeyInTable(PAJCUstomPAItemIds, paItemId)
end
local function isItemPermanentJunk(bagId, slotIndex)
local PAJCUstomPAItemIds = PAJ.SavedVars.Custom.PAItemIds
local paItemId = PAHF.getPAItemIdentifier(bagId, slotIndex)
return PAHF.isKeyInTable(PAJCUstomPAItemIds, paItemId)
end
local function addItemLinkToPermanentJunk(itemLink)
PAJ.debugln("PA.Junk.addItemLinkToPermanentJunk")
if PAJ.SavedVars.Custom.customItemsEnabled then
local PAJCUstomPAItemIds = PAJ.SavedVars.Custom.PAItemIds
local paItemId = PAHF.getPAItemLinkIdentifier(itemLink)
-- only add the entry if it is an UPDATE case, or if it does not exist yet
if not PAHF.isKeyInTable(PAJCUstomPAItemIds, paItemId) then
local localItemLink = getNonStolenItemLink(itemLink)
PAJCUstomPAItemIds[paItemId] = {
itemLink = localItemLink,
junkCount = 0,
ruleAdded = GetTimeStamp()
}
PA.Junk.println(SI_PA_CHAT_JUNK_RULES_ADDED, localItemLink:gsub("%|H0", "|H1"))
-- loop though whole inventory to mark all matching items
_markAllPAItemIdsAsJunk(paItemId)
-- refresh the list (if it was initialized)
if PA.JunkRulesList then PA.JunkRulesList:Refresh() end
else
PAJ.debugln("ERROR; PAJ rule already existing")
end
end
end
local function removeItemLinkFromPermanentJunk(itemLink)
PAJ.debugln("PA.Junk.removeItemLinkFromPermanentJunk")
if PAJ.SavedVars.Custom.customItemsEnabled then
local PAJCUstomPAItemIds = PAJ.SavedVars.Custom.PAItemIds
local paItemId = PAHF.getPAItemLinkIdentifier(itemLink)
if PAHF.isKeyInTable(PAJCUstomPAItemIds, paItemId) then
-- is in table, delete rule
PAJCUstomPAItemIds[paItemId] = nil
PAJ.println(SI_PA_CHAT_JUNK_RULES_DELETED, itemLink:gsub("%|H0", "|H1"))
-- loop though whole inventory to unmark all matching items
_unmarkAllPAItemIdsFromJunk(paItemId)
-- refresh the list (if it was initialized)
if PA.JunkRulesList then PA.JunkRulesList:Refresh() end
else
PAJ.debugln("ERROR; PAJ rule not existing, cannot be deleted")
end
end
end
-- ---------------------------------------------------------------------------------------------------------------------
-- Export
PA.Junk = PA.Junk or {}
PA.Junk.Custom = {
isItemLinkPermanentJunk = isItemLinkPermanentJunk,
isItemPermanentJunk = isItemPermanentJunk,
addItemLinkToPermanentJunk = addItemLinkToPermanentJunk,
removeItemLinkFromPermanentJunk = removeItemLinkFromPermanentJunk
} | 42.265625 | 123 | 0.661922 |
3ff25d6785d231e4160f6e8d4eadf91d2f04716b | 2,487 | lua | Lua | Server/htdocs/TrainMobileFile/LuaCode/upload_bin.lua | RaiiGitHub/TrainMobile | d083f72a4020c39180c8e9a8bfe401d237500ae3 | [
"Apache-2.0"
] | 4 | 2017-12-02T17:32:49.000Z | 2020-12-08T06:20:21.000Z | Server/htdocs/TrainMobileFile/LuaCode/upload_bin.lua | RaiiGitHub/TrainMobile | d083f72a4020c39180c8e9a8bfe401d237500ae3 | [
"Apache-2.0"
] | null | null | null | Server/htdocs/TrainMobileFile/LuaCode/upload_bin.lua | RaiiGitHub/TrainMobile | d083f72a4020c39180c8e9a8bfe401d237500ae3 | [
"Apache-2.0"
] | 1 | 2017-12-02T17:32:30.000Z | 2017-12-02T17:32:30.000Z | package.path = 'D:/Program Files (x86)/HTTPD/htdocs/TrainMobileFile/LuaCode/lib/?.lua'
require 'string'
local fs = require 'file_system'
--upload file.
--url format: fs_upload_bin.php
--upload html content
local uhc = [[<script type="text/javascript">
function readFile()
{
var read=new FileReader();
read.readAsBinaryString(document.getElementById("filename").files[0]);
read.onload=function(e)
{
var addpath = document.getElementById("path").value;
var filename = document.getElementById("filename").value;
var final_url = "fs_upload_bin.php?file_name=" + addpath + filename;
var form_obj = document.getElementById("post_form");
var di = document.getElementById("data_input");
form_obj.action = final_url;
di.value = read.result;
//alert(di.value);
form_obj.submit();
}
}
</script>
<input id="filename" name="content" type="file"><br>
additional saving path:<input id="path" value="pages/" type="text"><br>
<input type="button" value="submit" onClick="readFile()"><br>
<a href="trainmobilefile">view file dir</a>
<form id="post_form" enctype="multipart/form-data" action="" method=post>
<input id="data_input" name="content" value="xx" type="hidden"><br>
</form>
]]
function print_args(r, simple, complex)
local s = "%s: %s\n"
for k, v in pairs(simple) do
r:puts(s:format(k, v))
end
end
function handle(r)
r.content_type = "text/html"
if r.method == 'GET' then
r:puts(uhc)
elseif r.method == 'POST' then
local base_path = fs.getBaseProjectFilePath()
local reg_table = {}
for k, v in pairs( r:parseargs() ) do
reg_table[k] = v
end
if nil == reg_table["file_name"] then
r:puts("{\"result\":\"file_name parameters should be here.\",\"code\":0,\"method\":\"upload\"}")
return apache2.OK
end
local sfp = base_path..reg_table["file_name"]
local content = r:parsebody()["content"]
--r:puts(#content)
--fs.writeFile(sfp,content,'wb')
r:puts("{\"result\":\""..content.."\",\"code\":1,\"method\":\"upload\"}")
print_args(r,r:parsebody())
elseif r.method == 'PUT' then
-- use our own Error contents
r:puts("{\"result\":\"Unsupported http method.\",\"code\":0,\"method\":\"upload\"}")
r.status = 405
return apache2.OK
else
-- use the ErrorDocument
return 501
end
return apache2.OK
end
| 33.16 | 108 | 0.618818 |
111927cc0812c982db3bcfc0902534f1a04ea972 | 295 | sql | SQL | modules/sql/Label_updateMeasValues.sql | Yavaa-Vis/Yavaa_Eurostat_Crawler | 0f27c537c7a28f93552818a611fdb54329c113fa | [
"MIT"
] | null | null | null | modules/sql/Label_updateMeasValues.sql | Yavaa-Vis/Yavaa_Eurostat_Crawler | 0f27c537c7a28f93552818a611fdb54329c113fa | [
"MIT"
] | null | null | null | modules/sql/Label_updateMeasValues.sql | Yavaa-Vis/Yavaa_Eurostat_Crawler | 0f27c537c7a28f93552818a611fdb54329c113fa | [
"MIT"
] | null | null | null | WITH concepts AS (
SELECT datasets.dsid, meas_concepts.concept
FROM datasets
INNER JOIN meas_concepts ON (lower( datasets.shortTitle ) = lower(meas_concepts.shortTitle) )
)
UPDATE measvalues
SET concept = (
SELECT concepts.concept
FROM concepts
WHERE concepts.dsid=measvalues.dsid
) | 24.583333 | 95 | 0.776271 |
0b71623dce279f8394f45396a0c88a69e51e39e7 | 272 | py | Python | 3d_cnn/src/constants/particles.py | mrmattuschka/DeePiCt | ef3e81ea25705076f340175d97ccff98f8d11799 | [
"Apache-2.0"
] | null | null | null | 3d_cnn/src/constants/particles.py | mrmattuschka/DeePiCt | ef3e81ea25705076f340175d97ccff98f8d11799 | [
"Apache-2.0"
] | 2 | 2022-03-08T09:22:23.000Z | 2022-03-20T21:13:07.000Z | 3d_cnn/src/constants/particles.py | ZauggGroup/DeePiCt | 0bdf1cd845cc306e66e30face1010c12ca3a38d0 | [
"Apache-2.0"
] | null | null | null | from os.path import join
def create_particle_file_name(folder_path: str, img_number: int,
coord_indx: int, ext: str) -> str:
file_name = str(img_number) + 'particle' + str(coord_indx) + '.' + ext
return join(folder_path, file_name)
| 34 | 74 | 0.636029 |
30b53e27685598d4d1a55cf707257549e3153a41 | 1,282 | kt | Kotlin | app/src/main/java/com/rentmycar/rentmycar/network/client/ReservationClient.kt | AvansJava/RentMyCar.ANDROID | 79af0c546d60eb54931abf091af2a07436f04d50 | [
"MIT"
] | null | null | null | app/src/main/java/com/rentmycar/rentmycar/network/client/ReservationClient.kt | AvansJava/RentMyCar.ANDROID | 79af0c546d60eb54931abf091af2a07436f04d50 | [
"MIT"
] | null | null | null | app/src/main/java/com/rentmycar/rentmycar/network/client/ReservationClient.kt | AvansJava/RentMyCar.ANDROID | 79af0c546d60eb54931abf091af2a07436f04d50 | [
"MIT"
] | null | null | null | package com.rentmycar.rentmycar.network.client
import com.rentmycar.rentmycar.network.request.PostReservationRequest
import com.rentmycar.rentmycar.network.response.GetAvailabilityResponse
import com.rentmycar.rentmycar.network.response.GetReservationResponse
import com.rentmycar.rentmycar.network.response.SimpleResponse
import com.rentmycar.rentmycar.network.service.ReservationService
class ReservationClient(
private val reservationService: ReservationService
): BaseClient() {
suspend fun postReservation(reservation: PostReservationRequest): SimpleResponse<GetReservationResponse> {
return safeApiCall { reservationService.postReservation(reservation) }
}
suspend fun getTimeslotsByReservation(reservationNumber: String): SimpleResponse<List<GetAvailabilityResponse>> {
return safeApiCall { reservationService.getTimeslotsByReservation(reservationNumber) }
}
suspend fun getReservation(reservationNumber: String): SimpleResponse<GetReservationResponse> {
return safeApiCall { reservationService.getReservation(reservationNumber) }
}
suspend fun getReservationList(status: String?): SimpleResponse<List<GetReservationResponse>> {
return safeApiCall { reservationService.getReservationList(status) }
}
} | 45.785714 | 117 | 0.815133 |
c450aa804ac03e8ad48246c0c7edf64b2da36a14 | 3,931 | h | C | src/lighting/shadows.h | RichardRanft/Torque6 | db6cd08f18f4917e0c6557b2766fb40d8e2bee39 | [
"MIT"
] | 312 | 2015-02-17T15:07:28.000Z | 2022-03-12T07:09:56.000Z | src/lighting/shadows.h | lukaspj/Torque6 | db6cd08f18f4917e0c6557b2766fb40d8e2bee39 | [
"MIT"
] | 23 | 2015-03-30T14:47:37.000Z | 2020-11-02T00:00:24.000Z | src/lighting/shadows.h | lukaspj/Torque6 | db6cd08f18f4917e0c6557b2766fb40d8e2bee39 | [
"MIT"
] | 73 | 2015-02-17T15:07:30.000Z | 2021-10-02T03:11:59.000Z | //-----------------------------------------------------------------------------
// Copyright (c) 2015 Andrew Mac
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#ifndef _SHADOWS_H_
#define _SHADOWS_H_
#ifndef _CONSOLEINTERNAL_H_
#include "console/consoleInternal.h"
#endif
#ifndef _RENDERING_H_
#include "rendering/rendering.h"
#endif
#ifndef BGFX_H_HEADER_GUARD
#include <bgfx/bgfx.h>
#endif
#ifndef _BASE_COMPONENT_H_
#include "scene/components/baseComponent.h"
#endif
#ifndef _RENDER_CAMERA_H
#include "rendering/renderCamera.h"
#endif
#ifndef _DEBUG_MODE_H_
#include "debug/debugMode.h"
#endif
namespace Lighting
{
// Cascaded Shadow Mapping
// Based On: https://github.com/bkaradzic/bgfx/blob/master/examples/16-shadowmaps/
class CascadedShadowMap : public Rendering::RenderHook
{
protected:
bool mEmtpy;
// Settings
Point3F mDirection;
F32 mSplitDistribution;
F32 mFarPlane;
F32 mBias;
F32 mNormalOffset;
bgfx::UniformHandle mShadowParamsUniform;
//
F32 mLightView[16];
F32 mLightProj[4][16];
bgfx::TextureHandle mShadowMap;
bgfx::FrameBufferHandle mShadowMapBuffer;
F32 mShadowMtx[4][16];
bgfx::UniformHandle mShadowMtxUniform;
// Cascades
U16 mCascadeSize;
Graphics::ViewTableEntry* mCascadeViews[4];
// PCF ShadowMap shaders
Graphics::Shader* mPCFShader;
Graphics::Shader* mPCFSkinnedShader;
void worldSpaceFrustumCorners(F32* _corners24f, F32 _near, F32 _far, F32 _projWidth, F32 _projHeight, const F32* __restrict _invViewMtx);
void splitFrustum(F32* _splits, U8 _numSplits, F32 _near, F32 _far, F32 _splitWeight = 0.75f);
public:
CascadedShadowMap();
~CascadedShadowMap();
void init(S16 cascadeSize);
void destroy();
void configure(Point3F direction, F32 splitDistribution, F32 farPlane, F32 bias, F32 normalOffset);
void render(Rendering::RenderCamera* camera);
bool isEmpty() { return mEmtpy; }
bgfx::TextureHandle getShadowMap() { return mShadowMap; }
};
// ShadowMapCascadeDebug Debug Mode visually displays ShadowMap cascades
class ShadowMapCascadeDebug : public Debug::DebugMode
{
public:
static bool CascadeDebugEnabled;
void onEnable();
void onDisable();
DECLARE_DEBUG_MODE("ShadowMapCascade", ShadowMapCascadeDebug);
};
}
#endif // _SHADOWS_H_ | 34.182609 | 146 | 0.625032 |
2fba1f787fafcd9f89766b0283db8d121a83b471 | 2,283 | rs | Rust | foundationdb/src/directory/node.rs | foundationdb-rs/foundationdb-rs | a309d67946a272d245b6d1d1072b2196d5951655 | [
"Apache-2.0",
"MIT"
] | 13 | 2021-12-09T07:05:11.000Z | 2022-02-12T18:43:27.000Z | foundationdb/src/directory/node.rs | foundationdb-rs/foundationdb-rs | a309d67946a272d245b6d1d1072b2196d5951655 | [
"Apache-2.0",
"MIT"
] | 37 | 2021-12-08T16:24:05.000Z | 2022-03-24T13:19:57.000Z | foundationdb/src/directory/node.rs | foundationdb-rs/foundationdb-rs | a309d67946a272d245b6d1d1072b2196d5951655 | [
"Apache-2.0",
"MIT"
] | 3 | 2021-12-08T18:27:11.000Z | 2021-12-29T03:41:27.000Z | use crate::directory::directory_layer::{
DirectoryLayer, DEFAULT_SUB_DIRS, LAYER_SUFFIX, PARTITION_LAYER,
};
use crate::directory::error::DirectoryError;
use crate::directory::DirectoryOutput;
use crate::tuple::Subspace;
use crate::RangeOption;
use crate::Transaction;
#[derive(Debug, Clone)]
pub(super) struct Node {
pub(super) subspace: Subspace,
pub(super) current_path: Vec<String>,
pub(super) target_path: Vec<String>,
pub(super) directory_layer: DirectoryLayer,
pub(super) layer: Vec<u8>,
}
impl Node {
// `load_metadata` is loading extra information for the node, like the layer
pub(crate) async fn load_metadata(
trx: &Transaction,
subspace: &Subspace,
) -> Result<Vec<u8>, DirectoryError> {
let key = subspace.pack(&LAYER_SUFFIX);
let layer = match trx.get(&key, false).await {
Err(err) => return Err(DirectoryError::FdbError(err)),
Ok(fdb_slice) => fdb_slice.as_deref().unwrap_or_default().to_vec(),
};
Ok(layer)
}
pub(crate) fn get_partition_subpath(&self) -> Vec<String> {
Vec::from(&self.target_path[self.current_path.len()..])
}
/// list sub-folders for a node
pub(crate) async fn list_sub_folders(
&self,
trx: &Transaction,
) -> Result<Vec<String>, DirectoryError> {
let mut results = vec![];
let range_option = RangeOption::from(&self.subspace.subspace(&DEFAULT_SUB_DIRS));
let fdb_values = trx.get_range(&range_option, 1_024, false).await?;
for fdb_value in fdb_values {
let subspace = Subspace::from_bytes(fdb_value.key());
// stripping from subspace
let sub_directory: (i64, String) = self.subspace.unpack(subspace.bytes())?;
results.push(sub_directory.1);
}
Ok(results)
}
pub(crate) fn is_in_partition(&self, include_empty_subpath: bool) -> bool {
self.layer.as_slice().eq(PARTITION_LAYER)
&& (include_empty_subpath || self.target_path.len() > self.current_path.len())
}
pub(crate) fn get_contents(&self) -> Result<DirectoryOutput, DirectoryError> {
self.directory_layer
.contents_of_node(&self.subspace, &self.current_path, &self.layer)
}
}
| 34.074627 | 90 | 0.64608 |
558717eb2edab77932656f29932dd5831fb014ea | 81 | html | HTML | gambling/roulette/systems/2022-05-14-Whats-Your-Vice.html | JackAceStudios/staging.jackace.com | e4677cd7a64f8108166f963a093f8b86553d86c7 | [
"Apache-2.0"
] | 1 | 2022-02-23T09:11:06.000Z | 2022-02-23T09:11:06.000Z | gambling/roulette/systems/2022-05-14-Whats-Your-Vice.html | JackAceStudios/staging.jackace.com | e4677cd7a64f8108166f963a093f8b86553d86c7 | [
"Apache-2.0"
] | 3 | 2021-12-13T03:52:37.000Z | 2022-03-12T17:13:34.000Z | gambling/roulette/systems/2022-05-14-Whats-Your-Vice.html | JackAce/jackace.com | 57560eebe368005c395c8dedf979985076780721 | [
"Apache-2.0"
] | null | null | null | ---
layout: roulette-system
title: What's Your Vice - Roulette System Review
---
| 16.2 | 48 | 0.716049 |
b8280119c5dcc713c16d2928f2ed9c995b24425d | 149 | sql | SQL | src/main/resources/liquibase/harness/change/expectedSql/oracle/19/enableCheckConstraint.sql | kevin-at-datical/liquibase-test-harness | b3625d7429d092ab70508f9f92442e9e449918a7 | [
"Apache-2.0"
] | null | null | null | src/main/resources/liquibase/harness/change/expectedSql/oracle/19/enableCheckConstraint.sql | kevin-at-datical/liquibase-test-harness | b3625d7429d092ab70508f9f92442e9e449918a7 | [
"Apache-2.0"
] | null | null | null | src/main/resources/liquibase/harness/change/expectedSql/oracle/19/enableCheckConstraint.sql | kevin-at-datical/liquibase-test-harness | b3625d7429d092ab70508f9f92442e9e449918a7 | [
"Apache-2.0"
] | null | null | null | ALTER TABLE LBUSER.posts ADD CONSTRAINT test_check_constraint CHECK (id > 0) DISABLE
ALTER TABLE LBUSER.posts ENABLE CONSTRAINT test_check_constraint | 74.5 | 84 | 0.85906 |
0406ce1d3e7375194987f980d93afee7906d81e8 | 11,727 | js | JavaScript | docs/html/search/all_10.js | ivankravets/SX126x-Arduino | 443bf94548b969de76d37c578b331bd0c9ca8be0 | [
"MIT"
] | null | null | null | docs/html/search/all_10.js | ivankravets/SX126x-Arduino | 443bf94548b969de76d37c578b331bd0c9ca8be0 | [
"MIT"
] | null | null | null | docs/html/search/all_10.js | ivankravets/SX126x-Arduino | 443bf94548b969de76d37c578b331bd0c9ca8be0 | [
"MIT"
] | null | null | null | var searchData=
[
['packet_5ftype_5fgfsk_1241',['PACKET_TYPE_GFSK',['../sx126x_8h.html#aa28671d92415a1b4b16724c72128cdc1ab8c7c692a4a9cc7e0ee7c2ac6f21e60a',1,'sx126x.h']]],
['packet_5ftype_5flora_1242',['PACKET_TYPE_LORA',['../sx126x_8h.html#aa28671d92415a1b4b16724c72128cdc1ab905caebfa612d206efcc6bccbc6811c',1,'sx126x.h']]],
['packet_5ftype_5fnone_1243',['PACKET_TYPE_NONE',['../sx126x_8h.html#aa28671d92415a1b4b16724c72128cdc1a7bc0b281e9e7e0ef0dfb2ffb37655333',1,'sx126x.h']]],
['packetparams_1244',['PacketParams',['../struct_s_x126x__s.html#a55fef348fa87f2a61fa9c453b63466a9',1,'SX126x_s']]],
['packetparams_5ft_1245',['PacketParams_t',['../struct_packet_params__t.html',1,'']]],
['packetreceived_1246',['PacketReceived',['../struct_rx_counter__t.html#ae0e219b9f4e4ff4820cca630285abdea',1,'RxCounter_t']]],
['packetstatus_1247',['PacketStatus',['../struct_s_x126x__s.html#a10c47c5b2342f0328e531b892446ee0c',1,'SX126x_s']]],
['packetstatus_5ft_1248',['PacketStatus_t',['../struct_packet_status__t.html',1,'']]],
['packettype_1249',['packetType',['../struct_packet_status__t.html#a3ef54bfe6c9061cf1b47d4ec98543164',1,'PacketStatus_t::packetType()'],['../struct_rx_counter__t.html#a1066f67884e4908680f3438bd8187372',1,'RxCounter_t::packetType()'],['../struct_modulation_params__t.html#a487574bf0c0d54ab6510f9b0d4e0f323',1,'ModulationParams_t::PacketType()'],['../struct_packet_params__t.html#a98634d0cf04f04f54b06d8d283353555',1,'PacketParams_t::PacketType()'],['../sx126x_8cpp.html#abc0c979622aa47c9bbe6c6fdbb4c9247',1,'PacketType(): sx126x.cpp']]],
['param_1250',['Param',['../structe_mib_request_confirm.html#a71cc0adf3fe8337eaa6dc69a1463c8bc',1,'eMibRequestConfirm']]],
['paramp_1251',['PaRamp',['../union_radio_error__t.html#ae68d93787626e37ba2bb2fe508767ae1',1,'RadioError_t']]],
['params_1252',['Params',['../struct_modulation_params__t.html#aa95d9bd4772ea207a6c5771f1fcd431f',1,'ModulationParams_t::Params()'],['../struct_packet_params__t.html#a957069fcd0197a7ae7029d3fdcdfc66c',1,'PacketParams_t::Params()'],['../struct_packet_status__t.html#add5b25dfb7d00a1d6bbc0e63f68d6892',1,'PacketStatus_t::Params()']]],
['parsemaccommandstorepeat_1253',['ParseMacCommandsToRepeat',['../_lo_ra_mac_8cpp.html#a728bf951414ad5fdec0889f761f05962',1,'LoRaMac.cpp']]],
['payload_1254',['Payload',['../structs_apply_c_f_list_params.html#a2e3665f7f1ceadab86db7e97040f5c80',1,'sApplyCFListParams::Payload()'],['../structs_link_adr_req_params.html#ad4d35a1161753bb4006dfd00efd04270',1,'sLinkAdrReqParams::Payload()']]],
['payloadlength_1255',['PayloadLength',['../struct_packet_params__t.html#a2b8958e77fa8ca3bc96bba928344ec4a',1,'PacketParams_t']]],
['payloadsize_1256',['PayloadSize',['../structs_link_adr_req_params.html#ae12d8663597aa0cf1134ac00f77238c4',1,'sLinkAdrReqParams']]],
['phy_5fack_5ftimeout_1257',['PHY_ACK_TIMEOUT',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da8485b24e94d037ba487ab6ecfaf162e8',1,'Region.h']]],
['phy_5fchannels_1258',['PHY_CHANNELS',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da52c9055b2e5bbfc05c86e83798856aba',1,'Region.h']]],
['phy_5fchannels_5fdefault_5fmask_1259',['PHY_CHANNELS_DEFAULT_MASK',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da7253f56eb1b6f4fe64d7a51b2e573766',1,'Region.h']]],
['phy_5fchannels_5fmask_1260',['PHY_CHANNELS_MASK',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2daa6fd00cadf73ba804e35d85aadd15882',1,'Region.h']]],
['phy_5fdef_5fantenna_5fgain_1261',['PHY_DEF_ANTENNA_GAIN',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da37b73a543ea79ce58bf18035329ba773',1,'Region.h']]],
['phy_5fdef_5fdownlink_5fdwell_5ftime_1262',['PHY_DEF_DOWNLINK_DWELL_TIME',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da8e29179691bf6520256a7af0cabae6ad',1,'Region.h']]],
['phy_5fdef_5fdr1_5foffset_1263',['PHY_DEF_DR1_OFFSET',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dae648c84cc946657e970c7e08dd69cb6f',1,'Region.h']]],
['phy_5fdef_5fmax_5feirp_1264',['PHY_DEF_MAX_EIRP',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da5bdce0ffd449781819a0d87732ebd2b7',1,'Region.h']]],
['phy_5fdef_5fnb_5fjoin_5ftrials_1265',['PHY_DEF_NB_JOIN_TRIALS',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da49312d43f8804334f738701ab59878a1',1,'Region.h']]],
['phy_5fdef_5frx2_5fdr_1266',['PHY_DEF_RX2_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da672678e5f03f8ad1afa8817405e72ef0',1,'Region.h']]],
['phy_5fdef_5frx2_5ffrequency_1267',['PHY_DEF_RX2_FREQUENCY',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da1835125d2139942145a0ed0caff058f3',1,'Region.h']]],
['phy_5fdef_5ftx_5fdr_1268',['PHY_DEF_TX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da70c3923333165960549162e3dcf10467',1,'Region.h']]],
['phy_5fdef_5ftx_5fpower_1269',['PHY_DEF_TX_POWER',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da18ae0d314f20c212f9e40207099ab1bb',1,'Region.h']]],
['phy_5fdef_5fuplink_5fdwell_5ftime_1270',['PHY_DEF_UPLINK_DWELL_TIME',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dab35cca5e0dae3d87e02c8c80e4d4685e',1,'Region.h']]],
['phy_5fduty_5fcycle_1271',['PHY_DUTY_CYCLE',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dac66308571e624ecc28c79ee0deab8cf0',1,'Region.h']]],
['phy_5fjoin_5faccept_5fdelay1_1272',['PHY_JOIN_ACCEPT_DELAY1',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2daf564c82ebd72dcd6c4fc1e702b2ec64c',1,'Region.h']]],
['phy_5fjoin_5faccept_5fdelay2_1273',['PHY_JOIN_ACCEPT_DELAY2',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da04e6c3d25ce44a74c0a29f28aa92eb48',1,'Region.h']]],
['phy_5fmax_5ffcnt_5fgap_1274',['PHY_MAX_FCNT_GAP',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da01c12b14686172b4a3c4d095deef4248',1,'Region.h']]],
['phy_5fmax_5fnb_5fchannels_1275',['PHY_MAX_NB_CHANNELS',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da52d463ed953da20f07f8d045c58caee8',1,'Region.h']]],
['phy_5fmax_5fpayload_1276',['PHY_MAX_PAYLOAD',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dad671e2651e42de26927910282c6b2781',1,'Region.h']]],
['phy_5fmax_5fpayload_5frepeater_1277',['PHY_MAX_PAYLOAD_REPEATER',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da8a3b9e5ad2604232fd1f8781658452f3',1,'Region.h']]],
['phy_5fmax_5frx_5fdr_1278',['PHY_MAX_RX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dabc80857ed9621c5c6fd60d98846b0b84',1,'Region.h']]],
['phy_5fmax_5frx_5fwindow_1279',['PHY_MAX_RX_WINDOW',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dacf2bd6f434ce2844651513ad2b9b9da5',1,'Region.h']]],
['phy_5fmax_5ftx_5fdr_1280',['PHY_MAX_TX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dac83a2348a7177fae43a5c3b0a6f0a141',1,'Region.h']]],
['phy_5fmin_5frx_5fdr_1281',['PHY_MIN_RX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da91cb5d84f937c32cd635dd7efe7a9d3a',1,'Region.h']]],
['phy_5fmin_5ftx_5fdr_1282',['PHY_MIN_TX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2daace3e56c88b40def8ed6a9106871e7de',1,'Region.h']]],
['phy_5fnb_5fjoin_5ftrials_1283',['PHY_NB_JOIN_TRIALS',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da46941b2ce68829fcee9540dc64e53d6d',1,'Region.h']]],
['phy_5fnext_5flower_5ftx_5fdr_1284',['PHY_NEXT_LOWER_TX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2dac002e7e492cf30dbf9c544b062f5cc8a',1,'Region.h']]],
['phy_5freceive_5fdelay1_1285',['PHY_RECEIVE_DELAY1',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da3680d45f45e3e0a96ce9f1e1b5ed7371',1,'Region.h']]],
['phy_5freceive_5fdelay2_1286',['PHY_RECEIVE_DELAY2',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da9c7e3df5f55fab406960a9e5bf635155',1,'Region.h']]],
['phy_5frx_5fdr_1287',['PHY_RX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da8cc3b895173b07ee71127e366c8d0d55',1,'Region.h']]],
['phy_5ftx_5fdr_1288',['PHY_TX_DR',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da62c19af9dc2c54540562e1158c015f57',1,'Region.h']]],
['phy_5ftx_5fpower_1289',['PHY_TX_POWER',['../group___r_e_g_i_o_n.html#gga51cbe8f5433d914fe9cf81b451de2c2da0dceb30b79f1bae301afd5406a86d6f3',1,'Region.h']]],
['phyattribute_5ft_1290',['PhyAttribute_t',['../group___r_e_g_i_o_n.html#ga9445b07fdf77581ecfaf389970e635f8',1,'Region.h']]],
['phyparam_5ft_1291',['PhyParam_t',['../group___r_e_g_i_o_n.html#gaed159b26e5c4677236b6e8677019db30',1,'Region.h']]],
['pin_5flora_5fbusy_1292',['PIN_LORA_BUSY',['../structhw__config.html#a9e07ce520dba04c3178a362b21f18559',1,'hw_config']]],
['pin_5flora_5fdio_5f1_1293',['PIN_LORA_DIO_1',['../structhw__config.html#a062c21770b290ce2ac0e9f47911f4c12',1,'hw_config']]],
['pin_5flora_5fmiso_1294',['PIN_LORA_MISO',['../structhw__config.html#a22b2e6a91ba905a6dab7478156518f5f',1,'hw_config']]],
['pin_5flora_5fmosi_1295',['PIN_LORA_MOSI',['../structhw__config.html#a103e761b29003b319ec71c3b503f8a00',1,'hw_config']]],
['pin_5flora_5fnss_1296',['PIN_LORA_NSS',['../structhw__config.html#a6b3b23ce76cf5c5f80699c900f745b64',1,'hw_config']]],
['pin_5flora_5freset_1297',['PIN_LORA_RESET',['../structhw__config.html#ab71897257b0e801435be473a8fa85f07',1,'hw_config']]],
['pin_5flora_5fsclk_1298',['PIN_LORA_SCLK',['../structhw__config.html#a61c1f083bbe8b704225f90e231dca2a3',1,'hw_config']]],
['pktlen_1299',['PktLen',['../structs_tx_config_params.html#a02956e7075ebaa918006ff5d786dae85',1,'sTxConfigParams']]],
['pllcalib_1300',['PllCalib',['../union_radio_error__t.html#a17487080ac7d313579774764ba3f9a1d',1,'RadioError_t']]],
['pllenable_1301',['PLLEnable',['../union_calibration_params__t.html#a25d4e4bf91ce835784ced1b405970fde',1,'CalibrationParams_t']]],
['plllock_1302',['PllLock',['../union_radio_error__t.html#a75ec0854acfe452ae1b0d69ee9fe2f24',1,'RadioError_t']]],
['port_1303',['port',['../structlmh__app__data__t.html#a65bb0f6391b8aebf9919590a804c6d49',1,'lmh_app_data_t::port()'],['../structs_mcps_indication.html#ac7124ef78e2ea10129a5ae8686c25b03',1,'sMcpsIndication::Port()']]],
['pow2_1304',['POW2',['../utilities_8h.html#a4ccbcb603250aaa348c37eafb950cd48',1,'utilities.h']]],
['power_1305',['Power',['../structs_mlme_req_tx_cw.html#ab9e35e3b76d695b3e14efcdc6eab6f55',1,'sMlmeReqTxCw']]],
['preamblelength_1306',['PreambleLength',['../struct_packet_params__t.html#a5b6c42e6379987cdd815c94f0d7f4304',1,'PacketParams_t']]],
['preamblemindetect_1307',['PreambleMinDetect',['../struct_packet_params__t.html#afd87f3021a915dfc98ed288af7b91f1c',1,'PacketParams_t']]],
['preampdetect_1308',['PreAmpDetect',['../struct_radio_events__t.html#a1853c6b9c418dbab1ef7ac8311eddbc9',1,'RadioEvents_t']]],
['prepareframe_1309',['PrepareFrame',['../_lo_ra_mac_8cpp.html#a1c2e41a970de949b0b59a8177cb8ef29',1,'LoRaMac.cpp']]],
['preparerxdoneabort_1310',['PrepareRxDoneAbort',['../_lo_ra_mac_8cpp.html#a420f8e89407bab48414b1058d8071c97',1,'LoRaMac.cpp']]],
['previous_1311',['Previous',['../struct_radio_public_network__t.html#aec3c4e5441938cfbdbc55d92eedb126a',1,'RadioPublicNetwork_t']]],
['processmaccommands_1312',['ProcessMacCommands',['../_lo_ra_mac_8cpp.html#afa7e82de5358cd2d2605c888cb1860a3',1,'LoRaMac.cpp']]],
['proprietary_1313',['Proprietary',['../unions_mcps_req_1_1u_mcps_param.html#a894cf87a04261fa298cde47fc50ac02d',1,'sMcpsReq::uMcpsParam']]],
['publicnetwork_1314',['PublicNetwork',['../_lo_ra_mac_8cpp.html#ad5c7c76904042bd86508425be3b91a05',1,'LoRaMac.cpp']]]
];
| 150.346154 | 543 | 0.811375 |
0bb6248f2ab5e1dfc2c4c1a5fe22056f8e0b5ef2 | 5,471 | js | JavaScript | content/ClientApp/build/webpack.config.js | hvpaiva/aspdotnet-vuejs | e7bf3c5ed78e95f0f5a9a392b8dc32fdfdbe9b16 | [
"MIT"
] | 14 | 2019-03-30T00:05:38.000Z | 2020-02-14T03:10:18.000Z | content/ClientApp/build/webpack.config.js | hvpaiva/aspdotnet-vuejs | e7bf3c5ed78e95f0f5a9a392b8dc32fdfdbe9b16 | [
"MIT"
] | 2 | 2019-05-26T20:15:55.000Z | 2019-10-24T13:32:34.000Z | content/ClientApp/build/webpack.config.js | hvpaiva/aspdotnet-vuejs | e7bf3c5ed78e95f0f5a9a392b8dc32fdfdbe9b16 | [
"MIT"
] | 6 | 2019-04-04T10:10:26.000Z | 2020-02-14T03:10:19.000Z | const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const rimraf = require('rimraf');
const BaseConfig = require('./base.config');
const AppConfig = require('../../appsettings');
const LaunchConfig = require('../../Properties/launchSettings');
const rootDir = path.resolve(__dirname, '../..');
const bundleOutputDir = path.resolve(rootDir, './wwwroot/dist');
console.info(`Building for production: ${BaseConfig.isProduction}`);
rimraf.sync(path.resolve(rootDir, 'wwwroot/**/*'), { silent: true });
if (!BaseConfig.isProduction) {
fs.createReadStream(path.resolve(rootDir, 'ClientApp/build/publishingLoader.html'))
.pipe(fs.createWriteStream(path.resolve(rootDir, 'wwwroot/index.html')));
}
console.info(BaseConfig);
module.exports = {
name: 'app',
devServer: {
proxy: {
'^/api': {
target: LaunchConfig.profiles.AspDotnetVueJS.applicationUrl,
ws: true,
changeOrigin: true
}
}
},
mode: BaseConfig.isProduction ? 'production' : 'development',
stats: BaseConfig.isProduction ? 'errors-only' : 'normal',
entry: { main: path.resolve(rootDir, './ClientApp/app.js') },
resolve: {
extensions: ['.js', '.vue'],
alias: {
components: path.resolve(rootDir, './ClientApp/components')
}
},
optimization: {
splitChunks: {
cacheGroups: {
commons: {
chunks: 'initial',
name: 'site',
minChunks: 2,
maxInitialRequests: 5,
minSize: 0
},
vendor: {
test: /node_modules/,
chunks: 'initial',
name: 'vendor',
priority: 10,
enforce: true
}
}
},
minimizer: [
new UglifyJsPlugin(
{
cache: true,
parallel: true,
sourceMap: !BaseConfig.isProduction
}
),
new OptimizeCSSAssetsPlugin({})
],
nodeEnv: BaseConfig.isProduction ? 'production' : 'development'
},
output: {
path: path.resolve(rootDir, './wwwroot/dist'),
filename: !BaseConfig.isProduction ? '[name].js' : '[name].[hash].js',
// publicPath: In production we don't use webpack hot reload, so it should be alright.
// the usage of the at the beginning is for the basePath to be properly used. See
// BaseConfig.baseUriPath. The webpack hot reload require the official URI path or you
// will get errors in your console.
publicPath: BaseConfig.isProduction ? `.${BaseConfig.baseUriPath}/dist/` : '/dist/'
},
module: {
rules: [
// this will apply to `.vue`
{
test: /\.vue$/,
loader: 'vue-loader'
},
// this will apply to both plain `.js` files
// AND `<script>` blocks in `.vue` files
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', { modules: false }]],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-transform-async-to-generator'
]
}
}
},
{
test: /\.css$/,
use: BaseConfig.isProduction
? [MiniCssExtractPlugin.loader, 'css-loader']
: ['style-loader', 'css-loader']
},
{
test: /\.svg$/,
loader: 'svg-inline-loader'
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
]
},
{
test: /\.sass$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
indentedSyntax: true
}
}
]
},
{
test: /\.(ico|png|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
outputPath: 'images/'
}
}
]
},
{
test: /\.pug$/,
loader: 'pug-plain-loader'
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 4096,
fallback: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[hash:8].[ext]'
}
}
}
}
]
}
]
},
plugins: [
new VueLoaderPlugin(),
new webpack.DefinePlugin(
{
'process.env': {
BASE_URL: JSON.stringify(BaseConfig.baseUriPath)
}
}
),
new CopyWebpackPlugin(
[
{
from: path.resolve(rootDir, 'ClientApp/static/'),
to: '../static/',
ignore: ['.*']
},
{
from: path.resolve(rootDir, 'ClientApp/favicon.ico'),
to: '../favicon.ico',
toType: 'file'
}
],
{ debug: 'warning' }
),
new HtmlWebpackPlugin(
{
filename: path.resolve(rootDir, 'wwwroot/index.html'),
template: path.resolve(rootDir, 'ClientApp/index.html'),
inject: true,
templateParameters: {
baseHref: BaseConfig.baseUriPath,
appName: AppConfig.App.Title
}
}
)
].concat(BaseConfig.isProduction ? [
new MiniCssExtractPlugin(
{
filename: !BaseConfig.isProduction
? 'css/[name].css'
: 'css/[name].[hash].css'
}
)
] : [])
.concat(BaseConfig.generateMapFiles ? [
new webpack.SourceMapDevToolPlugin(
{
filename: '[file].map',
moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]')
}
)
] : [])
};
| 23.683983 | 88 | 0.59459 |
36f1d37febf2fff7f3b534bb2ea848a25ca48452 | 2,073 | kt | Kotlin | vertx-base/src/main/kotlin/dev/yn/cassandra/CassandraVerticle.kt | dgoetsch/akka-vertx-demo | afe6b2caba24b2a08347dc508d019a70bdeba10f | [
"Apache-2.0"
] | 5 | 2017-10-10T18:00:19.000Z | 2019-07-16T17:57:04.000Z | vertx-base/src/main/kotlin/dev/yn/cassandra/CassandraVerticle.kt | dgoetsch/akka-vertx-demo | afe6b2caba24b2a08347dc508d019a70bdeba10f | [
"Apache-2.0"
] | null | null | null | vertx-base/src/main/kotlin/dev/yn/cassandra/CassandraVerticle.kt | dgoetsch/akka-vertx-demo | afe6b2caba24b2a08347dc508d019a70bdeba10f | [
"Apache-2.0"
] | null | null | null | /*
* Copyright 2017 Devyn Goetsch
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.yn.cassandra
import com.datastax.driver.core.ResultSet
import com.datastax.driver.core.Statement
import com.google.common.util.concurrent.FutureCallback
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import io.vertx.core.Future
import io.vertx.core.Vertx
class CassandraVerticle(val vertx: Vertx) {
private val cassandraConnector by lazy {
CassandraConnector.singleton
}
fun executeAsync(statement: Statement, callback: FutureCallback<ResultSet>): Unit {
addCallback(cassandraConnector.session().executeAsync(statement), callback)
}
fun executeAsync(statement: Statement): Future<ResultSet> {
val future = Future.future<ResultSet>()
addCallback(cassandraConnector.session().executeAsync(statement), VertxFutureCallBack(future))
return future;
}
private class VertxFutureCallBack(val future: Future<ResultSet>): FutureCallback<ResultSet> {
override fun onFailure(t: Throwable?) {
future.fail(t)
}
override fun onSuccess(result: ResultSet?) {
future.complete(result)
}
}
private fun <V> addCallback(future: ListenableFuture<V>, callback: FutureCallback<in V>): Unit {
val context = vertx.getOrCreateContext()
Futures.addCallback(future, callback, { command -> context.runOnContext({ aVoid -> command.run() }) })
}
}
| 36.368421 | 110 | 0.712012 |
85a35276461489ce4a103c01138d43a898a9ad81 | 1,356 | js | JavaScript | links/googleImageListTemplateGenerator.js | taroyanaka/JavaScript | 637fa6c546a94aa1fac22a89cf48382251c13a88 | [
"MIT"
] | null | null | null | links/googleImageListTemplateGenerator.js | taroyanaka/JavaScript | 637fa6c546a94aa1fac22a89cf48382251c13a88 | [
"MIT"
] | 21 | 2020-07-16T16:11:48.000Z | 2022-01-08T15:06:12.000Z | links/googleImageListTemplateGenerator.js | taroyanaka/javascript | c100e5ac18dc93d03b8130051fdf6283baecbe28 | [
"MIT"
] | null | null | null | const getLines = (event) =>{
const NAMES = event.target.value;
// NAMES = `Nadir Afonso
// Yaacov Agam
// Larry Zox
// Jan Zrzavý`
const HEADER = `<div><a href="https://www.google.com/search?q=`
const FOOTER = `&tbm=isch">`
const ATAG = `</a></div>\n`
const URLS = R.pipe(R.split('\n'), R.map(R.replace(/ /g, '+')), R.map(R.replace(/^/g, HEADER)), R.map(R.replace(/$/g, FOOTER)))(NAMES);
const ALLNAMES = R.pipe(R.split('\n'), R.map(R.replace(/$/g, ATAG)))(NAMES);
const URLSWITHNAMES = R.pipe(R.transpose, R.flatten, R.join(""))([URLS, ALLNAMES])
document.querySelector("#bar").value = `<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.26.1/ramda.min.js"></script>
<title></title>
</head>
<body>
<button onclick="openTab();">If you allow pop-ups, you can open all tabs with this button</button>
<script type="text/javascript">
function openTab(){
const NAMES = \`${NAMES}\`
const HEADER = \`https://www.google.com/search?q=\`
const FOOTER = \`&tbm=isch\`
const URLS = R.pipe(R.split('\\n'), R.map(R.replace(/ /g, '+')), R.map(R.replace(/^/g, HEADER)), R.map(R.replace(/$/g, FOOTER)))(NAMES);
const allTabOpen = x => {
window.open(x, '_blank');
};
R.forEach(allTabOpen, URLS );
}
</script>
${URLSWITHNAMES}
</body>
</html>`
}; | 36.648649 | 137 | 0.630531 |
07a592f28f0b1920625f5385138ff031cf18d717 | 18 | sql | SQL | www/db.sql | LordCatatonic/Lucifer | c007faf061db5e0bb0c89ca001d6d92b11ce59f4 | [
"Unlicense"
] | 7 | 2015-08-24T21:40:56.000Z | 2021-07-22T04:14:44.000Z | www/db.sql | LordCatatonic/Lucifer | c007faf061db5e0bb0c89ca001d6d92b11ce59f4 | [
"Unlicense"
] | 1 | 2015-08-15T03:56:43.000Z | 2015-08-15T03:56:43.000Z | www/db.sql | LordCatatonic/Lucifer | c007faf061db5e0bb0c89ca001d6d92b11ce59f4 | [
"Unlicense"
] | 2 | 2015-12-08T17:18:22.000Z | 2021-07-21T17:40:01.000Z | # Update SQL file
| 9 | 17 | 0.722222 |
51569e5e809d172659a5afd41d9a860f6d8d6665 | 727 | sql | SQL | Implementation/oracle/02_FOREIGN_KEY/US_TPUSR_FK.sql | ADA-Inc/autentication-web | 89850479f9b6f6663c172add6fb6bcc166156d68 | [
"MIT"
] | null | null | null | Implementation/oracle/02_FOREIGN_KEY/US_TPUSR_FK.sql | ADA-Inc/autentication-web | 89850479f9b6f6663c172add6fb6bcc166156d68 | [
"MIT"
] | 7 | 2018-08-17T21:51:14.000Z | 2022-03-31T19:13:53.000Z | Implementation/oracle/02_FOREIGN_KEY/US_TPUSR_FK.sql | ADA-Inc/autentication-web | 89850479f9b6f6663c172add6fb6bcc166156d68 | [
"MIT"
] | null | null | null | REM ******************************************************************
REM Fecha : 08/05/2018
REM Realizado por : Master Zen
REM Base de Datos : FS_AUWEB_US
REM ******************************************************************
/* Create Foreign Key Constraints */
ALTER TABLE "US_TPUSR"
ADD CONSTRAINT "FK_US_TPUSR_US_TPSNA"
FOREIGN KEY ("PUSR_PSNA") REFERENCES "FS_AUWEB_US"."US_TPSNA" ("PSNA_PSNA")
;
ALTER TABLE "US_TPUSR"
ADD CONSTRAINT "FK_US_TPUSR_US_TROLL"
FOREIGN KEY ("PUSR_ROLL") REFERENCES "FS_AUWEB_US"."US_TROLL" ("ROLL_ROLL")
;
ALTER TABLE "US_TPUSR"
ADD CONSTRAINT "FK_US_TPUSR_US_TUSER"
FOREIGN KEY ("PUSR_USER") REFERENCES "FS_AUWEB_US"."US_TUSER" ("USER_USER")
;
| 27.961538 | 77 | 0.580468 |
3a11724c6a9d4fb402af8e5a53f6ff2d80c43e40 | 2,247 | kt | Kotlin | nettasker/src/main/java/com/oryoncorp/apps/nettasker/tasks/WebGetAsyncTask.kt | iosiftalmacel/NetTasker-Android | 7d96b967837fd6b8fa0510ee910a06f63e892623 | [
"MIT"
] | null | null | null | nettasker/src/main/java/com/oryoncorp/apps/nettasker/tasks/WebGetAsyncTask.kt | iosiftalmacel/NetTasker-Android | 7d96b967837fd6b8fa0510ee910a06f63e892623 | [
"MIT"
] | null | null | null | nettasker/src/main/java/com/oryoncorp/apps/nettasker/tasks/WebGetAsyncTask.kt | iosiftalmacel/NetTasker-Android | 7d96b967837fd6b8fa0510ee910a06f63e892623 | [
"MIT"
] | null | null | null | package com.oryoncorp.apps.netload.tasks
import android.os.AsyncTask
import android.util.Log
import android.util.LruCache
import com.oryoncorp.apps.netload.requests.read.DataSource
import com.oryoncorp.apps.netload.requests.read.DownloadRequest
import java.io.BufferedInputStream
import java.io.File
import java.net.HttpURLConnection
import java.net.URL
import javax.net.ssl.HttpsURLConnection
internal class WebGetAsyncTask(private val netRequest: DownloadRequest<*>, private val memoryCache: LruCache<String, Any>) : AsyncTask<String, Void, Any>() {
private var initialUrl = netRequest.url
override fun doInBackground(vararg params: String): Any? {
var urlConnection: HttpURLConnection? = null
try {
val uri = URL(netRequest.url)
urlConnection = uri.openConnection() as HttpURLConnection
val statusCode = urlConnection.responseCode
if (statusCode != HttpsURLConnection.HTTP_OK) {
return null
}
val inputStream = BufferedInputStream(urlConnection.inputStream)
if (netRequest.context != null) {
netRequest.onLoadFromWebInternal(inputStream)?.let {
if(netRequest.saveOnDisk)
{
val file = File(netRequest.context!!.cacheDir, netRequest.computeFileName())
netRequest.onSaveToDiskInternal(file, it)
}
if (netRequest.saveInMemory){
netRequest.onSaveToMemoryInternal(memoryCache, it)
}
return it
}
}
} catch (e: Exception) {
e.printStackTrace()
if (urlConnection != null)
urlConnection.disconnect()
} finally {
if (urlConnection != null)
urlConnection.disconnect()
}
return null
}
override fun onPostExecute(data: Any?) {
if(isCancelled || netRequest.url != initialUrl || netRequest.cancelled)
return
if (data == null)
netRequest.onRequestError()
else
netRequest.onDataReceivedInternal(data, DataSource.Web)
}
} | 34.569231 | 157 | 0.609257 |
1c9dee55b7944f5bf0e6a74020b26b4576e407ec | 375 | css | CSS | app/components/LastAction.css | reaalkhalil/todoapp | a2c88e681dcec5f15804afea36f2e0a5144d743d | [
"MIT"
] | null | null | null | app/components/LastAction.css | reaalkhalil/todoapp | a2c88e681dcec5f15804afea36f2e0a5144d743d | [
"MIT"
] | null | null | null | app/components/LastAction.css | reaalkhalil/todoapp | a2c88e681dcec5f15804afea36f2e0a5144d743d | [
"MIT"
] | null | null | null | .LastAction {
display: block;
position: absolute;
z-index: 10000;
bottom: 0;
left: 0;
color: rgba(34, 26, 85, 0.75);
background-color: rgba(221, 215, 255, 0.85);
padding: 3px 10px;
font-size: 12px;
border-radius: 0 6px 0 0;
pointer-events: none;
user-select: none;
opacity: 0;
transition: 300ms ease-in-out;
}
.LastAction--show {
opacity: 1;
}
| 17.857143 | 46 | 0.637333 |
7b177f67685a5d2444eb5ef31dd5387ac4a938b1 | 959 | rb | Ruby | lib/cli.rb | FreeRunner34/brewfinder-w-bundler | af4f549d07efe71dae665655bc704b5234264198 | [
"MIT"
] | null | null | null | lib/cli.rb | FreeRunner34/brewfinder-w-bundler | af4f549d07efe71dae665655bc704b5234264198 | [
"MIT"
] | null | null | null | lib/cli.rb | FreeRunner34/brewfinder-w-bundler | af4f549d07efe71dae665655bc704b5234264198 | [
"MIT"
] | null | null | null | require_relative 'api.rb'
require_relative 'brewfinder.rb'
# require 'pry'
class Cli
def menu
puts "option 1: see a list of Breweries"
#other options to be updated and created later.
# puts "option 2: search a Brewery by Name"
# puts "option 3: search a Brewery by City"
# puts "option 4: search a Brewery by State"
# puts "option 5: search a Brewery by Postal Code"
input = gets.chomp
if input == "1"
option_1
puts "Please select the number of a brewery you'd like to see more about"
prompt = gets.chomp.to_i
selected_brewery = Brewery.all[prompt-1]
puts selected_brewery.website_url
else
exit
end
end
def option_1
counter = 1
Brewery.all.each do |brewery|
puts "#{counter}" + ". " + brewery.name
counter += 1
end
end
end
| 26.638889 | 85 | 0.561001 |
cbf8b509d2f1dde5b692688741d57cdee709ec15 | 2,744 | go | Go | oauth.go | fishy/godrive-fuse | 04350b97d91e605c1672901a76f38d025a1de65d | [
"BSD-3-Clause"
] | null | null | null | oauth.go | fishy/godrive-fuse | 04350b97d91e605c1672901a76f38d025a1de65d | [
"BSD-3-Clause"
] | null | null | null | oauth.go | fishy/godrive-fuse | 04350b97d91e605c1672901a76f38d025a1de65d | [
"BSD-3-Clause"
] | null | null | null | package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"path/filepath"
"github.com/reddit/baseplate.go/log"
"github.com/reddit/baseplate.go/randbp"
"golang.org/x/net/context"
"golang.org/x/oauth2"
)
// OAuthClientConfig defines the configurations needed for the oauth client.
type OAuthClientConfig struct {
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
}
// Args passed to GetOAuthClient function.
type Args struct {
Directory string
Profile string
NoAuth bool
}
// GetOAuthClient returns an HTTP client that's ready to be used with Drive API.
func GetOAuthClient(
ctx context.Context,
args Args,
cfg OAuthClientConfig,
) *http.Client {
config := &oauth2.Config{
ClientID: cfg.ClientID,
ClientSecret: cfg.ClientSecret,
Endpoint: oauth2.Endpoint{
AuthURL: `https://accounts.google.com/o/oauth2/auth`,
TokenURL: `https://accounts.google.com/o/oauth2/token`,
},
RedirectURL: `urn:ietf:wg:oauth:2.0:oob`,
Scopes: []string{
`https://www.googleapis.com/auth/drive`,
},
}
tokFile := filepath.Join(args.Directory, args.Profile+".json")
tok, err := tokenFromFile(tokFile)
if err != nil {
if args.NoAuth {
log.Fatalw("Unable to authenticate", "profile", args.Profile, "err", err)
}
tok = getTokenFromWeb(ctx, config)
saveToken(tokFile, tok)
}
return config.Client(ctx, tok)
}
func getTokenFromWeb(ctx context.Context, config *oauth2.Config) *oauth2.Token {
authURL := config.AuthCodeURL(fmt.Sprintf("state-%d", randbp.R.Uint64()))
fmt.Printf(
"Go to the following link in your browser then type the authorization code: \n%s\n",
authURL,
)
var authCode string
if _, err := fmt.Scan(&authCode); err != nil {
log.Fatalw("Unable to read authorization code", "err", err)
}
tok, err := config.Exchange(ctx, authCode)
if err != nil {
log.Fatalw("Unable to retrieve token from web", "err", err)
}
return tok
}
// Retrieves a token from a local file.
func tokenFromFile(file string) (*oauth2.Token, error) {
f, err := os.Open(file)
if err != nil {
return nil, err
}
defer f.Close()
tok := &oauth2.Token{}
err = json.NewDecoder(f).Decode(tok)
return tok, err
}
// Saves a token to a file path.
func saveToken(path string, token *oauth2.Token) {
fmt.Printf("Saving credential file to: %s\n", path)
f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
log.Fatalw("Unable to cache oauth token", "path", path, "err", err)
}
defer func() {
if err := f.Close(); err != nil {
log.Fatalw("Unable to save oauth token", "path", path, "err", err)
}
}()
if err := json.NewEncoder(f).Encode(token); err != nil {
log.Fatalw("Unable to encode profile token json", "err", err)
}
}
| 25.407407 | 86 | 0.68586 |
33057f162f9d778470bc3e8176490e3594ced17b | 76 | py | Python | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | __author__ = 'jeffrey.starr@ztoztechnologies.com'
from .infer import infer
| 19 | 49 | 0.802632 |
d8ca555185813c4ca542121f3838ccf959a2e421 | 501 | sql | SQL | src/main/resources/sql/action/property/agent/operator/Operator.sql | scrappyCoco/SQL-Server-Administration-Tool | 1408f2a9229dbdf9ad99966faa5e7a5b74786270 | [
"Apache-2.0"
] | null | null | null | src/main/resources/sql/action/property/agent/operator/Operator.sql | scrappyCoco/SQL-Server-Administration-Tool | 1408f2a9229dbdf9ad99966faa5e7a5b74786270 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:56:01.000Z | 2020-02-13T17:06:57.000Z | src/main/resources/sql/action/property/agent/operator/Operator.sql | scrappyCoco/SQL-Server-Administration-Tool | 1408f2a9229dbdf9ad99966faa5e7a5b74786270 | [
"Apache-2.0"
] | 2 | 2021-03-17T16:54:17.000Z | 2021-06-04T09:10:36.000Z | DECLARE @operatorId INT = ??operatorId??;
SELECT id = CAST(sysoperators.id AS VARCHAR(10)),
name = sysoperators.name,
isEnabled = CAST(sysoperators.enabled AS BIT),
eMail = sysoperators.email_address,
categoryId = CAST(syscategories.category_id AS VARCHAR(10)),
categoryName = syscategories.name
FROM msdb.dbo.sysoperators
LEFT JOIN msdb.dbo.syscategories ON syscategories.category_id = sysoperators.category_id
WHERE id = @operatorId; | 45.545455 | 88 | 0.696607 |
88ab7850cad2a597f2377f637b5984ede6de8f56 | 2,146 | kt | Kotlin | androidApp/src/main/java/com/keygenqt/viewer/android/features/profile/ui/viewModels/ProfileViewModel.kt | keygenqt/kmm-GitHubViewer | 7a000741c8f8c21a559de8afb0cff0a2358a24d8 | [
"Apache-2.0"
] | 21 | 2021-11-29T19:41:24.000Z | 2022-02-20T04:00:13.000Z | androidApp/src/main/java/com/keygenqt/viewer/android/features/profile/ui/viewModels/ProfileViewModel.kt | keygenqt/kmm-GitHubViewer | 7a000741c8f8c21a559de8afb0cff0a2358a24d8 | [
"Apache-2.0"
] | null | null | null | androidApp/src/main/java/com/keygenqt/viewer/android/features/profile/ui/viewModels/ProfileViewModel.kt | keygenqt/kmm-GitHubViewer | 7a000741c8f8c21a559de8afb0cff0a2358a24d8 | [
"Apache-2.0"
] | 2 | 2022-01-06T04:37:29.000Z | 2022-01-13T08:34:53.000Z | /*
* Copyright 2022 Vitaliy Zarubin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.keygenqt.viewer.android.features.profile.ui.viewModels
import androidx.lifecycle.ViewModel
import com.keygenqt.requests.ResponseStates
import com.keygenqt.requests.success
import com.keygenqt.viewer.android.base.exceptions.errorHandlerStates
import com.keygenqt.viewer.android.extensions.withTransaction
import com.keygenqt.viewer.android.features.profile.ui.screens.profile.ProfileScreen
import com.keygenqt.viewer.android.services.apiService.AppApiService
import com.keygenqt.viewer.android.services.dataService.AppDataService
import com.keygenqt.viewer.android.services.dataService.impl.UserModelDataService
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.distinctUntilChanged
import javax.inject.Inject
/**
* [ViewModel] for [ProfileScreen]
*/
@HiltViewModel
class ProfileViewModel @Inject constructor(
private val apiService: AppApiService,
private val dataService: AppDataService
) : ViewModel() {
/**
* State actions
*/
val query1 = ResponseStates(this, ::errorHandlerStates)
/**
* Listen user model
*/
val user = dataService.getUserModel().distinctUntilChanged()
init {
updateProfile()
}
/**
* Query update profile
*/
fun updateProfile() {
query1.queryLaunch {
apiService.getUser().success {
dataService.withTransaction<UserModelDataService> {
clearUserModel()
insertUserModel(it)
}
}
}
}
}
| 31.558824 | 84 | 0.72274 |
9c3e2f0f69d89a69e5884454ef2e906b14ad07a2 | 776 | js | JavaScript | src/components/dropdown/components/item.js | xhafa33dev/react-bulma-components | e2a5c74e5b203d9e22982835167838489f6dd2ca | [
"MIT"
] | 1 | 2018-11-04T19:31:36.000Z | 2018-11-04T19:31:36.000Z | src/components/dropdown/components/item.js | xhafa33dev/react-bulma-components | e2a5c74e5b203d9e22982835167838489f6dd2ca | [
"MIT"
] | null | null | null | src/components/dropdown/components/item.js | xhafa33dev/react-bulma-components | e2a5c74e5b203d9e22982835167838489f6dd2ca | [
"MIT"
] | null | null | null | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
export default class DropdownItem extends PureComponent {
static displayName = 'Dropdown.Item'
static propTypes = {
active: PropTypes.bool,
children: PropTypes.node,
value: PropTypes.any.isRequired,
onClick: PropTypes.func,
}
static defaultProps = {
active: false,
onClick: undefined,
children: null,
}
render() {
const { active, children, value, ...props } = this.props;
return (
<div
title={value}
{...props}
role="presentation"
className={classnames('dropdown-item', {
'is-active': active,
})}
>
{children}
</div>
);
}
}
| 21.555556 | 61 | 0.604381 |
d2fe3b4578ea0d920bf429b9d3345390c88674ad | 200 | tab | SQL | scrape/data/event_tags_ids.tab | usegalaxy-au/galaxy-media-site | 3ec13e0f42591d2543768f252be037784933e271 | [
"MIT"
] | null | null | null | scrape/data/event_tags_ids.tab | usegalaxy-au/galaxy-media-site | 3ec13e0f42591d2543768f252be037784933e271 | [
"MIT"
] | 36 | 2021-11-14T21:34:22.000Z | 2022-03-24T22:46:42.000Z | scrape/data/event_tags_ids.tab | neoformit/galaxy-content-site | a6eeaf1893c12dd4d7d714fb823f43509a0a3893 | [
"MIT"
] | null | null | null | 0 1
1 12
2 1
3 1
4 12
5 12
6 12
7 1
8 12
9 12
10 12
11 12
12 12
13 12
14 1
15 12
16 12
17 12
18 12
19 12
20 12
21 12
22 12
23 12
24 12
25 12
26 12
27 12
29 12
31 12
32 12
35 12
37 12
38 1
39 12
41 12
| 5.405405 | 5 | 0.64 |
5f9d4ca5c106942440f2dc7be7490d65f53866b4 | 2,643 | h | C | firmware/iar/l152/Src/board.h | coffeerr2004001/vvlogic | 9d55ab3c612253605f88e47e4cf27a5e7f309ee4 | [
"MIT"
] | 1 | 2016-05-07T03:58:06.000Z | 2016-05-07T03:58:06.000Z | firmware/iar/l152/Src/board.h | coffeerr2004001/vvlogic | 9d55ab3c612253605f88e47e4cf27a5e7f309ee4 | [
"MIT"
] | null | null | null | firmware/iar/l152/Src/board.h | coffeerr2004001/vvlogic | 9d55ab3c612253605f88e47e4cf27a5e7f309ee4 | [
"MIT"
] | null | null | null | //board.h
#ifndef __BOARD_H
#define __BOARD_H
#define LED_PORT GPIOC
#define LED_PIN GPIO_PIN_5
#define PWR_VDD5V_SW_PORT GPIOB
#define PWR_VDD5V_SW_PIN GPIO_PIN_1
#define CTS0_PORT GPIOA
#define CTS0_PIN GPIO_PIN_0
#define RXD1_PORT GPIOA
#define RXD1_PIN GPIO_PIN_10
#define TXD0_PORT GPIOA
#define TXD0_PIN GPIO_PIN_2
#define RXD0_PORT GPIOA
#define RXD0_PIN GPIO_PIN_3
#define TXD1_PORT GPIOA
#define TXD1_PIN GPIO_PIN_9
#define RTS0_PORT GPIOA
#define RTS0_PIN GPIO_PIN_1
#define BOOT1_PORT GPIOB
#define BOOT1_PIN GPIO_PIN_2
#define BOOT0_PORT GPIOB
#define BOOT0_PIN GPIO_PIN_8
#define DAC_OUT_PORT GPIOA
#define DAC_OUT_PIN GPIO_PIN_4
#define DDS_CLK_UPD_PORT GPIOB
#define DDS_CLK_UPD_PIN GPIO_PIN_7
#define DDS_SER_CLK_PORT GPIOC
#define DDS_SER_CLK_PIN GPIO_PIN_10
#define DDS_SER_DATA_PORT GPIOA
#define DDS_SER_DATA_PIN GPIO_PIN_12
#define DDS_RESET_PORT GPIOA
#define DDS_RESET_PIN GPIO_PIN_15
#define PA_SER_DATA_PORT GPIOC
#define PA_SER_DATA_PIN GPIO_PIN_12
#define PA_SER_CLK_PORT GPIOC
#define PA_SER_CLK_PIN GPIO_PIN_11
#define PA_SER_LE_PORT GPIOD
#define PA_SER_LE_PIN GPIO_PIN_2
#define EN_VPA_PORT GPIOA
#define EN_VPA_PIN GPIO_PIN_11
#define PLL_SPI_CLK_PORT GPIOA
#define PLL_SPI_CLK_PIN GPIO_PIN_5
#define PLL_SPI_MOSI_PORT GPIOA
#define PLL_SPI_MOSI_PIN GPIO_PIN_7
#define PLL_SPI_CS_PORT GPIOC
#define PLL_SPI_CS_PIN GPIO_PIN_4
#define PLL_MUTE_PORT GPIOC
#define PLL_MUTE_PIN GPIO_PIN_1
#define PLL_MUXOUT_PORT GPIOC
#define PLL_MUXOUT_PIN GPIO_PIN_3
#define PLL_LD_PORT GPIOC
#define PLL_LD_PIN GPIO_PIN_2
#define FILTER_CTRL0_PORT GPIOC
#define FILTER_CTRL0_PIN GPIO_PIN_9
#define FILTER_CTRL1_PORT GPIOC
#define FILTER_CTRL1_PIN GPIO_PIN_8
#define FILTER_CTRL2_PORT GPIOC
#define FILTER_CTRL2_PIN GPIO_PIN_7
#define FILTER_CTRL3_PORT GPIOC
#define FILTER_CTRL3_PIN GPIO_PIN_6
#define FILTER_CTRL4_PORT GPIOB
#define FILTER_CTRL4_PIN GPIO_PIN_15
#define FILTER_CTRL6_PORT GPIOB
#define FILTER_CTRL6_PIN GPIO_PIN_13
#define FILTER_CTRL5_PORT GPIOB
#define FILTER_CTRL5_PIN GPIO_PIN_14
#define FILTER_CTRL7_PORT GPIOB
#define FILTER_CTRL7_PIN GPIO_PIN_12
#define SPI_MISO_PORT GPIOA
#define SPI_MISO_PIN GPIO_PIN_6
#define FLASH_CS_PORT GPIOB
#define FLASH_CS_PIN GPIO_PIN_0
#define FLASH_WP_PORT GPIOB
#define FLASH_WP_PIN GPIO_PIN_11
#define CLK_SRC_SELECT_2_PORT GPIOC
#define CLK_SRC_SELECT_2_PIN GPIO_PIN_13
#define CLK_SRC_SELECT_0_PORT GPIOC
#define CLK_SRC_SELECT_0_PIN GPIO_PIN_15
#define CLK_SRC_SELECT_1_PORT GPIOC
#define CLK_SRC_SELECT_1_PIN GPIO_PIN_14
#define BEEP_PORT GPIOA
#define BEEP_PIN GPIO_PIN_8
#endif
//led pc5 | 20.330769 | 40 | 0.843738 |
b11c6a1f1722d37d19049605ab5aeda0b415f39a | 3,533 | css | CSS | public/static/mobile/css/login.css | yyun543/yshop | a2b363fc9d7fde7a9c5216b91d4f3151f12a8fae | [
"MIT"
] | 1 | 2019-10-23T03:23:44.000Z | 2019-10-23T03:23:44.000Z | public/static/mobile/css/login.css | yyun543/yshop | a2b363fc9d7fde7a9c5216b91d4f3151f12a8fae | [
"MIT"
] | null | null | null | public/static/mobile/css/login.css | yyun543/yshop | a2b363fc9d7fde7a9c5216b91d4f3151f12a8fae | [
"MIT"
] | null | null | null | .login .header-wrap,.register .header-wrap{position: relative !important;border-bottom: 1px solid #e5e5e5;line-height: 80px;color: #fff;font-size: 30px;text-align: center;background: #ff8000;}
.login .header-wrap .back,.register .header-wrap .back{position: absolute;top: 0;left: 0;height: 80px;width: 80px;text-align: center;color: #666;}
.login-content{padding: 0 20px;font-size: 24px;}
.login-content .login-frame,.register-content .register-frame{padding: 20px;border-radius: 5px; background: #fff;box-shadow: 0 0 3px #ddd;}
.login-content .login-frame dl{margin: 10px 0;}
.login-content .login-frame dl dt{float: left;margin: 6px 10px 0 0;}
.login-content .login-frame dl dt label{font-size: 40px;}
.login-content .login-frame dl dd{position: relative;}
.login-content .login-frame dl dd input{width: 480px;height: 44px;padding: 8px;font-size: 24px;color: #1c1c1c;}
.login-content .login-frame dl dd input.username{border-bottom: 1px solid #e5e5e5;}
.login-content .login-frame dl dd input.password{width: 350px;}
.login-content .login-frame dl dd input.password2{width: 350px;display: none;}
.login-content .login-frame dl dd span.f-r{margin:15px 15px 0 0; }
.login-content .btn button.submit{display: block;width:600px;;height: 80px;border-radius: 5px;font-size: 30px; background: #ff8000;color: #FFF;box-shadow: 0 0 3px #ddd;}
.login-content .login-error{/* display: none; */color: #EB4E38;text-align: center;}
.login-content .login-other{padding-bottom: 50px;}
.login-content .login-other h4{margin-bottom: 10px;font-weight: normal;color: #999;}
.login-content .login-other .login-other-c{padding: 20px;border-radius: 5px;box-shadow: 0 0 3px #ddd;background: #fff;}
.login-content .login-other .login-other-c ul{padding: 30px 0;overflow: hidden;}
.login-content .login-other .login-other-c ul li{display: block;float: left;width: 185px;text-align: center;}
.login-content .login-other .login-other-c ul li .login-icon{width: 60px;height: 60px;margin: 0 auto;padding: 20px;border-radius: 50px;}
.login-content .login-other .login-other-c ul li div.weixin{background: #56af41;}
.login-content .login-other .login-other-c ul li div.weibo{background: #fd9c0f;}
.login-content .login-other .login-other-c ul li div.qq{background: #2f9bdc;}
.login-content .login-other .login-other-c ul li .login-icon span{display: block;width: 60px;height: 60px;background: url(../images/login-icon.png) no-repeat;}
.login-content .login-other .login-other-c ul li div.weibo span{background-position: 0 -60px;}
.login-content .login-other .login-other-c ul li div.qq span{background-position: 0 -120px;}
.login-content .login-other .login-other-c ul li h3{margin-top: 20px;font-size: 26px;}
.login-content .login-other .login-other-c .goto-reg{border-top: 1px solid #e5e5e5;}
.login-content .login-other .login-other-c .goto-reg a{display: block;padding: 20px 0;color: #1c1c1c;}
.login-content .login-other .login-other-c .goto-reg a label{color: #EB4E38;}
.login-content .login-other .login-other-c .goto-reg a span.f-r{margin-top: -5px;}
.login-content .login-other .login-other-c .goto-reg a span.f-r i{color: #999;font-size: 40px;}
/*切换密码显示*/
.switch-pw{position: absolute;top: 2px;right: 10px;width: 100px;height: 50px;padding: 3px;border-radius: 28px;background: #ccc;-webkit-transition: all 0.2s linear;}
.switch-pw .switch-btn{position: absolute;top: 3px;left: 3px;width: 50px;height: 50px;border-radius: 25px;background: #fff;-webkit-transition: all 0.2s linear;}
.view-pw{background: #ff8000;}
.view-pw .switch-btn{left: 53px;}
| 76.804348 | 192 | 0.74441 |
1affbf423def04965945bc26424f1b3f45f9173b | 4,283 | rs | Rust | src/rtps/structure/instance_handle.rs | lixai/lix-dds | ab5fe3e048f2d5ad12f45683618879ec05a27dff | [
"Apache-2.0"
] | 1 | 2021-11-11T12:06:32.000Z | 2021-11-11T12:06:32.000Z | src/rtps/structure/instance_handle.rs | lixai/lix-dds | ab5fe3e048f2d5ad12f45683618879ec05a27dff | [
"Apache-2.0"
] | null | null | null | src/rtps/structure/instance_handle.rs | lixai/lix-dds | ab5fe3e048f2d5ad12f45683618879ec05a27dff | [
"Apache-2.0"
] | 2 | 2021-11-04T14:10:09.000Z | 2021-11-11T12:06:42.000Z | use crate::rtps::structure::guid::GUID_t;
#[derive(Copy, Clone, Debug, PartialOrd, PartialEq, Ord, Eq)]
pub struct InstanceHandle_t {
pub value: [u8; InstanceHandle_t::SIZE],
}
impl InstanceHandle_t {
pub const SIZE: usize = 16;
pub const c_InstanceHandle_Unknown: InstanceHandle_t = InstanceHandle_t {
value: [0; InstanceHandle_t::SIZE],
};
pub fn new() -> Self {
InstanceHandle_t {
value: [0; InstanceHandle_t::SIZE],
}
}
pub fn isDefined(&self) -> bool {
for i in 0..16 {
if self.value[i] != 0 {
return true;
}
}
return false;
}
pub fn as_guid_ref(&self) -> &GUID_t {
let p = self as *const InstanceHandle_t;
let g = p as *const GUID_t;
unsafe {
return &*g;
}
}
pub const iHandle2GUID: InstanceHandle_t = InstanceHandle_t {
value: [0; InstanceHandle_t::SIZE]
};
}
fn iHandle2GUID_1(ihandle: &InstanceHandle_t) -> GUID_t {
let mut guid = GUID_t::unknown();
for i in 0..16 {
if i < 12 {
guid.guidPrefix.value[i] = ihandle.value[i];
} else {
guid.entityId.value[i - 12] = ihandle.value[i];
}
}
return guid;
}
impl FnOnce<(&InstanceHandle_t,)> for InstanceHandle_t {
type Output = GUID_t;
#[inline(always)]
extern "rust-call" fn call_once(self, args: (&InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_1.call_once(args)
}
}
impl FnMut<(&InstanceHandle_t,)> for InstanceHandle_t {
#[inline(always)]
extern "rust-call" fn call_mut(&mut self, args: (&InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_1.call_once(args)
}
}
impl Fn<(&InstanceHandle_t,)> for InstanceHandle_t {
#[inline(always)]
extern "rust-call" fn call(&self, args: (&InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_1.call_once(args)
}
}
impl From<InstanceHandle_t> for fn(&InstanceHandle_t) -> GUID_t {
fn from(_: InstanceHandle_t) -> fn(&InstanceHandle_t) -> GUID_t {
iHandle2GUID_1
}
}
fn iHandle2GUID_2(guid: &mut GUID_t, ihandle: &InstanceHandle_t) {
for i in 0..16 {
if i < 12 {
guid.guidPrefix.value[i] = ihandle.value[i];
} else {
guid.entityId.value[i - 12] = ihandle.value[i];
}
}
}
impl FnOnce<(&mut GUID_t, &InstanceHandle_t,)> for InstanceHandle_t {
type Output = ();
#[inline(always)]
extern "rust-call" fn call_once(self, args: (&mut GUID_t, &InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_2.call_once(args)
}
}
impl FnMut<(&mut GUID_t, &InstanceHandle_t,)> for InstanceHandle_t {
#[inline(always)]
extern "rust-call" fn call_mut(&mut self, args: (&mut GUID_t, &InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_2.call_once(args)
}
}
impl Fn<(&mut GUID_t, &InstanceHandle_t,)> for InstanceHandle_t {
#[inline(always)]
extern "rust-call" fn call(&self, args: (&mut GUID_t, &InstanceHandle_t,)) -> Self::Output {
iHandle2GUID_2.call_once(args)
}
}
impl From<InstanceHandle_t> for fn(&mut GUID_t, &InstanceHandle_t) {
fn from(_: InstanceHandle_t) -> fn(&mut GUID_t, &InstanceHandle_t) {
iHandle2GUID_2
}
}
impl From<&GUID_t> for InstanceHandle_t {
fn from(guid: &GUID_t) -> Self {
let mut value: [u8; InstanceHandle_t::SIZE] = [0; InstanceHandle_t::SIZE];
for i in 0..16 {
if i < 12 {
value[i] = guid.guidPrefix.value[i];
} else {
value[i] = guid.entityId.value[i - 12];
}
}
InstanceHandle_t { value }
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn guid_instance_handle_t_tests() {
let mut instance_handle_t = InstanceHandle_t::new();
instance_handle_t.value[0] = 1;
instance_handle_t.value[13] = 1;
let guid_ref = instance_handle_t.as_guid_ref();
let mut guid: GUID_t = GUID_t::unknown();
InstanceHandle_t::iHandle2GUID(&mut guid, &instance_handle_t);
assert_eq!(*guid_ref == guid, true);
guid = InstanceHandle_t::iHandle2GUID(&instance_handle_t);
assert_eq!(*guid_ref == guid, true);
}
}
| 27.811688 | 104 | 0.597478 |
53e076e2901bcf6df50d5b9e53c119298f63fe39 | 1,208 | sql | SQL | replications/Rastogi_2016/sql/level_contrib.sql | micheledinanni/Psychometric-tools-benchmark | f9074c77c2a6151051a59853c19ce79ade276da7 | [
"MIT"
] | 1 | 2019-09-27T09:57:51.000Z | 2019-09-27T09:57:51.000Z | replications/Rastogi_2016/sql/level_contrib.sql | micheledinanni/Psychometric-tools-benchmark | f9074c77c2a6151051a59853c19ce79ade276da7 | [
"MIT"
] | null | null | null | replications/Rastogi_2016/sql/level_contrib.sql | micheledinanni/Psychometric-tools-benchmark | f9074c77c2a6151051a59853c19ce79ade276da7 | [
"MIT"
] | 1 | 2019-09-27T09:58:16.000Z | 2019-09-27T09:58:16.000Z | create table high_level_contrib
select cc.user_id, group_concat(cc.cc_cont,pr.pr_cont) from
(select user_id, group_concat(body)as cc_cont from commit_comments group by user_id
having count(user_id)>=2000) as cc
inner join
(select user_id, group_concat(body)as pr_cont from pull_request_comments group by user_id
having count(user_id)>=2000)as pr
on cc.user_id=pr.user_id;
create table mid_level_contrib
select cc.user_id, group_concat(cc.cc_cont,pr.pr_cont) from
(select user_id, group_concat(body)as cc_cont from commit_comments group by user_id
having count(user_id)<2000 and count(user_id)<=500) as cc
inner join
(select user_id, group_concat(body)as pr_cont from pull_request_comments group by user_id
having count(user_id)<2000 and count(user_id)<=500)as pr
on cc.user_id=pr.user_id;
create table low_level_contrib
select cc.user_id, group_concat(cc.cc_cont,pr.pr_cont) from
(select user_id, group_concat(body)as cc_cont from commit_comments group by user_id
having count(user_id)<500 and count(user_id)>10) as cc
inner join
(select user_id, group_concat(body)as pr_cont from pull_request_comments group by user_id
having count(user_id)<2000 and count(user_id)>10)as pr
on cc.user_id=pr.user_id; | 46.461538 | 89 | 0.817881 |
d2e1622c33cb576dd69ee5ff1fedd647b8ae9c76 | 3,157 | swift | Swift | Sources/SwiftCollection/Collection/CollectionSource/CollectionSource+Implementation.swift | paulofaria/SwiftCollection | 696d086f6f47bcc3bc5c627841a673cc195faa63 | [
"MIT"
] | null | null | null | Sources/SwiftCollection/Collection/CollectionSource/CollectionSource+Implementation.swift | paulofaria/SwiftCollection | 696d086f6f47bcc3bc5c627841a673cc195faa63 | [
"MIT"
] | null | null | null | Sources/SwiftCollection/Collection/CollectionSource/CollectionSource+Implementation.swift | paulofaria/SwiftCollection | 696d086f6f47bcc3bc5c627841a673cc195faa63 | [
"MIT"
] | null | null | null | //
// Collection+Implementation.swift
// SwiftCollection
//
// Created by Bradley Hilton on 4/11/16.
// Copyright © 2016 Brad Hilton. All rights reserved.
//
#if canImport(UIKit)
import UIKit
extension CollectionSource {
// Delegate
public func shouldHighlightItemAtIndexPath(_ indexPath: IndexPath) -> Bool { return true }
public func didHighlightItemAtIndexPath(_ indexPath: IndexPath) {}
public func didUnhighlightItemAtIndexPath(_ indexPath: IndexPath) {}
public func shouldSelectItemAtIndexPath(_ indexPath: IndexPath) -> Bool { return true }
public func shouldDeselectItemAtIndexPath(_ indexPath: IndexPath) -> Bool { return true }
public func didSelectItemAtIndexPath(_ indexPath: IndexPath) {}
public func didDeselectItemAtIndexPath(_ indexPath: IndexPath) {}
public func willDisplayCell(_ cell: UICollectionViewCell, forItemAtIndexPath indexPath: IndexPath) {}
public func willDisplaySupplementaryView(_ view: UICollectionReusableView, forElementKind elementKind: String, atIndexPath indexPath: IndexPath) {}
public func didEndDisplayingCell(_ cell: UICollectionViewCell, forItemAtIndexPath indexPath: IndexPath) {}
public func didEndDisplayingSupplementaryView(_ view: UICollectionReusableView, forElementOfKind elementKind: String, atIndexPath indexPath: IndexPath) {}
public func transitionLayoutForOldLayout(_ fromLayout: UICollectionViewLayout, newLayout toLayout: UICollectionViewLayout) -> UICollectionViewTransitionLayout {
return UICollectionViewTransitionLayout(currentLayout: fromLayout, nextLayout: toLayout)
}
// Flow Layout Delegate
fileprivate var flowLayout: UICollectionViewFlowLayout {
return parent?.collectionView?.collectionViewLayout as? UICollectionViewFlowLayout ?? UICollectionViewFlowLayout()
}
public func sizeForItemAtIndexPath(_ indexPath: IndexPath) -> CGSize {
return flowLayout.itemSize
}
public func insetForSectionAtIndex(_ section: Int) -> UIEdgeInsets {
return flowLayout.sectionInset
}
public func minimumLineSpacingForSectionAtIndex(_ section: Int) -> CGFloat {
return flowLayout.minimumLineSpacing
}
public func minimumInteritemSpacingForSectionAtIndex(_ section: Int) -> CGFloat {
return flowLayout.minimumInteritemSpacing
}
public func referenceSizeForHeaderInSection(_ section: Int) -> CGSize {
return flowLayout.headerReferenceSize
}
public func referenceSizeForFooterInSection(_ section: Int) -> CGSize {
return flowLayout.footerReferenceSize
}
// Data Source
public func numberOfItemsInSection(_ section: Int) -> Int {
return 0
}
public func cellForItemAtIndexPath(_ indexPath: IndexPath) -> UICollectionViewCell {
return UICollectionViewCell()
}
public var numberOfSections: Int {
return 1
}
public func viewForSupplementaryElementOfKind(_ kind: String, atIndexPath indexPath: IndexPath) -> UICollectionReusableView {
return UICollectionReusableView()
}
}
#endif
| 38.5 | 164 | 0.737409 |
cf8b1ecd4f6e7d569a5458b4ede43161ba4906a3 | 307 | css | CSS | mods/emoji-sets/app.css | GuYith/notion-enhancer | d44ab2f87de249de29d8105d7f41b8fd0420a3ba | [
"MIT"
] | 2,299 | 2020-11-13T06:17:48.000Z | 2021-11-06T04:33:21.000Z | mods/emoji-sets/app.css | ctrl-sire/desktop | b1b1a1b725b6d2c3f3f9d2f33878d0963d41ede2 | [
"MIT"
] | 384 | 2020-11-13T03:23:31.000Z | 2021-11-05T13:53:21.000Z | mods/emoji-sets/app.css | ctrl-sire/desktop | b1b1a1b725b6d2c3f3f9d2f33878d0963d41ede2 | [
"MIT"
] | 149 | 2020-11-13T23:33:09.000Z | 2021-11-01T14:19:29.000Z | /*
* emoji sets
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) this css fix was provided by Arecsu from martyr— (https://martyr.shop/)
* under the MIT license
*/
div.notion-record-icon [style*='Apple Color Emoji'] {
display: flex;
justify-content: center;
}
| 25.583333 | 79 | 0.684039 |
766b745a015072841c4183fa558a2c654b9f5cdf | 640 | sql | SQL | scripts/compute-stats.sql | xinxian0458/impala-tpcds-kit | 0db9e3fb28ae2ba4374c6462a574782fc0de6b94 | [
"Apache-2.0"
] | 144 | 2015-02-23T12:34:16.000Z | 2022-03-20T06:23:26.000Z | scripts/compute-stats.sql | juicedata/impala-tpcds-kit | 40aaeb2eaf49962e613b490c8f59458d447f7965 | [
"Apache-2.0"
] | 24 | 2015-09-17T15:39:20.000Z | 2020-12-28T08:20:24.000Z | scripts/compute-stats.sql | juicedata/impala-tpcds-kit | 40aaeb2eaf49962e613b490c8f59458d447f7965 | [
"Apache-2.0"
] | 134 | 2015-03-09T17:11:39.000Z | 2022-03-21T10:29:42.000Z | compute stats call_center;
compute stats catalog_page;
compute stats catalog_returns;
compute stats catalog_sales;
compute stats customer_address;
compute stats customer_demographics;
compute stats customer;
compute stats date_dim;
compute stats household_demographics;
compute stats income_band;
compute stats inventory;
compute stats item;
compute stats promotion;
compute stats reason;
compute stats ship_mode;
compute stats store_returns;
compute stats store_sales;
compute stats store;
compute stats time_dim;
compute stats warehouse;
compute stats web_page;
compute stats web_returns;
compute stats web_sales;
compute stats web_site;
| 25.6 | 37 | 0.85 |
2a0ffa89c469b928264d1797b1683d984228f172 | 38 | html | HTML | test/fixtures/files/depth0/dogs.html | jhartman86/gulp-inception | 141b5b23b7d3440b6e20cd358824a72672c1b948 | [
"MIT"
] | null | null | null | test/fixtures/files/depth0/dogs.html | jhartman86/gulp-inception | 141b5b23b7d3440b6e20cd358824a72672c1b948 | [
"MIT"
] | null | null | null | test/fixtures/files/depth0/dogs.html | jhartman86/gulp-inception | 141b5b23b7d3440b6e20cd358824a72672c1b948 | [
"MIT"
] | null | null | null | <h1>Dogs</h1>
<p>are simply great</p>
| 12.666667 | 23 | 0.631579 |
e78525922f994384f21a24567c4fbbfb30bfc82c | 3,401 | js | JavaScript | packages/genesis-compiler/dist/esm/plugins/template.js | r4b3rt/genesis | b4cb8c2e6e380dbf298ee41f1f2407106d3c100d | [
"MIT"
] | null | null | null | packages/genesis-compiler/dist/esm/plugins/template.js | r4b3rt/genesis | b4cb8c2e6e380dbf298ee41f1f2407106d3c100d | [
"MIT"
] | null | null | null | packages/genesis-compiler/dist/esm/plugins/template.js | r4b3rt/genesis | b4cb8c2e6e380dbf298ee41f1f2407106d3c100d | [
"MIT"
] | null | null | null | import fs from 'fs';
import path from 'path';
import { Plugin } from '@fmfe/genesis-core';
import write from 'write';
import upath from 'upath';
import { deleteFolder } from '../utils/index';
import { minify } from 'html-minifier';
export class TemplatePlugin extends Plugin {
async beforeCompiler() {
const { ssr } = this;
deleteFolder(ssr.outputDir);
if (fs.existsSync(ssr.templateFile)) {
const text = fs.readFileSync(ssr.templateFile, 'utf-8');
write.sync(ssr.outputTemplateFile, minify(text, {
collapseInlineTagWhitespace: true,
collapseWhitespace: true,
collapseBooleanAttributes: true,
decodeEntities: true,
minifyCSS: true,
minifyJS: true,
processConditionalComments: true,
removeAttributeQuotes: false,
removeComments: false,
removeEmptyAttributes: true,
removeOptionalTags: false,
removeRedundantAttributes: true,
removeScriptTypeAttributes: false,
removeStyleLinkTypeAttributes: false,
removeTagWhitespace: false,
sortClassName: false,
trimCustomFragments: true,
useShortDoctype: true
}));
}
const outputDir = path.resolve(ssr.outputDir, './src');
const srcDir = ssr.srcDir;
const clientFilename = upath.toUnix(path.relative(outputDir, path.resolve(srcDir, './entry-client')));
const serverFilename = upath.toUnix(path.relative(outputDir, path.resolve(srcDir, './entry-server')));
const writeDistSrcTemplate = (filename, options = {}) => {
let text = fs.readFileSync(path.resolve(__dirname, `../../../template/${filename}`), 'utf8');
Object.keys(options).forEach((k) => {
const value = options[k];
text = text.replace(new RegExp(`\\\${{${k}}}`), value);
});
const outputDir = path.resolve(ssr.outputDir, './src');
write.sync(path.resolve(outputDir, filename), text);
};
writeDistSrcTemplate('entry-client.ts', {
clientFilename
});
writeDistSrcTemplate('webpack-public-path-client.ts', {
clientFilename
});
writeDistSrcTemplate('entry-server.ts', {
serverFilename
});
writeDistSrcTemplate('webpack-public-path-server.ts', {
clientFilename
});
const writeSrcTemplate = (filename) => {
const text = fs.readFileSync(path.resolve(__dirname, `../../../template/src/${filename}`), 'utf8');
const output = path.resolve(ssr.srcDir, filename);
if (fs.existsSync(output))
return false;
write.sync(output, text);
return true;
};
if (!writeSrcTemplate('entry-client.ts'))
return;
if (!writeSrcTemplate('entry-server.ts'))
return;
if (!writeSrcTemplate('app.vue'))
return;
writeSrcTemplate('shims-vue.d.ts');
}
async afterCompiler(type) {
const { ssr } = this;
if (type === 'build') {
const outputDir = path.resolve(ssr.outputDir, './src');
deleteFolder(outputDir);
}
}
}
| 40.488095 | 111 | 0.561305 |
e7138a6ccc408d3aff29f552bc05414315f191af | 2,386 | js | JavaScript | tests/integration/components/cfb-form-list-test.js | anehx/ember-caluma-form-builder | 3b80e41b3a21943b4ab129988d47d11b09c741a1 | [
"MIT"
] | 6 | 2018-08-10T11:31:49.000Z | 2021-05-29T16:21:57.000Z | tests/integration/components/cfb-form-list-test.js | anehx/ember-caluma-form-builder | 3b80e41b3a21943b4ab129988d47d11b09c741a1 | [
"MIT"
] | 60 | 2018-08-13T12:06:44.000Z | 2019-02-26T16:40:30.000Z | tests/integration/components/cfb-form-list-test.js | anehx/ember-caluma-form-builder | 3b80e41b3a21943b4ab129988d47d11b09c741a1 | [
"MIT"
] | 4 | 2018-08-10T13:49:47.000Z | 2019-02-26T10:31:18.000Z | import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, click } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import { defineProperty } from "@ember/object";
import { task } from "ember-concurrency";
module("Integration | Component | cfb-form-list", function(hooks) {
setupRenderingTest(hooks);
test("it renders blockless", async function(assert) {
assert.expect(2);
defineProperty(
this,
"data",
task(function*() {
return yield [
{ node: { id: 1, slug: "form-1", title: "Form 1" } },
{ node: { id: 2, slug: "form-2", title: "Form 2" } },
{ node: { id: 3, slug: "form-3", title: "Form 3" } },
{ node: { id: 4, slug: "form-4", title: "Form 4" } },
{ node: { id: 5, slug: "form-5", title: "Form 5" } }
];
})
);
await render(hbs`{{cfb-form-list data=data}}`);
assert.dom("[data-test-form-list]").exists();
assert.dom("[data-test-form-list-item]").exists({ count: 5 });
});
test("it displays an empty state", async function(assert) {
assert.expect(1);
defineProperty(
this,
"data",
task(function*() {
return yield [];
})
);
await render(hbs`{{cfb-form-list data=data}}`);
assert.dom("[data-test-form-list-empty]").exists();
});
test("it can trigger editing of a row", async function(assert) {
assert.expect(2);
defineProperty(
this,
"data",
task(function*() {
return yield [{ node: { id: 1, slug: "form-1" } }];
})
);
this.set("on-edit-form", () => assert.step("edit-form"));
await render(
hbs`{{cfb-form-list data=data on-edit-form=(action on-edit-form)}}`
);
await click(`[data-test-form-list-item=form-1] [data-test-edit-form]`);
assert.verifySteps(["edit-form"]);
});
test("it can trigger adding a new form", async function(assert) {
assert.expect(2);
defineProperty(
this,
"data",
task(function*() {
return yield [{ node: { slug: "" } }];
})
);
this.set("on-new-form", () => assert.step("new-form"));
await render(
hbs`{{cfb-form-list data=data on-new-form=(action on-new-form)}}`
);
await click("[data-test-new-form]");
assert.verifySteps(["new-form"]);
});
});
| 25.382979 | 75 | 0.556161 |
2cc4dbd756a6155d37dac8147112c42836c30637 | 88 | sql | SQL | sql/poll/create_poll.sql | WKHAllen/GreenPollAPI | 224bd3a1d24ef76ca49f12a9ac5ffeeb81f45c13 | [
"MIT"
] | null | null | null | sql/poll/create_poll.sql | WKHAllen/GreenPollAPI | 224bd3a1d24ef76ca49f12a9ac5ffeeb81f45c13 | [
"MIT"
] | null | null | null | sql/poll/create_poll.sql | WKHAllen/GreenPollAPI | 224bd3a1d24ef76ca49f12a9ac5ffeeb81f45c13 | [
"MIT"
] | null | null | null | INSERT INTO poll
(user_id, title, description)
VALUES
($1, $2, $3)
RETURNING *;
| 14.666667 | 33 | 0.625 |
c45338aae47d77c3fdfe9e71d4bfda6485d1fd0c | 2,654 | kt | Kotlin | src/main/kotlin/org/rust/ide/formatter/processors/RsSingleImportRemoveBracesFormatProcessor.kt | framlog/intellij-rust | 621bd9c320a323faee776bc8a3030f0d035834dd | [
"MIT"
] | null | null | null | src/main/kotlin/org/rust/ide/formatter/processors/RsSingleImportRemoveBracesFormatProcessor.kt | framlog/intellij-rust | 621bd9c320a323faee776bc8a3030f0d035834dd | [
"MIT"
] | null | null | null | src/main/kotlin/org/rust/ide/formatter/processors/RsSingleImportRemoveBracesFormatProcessor.kt | framlog/intellij-rust | 621bd9c320a323faee776bc8a3030f0d035834dd | [
"MIT"
] | null | null | null | /*
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
package org.rust.ide.formatter.processors
import com.intellij.lang.ASTNode
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiRecursiveElementVisitor
import com.intellij.psi.impl.source.codeStyle.PreFormatProcessor
import org.rust.lang.core.psi.RsElementTypes
import org.rust.lang.core.psi.RsUseGroup
import org.rust.lang.core.psi.RsUseSpeck
import org.rust.lang.core.psi.ext.elementType
/**
* Pre format processor ensuring that if an import statement only contains a single import from a crate that
* there are no curly braces surrounding it.
*
* For example the following would change like so:
*
* `use getopts::{optopt};` --> `use getopts::optopt;`
*
* While this wouldn't change at all:
*
* `use getopts::{optopt, optarg};`
*
*/
class RsSingleImportRemoveBracesFormatProcessor : PreFormatProcessor {
override fun process(element: ASTNode, range: TextRange): TextRange {
if (!shouldRunPunctuationProcessor(element)) return range
var numRemovedBraces = 0
element.psi.accept(object : PsiRecursiveElementVisitor() {
override fun visitElement(element: PsiElement) {
if (range.contains(element.textRange)) {
super.visitElement(element)
}
if (element is RsUseGroup && removeBracesAroundSingleImport(element)) {
numRemovedBraces += 2
}
}
})
return range.grown(-numRemovedBraces)
}
fun removeBracesAroundSingleImport(group: RsUseGroup): Boolean {
val (lbrace, rbrace) = group.asTrivial ?: return false
lbrace.delete()
rbrace.delete()
return true
}
}
data class TrivialUseGroup(
val lbrace: PsiElement,
val rbrace: PsiElement,
val name: String
)
val RsUseGroup.asTrivial: TrivialUseGroup?
get() {
val lbrace = lbrace
val rbrace = rbrace ?: return null
if (!(lbrace.elementType == RsElementTypes.LBRACE && rbrace.elementType == RsElementTypes.RBRACE)) {
return null
}
val speck = useSpeckList.singleOrNull() ?: return null
if (!speck.isIdentifier) return null
return TrivialUseGroup(lbrace, rbrace, speck.text)
}
private val RsUseSpeck.isIdentifier: Boolean
get() {
val path = path
if (!(path != null && path == firstChild && path == lastChild)) return false
return (path.identifier != null && path.path == null && path.coloncolon == null)
}
| 31.975904 | 108 | 0.666918 |
20158d87fffb8ada53b617cf6f61c8c56fe3c680 | 1,625 | css | CSS | SPRINT_1/_sos_educa/jogo_memoria/styles/card.css | TechDriversFatec/SOS-EDUCA | 307876950ab914e73d01607de060d790e4908268 | [
"MIT"
] | 3 | 2021-04-07T23:19:18.000Z | 2021-04-12T17:05:10.000Z | SPRINT_1/_sos_educa/jogo_memoria/styles/card.css | TechDriversFatec/SOS-EDUCA | 307876950ab914e73d01607de060d790e4908268 | [
"MIT"
] | 1 | 2020-11-25T13:28:43.000Z | 2020-11-25T13:28:43.000Z | SPRINT_1/_sos_educa/jogo_memoria/styles/card.css | TechDriversFatec/SOS-EDUCA | 307876950ab914e73d01607de060d790e4908268 | [
"MIT"
] | 9 | 2020-09-25T11:35:46.000Z | 2021-04-07T23:19:12.000Z | .jogo .card {
padding: 30px;
margin: 15px;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
width: 17vw;
height: 160px;
border-radius: 0px 30px 0px 30px;
user-select: none;
}
.jogo {
align-items: center;
padding: 10px;
/* margin: 10px; */
/* top: 24px; */
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
justify-content: center;
background-color: #3a3a3a;
}
.jogo .card img {
width: 100px;
height: 100px;
border-radius: 30px 30px 30px 30px;
}
.jogo .card,
.jogo .virado {
perspective: 1000px;
transform-style: preserve-3d;
transition: transform 0.5s;
}
.jogo .card {
background-color: #c4c4c4;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}
.card:active {
transform: scale(0.97);
transition: transform 0.2s;
}
.card.flip {
transform: rotateY(180deg);
}
.card.flip[data-nome="sapo"],
.card.flip[data-nome="sapo"] img {
background-color: #84cffa;
}
.card.flip[data-nome="vaca"],
.card.flip[data-nome="vaca"] img {
background-color: #FA8484;
}
.card.flip[data-nome="canguru"],
.card.flip[data-nome="canguru"] img {
background-color: #E984FA;
}
.card.flip[data-nome="leao"],
.card.flip[data-nome="leao"] img {
background-color: #84FAAC;
}
.card.flip[data-nome="passaro"],
.card.flip[data-nome="passaro"] img {
background-color: #8684FA;
}
.card.flip[data-nome="elefante"],
.card.flip[data-nome="elefante"] img {
background-color: #F7FA84;
}
/* novas */
.frente,
.verso {
width: 100px;
height: 100px;
padding: 15px;
position: absolute;
backface-visibility: hidden;
}
.frente {
transform: rotateY(180deg);
}
| 17.105263 | 45 | 0.657231 |
59f304489bfecaa6a9ce08895d560cfe852aea34 | 550 | asm | Assembly | programs/oeis/050/A050141.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/050/A050141.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/050/A050141.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A050141: a(n) = 2*floor((n+1)*phi) - 2*floor(n*phi) - 1 where phi = (1 + sqrt(5))/2 is the golden ratio.
; 3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3
mov $3,2
mov $4,$0
lpb $3
mov $0,$4
sub $3,1
add $0,$3
trn $0,1
seq $0,26273 ; a(n) = least k such that s(k) = n, where s = A026272.
add $0,1
mov $2,$3
mul $2,$0
add $1,$2
mov $5,$0
lpe
min $4,1
mul $4,$5
sub $1,$4
sub $1,1
mul $1,2
add $1,1
mov $0,$1
| 22 | 169 | 0.516364 |
f5047aa6b278f054921d7d10b0441d70b13fe3fe | 51 | sql | SQL | provision/config/db.sql | donofkarma/wordpress-vagrant-starkers | d1acca760192558e6d538a648fad27b091ea11ac | [
"MIT"
] | null | null | null | provision/config/db.sql | donofkarma/wordpress-vagrant-starkers | d1acca760192558e6d538a648fad27b091ea11ac | [
"MIT"
] | null | null | null | provision/config/db.sql | donofkarma/wordpress-vagrant-starkers | d1acca760192558e6d538a648fad27b091ea11ac | [
"MIT"
] | null | null | null | CREATE DATABASE IF NOT EXISTS `wordpress_default`;
| 25.5 | 50 | 0.823529 |
6b932e285a80e3cb69a7bf6073e9fd90b9c5e25b | 72 | sql | SQL | prisma/migrations/20220326044655_add_issystem_to_message/migration.sql | tilnoene/chat-back | a93fc7b3200f5aaf470fec817805d067048c79ab | [
"MIT"
] | null | null | null | prisma/migrations/20220326044655_add_issystem_to_message/migration.sql | tilnoene/chat-back | a93fc7b3200f5aaf470fec817805d067048c79ab | [
"MIT"
] | null | null | null | prisma/migrations/20220326044655_add_issystem_to_message/migration.sql | tilnoene/chat-back | a93fc7b3200f5aaf470fec817805d067048c79ab | [
"MIT"
] | null | null | null | -- AlterTable
ALTER TABLE "messages" ADD COLUMN "isSystem" BOOLEAN;
| 24 | 57 | 0.722222 |
f03314335def32a461f63cf8ab1c08e2ebee305c | 189 | js | JavaScript | src/modules/chrome/widgets/colouring.js | srijanpaul-deepsource/fallenswordhelper | 376236abe668ab6f2e78e49e041e6a74e4a1ba14 | [
"MIT"
] | 5 | 2017-07-22T01:52:20.000Z | 2021-07-04T17:19:20.000Z | src/modules/chrome/widgets/colouring.js | srijanpaul-deepsource/fallenswordhelper | 376236abe668ab6f2e78e49e041e6a74e4a1ba14 | [
"MIT"
] | 305 | 2015-05-18T20:40:40.000Z | 2022-03-31T23:20:41.000Z | src/modules/chrome/widgets/colouring.js | srijanpaul-deepsource/fallenswordhelper | 376236abe668ab6f2e78e49e041e6a74e4a1ba14 | [
"MIT"
] | 13 | 2016-07-22T12:37:27.000Z | 2022-03-06T15:19:00.000Z | import getArrayByClassName from '../../common/getArrayByClassName';
export default function colouring(parent, colourFn) {
getArrayByClassName('player-name', parent).forEach(colourFn);
}
| 31.5 | 67 | 0.783069 |
6e0b306a888b6aee65b533fb8c0e28919599e434 | 5,340 | html | HTML | src/pages/three-points.html | Mario343214420/page_demos | f05f85cb709bb24990704bb37b79b3a93bb27908 | [
"MIT"
] | null | null | null | src/pages/three-points.html | Mario343214420/page_demos | f05f85cb709bb24990704bb37b79b3a93bb27908 | [
"MIT"
] | null | null | null | src/pages/three-points.html | Mario343214420/page_demos | f05f85cb709bb24990704bb37b79b3a93bb27908 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
html, body {
margin: 0;
height: 100%;
}
canvas {
display: block;
}
</style>
</head>
<body onload="draw();">
</body>
<script src="../js/lib/three.min.js"></script>
<script src="../js/lib/stats.min.js"></script>
<script src="../js/lib/dat.gui.min.js"></script>
<script>
var renderer;
function initRender() {
renderer = new THREE.WebGLRenderer({antialias: true});
renderer.setClearColor(new THREE.Color(0x000000)); //设置背景颜色
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
}
var camera;
function initCamera() {
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 200);
camera.position.set(0, 0, 50);
}
var scene;
function initScene() {
scene = new THREE.Scene();
}
var light;
function initLight() {
scene.add(new THREE.AmbientLight(0x404040));
light = new THREE.DirectionalLight(0xffffff);
light.position.set(1, 1, 1);
scene.add(light);
}
function initModel() {
//轴辅助 (每一个轴的长度)
var object = new THREE.AxesHelper(500);
//scene.add(object);
}
//初始化性能插件
var stats;
function initStats() {
stats = new Stats();
document.body.appendChild(stats.dom);
}
//生成gui设置配置项
var controls,knot;
function initGui() {
//声明一个保存需求修改的相关数据的对象
controls = {
"radius": 13,
"tube": 1.7,
"radialSegments": 156,
"tubularSegments": 12,
"p": 3,
"q": 4,
"heightScale": 3.5,
"asParticles": false,
"rotate": false,
redraw: function () {
// 删除掉原有的模型
if (knot) scene.remove(knot);
// 创建一个环形结构
///<param name ="radius" type="float">环形结半径</param>
///<param name ="tube" type="float">环形结弯管半径</param>
///<param name ="radialSegments" type="int">环形结圆周上细分线段数</param>
///<param name ="tubularSegments" type="int">环形结弯管圆周上的细分线段数</param>
///<param name ="p" type="float">p\Q:对knot(节)状方式有效,控制曲线路径缠绕的圈数,P决定垂直方向的参数.</param>
///<param name ="q" type="float">p\Q:对knot(节)状方式有效,控制曲线路径缠绕的圈数,Q决定水平方向的参数.</param>
///<param name ="heightScale" type="float">环形结高方向上的缩放.默认值是1</param>
var geom = new THREE.TorusKnotGeometry(controls.radius, controls.tube, Math.round(controls.radialSegments), Math.round(controls.tubularSegments), Math.round(controls.p), Math.round(controls.q), controls.heightScale);
//判断绘制的模型
if (controls.asParticles) {
knot = createPointCloud(geom);
} else {
knot = createMesh(geom);
}
// 将新创建的模型添加进去
scene.add(knot);
}
};
var gui = new dat.GUI();
//将设置属性添加到gui当中,gui.add(对象,属性,最小值,最大值)gui.add(controls, 'size', 0, 10).onChange(controls.redraw);
gui.add(controls, 'radius', 0, 40).onChange(controls.redraw);
gui.add(controls, 'tube', 0, 40).onChange(controls.redraw);
gui.add(controls, 'radialSegments', 0, 400).step(1).onChange(controls.redraw);
gui.add(controls, 'tubularSegments', 1, 20).step(1).onChange(controls.redraw);
gui.add(controls, 'p', 1, 10).step(1).onChange(controls.redraw);
gui.add(controls, 'q', 1, 15).step(1).onChange(controls.redraw);
gui.add(controls, 'heightScale', 0, 5).onChange(controls.redraw);
gui.add(controls, 'asParticles').onChange(controls.redraw);
gui.add(controls, 'rotate').onChange(controls.redraw);
controls.redraw();
}
var step = 0;
function render() {
stats.update();
if (controls.rotate) {
knot.rotation.y = step += 0.01;
}
renderer.render(scene, camera);
}
// 使用canvas创建纹理
function generateSprite() {
var canvas = document.createElement('canvas');
canvas.width = 16;
canvas.height = 16;
var context = canvas.getContext('2d');
var gradient = context.createRadialGradient(canvas.width / 2, canvas.height / 2, 0, canvas.width / 2, canvas.height / 2, canvas.width / 2);
gradient.addColorStop(0, 'rgba(255,255,255,1)');
gradient.addColorStop(0.2, 'rgba(0,255,255,1)');
gradient.addColorStop(0.4, 'rgba(0,0,64,1)');
gradient.addColorStop(1, 'rgba(0,0,0,1)');
context.fillStyle = gradient;
context.fillRect(0, 0, canvas.width, canvas.height);
var texture = new THREE.Texture(canvas);
texture.needsUpdate = true;
return texture;
}
// 创建粒子系统
function createPointCloud(geom) {
var material = new THREE.PointCloudMaterial({
color: 0xffffff,
size: 3,
transparent: true,
blending: THREE.AdditiveBlending,
map: generateSprite(),
depthTest: false
});
var cloud = new THREE.Points(geom, material);
cloud.sortParticles = true;
return cloud;
}
//创建模型
function createMesh(geom) {
// 创建两面都显示的纹理
var meshMaterial = new THREE.MeshNormalMaterial({});
meshMaterial.side = THREE.DoubleSide;
// 生成模型
var mesh = THREE.SceneUtils.createMultiMaterialObject(geom, [meshMaterial]);
return mesh;
}
//窗口变动触发的函数
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
render();
renderer.setSize(window.innerWidth, window.innerHeight);
}
function animate() {
render();
//更新性能插件
stats.update();
requestAnimationFrame(animate);
}
function draw() {
initRender();
initScene();
initCamera();
initLight();
initModel();
initStats();
initGui();
animate();
window.onresize = onWindowResize;
}
</script>
</html>
| 24.054054 | 220 | 0.668352 |
125eef5327aeb1c7b10700015c0e568e63b49d63 | 1,348 | c | C | docs/examples_src/pbuf_extract.c | jbrryhooves/lwgsm | 98924cfb5008e290f15f617755bdc8ca54c9ca04 | [
"MIT"
] | 130 | 2020-07-15T01:12:52.000Z | 2022-03-24T09:34:57.000Z | docs/examples_src/pbuf_extract.c | jbrryhooves/lwgsm | 98924cfb5008e290f15f617755bdc8ca54c9ca04 | [
"MIT"
] | 31 | 2020-08-05T12:43:08.000Z | 2022-03-21T10:21:08.000Z | docs/examples_src/pbuf_extract.c | jbrryhooves/lwgsm | 98924cfb5008e290f15f617755bdc8ca54c9ca04 | [
"MIT"
] | 57 | 2018-02-09T10:49:30.000Z | 2019-12-05T08:35:38.000Z | const void* data;
size_t pos, len;
lwgsm_pbuf_p a, b, c;
const char str_a[] = "This is one long";
const char str_a[] = "string. We want to save";
const char str_a[] = "chain of pbufs to file";
/* Create pbufs to hold these strings */
a = lwgsm_pbuf_new(strlen(str_a));
b = lwgsm_pbuf_new(strlen(str_b));
c = lwgsm_pbuf_new(strlen(str_c));
/* Write data to pbufs */
lwgsm_pbuf_take(a, str_a, strlen(str_a), 0);
lwgsm_pbuf_take(b, str_b, strlen(str_b), 0);
lwgsm_pbuf_take(c, str_c, strlen(str_c), 0);
/* Connect pbufs together */
lwgsm_pbuf_chain(a, b);
lwgsm_pbuf_chain(a, c);
/*
* pbuf a now contains chain of b and c together
* and at this point application wants to print (or save) data from chained pbuf
*
* Process pbuf by pbuf with code below
*/
/*
* Get linear address of current pbuf at specific offset
* Function will return pointer to memory address at specific position
* and `len` will hold length of data block
*/
pos = 0;
while ((data = lwgsm_pbuf_get_linear_addr(a, pos, &len)) != NULL) {
/* Custom process function... */
/* Process data with data pointer and block length */
process_data(data, len);
printf("Str: %.*s", len, data);
/* Increase offset position for next block */
pos += len;
}
/* Call free only on a pbuf. Since it is chained, b and c will be freed too */
lwgsm_pbuf_free(a);
| 28.083333 | 80 | 0.688427 |
015a0ac5c71bd1d99d1ec8db59a466b5521d34a8 | 2,968 | lua | Lua | dev/spark/gamemode/hookwars/game.lua | chrisinajar/spark | 3c6b30592c00bc38738cc3aaca2144edfc6cc8b2 | [
"AML"
] | 2 | 2020-08-20T03:40:24.000Z | 2021-02-07T20:31:43.000Z | dev/spark/gamemode/hookwars/game.lua | chrisinajar/spark | 3c6b30592c00bc38738cc3aaca2144edfc6cc8b2 | [
"AML"
] | null | null | null | dev/spark/gamemode/hookwars/game.lua | chrisinajar/spark | 3c6b30592c00bc38738cc3aaca2144edfc6cc8b2 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | require "scripts.info";
require "scripts.core.unit"
Require("CommonCheatCodes")
Game={}
function Game:OnActivate (gameMode)
self.gameMode = gameMode
Debug.Log("Game:OnActivate()")
Debug.Log("gamemode is " .. self.gameMode);
if( self:IsAuthoritative() ) then
GameManagerRequestBus.Broadcast.CreateUnitWithJson("bard",'{ "team":"left" }');
GameManagerRequestBus.Broadcast.CreateUnitWithJson("bard",'{ "team":"right"}');
end
self.unitsHandler = UnitsNotificationBus.Connect(self);
self.commandHandler = ConsoleNotificationBus.Connect(self);
self.variableFilter = VariableManagerNotificationBus.Connect(self);
Debug.Log("connected to filter")
end
function Game:OnDeactivate()
Debug.Log("Game:OnDeactivate()")
self.unitsHandler:Disconnect()
self.commandHandler:Disconnect()
self.variableFilter:Disconnect()
end
function Game:OnSetValueFilter(id,value)
if self.wtf == true then
if(id.variableId == "mana") then
FilterResult(FilterResult.FILTER_PREVENT);
end
if(id.variableId == "cooldown_timer") then
FilterResult(FilterResult.FILTER_PREVENT);
end
end
end
function Game:AddTimer(seconds, description)
self.timerHandler = self.timerHandler or {}
local ticket=TimerRequestBus.Broadcast.ScheduleTimer(seconds,description)
local handler=TimerNotificationBus.Connect(self,ticket)
table.insert(self.timerHandler, handler)
end
function Game:OnUnitSpawned(unitId)
local unit = Unit({entityId=unitId})
Debug.Log("Game:OnUnitSpawned"..tostring(unitId));
AudioRequestBus.Broadcast.PlaySound("Play_sfx_respawn");
local info = GetUnitInfo(unitId);
local tags=vector_Crc32();
tags:push_back(Crc32("spawn"));
if(info and info.team) then
Debug.Log("unit's team is : "..info.team)
tags:push_back(Crc32(info.team));
else
return;
end
local spawn = GameManagerRequestBus.Broadcast.GetEntitiesHavingTags(tags);
if spawn and #spawn>=1 then
Debug.Log("Game:OnUnitSpawned relocating the unit to the spawn")
spawn = spawn[1];
local new_pos = TransformBus.Event.GetWorldTranslation(spawn)
unit:SetPosition(new_pos)
else
Debug.Log("Game:OnUnitSpawned spawn not found")
end
end
function Game:OnUnitDeath(unitId)
Debug.Log("Game:OnUnitDeath");
--using the timer we only can pass a string.
--for now there is no way to create a entityId from a string, so we need to do it like that
self.deadUnits = self.deadUnits or {}
table.insert(self.deadUnits,unitId)
self:AddTimer(4,tostring(unitId))
end
function Game:OnTimerFinished(description)
Debug.Log("OnTimerFinished "..description)
for i=1,#self.deadUnits do
if( tostring(self.deadUnits[i]) == description) then
local unit = Unit({entityId=self.deadUnits[i]})
--UnitRequestBus.Event.SetAlive(self.deadUnits[i],true)
unit:SetAlive(true)
unit:SetValue("hp_percentage", 1);
unit:SetValue("mana_percentage", 1);
break;
end
end
end
function Game:OnCommandFilter(cmd)
return CommonCheatCodes(self,cmd)
end
return Game; | 23.935484 | 92 | 0.753369 |
05770a9f2ad8d59898d9f701669c55935c1fbb0b | 4,611 | rb | Ruby | recipes/install.rb | shahashutosh/mongodb | 067c810c57958518f78b3e7870884eb3dce03055 | [
"Apache-2.0"
] | null | null | null | recipes/install.rb | shahashutosh/mongodb | 067c810c57958518f78b3e7870884eb3dce03055 | [
"Apache-2.0"
] | null | null | null | recipes/install.rb | shahashutosh/mongodb | 067c810c57958518f78b3e7870884eb3dce03055 | [
"Apache-2.0"
] | null | null | null | if node['mongodb']['install_method'] == "10gen" or node.run_list.recipes.include?("mongodb::10gen_repo") then
include_recipe "mongodb::10gen_repo"
end
# prevent-install defaults, but don't overwrite
file node['mongodb']['sysconfig_file'] do
content "ENABLE_MONGODB=no"
group node['mongodb']['root_group']
owner "root"
mode 0644
action :create_if_missing
end
# just-in-case config file drop
template node['mongodb']['dbconfig_file'] do
cookbook node['mongodb']['template_cookbook']
source node['mongodb']['dbconfig_file_template']
group node['mongodb']['root_group']
owner "root"
mode 0644
action :create_if_missing
end
# and we install our own init file
if node['mongodb']['apt_repo'] == "ubuntu-upstart" then
init_file = File.join(node['mongodb']['init_dir'], "#{node['mongodb']['default_init_name']}.conf")
else
init_file = File.join(node['mongodb']['init_dir'], "#{node['mongodb']['default_init_name']}")
end
template init_file do
cookbook node['mongodb']['template_cookbook']
source node['mongodb']['init_script_template']
group node['mongodb']['root_group']
owner "root"
mode "0755"
variables({
:provides => "mongod"
})
action :create_if_missing
end
packager_opts = ""
case node['platform_family']
when "debian"
# this options lets us bypass complaint of pre-existing init file
# necessary until upstream fixes ENABLE_MONGOD/DB flag
packager_opts = '-o Dpkg::Options::="--force-confold"'
when "rhel"
# Add --nogpgcheck option when package is signed
# see: https://jira.mongodb.org/browse/SERVER-8770
packager_opts = "--nogpgcheck"
end
if(node[:mongodb][:package_version] && node[:mongodb][:package_version].to_f <= 2.4)
# As part of MongoDB's "10gen" to "mongodb-org" transition they declared
# their 2.4 10gen packages obsolete. This means everything automatically gets
# upgraded to the new mognodb-org 2.6 packages automatically. To prevent this
# from happening, exclude all the new "mongodb-org" 2.6 packages if we were
# explicitly trying to install 2.4.
packager_opts << " --exclude='mongodb-org*'"
# On systems that were accidentally upgraded to 2.6, uninstall the 2.6
# packages so then the 2.4 packages can be reinstalled properly.
uninstall_packages = [
"mongodb-org",
"mongodb-org-mongos",
"mongodb-org-server",
"mongodb-org-shell",
"mongodb-org-tools",
]
uninstall_packages.each do |package_name|
package(package_name) do
action :remove
end
end
end
# The mongo-10gen-server package depends on mongo-10gen, but doesn't specify a
# version. So to prevent the server from being upgraded without the client
# being upgraded, also explicitly install the mongo-10gen with the
# package_version specified.
if(node[:mongodb][:package_name] == "mongo-10gen-server")
package "mongo-10gen" do
options packager_opts
action :install
version node[:mongodb][:package_version]
end
elsif(node[:mongodb][:package_name] == "mongodb-org-server")
package "mongodb-org" do
options packager_opts
action :install
version node[:mongodb][:package_version]
end
end
# FIXME: For working around Chef vs package issues. See FIXME below.
if(node[:platform_family] == "rhel")
package "yum-plugin-tsflags"
# FIXME: Don't run the yum post-installation scripts when upgrading Mongo.
# This is due to a few issues with how this chef package installs things (by
# relying on a custom init.d and sysconfig files) and the fact that Opscode's
# RPMs will overwrite those and restart immediately during the upgrade
# process. By not running the yum scripts after an upgrade, Mongo won't get
# restarted in a broken state.
#
# This should all be cleaned up and probably not necessary if the Chef
# cookbook starts to use the conf files instead of sysconfig, to better match
# what Mongo installs by default from the RPMs:
# https://github.com/edelight/chef-mongodb/pull/136
# https://github.com/edelight/chef-mongodb/pull/139
intalled = `rpm -qa | grep "#{node[:mongodb][:package_name]}"`
if($?.exitstatus == 0)
packager_opts << " --tsflags=noscripts"
end
end
# install
package node[:mongodb][:package_name] do
options packager_opts
action :install
version node[:mongodb][:package_version]
end
# Create keyFile if specified
if node[:mongodb][:key_file_content] then
file node[:mongodb][:config][:keyFile] do
owner node[:mongodb][:user]
group node[:mongodb][:group]
mode "0600"
backup false
content node[:mongodb][:key_file_content]
end
end
| 33.904412 | 109 | 0.712861 |
9696dabdc1af157be2c83c3a1c3bfbfbb80ae46e | 7,143 | html | HTML | 500H/ijs.0.64009-0-001.pbm/results/phylotree/001.hocr.html | ContentMine/ijsem | 1235b5eab144ff152ea0ae21570f3323c3b8e57c | [
"CC0-1.0"
] | 1 | 2015-09-14T19:11:29.000Z | 2015-09-14T19:11:29.000Z | 500H/ijs.0.64009-0-001.pbm/results/phylotree/001.hocr.html | ContentMine/ijsem | 1235b5eab144ff152ea0ae21570f3323c3b8e57c | [
"CC0-1.0"
] | 3 | 2015-08-28T11:31:39.000Z | 2015-09-15T06:49:26.000Z | 500H/ijs.0.64009-0-001.pbm/results/phylotree/001.hocr.html | ContentMine/ijsem | 1235b5eab144ff152ea0ae21570f3323c3b8e57c | [
"CC0-1.0"
] | null | null | null | <body xmlns="http://www.w3.org/1999/xhtml"><div class="ocr_page" id="page_1" title="image "/Users/pm286/workspace/ami-plugin/../ijsem/500H/ijs.0.64009-0-001.pbm/image/ijs.0.64009-0-001.pbm.png"; bbox 0 0 1656 858; ppageno 0"><div id="block_1_1" title="bbox 116 5 564 819" class="block"><p class="ocr_par" dir="ltr" id="par_1" title="bbox 145 5 564 819"><span class="ocr_line" id="line_1" title="bbox 518 5 560 25"><span>100</span></span><span class="ocr_line" id="line_2" title="bbox 445 28 488 48"><span>100</span></span><span class="ocr_line" id="line_3" title="bbox 198 130 427 167"><span>80</span><span>76</span></span><span class="ocr_line" id="line_4" title="bbox 158 230 300 253"><span>as</span><span>94</span></span><span class="ocr_line" id="line_5" title="bbox 352 263 380 284"><span>93</span></span><span class="ocr_line" id="line_6" title="bbox 392 293 422 314"><span>68</span></span><span class="ocr_line" id="line_7" title="bbox 425 396 467 417"><span>100</span></span><span class="ocr_line" id="line_8" title="bbox 485 421 514 442"><span>83</span></span><span class="ocr_line" id="line_9" title="bbox 245 452 274 473"><span>72</span></span><span class="ocr_line" id="line_10" title="bbox 196 478 225 499"><span>35</span></span><span class="ocr_line" id="line_11" title="bbox 164 516 193 536"><span>23</span></span><span class="ocr_line" id="line_12" title="bbox 208 593 237 614"><span>42</span></span><span class="ocr_line" id="line_13" title="bbox 145 621 174 643"><span>53</span></span><span class="ocr_line" id="line_14" title="bbox 480 653 522 674"><span>100</span></span><span class="ocr_line" id="line_15" title="bbox 191 689 221 710"><span>40</span></span><span class="ocr_line" id="line_16" title="bbox 253 734 296 755"><span>100</span></span><span class="ocr_line" id="line_17" title="bbox 382 772 425 793"><span>100</span></span><span class="ocr_line" id="line_18" title="bbox 536 798 564 819"><span>99</span></span></p></div><div id="block_2_2" title="bbox 572 318 615 339" class="block"><p class="ocr_par" dir="ltr" id="par_2" title="bbox 572 318 615 339"><span class="ocr_line" id="line_19" title="bbox 572 318 615 339"><span>100</span></span></p></div><div id="block_3_3" title="bbox 691 2 1654 855" class="block"><p class="ocr_par" dir="ltr" id="par_3" title="bbox 691 2 1654 855"><span class="ocr_line" id="line_20" title="bbox 730 2 1251 31"><span>S.</span><span>mitis</span><span>CIP</span><span>1033357</span><span>(AF535188.</span><span>295909)</span></span><span class="ocr_line" id="line_21" title="bbox 730 36 1351 65"><span>S.</span><span>pneumoniae</span><span>CIP</span><span>1029117(DQ232477.</span><span>295914)</span></span><span class="ocr_line" id="line_22" title="bbox 703 70 1234 99"><span>S.</span><span>oralis</span><span>CIP</span><span>1029227</span><span>(AF535168.</span><span>295911)</span></span><span class="ocr_line" id="line_23" title="bbox 743 105 1357 134"><span>8.</span><span>australis</span><span>CIP</span><span>1071677</span><span>(DQ132983.</span><span>DQ132987)</span></span><span class="ocr_line" id="line_24" title="bbox 747 139 1390 168"><span>S.</span><span>parasanguinis</span><span>CIP</span><span>1043727</span><span>(DQ132985.</span><span>Z95913)</span></span><span class="ocr_line" id="line_25" title="bbox 850 173 1481 203"><span>S.</span><span>massiliensis</span><span>44018257</span><span>(AY769998.</span><span>AY769999)</span></span><span class="ocr_line" id="line_26" title="bbox 797 208 1408 237"><span>S.</span><span>sinensis</span><span>CIP</span><span>1074807</span><span>(DQ232458.</span><span>DQ232560)</span></span><span class="ocr_line" id="line_27" title="bbox 794 242 1368 271"><span>S.</span><span>sanguinis</span><span>CIP</span><span>55.1287</span><span>(AF535170.</span><span>Z95918)</span></span><span class="ocr_line" id="line_28" title="bbox 753 279 1305 306"><span>S.</span><span>gordonii</span><span>CIP</span><span>103221</span><span>(AY770001.</span><span>299189)</span></span><span class="ocr_line" id="line_29" title="bbox 747 311 1310 341"><span>8.</span><span>gordonii</span><span>CIP</span><span>1052587</span><span>(AY770002.</span><span>295905)</span></span><span class="ocr_line" id="line_30" title="bbox 790 346 1380 375"><span>S.</span><span>anginosus</span><span>CIP</span><span>1029217</span><span>(AF535183.</span><span>Z95895)</span></span><span class="ocr_line" id="line_31" title="bbox 841 380 1449 409"><span>S.</span><span>intermedius</span><span>CIP</span><span>1032487</span><span>(AF535190.</span><span>Z95908)</span></span><span class="ocr_line" id="line_32" title="bbox 773 415 1625 444"><span>S.</span><span>constellatus</span><span>subsp.</span><span>constellatus</span><span>CIP</span><span>1032477</span><span>(AF535184.</span><span>Z95897)</span></span><span class="ocr_line" id="line_33" title="bbox 820 449 1374 478"><span>S.</span><span>mutans</span><span>CIP</span><span>1032207</span><span>(AF535167)</span><span>Z95910)</span></span><span class="ocr_line" id="line_34" title="bbox 952 483 1519 512"><span>S.</span><span>ferus</span><span>CIP</span><span>1032257</span><span>(AY770000.</span><span>DQ132986)</span></span><span class="ocr_line" id="line_35" title="bbox 802 517 1392 546"><span>S.</span><span>agalactiae</span><span>CIP</span><span>1032277</span><span>(AF535182.</span><span>Z95893)</span></span><span class="ocr_line" id="line_36" title="bbox 1002 551 1560 580"><span>S.</span><span>downei</span><span>CIP</span><span>1032227</span><span>(DQ132984.</span><span>295899)</span></span><span class="ocr_line" id="line_37" title="bbox 780 586 1293 614"><span>S.</span><span>suis</span><span>CIP</span><span>1032177</span><span>(AF535171.</span><span>295920)</span></span><span class="ocr_line" id="line_38" title="bbox 795 620 1362 648"><span>S.</span><span>pyogenes</span><span>CIP</span><span>56.417</span><span>(DQ232491.</span><span>295915)</span></span><span class="ocr_line" id="line_39" title="bbox 691 653 1271 682"><span>3.</span><span>salivarius</span><span>CIP</span><span>1025037</span><span>(AF535169.</span><span>Z95916)</span></span><span class="ocr_line" id="line_40" title="bbox 738 688 1362 717"><span>S.</span><span>thermophilus</span><span>CIP</span><span>1023037</span><span>(AY567833.</span><span>Z95921)</span></span><span class="ocr_line" id="line_41" title="bbox 788 722 1654 751"><span>S.</span><span>gallolyticus</span><span>subsp.</span><span>gallolyticus</span><span>CIP</span><span>1054287</span><span>(AY315154.</span><span>AJ297183)</span></span><span class="ocr_line" id="line_42" title="bbox 778 757 1338 786"><span>S.</span><span>equinus</span><span>CIP</span><span>1025047</span><span>(AF535187.</span><span>Z95903)</span></span><span class="ocr_line" id="line_43" title="bbox 794 791 1643 820"><span>S.</span><span>infantarius</span><span>subsp.</span><span>infantarius</span><span>CIP</span><span>1032337</span><span>(AY315155.</span><span>AJ297184)</span></span><span class="ocr_line" id="line_44" title="bbox 1001 828 1518 855"><span>Enterococcus</span><span>faecalis</span><span>V583</span><span>(NC_004668)</span></span></p></div></div></body> | 7,143 | 7,143 | 0.705866 |
9bed9831ce3b5be508f6e341d51ee2223edc5f21 | 92 | js | JavaScript | public/home/js/isLogin.js | xiaorun121/tp5 | a584e0604b9faeb5aa7a235f9465eed729c6aafc | [
"Apache-2.0"
] | null | null | null | public/home/js/isLogin.js | xiaorun121/tp5 | a584e0604b9faeb5aa7a235f9465eed729c6aafc | [
"Apache-2.0"
] | null | null | null | public/home/js/isLogin.js | xiaorun121/tp5 | a584e0604b9faeb5aa7a235f9465eed729c6aafc | [
"Apache-2.0"
] | null | null | null | $(function(){
if(!isLogin()){
window.location.href = "/index/index/login";
}
}) | 18.4 | 52 | 0.543478 |
6e304b77dfe61dcc23ed320c3825a8e7042efe17 | 20,526 | html | HTML | _Seletor/ChekingSeletor/cheking.html | LucasAugustoNeves/Site-Necon1.5 | 63f40fc8b06db0a9374ce6c4e6ca498aa7cc562c | [
"MIT"
] | null | null | null | _Seletor/ChekingSeletor/cheking.html | LucasAugustoNeves/Site-Necon1.5 | 63f40fc8b06db0a9374ce6c4e6ca498aa7cc562c | [
"MIT"
] | null | null | null | _Seletor/ChekingSeletor/cheking.html | LucasAugustoNeves/Site-Necon1.5 | 63f40fc8b06db0a9374ce6c4e6ca498aa7cc562c | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>NEcon Contabilidade --- SelecionarCondominio</title>
<meta name="descrição" content="NEcon Contabilidade a 28 Anos no mercado de Bombinhas e região" />
<meta name="palavras-chave"
content="Contabilidade, Bombinhas, Condominios, INSS, Imposto de Renda, Bombas, Contabilidade, Barato, Melhor, Aluguel de Verão" />
<meta name="autor" content="Lucas augusto Neves" />
<meta name="copyright" content="Lucas Augusto Neves" />
<meta name="robôs" content="index, siga" />
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.css'>
<link rel="stylesheet" href="style1.css">
<link rel="stylesheet" href="./selectd.css">
</head>
<body>
<!-- partial:index.partial.html -->
<h1>Selecione seu Condominio</h1>
<section class="contact-wrap">
<select id="link" type="text" name="Condominiodata" class="js-select2">
<option value="http://www.necon.com.br">DIGITE O NOME DO CONDOMÍNIO:</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/149_976/menu.html">CONDOMINIO RESIDENCIAL AMARILIS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/78_98/menu.html">CONDOMINIO ED. RES. BELLANI</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/60_820/menu.html">CONDOMINIO EDIFICIO COSTA DO SOL
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/95_332/menu.html">CONDOMINIO ED. RES. DANTE ALIGUIERI
BLOCO B</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/285_379/menu.html">CONDOMINIO EDIFICIO ELILIANE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/291_431/menu.html">CONDOMINIO RESIDENCIAL ENCOSTA
DOURADA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/192_366/menu.html">CONDOMINIO RESIDENCIAL FIORE DEL MAR
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/110_864/menu.html">CONDOMINIO EDIFICIO CONDOMINIO GREEN
HOUSE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/112_548/menu.html">CONDOMINIO EDIFICIO GUARAPARI
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/74_570/menu.html">CONDOMINIO RESIDENCIAL HEINZ VAHLDIEK
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/147_909/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
LAELIA PURPURATA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/400_933/menu.html">CONDOMINIO PANORÂMICO BOMBINHAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/200_211/menu.html">CONDOMINIO EDIFICIO SHANAM</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/13_528/menu.html">CONDOMINIO ED. VICTOR HUGO II
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/101_873/menu.html">CONDOMINIO RESIDENCIAL VIRGILIO DELL
AGNOLO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/190_520/menu.html">CONDOMINIO ED. RES. COSTA BRAVA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/93_575/menu.html">CONDOMINIO EDIFICIO DON JUAN</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/380_574/menu.html">CONDOMINIO ED. RES. FLOR DA MANHÃ
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/53_834/menu.html">CONDOMINIO RESIDENCIAL DAS QUATRO
ILHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/123_855/menu.html">CONDOMINIO RESIDENCIAL ACAPULCO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/21_398/menu.html">CONDOMINIO ED. RES. DANTE ALIGUIERI
BLOCO A</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/390_307/menu.html">CONDOMINIO RESIDENCIAL PANORAMA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/118_681/menu.html">CONDOMINIO ED. RESIDENCIAL SHANGRILA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/20_677/menu.html">CONDOMINIO ED. VICTOR HUGO I</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/245_693/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
ESTRELA DO MAR II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/85_491/menu.html">CONDOMINIO RESIDENCIAL LARISSA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/133_450/menu.html">CONDOMINIO RESIDENCIAL BOMBAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/120_515/menu.html">CONDOMINIO ED. ILHA DE BALI</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/410_541/menu.html">CONDOMINIO RES.CHARLOTTA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/160_113/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
ORLANDO TOBALDINI</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/124_270/menu.html">CONDOMINIO EDIFICIO GRUTA AZURRA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/144_876/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
PARADISO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/145_357/menu.html">CONDOMINIO RES. KARINA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/155_816/menu.html">CONDOMINIO RESIDENCIAL ALBERTINO
ANGELO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/135_336/menu.html">CONDOMINIO RESIDENCIAL BRISAS DO MAR
(BOMBAS)</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/126_626/menu.html">CONDOMINIO EDIFICIO ILHA DAS PALMAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/105_154/menu.html">CONDOMINIO EDF. RESIDENCIAL MAGGIORE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/115_88/menu.html">CONDOMINIO EDF. MIRANTE DO MAR APART
HOTEL</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/106_253/menu.html">CONDOMINIO RESIDENCIAL OCTACILIO
COSTA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/140_36/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
BEIJA-FLOR II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/411_442/menu.html">ASS. DE MORADORES DO COND. RES.
MARIA MADALENA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/413_460/menu.html">CONDOMINIO RESIDENCIAL ALBERTINO
ANGELO II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/414_833/menu.html">CONDOMINIO EDIFICIO CAMILA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/416_552/menu.html">CONDOMINIO RESIDENCIAL RUFINO S DE
ANDRADE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/417_584/menu.html">CONDOMINIO EDIFICIO MORADAS DA
COLINA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/418_484/menu.html">CAMBOIM (MARCELO NEVES)</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/419_847/menu.html">CONDOMINIO RESIDENCIAL MARBELLA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/420_497/menu.html">CONDOMINIO RESIDENCIAL SANTIAGO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/422_792/menu.html">CONDOMINIO RESIDENCIAL ILHA DO MEL
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/425_871/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
ENCANTO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/426_364/menu.html">CONDOMINIO RESIDENCIAL BARRA MARES
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/427_740/menu.html">CONDOMINIO RESIDENCIAL ALGAS
MARINHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/429_287/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL NONA
MARTA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/430_711/menu.html">CONDOMINIO ED. FRAGATA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/431_325/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
MARISA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/432_461/menu.html">CONDOMINIO ED. RES. PATRICIA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/436_331/menu.html">CONDOMINIO RESIDENCIAL ROSANE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/437_249/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
BESENELLO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/438_733/menu.html">CONDOMINIO RESIDENCIAL ARAGUAIA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/440_648/menu.html">CONDOMINIO ED. PRAIA DE FORA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/443_372/menu.html">CONDOMINIO RESIDENCIAL PORTO PEDRA
II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/444_854/menu.html">CONDOMINIO RESIDENCIAL MORRO DA
PEDRA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/446_679/menu.html">ASS. DOS ADQ. DE UN. COND. RES.
BORBOLETA DO MAR</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/447_322/menu.html">CONDOMINIO ED. MORADAS DO BOSQUE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/448_857/menu.html">CONDOMINIO SOLAR DAS ILHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/450_517/menu.html">CONDOMINIO RESIDENCIAL VILLA FIRENZE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/451_481/menu.html">CONDOMINIO RESIDENCIAL FREDERICO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/453_578/menu.html">CONDOMINIO RESIDENCIAL AURORA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/454_605/menu.html">CONDOMINIO RESIDENCIAL GABRIELA
ZANCANARO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/455_851/menu.html">CONDOMINIO ED. RES. IOLANDA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/456_324/menu.html">CONDOMINIO ED. RESIDENCIAL JARDIM
QUATRO ILHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/459_242/menu.html">CONDOMINIO ED. NECON CENTRO
EXECUTIVO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/461_246/menu.html">CONDOMINIO RESIDENCIAL LAS CONDES
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/463_410/menu.html">CONDOMINIO ED. RES. ILHA DO ARVOREDO
II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/464_295/menu.html">ASS. DOS MORADORES DO COND. RES.
BAIA AZUL BLOCO C</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/465_745/menu.html">CONDOMINIO RESIDENCIAL VISTA BELA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/468_42/menu.html">CONDOMINIO RESIDENCIAL VIDA MANSA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/469_206/menu.html">CONDOMINIO RESIDENCIAL VIAPIANA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/471_846/menu.html">CONDOMINIO RESIDENCIAL SAGITARIUS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/472_925/menu.html">CONDOMINIO ED. RES. ALAMEDA VERDE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/474_929/menu.html">CONDOMINIO RESIDENCIAL MARISTELA G.
FERREIRA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/475_687/menu.html">CONDOMINIO BOULEVARD BOMBINHAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/477_569/menu.html">CONDOMINIO PETIT VILLAGE RESIDENCE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/478_79/menu.html">CONDOMINIO ED. AREIA BRANCA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/479_44/menu.html">CONDOMINIO RESIDENCIAL MORADAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/483_544/menu.html">CONDOMINIO ED. PARADISE MARISCAL
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/484_755/menu.html">CONDOMINIO ED. RES. AGUAS DE MARÇO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/485_188/menu.html">CONDOMINIO RESIDENCIAL EGIDIO
PINHEIRO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/486_311/menu.html">CONDOMINIO PALM BEACH</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/487_471/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
PORTOFINO II</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/490_450/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
RIOMAGGIORE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/491_390/menu.html">CONDOMINIO VILA QUATRO ILHAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/492_271/menu.html">CONDOMINIO EDIFICIO MORADA QUATRO
ILHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/493_965/menu.html">CONDOMINIO RESIDENCIAL CORES DO
MARISCAL</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/494_319/menu.html">CONDOMINIO RESIDENCIAL GRËN GARTEN
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/495_880/menu.html">CONDOMINIO EDF. RESIDENCIAL RAVENNA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/497_714/menu.html">CONDOMINIO EDIFICIO RES. SOLAR DO
CANTO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/499_110/menu.html">CONDOMINIO RESIDENCIAL AQUARIUS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/500_472/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL
PORTOPEDRA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/501_822/menu.html">CONDOMINIO PUNTA BLÚ MALL BOUTIQUE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/502_459/menu.html">CONDOMINIO PUNTA BLU RESIDENCE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/503_727/menu.html">CONDOMINIO RESIDENCIAL BAIA DOURADA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/504_318/menu.html">CONDOMINIO RESIDENCIAL SIGNUS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/505_262/menu.html">CONDOMINIO EDIFICIO COSTA DO SOL
RESIDENCE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/506_895/menu.html">CONDOMINIO EDIFICIO DON JUAN
RESIDENCE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/507_126/menu.html">CONDOMINIO RESIDENCIAL VARANDAS DO
ATLANTICO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/508_582/menu.html">CONDOMINIO EDF. COSTA AZUL RESIDENCE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/510_316/menu.html">CONDOMINIO RESIDENCIAL ITALY
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/511_259/menu.html">CONDOMINIO RESIDENCIAL DONA ELIDA
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/512_143/menu.html">CONDOMINIO EDF. COSTA BRAVA
RESIDENCE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/513_291/menu.html">CONDOMINIO COSTA BELLA RESIDENCE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/514_527/menu.html">CONDOMINIO EDIFICIO COSTA MEXICANA
RESIDENCE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/515_214/menu.html">CONDOMINIO RESIDENCIAL AGUAS AZUIS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/516_715/menu.html">CONDOMINIO RESIDENCIAL FLORES DE
VENERANDA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/517_808/menu.html">CONDOMINIO RESIDENCIAL VARADERO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/518_962/menu.html">CONDOMINIO EDF. COSTA E CASAGRANDE
RESIDENCE</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/519_929/menu.html">CONDOMINIO RESIDENCIAL BRISAS DO MAR
(QUATRO ILHAS)</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/521_854/menu.html">CONDOMINIO EDIFICIO MAGUELLI
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/522_928/menu.html">CONDOMINIO RESIDENCIAL CANTO GRANDE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/523_52/menu.html">CONDOMINIO EDIFICIO RESIDENCIAL PORTO
MADERO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/524_304/menu.html">CONDOMINIO ED. RES. ILHA DAS GALES
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/525_108/menu.html">CONDOMINIO RESIDENCIAL MAR DE BELIZE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/526_826/menu.html">CONDOMINIO RESIDENCIAL VILLA
PARADISO</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/529_878/menu.html">CONDOMINIO ED. BAYSIDE BEACH
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/530_293/menu.html">CONDOMINIO RESIDENCIAL HESS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/532_378/menu.html">CONDOMINIO RESIDENCIAL ATHENAS
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/533_547/menu.html">CONDOMINIO BAYRON BEACH RESIDENCE
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/534_572/menu.html">LA ROSADITA - ASS. DOS MOR. DA RUA
BIGUA 336</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/540_939/menu.html">CONDOMINIO RESIDENCIAL VILLAGE ECO
PARK</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/541_924/menu.html">CONDOMINIO VILA MALLORCA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/542_79/menu.html">ASS. DE MORADORES DO RESIDENCIAL
FLORENZA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/544_434/menu.html">CONDOMINIO RESIDENCIAL POSITANO
</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/545_204/menu.html">CONDOMINIO VILLA LUNA</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/548_242/menu.html">CONDOMINIO MANCHESTER</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/550_540/menu.html">CONDOMINIO EDIFICIO AION SUITES
BOMBINHAS</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/552_2176/menu.html">CONDOMINIO RESIDENCIAL ILHA DE SANTORINI</option>
</select>
<option value="http://www.necon.com.br/documentos/NCWINDOC/553_130932/menu.html">CONDOMINIO ENSEADA DOS GALEOES</option>
<option value="http://www.necon.com.br/documentos/NCWINDOC/558_9812897/menu.html">CONDOMINIO ENSEADA DOS GALEOES</option>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('#link').on('change', function () {
var url = $(this).val();
if (url) {
window.open(url, '_self');
}
return false;
});
});
</script>
</section>
<!-- partial -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.full.js'></script>
<script src="./script.js"></script>
</body>
</html>
| 66.427184 | 135 | 0.717675 |
0ee970ebacd0e2922372c61e66a20715c4127746 | 1,261 | h | C | src/models/companhia.h | Outbreak-AFA/banco-imobiliario | 867d6281d52d29b07510f83595898ea56e19a501 | [
"MIT"
] | 1 | 2022-02-04T01:41:21.000Z | 2022-02-04T01:41:21.000Z | src/models/companhia.h | Outbreak-AFA/banco-imobiliario | 867d6281d52d29b07510f83595898ea56e19a501 | [
"MIT"
] | 15 | 2020-10-30T20:50:21.000Z | 2020-12-04T09:44:00.000Z | src/models/companhia.h | DhellionFena/banco-imobiliario | 867d6281d52d29b07510f83595898ea56e19a501 | [
"MIT"
] | null | null | null | typedef struct {
double cobranca;
int posicao;
string nome;
} COMPANHIA;
COMPANHIA criar_companhia(string nome, int posicao) {
COMPANHIA c;
c.nome = nome;
c.posicao = posicao;
c.cobranca = 200000.0;
return c;
}
void buildCompanhias(vector<COMPANHIA> &companhias) {
COMPANHIA c;
c = criar_companhia("COMPANHIA DE TELEFONE", 6);
companhias.push_back(c);
c = criar_companhia("COMPANHIA DE AGUA", 11);
companhias.push_back(c);
c = criar_companhia("COMPANHIA DE LUZ", 20);
companhias.push_back(c);
c = criar_companhia("COMPANHIA DE MINERACAO", 27);
companhias.push_back(c);
}
COMPANHIA getCompanhia(vector<PLAYER> &players, vector<COMPANHIA> &companhias) {
for (int i = 0; i < companhias.size(); i++) {
if (companhias.at(i).posicao == players.front().celula){
return companhias.at(i);
}
}
}
void pagar_companhia(vector<PLAYER> &players, COMPANHIA companhia) {
cout << players.front().nome << " esta na "<< companhia.nome << endl;
Sleep(1000);
players.front().carteira -= companhia.cobranca;
cout << "Player " << players.front().nome << " pagou $ " << companhia.cobranca << " por ter passado nessa companhia"<< endl;
cout << endl;
} | 28.659091 | 128 | 0.642347 |
86c08ce396181433968c9c0ca73ec300b8419d79 | 334 | sql | SQL | tools/git-pg-diff.sql | technowledgy/pgdev | 69e67c6681611afb8209348690cdb00f5a771586 | [
"MIT"
] | 1 | 2022-03-16T10:49:29.000Z | 2022-03-16T10:49:29.000Z | tools/git-pg-diff.sql | technowledgy/pgdev | 69e67c6681611afb8209348690cdb00f5a771586 | [
"MIT"
] | 1 | 2022-02-19T11:24:54.000Z | 2022-02-19T11:24:54.000Z | tools/git-pg-diff.sql | technowledgy/pg_dev | 69e67c6681611afb8209348690cdb00f5a771586 | [
"MIT"
] | null | null | null | \set QUIET on
\t on
\pset pager 0
create extension postgres_fdw;
create extension git;
select git.status(relname)
from pg_class
where relkind='f'
and relnamespace = 'local'::regnamespace
-- TODO: array fks need to be joined to base tables as arrays
and relname not in ('pg_ts_config_map')
order by relname;
| 22.266667 | 68 | 0.712575 |
4e86ccc897008575ea8ae8fe43aea6fb1a05b0f4 | 874 | swift | Swift | PixabaySearch/Pixabay/Model/PixabayImage.swift | seigo-pon/PixabaySearch | a6a06c35b7a703304b87dc0b578240f93a317893 | [
"MIT"
] | null | null | null | PixabaySearch/Pixabay/Model/PixabayImage.swift | seigo-pon/PixabaySearch | a6a06c35b7a703304b87dc0b578240f93a317893 | [
"MIT"
] | null | null | null | PixabaySearch/Pixabay/Model/PixabayImage.swift | seigo-pon/PixabaySearch | a6a06c35b7a703304b87dc0b578240f93a317893 | [
"MIT"
] | null | null | null | //
// PixabayImage.swift
// FaceImageCrop
//
// Created by ueda seigo on 2018/01/19.
// Copyright © 2018年 snowrobin. All rights reserved.
//
import Foundation
import ObjectMapper
class PixabayImage: Mappable {
@objc dynamic var type = ""
@objc dynamic var previewURL = ""
@objc dynamic var webformatURL = ""
@objc dynamic var views = 0
@objc dynamic var downloads = 0
@objc dynamic var favorites = 0
@objc dynamic var user = ""
@objc dynamic var userImageURL = ""
required init?(map: Map) {
}
func mapping(map: Map) {
type <- map["type"]
previewURL <- map["previewURL"]
webformatURL <- map["webformatURL"]
views <- map["views"]
downloads <- map["downloads"]
favorites <- map["favorites"]
user <- map["user"]
userImageURL <- map["userImageURL"]
}
}
| 23 | 53 | 0.601831 |
791d83a0cb113874cbd339b170ab5f3e06768bcc | 1,133 | kt | Kotlin | src/main/kotlin/me/rustamov/DeprecatedHandlerProxyConfigurator.kt | binali-rustamov/corona-disinfector-kotlin-livedemo | f6505e53a846b679c254306973e5981ede783291 | [
"MIT"
] | 1 | 2020-05-18T09:11:12.000Z | 2020-05-18T09:11:12.000Z | src/main/kotlin/me/rustamov/DeprecatedHandlerProxyConfigurator.kt | binali-rustamov/corona-disinfector-kotlin-livedemo | f6505e53a846b679c254306973e5981ede783291 | [
"MIT"
] | null | null | null | src/main/kotlin/me/rustamov/DeprecatedHandlerProxyConfigurator.kt | binali-rustamov/corona-disinfector-kotlin-livedemo | f6505e53a846b679c254306973e5981ede783291 | [
"MIT"
] | null | null | null | package me.rustamov
import net.sf.cglib.proxy.Enhancer
import java.lang.reflect.Method
import java.lang.reflect.Proxy
class DeprecatedHandlerProxyConfigurator : ProxyConfigurator {
override fun replaceWithProxyIfNeeded(obj: Any, implClass: Class<*>): Any {
val annotation = implClass.getAnnotation(Deprecated::class.java) ?: return obj
if (implClass.interfaces.any()) return Proxy.newProxyInstance(implClass.classLoader, implClass.interfaces)
{ _, method, args -> getInvocationHandlerLogic(method, args, obj, annotation, implClass) }
return Enhancer.create(implClass, object : net.sf.cglib.proxy.InvocationHandler {
override fun invoke(proxy: Any, method: Method, args: Array<out Any>): Any? =
getInvocationHandlerLogic(method, args, obj, annotation, implClass)
})
}
private fun getInvocationHandlerLogic(
method: Method,
args: Array<out Any>?,
obj: Any,
annotation: Deprecated,
implClass: Class<*>
): Any? {
println("${annotation.message} : $implClass")
return method.invoke(obj)
}
} | 37.766667 | 114 | 0.681377 |
8d73477fa800bbd8ec26b1b6af23e9a05274f018 | 268 | kt | Kotlin | tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/abstracts/InlineQuery.kt | eboshare/TelegramBotAPI | fcd8f20a9030658fb52c2975638892a1272029e4 | [
"Apache-2.0"
] | null | null | null | tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/abstracts/InlineQuery.kt | eboshare/TelegramBotAPI | fcd8f20a9030658fb52c2975638892a1272029e4 | [
"Apache-2.0"
] | null | null | null | tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/abstracts/InlineQuery.kt | eboshare/TelegramBotAPI | fcd8f20a9030658fb52c2975638892a1272029e4 | [
"Apache-2.0"
] | null | null | null | package dev.inmo.tgbotapi.types.InlineQueries.abstracts
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
@Deprecated("Replaced", ReplaceWith("InlineQuery", "dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery"))
typealias InlineQuery = InlineQuery
| 38.285714 | 110 | 0.835821 |
0b975c6ddf1a134fa942ba06d2fe6a39b749365f | 6,435 | py | Python | pdsensorvis/sensors/models.py | mickeykkim/masters-project-sphere | 6dbe0be877058e647f5e3822932e5a70f181bb53 | [
"MIT"
] | 2 | 2019-10-05T20:59:41.000Z | 2019-11-01T20:25:39.000Z | pdsensorvis/sensors/models.py | mickeykkim/masters-project-sphere | 6dbe0be877058e647f5e3822932e5a70f181bb53 | [
"MIT"
] | 6 | 2019-10-24T12:28:02.000Z | 2021-08-09T09:56:26.000Z | pdsensorvis/sensors/models.py | mickeykkim/masters-project-sphere | 6dbe0be877058e647f5e3822932e5a70f181bb53 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from django.contrib.auth.models import User
from django.utils import timezone
import uuid
ANNOTATION = (
('asm', 'Asymmetry'),
('dst', 'Dystonia'),
('dsk', 'Dyskensia'),
('ebt', 'En Bloc Turning'),
('str', 'Short Stride Length'),
('mov', 'Slow/Hesitant Movement'),
('pos', 'Stooped Posture'),
('trm', 'Tremor'),
('oth', 'Other/Activity')
)
FRAME_RATES = (
('NTSC_Film', 23.98),
('Film', 24),
('PAL', 25),
('NTSC', 29.97),
('Web', 30),
('PAL_HD', 50),
('NTSC_HD', 59.94),
('High', 60),
)
class PatientData(models.Model):
id = models.AutoField(primary_key=True)
first_name = models.CharField(max_length=50, help_text='Patient first name')
last_name = models.CharField(max_length=50, help_text='Patient last name')
date_of_birth = models.DateField(help_text='Patient date of birth')
notes = models.CharField(max_length=500, help_text='Notes regarding patient')
class Meta:
ordering = ['last_name']
permissions = (("can_alter_patientdata", "Can create or edit patient data entries."),)
def get_absolute_url(self):
return reverse('patientdata-detail', args=[str(self.id)])
def __str__(self):
return f'{self.last_name}, {self.first_name}'
class WearableData(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, help_text='Unique ID for this wearable data')
patient = models.ForeignKey('PatientData', on_delete=models.CASCADE, null=True, related_name='wearables')
filename = models.FileField(upload_to='wearable/', help_text='Wearable data file')
time = models.DateTimeField(help_text='Session date & time')
note = models.CharField(max_length=500, help_text='Note regarding wearable data')
class Meta:
ordering = ['patient', '-time']
permissions = (("can_alter_wearabledata", "Can create or edit wearable data entries."),)
def get_absolute_url(self):
return reverse('wearabledata-detail', args=[str(self.id)])
def __str__(self):
return f'{self.patient} ({self.time})'
class CameraData(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, help_text='Unique ID for this wearable data')
patient = models.ForeignKey('PatientData', on_delete=models.CASCADE, null=True, related_name='cameras')
filename = models.FileField(upload_to='camera/', help_text='Camera video file')
framerate = models.CharField(
max_length=9,
choices=FRAME_RATES,
default='Film',
help_text='Video framerate',
)
time = models.DateTimeField(help_text='Session date & time')
note = models.CharField(max_length=500, help_text='Note regarding camera data')
class Meta:
ordering = ['patient', '-time']
permissions = (("can_alter_cameradata", "Can create or edit camera data entries."),)
def get_absolute_url(self):
return reverse('cameradata-detail', args=[str(self.id)])
def __str__(self):
return f'{self.patient} ({self.time})'
def get_user_annotations(self):
return self.c_annotations.filter(annotator=User)
class WearableAnnotation(models.Model):
id = models.AutoField(primary_key=True)
wearable = models.ForeignKey('WearableData', on_delete=models.CASCADE, null=True, related_name='w_annotations')
frame_begin = models.PositiveIntegerField()
frame_end = models.PositiveIntegerField()
annotator = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
annotation = models.CharField(
max_length=3,
choices=ANNOTATION,
default='oth',
help_text='PD Symptom',
)
note = models.CharField(max_length=500, help_text='Note regarding annotation', null=True, blank=True)
class Meta:
ordering = ['frame_begin']
permissions = (("can_alter_wearableannotation", "Can create or edit wearable annotations."),)
def get_absolute_url(self):
return reverse('wearableannotation-detail', args=[str(self.wearable.id), str(self.id)])
def __str__(self):
return f'{self.wearable} - ({self.frame_begin}-{self.frame_end}) - {self.get_annotation_display()}'
class CameraAnnotation(models.Model):
id = models.AutoField(primary_key=True)
camera = models.ForeignKey('CameraData', on_delete=models.CASCADE, null=True, related_name='c_annotations')
time_begin = models.CharField(max_length=11, help_text='hh:mm:ss:ff')
time_end = models.CharField(max_length=11, help_text='hh:mm:ss:ff')
annotator = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
annotation = models.CharField(
max_length=3,
choices=ANNOTATION,
default='oth',
help_text='PD Symptom',
)
note = models.CharField(max_length=500, help_text='Note regarding annotation', null=True, blank=True)
class Meta:
ordering = ['camera', 'time_begin']
permissions = (("can_alter_cameraannotation", "Can create or edit camera annotations."),)
def get_absolute_url(self):
return reverse('cameraannotation-detail', args=[str(self.camera.id), str(self.id)])
def __str__(self):
return f'{self.camera} - ({self.time_begin}-{self.time_end}) - {self.get_annotation_display()}'
class CameraAnnotationComment(models.Model):
id = models.AutoField(primary_key=True)
annotation = models.ForeignKey('CameraAnnotation', on_delete=models.CASCADE, related_name='comments')
author = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
timestamp = models.DateTimeField(default=timezone.now)
text = models.TextField()
class Meta:
ordering = ['annotation', 'timestamp']
permissions = (("can_alter_cameraannotation_comment", "Can create or edit camera annotation comments."),)
def __str__(self):
return self.text
class WearableDataPoint(models.Model):
id = models.AutoField(primary_key=True)
wearable = models.ForeignKey('WearableData', on_delete=models.CASCADE, null=True, related_name='data_point')
frame = models.PositiveIntegerField()
magnitude = models.FloatField()
class Meta:
ordering = ['frame']
permissions = (("can_alter_wearabledata_point", "Can create or edit wearable data point."),)
def __str__(self):
return f'{self.wearable.id} - ({self.frame}, {self.magnitude})'
| 37.631579 | 116 | 0.685004 |
6c2de207ae79ca63d29e3cf9184afe0c97a457ce | 303 | kt | Kotlin | common/src/main/kotlin/dev/inmo/micro_utils/common/Dimensions.kt | InsanusMokrassar/MicroUtils | d2314422f1e53c4e7eb43fb61557c0687f45c45f | [
"Apache-2.0"
] | 8 | 2020-11-12T04:23:03.000Z | 2022-03-14T18:38:56.000Z | common/src/main/kotlin/dev/inmo/micro_utils/common/Dimensions.kt | InsanusMokrassar/MicroUtils | d2314422f1e53c4e7eb43fb61557c0687f45c45f | [
"Apache-2.0"
] | 11 | 2020-10-22T10:41:25.000Z | 2021-11-05T15:56:00.000Z | common/src/main/kotlin/dev/inmo/micro_utils/common/Dimensions.kt | InsanusMokrassar/MicroUtils | d2314422f1e53c4e7eb43fb61557c0687f45c45f | [
"Apache-2.0"
] | null | null | null | @file:Suppress("NOTHING_TO_INLINE")
package dev.inmo.micro_utils.common
import android.content.res.Resources
inline fun Resources.getSp(
resId: Int
) = getDimension(resId) / displayMetrics.scaledDensity
inline fun Resources.getDp(
resId: Int
) = getDimension(resId) * displayMetrics.density
| 21.642857 | 54 | 0.778878 |
388917e1be5d13a9f292bbddbc0dbb84fddc0484 | 2,227 | h | C | uoj_judger/include/ex_testlib.h | SOJdevelopers/SOJ-judger | 3bf6cfc2a59e609aa3b5fb890cbbbe2e5cad4465 | [
"MIT"
] | 1 | 2021-05-16T06:47:11.000Z | 2021-05-16T06:47:11.000Z | uoj_judger/include/ex_testlib.h | SOJdevelopers/SOJ-judger | 3bf6cfc2a59e609aa3b5fb890cbbbe2e5cad4465 | [
"MIT"
] | null | null | null | uoj_judger/include/ex_testlib.h | SOJdevelopers/SOJ-judger | 3bf6cfc2a59e609aa3b5fb890cbbbe2e5cad4465 | [
"MIT"
] | null | null | null | #ifndef _TESTLIB_H_
#include "testlib.h"
#endif
#ifndef _EX_TESTLIB_H
#define _EX_TESTLIB_H
int __testlib_ancestor(int x, std::vector <int> &p) {return p[x] == x ? x : (p[x] = __testlib_ancestor(p[x], p));}
std::set < std::pair <int, int> > readTree(InStream &in, int vertex, int weight_min = -1, int weight_max = -1) {
int i, u, v;
std::set < std::pair <int, int> > E;
if (weight_min > weight_max)
__testlib_fail("readTree(const Istream &in, int vertex, int weight_min, int weight_max): weight_min must be less than or equal to weight_max");
std::vector <int> p;
for (i = 0; i <= vertex; ++i) p.push_back(i);
for (i = 1; i < vertex; ++i) {
u = in.readInt(1, vertex, "u[" + vtos(i) + "]"); if (in.strict) in.readSpace();
v = in.readInt(1, vertex, "v[" + vtos(i) + "]");
if (__testlib_ancestor(u, p) == __testlib_ancestor(v, p))
in.quitf(_wa, "Tree can't contain cycles. [Edge #%d: (%d, %d)]", i, u, v);
if (~weight_min && ~weight_max) {
if (in.strict) in.readSpace();
in.readInt(weight_min, weight_max, "w[" + vtos(i) + "]");
}
p[p[u]] = p[v];
E.insert(std::pair <int, int> (u, v));
E.insert(std::pair <int, int> (v, u));
if (in.strict) in.readEoln();
}
}
std::set < std::pair <int, int> > readGraph(InStream &in, int vertex, int edge, int weight_min = -1, int weight_max = -1) {
int i, u, v;
if (weight_min > weight_max)
__testlib_fail("readGraph(const Istream &in, int vertex, int edge, int weight_min, int weight_max): weight_min must be less than or equal to weight_max");
std::set < std::pair <int, int> > E;
for (i = 1; i <= edge; ++i) {
u = in.readInt(1, vertex, "u[" + vtos(i) + "]"); if (in.strict) in.readSpace();
v = in.readInt(1, vertex, "v[" + vtos(i) + "]");
if (u == v)
in.quitf(_wa, "Graph can't contain loops. [Edge #%d: (%d, %d)]", i, u, v);
if (E.find(std::pair <int, int> (u, v)) != E.end())
in.quitf(_wa, "Graph can't contain multiple edges. [Edge #%d: (%d, %d)]", i, u, v);
E.insert(std::pair <int, int> (u, v));
E.insert(std::pair <int, int> (v, u));
if (~weight_min && ~weight_max) {
if (in.strict) in.readSpace();
in.readInt(weight_min, weight_max, "w[" + vtos(i) + "]");
}
if (in.strict) in.readEoln();
}
return E;
}
#endif
| 40.490909 | 156 | 0.598563 |
1bc1397950bf500cd3c8a5a07077d8e97dfa1b9b | 563 | asm | Assembly | oeis/017/A017302.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/017/A017302.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/017/A017302.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A017302: a(n) = (10*n + 2)^10.
; 1024,61917364224,26559922791424,1125899906842624,17080198121677824,144555105949057024,839299365868340224,3743906242624487424,13744803133596058624,43438845422363213824,121899441999475713024,310584820834420916224,730463141542791783424,1605976966052654874624,3333369396234118349824,6583182266716099969024,12449449430074295092224,22661281678134344679424,39876210495294203290624,68078861925529707085824,113113305642107341825024,183382804125988210868224,290756708973467203175424,451730952053751361306624
mul $0,10
add $0,2
pow $0,10
| 80.428571 | 499 | 0.898757 |
1047dccaf0349b40266b375012b080c8b64a488d | 1,139 | kt | Kotlin | app/src/main/java/com/theone/music/ui/fragment/DownloadFragment.kt | Theoneee/HiFiNi | ca1d3dc7a7a0244bbad461d1eb0840ddf6de8770 | [
"Apache-2.0"
] | 3 | 2022-01-08T02:13:00.000Z | 2022-01-10T09:17:52.000Z | app/src/main/java/com/theone/music/ui/fragment/DownloadFragment.kt | Theoneee/HiFiNi | ca1d3dc7a7a0244bbad461d1eb0840ddf6de8770 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/theone/music/ui/fragment/DownloadFragment.kt | Theoneee/HiFiNi | ca1d3dc7a7a0244bbad461d1eb0840ddf6de8770 | [
"Apache-2.0"
] | null | null | null | package com.theone.music.ui.fragment
import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import com.theone.music.data.model.Download
import com.theone.music.data.model.DownloadResult
import com.theone.music.ui.adapter.DownloadAdapter
import com.theone.music.viewmodel.DownloadViewModel
import com.theone.mvvm.ext.qmui.setTitleWitchBackBtn
// ┏┓ ┏┓
//┏┛┻━━━┛┻┓
//┃ ┃
//┃ ━ ┃
//┃ ┳┛ ┗┳ ┃
//┃ ┃
//┃ ┻ ┃
//┃ ┃
//┗━┓ ┏━┛
// ┃ ┃ 神兽保佑
// ┃ ┃ 永无BUG!
// ┃ ┗━━━┓
// ┃ ┣┓
// ┃ ┏┛
// ┗┓┓┏━┳┓┏┛
// ┃┫┫ ┃┫┫
// ┗┻┛ ┗┻┛
/**
* @author The one
* @date 2022-04-08 16:56
* @describe 我的下载
* @email 625805189@qq.com
* @remark
*/
class DownloadFragment:BasePagerFragment<DownloadResult, DownloadViewModel>() {
override fun initView(root: View) {
super.initView(root)
setTitleWitchBackBtn("我的下载")
}
override fun createAdapter(): BaseQuickAdapter<DownloadResult, *> = DownloadAdapter()
override fun onItemClick(adapter: BaseQuickAdapter<*, *>, view: View, position: Int) {
}
} | 23.729167 | 90 | 0.578578 |
fed9ccc1b7bab84f3cc3841344ea0023ff467678 | 13,715 | html | HTML | app/www/js3.html | jlalogin/boot0815 | b3a8ab4f2e2aaa260605157b0672455ec790e985 | [
"Apache-2.0"
] | null | null | null | app/www/js3.html | jlalogin/boot0815 | b3a8ab4f2e2aaa260605157b0672455ec790e985 | [
"Apache-2.0"
] | null | null | null | app/www/js3.html | jlalogin/boot0815 | b3a8ab4f2e2aaa260605157b0672455ec790e985 | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/site.min.gz.css">
</head>
<body>
<header><nav><a href="index.html"><h1>Intuit Front End Bootcamp</h1></a></nav></header>
<h2>Javascript</h2>
<h3>Module Pattern</h3>
<!-- insert html code here -->
<script>
"use strict";
window.RunConfig = (function() {
return {
employee: false,
account: false,
props: false,
uithread: true,
};
})();
window.Intuit = (function() {
var intuit = {};
function inherits(parent, child) {
child.prototype = Object.create(parent.prototype);
child.prototype.constructor = child;
child.prototype._super = parent;
}
function extend(superEntity, options) {
var
defaults = {},
initialize = null;
if(options) {
if(options.defaults) {
defaults = options.defaults;
delete options.defaults;
}
if(options.initialize) {
initialize = options.initialize;
delete options.initialize;
}
}
function Entity(options) {
if(!options) {
options = {};
}
for(var prop in defaults) {
if(!options.hasOwnProperty(prop)) {
options[prop] = defaults[prop];
}
}
Entity.prototype._super.call(this, options);
initialize && initialize.call(this);
}
inherits(superEntity, Entity);
for(var prop in options) {
Entity.prototype[prop] = options[prop];
}
Entity.extend = function(options) {
return extend(Entity, options);
};
return Entity;
};
// model
function Model(options) {
this.attributes = options || {};
}
inherits(Events, Model);
Model.prototype.get = function(propName) {
return this.attributes[propName];
};
Model.prototype.set = function(propName, propValue) {
var eventData = {};
eventData[propName] = {
oldValue: this.attributes[propName],
newValue: propValue
};
this.attributes[propName] = propValue;
this.trigger("change", eventData);
};
Model.extend = function(options) {
return extend(Model, options);
};
// collection
function Collection(options) {
this.models = (options && options.models) || [];
options && (delete options.models);
}
inherits(Events, Collection);
Collection.prototype.add = function(model) {
this.models.push(model);
};
Collection.prototype.forEach = function(fn) {
this.models.forEach(fn);
}
Collection.extend = function(options) {
return extend(Collection, options);
}
// events
function Events() {
}
Events.prototype.trigger = function(eventName, eventData) {
if(this.events && this.events[eventName]) {
this.events[eventName].forEach(function(eventHandler) {
eventHandler(eventData);
});
}
};
Events.prototype.on = function(eventName, eventHandler) {
if(!this.events) {
this.events = {};
}
if(!this.events[eventName]) {
this.events[eventName] = [];
}
this.events[eventName].push(eventHandler);
};
// facade
intuit.Model = Model;
intuit.Collection = Collection;
intuit.Events = Events;
return intuit;
})();
// inline runner, employee demo
window.RunConfig.employee &&
(function() {
var Person = Intuit.Model.extend({
initialize: function() {
this.set("addresses", []);
},
addAddress: function(street, city, state, zipCode) {
this.get("addresses").push({
street: street,
city: city,
state: state,
zipCode: zipCode
});
},
getFullName: function() {
return this.get("firstName") + ", " + this.get("lastName");
}
});
var p1 = new Person({
firstName: "First",
lastName: "Last"
});
var IntuitEmployee = Person.extend({
defaults: {
firstName: "John",
lastName: "Doe",
empId: "000",
age: 0
},
getEmpInfo: function() {
return this.get("empId") + ", " + this.get("firstName") + ", " + this.get("lastName");
}
})
var ip1 = new IntuitEmployee({
empId: "123",
firstName: "Michael",
lastName: "Jordan",
age: 54
});
ip1.addAddress("1600 Pennsylvania Ave.", "Washington", "DC", "10000");
console.dir(p1);
console.dir(ip1);
var ip2 = new IntuitEmployee({
empId: "234",
firstName: "Kenny",
lastName: "Smith",
age: 48
});
ip2.addAddress("123 Oak Lane", "Martha's Vineyard", "MA", "20000");
// collection
var IntuitEmployees = Intuit.Collection.extend({
getMailingList: function() {
this.forEach(function(emp) {
var address = emp.get("addresses")[0];
console.log(address.street + " " + address.city + " " + address.state + ", " + address.zipCode);
console.log(emp.getEmpInfo());
});
}
});
var emps = new IntuitEmployees({ models: [ip1, ip2] });
console.dir(emps);
emps.getMailingList();
// events
ip1.on("change", function(data) {
console.log("employee changed");
console.dir(data);
});
ip1.set("age", 55);
})();
// inline runner, account demo
window.RunConfig.account &&
(function() {
// base account type
var Account = Intuit.Model.extend({
defaults: {
balance: 0,
transactions: new Intuit.Collection()
},
// add transaction of type, amount
addTransaction: function(data) {
if(data.transaction_type == Account.TRANSACTION_TYPE_WITHDRAW) {
var state = this.withdraw(data);
if(state) {
this.get("transactions").add({
type: Account.TRANSACTION_TYPE_WITHDRAW,
balance: state.new_balance
});
}
return state;
}
else if (data.transaction_type == Account.TRANSACTION_TYPE_DEPOSIT) {
var state = this.deposit(data);
this.get("transactions").add({
type: Account.TRANSACTION_TYPE_DEPOSIT,
balance: state.new_balance
});
return state;
}
else {
// poop
throw new Error("unsupported transaction: " + data.transaction_type);
}
},
// just add
deposit: function(data) {
this.set("balance", this.get("balance") + data.amount);
return { new_balance: this.get("balance") };
},
// just subtract
withdraw: function(data) {
this.set("balance", this.get("balance") - data.amount);
return { new_balance: this.get("balance") };
},
// current balance
getBalance: function() {
return this.get("balance");
}
});
// statics
Account.TRANSACTION_TYPE_WITHDRAW = 'withdraw';
Account.TRANSACTION_TYPE_DEPOSIT = 'deposit';
// checking acct type
var CheckingAccount = Account.extend();
// savings acct type
var SavingsAccount = Account.extend({
defaults: {
withdrawals: 0
},
// savings specific withdrawals
withdraw: function(data) {
if(this.get("withdrawals") < SavingsAccount.TRANSACTION_WITHDRAWAL_LIMIT) {
this.set("balance", this.get("balance") - data.amount);
this.set("withdrawals", this.get("withdrawals") + 1);
return { new_balance: this.get("balance"), total_withdrawals: this.get("withdrawals"), max_withdrawals: SavingsAccount.TRANSACTION_WITHDRAWAL_LIMIT };
}
else {
// poop
// throw new Error("too many withdrawals");
this.trigger(SavingsAccount.EVT_MAX_WITHDRAWALS_EXCEEDED, {
balance: this.get("balance"),
withdrawals: this.get("withdrawals"),
max_withdrawals: SavingsAccount.TRANSACTION_WITHDRAWAL_LIMIT
});
}
}
});
// arbitrary savings specific limit
SavingsAccount.TRANSACTION_WITHDRAWAL_LIMIT = 6;
SavingsAccount.EVT_MAX_WITHDRAWALS_EXCEEDED = 'err_mwe';
// set up some objects
var starting_balance = 100;
var starting_withdrawals = 0;
var chk_acct = new CheckingAccount({
balance: starting_balance
});
var sav_acct = new SavingsAccount({
withdrawals: starting_withdrawals,
balance: starting_balance
});
console.dir(chk_acct);
console.dir(sav_acct);
sav_acct.on(SavingsAccount.EVT_MAX_WITHDRAWALS_EXCEEDED, function(evt_data) {
console.log('Max Withdrawal Exceeded Event');
console.dir(evt_data);
});
// run some methods
var num_chk_transactions = 5;
var num_sav_transactions = 5;
for(var i=0; i<num_chk_transactions; i++) {
chk_acct.addTransaction({transaction_type: Account.TRANSACTION_TYPE_DEPOSIT, amount: 1});
chk_acct.addTransaction({transaction_type: Account.TRANSACTION_TYPE_WITHDRAW, amount: 1});
}
for(var i=0; i<num_sav_transactions; i++) {
// sav_acct.addTransaction({transaction_type: Account.TRANSACTION_TYPE_DEPOSIT, amount: 1});
sav_acct.addTransaction({transaction_type: Account.TRANSACTION_TYPE_WITHDRAW, amount: 1});
}
})();
// property descriptors
window.RunConfig.props &&
(function() {
var o = {};
o.name = "John La";
Object.defineProperty(o, "firstName", {
__proto__: null,
enumerable: false, // [false], allows for var in
configurable: true, // [false], type can be changed for prop deleted
// value: "John", // [undefined]
// writable: true, // [false], changable with assignment operator
set: function(value) {
console.log('set:', value);
this._firstName = value;
},
get: function() {
console.log('get:', this._firstName);
return this._firstName;
}
});
o.firstName = 'John';
console.dir(o);
})();
// uithread, digest loop, 2-ways data binding is an antipattern (its cpu intensive)
window.RunConfig.uithread &&
(function() {
var fn1 = function() {
setTimeout(function() {
fn2();
}, 0);
console.log(1);
};
var fn2 = function() {
console.log(2);
};
var fn3 = function() {
console.log(3);
};
fn1();
fn3();
})();
</script>
</body>
</html>
| 31.528736 | 174 | 0.441706 |
12b4cdfc7c18ebacde671b1d640a36292aef6681 | 1,006 | h | C | TankWars/Source/TankWars/Public/TankPlayerController.h | AlexanderJDupree/TankWars | ceca6acafff548d7471cb940122684eff39625da | [
"Unlicense"
] | null | null | null | TankWars/Source/TankWars/Public/TankPlayerController.h | AlexanderJDupree/TankWars | ceca6acafff548d7471cb940122684eff39625da | [
"Unlicense"
] | null | null | null | TankWars/Source/TankWars/Public/TankPlayerController.h | AlexanderJDupree/TankWars | ceca6acafff548d7471cb940122684eff39625da | [
"Unlicense"
] | null | null | null | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Tank.h"
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "TankPlayerController.generated.h" // Must be last include
/**
*
*/
UCLASS()
class TANKWARS_API ATankPlayerController : public APlayerController
{
GENERATED_BODY()
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
ATank* GetControlledTank() const;
UPROPERTY(EditAnywhere)
float CrossHairXLocation = 0.5;
UPROPERTY(EditAnywhere)
float CrossHairYLocation = 0.33333;
UPROPERTY(EditAnywhere)
float LineTraceRange = 1000000.0;
private:
void AimTowardsCrosshair();
// Return an OUT parameter, true if hit landscape
bool GetSightRayHitLocation(FVector &HitLocation) const;
bool GetLookDirection(FVector2D ScreenLocation, FVector &LookDirection) const;
bool GetLookVectorHitLocation(FVector LookDirection, FVector &HitLocation) const;
};
| 21.404255 | 82 | 0.77833 |
259e133b87721e017e51ff3ac8c04e90022f000e | 231 | lua | Lua | MMOCoreORB/bin/scripts/object/custom_content/tangible/food/generic/drink_vayerbok.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 18 | 2017-02-09T15:36:05.000Z | 2021-12-21T04:22:15.000Z | MMOCoreORB/bin/scripts/object/custom_content/tangible/food/generic/drink_vayerbok.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 61 | 2016-12-30T21:51:10.000Z | 2021-12-10T20:25:56.000Z | MMOCoreORB/bin/scripts/object/custom_content/tangible/food/generic/drink_vayerbok.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 71 | 2017-01-01T05:34:38.000Z | 2022-03-29T01:04:00.000Z | object_tangible_food_generic_drink_vayerbok = object_tangible_food_generic_shared_drink_vayerbok:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_drink_vayerbok, "object/tangible/food/generic/drink_vayerbok.iff")
| 38.5 | 123 | 0.896104 |
d0b7bc481a59f40adf5a77f4c9ee9aa1a16f5651 | 54 | lua | Lua | Task/Nth-root/Lua/nth-root.lua | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | null | null | null | Task/Nth-root/Lua/nth-root.lua | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | null | null | null | Task/Nth-root/Lua/nth-root.lua | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | null | null | null | function nth_root(num,root)
return num^(1/root)
end
| 13.5 | 27 | 0.740741 |
7ba65a42217fb56d42566ebd2976039872a9f9f0 | 8,746 | asm | Assembly | audio/music/kantogymbattle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | audio/music/kantogymbattle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | audio/music/kantogymbattle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | Music_KantoGymBattle:
musicheader 3, 1, Music_KantoGymBattle_Ch1
musicheader 1, 2, Music_KantoGymBattle_Ch2
musicheader 1, 3, Music_KantoGymBattle_Ch3
Music_KantoGymBattle_Ch1:
tempo 101
volume $77
dutycycle $3
tone $0002
vibrato $12, $15
notetype $c, $b2
octave 3
note A#, 1
note A_, 1
note G#, 1
note G_, 1
note G#, 1
note G_, 1
note F#, 1
note G_, 1
note F#, 1
note F_, 1
note F#, 1
note F_, 1
note E_, 1
note F_, 1
note E_, 1
note D#, 1
note E_, 1
note D#, 1
note D_, 1
note D#, 1
note D_, 1
note C#, 1
note D_, 1
note C#, 1
note C_, 1
note C#, 1
note C_, 1
octave 2
note B_, 1
octave 3
note C_, 1
octave 2
note B_, 1
note A#, 1
note B_, 1
note A#, 2
note A#, 6
note A#, 2
note A#, 6
note A#, 2
note A#, 8
intensity $b7
note B_, 2
intensity $b2
note A#, 2
note A#, 6
note A#, 2
note A#, 6
note A#, 2
note A#, 8
intensity $b7
octave 3
note E_, 2
intensity $b2
octave 2
note A#, 2
note A#, 6
note A#, 2
note A#, 6
note A#, 2
note A#, 8
intensity $b7
note B_, 2
intensity $b2
note A#, 2
note A#, 6
note A#, 2
note A#, 6
note A#, 2
intensity $b4
octave 3
note E_, 4
note E_, 4
note E_, 2
Music_KantoGymBattle_branch_ec78b:
callchannel Music_KantoGymBattle_branch_ec832
octave 2
note A#, 2
intensity $b7
note G#, 8
note B_, 8
octave 3
note D#, 10
note E_, 6
callchannel Music_KantoGymBattle_branch_ec832
note D#, 2
intensity $b7
note C#, 8
octave 2
note B_, 8
note G#, 10
octave 3
note E_, 6
intensity $b2
note D#, 2
note D#, 2
note G_, 1
note E_, 1
note D#, 1
note G_, 1
note D#, 2
note D#, 2
note A#, 1
note G#, 1
note E_, 1
note A#, 1
note D#, 2
note D#, 2
note B_, 1
note A#, 1
note G#, 1
note B_, 1
note D#, 2
intensity $b7
note E_, 2
intensity $b2
note D#, 2
note D#, 2
note G_, 1
note E_, 1
note D#, 1
note G_, 1
note D#, 2
note D#, 2
note A#, 1
note G#, 1
note E_, 1
note A#, 1
note D#, 2
note D#, 2
note B_, 1
note A#, 1
note G#, 1
note B_, 1
note G#, 2
intensity $b5
note B_, 2
note D#, 2
note C#, 2
octave 2
note A#, 4
note D#, 2
note G#, 2
note B_, 2
octave 3
note E_, 2
note D#, 4
note C#, 2
octave 2
note A#, 2
note A#, 2
note D#, 2
note A#, 2
octave 3
note C#, 2
intensity $b7
octave 2
note B_, 8
note A#, 8
note G#, 10
note B_, 6
intensity $b5
octave 3
note D#, 2
note C#, 2
octave 2
note A#, 4
note D#, 2
note G#, 2
note B_, 2
octave 3
note E_, 2
note D#, 4
note C#, 2
octave 2
note A#, 2
note A#, 2
note G#, 2
note A#, 2
octave 3
note C#, 2
intensity $b7
note E_, 8
note F#, 8
note G_, 16
intensity $b2
octave 2
note G#, 2
note G#, 2
intensity $b7
octave 3
note C#, 12
intensity $b2
note G#, 2
note F_, 4
intensity $b5
octave 2
note F_, 4
note G_, 2
note G#, 2
note A#, 2
intensity $b2
note A#, 2
note A#, 2
intensity $b7
octave 3
note D#, 12
intensity $b2
note A#, 2
note G_, 4
intensity $b7
octave 4
note D#, 6
intensity $4c
octave 3
note D_, 4
loopchannel 0, Music_KantoGymBattle_branch_ec78b
Music_KantoGymBattle_branch_ec832:
intensity $b5
note D#, 2
octave 2
note A#, 2
octave 3
note D#, 2
note E_, 4
note D#, 2
note C#, 2
octave 2
note A#, 2
note D#, 2
note G#, 2
note A#, 2
octave 3
note D#, 2
note E_, 2
note D#, 2
note C#, 2
endchannel
Music_KantoGymBattle_Ch2:
dutycycle $3
vibrato $8, $36
tone $0001
notetype $c, $c2
Music_KantoGymBattle_branch_ec852:
octave 4
note A#, 1
note G#, 1
note A#, 1
octave 5
note D#, 1
loopchannel 8, Music_KantoGymBattle_branch_ec852
octave 3
Music_KantoGymBattle_branch_ec85d:
intensity $c2
note D#, 2
note D#, 2
note F#, 1
note E_, 1
note D#, 1
note F#, 1
note D#, 2
note D#, 2
note A#, 1
note G#, 1
note F#, 1
note A#, 1
note D#, 2
note D#, 2
note B_, 1
note A#, 1
note G#, 1
note B_, 1
note D_, 2
intensity $c7
note E_, 2
intensity $c2
note D#, 2
note D#, 2
note F#, 1
note E_, 1
note D#, 1
note F#, 1
note D#, 2
note D#, 2
note A#, 1
note G#, 1
note F#, 1
note A#, 1
note D#, 2
note D#, 2
note B_, 1
note A#, 1
note G#, 1
note B_, 1
note G#, 2
intensity $c7
note B_, 2
intensity $c2
octave 4
loopchannel 2, Music_KantoGymBattle_branch_ec85d
Music_KantoGymBattle_branch_ec894:
callchannel Music_KantoGymBattle_branch_ec907
note E_, 8
note G#, 8
note B_, 10
note G#, 6
callchannel Music_KantoGymBattle_branch_ec907
note E_, 8
note G#, 8
note B_, 10
octave 4
note E_, 6
note D#, 8
intensity $b7
note D#, 8
intensity $a2
note __, 6
octave 5
note E_, 4
note E_, 4
note E_, 2
intensity $a0
note D#, 8
intensity $a7
note D#, 8
note __, 12
intensity $c5
octave 3
note A#, 4
note B_, 4
note G#, 4
note A#, 4
note B_, 4
note G#, 4
note E_, 4
intensity $b0
note D#, 8
note D#, 16
intensity $b7
note D#, 12
intensity $c5
note A#, 4
note B_, 4
note G#, 4
note A#, 4
note B_, 4
note G#, 4
note B_, 4
intensity $b0
note A#, 8
intensity $b7
note A#, 8
intensity $b0
octave 4
note D#, 8
intensity $b7
note D#, 8
intensity $c2
octave 3
note C#, 2
note C#, 2
intensity $c7
note F_, 8
intensity $c2
octave 4
note C#, 4
note F_, 2
note C#, 4
intensity $c7
note G#, 4
note G_, 2
note F_, 2
note D#, 2
intensity $c2
octave 3
note D#, 2
note D#, 2
intensity $c7
note G_, 8
intensity $c2
octave 4
note D#, 4
note G_, 2
note D#, 4
intensity $c7
note A#, 6
octave 3
note A_, 4
loopchannel 0, Music_KantoGymBattle_branch_ec894
Music_KantoGymBattle_branch_ec907:
dutycycle $2
intensity $d1
octave 3
note A#, 2
intensity $a2
note A#, 2
intensity $d1
note G#, 2
intensity $a2
note G#, 2
intensity $d1
note A#, 2
intensity $a2
note A#, 2
intensity $c5
note B_, 2
octave 4
note C#, 2
note C#, 2
octave 3
note B_, 4
note A#, 2
note G#, 2
note F#, 2
note G#, 2
note A#, 2
dutycycle $3
intensity $b0
endchannel
Music_KantoGymBattle_Ch3:
notetype $c, $19
octave 2
note E_, 1
note __, 1
Music_KantoGymBattle_branch_ec934:
note B_, 3
note __, 1
loopchannel 6, Music_KantoGymBattle_branch_ec934
note B_, 2
note G#, 2
note B_, 2
Music_KantoGymBattle_branch_ec93d:
note D#, 1
note __, 1
note D#, 1
note __, 1
note F#, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note A#, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note B_, 4
note D_, 1
note __, 1
note F_, 2
note D#, 1
note __, 1
note D#, 1
note __, 1
note F#, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note A#, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note B_, 4
note D#, 1
note __, 1
note E_, 2
loopchannel 2, Music_KantoGymBattle_branch_ec93d
Music_KantoGymBattle_branch_ec965:
octave 2
note D#, 2
note A#, 2
loopchannel 8, Music_KantoGymBattle_branch_ec965
Music_KantoGymBattle_branch_ec96c:
note E_, 2
note B_, 2
loopchannel 4, Music_KantoGymBattle_branch_ec96c
octave 1
note B_, 2
octave 2
note E_, 2
octave 1
note B_, 2
octave 2
note E_, 4
note B_, 2
octave 3
note E_, 2
octave 2
note B_, 2
Music_KantoGymBattle_branch_ec97f:
octave 2
note F#, 2
octave 3
note C#, 2
loopchannel 8, Music_KantoGymBattle_branch_ec97f
Music_KantoGymBattle_branch_ec987:
octave 2
note E_, 2
note B_, 2
loopchannel 7, Music_KantoGymBattle_branch_ec987
octave 3
note E_, 2
octave 2
note B_, 2
Music_KantoGymBattle_branch_ec992:
note D#, 1
note __, 1
note D#, 1
note __, 1
note A#, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note B_, 4
note D#, 1
note __, 1
note D#, 1
note __, 1
note A#, 4
note D#, 1
note __, 1
note E_, 2
loopchannel 2, Music_KantoGymBattle_branch_ec992
Music_KantoGymBattle_branch_ec9a8:
note D#, 2
note A#, 2
loopchannel 7, Music_KantoGymBattle_branch_ec9a8
octave 3
note C#, 2
octave 2
note A#, 2
note E_, 2
note B_, 2
octave 3
note E_, 2
octave 2
note E_, 2
note B_, 2
octave 3
note E_, 2
Music_KantoGymBattle_branch_ec9bb:
octave 2
note E_, 2
note B_, 2
loopchannel 5, Music_KantoGymBattle_branch_ec9bb
Music_KantoGymBattle_branch_ec9c2:
octave 2
note F#, 2
octave 3
note C#, 2
loopchannel 7, Music_KantoGymBattle_branch_ec9c2
octave 2
note A#, 2
octave 3
note C#, 2
octave 2
note E_, 2
note A#, 2
octave 3
note E_, 2
note F#, 2
note G#, 2
note F#, 2
note E_, 2
note C#, 2
Music_KantoGymBattle_branch_ec9d8:
octave 2
note D#, 2
note A#, 2
loopchannel 4, Music_KantoGymBattle_branch_ec9d8
Music_KantoGymBattle_branch_ec9df:
note C#, 2
note G#, 2
loopchannel 8, Music_KantoGymBattle_branch_ec9df
Music_KantoGymBattle_branch_ec9e5:
note D#, 2
note A#, 2
loopchannel 4, Music_KantoGymBattle_branch_ec9e5
octave 3
note D#, 2
octave 2
note A#, 2
note D#, 2
note D_, 2
note D_, 2
note A#, 2
octave 3
note D#, 2
note F_, 2
loopchannel 0, Music_KantoGymBattle_branch_ec965
| 14.314239 | 49 | 0.657329 |
661792ff15aa74a3f633b027b997597f06979a46 | 7,084 | css | CSS | dist/layout/flex-grid.min.css | jonathanzuniga/css-starter-kit | 756028a3c8130a8a3eda88e12074b45cab831177 | [
"MIT"
] | null | null | null | dist/layout/flex-grid.min.css | jonathanzuniga/css-starter-kit | 756028a3c8130a8a3eda88e12074b45cab831177 | [
"MIT"
] | null | null | null | dist/layout/flex-grid.min.css | jonathanzuniga/css-starter-kit | 756028a3c8130a8a3eda88e12074b45cab831177 | [
"MIT"
] | null | null | null | .row{display:flex;flex-wrap:wrap;margin-right:-1rem;margin-left:-1rem}.col,.col-1,.xs-col-1,.col-2,.xs-col-2,.col-3,.xs-col-3,.col-4,.xs-col-4,.col-5,.xs-col-5,.col-6,.xs-col-6,.col-7,.xs-col-7,.col-8,.xs-col-8,.col-9,.xs-col-9,.col-10,.xs-col-10,.col-11,.xs-col-11,.col-12,.xs-col-12,.sm-col-1,.sm-col-2,.sm-col-3,.sm-col-4,.sm-col-5,.sm-col-6,.sm-col-7,.sm-col-8,.sm-col-9,.sm-col-10,.sm-col-11,.sm-col-12,.md-col-1,.md-col-2,.md-col-3,.md-col-4,.md-col-5,.md-col-6,.md-col-7,.md-col-8,.md-col-9,.md-col-10,.md-col-11,.md-col-12,.lg-col-1,.lg-col-2,.lg-col-3,.lg-col-4,.lg-col-5,.lg-col-6,.lg-col-7,.lg-col-8,.lg-col-9,.lg-col-10,.lg-col-11,.lg-col-12,.xl-col-1,.xl-col-2,.xl-col-3,.xl-col-4,.xl-col-5,.xl-col-6,.xl-col-7,.xl-col-8,.xl-col-9,.xl-col-10,.xl-col-11,.xl-col-12{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;width:100%;padding-right:1rem;padding-left:1rem}.cntr{padding-right:1rem;padding-left:1rem;margin-left:auto;margin-right:auto;width:100%;max-width:1100px}.cntr--fluid{max-width:100%}.col-1{flex-basis:8.33333%;max-width:8.33333%}.col-2{flex-basis:16.66667%;max-width:16.66667%}.col-3{flex-basis:25%;max-width:25%}.col-4{flex-basis:33.33333%;max-width:33.33333%}.col-5{flex-basis:41.66667%;max-width:41.66667%}.col-6{flex-basis:50%;max-width:50%}.col-7{flex-basis:58.33333%;max-width:58.33333%}.col-8{flex-basis:66.66667%;max-width:66.66667%}.col-9{flex-basis:75%;max-width:75%}.col-10{flex-basis:83.33333%;max-width:83.33333%}.col-11{flex-basis:91.66667%;max-width:91.66667%}.col-12{flex-basis:100%;max-width:100%}[class*='-col-']{flex-basis:100%;max-width:100%}@media (min-width: 0){.xs-col-1{flex-basis:8.33333%;max-width:8.33333%}.xs-col-2{flex-basis:16.66667%;max-width:16.66667%}.xs-col-3{flex-basis:25%;max-width:25%}.xs-col-4{flex-basis:33.33333%;max-width:33.33333%}.xs-col-5{flex-basis:41.66667%;max-width:41.66667%}.xs-col-6{flex-basis:50%;max-width:50%}.xs-col-7{flex-basis:58.33333%;max-width:58.33333%}.xs-col-8{flex-basis:66.66667%;max-width:66.66667%}.xs-col-9{flex-basis:75%;max-width:75%}.xs-col-10{flex-basis:83.33333%;max-width:83.33333%}.xs-col-11{flex-basis:91.66667%;max-width:91.66667%}.xs-col-12{flex-basis:100%;max-width:100%}}@media (max-width: 767px){.maxsm-col-1{flex-basis:8.33333%;max-width:8.33333%}.maxsm-col-2{flex-basis:16.66667%;max-width:16.66667%}.maxsm-col-3{flex-basis:25%;max-width:25%}.maxsm-col-4{flex-basis:33.33333%;max-width:33.33333%}.maxsm-col-5{flex-basis:41.66667%;max-width:41.66667%}.maxsm-col-6{flex-basis:50%;max-width:50%}.maxsm-col-7{flex-basis:58.33333%;max-width:58.33333%}.maxsm-col-8{flex-basis:66.66667%;max-width:66.66667%}.maxsm-col-9{flex-basis:75%;max-width:75%}.maxsm-col-10{flex-basis:83.33333%;max-width:83.33333%}.maxsm-col-11{flex-basis:91.66667%;max-width:91.66667%}.maxsm-col-12{flex-basis:100%;max-width:100%}}@media (min-width: 768px){.sm-col-1{flex-basis:8.33333%;max-width:8.33333%}.sm-col-2{flex-basis:16.66667%;max-width:16.66667%}.sm-col-3{flex-basis:25%;max-width:25%}.sm-col-4{flex-basis:33.33333%;max-width:33.33333%}.sm-col-5{flex-basis:41.66667%;max-width:41.66667%}.sm-col-6{flex-basis:50%;max-width:50%}.sm-col-7{flex-basis:58.33333%;max-width:58.33333%}.sm-col-8{flex-basis:66.66667%;max-width:66.66667%}.sm-col-9{flex-basis:75%;max-width:75%}.sm-col-10{flex-basis:83.33333%;max-width:83.33333%}.sm-col-11{flex-basis:91.66667%;max-width:91.66667%}.sm-col-12{flex-basis:100%;max-width:100%}}@media (max-width: 1023px){.maxmd-col-1{flex-basis:8.33333%;max-width:8.33333%}.maxmd-col-2{flex-basis:16.66667%;max-width:16.66667%}.maxmd-col-3{flex-basis:25%;max-width:25%}.maxmd-col-4{flex-basis:33.33333%;max-width:33.33333%}.maxmd-col-5{flex-basis:41.66667%;max-width:41.66667%}.maxmd-col-6{flex-basis:50%;max-width:50%}.maxmd-col-7{flex-basis:58.33333%;max-width:58.33333%}.maxmd-col-8{flex-basis:66.66667%;max-width:66.66667%}.maxmd-col-9{flex-basis:75%;max-width:75%}.maxmd-col-10{flex-basis:83.33333%;max-width:83.33333%}.maxmd-col-11{flex-basis:91.66667%;max-width:91.66667%}.maxmd-col-12{flex-basis:100%;max-width:100%}}@media (min-width: 1024px){.md-col-1{flex-basis:8.33333%;max-width:8.33333%}.md-col-2{flex-basis:16.66667%;max-width:16.66667%}.md-col-3{flex-basis:25%;max-width:25%}.md-col-4{flex-basis:33.33333%;max-width:33.33333%}.md-col-5{flex-basis:41.66667%;max-width:41.66667%}.md-col-6{flex-basis:50%;max-width:50%}.md-col-7{flex-basis:58.33333%;max-width:58.33333%}.md-col-8{flex-basis:66.66667%;max-width:66.66667%}.md-col-9{flex-basis:75%;max-width:75%}.md-col-10{flex-basis:83.33333%;max-width:83.33333%}.md-col-11{flex-basis:91.66667%;max-width:91.66667%}.md-col-12{flex-basis:100%;max-width:100%}}@media (max-width: 1279px){.maxlg-col-1{flex-basis:8.33333%;max-width:8.33333%}.maxlg-col-2{flex-basis:16.66667%;max-width:16.66667%}.maxlg-col-3{flex-basis:25%;max-width:25%}.maxlg-col-4{flex-basis:33.33333%;max-width:33.33333%}.maxlg-col-5{flex-basis:41.66667%;max-width:41.66667%}.maxlg-col-6{flex-basis:50%;max-width:50%}.maxlg-col-7{flex-basis:58.33333%;max-width:58.33333%}.maxlg-col-8{flex-basis:66.66667%;max-width:66.66667%}.maxlg-col-9{flex-basis:75%;max-width:75%}.maxlg-col-10{flex-basis:83.33333%;max-width:83.33333%}.maxlg-col-11{flex-basis:91.66667%;max-width:91.66667%}.maxlg-col-12{flex-basis:100%;max-width:100%}}@media (min-width: 1280px){.lg-col-1{flex-basis:8.33333%;max-width:8.33333%}.lg-col-2{flex-basis:16.66667%;max-width:16.66667%}.lg-col-3{flex-basis:25%;max-width:25%}.lg-col-4{flex-basis:33.33333%;max-width:33.33333%}.lg-col-5{flex-basis:41.66667%;max-width:41.66667%}.lg-col-6{flex-basis:50%;max-width:50%}.lg-col-7{flex-basis:58.33333%;max-width:58.33333%}.lg-col-8{flex-basis:66.66667%;max-width:66.66667%}.lg-col-9{flex-basis:75%;max-width:75%}.lg-col-10{flex-basis:83.33333%;max-width:83.33333%}.lg-col-11{flex-basis:91.66667%;max-width:91.66667%}.lg-col-12{flex-basis:100%;max-width:100%}}@media (max-width: 1679px){.maxxl-col-1{flex-basis:8.33333%;max-width:8.33333%}.maxxl-col-2{flex-basis:16.66667%;max-width:16.66667%}.maxxl-col-3{flex-basis:25%;max-width:25%}.maxxl-col-4{flex-basis:33.33333%;max-width:33.33333%}.maxxl-col-5{flex-basis:41.66667%;max-width:41.66667%}.maxxl-col-6{flex-basis:50%;max-width:50%}.maxxl-col-7{flex-basis:58.33333%;max-width:58.33333%}.maxxl-col-8{flex-basis:66.66667%;max-width:66.66667%}.maxxl-col-9{flex-basis:75%;max-width:75%}.maxxl-col-10{flex-basis:83.33333%;max-width:83.33333%}.maxxl-col-11{flex-basis:91.66667%;max-width:91.66667%}.maxxl-col-12{flex-basis:100%;max-width:100%}}@media (min-width: 1680px){.xl-col-1{flex-basis:8.33333%;max-width:8.33333%}.xl-col-2{flex-basis:16.66667%;max-width:16.66667%}.xl-col-3{flex-basis:25%;max-width:25%}.xl-col-4{flex-basis:33.33333%;max-width:33.33333%}.xl-col-5{flex-basis:41.66667%;max-width:41.66667%}.xl-col-6{flex-basis:50%;max-width:50%}.xl-col-7{flex-basis:58.33333%;max-width:58.33333%}.xl-col-8{flex-basis:66.66667%;max-width:66.66667%}.xl-col-9{flex-basis:75%;max-width:75%}.xl-col-10{flex-basis:83.33333%;max-width:83.33333%}.xl-col-11{flex-basis:91.66667%;max-width:91.66667%}.xl-col-12{flex-basis:100%;max-width:100%}}
| 3,542 | 7,083 | 0.713721 |
2036e67f617c582efa2f657759df64c7bcb010f1 | 1,493 | kt | Kotlin | app/src/main/kotlin/sample/kotlin/project/domain/stores/search/middlewares/SuggestionsMiddleware.kt | Anna-Sentyakova/projekt | 37b57a5dd22bf5e106ecd8a28cf24cbdd7cb5819 | [
"Apache-2.0"
] | 1 | 2021-10-20T23:10:24.000Z | 2021-10-20T23:10:24.000Z | app/src/main/kotlin/sample/kotlin/project/domain/stores/search/middlewares/SuggestionsMiddleware.kt | Anna-Sentyakova/projekt | 37b57a5dd22bf5e106ecd8a28cf24cbdd7cb5819 | [
"Apache-2.0"
] | null | null | null | app/src/main/kotlin/sample/kotlin/project/domain/stores/search/middlewares/SuggestionsMiddleware.kt | Anna-Sentyakova/projekt | 37b57a5dd22bf5e106ecd8a28cf24cbdd7cb5819 | [
"Apache-2.0"
] | null | null | null | package sample.kotlin.project.domain.stores.search.middlewares
import io.reactivex.Observable
import io.reactivex.functions.Consumer
import sample.kotlin.project.domain.core.mvi.BaseMiddleware
import sample.kotlin.project.domain.repositories.search.SearchRepository
import sample.kotlin.project.domain.stores.search.pojo.SearchAction
import sample.kotlin.project.domain.stores.search.pojo.SearchAction.OnLoadSuggestions
import sample.kotlin.project.domain.stores.search.pojo.SearchAction.SuggestionsLoadingSucceeded
import sample.kotlin.project.domain.stores.search.pojo.SearchEvent
import sample.kotlin.project.domain.stores.search.pojo.SearchNavigationCommand
import sample.kotlin.project.domain.stores.search.pojo.SearchState
import javax.inject.Inject
class SuggestionsMiddleware
@Inject constructor(
private val searchRepository: SearchRepository
) : BaseMiddleware<SearchState, SearchAction, SearchEvent, SearchNavigationCommand>() {
override fun bind(
states: Observable<SearchState>,
actions: Observable<SearchAction>,
events: Consumer<SearchEvent>,
navigationCommands: Consumer<SearchNavigationCommand>
): Observable<SearchAction> =
actions
.ofType(OnLoadSuggestions::class.java)
.switchMap {
searchRepository.suggestions()
.toObservable()
.onErrorReturnItem(emptyList())
.map { SuggestionsLoadingSucceeded(it) }
}
}
| 42.657143 | 95 | 0.757535 |
2a122f5f10a3d0bd94cc7a4a848493d410f69b99 | 5,061 | html | HTML | application/cms_login/view/index/index.html | luobin1017/appmanage | 69f3a5875f7896191d142d84087eafa99147ab38 | [
"Apache-2.0"
] | null | null | null | application/cms_login/view/index/index.html | luobin1017/appmanage | 69f3a5875f7896191d142d84087eafa99147ab38 | [
"Apache-2.0"
] | null | null | null | application/cms_login/view/index/index.html | luobin1017/appmanage | 69f3a5875f7896191d142d84087eafa99147ab38 | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Deepsea后台管理系统</title>
<link rel="stylesheet" href="/style/layui/css/layui.css">
<link rel="stylesheet" href="/style/main.css">
<style>
.layui-input, .layui-select, .layui-textarea {
height: 47px;
line-height: 1.3;
line-height: 42px\9;
border-width: 3px;
border-style: solid;
background-color: rgba(255,255,255,0.1);
border-radius: 2px;
}
.layui-input, .layui-select, .layui-textarea input{
font-size: 18px;
color: white;
}
input::-webkit-input-placeholder {
color: #aab2bd;
font-size: 13px;
}
#layui-layer2 {
z-index: 19891016;
top: 312px;
left: 854px;
}
</style>
</head>
<body class="layui-layout-body bgbody" >
<div class="">
<div class="loginbrand">
<div class="loginbrand_img">
<img src="/images/admin/loginbrand.png" alt="">
</div>
</div>
<div class="login_outside">
<div class="login_inside">
<form class="layui-form" action="" method="post">
<div class="layui-form-item login_insideA">
<!--<label class="layui-form-label">输入框</label>-->
<div class="login_input login_input_u">
<input type="text" name="username" placeholder="请输入账号" id="username" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item login_insideB">
<!--<label class="layui-form-label">密码框</label>-->
<div class="login_input login_input_u">
<input type="password" name="password" placeholder="请输入密码" id="password" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><!--辅助文字--></div>
</div>
<div class="layui-form-item login_insideB">
<!--<label class="layui-form-label">密码框</label>-->
<div class="login_input login_input_u" >
<input placeholder="简体中文" readonly="readonly" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><!--辅助文字--></div>
</div>
</form>
<div class="layui-form-item">
<div class="layui-input-block" style="margin-left: 59px">
<button class="layui-btn layui-btn-normal" id="test1" style="width: 318px;background-color: rgba(255,255,255,0.2);" > 登 录 </button>
</div>
</div>
</div>
</div>
</div>
<script src="/style/jquery.js"></script>
<script src="/style/layui/layui.js"></script>
<script>
$(document).ready(function(){
layui.use('layer', function(){ //独立版的layer无需执行这一句
var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
//常规用法
//触发事件
$('#test1').on('click', function () {
$.ajax({
type: "POST",
async:true,
url: "cms_login/index/login",
data: {username:$("#username").val(), password:$("#password").val()},
dataType: "json",
beforeSend: function () {
lll_index = layer.load(1, {
shade: [0.5,'#DBDBDB'] //0.1透明度的白色背景
});
},
success: function(data){
if(data.code==100){
layer.close(lll_index);
layer.open({
type: 1,
title: false,
closeBtn: 0,
area: '211px',
skin: 'layui-layer-nobg', //没有背景色
shadeClose: true,
content: '<img src="/images/admin/692.png" alt="">'
});
}
else if(data.code==200){
window.location.href="cms/index/select_brand";
}
//跳转页面
}
});
})
})
});
</script>
</body>
</html> | 42.889831 | 268 | 0.428571 |
681ba6c8c3debdcf38155bf3cf2d64c41d9396c2 | 26,125 | sql | SQL | Documentacion/Database/Script_Creacion/Script_Importacion_Califica_V3.sql | jesusArangor/EvaluaDocentesIngrid | 821022f22702fedfa14882f03bf4a0835f63fe1b | [
"MIT"
] | null | null | null | Documentacion/Database/Script_Creacion/Script_Importacion_Califica_V3.sql | jesusArangor/EvaluaDocentesIngrid | 821022f22702fedfa14882f03bf4a0835f63fe1b | [
"MIT"
] | 9 | 2022-03-07T23:11:06.000Z | 2022-03-27T15:01:40.000Z | Documentacion/Database/Script_Creacion/Script_Importacion_Califica_V3.sql | jesusArangor/EvaluaDocentesIngrid | 821022f22702fedfa14882f03bf4a0835f63fe1b | [
"MIT"
] | null | null | null | -- MySQL dump 10.13 Distrib 5.5.62, for Win64 (AMD64)
--
-- Host: localhost Database: califica
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.11-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `calificacion`
--
DROP TABLE IF EXISTS `calificacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calificacion` (
`id_calificacion` int(11) NOT NULL AUTO_INCREMENT,
`eva_id` int(11) NOT NULL,
`for_id` int(11) NOT NULL,
`cal_nota` decimal(18,2) NOT NULL DEFAULT 0.00,
`cal_observacion` varchar(255) DEFAULT NULL,
`cal_plan_mejora` bit(1) DEFAULT NULL,
`cal_usu_ing` int(11) NOT NULL,
`cal_usu_mod` int(11) NOT NULL,
PRIMARY KEY (`id_calificacion`),
KEY `fk_movimiento_calificacion_idx` (`eva_id`),
KEY `fk_formato_valificacion_idx` (`for_id`),
KEY `fk_calificacion_usu_ing_idx` (`cal_usu_ing`),
KEY `fk_calificacion_usu_mod_idx` (`cal_usu_mod`),
CONSTRAINT `fk_calificacion_usu_ing` FOREIGN KEY (`cal_usu_ing`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_calificacion_usu_mod` FOREIGN KEY (`cal_usu_mod`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_evaluacion_calificacion` FOREIGN KEY (`eva_id`) REFERENCES `evaluacion` (`eva_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_formato_valificacion` FOREIGN KEY (`for_id`) REFERENCES `formato` (`for_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `calificacion`
--
LOCK TABLES `calificacion` WRITE;
/*!40000 ALTER TABLE `calificacion` DISABLE KEYS */;
/*!40000 ALTER TABLE `calificacion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `carga_docente`
--
DROP TABLE IF EXISTS `carga_docente`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carga_docente` (
`card_fecha` datetime DEFAULT NULL,
`card_usu_id` int(11) DEFAULT NULL,
`card_completo` bit(1) DEFAULT NULL,
`card_cantidad` int(11) DEFAULT NULL,
`card_observacion` varchar(255) DEFAULT NULL,
`card_errores` int(11) DEFAULT NULL,
`card_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `carga_docente`
--
LOCK TABLES `carga_docente` WRITE;
/*!40000 ALTER TABLE `carga_docente` DISABLE KEYS */;
/*!40000 ALTER TABLE `carga_docente` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `carga_evaluacion`
--
DROP TABLE IF EXISTS `carga_evaluacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carga_evaluacion` (
`care_id` int(11) NOT NULL AUTO_INCREMENT,
`care_fecha` datetime DEFAULT NULL,
`care_usu_id` int(11) DEFAULT NULL,
`care_completo` bit(1) DEFAULT NULL,
`care_cantidad` int(11) DEFAULT NULL,
`care_observacion` varchar(255) DEFAULT NULL,
`care_errores` int(11) DEFAULT NULL,
`care_semestre` int(11) DEFAULT NULL,
`care_ano` int(11) DEFAULT NULL,
`care_nomarchivo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`care_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `carga_evaluacion`
--
LOCK TABLES `carga_evaluacion` WRITE;
/*!40000 ALTER TABLE `carga_evaluacion` DISABLE KEYS */;
/*!40000 ALTER TABLE `carga_evaluacion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `curso`
--
DROP TABLE IF EXISTS `curso`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `curso` (
`cur_id` int(11) NOT NULL AUTO_INCREMENT,
`cur_nombre` varchar(45) NOT NULL,
`cur_codigo` varchar(45) DEFAULT NULL,
`cur_semestre` int(11) DEFAULT NULL,
PRIMARY KEY (`cur_id`),
UNIQUE KEY `cur_codigo_UNIQUE` (`cur_codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `curso`
--
LOCK TABLES `curso` WRITE;
/*!40000 ALTER TABLE `curso` DISABLE KEYS */;
/*!40000 ALTER TABLE `curso` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `docente`
--
DROP TABLE IF EXISTS `docente`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `docente` (
`doc_id` int(11) NOT NULL AUTO_INCREMENT,
`doc_documento` varchar(20) NOT NULL,
`doc_nombre` varchar(150) NOT NULL,
`doc_correo` varchar(60) DEFAULT NULL,
`doc_telefono` varchar(45) DEFAULT NULL,
`doc_fecing` date DEFAULT NULL,
`doc_fecmod` date DEFAULT NULL,
`doc_usu_ing_id` int(11) DEFAULT NULL,
`doc_usu_mod_id` int(11) DEFAULT NULL,
`doc_idcarga` int(11) DEFAULT NULL,
PRIMARY KEY (`doc_id`),
KEY `fk_docente_usu_mod` (`doc_usu_mod_id`),
KEY `fk_docente_usu_ing` (`doc_usu_ing_id`),
KEY `fk_docente_card` (`doc_idcarga`),
CONSTRAINT `fk_docente_card` FOREIGN KEY (`doc_idcarga`) REFERENCES `carga_docente` (`card_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_docente_usu_ing` FOREIGN KEY (`doc_usu_ing_id`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_docente_usu_mod` FOREIGN KEY (`doc_usu_mod_id`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `docente`
--
LOCK TABLES `docente` WRITE;
/*!40000 ALTER TABLE `docente` DISABLE KEYS */;
/*!40000 ALTER TABLE `docente` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `evaluacion`
--
DROP TABLE IF EXISTS `evaluacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `evaluacion` (
`eva_id` int(11) NOT NULL AUTO_INCREMENT,
`cur_id` int(11) NOT NULL,
`sed_id` int(11) NOT NULL,
`fac_id` int(11) NOT NULL,
`prog_id` int(11) NOT NULL,
`eva_doc_id` int(11) DEFAULT NULL,
`eva_care_id` int(11) DEFAULT NULL,
`eva_modulo` varchar(45) DEFAULT NULL,
`eva_curriculo` varchar(45) DEFAULT NULL,
`eva_plan_aula` varchar(60) DEFAULT NULL,
`eva_fecing` date DEFAULT NULL,
`eva_fecmod` date DEFAULT NULL,
`eva_usu_mod_id` int(11) NOT NULL,
`eva_usu_ing_id` int(11) NOT NULL,
`eva_estado` int(11) DEFAULT NULL,
PRIMARY KEY (`eva_id`),
KEY `fk_curso_movimiento_idx` (`cur_id`),
KEY `fk_facultad_movimiento_idx` (`fac_id`),
KEY `fk_sede_movimiento_idx` (`sed_id`),
KEY `fk_programa_movimiento_idx` (`prog_id`),
KEY `fk_docente_evaluacion_idx` (`eva_doc_id`),
KEY `fk_care_evaluacion_idx` (`eva_care_id`),
KEY `fk_evalucion_usu_ing_idx` (`eva_usu_mod_id`),
KEY `fk_evalucion_usu_mod` (`eva_usu_ing_id`),
CONSTRAINT `fk_care_evaluacion` FOREIGN KEY (`eva_care_id`) REFERENCES `carga_evaluacion` (`care_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_curso_evaluacion` FOREIGN KEY (`cur_id`) REFERENCES `curso` (`cur_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_docente_evaluacion` FOREIGN KEY (`eva_doc_id`) REFERENCES `docente` (`doc_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_evalucion_usu_ing` FOREIGN KEY (`eva_usu_mod_id`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_evalucion_usu_mod` FOREIGN KEY (`eva_usu_ing_id`) REFERENCES `usuario` (`usu_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_facultad_evaluacion` FOREIGN KEY (`fac_id`) REFERENCES `facultad` (`fac_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_programa_evaluacion` FOREIGN KEY (`prog_id`) REFERENCES `programa` (`prog_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_sede_evaluacion` FOREIGN KEY (`sed_id`) REFERENCES `sede` (`sed_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `evaluacion`
--
LOCK TABLES `evaluacion` WRITE;
/*!40000 ALTER TABLE `evaluacion` DISABLE KEYS */;
/*!40000 ALTER TABLE `evaluacion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `facultad`
--
DROP TABLE IF EXISTS `facultad`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `facultad` (
`fac_codigo` varchar(30) NOT NULL,
`fac_nombre` varchar(60) DEFAULT NULL,
`fac_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`fac_id`),
UNIQUE KEY `fac_codigo_UNIQUE` (`fac_codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `facultad`
--
LOCK TABLES `facultad` WRITE;
/*!40000 ALTER TABLE `facultad` DISABLE KEYS */;
/*!40000 ALTER TABLE `facultad` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `formato`
--
DROP TABLE IF EXISTS `formato`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `formato` (
`for_id` int(11) NOT NULL AUTO_INCREMENT,
`for_fase` varchar(45) NOT NULL,
`for_calif_fase` decimal(18,2) NOT NULL,
`for_item` int(11) NOT NULL,
`for_descripcion` varchar(255) NOT NULL,
`for_puntaje_max` decimal(18,2) NOT NULL,
PRIMARY KEY (`for_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `formato`
--
LOCK TABLES `formato` WRITE;
/*!40000 ALTER TABLE `formato` DISABLE KEYS */;
/*!40000 ALTER TABLE `formato` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `programa`
--
DROP TABLE IF EXISTS `programa`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `programa` (
`prog_codigo` varchar(25) NOT NULL,
`prog_nombre` varchar(45) NOT NULL,
`prog_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`prog_id`),
UNIQUE KEY `prog_codigo_UNIQUE` (`prog_codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `programa`
--
LOCK TABLES `programa` WRITE;
/*!40000 ALTER TABLE `programa` DISABLE KEYS */;
/*!40000 ALTER TABLE `programa` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sede`
--
DROP TABLE IF EXISTS `sede`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sede` (
`sed_codigo` varchar(25) NOT NULL,
`sed_nombre` varchar(45) NOT NULL,
`sed_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`sed_id`),
UNIQUE KEY `sed_codigo_UNIQUE` (`sed_codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `sede`
--
LOCK TABLES `sede` WRITE;
/*!40000 ALTER TABLE `sede` DISABLE KEYS */;
/*!40000 ALTER TABLE `sede` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `temporal_docente`
--
DROP TABLE IF EXISTS `temporal_docente`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `temporal_docente` (
`doc_documento` varchar(255) DEFAULT NULL,
`doc_nombre` varchar(255) DEFAULT NULL,
`doc_correo` varchar(255) DEFAULT NULL,
`doc_telefono` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `temporal_docente`
--
LOCK TABLES `temporal_docente` WRITE;
/*!40000 ALTER TABLE `temporal_docente` DISABLE KEYS */;
/*!40000 ALTER TABLE `temporal_docente` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `temporal_evaluacion`
--
DROP TABLE IF EXISTS `temporal_evaluacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `temporal_evaluacion` (
`curso_n` varchar(255) DEFAULT NULL,
`semestre` varchar(255) DEFAULT NULL,
`sede` varchar(255) DEFAULT NULL,
`fecini_bloque` varchar(255) DEFAULT NULL,
`fecfin_bloque` varchar(255) DEFAULT NULL,
`fac_codigo` varchar(255) DEFAULT NULL,
`facultad` varchar(255) DEFAULT NULL,
`programa` varchar(255) DEFAULT NULL,
`curso` varchar(255) DEFAULT NULL,
`cedula` varchar(255) DEFAULT NULL,
`docente` varchar(255) DEFAULT NULL,
`modulo` varchar(255) DEFAULT NULL,
`curriculo` varchar(255) DEFAULT NULL,
`plan_aula` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `temporal_evaluacion`
--
LOCK TABLES `temporal_evaluacion` WRITE;
/*!40000 ALTER TABLE `temporal_evaluacion` DISABLE KEYS */;
/*!40000 ALTER TABLE `temporal_evaluacion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `usuario`
--
DROP TABLE IF EXISTS `usuario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `usuario` (
`usu_id` int(11) NOT NULL AUTO_INCREMENT,
`usu_correo` varchar(255) NOT NULL,
`usu_nombre` varchar(150) DEFAULT NULL,
`usu_pass` varbinary(255) DEFAULT NULL,
`usu_salt` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`usu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `usuario`
--
LOCK TABLES `usuario` WRITE;
/*!40000 ALTER TABLE `usuario` DISABLE KEYS */;
/*!40000 ALTER TABLE `usuario` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Temporary table structure for view `v_calificacion`
--
DROP TABLE IF EXISTS `v_calificacion`;
/*!50001 DROP VIEW IF EXISTS `v_calificacion`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v_calificacion` (
`id_calificacion` tinyint NOT NULL,
`nota_calificada` tinyint NOT NULL,
`observacion_calificacion` tinyint NOT NULL,
`plan_mejora` tinyint NOT NULL,
`id_usuario_ingresa` tinyint NOT NULL,
`id_usuario_modifica` tinyint NOT NULL,
`id_Formulario` tinyint NOT NULL,
`Fase_formato` tinyint NOT NULL,
`Fase_califica_formato` tinyint NOT NULL,
`item_formato` tinyint NOT NULL,
`descripcion_formato` tinyint NOT NULL,
`puntaje_max_formato` tinyint NOT NULL,
`id_Evalucion` tinyint NOT NULL,
`cur_id` tinyint NOT NULL,
`Nombre_Curso` tinyint NOT NULL,
`sed_id` tinyint NOT NULL,
`Nombre_Sede` tinyint NOT NULL,
`fac_id` tinyint NOT NULL,
`Nombre_Facultad` tinyint NOT NULL,
`prog_id` tinyint NOT NULL,
`Nombre_Programa` tinyint NOT NULL,
`eva_doc_id` tinyint NOT NULL,
`Nombre_Docente` tinyint NOT NULL,
`Docu_Docente` tinyint NOT NULL,
`Correo_Docente` tinyint NOT NULL,
`Tel_Docente` tinyint NOT NULL,
`eva_care_id` tinyint NOT NULL,
`eva_modulo` tinyint NOT NULL,
`eva_curriculo` tinyint NOT NULL,
`eva_plan_aula` tinyint NOT NULL,
`eva_fecing` tinyint NOT NULL,
`eva_fecmod` tinyint NOT NULL,
`eva_usu_mod_id` tinyint NOT NULL,
`Nombre_usu_modifica` tinyint NOT NULL,
`eva_usu_ing_id` tinyint NOT NULL,
`Nombre_Usu_Ingresa` tinyint NOT NULL,
`eva_estado` tinyint NOT NULL,
`Nombre_Archivo_Carga` tinyint NOT NULL,
`Semestre_carga` tinyint NOT NULL,
`Anio_carga` tinyint NOT NULL,
`Observaciones_Carga` tinyint NOT NULL
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
--
-- Temporary table structure for view `v_docente`
--
DROP TABLE IF EXISTS `v_docente`;
/*!50001 DROP VIEW IF EXISTS `v_docente`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v_docente` (
`doc_id` tinyint NOT NULL,
`doc_documento` tinyint NOT NULL,
`doc_nombre` tinyint NOT NULL,
`doc_correo` tinyint NOT NULL,
`doc_telefono` tinyint NOT NULL,
`doc_fecing` tinyint NOT NULL,
`doc_fecmod` tinyint NOT NULL,
`doc_usu_ing_id` tinyint NOT NULL,
`Nombre_usu_ingresa` tinyint NOT NULL,
`doc_usu_mod_id` tinyint NOT NULL,
`Nombre_us_modifica` tinyint NOT NULL,
`doc_idcarga` tinyint NOT NULL,
`Fecha_carga` tinyint NOT NULL,
`Usuario_carga` tinyint NOT NULL,
`completo_carga` tinyint NOT NULL,
`Observacion_carga` tinyint NOT NULL,
`Errores_carga` tinyint NOT NULL
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
--
-- Temporary table structure for view `v_evalucion`
--
DROP TABLE IF EXISTS `v_evalucion`;
/*!50001 DROP VIEW IF EXISTS `v_evalucion`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v_evalucion` (
`id_evalucion` tinyint NOT NULL,
`cur_id` tinyint NOT NULL,
`Nombre_Curso` tinyint NOT NULL,
`sed_id` tinyint NOT NULL,
`Nombre_Sede` tinyint NOT NULL,
`fac_id` tinyint NOT NULL,
`Nombre_Facultad` tinyint NOT NULL,
`prog_id` tinyint NOT NULL,
`Nombre_Programa` tinyint NOT NULL,
`eva_doc_id` tinyint NOT NULL,
`Nombre_Docente` tinyint NOT NULL,
`Docu_Docente` tinyint NOT NULL,
`Correo_Docente` tinyint NOT NULL,
`Tel_Docente` tinyint NOT NULL,
`eva_care_id` tinyint NOT NULL,
`eva_modulo` tinyint NOT NULL,
`eva_curriculo` tinyint NOT NULL,
`eva_plan_aula` tinyint NOT NULL,
`eva_fecing` tinyint NOT NULL,
`eva_fecmod` tinyint NOT NULL,
`eva_usu_mod_id` tinyint NOT NULL,
`Nombre_usu_modifica` tinyint NOT NULL,
`eva_usu_ing_id` tinyint NOT NULL,
`Nombre_Usu_Ingresa` tinyint NOT NULL,
`eva_estado` tinyint NOT NULL,
`Nombre_Archivo_Carga` tinyint NOT NULL,
`Semestre_carga` tinyint NOT NULL,
`Anio_carga` tinyint NOT NULL,
`Observaciones_Carga` tinyint NOT NULL
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
--
-- Dumping routines for database 'califica'
--
--
-- Final view structure for view `v_calificacion`
--
/*!50001 DROP TABLE IF EXISTS `v_calificacion`*/;
/*!50001 DROP VIEW IF EXISTS `v_calificacion`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8mb4 */;
/*!50001 SET character_set_results = utf8mb4 */;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_calificacion` AS (select `c`.`id_calificacion` AS `id_calificacion`,`c`.`cal_nota` AS `nota_calificada`,`c`.`cal_observacion` AS `observacion_calificacion`,`c`.`cal_plan_mejora` AS `plan_mejora`,`c`.`cal_usu_ing` AS `id_usuario_ingresa`,`c`.`cal_usu_mod` AS `id_usuario_modifica`,`c`.`for_id` AS `id_Formulario`,`f`.`for_fase` AS `Fase_formato`,`f`.`for_calif_fase` AS `Fase_califica_formato`,`f`.`for_item` AS `item_formato`,`f`.`for_descripcion` AS `descripcion_formato`,`f`.`for_puntaje_max` AS `puntaje_max_formato`,`c`.`eva_id` AS `id_Evalucion`,`e`.`cur_id` AS `cur_id`,`cu`.`cur_nombre` AS `Nombre_Curso`,`e`.`sed_id` AS `sed_id`,`s`.`sed_nombre` AS `Nombre_Sede`,`e`.`fac_id` AS `fac_id`,`fa`.`fac_nombre` AS `Nombre_Facultad`,`e`.`prog_id` AS `prog_id`,`p`.`prog_nombre` AS `Nombre_Programa`,`e`.`eva_doc_id` AS `eva_doc_id`,`d`.`doc_nombre` AS `Nombre_Docente`,`d`.`doc_documento` AS `Docu_Docente`,`d`.`doc_correo` AS `Correo_Docente`,`d`.`doc_telefono` AS `Tel_Docente`,`e`.`eva_care_id` AS `eva_care_id`,`e`.`eva_modulo` AS `eva_modulo`,`e`.`eva_curriculo` AS `eva_curriculo`,`e`.`eva_plan_aula` AS `eva_plan_aula`,`e`.`eva_fecing` AS `eva_fecing`,`e`.`eva_fecmod` AS `eva_fecmod`,`e`.`eva_usu_mod_id` AS `eva_usu_mod_id`,`u`.`usu_nombre` AS `Nombre_usu_modifica`,`e`.`eva_usu_ing_id` AS `eva_usu_ing_id`,`u2`.`usu_nombre` AS `Nombre_Usu_Ingresa`,`e`.`eva_estado` AS `eva_estado`,`ce`.`care_nomarchivo` AS `Nombre_Archivo_Carga`,`ce`.`care_semestre` AS `Semestre_carga`,`ce`.`care_ano` AS `Anio_carga`,`ce`.`care_observacion` AS `Observaciones_Carga` from ((((((((((`calificacion` `c` join `formato` `f` on(`f`.`for_id` = `c`.`for_id`)) join `evaluacion` `e` on(`e`.`eva_id` = `c`.`eva_id`)) join `curso` `cu` on(`cu`.`cur_id` = `e`.`cur_id`)) join `sede` `s` on(`s`.`sed_id` = `e`.`sed_id`)) join `facultad` `fa` on(`fa`.`fac_id` = `e`.`fac_id`)) join `programa` `p` on(`p`.`prog_id` = `e`.`prog_id`)) join `docente` `d` on(`d`.`doc_id` = `e`.`eva_doc_id`)) join `usuario` `u` on(`u`.`usu_id` = `e`.`eva_usu_mod_id`)) join `usuario` `u2` on(`u2`.`usu_id` = `e`.`eva_usu_ing_id`)) join `carga_evaluacion` `ce` on(`ce`.`care_id` = `e`.`eva_care_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
--
-- Final view structure for view `v_docente`
--
/*!50001 DROP TABLE IF EXISTS `v_docente`*/;
/*!50001 DROP VIEW IF EXISTS `v_docente`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8mb4 */;
/*!50001 SET character_set_results = utf8mb4 */;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_docente` AS (select `d`.`doc_id` AS `doc_id`,`d`.`doc_documento` AS `doc_documento`,`d`.`doc_nombre` AS `doc_nombre`,`d`.`doc_correo` AS `doc_correo`,`d`.`doc_telefono` AS `doc_telefono`,`d`.`doc_fecing` AS `doc_fecing`,`d`.`doc_fecmod` AS `doc_fecmod`,`d`.`doc_usu_ing_id` AS `doc_usu_ing_id`,`u`.`usu_nombre` AS `Nombre_usu_ingresa`,`d`.`doc_usu_mod_id` AS `doc_usu_mod_id`,`u2`.`usu_nombre` AS `Nombre_us_modifica`,`d`.`doc_idcarga` AS `doc_idcarga`,`cd`.`card_fecha` AS `Fecha_carga`,`cd`.`card_usu_id` AS `Usuario_carga`,`cd`.`card_completo` AS `completo_carga`,`cd`.`card_observacion` AS `Observacion_carga`,`cd`.`card_errores` AS `Errores_carga` from (((`docente` `d` join `carga_docente` `cd` on(`cd`.`card_id` = `d`.`doc_idcarga`)) join `usuario` `u` on(`u`.`usu_id` = `d`.`doc_usu_ing_id`)) join `usuario` `u2` on(`u2`.`usu_id` = `d`.`doc_usu_mod_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
--
-- Final view structure for view `v_evalucion`
--
/*!50001 DROP TABLE IF EXISTS `v_evalucion`*/;
/*!50001 DROP VIEW IF EXISTS `v_evalucion`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8mb4 */;
/*!50001 SET character_set_results = utf8mb4 */;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_evalucion` AS (select `e`.`eva_id` AS `id_evalucion`,`e`.`cur_id` AS `cur_id`,`c`.`cur_nombre` AS `Nombre_Curso`,`e`.`sed_id` AS `sed_id`,`s`.`sed_nombre` AS `Nombre_Sede`,`e`.`fac_id` AS `fac_id`,`f`.`fac_nombre` AS `Nombre_Facultad`,`e`.`prog_id` AS `prog_id`,`p`.`prog_nombre` AS `Nombre_Programa`,`e`.`eva_doc_id` AS `eva_doc_id`,`d`.`doc_nombre` AS `Nombre_Docente`,`d`.`doc_documento` AS `Docu_Docente`,`d`.`doc_correo` AS `Correo_Docente`,`d`.`doc_telefono` AS `Tel_Docente`,`e`.`eva_care_id` AS `eva_care_id`,`e`.`eva_modulo` AS `eva_modulo`,`e`.`eva_curriculo` AS `eva_curriculo`,`e`.`eva_plan_aula` AS `eva_plan_aula`,`e`.`eva_fecing` AS `eva_fecing`,`e`.`eva_fecmod` AS `eva_fecmod`,`e`.`eva_usu_mod_id` AS `eva_usu_mod_id`,`u`.`usu_nombre` AS `Nombre_usu_modifica`,`e`.`eva_usu_ing_id` AS `eva_usu_ing_id`,`u2`.`usu_nombre` AS `Nombre_Usu_Ingresa`,`e`.`eva_estado` AS `eva_estado`,`ce`.`care_nomarchivo` AS `Nombre_Archivo_Carga`,`ce`.`care_semestre` AS `Semestre_carga`,`ce`.`care_ano` AS `Anio_carga`,`ce`.`care_observacion` AS `Observaciones_Carga` from ((((((((`evaluacion` `e` join `curso` `c` on(`c`.`cur_id` = `e`.`cur_id`)) join `sede` `s` on(`s`.`sed_id` = `e`.`sed_id`)) join `facultad` `f` on(`f`.`fac_id` = `e`.`fac_id`)) join `programa` `p` on(`p`.`prog_id` = `e`.`prog_id`)) join `docente` `d` on(`d`.`doc_id` = `e`.`eva_doc_id`)) join `usuario` `u` on(`u`.`usu_id` = `e`.`eva_usu_mod_id`)) join `usuario` `u2` on(`u2`.`usu_id` = `e`.`eva_usu_ing_id`)) join `carga_evaluacion` `ce` on(`ce`.`care_id` = `e`.`eva_care_id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-04-10 13:51:14
| 42.898194 | 2,184 | 0.71866 |
0bd24f1fc2929eaa3026c2a022b241ce609088b6 | 30,324 | js | JavaScript | read-files11.js | alanmimms/read-files11 | 6775e27822b9cfac61c5842e6407ce9e8ef87a83 | [
"MIT"
] | null | null | null | read-files11.js | alanmimms/read-files11 | 6775e27822b9cfac61c5842e6407ce9e8ef87a83 | [
"MIT"
] | null | null | null | read-files11.js | alanmimms/read-files11 | 6775e27822b9cfac61c5842e6407ce9e8ef87a83 | [
"MIT"
] | null | null | null | #!/usr/bin/env node
'use strict';
// This reads and extracts the contents of an RSX-20F (FILES11) RX-01
// MEDIA ONLY filesystem volume -- for example, a KL10 CPU's front-end
// RSX-20F RX01 floppy disk image file. The pathname of the disk image
// whose contents is to be extracted is named as the sole command line
// parameter. The extracted tree of directories and their files are
// created in the current working directory and a verbose listing of
// these is is displayed on the console while the program does its
// thing.
//
// The reason this will only work on RX01 media image files is that
// this implements the RX01 logical block to physical sector mapping
// that is, well, _strange_ for RX01. This was done for good
// performance reasons in the original RX01 design, but here in the
// 21st Century it's wierd as fuck.
const _ = require('lodash');
const fs = require('fs');
/*
3.4.5 File Header Layout -
Header Area
+-------------------+-------------------+
H.MPOF | Map Area Offset | Ident Area Offset | H.IDOF
+-------------------+-------------------+
| File Number | H.FNUM
+-------------------+-------------------+
| File Sequence Number | H.FSEQ
+-------------------+-------------------+
| File Structure Level | H.FLEV
+-------------------+-------------------+ H.FOWN
H.PROJ | File Owner UIC | H.PROG
+-------------------+-------------------+
| File Protection | H.FPRO
+-------------------+-------------------+ H.FCHA
H.SCHA | System Char's | User Char's | H.UCHA
+-------------------+-------------------+
| | H.UFAT
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
/ User File Attribute Area /
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+ S.HDHD
Ident Area
+-------------------+-------------------+
| | I.FNAM
+- -+- -+
| File Name |
+- -+- -+
| |
+-------------------+-------------------+
| File Type | I.FTYP
+-------------------+-------------------+
| Version Number | I.FVER
+-------------------+-------------------+
| Revision Number | I.RVNO
+-------------------+-------------------+
| | I.RVDT
+- -+- -+
| Revision Date |
+- -+- -+
| |
+-------------------+- -+
I.RVTI | | |
+- +-------------------+
| |
+- -+- -+
| Revision Time |
+- -+- -+
+-------------------+- -+
I.CRDT | | |
+- +-------------------+
| |
+- -+- -+
| Creation Date |
+- -+- -+
| |
+-------------------+-------------------+
| | I.CRTI
+- -+- -+
| Creation Time |
+- -+- -+
| |
+-------------------+-------------------+
| | I.EXDT
+- -+- -+
| Revision Date |
+- -+- -+
| |
+-------------------+- -+
| Unused | |
+-------------------+-------------------+ S.IDHD
Map Area
+-------------------+-------------------+
M.ERVN | Extension RVN | Extension Seq Num | M.ESQN
+-------------------+-------------------+
| Extension File Number | M.EFNU
+-------------------+-------------------+
| Extension File Sequence Number | M.EFSQ
+-------------------+-------------------+
M.LBSZ | LBN Field Size | Count Field Size | M.CTSZ
+-------------------+-------------------+
M.MAX | Map Words Avail. | Map Words in Use | M.USE
+-------------------+-------------------+ S.MPHD
| | M.RTRV
+- -+- -+
| |
/ Retrieval Pointers /
| |
+- -+- -+
| |
+-------------------+-------------------+
| File Header Checksum | H.CKSM
+-------------------+-------------------+
5.1.3 Home Block Layout -
+-------------------+-------------------+
| Index File Bitmap Size | H.IBSZ
+-------------------+-------------------+
| Index File Bitmap LBN | H.IBLB
+- -+- -+
| |
+-------------------+-------------------+
| Maximum Number of Files | H.FMAX
+-------------------+-------------------+
| Storage Bitmap Cluster Factor | H.SBCL
+-------------------+-------------------+
| Disk Device Type | H.DVTY
+-------------------+-------------------+
| Volume Structure Level | H.VLEV
+-------------------+-------------------+
| | H.VNAM
+- -+- -+
| |
+- -+- -+
| Volume Name |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | Unused
+- -+- -+
| |
+-------------------+-------------------+
| Volume Owner UIC | H.VOWN
+-------------------+-------------------+
| Volume Protection | H.VPRO
+-------------------+-------------------+
| Volume Characteristics | H.VCHA
+-------------------+-------------------+
| Default File Protection | H.DFPR
+-------------------+-------------------+
| | Unused
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
H.FIEX | Def. File Extend | Def. Window Size | H.WISZ
+-------------------+-------------------+
H.REVD | | Directory Limit | H.LRUC
+- -+-------------------+
| |
+- -+- -+
| Volume Modification Date |
+- -+- -+
| |
+-------------------+-------------------+
| Volume Modification Count | H.REVC
+-------------------+-------------------+
| | Unused
+-------------------+-------------------+
| First Checksum | H.CHK1
+-------------------+-------------------+
| | H.VDAT
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| Volume Creation Date |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | Unused
+- -+- -+
| |
/ -+- /
| |
+- -+- -+
| |
+-------------------+-------------------+
| Pack Serial Number | H.PKSR
+- -+- -+
| |
+-------------------+-------------------+
| | Unused
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | H.INDN
+- -+- -+
| |
+- -+- -+
| Volume Name |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | H.INDO
+- -+- -+
| |
+- -+- -+
| Volume Owner |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | H.INDF
+- -+- -+
| |
+- -+- -+
| Format Type |
+- -+- -+
| |
+- -+- -+
| |
+- -+- -+
| |
+-------------------+-------------------+
| | Unused
+-------------------+-------------------+
| Second Checksum | H.CHK2
+-------------------+-------------------+
*/
// Define the constants we use in the FILES11 system by literally
// parsing the SYMBOL TABLE DUMP from MOUNT.LST. I don't care about
// any symbols containing "$" so I don't bother substituting it with
// anything.
//
// If an element name is of the form x.yyy and we have a prefixes
// entry named `x` then add `yyy` to that prefix object. When this is
// done we can refer to x.yyy in our JavaScript code and it will "just
// work".
//
// I have made no attempt to reduce the list. Items here that I don't
// need are simply never used.
const F = {};
const H = {};
const I = {};
const S = {};
const prefixes = {F, H, I, S};
const C = `\
AC.DLK= 000002 H.FCHA= 000014 I.IOSB 000016 Q.IOPR= 000007 W.STD 000004
AC.LCK= 000001 H.FIEX= 000055 I.LGTH 000040 Q.IOSB= 000010 W.VBN 000006
A.TD = ****** GX H.FLEV= 000006 I.LNK 000000 RLB 000016R W.WISZ 000007
BITFNU= 000002 H.FMAX= 000006 I.LUN 000012 R$$10F= 000001 $CHAR 000052RG
CMDBFL= 001000 H.FNUM= 000002 I.PRI 000010 R$$11D= 000001 $EXT 000056RG
EX.AC1= 000001 H.FOWN= 000010 I.PRM 000024 SC.BAD= 000100 $FLAGS 000064RG
EX.AC2= 000002 H.FPRO= 000044 I.RTRV 000034 SC.MDL= 000200 $FPRO 000060RG
EX.ADF= 000010 H.FSEQ= 000004 I.RVDT= 000014 SETCHA 000000R $LRU 000063RG
EX.ENA= 000200 H.IBLB= 000002 I.RVNO= 000012 S.HDHD= 000056 $PRO 000054RG
EX.FCO= 000004 H.IBSZ= 000000 I.RVTI= 000023 S.IDHD= 000056 $UIC 000050RG
E$$MSG= 000001 H.IDOF= 000000 I.RWAD= 000024 S.MPHD= 000012 $VNAM 000046RG
E$$TRP= 000001 H.INDF= 000760 I.RWAT 000026 S.STBK= 000012 $VNML 000044RG
FCPLUN= 000001 H.INDN= 000730 I.RWCT= 000026 UC.CON= 000200 $WIN 000062RG
FC.CEF= 020000 H.INDO= 000744 I.RWVB= 000032 UC.DLK= 000100 $$ = 000067
FC.DIR= 040000 H.LRUC= 000056 I.STD 000004 UC.SWL= ****** GX $$$ARG= 000013
FC.FCO= 010000 H.MPOF= 000001 I.TISZ= 000006 U.AR = ****** GX $$$OST= 000014
FC.WAC= 100000 H.PROG= 000010 I.UIC 000022 U.CH = ****** GX .ALLOC= ****** GX
FP.DEL= 000010 H.PROJ= 000011 LBNH = 000040R U.C1 = ****** GX .BLXI = ****** GX
FP.EXT= 000004 H.SBCL= 000010 LBNL = 000042R U.LBH = ****** GX .CKSM1= ****** GX
FP.RAT= 000001 H.SCHA= 000015 LEV11M= 000401 U.LBN = ****** GX .CKSUM= ****** GX
FP.RDV= 000001 H.UCHA= 000014 LOWFCN= 000011 U.UI = ****** GX .CRFCB= ****** GX
FP.WRV= 000002 H.UFAT= 000016 ME.NHM= 000012 U.VA = ****** GX .CRTSK= ****** GX
F$$LVL= 000001 H.VCHA= 000042 ME.SYN= 000007 VC.BMW= 000002 .DFEXT= 000005
F.DREF 000042 H.VDAT= 000074 ME.WRV= 000013 VC.IFW= 000001 .DFPRO= 164000
F.DRNM 000044 H.VLEV= 000014 MFDFNO= 000004 V.FCB 000006 .FCBAD= ****** GX
F.FEXT 000002 H.VNAM= 000016 MFDFSQ= 000004 V.FFNU 000055 .FILNO= ****** GX
F.FNUM 000006 H.VOWN= 000036 MO.CHA= 000002 G V.FIEX 000025 .FILSQ= ****** GX
F.FOWN 000014 H.VPRO= 000040 MO.EXT= 000020 G V.FMAX 000016 .HDBUF= ****** GX
F.FPRO 000016 H.WISZ= 000054 MO.FPR= 000040 G V.FPRO 000030 .INWIN= ****** GX
F.FSEQ 000010 IDXFNU= 000001 MO.LRU= 001000 G V.FRBK 000034 .IOPKT= ****** GX
F.FSQN 000013 ID$$$ = 000222 MO.OVR= 000200 G V.IBLB 000012 .IOSTS= ****** GX
F.FVBN 000046 IE.ABO= ****** GX MO.PRO= 000004 G V.IBSZ 000013 .MOKTB= ****** GX
F.HDLB 000022 IE.IFC= ****** GX MO.SWL= 000400 G V.IFWI 000002 .MOPRS= ****** GX
F.LBN 000026 IE.VER= ****** GX MO.UIC= 000001 G V.LABL 000040 .MOUNT 000066RG
F.LGTH 000052 IO.RLB= ****** GX MO.UNL= 000010 G V.LGTH 000056 .MXQIO= ****** GX
F.LINK 000000 IO.STC= ****** GX MO.WIN= 000100 G V.LRUC 000035 .PRFIL= 000004
F.NACS 000036 I.ACTL 000035 M$$HDR= 000001 V.SBCL 000021 .QIOST= ****** GX
F.NLCK 000037 I.AST 000020 M.CTSZ= 000006 V.SBLB 000024 .RHDFN= ****** GX
F.NWAC 000040 I.ATL 000006 M.EFNU= 000002 V.SBSZ 000022 .RHDLB= ****** GX
F.RVN 000012 I.CRDT= 000031 M.EFSQ= 000004 V.STAT 000054 .RTPTF= 001401
F.SCHA 000021 I.CRTI= 000040 M.ERVN= 000001 V.STD 000004 .SMBUF= ****** GX
F.SIZE 000032 I.DASZ= 000007 M.ESQN= 000000 V.TRCT 000000 .SMRVB= ****** GX
F.STAT 000040 I.DPB 000011 M.LBSZ= 000007 V.WISZ 000020 .SMUCB= ****** GX
F.STD 000004 I.EFN 000013 M.MAX = 000011 WI.BPS= 100000 .SMVBN= ****** GX
F.UCHA 000020 I.EXDT= 000046 M.RTRV= 000012 WI.DLK= 010000 .SYUIC= 000010
F11PR$= 000000 I.EXTD 000030 M.USE = 000010 WI.EXT= 002000 .TPARS= ****** GX
HIFCN = 000030 I.FCN 000014 QIOEFN= 000002 WI.LCK= 004000 .UCBAD= ****** GX
HOMEBL 000424R I.FIDP 000024 Q.IOAE= 000012 WI.RDV= 000400 .VBSIZ= 001000
H.CHK1= 000072 I.FNAM= 000000 Q.IOEF= 000006 WI.WRV= 001000 .WNDOW= ****** GX
H.CHK2= 000776 I.FNBP 000036 Q.IOFN= 000002 W.CTL 000000 ...GBL= 000000
H.CKSM= 000776 I.FTYP= 000006 Q.IOLU= 000004 W.FCB 000002 ...TPC= 001000
H.DVTY= 000012 I.FVER= 000010 Q.IOPL= 000014 W.RTRV 000012
`.split(/[\t\n]/)
.reduce((cur, e) => {
e = e.trimStart();
const [id, val] = [e.slice(0, 6).trim(), parseInt(e.slice(8, 14), 8)];
if (id && Number.isInteger(val)) {
cur[id] = val;
const dotPos = id.indexOf('.');
if (dotPos > 0) {
const prefix = id.slice(0, dotPos);
const postfix = id.slice(dotPos + 1);
if (prefix && prefixes[prefix] && postfix) {
prefixes[prefix][postfix] = val;
}
}
}
return cur;
}, {});
const indexFID = [1, 1, 0];
const mfdFID = [4, 4, 0];
const r50ToASCII = ` ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789`;
// Edited for clarity from
// (http://gunkies.org/wiki/RX0x_floppy_drive)[RX0x floppy drive - Computer History Wiki].
//
// RX01 DRIVE
// Total Surfaces: 1
// Tracks Per Surface: 77 (76 used)
// Sectors Per Track: 26
//
// DEC normally left track 0 unused (although it was not used to hold
// bootstraps). This was because the standard IBM format reserved
// track 0 for special purposes.
//
// They also used an idiosyncratic layout of the 'logical' sectors on
// a floppy, intended to maximize the performance: the first logical
// sector of each data track was offset by six 'physical' sectors from
// the 'first' sector of the preceding track, and sequential logical
// sectors were on alternating physical sectors.
const nTracks = 76; // Ignore track #0
const sectorsPerTrack = 26;
const sectorSize = 128;
const blockSize = 512;
const sectorsPerBlock = blockSize / sectorSize;
const trackSize = sectorSize * sectorsPerTrack;
const nBlocks = nTracks * trackSize / blockSize;
// Read the RX01 media image in so we can swizzle it.
const rawBuf = fs.readFileSync(process.argv[2]);
// Convert rawBuf RX01 media sector-mapped the RX01 way to buf so we
// can view it as a sequence of logical 512B blocks as required by
// FILES-11 structure.
const buf = convertToLogicalBlocks(rawBuf);
const homeBlockOffset = 0x800;
const homeBlock = buf.slice(homeBlockOffset);
const indexBitmapOffset = homeBlockOffset + 0o1000;
const indexBitmap = buf.slice(indexBitmapOffset);
const fileHeadersOffset = indexBitmapOffset + 0o1000 * w16(homeBlock, H.IBSZ);
const fileHeaders = buf.slice(fileHeadersOffset);
console.log(`buf.length=0x${buf.length.toString(16)}`);
const bpl = 16;
const dump = _.range(0, Math.min(1024*1024, buf.length), bpl)
.map(off => {
return `${off.toString(16).padStart(6, '0')}: ` +
_.range(off, off+bpl, 2)
.map(bo => buf.readUInt16LE(bo).toString(16).padStart(4, '0'))
.join(' ') +
` '${fromR50(_.range(off, off+bpl, 2).map(bo => buf.readUInt16LE(bo)), false)}'` +
` "` + _.range(off, off+bpl).map(bo => {
const byte = buf.readUInt8(bo);
return _.inRange(byte, 32, 128) ? String.fromCharCode(byte) : '.';
}).join('') + `"`;
})
.join('\n');
fs.writeFileSync(process.argv[2] + '.hexdump', dump);
console.log(`
Volume Home Block:
Index File Bitmap Size: ${w16(homeBlock, H.IBSZ)}
Index File BitMap LBN: 0x${w32(homeBlock, H.IBLB).toString(16)}
Maximum Number of Files: ${w16(homeBlock, H.FMAX)}
Storage Bitmap Cluster Factor: ${w16(homeBlock, H.SBCL)}
Disk Device Type: ${w16(homeBlock, H.DVTY)}
Volume Structure Level: 0o${w16(homeBlock, H.VLEV).toString(8)}
Volume Name: ${str(homeBlock, H.VNAM, 12)}
Owner UIC: [${uic(homeBlock, H.VOWN)}]
Volume Characteristics: 0x${w16(homeBlock, H.VCHA).toString(16)}
First Checksum: 0x${w16(homeBlock, H.CHK1).toString(16)} off=0x${Number(homeBlockOffset + H.CHK1).toString(16)}
Volume Creation Date: ${str(homeBlock, H.VDAT, 14)}
Volume Owner: ${str(homeBlock, H.INDO, 12)} off=0x${Number(homeBlockOffset + H.INDO).toString(16)}
Second Checksum: 0x${w16(homeBlock, H.CHK2).toString(16)}
`);
console.log(`
IndexBitmapOffset: 0x${indexBitmapOffset.toString(16)}
FileHeadersOffset: 0x${fileHeadersOffset.toString(16)}
`);
// File Headers offsets from on-disk structure
H.IDOF = w8(fileHeaders, H.IDOF);
H.MPOF = w8(fileHeaders, H.MPOF);
console.log(`
File Headers:
Ident Area Offset: 0x${(w8(fileHeaders, H.IDOF)*2).toString(16)} bytes
Map Area Offset: 0x${(w8(fileHeaders, H.MPOF)*2).toString(16)} bytes
File Number: ${w16(fileHeaders, H.FNUM)}
File Sequence Number: ${w16(fileHeaders, H.FSEQ)}
File Structure Level: 0o${w16(fileHeaders, H.FLEV).toString(8)}
File Owner: [${uic(fileHeaders, H.FOWN)}]
`);
/*
console.log(`
File Name: ${fromR50(w16x3(fileHeaders, H.HDHD + I.FNAM))}
File Type: ${fromR50([w16(fileHeaders, H.HDHD + I.FTYP)])}
File Revision Date: ${str(fileHeaders, H.HDHD + I.RVDT, 7)}
`);
*/
if ('testing' == 'not-testing') {
console.log(`R50 [1683,6606]=${fromR50([1683, 6606])}`);
console.log(`R50 for 'ABCDEF=${toR50('ABCDEF')}'`);
}
function str(buf, offset, len) {
return buf.toString('latin1', offset, offset + len);
}
function w8(buf, offset) {
return buf.readUInt8(offset);
}
function w16(buf, offset) {
return buf.readUInt16LE(offset);
}
function w32(buf, offset) {
return (buf.readUInt16LE(offset) << 16) | buf.readUInt16LE(offset+2);
}
function uic(buf, offset) {
return [buf.readUInt8(offset+1), buf.readUInt8(offset)];
}
// Return a three word array of w16 from offset
function w16x3(buf, offset) {
return [buf.readUInt16LE(offset+0), buf.readUInt16LE(offset+2), buf.readUInt16LE(offset+4)];
}
function r50Byte(w, pos) {
const div = Math.pow(40, pos);
const cx = Math.floor(w / div) % 40;
return r50ToASCII.charAt(cx);
}
// From the specified array of little-endian PDP-11 words in
// RADIX-50 format (three characters per word) into an ASCII string
// and return it.
function fromR50(words, trim = true) {
const s = words.reduce((cur, w) => cur + r50Byte(w, 2) + r50Byte(w, 1) + r50Byte(w, 0), "");
return trim ? s.trim() : s;
}
// From the specified string return the little-endian PDP-11 words to
// encode the string in RADIX-50 format. The string is padded on the
// end to a multiple of three bytes.
function toR50(str) {
return str.padEnd(Math.floor((str.length + 2) / 3) * 3)
.match(/.{3}/g)
.map(s =>
r50ToASCII.indexOf(s.charAt(0)) * 40 * 40 +
r50ToASCII.indexOf(s.charAt(1)) * 40 +
r50ToASCII.indexOf(s.charAt(2)));
}
// Copy the Buffer instance `rx01RawBuf` from the physical media mapping to
// logical block mapping required by FILES-11.
function convertToLogicalBlocks(rx01RawBuf) {
const logical = Buffer.allocUnsafe((nTracks + 1) * trackSize);
for (let b = 0; b < nBlocks; ++b) {
const bOffset = b * blockSize;
for (let sectorN = 0; sectorN < sectorsPerBlock; ++sectorN) {
const logicalSector = b * sectorsPerBlock + sectorN;
const [track, sector] = logicalToRX01Physical(logicalSector);
const srcOffset = track * trackSize + sector * sectorSize;
console.log(`b=${b} sectorN=${sectorN}, logicalSector=${logicalSector}, track=${track}, sector=${sector}, srcOffset=${srcOffset}`);
rx01RawBuf.copy(logical, bOffset + sectorN * sectorSize, srcOffset, srcOffset + sectorSize);
}
}
return logical;
}
// Translate a logical sector number `s` into physical track and
// sector numbers.
//
// This fragment of C code implements the logical to physical
// track/sector translation:
//
// ```
// #define NSECT 26
//
// int track = blkno / NSECT;
//
// // Alternate sectors within track using modulo
// int i = (blkno % NSECT) * 2;
// if (i >= NSECT) ++i;
//
// // 6-sector offset and 1-origin sector numbering 1..26
// int sector = (i + 6 * track) % NSECT + 1;
//
// // Skip track 0 entirely, so 1-origin track numbering 1..76
// ++track;
// ```
function logicalToRX01Physical(s) {
let track = Math.floor(s / sectorsPerTrack);
// Alternate sectors within track using modulo
let sector = s % sectorsPerTrack * 2;
if (sector >= sectorsPerTrack) ++sector;
// 6-sector offset and 1-origin sector numbering 1..26
sector = (sector + 6*track) % sectorsPerTrack + 1;
++track; // Skip track #0 entirely
return [track, sector];
}
// RSX11mplus disk: RX01 floppy image
// 23E volume create date 113E
// 3E4 volume owner 1464
| 50.288557 | 137 | 0.341512 |
c19739ef6fcb053d9363c0a5d659edff2c39b5f7 | 185 | kt | Kotlin | module/test/src/jvmTest/kotlin/DumperReflectionTest.kt | softappeal/yass2 | f7da57a9e4799a060196fc0a190b17984d97e886 | [
"BSD-3-Clause"
] | 13 | 2019-08-09T05:29:00.000Z | 2022-03-06T02:46:31.000Z | module/test/src/jvmTest/kotlin/DumperReflectionTest.kt | softappeal/yass2 | f7da57a9e4799a060196fc0a190b17984d97e886 | [
"BSD-3-Clause"
] | null | null | null | module/test/src/jvmTest/kotlin/DumperReflectionTest.kt | softappeal/yass2 | f7da57a9e4799a060196fc0a190b17984d97e886 | [
"BSD-3-Clause"
] | null | null | null | package ch.softappeal.yass2
import ch.softappeal.yass2.reflect.*
class DumperReflectionTest : DumperGeneratedTest() {
override val dumperProperties = ReflectionDumperProperties
}
| 23.125 | 62 | 0.816216 |
3faac76f19d454ef0d241d3e56701bd5f7f8ecbf | 22,079 | h | C | production_apps/BEM4I/BEIntegratorHelmholtz.h | readex-eu/readex-apps | 38493b11806c306f4e8f1b7b2d97764b45fac8e2 | [
"BSD-3-Clause"
] | 2 | 2020-11-25T13:10:11.000Z | 2021-03-15T20:26:35.000Z | production_apps/BEM4I/BEIntegratorHelmholtz.h | readex-eu/readex-apps | 38493b11806c306f4e8f1b7b2d97764b45fac8e2 | [
"BSD-3-Clause"
] | null | null | null | production_apps/BEM4I/BEIntegratorHelmholtz.h | readex-eu/readex-apps | 38493b11806c306f4e8f1b7b2d97764b45fac8e2 | [
"BSD-3-Clause"
] | 1 | 2018-09-30T19:04:38.000Z | 2018-09-30T19:04:38.000Z | /*!
* @file BEIntegratorHelmholtz.h
* @author Jan Zapletal
* @date August 12, 2013
* @brief Header file for class BEIntegratorHelmholtz
*
*/
#ifndef BEINTEGRATORHELMHOLTZ_H
#define BEINTEGRATORHELMHOLTZ_H
#include "BEIntegrator.h"
//#include "BESpace.h"
namespace bem4i {
/*!
* concrete class for Helmholtz integrators over triangular elements
*
* the class uses Curiously recurring template pattern to replace virtual methods
*/
template<class LO, class SC>
class BEIntegratorHelmholtz : public BEIntegrator<LO, SC, BEIntegratorHelmholtz<LO, SC> > {
typedef typename GetType<LO, SC>::SCVT SCVT;
friend class BEIntegrator<LO, SC, BEIntegratorHelmholtz<LO, SC> >;
public:
//! default constructor
BEIntegratorHelmholtz( );
//! copy constructor
BEIntegratorHelmholtz( const BEIntegratorHelmholtz& orig );
//! constructor taking BESpace as the argument
BEIntegratorHelmholtz(
BESpace<LO, SC>* space,
int* quadratureOrder,
SC kappa,
quadratureType quadrature = SauterSchwab,
int* quadratureOrderDisjointElems = nullptr
);
//! destructor
virtual ~BEIntegratorHelmholtz( );
//! returns element matrix of single layer potential
void computeElemMatrix1Layer(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
//! returns element matrix of double layer potential
void computeElemMatrix2Layer(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
//! returns element matrix of hypersingular operator
void computeElemMatrixHypersingular(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrixH1SauterSchwabP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrixH2SauterSchwabP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
/*
* evaluates the representation formula in points x, stores values in
* preallocated vector values
*
* @param[in] xCoord pointer to array of evaluation points
* @param[in] n number of evaluation points
* @param[in] dir Dirichlet data
* @param[in] neu Neumann data
* @param[in] interior flag interior/exterior
* @param[out] values preallocated vector for storing results
*/
void representationFormula(
const SCVT *xCoord,
LO n,
const Vector<LO, SC> & dir,
const Vector<LO, SC> & neu,
bool interior,
Vector<LO, SC> & values
) const {
if ( this->space->getTestFunctionType( ) == p1 &&
this->space->getAnsatzFunctionType( ) == p1 ) {
representationFormulaP1P1( xCoord, n, dir, neu, interior, values );
} else if ( this->space->getTestFunctionType( ) == p0 &&
this->space->getAnsatzFunctionType( ) == p0 ) {
representationFormulaP0P0( xCoord, n, dir, neu, interior, values );
} else {
representationFormulaP1P0( xCoord, n, dir, neu, interior, values );
}
};
/*
* evaluates the representation formula in points x
* for p1 Dirchlet, p0 Neumann data,
* stores values in preallocated vector values
*
* @param[in] xCoord pointer to array of evaluation points
* @param[in] n number of evaluation points
* @param[in] dir Dirichlet data
* @param[in] neu Neumann data
* @param[in] interior flag interior/exterior
* @param[out] values preallocated vector for storing results
*/
void representationFormulaP1P0(
const SCVT *x,
LO n,
const Vector<LO, SC> & dir,
const Vector<LO, SC> & neu,
bool interior,
Vector<LO, SC> & values
) const;
/*
* evaluates the representation formula in points x
* for p1 Dirchlet, p1 Neumann data,
* stores values in preallocated vector values
*
* @param[in] xCoord pointer to array of evaluation points
* @param[in] n number of evaluation points
* @param[in] dir Dirichlet data
* @param[in] neu Neumann data
* @param[in] interior flag interior/exterior
* @param[out] values preallocated vector for storing results
*/
void representationFormulaP1P1(
const SCVT *x,
LO n,
const Vector<LO, SC> & dir,
const Vector<LO, SC> & neu,
bool interior,
Vector<LO, SC> & values
) const;
/*
* evaluates the representation formula in points x
* for p0 Dirchlet, p0 Neumann data,
* stores values in preallocated vector values
*
* @param[in] xCoord pointer to array of evaluation points
* @param[in] n number of evaluation points
* @param[in] dir Dirichlet data
* @param[in] neu Neumann data
* @param[in] interior flag interior/exterior
* @param[out] values preallocated vector for storing results
*/
void representationFormulaP0P0(
const SCVT *x,
LO n,
const Vector<LO, SC> & dir,
const Vector<LO, SC> & neu,
bool interior,
Vector<LO, SC> & values
) const;
/*
* evaluates double layer potential in points x, stores values in
* preallocated vector values
*
* @param[in] x pointer to array with evaluation points
* @param[in] nPoints number of evaluation points
* @param[in] density density function
* @param[out] values preallocated vector for storing results
*/
void doubleLayerPotential(
const SCVT * x,
LO nPoints,
const Vector<LO, SC> & density,
Vector<LO, SC> & values
) const {
this->doubleLayerPotentialP1( x, nPoints, density, values );
}
/*
* evaluates double layer potential in points x
* for p1 density,
* stores values in preallocated vector values
*
* @param[in] x pointer to array with evaluation points
* @param[in] nPoints number of evaluation points
* @param[in] density density function
* @param[out] values preallocated vector for storing results
*/
void doubleLayerPotentialP1(
const SCVT * x,
LO nPoints,
const Vector<LO, SC> & density,
Vector<LO, SC> & values
) const;
/*
* evaluates single layer potential in points x, stores values in
* preallocated vector values
*
* @param[in] x pointer to array with evaluation points
* @param[in] nPoints number of evaluation points
* @param[in] density density function
* @param[out] values preallocated vector for storing results
*/
void singleLayerPotential(
const SCVT * x,
LO nPoints,
const Vector<LO, SC> & density,
Vector<LO, SC> & values
) const {
this->singleLayerPotentialP0( x, nPoints, density, values );
}
/*
* evaluates single layer potential in points x
* for p1 density,
* stores values in preallocated vector values
*
* @param[in] x pointer to array with evaluation points
* @param[in] nPoints number of evaluation points
* @param[in] density density function
* @param[out] values preallocated vector for storing results
*/
void singleLayerPotentialP0(
const SCVT * x,
LO nPoints,
const Vector<LO, SC> & density,
Vector<LO, SC> & values
) const;
protected:
//! returns element matrix of single layer potential for regular pairs
void computeElemMatrixHypersingularDisjointP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
private:
/*
* returns local matrix for Helmholtz single layer operator with p0p0 approximation
*
* @param[in] outerElem index of outer element
* @param[in] innerElem index of inner element
* @param[out] matrix preallocated local matrix
*/
void computeElemMatrix1LayerP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
//! returns element matrix of single layer potential with p1p1 approximation
void computeElemMatrix1LayerP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC> & matrix
) const;
void computeElemMatrix1LayerSauterSchwabP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix1LayerSauterSchwabP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix1LayerDisjointP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix1LayerDisjointP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
/*
* returns local matrix for Helmholtz double layer operator with p0p1 approximation
*
* @param[in] outerElem index of outer element
* @param[in] innerElem index of inner element
* @param[out] matrix preallocated local matrix
*/
void computeElemMatrix2LayerP0P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
//! returns element matrix of double layer potential with p0p0 approximation
void computeElemMatrix2LayerP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC> & matrix
) const;
//! returns element matrix of double layer potential with p1p1 approximation
void computeElemMatrix2LayerP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC> & matrix
) const;
void computeElemMatrix2LayerSauterSchwabP0P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix2LayerSauterSchwabP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix2LayerSauterSchwabP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix2LayerDisjointP0P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix2LayerDisjointP0P0(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
void computeElemMatrix2LayerDisjointP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
/*
* returns local matrix for Helmholtz hypersingular operator with p0p0 approximation
*
* @param[in] outerElem index of outer element
* @param[in] innerElem index of inner element
* @param[in] precomputed surface curls of test function
* @param[in] precomputed surface curls of ansatz functions
* @param[out] matrix preallocated local matrix
*/
void computeElemMatrixHypersingularP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
/*
* returns local matrix for Helmholtz hypersingular operator with p0p0 approximation
*
* @param[in] outerElem index of outer element
* @param[in] innerElem index of inner element
* @param[out] matrix preallocated local matrix
*/
void computeElemMatrixHypersingularSauterSchwabP1P1(
LO outerElem,
LO innerElem,
FullMatrix<LO, SC>& matrix
) const;
private:
/*! returns specific kernel evaluated in given points (x, y)
*
* @param[in] x
* @param[in] y
*/
SC evalSingleLayerKernel( const SCVT *x, const SCVT *y ) const {
SCVT norm = std::sqrt( ( x[0] - y[0] )*( x[0] - y[0] ) +
( x[1] - y[1] )*( x[1] - y[1] ) +
( x[2] - y[2] )*( x[2] - y[2] ) );
SC i( 0.0, 1.0 );
return ( PI_FACT * std::exp( i * kappa * norm ) / norm );
};
SC evalSingleLayerKernel(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3
) const {
SCVT real, imag;
SCVT rekappa = std::real( kappa );
SCVT imkappa = std::imag( kappa );
SCVT norm = std::sqrt(
( x1 - y1 ) * ( x1 - y1 )
+ ( x2 - y2 ) * ( x2 - y2 )
+ ( x3 - y3 ) * ( x3 - y3 ) );
SCVT rekappan = rekappa * norm;
SCVT expim = std::exp( -imkappa * norm );
real = (SCVT) PI_FACT * expim * std::cos( rekappan ) / norm;
imag = (SCVT) PI_FACT * expim * std::sin( rekappan ) / norm;
return SC( real, imag );
};
#pragma omp declare simd simdlen( DATA_WIDTH )
void evalSingleLayerKernel(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3,
SCVT & real,
SCVT & imag
) const {
SCVT rekappa = std::real( kappa );
SCVT imkappa = std::imag( kappa );
SCVT norm = std::sqrt(
( x1 - y1 ) * ( x1 - y1 )
+ ( x2 - y2 ) * ( x2 - y2 )
+ ( x3 - y3 ) * ( x3 - y3 ) );
SCVT rekappan = rekappa * norm;
SCVT expim = std::exp( -imkappa * norm );
real = (SCVT) PI_FACT * expim * std::cos( rekappan ) / norm;
imag = (SCVT) PI_FACT * expim * std::sin( rekappan ) / norm;
};
/*! returns specific kernel evaluated in given points (x, y)
*
* @param[in] x
* @param[in] y
* @param[in,out] n unit outer normal to the given triangle
*/
SC evalDoubleLayerKernel( const SCVT *x, const SCVT *y, const SCVT *n ) const {
SCVT norm = std::sqrt( ( x[0] - y[0] )*( x[0] - y[0] ) + ( x[1] - y[1] )*
( x[1] - y[1] ) + ( x[2] - y[2] )*( x[2] - y[2] ) );
SCVT dot = ( x[0] - y[0] ) * n[0] + ( x[1] - y[1] ) * n[1] + ( x[2] - y[2] )
* n[2];
SC i( 0.0, 1.0 );
return PI_FACT * ( dot / ( norm * norm * norm ) ) *
( (SCVT) 1.0 - i * kappa * norm ) * std::exp( i * kappa * norm );
};
SC evalDoubleLayerKernel(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3,
SCVT n1,
SCVT n2,
SCVT n3
) const {
SCVT real, imag;
SCVT diff1 = x1 - y1;
SCVT diff2 = x2 - y2;
SCVT diff3 = x3 - y3;
SCVT rekappa = std::real( kappa );
SCVT imkappa = std::imag( kappa );
SCVT norm = std::sqrt( diff1 * diff1 + diff2 * diff2 + diff3 * diff3 );
SCVT dot = diff1 * n1 + diff2 * n2 + diff3 * n3;
SCVT mult = (SCVT) PI_FACT * ( dot / ( norm * norm * norm ) );
SCVT rekappan = rekappa * norm;
SCVT imkappan = imkappa * norm;
SCVT expim = std::exp( -imkappan );
SCVT sine = std::sin( rekappan );
SCVT cosine = std::cos( rekappan );
real = mult * ( expim
* ( ( (SCVT) 1.0 + imkappan ) * cosine + rekappan * sine ) );
imag = mult * expim
* ( ( (SCVT) 1.0 + imkappan ) * sine - rekappan * cosine );
return SC( real, imag );
};
#pragma omp declare simd uniform( n1, n2, n3 ) simdlen( DATA_WIDTH )
void evalDoubleLayerKernel(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3,
SCVT n1,
SCVT n2,
SCVT n3,
SCVT & real,
SCVT & imag
) const {
SCVT diff1 = x1 - y1;
SCVT diff2 = x2 - y2;
SCVT diff3 = x3 - y3;
SCVT rekappa = std::real( kappa );
SCVT imkappa = std::imag( kappa );
SCVT norm = std::sqrt( diff1 * diff1 + diff2 * diff2 + diff3 * diff3 );
SCVT dot = diff1 * n1 + diff2 * n2 + diff3 * n3;
SCVT mult = (SCVT) PI_FACT * ( dot / ( norm * norm * norm ) );
SCVT rekappan = rekappa * norm;
SCVT imkappan = imkappa * norm;
SCVT expim = std::exp( -imkappan );
SCVT sine = std::sin( rekappan );
SCVT cosine = std::cos( rekappan );
real = mult * ( expim
* ( ( (SCVT) 1.0 + imkappan ) * cosine + rekappan * sine ) );
imag = mult * expim
* ( ( (SCVT) 1.0 + imkappan ) * sine - rekappan * cosine );
};
SC evalHypersingularP0P0Kernel(
const SCVT *x,
const SCVT *y,
const SCVT *nx,
const SCVT *ny ) const {
SC i( 0.0, 1.0 );
SCVT norm = std::sqrt( ( x[0] - y[0] )*( x[0] - y[0] ) + ( x[1] - y[1] )*
( x[1] - y[1] ) + ( x[2] - y[2] )*( x[2] - y[2] ) );
SCVT dotnx = ( x[0] - y[0] ) * nx[0] + ( x[1] - y[1] ) * nx[1] +
( x[2] - y[2] ) * nx[2];
SCVT dotny = ( x[0] - y[0] ) * ny[0] + ( x[1] - y[1] ) * ny[1] +
( x[2] - y[2] ) * ny[2];
SC e = std::exp( i * kappa * norm );
SC norm3 = norm * norm*norm;
SC tmp = 0.0;
for ( int j = 0; j < 3; j++ ) {
tmp += ( nx[j] * ny[j]*( e * ( i * kappa * norm - (SCVT) 1.0 ) ) / ( norm3 ) );
}
return (SCVT) PI_FACT * ( ( e * dotnx * dotny * ( kappa * kappa * norm *
norm + (SCVT) 3.0 *
( i * kappa * norm - (SCVT) 1.0 ) ) ) / ( norm3 * norm * norm ) - tmp );
};
//! wave number
SC kappa;
/*
* evaluates Helmholtz p0 single layer operator in xLocal
*
* @param[in] x outer quadrature point in cartesian coordinates
* @param[in] xLocal outer quadrature point in local coordinates
* @param[in] stau inner triangle parameter
* @param[in] alpha1 inner triangle parameter
* @param[in] alpha2 inner triangle parameter
* @param[in] quadratureOrder quadrature order for inner quadrature
* @param[in] quadratureNodes inner quadrature nodes
*
* @return value in xLocal
*
* @todo send shifted kernel values directly to be consistent with double layer
* and hypersingular operators
*/
SC collocation1LayerP0(
const SCVT* xLocal,
SCVT stau,
SCVT alpha1,
SCVT alpha2,
int quadratureOrder,
const SC* shiftedKernel,
LO elem ) const;
#pragma omp declare simd uniform( stau, alpha1, alpha2 ) simdlen( DATA_WIDTH )
SCVT collocationSingular1LayerP0(
SCVT sx,
SCVT tx,
SCVT ux,
SCVT stau,
SCVT alpha1,
SCVT alpha2
) const;
/*
* evaluates p1 Helmholtz single layer operator in xLocal
* (used for p1 hypersingular operator)
*
* @param[in] xLocal outer quadrature point in local coordinates
* @param[in] stau inner triangle parameter
* @param[in] alpha1 inner triangle parameter
* @param[in] alpha2 inner triangle parameter
* @param[in] quadratureOrder quadrature order for inner quadrature
* @param[in] shiftedKernel shifted kernel evaluated in x and inner quadrature points
* @param[in] elem index of inner element
* @param[in] rot rotation index of inner element
*
* @return value in xLocal
*/
SC collocation1LayerP1(
const SCVT* xLocal,
SCVT stau,
SCVT alpha1,
SCVT alpha2,
int quadratureOrder,
const SC* shiftedKernel,
LO elem,
int rot
) const;
#pragma omp declare simd uniform( stau, alpha1, alpha2 ) simdlen( DATA_WIDTH )
SCVT collocationSingular1LayerP1(
SCVT sx,
SCVT tx,
SCVT ux,
SCVT stau,
SCVT alpha1,
SCVT alpha2
) const;
/*
* auxiliary function for p0 single layer operator
*
* @param[in] xLocal outer quadrature point in local coordinates
* @param[in] s inner triangle parameter
* @param[in] alpha inner triangle parameter
*
* @return value in xLocal
*/
#pragma omp declare simd uniform( s, alpha ) simdlen( DATA_WIDTH )
SCVT f1LayerP0(
SCVT sx,
SCVT tx,
SCVT ux,
SCVT s,
SCVT alpha
) const;
/*
* auxiliary function for p1 single layer operator
* (used for the hypersingular operator)
*
* @param[in] s inner triangle parameter
* @param[in] stau inner triangle parameter
* @param[in] alpha inner triangle parameter
* @param[in] tx xLocal coordinate
* @param[in] sx xLocal coordinate
* @param[in] ux xLocal coordinate
*
* @return value in xLocal
*/
#pragma omp declare simd uniform( stau, alpha ) simdlen( DATA_WIDTH )
SCVT f1LayerP1(
SCVT stau,
SCVT alpha,
SCVT tx,
SCVT sx,
SCVT ux
) const;
/*
* evaluates p1 Helmholtz double layer operator in xLocal
*
* @param[in] xLocal outer quadrature point in local coordinates
* @param[in] stau inner triangle parameter
* @param[in] alpha1 inner triangle parameter
* @param[in] alpha2 inner triangle parameter
* @param[in] quadratureOrder quadrature order for inner quadrature
* @param[in] shiftedKernelNeumann normal derivative of the shifted kernel
* evaluated in x and inner quadrature points
* @param[in] elem index of inner element
* @param[in] rot rotation index of inner element
*
* @return value in xLocal
*/
SC collocation2LayerP1(
const SCVT* xLocal,
SCVT stau,
SCVT alpha1,
SCVT alpha2,
int quadratureOrder,
const SC* shiftedKernelNeumann,
LO elem,
int rot
) const;
#pragma omp declare simd uniform( stau, alpha1, alpha2 ) simdlen( DATA_WIDTH )
SCVT collocationSingular2LayerP1(
SCVT sx,
SCVT tx,
SCVT ux,
SCVT stau,
SCVT alpha1,
SCVT alpha2
) const;
#pragma omp declare simd uniform( stau, alpha1, alpha2 ) simdlen( DATA_WIDTH )
SCVT collocationSingular2LayerP0(
SCVT sx,
SCVT tx,
SCVT ux,
SCVT stau,
SCVT alpha1,
SCVT alpha2
) const;
/*
* auxiliary function for p1 double layer operator
*
* @param[in] alpha inner triangle parameter
* @param[in] tx xLocal coordinate
* @param[in] sx xLocal coordinate
* @param[in] ux xLocal coordinate
* @param[in] stau inner triangle parameter
*
* @return value in xLocal
*/
#pragma omp declare simd uniform( alpha, stau ) simdlen( DATA_WIDTH )
SCVT f2LayerP1(
SCVT alpha,
SCVT tx,
SCVT sx,
SCVT ux,
SCVT stau
) const;
//! help function for collocation of double layer operator
#pragma omp declare simd uniform( alpha, stau ) simdlen( DATA_WIDTH )
SCVT f2LayerP0(
SCVT alpha,
SCVT tx,
SCVT sx,
SCVT ux,
SCVT stau
) const;
/*
* evaluates the shifted Helmholtz kernel in x, y
* (incl. the limit case x=y)
*
* @param[in] x outer point
* @param[in] y inner point
*
* @return value in xLocal
*/
SC evalShiftedKernel(
const SCVT* x,
const SCVT* y
) const;
#pragma omp declare simd simdlen( DATA_WIDTH )
void evalShiftedKernel(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3,
SCVT & real,
SCVT & imag
) const;
/*
* evaluates normal derivative of the shifted Helmholtz kernel in x, y
*
* @param[in] x outer point
* @param[in] y inner point
* @param[in] n inner normal
*
* @return value in xLocal
*/
SC evalShiftedKernelNeumann(
const SCVT* x,
const SCVT* y,
const SCVT* n
) const;
#pragma omp declare simd uniform( n1, n2, n3 ) simdlen( DATA_WIDTH )
void evalShiftedKernelNeumann(
SCVT x1,
SCVT x2,
SCVT x3,
SCVT y1,
SCVT y2,
SCVT y3,
SCVT n1,
SCVT n2,
SCVT n3,
SCVT & real,
SCVT & imag
) const;
};
}
// include .cpp file to overcome linking problems due to templates
#include "BEIntegratorHelmholtz.cpp"
#endif /* BEINTEGRATORHELMHOLTZ_H */
| 26.473621 | 91 | 0.632773 |
9929cf721e49d788abf5038601782428ac194a60 | 2,276 | c | C | src/tcp.c | cijliu/librtsp | 2ec1a81ad65280568a0c7c16420d7c10fde13b04 | [
"MIT"
] | 15 | 2021-03-02T08:00:23.000Z | 2022-02-20T12:33:03.000Z | src/tcp.c | astatong/librtsp | 2ec1a81ad65280568a0c7c16420d7c10fde13b04 | [
"MIT"
] | null | null | null | src/tcp.c | astatong/librtsp | 2ec1a81ad65280568a0c7c16420d7c10fde13b04 | [
"MIT"
] | 7 | 2021-03-02T01:48:01.000Z | 2021-12-24T09:49:07.000Z | /*
* @Author: cijliu
* @Date: 2021-02-11 14:17:59
* @LastEditTime: 2021-02-23 18:01:54
*/
#include "include/net.h"
int tcp_server_init(tcp_t *tcp, int port)
{
memset(tcp, 0, sizeof(tcp_t));
tcp->sock = socket(AF_INET, SOCK_STREAM, 0);
if (tcp->sock == -1) {
printf("create socket failed : %d\n", errno);
return -1;
}
memset(&tcp->addr, 0, sizeof(struct sockaddr_in));
tcp->addr.sin_family = AF_INET;
tcp->addr.sin_addr.s_addr = htonl(INADDR_ANY);
tcp->addr.sin_port = htons(port);
int opt = 1;
setsockopt(tcp->sock,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt));
int ret = bind(tcp->sock, (struct sockaddr*)&tcp->addr, sizeof(struct sockaddr_in));
if (ret) {
printf("bind socket to address failed : %d\n", errno);
close(tcp->sock);
return -1;
}
ret = listen(tcp->sock, TCP_MAX_CLIENT); //XXX
if (ret) {
printf("listen socket failed : %d\n", errno);
close(tcp->sock);
return -1;
}
tcp->port = port;
return 0;
}
int tcp_server_wait_client(tcp_t *tcp)
{
int i = 0;
socklen_t addrlen = sizeof(tcp->addr);
while(tcp->client[i] != 0 && i < TCP_MAX_CLIENT)i++;
tcp->client[i] = accept(tcp->sock, (struct sockaddr*)&tcp->addr, &addrlen);
return tcp->client[i];
}
int tcp_server_close_client(tcp_t *tcp, int client)
{
int i;
while(tcp->client[i] != client && i < TCP_MAX_CLIENT) i++;
close(tcp->client[i]);
tcp->client[i] = 0;
return 0;
}
int tcp_server_send_msg(tcp_t *tcp, int client, unsigned char *data, int len)
{
int i = 0;
while(tcp->client[i] != client && i < TCP_MAX_CLIENT) i++;
if(i >= TCP_MAX_CLIENT) {
return -1;
}
return send(client, data, len, 0);
}
int tcp_server_receive_msg(tcp_t *tcp, int client, unsigned char *data, int len)
{
int i = 0;
while(tcp->client[i] != client && i < TCP_MAX_CLIENT) i++;
if(i >= TCP_MAX_CLIENT) {
return -1;
}
return read(client, data, len);
}
int tcp_server_deinit(tcp_t *tcp)
{
int i;
for(i=0; i < TCP_MAX_CLIENT; i++){
if(tcp->client[i] != 0){
close(tcp->client[i]);
tcp->client[i] = 0;
}
}
close(tcp->sock);
return 0;
}
| 25.288889 | 86 | 0.577329 |
7b62bb4e5d5cfb098274e782be30d68abcb706bc | 945 | rb | Ruby | src/assignments/age-verifier/solution.rb | leojh/learning-ruby | db3abdba7f8d974127c3eb7f592cc52cb81c169a | [
"MIT"
] | null | null | null | src/assignments/age-verifier/solution.rb | leojh/learning-ruby | db3abdba7f8d974127c3eb7f592cc52cb81c169a | [
"MIT"
] | null | null | null | src/assignments/age-verifier/solution.rb | leojh/learning-ruby | db3abdba7f8d974127c3eb7f592cc52cb81c169a | [
"MIT"
] | null | null | null | #As a developer on the App Store team, you are required to check the age of every user.
#Due to US law, users wishing to open accounts online but be at least 13 years of age.
#Your job as a developer is to write a module that takes in a user's date of birth
#and makes sure that the user is at least 13 years old.
require 'Date'
def isUser13YearsOld(dateOfBirth)
numberOfMonthsIn13Years = 12 * 13
min = Date.today << numberOfMonthsIn13Years
dateOfBirth <= min
end
def yearsBetweenDates(date1, date2)
((date2.year - date1.year) * 12 + date2.month - date1.month - (date2.day >= date1.day ? 0 : 1)) / 12
end
def main
puts "Enter Date of Birth (yyyy-mm-dd):"
dateOfBirth = Date.parse(gets.chomp)
puts "You are #{yearsBetweenDates(dateOfBirth, Date.today)}"
userIs13 = isUser13YearsOld(dateOfBirth)
if (userIs13)
puts "You are 13 or older!"
else
puts "Sorry, you need to be at least 13 years old"
end
end
main()
| 27.794118 | 102 | 0.716402 |
6e134a54d52c80a51d93e63f8d59002908887310 | 638 | html | HTML | users/templates/users/blockWrongTries.html | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | users/templates/users/blockWrongTries.html | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | users/templates/users/blockWrongTries.html | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | {% extends "index/base.html" %}
{% load static %}
{% block title_name %}
<title>Block Page</title>
{% endblock title_name %}
{% block body_block %}
<div class="container"
style="margin-top:50px;margin-bottom:50px;min-height:500px;">
<p style="text-align: center;font-size: 75px;">Blocked!</p>
<p style="text-align: center;font-size: 30px;margin-top: 50px;">
You are seeing this because you have more than 3 wrong login attempts.<br>
Your login access will be freezed until <b>{{unblock_time}}</b><br>
You can still utilize other functionalities of this site.
</p>
</div>
{% endblock body_block %}
| 37.529412 | 80 | 0.669279 |
f03ee7eeee893949015c77ef805844697cce8b4d | 610 | js | JavaScript | packages/picker/props.js | wlin00/wot-design-mini | e36a599588b7a848734829915baa7cfec86d0c0c | [
"MIT"
] | null | null | null | packages/picker/props.js | wlin00/wot-design-mini | e36a599588b7a848734829915baa7cfec86d0c0c | [
"MIT"
] | null | null | null | packages/picker/props.js | wlin00/wot-design-mini | e36a599588b7a848734829915baa7cfec86d0c0c | [
"MIT"
] | null | null | null | export default {
// 选择器左侧文案
label: String,
// 选择器占位符
placeholder: {
type: String,
value: '请选择'
},
// 禁用
disabled: {
type: Boolean,
value: false
},
// 只读
readonly: {
type: Boolean,
value: false
},
/* popup */
// 弹出层标题
title: String,
// 取消按钮文案
cancelButtonText: {
type: String,
value: '取消'
},
// 确认按钮文案
confirmButtonText: {
type: String,
value: '完成'
},
noHair: {
type: Boolean,
value: true
},
size: String,
labelWidth: String,
useLabelSlot: Boolean,
error: Boolean,
alignRight: Boolean,
beforeConfirm: null
} | 14.52381 | 24 | 0.565574 |
2063c0bb01fb11d4da2697eefb8c6d7238544a44 | 1,427 | lua | Lua | nvim/.config/nvim/lua/plugins/null-ls-config.lua | uhavin/dotfiles | d9f70f853c9916eec83f0b6bc1cd4943a63c5292 | [
"MIT"
] | null | null | null | nvim/.config/nvim/lua/plugins/null-ls-config.lua | uhavin/dotfiles | d9f70f853c9916eec83f0b6bc1cd4943a63c5292 | [
"MIT"
] | null | null | null | nvim/.config/nvim/lua/plugins/null-ls-config.lua | uhavin/dotfiles | d9f70f853c9916eec83f0b6bc1cd4943a63c5292 | [
"MIT"
] | null | null | null | local HOME = vim.fn.expand("$HOME")
local null_ls = require("null-ls")
---Create path for a python package installed in nvim virtualenv.
---@param command_name string
local function run_from_nvim_pyenv(command_name)
local command_full_path = HOME .. "/.pyenv/versions/nvim/bin/" .. command_name
return command_full_path
end
local function run_from_active_pyenv(command_name)
local command_full_path = HOME .. "/.pyenv/versions/nvim/bin/" .. command_name
return command_full_path
end
local active_pyenv_python = HOME .. "/.pyenv/shims/python"
null_ls.setup({
diagnostics_format = "[#{s}|#{c}] #{m}",
sources = {
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.mypy.with({
command = run_from_active_pyenv("mypy"),
extra_args = { "--python-executable", active_pyenv_python },
}),
null_ls.builtins.diagnostics.pydocstyle.with({
command = run_from_active_pyenv("pydocstyle"),
extra_args = { "--convention", "numpy" },
}),
null_ls.builtins.diagnostics.flake8.with({ command = run_from_active_pyenv("flake8") }),
null_ls.builtins.formatting.black.with({ command = run_from_active_pyenv("black") }),
null_ls.builtins.formatting.isort.with({
command = run_from_active_pyenv("isort"),
extra_args = { "--profile", "black" },
}),
null_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.yamllint.with({ command = run_from_nvim_pyenv("yamllint") }),
},
})
| 37.552632 | 92 | 0.731605 |
e77cb4596b4bdf2c13a0df84fbd542c5080f2c3f | 480 | js | JavaScript | src/components/timer/timer.js | DaveVodrazka/davetheprogrammer | 39b33eaa9a8b8d976c1d982c6e83341bd1cf7f93 | [
"RSA-MD"
] | null | null | null | src/components/timer/timer.js | DaveVodrazka/davetheprogrammer | 39b33eaa9a8b8d976c1d982c6e83341bd1cf7f93 | [
"RSA-MD"
] | null | null | null | src/components/timer/timer.js | DaveVodrazka/davetheprogrammer | 39b33eaa9a8b8d976c1d982c6e83341bd1cf7f93 | [
"RSA-MD"
] | null | null | null | import React from 'react';
import Interval from 'react-interval-rerender';
import * as style from './timer.module.scss';
const Timer = () => {
return (
<div className={style.timer}>
<p>The time is{' '}
<span>
<Interval delay={1000}>
{() => Math.floor(new Date().getTime() / 1000)}
</Interval>
</span>
{' '}seconds past midnight January 1<sup>st</sup>, 1970.
</p>
</div>
);
}
export default Timer;
| 21.818182 | 64 | 0.541667 |
853895649ec6fcbbf7faaca12061b2aacd64170e | 4,890 | kt | Kotlin | app/src/test/java/co/zsmb/rainbowcake/guardiandemo/ui/detail/DetailViewModelTest.kt | xirt4m/guardian-demo | 19fc09f46b9bdba77bb313c8618a111ea13c3344 | [
"Apache-2.0"
] | 9 | 2020-07-01T08:11:55.000Z | 2020-07-23T09:55:55.000Z | app/src/test/java/co/zsmb/rainbowcake/guardiandemo/ui/detail/DetailViewModelTest.kt | xirt4m/guardian-demo | 19fc09f46b9bdba77bb313c8618a111ea13c3344 | [
"Apache-2.0"
] | 2 | 2020-05-10T13:43:21.000Z | 2020-07-28T13:11:13.000Z | app/src/test/java/co/zsmb/rainbowcake/guardiandemo/ui/detail/DetailViewModelTest.kt | xirt4m/guardian-demo | 19fc09f46b9bdba77bb313c8618a111ea13c3344 | [
"Apache-2.0"
] | 5 | 2020-03-01T20:06:13.000Z | 2020-10-21T09:44:37.000Z | package co.zsmb.rainbowcake.guardiandemo.ui.detail
import co.zsmb.rainbowcake.guardiandemo.ui.detail.DetailPresenter.DetailedNewsItem
import co.zsmb.rainbowcake.test.assertObserved
import co.zsmb.rainbowcake.test.base.ViewModelTest
import co.zsmb.rainbowcake.test.observeStateAndEvents
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.doReturn
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Test
import java.io.IOException
@OptIn(ExperimentalCoroutinesApi::class)
class DetailViewModelTest : ViewModelTest() {
companion object {
private const val MOCK_ARTICLE_ID = "saved_mock_id"
private val SAVED_MOCK_DETAIL_ARTICLE = DetailedNewsItem(
id = MOCK_ARTICLE_ID,
title = "Article Title",
imageUrl = "http://image.com/some-image.png",
byline = "By Jane Doe",
content = "This is the body of the article",
isSaved = true
)
private val NON_SAVED_MOCK_DETAIL_ARTICLE = DetailedNewsItem(
id = MOCK_ARTICLE_ID,
title = "Article Title",
imageUrl = "http://image.com/some-image.png",
byline = "By Jane Doe",
content = "This is the body of the article",
isSaved = false
)
}
@Test
fun `Article is loaded correctly from presenter by ID`() = runBlockingTest {
val detailPresenter: DetailPresenter = mock()
whenever(detailPresenter.loadArticle(MOCK_ARTICLE_ID)) doReturn SAVED_MOCK_DETAIL_ARTICLE
val vm = DetailViewModel(detailPresenter)
vm.observeStateAndEvents { stateObserver, eventsObserver ->
vm.loadArticle(MOCK_ARTICLE_ID)
stateObserver.assertObserved(
Loading,
DetailReady(SAVED_MOCK_DETAIL_ARTICLE)
)
}
}
@Test
fun `Article loading exception produces error event`() = runBlockingTest {
val detailPresenter: DetailPresenter = mock()
whenever(detailPresenter.loadArticle(any())).thenAnswer {
throw IOException("Failed to load article")
}
val vm = DetailViewModel(detailPresenter)
vm.observeStateAndEvents { stateObserver, eventsObserver ->
vm.loadArticle(MOCK_ARTICLE_ID)
eventsObserver.assertObserved(DetailViewModel.LoadFailedEvent)
}
}
@Test
fun `Toggling non-saved article saves article, updates view state and emits success event`() =
runBlockingTest {
val detailPresenter: DetailPresenter = mock()
whenever(detailPresenter.loadArticle(MOCK_ARTICLE_ID)) doReturn NON_SAVED_MOCK_DETAIL_ARTICLE
val vm = DetailViewModel(detailPresenter)
vm.observeStateAndEvents { stateObserver, eventsObserver ->
vm.loadArticle(MOCK_ARTICLE_ID)
vm.toggleSaved(MOCK_ARTICLE_ID)
stateObserver.assertObserved(
Loading,
DetailReady(NON_SAVED_MOCK_DETAIL_ARTICLE),
DetailReady(SAVED_MOCK_DETAIL_ARTICLE)
)
eventsObserver.assertObserved(DetailViewModel.SavedEvent)
}
}
@Test
fun `Toggling saved article removes article, updates view state and emits success event`() =
runBlockingTest {
val detailPresenter: DetailPresenter = mock()
whenever(detailPresenter.loadArticle(MOCK_ARTICLE_ID)) doReturn SAVED_MOCK_DETAIL_ARTICLE
val vm = DetailViewModel(detailPresenter)
vm.observeStateAndEvents { stateObserver, eventsObserver ->
vm.loadArticle(MOCK_ARTICLE_ID)
vm.toggleSaved(MOCK_ARTICLE_ID)
stateObserver.assertObserved(
Loading,
DetailReady(SAVED_MOCK_DETAIL_ARTICLE),
DetailReady(NON_SAVED_MOCK_DETAIL_ARTICLE)
)
eventsObserver.assertObserved(DetailViewModel.RemovedEvent)
}
}
@Test
fun `Exception while saving article produces error event`() = runBlockingTest {
val detailPresenter: DetailPresenter = mock()
whenever(detailPresenter.loadArticle(MOCK_ARTICLE_ID)) doReturn NON_SAVED_MOCK_DETAIL_ARTICLE
whenever(detailPresenter.saveArticle(any())).thenAnswer {
throw IOException("Failed to save article")
}
val vm = DetailViewModel(detailPresenter)
vm.observeStateAndEvents { stateObserver, eventsObserver ->
vm.loadArticle(MOCK_ARTICLE_ID)
vm.toggleSaved(MOCK_ARTICLE_ID)
eventsObserver.assertObserved(DetailViewModel.SaveFailedEvent)
}
}
}
| 36.222222 | 105 | 0.662577 |
85286d1f89baf8a744af77036511e3546e662aa9 | 10,275 | rs | Rust | src/feature_transform_parser.rs | patrickwaters1000/fwumious_wabbit | ba2ef474f97a09437d4fb1c192320013ecbcf53f | [
"BSD-3-Clause"
] | null | null | null | src/feature_transform_parser.rs | patrickwaters1000/fwumious_wabbit | ba2ef474f97a09437d4fb1c192320013ecbcf53f | [
"BSD-3-Clause"
] | null | null | null | src/feature_transform_parser.rs | patrickwaters1000/fwumious_wabbit | ba2ef474f97a09437d4fb1c192320013ecbcf53f | [
"BSD-3-Clause"
] | null | null | null | //#[macro_use]
//extern crate nom;
use crate::model_instance;
use crate::parser;
use crate::vwmap;
use std::error::Error;
use std::io::Error as IOError;
use std::io::ErrorKind;
use fasthash::murmur3;
use serde::{Serialize,Deserialize};
use crate::feature_transform_executor;
pub const TRANSFORM_NAMESPACE_MARK: u32 = 1<< 31;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct Namespace {
pub namespace_index: u32,
pub namespace_verbose: String,
pub namespace_is_float: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct NamespaceTransform {
pub to_namespace: Namespace,
pub from_namespaces: Vec<Namespace>,
pub function_name: String,
pub function_parameters: Vec<f32>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct NamespaceTransforms {
pub v: Vec<NamespaceTransform>
}
impl NamespaceTransforms {
pub fn new() -> NamespaceTransforms {
NamespaceTransforms {v: Vec::new()}
}
pub fn add_transform_namespace(&mut self, vw: &vwmap::VwNamespaceMap, s: &str) -> Result<(), Box<dyn Error>> {
let rr = parse_namespace_statement(s);
if rr.is_err() {
return Err(Box::new(IOError::new(ErrorKind::Other, format!("Error parsing {}\n{:?}", s, rr))));
}
let (_, (to_namespace_verbose, function_name, from_namespaces_verbose, function_parameters)) = rr.unwrap();
let to_namespace_index = get_namespace_id_verbose(self, vw, &to_namespace_verbose);
if to_namespace_index.is_ok() {
return Err(Box::new(IOError::new(ErrorKind::Other, format!("To namespace of {} already exists: {:?}", s, to_namespace_verbose))));
}
let to_namespace = Namespace {
namespace_index: self.v.len() as u32 | TRANSFORM_NAMESPACE_MARK, // mark it as special transformed namespace
namespace_verbose: to_namespace_verbose,
namespace_is_float: false,
};
let mut from_namespaces: Vec<Namespace> = Vec::new();
for from_namespace_verbose in &from_namespaces_verbose {
let from_namespace_index = get_namespace_id_verbose(self, vw, from_namespace_verbose)?;
println!("from namespace verbose: {} from namespace index: {}", from_namespace_verbose, from_namespace_index);
if from_namespace_index & TRANSFORM_NAMESPACE_MARK != 0 {
return Err(Box::new(IOError::new(ErrorKind::Other, format!("Issue in parsing {}: From namespace ({}) cannot be an already transformed namespace", s, from_namespace_verbose))));
}
from_namespaces.push(Namespace{ namespace_index: from_namespace_index,
namespace_verbose: from_namespace_verbose.to_string(),
namespace_is_float: vw.map_index_to_save_as_float[from_namespace_index as usize] });
}
let nt = NamespaceTransform {
from_namespaces: from_namespaces,
to_namespace: to_namespace,
function_name: function_name,
function_parameters: function_parameters,
};
// Now we try to setup a function and then throw it away - for early validation
let _ = feature_transform_executor::TransformExecutor::from_namespace_transform(&nt)?;
self.v.push(nt);
Ok(())
}
}
pub fn get_namespace_id(transform_namespaces: &NamespaceTransforms, vw: &vwmap::VwNamespaceMap, namespace_char: char) -> Result<u32, Box<dyn Error>> {
// Does not support transformed names
let index = match vw.map_vwname_to_index.get(&vec![namespace_char as u8]) {
Some(index) => return Ok(*index as u32),
None => return Err(Box::new(IOError::new(ErrorKind::Other, format!("Unknown namespace char in command line: {}", namespace_char))))
};
}
pub fn get_namespace_id_verbose(transform_namespaces: &NamespaceTransforms, vw: &vwmap::VwNamespaceMap, namespace_verbose: &str) -> Result<u32, Box<dyn Error>> {
let index = match vw.map_verbose_to_index.get(namespace_verbose) {
Some(index) => return Ok(*index as u32),
None => {
// Yes, we do linear search, we only call this couple of times. It's fast enough
let f:Vec<&NamespaceTransform> = transform_namespaces.v.iter().filter(|x| x.to_namespace.namespace_verbose == namespace_verbose).collect();
if f.len() == 0 {
return Err(Box::new(IOError::new(ErrorKind::Other, format!("Unknown namespace char in command line: {}", namespace_verbose))));
} else {
return Ok(f[0].to_namespace.namespace_index as u32);
}
}
};
}
use nom::IResult;
use nom::number::complete::be_u16;
use nom::character::complete;
use nom::bytes::complete::take_while;
use nom::AsChar;
use nom::sequence::tuple;
use nom::branch;
use nom::number;
use nom::character;
use nom;
use nom::multi;
use nom::combinator::complete;
pub fn name_char(c:char) -> bool {
if AsChar::is_alphanum(c) || c == '_' {
return true;
} else {
return false;
}
}
// identifier = namespace or function name
pub fn parse_identifier(input: &str) -> IResult<&str, String> {
let (input, (_, first_char, rest, _)) = tuple((
character::complete::space0,
complete::one_of("abcdefghijklmnopqrstuvzxyABCDEFGHIJKLMNOPQRSTUVZXY_"),
take_while(name_char),
character::complete::space0
))(input)?;
let mut s = first_char.to_string();
s.push_str(rest);
Ok((input, s))
}
pub fn parse_function_params_namespaces(input: &str) -> IResult<&str, Vec<String>> {
let take_open = complete::char('(');
let take_close = complete::char(')');
let take_separator = complete::char(',');
let (input, (_, namespaces_str, _)) = tuple((take_open, nom::multi::separated_list1(take_separator, parse_identifier), take_close))(input)?;
Ok((input, namespaces_str))
}
pub fn parse_float(input: &str) -> IResult<&str, f32> {
let (input, (_, f, _)) = tuple((character::complete::space0,
number::complete::float,
character::complete::space0
))(input)?;
Ok((input, f))
}
pub fn parse_function_params_floats(input: &str) -> IResult<&str, Vec<f32>> {
let take_open = complete::char('(');
let take_close = complete::char(')');
let take_separator = complete::char(',');
let (input, (_, namespaces_str, _)) = tuple((take_open, nom::multi::separated_list0(take_separator, parse_float), take_close))(input)?;
Ok((input, namespaces_str))
}
pub fn parse_namespace_statement(input: &str) -> IResult<&str, (String, String, Vec<String>, Vec<f32>)> {
let (input, (to_namespace_verbose, _, function_name, from_namespace_verbose, parameters)) =
tuple((
parse_identifier,
complete::char('='),
parse_identifier,
parse_function_params_namespaces,
parse_function_params_floats
))(input)?;
Ok((input, (to_namespace_verbose, function_name, from_namespace_verbose, parameters)))
}
mod tests {
// Note this useful idiom: importing names from outer (for mod tests) scope.
use super::*;
use crate::parser::{NO_FEATURES, IS_NOT_SINGLE_MASK, IS_FLOAT_NAMESPACE_MASK, MASK31};
#[test]
fn test_parser1() {
let r = parse_identifier("a");
assert_eq!(r.unwrap().1, "a");
let r = parse_identifier("ab");
assert_eq!(r.unwrap().1, "ab");
let r = parse_identifier("_a_b3_");
assert_eq!(r.unwrap().1, "_a_b3_");
let r = parse_identifier("#");
assert_eq!(r.is_err(), true);
let r = parse_identifier("3a"); // they have to start with alphabetic character or underscore
assert_eq!(r.is_err(), true);
let r = parse_function_params_namespaces("(a)");
assert_eq!(r.unwrap().1, vec!["a"]);
let r = parse_function_params_namespaces("(a,b)");
assert_eq!(r.unwrap().1, vec!["a", "b"]);
let r = parse_function_params_namespaces("( a , b )");
assert_eq!(r.unwrap().1, vec!["a", "b"]);
let r = parse_function_params_namespaces("((a)");
assert_eq!(r.is_err(), true);
let r = parse_function_params_namespaces("()"); // empty list of namespaces is not allowed
assert_eq!(r.is_err(), true);
let r = parse_float("0.2");
assert_eq!(r.unwrap().1, 0.2);
let r = parse_float(" 0.2");
assert_eq!(r.unwrap().1, 0.2);
let r = parse_float("(a)");
assert_eq!(r.is_err(), true);
let r = parse_function_params_floats("(0.1)");
assert_eq!(r.unwrap().1, vec![0.1]);
let r = parse_function_params_floats("(0.1,0.2)");
assert_eq!(r.unwrap().1, vec![0.1, 0.2]);
let r = parse_function_params_floats("( 0.1 , 0.2 )");
assert_eq!(r.unwrap().1, vec![0.1, 0.2]);
let r = parse_function_params_floats("()"); // empty list of floats is allowed
let fv:Vec<f32>=Vec::new();
assert_eq!(r.unwrap().1, fv);
let r = parse_namespace_statement("a=sqrt(B)(3,1,2.0)");
let (o, rw) = r.unwrap();
assert_eq!(rw.0, "a");
assert_eq!(rw.1, "sqrt");
assert_eq!(rw.2, vec!["B"]);
assert_eq!(rw.3, vec![3f32, 1f32, 2.0]);
let r = parse_namespace_statement("abc=sqrt(BDE,CG)(3,1,2.0)");
let (o, rw) = r.unwrap();
assert_eq!(rw.0, "abc");
assert_eq!(rw.1, "sqrt");
assert_eq!(rw.2, vec!["BDE", "CG"]);
assert_eq!(rw.3, vec![3f32, 1f32, 2.0]);
let r = parse_namespace_statement("a_bc=s_qrt(_BD_E_,C_G)(3,1,2.0)");
let (o, rw) = r.unwrap();
assert_eq!(rw.0, "a_bc");
assert_eq!(rw.1, "s_qrt");
assert_eq!(rw.2, vec!["_BD_E_", "C_G"]);
assert_eq!(rw.3, vec![3f32, 1f32, 2.0]);
}
}
| 37.637363 | 192 | 0.603504 |
37aab7ba996c42e90b7df3bedd7b4067c0becebf | 215 | lua | Lua | MMOCoreORB/bin/scripts/object/custom_content/mobile/bounty_guild_bounty_check.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 18 | 2017-02-09T15:36:05.000Z | 2021-12-21T04:22:15.000Z | MMOCoreORB/bin/scripts/object/custom_content/mobile/bounty_guild_bounty_check.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 61 | 2016-12-30T21:51:10.000Z | 2021-12-10T20:25:56.000Z | MMOCoreORB/bin/scripts/object/custom_content/mobile/bounty_guild_bounty_check.lua | V-Fib/FlurryClone | 40e0ca7245ec31b3815eb6459329fd9e70f88936 | [
"Zlib",
"OpenSSL"
] | 71 | 2017-01-01T05:34:38.000Z | 2022-03-29T01:04:00.000Z | object_mobile_bounty_guild_bounty_check = object_mobile_shared_bounty_guild_bounty_check:new {
}
ObjectTemplates:addTemplate(object_mobile_bounty_guild_bounty_check, "object/mobile/bounty_guild_bounty_check.iff")
| 35.833333 | 115 | 0.897674 |
7af457f3cf2b372082bde6b100a3c9506cc237b5 | 820 | rb | Ruby | app/controllers/transactions_controller.rb | jigneshphipl/compliance-management | f1bbba9b1d1eab8fc6b7e20a64769e782679891b | [
"Apache-2.0"
] | 2 | 2015-01-01T12:52:17.000Z | 2019-04-21T12:33:02.000Z | app/controllers/transactions_controller.rb | jigneshphipl/compliance-management | f1bbba9b1d1eab8fc6b7e20a64769e782679891b | [
"Apache-2.0"
] | 1 | 2015-02-28T01:28:54.000Z | 2015-04-10T17:32:22.000Z | app/controllers/transactions_controller.rb | jigneshphipl/compliance-management | f1bbba9b1d1eab8fc6b7e20a64769e782679891b | [
"Apache-2.0"
] | null | null | null | # Author:: Miron Cuperman (mailto:miron+cms@google.com)
# Copyright:: Google Inc. 2012
# License:: Apache 2.0
# Handle Transactions
class TransactionsController < BaseObjectsController
# access_control :acl do
# allow :superuser
# end
layout 'dashboard'
no_base_action :index, :show, :tooltip
private
def object_path
flow_system_path(@transaction.system)
end
def post_destroy_path
flow_system_path(@transaction.system)
end
def transaction_params
transaction_params = params[:transaction] || {}
if transaction_params[:system_id]
# TODO: Validate the user has access to add transactions to the system
transaction_params[:system] = System.where(:id => transaction_params.delete(:system_id)).first
end
transaction_params
end
end
| 23.428571 | 102 | 0.709756 |
2998d3de7f5e6bd51035afc32534f6f4544d7a8a | 1,928 | kt | Kotlin | fontawesome/src/de/msrd0/fontawesome/icons/FA_STEAM.kt | msrd0/fontawesome-kt | 2fc4755051325e730e9d012c9dfe94f5ea800fdd | [
"Apache-2.0"
] | null | null | null | fontawesome/src/de/msrd0/fontawesome/icons/FA_STEAM.kt | msrd0/fontawesome-kt | 2fc4755051325e730e9d012c9dfe94f5ea800fdd | [
"Apache-2.0"
] | null | null | null | fontawesome/src/de/msrd0/fontawesome/icons/FA_STEAM.kt | msrd0/fontawesome-kt | 2fc4755051325e730e9d012c9dfe94f5ea800fdd | [
"Apache-2.0"
] | null | null | null | /* @generated
*
* This file is part of the FontAwesome Kotlin library.
* https://github.com/msrd0/fontawesome-kt
*
* This library is not affiliated with FontAwesome.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.msrd0.fontawesome.icons
import de.msrd0.fontawesome.Icon
import de.msrd0.fontawesome.Style
import de.msrd0.fontawesome.Style.BRANDS
object FA_STEAM: Icon {
override val name get() = "Steam"
override val unicode get() = "f1b6"
override val styles get() = setOf(BRANDS)
override fun svg(style: Style) = when(style) {
BRANDS -> """<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M496 256c0 137-111.2 248-248.4 248-113.8 0-209.6-76.3-239-180.4l95.2 39.3c6.4 32.1 34.9 56.4 68.9 56.4 39.2 0 71.9-32.4 70.2-73.5l84.5-60.2c52.1 1.3 95.8-40.9 95.8-93.5 0-51.6-42-93.5-93.7-93.5s-93.7 42-93.7 93.5v1.2L176.6 279c-15.5-.9-30.7 3.4-43.5 12.1L0 236.1C10.2 108.4 117.1 8 247.6 8 384.8 8 496 119 496 256zM155.7 384.3l-30.5-12.6a52.79 52.79 0 0 0 27.2 25.8c26.9 11.2 57.8-1.6 69-28.4 5.4-13 5.5-27.3.1-40.3-5.4-13-15.5-23.2-28.5-28.6-12.9-5.4-26.7-5.2-38.9-.6l31.5 13c19.8 8.2 29.2 30.9 20.9 50.7-8.3 19.9-31 29.2-50.8 21zm173.8-129.9c-34.4 0-62.4-28-62.4-62.3s28-62.3 62.4-62.3 62.4 28 62.4 62.3-27.9 62.3-62.4 62.3zm.1-15.6c25.9 0 46.9-21 46.9-46.8 0-25.9-21-46.8-46.9-46.8s-46.9 21-46.9 46.8c.1 25.8 21.1 46.8 46.9 46.8z"/></svg>"""
else -> null
}
}
| 48.2 | 830 | 0.687759 |
9c12ac52a403909688f2b95496dba8f64ecd5ac1 | 39 | js | JavaScript | packages/dashboard/src/atoms/StatusDot/index.js | VikaNazarova/ux | ad37bc0a6fba77505807bbd74c00dd634843b777 | [
"MIT"
] | 3 | 2019-10-18T11:29:09.000Z | 2021-09-23T04:19:19.000Z | packages/dashboard/src/atoms/StatusDot/index.js | VikaNazarova/ux | ad37bc0a6fba77505807bbd74c00dd634843b777 | [
"MIT"
] | 22 | 2019-11-19T10:44:57.000Z | 2022-01-20T13:47:32.000Z | packages/dashboard/src/atoms/StatusDot/index.js | VikaNazarova/ux | ad37bc0a6fba77505807bbd74c00dd634843b777 | [
"MIT"
] | 4 | 2020-02-12T05:16:39.000Z | 2020-12-01T14:20:26.000Z | export { default } from './StatusDot';
| 19.5 | 38 | 0.666667 |
95ce4f70d721c3b109c64956c4fa9547496a5fce | 462 | css | CSS | css/other.css | AtlasDev/SmartCMS | 5a4ad09490ddc66d182764d45dc9d22188913205 | [
"MIT"
] | null | null | null | css/other.css | AtlasDev/SmartCMS | 5a4ad09490ddc66d182764d45dc9d22188913205 | [
"MIT"
] | null | null | null | css/other.css | AtlasDev/SmartCMS | 5a4ad09490ddc66d182764d45dc9d22188913205 | [
"MIT"
] | null | null | null | #notify {
z-index: 999;
display: none;
position: absolute;
width: 100%;
height: 60px;
color: #fff;
font-size: 20px;
overflow: hidden;
}
#notify .logo {
width: 60px;
height: 60px;
padding: 20px 0;
text-align: center;
float: left;
overflow: hidden;
background-color: #000;
font-size: 20px;
}
#notify .text {
padding: 20px;
margin-left: 60px;
background-color: #000;
opacity: 0.75;
} | 16.5 | 27 | 0.575758 |
1cab6b6fa377a6dbcd17e32409d8389fee208068 | 5,471 | css | CSS | public/style.css | Uranus-Grace-Shopper/GraceShopper | 38be331b0e4d6f586770d009f82eefc867c21102 | [
"MIT"
] | null | null | null | public/style.css | Uranus-Grace-Shopper/GraceShopper | 38be331b0e4d6f586770d009f82eefc867c21102 | [
"MIT"
] | 18 | 2022-03-02T21:25:27.000Z | 2022-03-07T22:53:03.000Z | public/style.css | Uranus-Grace-Shopper/GraceShopper | 38be331b0e4d6f586770d009f82eefc867c21102 | [
"MIT"
] | null | null | null | body {
font-family: Arial, Helvetica, sans-serif;
background: rgb(255, 255, 255);
/* max-width: 80%;
display: flex;
align-self: center; */
}
a {
text-decoration: none;
}
/* label {
display: block;
} */
nav a {
/* display: inline-block; */
margin: 0.5em;
width: 30%;
color: black;
}
form div {
margin: 1em;
display: inline-block;
}
.div-all-products {
display: flex;
margin: 50px;
flex-direction: row;
flex-wrap: wrap;
flex-flow: row wrap;
justify-content: center;
gap: 50px 100px;
}
.each-wine-div {
display: flex;
flex-direction: column;
align-items: center;
}
.img-all-products {
align-self: center;
width: auto;
height: 200px;
}
.div-each-product {
padding: 1rem;
width: 350px;
height: 400px;
/* background: #e2f6f7; */
display: flex;
flex-direction: column;
}
.txt-each-product {
align-self: center;
}
.div-each-product .btn-large {
align-self: center;
}
.product-name {
font-weight: bold;
color: black;
}
.product-name:hover {
color: #9e2666;
}
.cart-item-container img {
width: auto;
height: 50px;
padding: 20px;
}
.cart-item-container a {
width: 60%;
}
nav {
align-items: center;
background-color: #edecfa;
color: #264e70;
display: flex;
justify-content: space-around;
height: 100px;
font-family: Arial, Helvetica, sans-serif;
letter-spacing: 0.2em;
}
nav a:hover {
color: #9e2666;
font-weight: bold;
}
.cart-item-container {
display: flex;
align-items: center;
justify-content: space-around;
background: #edecfa;
margin: 20px;
}
.title {
padding: 50px;
text-align: center;
color: rgb(96, 60, 110);
font-size: 2em;
letter-spacing: 0.25em;
font-weight: 700;
}
.cart-headings {
display: flex;
align-items: center;
justify-content: space-around;
}
.btn-large {
margin: 25px;
outline: none;
width: 160px;
height: 45px;
padding: 10px 25px;
border: 2px solid #7e2655;
font-family: "Lato", sans-serif;
font-weight: 500;
background: transparent;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
display: inline-block;
}
.btn-large:hover {
border: none;
color: #ffffff;
background: rgb(96, 60, 110);
}
.logo {
padding: 0px;
margin-top: 16px;
width: 110px;
height: 110px;
}
.container-main-page {
display: flex;
justify-content: center;
flex-direction: column;
}
.img-main {
width: 100%;
height: auto;
margin: 0px;
padding: 0px;
align-self: center;
background-position: top right;
/* opacity: 0.8; */
}
#welcome-text {
font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
letter-spacing: 0.2em;
text-align: center;
font-size: 3em;
/* position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%); */
color: rgb(96, 60, 110);
/* text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.7); */
}
.container-confirmation {
display: flex;
align-items: center;
flex-direction: column;
}
.img-confirmation {
margin: 100px;
width: 30%;
height: auto;
}
.product-details {
display: flex;
flex-direction: column;
}
.img-wine {
width: auto;
height: 400px;
align-self: center;
}
table {
width: 80%;
margin-left: auto;
margin-right: auto;
}
td {
padding: 10px;
vertical-align: text-top;
}
.product-details button {
align-self: center;
}
/* login */
.text-center {
color: rgb(0, 0, 0);
text-transform: uppercase;
font-size: 23px;
margin: -50px 0 80px 0;
display: block;
text-align: center;
}
.box {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background-color: #edecfa;
border-radius: 3px;
padding: 70px 100px;
}
.input-container {
position: relative;
margin-bottom: 25px;
}
.input-container label {
position: absolute;
top: 0px;
left: 0px;
font-size: 16px;
color: rgb(180, 180, 180);
transition: all 0.5s ease-in-out;
}
.input-container input {
border: 0;
border-bottom: 1px solid #555;
background: transparent;
width: 100%;
padding: 8px 0 5px 0;
margin: 10px;
font-size: 16px;
color: rgb(0, 0, 0);
}
.input-container input:focus {
border: none;
outline: none;
border-bottom: 1px solid #e74c3c;
}
.btn {
color: rgb(0, 0, 0);
background-color: rgb(96, 60, 110);
outline: none;
border: 0;
color: #fff;
padding: 10px 20px;
text-transform: uppercase;
margin-top: 50px;
border-radius: 2px;
cursor: pointer;
position: relative;
}
.input-container input:focus ~ label,
.input-container input:valid ~ label {
top: -12px;
font-size: 12px;
}
/*
.div-cart {
width: 80%;
display: flex;
align-self: center;
flex-direction: column;
} */
.cart-total-price {
text-align: end;
width: 90%;
}
.qty-dropdown {
width: 50px;
margin: 5px;
}
.cart-item-qty-price-container {
display: flex;
align-items: center;
}
.qty-dropdown {
height: 20px;
}
.cart-item-qty-price-container ul {
width: 80px;
}
.price-total-per-wine {
color: rgb(85, 9, 116);
font-weight: bold;
}
.conf {
text-align: center;
color: rgb(96, 60, 110);
font-size: 2em;
letter-spacing: 0.25em;
font-weight: 700;
}
.select-wine-label {
font-size: 20px;
margin-right: 10px;
letter-spacing: 0.1em;
}
.wine-drop {
display: flex;
justify-content: center;
padding: 20px;
}
.dropdown-winetype {
width: 70px;
}
#nav-login {
width: 300px;
display: flex;
justify-content: space-around;
}
#checkout-container {
display: flex;
justify-content: flex-end;
}
| 15.411268 | 73 | 0.641199 |