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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
146fd85325bee2f67b73c3f4996bb3a0f7f33529 | 84 | sql | SQL | egov/egov-collection/src/main/resources/db/migration/main/V20160209120658__collection_collectionindex_alter_DDL.sql | cscl-git/digit-bpa | bcf2a4f0dadcee3d636357c51350db96071b40c6 | [
"MIT"
] | null | null | null | egov/egov-collection/src/main/resources/db/migration/main/V20160209120658__collection_collectionindex_alter_DDL.sql | cscl-git/digit-bpa | bcf2a4f0dadcee3d636357c51350db96071b40c6 | [
"MIT"
] | null | null | null | egov/egov-collection/src/main/resources/db/migration/main/V20160209120658__collection_collectionindex_alter_DDL.sql | cscl-git/digit-bpa | bcf2a4f0dadcee3d636357c51350db96071b40c6 | [
"MIT"
] | null | null | null | alter table eg_collectionindex alter column billnumber type character varying(50);
| 42 | 83 | 0.845238 |
e7f94faea0813341ebda497d2d676c1095cd32fd | 4,464 | py | Python | ros/src/tl_detector/light_classification/carla.py | xiangjiang/Capstone_1 | 68e6d044041f5759f3596d6d547bd871afb1970b | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/carla.py | xiangjiang/Capstone_1 | 68e6d044041f5759f3596d6d547bd871afb1970b | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/carla.py | xiangjiang/Capstone_1 | 68e6d044041f5759f3596d6d547bd871afb1970b | [
"MIT"
] | null | null | null | import tensorflow as tf
from os import path
import numpy as np
from scipy import misc
from styx_msgs.msg import TrafficLight
import cv2
import rospy
import tensorflow as tf
class CarlaModel(object):
def __init__(self, model_checkpoint):
self.sess = None
self.checkpoint = model_checkpoint
self.prob_thr = 0.90
self.TRAFFIC_LIGHT_CLASS = 10
self.image_no = 10000
tf.reset_default_graph()
def predict(self, img):
if self.sess == None:
gd = tf.GraphDef()
gd.ParseFromString(tf.gfile.GFile(self.checkpoint, "rb").read())
tf.import_graph_def(gd, name="object_detection_api")
self.sess = tf.Session()
g = tf.get_default_graph()
self.image = g.get_tensor_by_name("object_detection_api/image_tensor:0")
self.boxes = g.get_tensor_by_name("object_detection_api/detection_boxes:0")
self.scores = g.get_tensor_by_name("object_detection_api/detection_scores:0")
self.classes = g.get_tensor_by_name("object_detection_api/detection_classes:0")
img_h, img_w = img.shape[:2]
self.image_no = self.image_no+1
cv2.imwrite("full_"+str(self.image_no)+".png", img)
for h0 in [img_h//3, (img_h//3)-150]:
for w0 in [0, img_w//3, img_w*2//3]:
grid = img[h0:h0+img_h//3+50, w0:w0+img_w//3, :] # grid
pred_boxes, pred_scores, pred_classes = self.sess.run([self.boxes, self.scores, self.classes],
feed_dict={self.image: np.expand_dims(grid, axis=0)})
pred_boxes = pred_boxes.squeeze()
pred_scores = pred_scores.squeeze() # descreding order
pred_classes = pred_classes.squeeze()
traffic_light = None
h, w = grid.shape[:2]
cv2.imwrite("grid_"+str(self.image_no)+"_"+str(h0)+"_"+str(w0)+".png",grid)
rospy.loginfo("w,h is %s,%s",h0,w0)
for i in range(pred_boxes.shape[0]):
box = pred_boxes[i]
score = pred_scores[i]
if score < self.prob_thr: continue
if pred_classes[i] != self.TRAFFIC_LIGHT_CLASS: continue
x0, y0 = box[1] * w, box[0] * h
x1, y1 = box[3] * w, box[2] * h
x0, y0, x1, y1 = map(int, [x0, y0, x1, y1])
x_diff = x1 - x0
y_diff = y1 - y0
xy_ratio = x_diff/float(y_diff)
rospy.loginfo("image_no is %s", self.image_no)
rospy.loginfo("x,y ratio is %s",xy_ratio)
rospy.loginfo("score is %s",score)
if xy_ratio > 0.48: continue
area = np.abs((x1-x0) * (y1-y0)) / float(w*h)
rospy.loginfo("area is %s",area)
if area <= 0.001: continue
traffic_light = grid[y0:y1, x0:x1]
rospy.loginfo("traffic light given")
# select first -most confidence
if traffic_light is not None: break
if traffic_light is not None: break
if traffic_light is None:
pass
else:
rospy.loginfo("w,h is %s,%s",h0,w0)
rospy.loginfo("x,y ratio is %s",xy_ratio)
rospy.loginfo("score is %s",score)
cv2.imwrite("light_"+str(self.image_no)+".png",traffic_light)
#cv2.imwrite("full_"+str(self.image_no)+".png", img)
#cv2.imwrite("grid_"+str(self.image_no)+".png",grid)
#self.image_no = self.image_no+1
brightness = cv2.cvtColor(traffic_light, cv2.COLOR_RGB2HSV)[:,:,-1]
hs, ws = np.where(brightness >= (brightness.max()-30))
hs_mean = hs.mean()
tl_h = traffic_light.shape[0]
if hs_mean / tl_h < 0.4:
rospy.loginfo("image"+str(self.image_no-1)+" is RED")
return TrafficLight.RED
elif hs_mean / tl_h >= 0.55:
rospy.loginfo("image"+str(self.image_no-1)+" is GREEN")
return TrafficLight.GREEN
else:
rospy.loginfo("image"+str(self.image_no-1)+" is YELLOW")
return TrafficLight.YELLOW
return TrafficLight.UNKNOWN
| 43.764706 | 114 | 0.533602 |
32f87cc120f9dc3b11570ea6aa7fc550cd438250 | 7,038 | kt | Kotlin | app/src/main/java/gr/blackswamp/damagereports/ui/fragments/ModelFragment.kt | JMavrelos/DamageReportsKTX | 125ceef68db9554d9c047500e41f0fa96085ae64 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/gr/blackswamp/damagereports/ui/fragments/ModelFragment.kt | JMavrelos/DamageReportsKTX | 125ceef68db9554d9c047500e41f0fa96085ae64 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/gr/blackswamp/damagereports/ui/fragments/ModelFragment.kt | JMavrelos/DamageReportsKTX | 125ceef68db9554d9c047500e41f0fa96085ae64 | [
"Apache-2.0"
] | null | null | null | package gr.blackswamp.damagereports.ui.fragments
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.widget.EditText
import android.widget.FrameLayout
import androidx.appcompat.widget.SearchView
import androidx.core.os.bundleOf
import androidx.fragment.app.setFragmentResult
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED
import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED
import com.google.android.material.floatingactionbutton.FloatingActionButton
import gr.blackswamp.core.ui.CoreFragment
import gr.blackswamp.core.widget.CItemTouchHelperCallback
import gr.blackswamp.core.widget.SearchListener
import gr.blackswamp.core.widget.onClick
import gr.blackswamp.core.widget.visible
import gr.blackswamp.damagereports.R
import gr.blackswamp.damagereports.app.moveBy
import gr.blackswamp.damagereports.databinding.FragmentModelBinding
import gr.blackswamp.damagereports.logic.commands.ModelCommand
import gr.blackswamp.damagereports.logic.interfaces.FragmentParent
import gr.blackswamp.damagereports.logic.interfaces.ModelViewModel
import gr.blackswamp.damagereports.logic.vms.MainViewModelImpl
import gr.blackswamp.damagereports.logic.vms.ModelViewModelImpl
import gr.blackswamp.damagereports.ui.adapters.ListAction
import gr.blackswamp.damagereports.ui.adapters.ModelAdapter
import gr.blackswamp.damagereports.ui.model.Model
import org.koin.android.viewmodel.ext.android.sharedViewModel
import org.koin.android.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf
import java.util.*
import kotlin.math.abs
class ModelFragment : CoreFragment<ModelViewModel, FragmentModelBinding>(), ListAction {
companion object {
const val TAG = "ModelFragment"
const val MODEL = "$TAG.MODEL"
const val RESULT = "$TAG.RESULT"
}
//region bindings
private val parent: FragmentParent by sharedViewModel<MainViewModelImpl>()
private val args: ModelFragmentArgs by navArgs()
override val vm: ModelViewModel by viewModel<ModelViewModelImpl> { parametersOf(parent, args.brand.id) }
override val binding: FragmentModelBinding by lazy { FragmentModelBinding.inflate(layoutInflater) }
override val optionsMenuId: Int = R.menu.list
private val refresh: SwipeRefreshLayout by lazy { binding.refresh }
private val action: FloatingActionButton by lazy { binding.action }
private val cancel: FloatingActionButton by lazy { binding.cancel }
private val list: RecyclerView by lazy { binding.list }
private val name: EditText by lazy { binding.name }
private val adapter = ModelAdapter()
private val sheetBehavior: BottomSheetBehavior<FrameLayout> by lazy { BottomSheetBehavior.from(binding.create) }
private var screenWidth: Int = 0
//endregion
//region set up
override fun initView(state: Bundle?) {
val metrics = DisplayMetrics()
activity?.windowManager?.defaultDisplay?.getMetrics(metrics)
screenWidth = metrics.widthPixels
list.adapter = adapter
ItemTouchHelper(CItemTouchHelperCallback(adapter, allowSwipe = true, allowDrag = false)).attachToRecyclerView(list)
}
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
super.onCreateOptionsMenu(menu, inflater)
(menu.findItem(R.id.list_search)?.actionView as? SearchView)?.setOnQueryTextListener(SearchListener(vm::newFilter))
}
override fun setUpListeners() {
adapter.setListener(this)
action.onClick(this::actionClick)
refresh.onClick(this::refresh)
cancel.onClick(vm::cancel)
sheetBehavior.addBottomSheetCallback(bottomSheetCallback)
}
override fun setUpObservers(vm: ModelViewModel) {
vm.model.observe(this::showModel)
vm.command.observe(this::executeCommand)
vm.modelList.observe(adapter::submitList)
}
//endregion
//region listeners
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.sort_use -> {
toggleByUse()
true
}
R.id.sort_name -> {
toggleByName()
true
}
else -> super.onOptionsItemSelected(item)
}
}
override fun delete(id: UUID) = vm.delete(id)
override fun select(id: UUID) = vm.select(id)
override fun edit(id: UUID) = vm.edit(id)
private fun toggleByUse() {
}
private fun toggleByName() {
}
private fun actionClick() {
if (sheetBehavior.state == STATE_EXPANDED) {
vm.save(name.text.toString())
} else {
vm.create()
}
}
private fun refresh() = vm.refresh()
private val bottomSheetCallback = object : BottomSheetBehavior.BottomSheetCallback() {
override fun onSlide(bottomSheet: View, slideOffset: Float) {
if (isAdded && slideOffset > 0f && slideOffset < 1f) {
updateCancelButton(slideOffset)
updateActionButton(slideOffset)
}
}
override fun onStateChanged(bottomSheet: View, newState: Int) = Unit
}
//region listeners
//region private functions
private fun updateCancelButton(slideOffset: Float) {
cancel.rotation = (-slideOffset * 360f)
cancel.alpha = abs(slideOffset)
cancel.visible = slideOffset > 0f
cancel.moveBy(slideOffset, screenWidth / 2)
}
private fun updateActionButton(slideOffset: Float) {
action.rotation = (slideOffset * 360f)
if (slideOffset == 1f) {
action.setImageResource(R.drawable.ic_save)
} else if (slideOffset <= 0f) {
action.setImageResource(R.drawable.ic_add)
}
}
private fun showModel(model: Model?) {
if (model == null) {
updateActionButton(0f)
updateCancelButton(0f)
sheetBehavior.state = STATE_COLLAPSED
} else {
updateActionButton(1f)
updateCancelButton(1f)
name.setText(model.name)
name.selectAll()
sheetBehavior.state = STATE_EXPANDED
}
}
private fun executeCommand(command: ModelCommand?) {
when (command) {
is ModelCommand.ModelSelected -> {
setFragmentResult(RESULT, bundleOf(MODEL to command.model))
val action = ModelFragmentDirections.finishModel()
findNavController().navigate(action)
}
}
}
//endregion
} | 36.848168 | 123 | 0.708014 |
e25049ff8f9ce05333f6ddc1f6fdd891cec18ad4 | 6,436 | sql | SQL | db/db_regrind_v2.sql | MuhamadRidwan96/projectmain | 9ff640920ca72cee58511d2d4aac37a150850a4d | [
"MIT"
] | null | null | null | db/db_regrind_v2.sql | MuhamadRidwan96/projectmain | 9ff640920ca72cee58511d2d4aac37a150850a4d | [
"MIT"
] | null | null | null | db/db_regrind_v2.sql | MuhamadRidwan96/projectmain | 9ff640920ca72cee58511d2d4aac37a150850a4d | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 10, 2021 at 09:08 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `db_regrind_v2`
--
-- --------------------------------------------------------
--
-- Table structure for table `tab_material`
--
CREATE TABLE `tab_material` (
`mm` int(8) NOT NULL,
`item` varchar(100) NOT NULL,
`color` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tab_material`
--
INSERT INTO `tab_material` (`mm`, `item`, `color`) VALUES
(10001314, 'sdfsdf', 'GREEN'),
(10002121, 'GIL HDPE CRATE BINTANG', 'RED');
-- --------------------------------------------------------
--
-- Table structure for table `tab_user`
--
CREATE TABLE `tab_user` (
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`full_name` varchar(100) NOT NULL,
`phone` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`level` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tab_user`
--
INSERT INTO `tab_user` (`username`, `password`, `full_name`, `phone`, `email`, `level`) VALUES
('rdn', '123456', 'Muhamad Ridwan Ramdani', '81356810', '[email protected]', 1);
-- --------------------------------------------------------
--
-- Table structure for table `tb_incoming_material`
--
CREATE TABLE `tb_incoming_material` (
`id_in` int(11) NOT NULL,
`date` date NOT NULL,
`shift` varchar(10) NOT NULL,
`username` varchar(50) NOT NULL,
`code_location` varchar(20) NOT NULL,
`mm` int(20) NOT NULL,
`item` varchar(100) NOT NULL,
`quantity` int(10) NOT NULL,
`uom` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tb_incoming_material`
--
INSERT INTO `tb_incoming_material` (`id_in`, `date`, `shift`, `username`, `code_location`, `mm`, `item`, `quantity`, `uom`) VALUES
(1, '2021-06-20', '1', 'RDN', 'GDC-01-A', 10002121, 'sdfsdf', 1, 'kg'),
(2, '2021-05-10', '2', 'rdn', 'GDC-01-A', 10002121, 'GIL HDPE CRATE BINTANG', 100, 'KG'),
(3, '2021-05-09', '3', 'RDN', 'GDC-01-A', 10001314, 'GIL HDPE', 100, 'KG');
-- --------------------------------------------------------
--
-- Table structure for table `tb_location`
--
CREATE TABLE `tb_location` (
`code_location` varchar(20) NOT NULL,
`mm` int(10) NOT NULL,
`item` varchar(50) NOT NULL,
`color` varchar(25) NOT NULL,
`quantity` int(10) NOT NULL,
`uom` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tb_location`
--
INSERT INTO `tb_location` (`code_location`, `mm`, `item`, `color`, `quantity`, `uom`) VALUES
('GDC-01-A', 10002121, '', '', 100, ' '),
('GDC-02-A', 10001314, 'GIL HDPE ', '', 100, 'KG'),
('GDC-02-B', 10001314, 'GIL HDPE ', 'RED', 100, 'KG');
-- --------------------------------------------------------
--
-- Table structure for table `tb_used_material`
--
CREATE TABLE `tb_used_material` (
`id_use` int(11) NOT NULL,
`date` date NOT NULL,
`shift` varchar(10) NOT NULL,
`username` varchar(50) NOT NULL,
`code_location` varchar(20) NOT NULL,
`mm` int(20) NOT NULL,
`item` varchar(100) NOT NULL,
`quantity` int(10) NOT NULL,
`uom` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tb_used_material`
--
INSERT INTO `tb_used_material` (`id_use`, `date`, `shift`, `username`, `code_location`, `mm`, `item`, `quantity`, `uom`) VALUES
(1, '2021-06-20', '1', 'RDN', 'GDC-01-A', 10002121, 'sdfsdf', 1, 'kg');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tab_material`
--
ALTER TABLE `tab_material`
ADD PRIMARY KEY (`mm`);
--
-- Indexes for table `tab_user`
--
ALTER TABLE `tab_user`
ADD PRIMARY KEY (`username`);
--
-- Indexes for table `tb_incoming_material`
--
ALTER TABLE `tb_incoming_material`
ADD PRIMARY KEY (`id_in`),
ADD KEY `code_location` (`code_location`),
ADD KEY `mm` (`mm`),
ADD KEY `username` (`username`);
--
-- Indexes for table `tb_location`
--
ALTER TABLE `tb_location`
ADD PRIMARY KEY (`code_location`),
ADD KEY `mm` (`mm`);
--
-- Indexes for table `tb_used_material`
--
ALTER TABLE `tb_used_material`
ADD PRIMARY KEY (`id_use`),
ADD KEY `code_location` (`code_location`),
ADD KEY `mm` (`mm`),
ADD KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tab_material`
--
ALTER TABLE `tab_material`
MODIFY `mm` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10002122;
--
-- AUTO_INCREMENT for table `tb_incoming_material`
--
ALTER TABLE `tb_incoming_material`
MODIFY `id_in` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `tb_used_material`
--
ALTER TABLE `tb_used_material`
MODIFY `id_use` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `tb_incoming_material`
--
ALTER TABLE `tb_incoming_material`
ADD CONSTRAINT `tb_incoming_material_ibfk_1` FOREIGN KEY (`mm`) REFERENCES `tab_material` (`mm`),
ADD CONSTRAINT `tb_incoming_material_ibfk_2` FOREIGN KEY (`code_location`) REFERENCES `tb_location` (`code_location`),
ADD CONSTRAINT `tb_incoming_material_ibfk_3` FOREIGN KEY (`username`) REFERENCES `tab_user` (`username`);
--
-- Constraints for table `tb_location`
--
ALTER TABLE `tb_location`
ADD CONSTRAINT `tb_location_ibfk_1` FOREIGN KEY (`mm`) REFERENCES `tab_material` (`mm`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `tb_used_material`
--
ALTER TABLE `tb_used_material`
ADD CONSTRAINT `tb_used_material_ibfk_1` FOREIGN KEY (`mm`) REFERENCES `tab_material` (`mm`),
ADD CONSTRAINT `tb_used_material_ibfk_2` FOREIGN KEY (`code_location`) REFERENCES `tb_location` (`code_location`),
ADD CONSTRAINT `tb_used_material_ibfk_3` FOREIGN KEY (`username`) REFERENCES `tab_user` (`username`);
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 */;
| 27.387234 | 130 | 0.658017 |
088d9f281d03f372fb14199af89c79035bf38b72 | 17,764 | go | Go | service/costandusagereportservice/api.go | StreamCo/aws-sdk-go-v2 | 9613c82956b28952f29ae5990c538a86d147ce4e | [
"Apache-2.0"
] | 2 | 2017-12-04T16:59:16.000Z | 2017-12-06T06:04:42.000Z | service/costandusagereportservice/api.go | StreamCo/aws-sdk-go-v2 | 9613c82956b28952f29ae5990c538a86d147ce4e | [
"Apache-2.0"
] | 2 | 2019-08-12T13:29:16.000Z | 2019-09-12T07:52:19.000Z | service/costandusagereportservice/api.go | StreamCo/aws-sdk-go-v2 | 9613c82956b28952f29ae5990c538a86d147ce4e | [
"Apache-2.0"
] | 1 | 2019-08-12T14:03:20.000Z | 2019-08-12T14:03:20.000Z | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package costandusagereportservice
import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opDeleteReportDefinition = "DeleteReportDefinition"
// DeleteReportDefinitionRequest is a API request type for the DeleteReportDefinition API operation.
type DeleteReportDefinitionRequest struct {
*aws.Request
Input *DeleteReportDefinitionInput
Copy func(*DeleteReportDefinitionInput) DeleteReportDefinitionRequest
}
// Send marshals and sends the DeleteReportDefinition API request.
func (r DeleteReportDefinitionRequest) Send() (*DeleteReportDefinitionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteReportDefinitionOutput), nil
}
// DeleteReportDefinitionRequest returns a request value for making API operation for
// AWS Cost and Usage Report Service.
//
// Delete a specified report definition
//
// // Example sending a request using the DeleteReportDefinitionRequest method.
// req := client.DeleteReportDefinitionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition
func (c *CostAndUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) DeleteReportDefinitionRequest {
op := &aws.Operation{
Name: opDeleteReportDefinition,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteReportDefinitionInput{}
}
output := &DeleteReportDefinitionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteReportDefinitionRequest{Request: req, Input: input, Copy: c.DeleteReportDefinitionRequest}
}
const opDescribeReportDefinitions = "DescribeReportDefinitions"
// DescribeReportDefinitionsRequest is a API request type for the DescribeReportDefinitions API operation.
type DescribeReportDefinitionsRequest struct {
*aws.Request
Input *DescribeReportDefinitionsInput
Copy func(*DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest
}
// Send marshals and sends the DescribeReportDefinitions API request.
func (r DescribeReportDefinitionsRequest) Send() (*DescribeReportDefinitionsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeReportDefinitionsOutput), nil
}
// DescribeReportDefinitionsRequest returns a request value for making API operation for
// AWS Cost and Usage Report Service.
//
// Describe a list of report definitions owned by the account
//
// // Example sending a request using the DescribeReportDefinitionsRequest method.
// req := client.DescribeReportDefinitionsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions
func (c *CostAndUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest {
op := &aws.Operation{
Name: opDescribeReportDefinitions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeReportDefinitionsInput{}
}
output := &DescribeReportDefinitionsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeReportDefinitionsRequest{Request: req, Input: input, Copy: c.DescribeReportDefinitionsRequest}
}
// Paginate pages iterates over the pages of a DescribeReportDefinitionsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeReportDefinitions operation.
// req := client.DescribeReportDefinitionsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *DescribeReportDefinitionsRequest) Paginate(opts ...aws.Option) DescribeReportDefinitionsPager {
return DescribeReportDefinitionsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *DescribeReportDefinitionsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// DescribeReportDefinitionsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type DescribeReportDefinitionsPager struct {
aws.Pager
}
func (p *DescribeReportDefinitionsPager) CurrentPage() *DescribeReportDefinitionsOutput {
return p.Pager.CurrentPage().(*DescribeReportDefinitionsOutput)
}
const opPutReportDefinition = "PutReportDefinition"
// PutReportDefinitionRequest is a API request type for the PutReportDefinition API operation.
type PutReportDefinitionRequest struct {
*aws.Request
Input *PutReportDefinitionInput
Copy func(*PutReportDefinitionInput) PutReportDefinitionRequest
}
// Send marshals and sends the PutReportDefinition API request.
func (r PutReportDefinitionRequest) Send() (*PutReportDefinitionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*PutReportDefinitionOutput), nil
}
// PutReportDefinitionRequest returns a request value for making API operation for
// AWS Cost and Usage Report Service.
//
// Create a new report definition
//
// // Example sending a request using the PutReportDefinitionRequest method.
// req := client.PutReportDefinitionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition
func (c *CostAndUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) PutReportDefinitionRequest {
op := &aws.Operation{
Name: opPutReportDefinition,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutReportDefinitionInput{}
}
output := &PutReportDefinitionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return PutReportDefinitionRequest{Request: req, Input: input, Copy: c.PutReportDefinitionRequest}
}
// Request of DeleteReportDefinition
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionRequest
type DeleteReportDefinitionInput struct {
_ struct{} `type:"structure"`
// Preferred name for a report, it has to be unique. Must starts with a number/letter,
// case sensitive. Limited to 256 characters.
ReportName *string `type:"string"`
}
// String returns the string representation
func (s DeleteReportDefinitionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteReportDefinitionInput) GoString() string {
return s.String()
}
// Response of DeleteReportDefinition
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionResponse
type DeleteReportDefinitionOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// A message indicates if the deletion is successful.
ResponseMessage *string `type:"string"`
}
// String returns the string representation
func (s DeleteReportDefinitionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteReportDefinitionOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteReportDefinitionOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Request of DescribeReportDefinitions
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsRequest
type DescribeReportDefinitionsInput struct {
_ struct{} `type:"structure"`
// The max number of results returned by the operation.
MaxResults *int64 `min:"5" type:"integer"`
// A generic string.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s DescribeReportDefinitionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeReportDefinitionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeReportDefinitionsInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DescribeReportDefinitionsInput"}
if s.MaxResults != nil && *s.MaxResults < 5 {
invalidParams.Add(aws.NewErrParamMinValue("MaxResults", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Response of DescribeReportDefinitions
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsResponse
type DescribeReportDefinitionsOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// A generic string.
NextToken *string `type:"string"`
// A list of report definitions.
ReportDefinitions []ReportDefinition `type:"list"`
}
// String returns the string representation
func (s DescribeReportDefinitionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeReportDefinitionsOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DescribeReportDefinitionsOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Request of PutReportDefinition
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionRequest
type PutReportDefinitionInput struct {
_ struct{} `type:"structure"`
// The definition of AWS Cost and Usage Report. Customer can specify the report
// name, time unit, report format, compression format, S3 bucket and additional
// artifacts and schema elements in the definition.
//
// ReportDefinition is a required field
ReportDefinition *ReportDefinition `type:"structure" required:"true"`
}
// String returns the string representation
func (s PutReportDefinitionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutReportDefinitionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *PutReportDefinitionInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "PutReportDefinitionInput"}
if s.ReportDefinition == nil {
invalidParams.Add(aws.NewErrParamRequired("ReportDefinition"))
}
if s.ReportDefinition != nil {
if err := s.ReportDefinition.Validate(); err != nil {
invalidParams.AddNested("ReportDefinition", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Response of PutReportDefinition
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionResponse
type PutReportDefinitionOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s PutReportDefinitionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutReportDefinitionOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s PutReportDefinitionOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// The definition of AWS Cost and Usage Report. Customer can specify the report
// name, time unit, report format, compression format, S3 bucket and additional
// artifacts and schema elements in the definition.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ReportDefinition
type ReportDefinition struct {
_ struct{} `type:"structure"`
// A list of additional artifacts.
AdditionalArtifacts []AdditionalArtifact `type:"list"`
// A list of schema elements.
//
// AdditionalSchemaElements is a required field
AdditionalSchemaElements []SchemaElement `type:"list" required:"true"`
// Preferred compression format for report.
//
// Compression is a required field
Compression CompressionFormat `type:"string" required:"true" enum:"true"`
// Preferred format for report.
//
// Format is a required field
Format ReportFormat `type:"string" required:"true" enum:"true"`
// Preferred name for a report, it has to be unique. Must starts with a number/letter,
// case sensitive. Limited to 256 characters.
//
// ReportName is a required field
ReportName *string `type:"string" required:"true"`
// Name of customer S3 bucket.
//
// S3Bucket is a required field
S3Bucket *string `type:"string" required:"true"`
// Preferred report path prefix. Limited to 256 characters.
//
// S3Prefix is a required field
S3Prefix *string `type:"string" required:"true"`
// Region of customer S3 bucket.
//
// S3Region is a required field
S3Region AWSRegion `type:"string" required:"true" enum:"true"`
// The frequency on which report data are measured and displayed.
//
// TimeUnit is a required field
TimeUnit TimeUnit `type:"string" required:"true" enum:"true"`
}
// String returns the string representation
func (s ReportDefinition) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ReportDefinition) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ReportDefinition) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ReportDefinition"}
if s.AdditionalSchemaElements == nil {
invalidParams.Add(aws.NewErrParamRequired("AdditionalSchemaElements"))
}
if len(s.Compression) == 0 {
invalidParams.Add(aws.NewErrParamRequired("Compression"))
}
if len(s.Format) == 0 {
invalidParams.Add(aws.NewErrParamRequired("Format"))
}
if s.ReportName == nil {
invalidParams.Add(aws.NewErrParamRequired("ReportName"))
}
if s.S3Bucket == nil {
invalidParams.Add(aws.NewErrParamRequired("S3Bucket"))
}
if s.S3Prefix == nil {
invalidParams.Add(aws.NewErrParamRequired("S3Prefix"))
}
if len(s.S3Region) == 0 {
invalidParams.Add(aws.NewErrParamRequired("S3Region"))
}
if len(s.TimeUnit) == 0 {
invalidParams.Add(aws.NewErrParamRequired("TimeUnit"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Region of customer S3 bucket.
type AWSRegion string
// Enum values for AWSRegion
const (
AWSRegionUsEast1 AWSRegion = "us-east-1"
AWSRegionUsWest1 AWSRegion = "us-west-1"
AWSRegionUsWest2 AWSRegion = "us-west-2"
AWSRegionEuCentral1 AWSRegion = "eu-central-1"
AWSRegionEuWest1 AWSRegion = "eu-west-1"
AWSRegionApSoutheast1 AWSRegion = "ap-southeast-1"
AWSRegionApSoutheast2 AWSRegion = "ap-southeast-2"
AWSRegionApNortheast1 AWSRegion = "ap-northeast-1"
)
func (enum AWSRegion) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum AWSRegion) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
// Enable support for Redshift and/or QuickSight.
type AdditionalArtifact string
// Enum values for AdditionalArtifact
const (
AdditionalArtifactRedshift AdditionalArtifact = "REDSHIFT"
AdditionalArtifactQuicksight AdditionalArtifact = "QUICKSIGHT"
)
func (enum AdditionalArtifact) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum AdditionalArtifact) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
// Preferred compression format for report.
type CompressionFormat string
// Enum values for CompressionFormat
const (
CompressionFormatZip CompressionFormat = "ZIP"
CompressionFormatGzip CompressionFormat = "GZIP"
)
func (enum CompressionFormat) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum CompressionFormat) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
// Preferred format for report.
type ReportFormat string
// Enum values for ReportFormat
const (
ReportFormatTextOrcsv ReportFormat = "textORcsv"
)
func (enum ReportFormat) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum ReportFormat) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
// Preference of including Resource IDs. You can include additional details
// about individual resource IDs in your report.
type SchemaElement string
// Enum values for SchemaElement
const (
SchemaElementResources SchemaElement = "RESOURCES"
)
func (enum SchemaElement) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum SchemaElement) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
// The frequency on which report data are measured and displayed.
type TimeUnit string
// Enum values for TimeUnit
const (
TimeUnitHourly TimeUnit = "HOURLY"
TimeUnitDaily TimeUnit = "DAILY"
)
func (enum TimeUnit) MarshalValue() (string, error) {
return string(enum), nil
}
func (enum TimeUnit) MarshalValueBuf(b []byte) ([]byte, error) {
b = b[0:0]
return append(b, enum...), nil
}
| 29.656093 | 142 | 0.750563 |
56d071e7d0aa3e9b12b4c7277028b270dd56dd46 | 1,234 | sql | SQL | SQL/SQL_exercise_05/5_questions.sql | malaoudi/CollegeCoursesProjects | c3e01e68446fd080262bc5c50e31a960248700da | [
"MIT"
] | null | null | null | SQL/SQL_exercise_05/5_questions.sql | malaoudi/CollegeCoursesProjects | c3e01e68446fd080262bc5c50e31a960248700da | [
"MIT"
] | 1 | 2021-04-22T08:24:26.000Z | 2021-04-22T08:24:26.000Z | SQL/SQL_exercise_05/5_questions.sql | malaoudi/CollegeCoursesProjects | c3e01e68446fd080262bc5c50e31a960248700da | [
"MIT"
] | null | null | null | -- https://en.wikibooks.org/wiki/SQL_Exercises/Pieces_and_providers
-- 5.1 Select the name of all the pieces.
-- 5.2 Select all the providers' data.
-- 5.3 Obtain the average price of each piece (show only the piece code and the average price).
-- 5.4 Obtain the names of all providers who supply piece 1.
-- 5.5 Select the name of pieces provided by provider with code "HAL".
-- 5.6
-- ---------------------------------------------
-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Interesting and important one.
-- For each piece, find the most expensive offering of that piece and include the piece name, provider name, and price
-- (note that there could be two providers who supply the same piece at the most expensive price).
-- ---------------------------------------------
-- 5.7 Add an entry to the database to indicate that "Skellington Supplies" (code "TNBC") will provide sprockets (code "1") for 7 cents each.
-- 5.8 Increase all prices by one cent.
-- 5.9 Update the database to reflect that "Susan Calvin Corp." (code "RBT") will not supply bolts (code 4).
-- 5.10 Update the database to reflect that "Susan Calvin Corp." (code "RBT") will not supply any pieces
-- (the provider should still remain in the database).
| 64.947368 | 141 | 0.65235 |
a4f8537eefcf951ea55cf55b5d1bd6db99779529 | 409 | asm | Assembly | libsrc/math/genmath/c/sccz80/ldbchl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/math/genmath/c/sccz80/ldbchl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/math/genmath/c/sccz80/ldbchl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; Z88dk Generic Floating Point Math Library
;
; bc ix de = (hl)
SECTION code_fp
PUBLIC ldbchl
.ldbchl ld e,(hl)
inc hl
ld d,(hl)
inc hl
ld c,(hl)
ld ixl,c
inc hl
ld c,(hl)
ld ixh,c
inc hl
ld c,(hl)
inc hl
ld b,(hl)
inc hl
ret
| 16.36 | 43 | 0.369193 |
85bf9b91fa5616ecfc6093209e8ccdd407525ec5 | 374 | js | JavaScript | src/layout/controls/player/index.js | samussiah/animated-swimmer-plot | 9da3f6b52a991da3fa601cabbdbecabec9c753a7 | [
"MIT"
] | null | null | null | src/layout/controls/player/index.js | samussiah/animated-swimmer-plot | 9da3f6b52a991da3fa601cabbdbecabec9c753a7 | [
"MIT"
] | 37 | 2021-04-05T16:58:15.000Z | 2021-08-22T17:03:58.000Z | src/layout/controls/player/index.js | samussiah/animated-swimmer-plot | 9da3f6b52a991da3fa601cabbdbecabec9c753a7 | [
"MIT"
] | null | null | null | import playPause from './playPause';
import stepBackward from './stepBackward';
import stepForward from './stepForward';
import speedDown from './speedDown';
import speedUp from './speedUp';
import reset from './reset';
import range from './range';
export default {
playPause,
stepBackward,
stepForward,
//speedDown,
//speedUp,
reset,
range,
};
| 20.777778 | 42 | 0.687166 |
7d6e8369bdf70bfdc191e143ff9c1408297d7764 | 1,279 | html | HTML | Generated/index/System.Management.Automation/R/007313a3e4584d3f.html | Alex-ABPerson/PSSourceBrowser | dc7389c4cb47f00dbfffb04fc1905e2fc935110f | [
"Apache-2.0"
] | null | null | null | Generated/index/System.Management.Automation/R/007313a3e4584d3f.html | Alex-ABPerson/PSSourceBrowser | dc7389c4cb47f00dbfffb04fc1905e2fc935110f | [
"Apache-2.0"
] | null | null | null | Generated/index/System.Management.Automation/R/007313a3e4584d3f.html | Alex-ABPerson/PSSourceBrowser | dc7389c4cb47f00dbfffb04fc1905e2fc935110f | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE html>
<html><head><title>InformationalRecord</title><link rel="stylesheet" href="../../styles.css"/><script src="../../scripts.js"></script></head><body onload="ro();">
<div class="rH">3 types derived from InformationalRecord</div><div class="rA">System.Management.Automation (3)</div><div class="rG" id="System.Management.Automation"><div class="rF"><div class="rN">engine\hostifaces\InformationalRecord.cs (3)</div>
<a href="../engine/hostifaces/InformationalRecord.cs.html#174"><b>174</b>public class WarningRecord : <i>InformationalRecord</i></a>
<a href="../engine/hostifaces/InformationalRecord.cs.html#230"><b>230</b>public class DebugRecord : <i>InformationalRecord</i></a>
<a href="../engine/hostifaces/InformationalRecord.cs.html#251"><b>251</b>public class VerboseRecord : <i>InformationalRecord</i></a>
</div>
</div>
<div class="rH">2 references to InformationalRecord</div><div class="rA">System.Management.Automation (2)</div><div class="rG" id="System.Management.Automation"><div class="rF"><div class="rN">engine\serialization.cs (2)</div>
<a href="../engine/serialization.cs.html#1482"><b>1482</b><i>InformationalRecord</i> informationalRecord = mshSource.ImmediateBaseObject as <i>InformationalRecord</i>;</a>
</div>
</div>
</body></html> | 98.384615 | 249 | 0.722439 |
a7bda7dcf1e22b2a8a55af9607310807f0793780 | 761 | kt | Kotlin | app/src/main/java/com/myetherwallet/mewconnect/feature/buy/interactor/GetHistory.kt | fossabot/MEWconnect-Android | 745831da59162cbde70b76c3c8f48f1b327fd7fe | [
"MIT"
] | 50 | 2019-01-02T22:17:25.000Z | 2022-03-11T03:42:27.000Z | app/src/main/java/com/myetherwallet/mewconnect/feature/buy/interactor/GetHistory.kt | fossabot/MEWconnect-Android | 745831da59162cbde70b76c3c8f48f1b327fd7fe | [
"MIT"
] | 12 | 2019-02-19T22:32:06.000Z | 2021-07-29T02:11:42.000Z | app/src/main/java/com/myetherwallet/mewconnect/feature/buy/interactor/GetHistory.kt | fossabot/MEWconnect-Android | 745831da59162cbde70b76c3c8f48f1b327fd7fe | [
"MIT"
] | 27 | 2019-01-02T19:55:33.000Z | 2022-03-20T16:39:41.000Z | package com.myetherwallet.mewconnect.feature.buy.interactor
import com.myetherwallet.mewconnect.core.platform.BaseInteractor
import com.myetherwallet.mewconnect.core.platform.Either
import com.myetherwallet.mewconnect.core.platform.Failure
import com.myetherwallet.mewconnect.feature.buy.data.BuyHistoryItem
import com.myetherwallet.mewconnect.feature.buy.database.BuyHistoryDao
import javax.inject.Inject
/**
* Created by BArtWell on 17.09.2018.
*/
class GetHistory
@Inject constructor(private val buyHistoryDao: BuyHistoryDao) : BaseInteractor<List<BuyHistoryItem>, GetHistory.Params>() {
override suspend fun run(params: Params): Either<Failure, List<BuyHistoryItem>> {
return Either.Right(buyHistoryDao.getAll())
}
class Params
}
| 33.086957 | 123 | 0.804205 |
e759f2c836cf70967b124d55ba8e6809b1bb2c9b | 1,163 | js | JavaScript | test/model/DeclarationTest.js | garyluu/pipeline-builder | 1ea4afde468bfe9db2fbd8233d361b22353d3050 | [
"MIT"
] | 41 | 2017-03-31T04:18:31.000Z | 2022-01-07T07:16:28.000Z | test/model/DeclarationTest.js | garyluu/pipeline-builder | 1ea4afde468bfe9db2fbd8233d361b22353d3050 | [
"MIT"
] | 61 | 2017-04-03T13:19:41.000Z | 2021-11-23T06:33:29.000Z | test/model/DeclarationTest.js | garyluu/pipeline-builder | 1ea4afde468bfe9db2fbd8233d361b22353d3050 | [
"MIT"
] | 16 | 2017-04-27T16:06:33.000Z | 2021-11-15T03:11:46.000Z | import { expect } from 'chai';
import Declaration from '../../src/model/Declaration';
describe('model/Declaration', () => {
describe('constructor', () => {
const declarationAst = {
type: { id: 41, str: 'type', source_string: 'Int', line: 2, col: 3 },
name: { id: 39, str: 'identifier', source_string: 'foo', line: 2, col: 9 },
expression: { id: 17, str: 'float', source_string: '9', line: 2, col: 15 },
};
const name = 'foo';
it('requires a name', () => {
expect(() => new Declaration('', declarationAst, null)).to.throw(Error);
expect(() => new Declaration(name, declarationAst, null)).to.not.throw(Error);
expect(new Declaration(name, declarationAst, null).name).to.equal(name);
});
it('requires a declaration ast object with expression and type', () => {
expect(() => new Declaration(name)).to.throws(Error);
expect(() => new Declaration(name, {})).to.throws(Error);
expect(() => new Declaration(name, { type: declarationAst.type })).to.throws(Error);
expect(() => new Declaration(name, { expression: declarationAst.expression })).to.throws(Error);
});
});
});
| 37.516129 | 102 | 0.602752 |
04025d8fc0ebd52beaceee1b1630a8cc3c340286 | 674 | js | JavaScript | public/js/animador.js | GalacticMalware/Climax | 60d856214b9b57ab90e2aaf35abe0ae58a9293bf | [
"MIT"
] | null | null | null | public/js/animador.js | GalacticMalware/Climax | 60d856214b9b57ab90e2aaf35abe0ae58a9293bf | [
"MIT"
] | null | null | null | public/js/animador.js | GalacticMalware/Climax | 60d856214b9b57ab90e2aaf35abe0ae58a9293bf | [
"MIT"
] | null | null | null | let animacionInicio = document.querySelectorAll(".animacion2");
let animado = document.querySelectorAll(".animacion");
function mostrarScroll(){
let scrollTop = document.documentElement.scrollTop;
for (var i =0; i<animado.length;i++){
let alturaAnimado = animado[i].offsetTop;
if((alturaAnimado - 700) < scrollTop){
animado[i].style.opacity = 1;
animacionInicio[i].style.opacity = 1;
}
}
}
function inicioAnimacion(){
for (var i = 0; i<animacionInicio.length;i++){
animacionInicio[i].style.opacity = 1;
}
}
setTimeout(inicioAnimacion , 500)
window.addEventListener('scroll',mostrarScroll); | 29.304348 | 63 | 0.660237 |
95746d8920e35af13aa3b6bfc2c04c9a5b1077a1 | 1,743 | css | CSS | web-design/comming-soon/css/style.css | thanksLee/css_clone | 0a4d8c169c0c584876db5a316a9d5d78f2dd738a | [
"MIT"
] | null | null | null | web-design/comming-soon/css/style.css | thanksLee/css_clone | 0a4d8c169c0c584876db5a316a9d5d78f2dd738a | [
"MIT"
] | null | null | null | web-design/comming-soon/css/style.css | thanksLee/css_clone | 0a4d8c169c0c584876db5a316a9d5d78f2dd738a | [
"MIT"
] | null | null | null | * {
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
border: none;
text-decoration: none;
text-transform: capitalize;
}
.container {
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 20px 7%;
background: #eee;
min-height: 100vh;
gap: 15px;
padding-bottom: 80px;
}
.container .content {
flex: 1 1 400px
}
.container .image {
width: 40%;
}
.container .image img {
width: 100%;
}
.container .content .title {
font-style: 45px;
text-transform: uppercase;
color: #2980b9;
}
.container .content p {
color: #666;
padding: 5px 0;
}
.container .content .count-down {
display: flex;
gap: 15px;
padding: 10px 0;
}
.container .content .count-down .box {
padding: 5px;
background: #fff;
border: 1px solid #3333;
text-align: center;
flex: 1 1 20px;
}
.container .content .count-down .box h3 {
font-style: 50px;
color: #333;
}
.container .content .count-down .box span {
color: #2980b9;
font-style: 20px;
}
.container .content .btn {
display: inline-block;
padding: 8px 50px;
margin: 10px 0;
font-style: 17px;
background: #2980b9;
color: #fff;
transition: 2.2s ease-out;
}
.container .content .btn:hover {
letter-spacing: 2px;
}
@media (max-width:500px) {
.container {
padding: 20px;
}
.container .content {
text-align: center;
}
.container .content .title {
font-style: 35px;
}
.container .content p {
font-style: 14px;
}
.container .content .count-down {
gap: 5px;
}
.container .content .count-down .box h3 {
font-size: 30px;
}
.container .content .count-down .box span {
font-style: 15px;
}
} | 15.702703 | 80 | 0.632817 |
855b1da2006a09e08fe33c9241c5ee0f9733dc28 | 2,319 | js | JavaScript | src/components/prefooter.js | lifeofdaniell/PortfolioV2 | 421ee21698f877cccaca7fb27e0a8f469685668b | [
"MIT"
] | null | null | null | src/components/prefooter.js | lifeofdaniell/PortfolioV2 | 421ee21698f877cccaca7fb27e0a8f469685668b | [
"MIT"
] | null | null | null | src/components/prefooter.js | lifeofdaniell/PortfolioV2 | 421ee21698f877cccaca7fb27e0a8f469685668b | [
"MIT"
] | null | null | null | import React from "react";
import styled from "styled-components";
import { Link } from "gatsby";
const FooterGroup = styled.div`
margin: 150px 0 150px 0;
display: grid;
grid-template-rows: 100px auto;
grid-gap: 0px;
position: relative;
@media (max-width: 420px) {
margin: 100px 0 100px 0;
}
`;
const PreFooters = styled.div`
align-items: center;
max-width: 650px;
margin: 0 auto;
display: grid;
grid-gap: 40px;
grid-template-columns: 290px auto;
@media (max-width: 720px) {
align-items: center;
justify-items: center;
grid-template-columns: 1fr;
grid-gap: 20px;
}
@media (max-width: 420px) {
grid-gap: 20px;
}
`;
const PreFooterTitle = styled.h3`
color: black;
position: relative;
cursor pointer;
font-size: 60px;
letter-spacing: -3px;
font-weight: 700;
margin: 0;
line-height: 1;
padding-top: 25px;
padding-bottom: 13px;
border-bottom: 6px solid rgba(0, 0, 0, 1);
transition: all 200ms;
:after {
content: "";
display: block;
position: absolute;
left: 0;
bottom: -12px;
height: 6px;
width: 60%;
background-color: currentColor;
transition: width 0.25s ease;
}
:hover {
:after{
width:100%;
}
}
@media (max-width: 640px) {
font-size: 40px;
}
@media (max-width: 420px) {
font-size: 30px;
border-bottom: 4px solid rgba(0, 0, 0, 1);
padding-bottom: 11px;
letter-spacing: -2.5px;
:after{
bottom: -8px;
height: 5px;
}
}
@media (max-width: 330px) {
font-size: 30px;
letter-spacing: -2px;
}
`;
const PreFooterText = styled.p`
color: black;
font-size: 18px;
font-weight: 300;
letter-spacing: -0.5px;
line-height: 1.5;
max-width: 330px
padding-bottom: 25px;
@media (max-width: 720px) {
text-align: center;
}
@media (max-width: 640px) {
text-align: center;
font-size: 15px;
max-width: 400px;
}
@media (max-width: 420px) {
max-width: 350px;
}
@media (max-width: 330px) {
max-width: 300px;
}
`;
const PreFooter = (props) => (
<FooterGroup>
<PreFooters>
<Link to="/contact">
<PreFooterTitle>{props.title}</PreFooterTitle>
</Link>
<PreFooterText>{props.text}</PreFooterText>
</PreFooters>
</FooterGroup>
);
export default PreFooter;
| 19.008197 | 54 | 0.61147 |
fe79b979d5e5d8975bae32a1e65266552cbd2f13 | 207 | kt | Kotlin | src/main/kotlin/me/syari/niconico/twitter/util/swing/color.kt | sya-ri/NicoNicoTwitter | 7edd67978cc04401edcf75bea56cbd53ff7f9e85 | [
"Apache-2.0"
] | 2 | 2020-12-06T04:41:44.000Z | 2021-08-15T01:06:00.000Z | src/main/kotlin/me/syari/niconico/twitter/util/swing/color.kt | sya-ri/NicoNicoTwitter | 7edd67978cc04401edcf75bea56cbd53ff7f9e85 | [
"Apache-2.0"
] | 1 | 2021-02-15T06:32:58.000Z | 2021-02-15T06:32:58.000Z | src/main/kotlin/me/syari/niconico/twitter/util/swing/color.kt | sya-ri/NicoNicoTwitter | 7edd67978cc04401edcf75bea56cbd53ff7f9e85 | [
"Apache-2.0"
] | null | null | null | package me.syari.niconico.twitter.util.swing
import java.awt.Color
fun String.toColor(): Color? {
return try {
Color.decode(this)
} catch (ex: NumberFormatException) {
null
}
}
| 17.25 | 44 | 0.642512 |
750883f83933d9cbc5118238951e80289a752496 | 42,857 | c | C | libsignaletic/src/libsignaletic.c | continuing-creativity/signaletic | 4a91207c8b2ca1a67f72402975e9348a4bed3d13 | [
"MIT"
] | null | null | null | libsignaletic/src/libsignaletic.c | continuing-creativity/signaletic | 4a91207c8b2ca1a67f72402975e9348a4bed3d13 | [
"MIT"
] | 14 | 2022-01-31T21:01:59.000Z | 2022-02-22T03:17:28.000Z | libsignaletic/src/libsignaletic.c | continuing-creativity/signaletic | 4a91207c8b2ca1a67f72402975e9348a4bed3d13 | [
"MIT"
] | null | null | null | #include <math.h> // For powf, fmodf, sinf, roundf, fabsf, rand
#include <stdlib.h> // For RAND_MAX
#include <tlsf.h> // Includes assert.h, limits.h, stddef.h
// stdio.h, stdlib.h, string.h (for errors etc.)
#include <libsignaletic.h>
float sig_fminf(float a, float b) {
float r;
#ifdef __arm__
asm("vminnm.f32 %[d], %[n], %[m]" : [d] "=t"(r) : [n] "t"(a), [m] "t"(b) :);
#else
r = (a < b) ? a : b;
#endif // __arm__
return r;
}
float sig_fmaxf(float a, float b) {
float r;
#ifdef __arm__
asm("vmaxnm.f32 %[d], %[n], %[m]" : [d] "=t"(r) : [n] "t"(a), [m] "t"(b) :);
#else
r = (a > b) ? a : b;
#endif // __arm__
return r;
}
// TODO: Unit tests
float sig_clamp(float value, float min, float max) {
return sig_fminf(sig_fmaxf(value, min), max);
}
// TODO: Replace this with an object that implements
// the quick and dirty LCR method from Numerical Recipes:
// unsigned long jran = seed,
// ia = 4096,
// ic = 150889,
// im = 714025;
// jran=(jran*ia+ic) % im;
// float ran=(float) jran / (float) im;
float sig_randf() {
return (float) ((double) rand() / ((double) RAND_MAX + 1));
}
uint16_t sig_unipolarToUint12(float sample) {
return (uint16_t) (sample * 4095.0f);
}
uint16_t sig_bipolarToUint12(float sample) {
float normalized = sample * 0.5 + 0.5;
return (uint16_t) (normalized * 4095.0f);
}
uint16_t sig_bipolarToInvUint12(float sample) {
return sig_bipolarToUint12(-sample);
}
float sig_midiToFreq(float midiNum) {
return powf(2, (midiNum - 69.0f) / 12.0f) * 440.0f;
}
float sig_randomFill(size_t i, float_array_ptr array) {
return sig_randf();
}
void sig_fill(float_array_ptr array, size_t length,
sig_array_filler filler) {
for (size_t i = 0; i < length; i++) {
FLOAT_ARRAY(array)[i] = filler(i, array);
}
}
void sig_fillWithValue(float_array_ptr array, size_t size,
float value) {
for (size_t i = 0; i < size; i++) {
FLOAT_ARRAY(array)[i] = value;
}
}
void sig_fillWithSilence(float_array_ptr array, size_t size) {
sig_fillWithValue(array, size, 0.0f);
}
// TODO: Unit tests.
float sig_interpolate_linear(float idx, float_array_ptr table,
size_t length) {
int32_t idxIntegral = (int32_t) idx;
float idxFractional = idx - (float) idxIntegral;
float a = FLOAT_ARRAY(table)[idxIntegral];
// TODO: Do we want to wrap around the end like this,
// or should we expect users to provide us with idx within bounds?
float b = FLOAT_ARRAY(table)[(idxIntegral + 1) % length];
return a + (b - a) * idxFractional;
}
// TODO: Unit tests.
float sig_interpolate_cubic(float idx, float_array_ptr table,
size_t length) {
size_t idxIntegral = (size_t) idx;
float idxFractional = idx - (float) idxIntegral;
// TODO: As above, are these modulo operations required,
// or should we expect users to provide us in-bound values?
const size_t i0 = idxIntegral % length;
const float xm1 = FLOAT_ARRAY(table)[i0 > 0 ? i0 - 1 : length - 1];
const float x0 = FLOAT_ARRAY(table)[i0];
const float x1 = FLOAT_ARRAY(table)[(i0 + 1) % length];
const float x2 = FLOAT_ARRAY(table)[(i0 + 2) % length];
const float c = (x1 - xm1) * 0.5f;
const float v = x0 - x1;
const float w = c + v;
const float a = w + v + (x2 - x0) * 0.5f;
const float bNeg = w + a;
return (((a * idxFractional) - bNeg) * idxFractional + c) *
idxFractional + x0;
}
// TODO: Unit tests.
float sig_filter_onepole(float current, float previous, float coeff) {
return current + coeff * (previous - current);
}
// TODO: Unit tests.
float sig_waveform_sine(float phase) {
return sinf(phase);
}
// TODO: Unit tests.
float sig_waveform_square(float phase) {
return phase <= sig_PI ? 1.0f : -1.0f;
}
// TODO: Unit tests.
float sig_waveform_saw(float phase) {
return (2.0f * (phase * (1.0f / sig_TWOPI))) - 1.0f;
}
// TODO: Unit tests.
float sig_waveform_reverseSaw(float phase) {
return 1.0f - 2.0f * (phase * (1.0f / sig_TWOPI));
}
// TODO: Unit tests.
float sig_waveform_triangle(float phase) {
float val = sig_waveform_saw(phase);
if (val < 0.0) {
val = -val;
}
return 2.0f * (val - 0.5f);
}
// TODO: Implement enough test coverage for sig_Allocator
// to support a switch from TLSF to another memory allocator
// implementation sometime in the future (gh-26).
void sig_Allocator_init(struct sig_Allocator* self) {
tlsf_create_with_pool(self->heap, self->heapSize);
}
void* sig_Allocator_malloc(struct sig_Allocator* self, size_t size) {
return tlsf_malloc(self->heap, size);
}
void sig_Allocator_free(struct sig_Allocator* self, void* obj) {
tlsf_free(self->heap, obj);
}
struct sig_AudioSettings* sig_AudioSettings_new(
struct sig_Allocator* allocator) {
struct sig_AudioSettings* settings =
(struct sig_AudioSettings*) sig_Allocator_malloc(
allocator, sizeof(struct sig_AudioSettings));
settings->sampleRate = sig_DEFAULT_AUDIOSETTINGS.sampleRate;
settings->numChannels = sig_DEFAULT_AUDIOSETTINGS.numChannels;
settings->blockSize = sig_DEFAULT_AUDIOSETTINGS.blockSize;
return settings;
}
void sig_AudioSettings_destroy(struct sig_Allocator* allocator,
struct sig_AudioSettings* self) {
sig_Allocator_free(allocator, self);
}
// TODO: Unit tests.
size_t sig_secondsToSamples(struct sig_AudioSettings* audioSettings,
float duration) {
float numSamplesF = audioSettings->sampleRate * duration;
long rounded = lroundf(numSamplesF);
return (size_t) labs(rounded);
}
float_array_ptr sig_samples_new(struct sig_Allocator* allocator,
size_t length) {
return (float_array_ptr) sig_Allocator_malloc(allocator,
sizeof(float) * length);
}
// TODO: Does an AudioBlock type need to be introduced?
// TODO: Do we need a destroy function too?
float_array_ptr sig_AudioBlock_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* audioSettings) {
return sig_samples_new(allocator, audioSettings->blockSize);
}
float_array_ptr sig_AudioBlock_newWithValue(
struct sig_Allocator* allocator,
struct sig_AudioSettings* audioSettings,
float value) {
float_array_ptr block = sig_AudioBlock_new(allocator,
audioSettings);
sig_fillWithValue(block, audioSettings->blockSize, value);
return block;
}
struct sig_Buffer* sig_Buffer_new(struct sig_Allocator* allocator,
size_t length) {
struct sig_Buffer* self = (struct sig_Buffer*) sig_Allocator_malloc(allocator, sizeof(struct sig_Buffer));
self->length = length;
self->samples = sig_samples_new(allocator, length);
return self;
}
void sig_Buffer_fill(struct sig_Buffer* self,
sig_array_filler filler) {
sig_fill(self->samples, self->length, filler);
}
void sig_Buffer_fillWithValue(struct sig_Buffer* self, float value) {
sig_fillWithValue(self->samples, self->length, value);
}
void sig_Buffer_fillWithSilence(struct sig_Buffer* self) {
sig_fillWithSilence(self->samples, self->length);
}
// TODO: Unit tests.
void sig_Buffer_fillWithWaveform(struct sig_Buffer* self,
sig_waveform_generator generate, float sampleRate,
float phase, float freq) {
float phaseInc = freq * sig_TWOPI / sampleRate;
for (size_t i = 0; i < self->length; i++) {
FLOAT_ARRAY(self->samples)[i] = generate(phase);
phase += phaseInc;
if (phase >= sig_TWOPI) {
phase -= sig_TWOPI;
} else if (phase < 0.0) {
phase += sig_TWOPI;
}
}
}
void sig_Buffer_destroy(struct sig_Allocator* allocator, struct sig_Buffer* self) {
sig_Allocator_free(allocator, self->samples);
sig_Allocator_free(allocator, self);
};
struct sig_Buffer* sig_BufferView_new(
struct sig_Allocator* allocator,
struct sig_Buffer* buffer, size_t startIdx, size_t length) {
struct sig_Buffer* self = (struct sig_Buffer*) sig_Allocator_malloc(allocator, sizeof(struct sig_Buffer));
// TODO: Need to signal an error rather than
// just returning a null pointer and a length of zero.
if (startIdx < 0 || length > (buffer->length - startIdx)) {
self->samples = NULL;
self->length = 0;
} else {
self->samples = FLOAT_ARRAY(buffer->samples) + startIdx;
self->length = length;
}
return self;
}
void sig_BufferView_destroy(struct sig_Allocator* allocator,
struct sig_Buffer* self) {
// Don't destroy the samples array;
// it is shared with other Buffers.
sig_Allocator_free(allocator, self);
}
void sig_dsp_Signal_init(void* signal,
struct sig_AudioSettings* settings,
float_array_ptr output,
sig_dsp_generateFn generate) {
struct sig_dsp_Signal* self = (struct sig_dsp_Signal*) signal;
self->audioSettings = settings;
self->output = output;
self->generate = generate;
};
/**
* Generic generation function
* that operates on any Signal and outputs only silence.
*/
void sig_dsp_Signal_generate(void* signal) {
struct sig_dsp_Signal* self = (struct sig_dsp_Signal*) signal;
sig_fillWithSilence(self->output, self->audioSettings->blockSize);
}
void sig_dsp_Signal_destroy(struct sig_Allocator* allocator, void* signal) {
sig_Allocator_free(allocator,
((struct sig_dsp_Signal*) signal)->output);
sig_Allocator_free(allocator, signal);
}
void sig_dsp_Value_init(struct sig_dsp_Value* self,
struct sig_AudioSettings *settings,
float_array_ptr output) {
struct sig_dsp_Value_Parameters params = {
.value = 1.0
};
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Value_generate);
self->parameters = params;
}
struct sig_dsp_Value* sig_dsp_Value_new(struct sig_Allocator* allocator,
struct sig_AudioSettings* settings) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Value* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Value));
sig_dsp_Value_init(self, settings, output);
return self;
}
void sig_dsp_Value_destroy(struct sig_Allocator* allocator, struct sig_dsp_Value* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
void sig_dsp_Value_generate(void* signal) {
struct sig_dsp_Value* self = (struct sig_dsp_Value*) signal;
if (self->parameters.value == self->lastSample) {
return;
}
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
FLOAT_ARRAY(self->signal.output)[i] = self->parameters.value;
}
self->lastSample = self->parameters.value;
}
struct sig_dsp_BinaryOp* sig_dsp_Add_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_BinaryOp_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_BinaryOp* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_BinaryOp));
sig_dsp_Add_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Add_init(struct sig_dsp_BinaryOp* self,
struct sig_AudioSettings* settings,
struct sig_dsp_BinaryOp_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Add_generate);
self->inputs = inputs;
}
// TODO: Unit tests.
void sig_dsp_Add_generate(void* signal) {
struct sig_dsp_BinaryOp* self = (struct sig_dsp_BinaryOp*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float left = FLOAT_ARRAY(self->inputs->left)[i];
float right = FLOAT_ARRAY(self->inputs->right)[i];
float val = left + right;
FLOAT_ARRAY(self->signal.output)[i] = val;
}
}
void sig_dsp_Add_destroy(struct sig_Allocator* allocator,
struct sig_dsp_BinaryOp* self) {
sig_dsp_Signal_destroy(allocator, self);
}
void sig_dsp_Mul_init(struct sig_dsp_BinaryOp* self,
struct sig_AudioSettings* settings, struct sig_dsp_BinaryOp_Inputs* inputs, float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output, *sig_dsp_Mul_generate);
self->inputs = inputs;
};
struct sig_dsp_BinaryOp* sig_dsp_Mul_new(struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_BinaryOp_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_BinaryOp* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_BinaryOp));
sig_dsp_Mul_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Mul_destroy(struct sig_Allocator* allocator,
struct sig_dsp_BinaryOp* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
};
void sig_dsp_Mul_generate(void* signal) {
struct sig_dsp_BinaryOp* self = (struct sig_dsp_BinaryOp*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float left = FLOAT_ARRAY(self->inputs->left)[i];
float right = FLOAT_ARRAY(self->inputs->right)[i];
float val = left * right;
FLOAT_ARRAY(self->signal.output)[i] = val;
}
}
struct sig_dsp_BinaryOp* sig_dsp_Div_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_BinaryOp_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_BinaryOp* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_BinaryOp));
sig_dsp_Div_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Div_init(struct sig_dsp_BinaryOp* self,
struct sig_AudioSettings* settings,
struct sig_dsp_BinaryOp_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Div_generate);
self->inputs = inputs;
}
void sig_dsp_Div_generate(void* signal) {
struct sig_dsp_BinaryOp* self = (struct sig_dsp_BinaryOp*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float left = FLOAT_ARRAY(self->inputs->left)[i];
float right = FLOAT_ARRAY(self->inputs->right)[i];
float val = left / right;
FLOAT_ARRAY(self->signal.output)[i] = val;
}
}
void sig_dsp_Div_destroy(struct sig_Allocator* allocator,
struct sig_dsp_BinaryOp* self) {
sig_dsp_Signal_destroy(allocator, self);
}
struct sig_dsp_Invert* sig_dsp_Invert_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Invert_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Invert* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Invert));
sig_dsp_Invert_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Invert_init(struct sig_dsp_Invert* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Invert_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Invert_generate);
self->inputs = inputs;
}
// TODO: Unit tests.
void sig_dsp_Invert_generate(void* signal) {
struct sig_dsp_Invert* self = (struct sig_dsp_Invert*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float inSamp = FLOAT_ARRAY(self->inputs->source)[i];
FLOAT_ARRAY(self->signal.output)[i] = -inSamp;
}
}
void sig_dsp_Invert_destroy(struct sig_Allocator* allocator,
struct sig_dsp_Invert* self) {
sig_dsp_Signal_destroy(allocator, self);
}
struct sig_dsp_Accumulate* sig_dsp_Accumulate_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Accumulate_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Accumulate* self = sig_Allocator_malloc(
allocator,
sizeof(struct sig_dsp_Accumulate));
sig_dsp_Accumulate_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Accumulate_init(
struct sig_dsp_Accumulate* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Accumulate_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Accumulate_generate);
struct sig_dsp_Accumulate_Parameters parameters = {
.accumulatorStart = 1.0
};
self->inputs = inputs;
self->parameters = parameters;
self->accumulator = parameters.accumulatorStart;
self->previousReset = 0.0f;
}
// TODO: Implement an audio rate version of this signal.
// TODO: Unit tests
void sig_dsp_Accumulate_generate(void* signal) {
struct sig_dsp_Accumulate* self =
(struct sig_dsp_Accumulate*) signal;
float reset = FLOAT_ARRAY(self->inputs->reset)[0];
if (reset > 0.0f && self->previousReset <= 0.0f) {
// Reset the accumulator if we received a trigger.
self->accumulator = self->parameters.accumulatorStart;
}
self->accumulator += FLOAT_ARRAY(self->inputs->source)[0];
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
FLOAT_ARRAY(self->signal.output)[i] = self->accumulator;
}
self->previousReset = reset;
}
void sig_dsp_Accumulate_destroy(struct sig_Allocator* allocator,
struct sig_dsp_Accumulate* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
struct sig_dsp_GatedTimer* sig_dsp_GatedTimer_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_GatedTimer_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_GatedTimer* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_GatedTimer));
sig_dsp_GatedTimer_init(self, settings, inputs, output);
return self;
}
void sig_dsp_GatedTimer_init(struct sig_dsp_GatedTimer* self,
struct sig_AudioSettings* settings,
struct sig_dsp_GatedTimer_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_GatedTimer_generate);
self->inputs = inputs;
self->timer = 0;
self->hasFired = false;
self->prevGate = 0.0f;
}
// TODO: Unit tests
void sig_dsp_GatedTimer_generate(void* signal) {
struct sig_dsp_GatedTimer* self =
(struct sig_dsp_GatedTimer*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
// TODO: MSVC compiler warning loss of precision.
unsigned long durationSamps = (unsigned long)
FLOAT_ARRAY(self->inputs->duration)[i] *
self->signal.audioSettings->sampleRate;
float gate = FLOAT_ARRAY(self->inputs->gate)[i];
if (gate > 0.0f) {
// Gate is open.
if (!self->hasFired ||
FLOAT_ARRAY(self->inputs->loop)[i] > 0.0f) {
self->timer++;
}
if (self->timer >= durationSamps) {
// We reached the duration time.
FLOAT_ARRAY(self->signal.output)[i] = 1.0f;
// Reset the timer counter and note
// that we've already fired while
// this gate was open.
self->timer = 0;
self->hasFired = true;
continue;
}
} else if (gate <= 0.0f && self->prevGate > 0.0f) {
// Gate just closed. Reset all timer state.
self->timer = 0;
self->hasFired = false;
}
FLOAT_ARRAY(self->signal.output)[i] = 0.0f;
self->prevGate = gate;
}
}
void sig_dsp_GatedTimer_destroy(struct sig_Allocator* allocator,
struct sig_dsp_GatedTimer* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
struct sig_dsp_TimedTriggerCounter* sig_dsp_TimedTriggerCounter_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_TimedTriggerCounter_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_TimedTriggerCounter* self = sig_Allocator_malloc(
allocator,
sizeof(struct sig_dsp_TimedTriggerCounter));
sig_dsp_TimedTriggerCounter_init(self, settings, inputs, output);
return self;
}
void sig_dsp_TimedTriggerCounter_init(
struct sig_dsp_TimedTriggerCounter* self,
struct sig_AudioSettings* settings,
struct sig_dsp_TimedTriggerCounter_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_TimedTriggerCounter_generate);
self->inputs = inputs;
self->numTriggers = 0;
self->timer = 0;
self->isTimerActive = false;
self->previousSource = 0.0f;
}
void sig_dsp_TimedTriggerCounter_generate(void* signal) {
struct sig_dsp_TimedTriggerCounter* self =
(struct sig_dsp_TimedTriggerCounter*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float source = FLOAT_ARRAY(self->inputs->source)[i];
float outputSample = 0.0f;
if (source > 0.0f && self->previousSource == 0.0f) {
// Received the rising edge of a trigger.
if (!self->isTimerActive) {
// It's the first trigger,
// so start the timer.
self->isTimerActive = true;
}
}
if (self->isTimerActive) {
// The timer is running.
if (source <= 0.0f && self->previousSource > 0.0f) {
// Received the falling edge of a trigger,
// so count it.
self->numTriggers++;
}
self->timer++;
// Truncate the duration to the nearest sample.
long durSamps = (long) (FLOAT_ARRAY(
self->inputs->duration)[i] *
self->signal.audioSettings->sampleRate);
if (self->timer >= durSamps) {
// Time's up.
// Fire a trigger if we've the right number of
// incoming triggers, otherwise just reset.
if (self->numTriggers ==
(int) FLOAT_ARRAY(self->inputs->count)[i]) {
outputSample = 1.0f;
}
self->isTimerActive = false;
self->numTriggers = 0;
self->timer = 0;
}
}
self->previousSource = source;
FLOAT_ARRAY(self->signal.output)[i] = outputSample;
}
}
void sig_dsp_TimedTriggerCounter_destroy(
struct sig_Allocator* allocator,
struct sig_dsp_TimedTriggerCounter* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
struct sig_dsp_ToggleGate* sig_dsp_ToggleGate_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_ToggleGate_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_ToggleGate* self = sig_Allocator_malloc(
allocator, sizeof(struct sig_dsp_ToggleGate));
sig_dsp_ToggleGate_init(self, settings, inputs, output);
return self;
}
void sig_dsp_ToggleGate_init(
struct sig_dsp_ToggleGate* self,
struct sig_AudioSettings* settings,
struct sig_dsp_ToggleGate_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_ToggleGate_generate);
self->inputs = inputs;
self->isGateOpen = false;
self->prevTrig = 0.0f;
}
// TODO: Unit tests
void sig_dsp_ToggleGate_generate(void* signal) {
struct sig_dsp_ToggleGate* self =
(struct sig_dsp_ToggleGate*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float trigger = FLOAT_ARRAY(self->inputs->trigger)[i];
if (trigger > 0.0f && self->prevTrig <= 0.0f) {
// Received a trigger, toggle the gate.
self->isGateOpen = !self->isGateOpen;
}
FLOAT_ARRAY(self->signal.output)[i] = (float) self->isGateOpen;
self->prevTrig = trigger;
}
}
void sig_dsp_ToggleGate_destroy(
struct sig_Allocator* allocator,
struct sig_dsp_ToggleGate* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
void sig_dsp_Sine_init(struct sig_dsp_Sine* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Sine_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Sine_generate);
self->inputs = inputs;
self->phaseAccumulator = 0.0f;
}
struct sig_dsp_Sine* sig_dsp_Sine_new(struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Sine_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Sine* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Sine));
sig_dsp_Sine_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Sine_destroy(struct sig_Allocator* allocator, struct sig_dsp_Sine* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
void sig_dsp_Sine_generate(void* signal) {
struct sig_dsp_Sine* self = (struct sig_dsp_Sine*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float modulatedPhase = fmodf(self->phaseAccumulator +
FLOAT_ARRAY(self->inputs->phaseOffset)[i], sig_TWOPI);
FLOAT_ARRAY(self->signal.output)[i] = sinf(modulatedPhase) *
FLOAT_ARRAY(self->inputs->mul)[i] +
FLOAT_ARRAY(self->inputs->add)[i];
float phaseStep = FLOAT_ARRAY(self->inputs->freq)[i] /
self->signal.audioSettings->sampleRate * sig_TWOPI;
self->phaseAccumulator += phaseStep;
if (self->phaseAccumulator > sig_TWOPI) {
self->phaseAccumulator -= sig_TWOPI;
}
}
}
void sig_dsp_OnePole_init(struct sig_dsp_OnePole* self,
struct sig_AudioSettings* settings,
struct sig_dsp_OnePole_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_OnePole_generate);
self->inputs = inputs;
self->previousSample = 0.0f;
}
struct sig_dsp_OnePole* sig_dsp_OnePole_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_OnePole_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_OnePole* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_OnePole));
sig_dsp_OnePole_init(self, settings, inputs, output);
return self;
}
// TODO: Unit tests
void sig_dsp_OnePole_generate(void* signal) {
struct sig_dsp_OnePole* self = (struct sig_dsp_OnePole*) signal;
float previousSample = self->previousSample;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
FLOAT_ARRAY(self->signal.output)[i] = previousSample =
sig_filter_onepole(
FLOAT_ARRAY(self->inputs->source)[i], previousSample,
FLOAT_ARRAY(self->inputs->coefficient)[i]);
}
self->previousSample = previousSample;
}
void sig_dsp_OnePole_destroy(struct sig_Allocator* allocator,
struct sig_dsp_OnePole* self) {
sig_dsp_Signal_destroy(allocator, (void*) self);
}
void sig_dsp_Tanh_init(struct sig_dsp_Tanh* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Tanh_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Tanh_generate);
self->inputs = inputs;
}
struct sig_dsp_Tanh* sig_dsp_Tanh_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Tanh_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Tanh* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Tanh));
sig_dsp_Tanh_init(self, settings, inputs, output);
return self;
}
// TODO: Unit tests.
void sig_dsp_Tanh_generate(void* signal) {
struct sig_dsp_Tanh* self = (struct sig_dsp_Tanh*) signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float inSamp = FLOAT_ARRAY(self->inputs->source)[i];
float outSamp = tanhf(inSamp);
FLOAT_ARRAY(self->signal.output)[i] = outSamp;
}
}
void sig_dsp_Tanh_destroy(struct sig_Allocator* allocator,
struct sig_dsp_Tanh* self) {
sig_dsp_Signal_destroy(allocator, self);
}
void sig_dsp_Looper_init(struct sig_dsp_Looper* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Looper_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Looper_generate);
self->inputs = inputs;
self->isBufferEmpty = true;
self->previousRecord = 0.0f;
self->playbackPos = 0.0f;
// TODO: Deal with how buffers get here.
self->buffer = NULL;
}
struct sig_dsp_Looper* sig_dsp_Looper_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Looper_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Looper* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Looper));
sig_dsp_Looper_init(self, settings, inputs, output);
return self;
}
// TODO:
// * Reduce clicks by crossfading the end and start of the window.
// - should it be a true cross fade, requiring a few samples
// on each end of the clip, or a very quick fade in/out
// (e.g. 1-10ms/48-480 samples)?
// * Fade out before clearing. A whole loop's duration, or shorter?
// * Address glitches when the length is very short
// * Should we check if the buffer is null and output silence,
// or should this be considered a user error?
// (Or should we introduce some kind of validation function for signals?)
// * Unit tests
void sig_dsp_Looper_generate(void* signal) {
struct sig_dsp_Looper* self = (struct sig_dsp_Looper*) signal;
float* samples = FLOAT_ARRAY(self->buffer->samples);
float playbackPos = self->playbackPos;
float bufferLastIdx = (float)(self->buffer->length - 1);
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float speed = FLOAT_ARRAY(self->inputs->speed)[i];
float start = sig_clamp(FLOAT_ARRAY(self->inputs->start)[i],
0.0, 1.0);
float end = sig_clamp(FLOAT_ARRAY(self->inputs->end)[i],
0.0, 1.0);
// Flip the start and end points if they're reversed.
if (start > end) {
float temp = start;
start = end;
end = temp;
}
float startPos = roundf(bufferLastIdx * start);
float endPos = roundf(bufferLastIdx * end);
// If the loop size is smaller than the speed
// we're playing back at, just output silence.
if ((endPos - startPos) <= fabsf(speed)) {
FLOAT_ARRAY(self->signal.output)[i] = 0.0f;
continue;
}
if (FLOAT_ARRAY(self->inputs->record)[i] > 0.0f) {
// We're recording.
if (self->previousRecord <= 0.0f) {
// We've just started recording.
if (self->isBufferEmpty) {
// This is the first overdub.
playbackPos = startPos;
}
}
// Playback has to be at regular speed
// while recording, so ignore any modulation
// and only use its direction.
// TODO: Add support for cool tape-style effects
// when overdubbing at different speeds.
// Note: Naively omitting this will work,
// but introduces lots pitched resampling artifacts.
speed = speed > 0.0f ? 1.0f : -1.0f;
// Overdub the current audio input into the loop buffer.
size_t playbackIdx = (size_t) playbackPos;
float sample = samples[playbackIdx] +
FLOAT_ARRAY(self->inputs->source)[i];
// Add a little distortion/limiting.
sample = tanhf(sample);
samples[playbackIdx] = sample;
// No interpolation is needed because we're
// playing/recording at regular speed.
FLOAT_ARRAY(self->signal.output)[i] = sample;
} else {
// We're playing back.
if (self->previousRecord > 0.0f) {
// We just finished recording.
self->isBufferEmpty = false;
}
if (FLOAT_ARRAY(self->inputs->clear)[i] > 0.0f &&
self->previousClear == 0.0f) {
// TODO: Fade out before clearing the buffer
// (gh-28)
sig_Buffer_fillWithSilence(self->buffer);
self->isBufferEmpty = true;
}
// TODO: The sig_interpolate_linear implementation
// may wrap around inappropriately to the beginning of
// the buffer (not to the startPos) if we're right at
// the end of the buffer.
FLOAT_ARRAY(self->signal.output)[i] = sig_interpolate_linear(
playbackPos, samples, self->buffer->length) +
FLOAT_ARRAY(self->inputs->source)[i];
}
playbackPos += speed;
if (playbackPos > endPos) {
playbackPos = startPos + (playbackPos - endPos);
} else if (playbackPos < startPos) {
playbackPos = endPos - (startPos - playbackPos);
}
self->previousRecord = FLOAT_ARRAY(self->inputs->record)[i];
self->previousClear = FLOAT_ARRAY(self->inputs->clear)[i];
}
self->playbackPos = playbackPos;
}
void sig_dsp_Looper_destroy(struct sig_Allocator* allocator,
struct sig_dsp_Looper* self) {
sig_dsp_Signal_destroy(allocator, self);
}
void sig_dsp_Dust_init(struct sig_dsp_Dust* self,
struct sig_AudioSettings* settings,
struct sig_dsp_Dust_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_Dust_generate);
struct sig_dsp_Dust_Parameters parameters = {
.bipolar = 0.0
};
self->inputs = inputs;
self->parameters = parameters;
self->sampleDuration = 1.0 / settings->sampleRate;
self->previousDensity = 0.0;
self->threshold = 0.0;
}
struct sig_dsp_Dust* sig_dsp_Dust_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_Dust_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_Dust* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_Dust));
sig_dsp_Dust_init(self, settings, inputs, output);
return self;
}
void sig_dsp_Dust_generate(void* signal) {
struct sig_dsp_Dust* self = (struct sig_dsp_Dust*) signal;
float scaleDiv = self->parameters.bipolar > 0.0f ? 2.0f : 1.0f;
float scaleSub = self->parameters.bipolar > 0.0f ? 1.0f : 0.0f;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float density = FLOAT_ARRAY(self->inputs->density)[i];
if (density != self->previousDensity) {
self->previousDensity = density;
self->threshold = density * self->sampleDuration;
self->scale = self->threshold > 0.0f ?
scaleDiv / self->threshold : 0.0f;
}
float rand = sig_randf();
float val = rand < self->threshold ?
rand * self->scale - scaleSub : 0.0f;
FLOAT_ARRAY(self->signal.output)[i] = val;
}
}
void sig_dsp_Dust_destroy(struct sig_Allocator* allocator,
struct sig_dsp_Dust* self) {
sig_dsp_Signal_destroy(allocator, self);
}
void sig_dsp_TimedGate_init(struct sig_dsp_TimedGate* self,
struct sig_AudioSettings* settings,
struct sig_dsp_TimedGate_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_TimedGate_generate);
struct sig_dsp_TimedGate_Parameters parameters = {
.resetOnTrigger = 0.0,
.bipolar = 0.0
};
self->inputs = inputs;
self->parameters = parameters;
self->previousTrigger = 0.0f;
self->previousDuration = 0.0f;
self->gateValue = 0.0f;
self->durationSamps = 0;
self->samplesRemaining = 0;
}
struct sig_dsp_TimedGate* sig_dsp_TimedGate_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_TimedGate_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_TimedGate* self = sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_TimedGate));
sig_dsp_TimedGate_init(self, settings, inputs, output);
return self;
}
static inline void sig_dsp_TimedGate_outputHigh(struct sig_dsp_TimedGate* self,
size_t index) {
FLOAT_ARRAY(self->signal.output)[index] = self->gateValue;
self->samplesRemaining--;
}
static inline void sig_dsp_TimedGate_outputLow(struct sig_dsp_TimedGate* self,
size_t index) {
FLOAT_ARRAY(self->signal.output)[index] = 0.0f;
}
void sig_dsp_TimedGate_generate(void* signal) {
struct sig_dsp_TimedGate* self = (struct sig_dsp_TimedGate*)
signal;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
float currentTrigger = FLOAT_ARRAY(self->inputs->trigger)[i];
float duration = FLOAT_ARRAY(self->inputs->duration)[i];
if ((currentTrigger > 0.0f && self->previousTrigger <= 0.0f) ||
(self->parameters.bipolar > 0.0 && currentTrigger < 0.0f && self->previousTrigger >= 0.0f)) {
// A new trigger was received.
self->gateValue = currentTrigger;
if (duration != self->previousDuration) {
// The duration input has changed.
self->durationSamps = lroundf(duration *
self->signal.audioSettings->sampleRate);
self->previousDuration = duration;
}
if (self->parameters.resetOnTrigger > 0.0f &&
self->samplesRemaining > 0) {
// Gate is open and needs to be reset.
// Close the gate for one sample,
// and don't count down the duration
// until next time.
sig_dsp_TimedGate_outputLow(self, i);
self->samplesRemaining = self->durationSamps;
} else {
self->samplesRemaining = self->durationSamps;
sig_dsp_TimedGate_outputHigh(self, i);
}
} else if (self->samplesRemaining > 0) {
sig_dsp_TimedGate_outputHigh(self, i);
} else {
sig_dsp_TimedGate_outputLow(self, i);
}
self->previousTrigger = currentTrigger;
}
}
void sig_dsp_TimedGate_destroy(struct sig_Allocator* allocator,
struct sig_dsp_TimedGate* self) {
sig_dsp_Signal_destroy(allocator, self);
}
void sig_dsp_ClockFreqDetector_init(
struct sig_dsp_ClockFreqDetector* self,
struct sig_AudioSettings* settings,
struct sig_dsp_ClockFreqDetector_Inputs* inputs,
float_array_ptr output) {
sig_dsp_Signal_init(self, settings, output,
*sig_dsp_ClockFreqDetector_generate);
struct sig_dsp_ClockFreqDetector_Parameters params = {
.threshold = 0.1f,
.timeoutDuration = 120.0f
};
self->inputs = inputs;
self->parameters = params;
self->previousTrigger = 0.0f;
self->samplesSinceLastPulse = 0;
self->clockFreq = 0.0f;
self->pulseDurSamples = 0;
}
struct sig_dsp_ClockFreqDetector* sig_dsp_ClockFreqDetector_new(
struct sig_Allocator* allocator,
struct sig_AudioSettings* settings,
struct sig_dsp_ClockFreqDetector_Inputs* inputs) {
float_array_ptr output = sig_AudioBlock_new(allocator, settings);
struct sig_dsp_ClockFreqDetector* self =
sig_Allocator_malloc(allocator,
sizeof(struct sig_dsp_ClockFreqDetector));
sig_dsp_ClockFreqDetector_init(self, settings, inputs, output);
return self;
}
static inline float sig_dsp_ClockFreqDetector_calcClockFreq(
float sampleRate, uint32_t samplesSinceLastPulse,
float prevFreq) {
float freq = sampleRate / (float) samplesSinceLastPulse;
// TODO: Is an LPF good, or is a moving average better?
return sig_filter_onepole(freq, prevFreq, 0.01f);
}
void sig_dsp_ClockFreqDetector_generate(void* signal) {
struct sig_dsp_ClockFreqDetector* self =
(struct sig_dsp_ClockFreqDetector*) signal;
float_array_ptr source = self->inputs->source;
float_array_ptr output = self->signal.output;
float previousTrigger = self->previousTrigger;
float clockFreq = self->clockFreq;
bool isRisingEdge = self->isRisingEdge;
uint32_t samplesSinceLastPulse = self->samplesSinceLastPulse;
float sampleRate = self->signal.audioSettings->sampleRate;
float threshold = self->parameters.threshold;
float timeoutDuration = self->parameters.timeoutDuration;
uint32_t pulseDurSamples = self->pulseDurSamples;
for (size_t i = 0; i < self->signal.audioSettings->blockSize; i++) {
samplesSinceLastPulse++;
float sourceSamp = FLOAT_ARRAY(source)[i];
if (sourceSamp > 0.0f && previousTrigger <= 0.0f) {
// Start of rising edge.
isRisingEdge = true;
} else if (sourceSamp < previousTrigger) {
// Failed to reach the threshold before
// the signal fell again.
isRisingEdge = false;
}
if (isRisingEdge && sourceSamp >= threshold) {
// Signal is rising and threshold has been reached,
// so this is a pulse.
clockFreq = sig_dsp_ClockFreqDetector_calcClockFreq(
sampleRate, samplesSinceLastPulse, clockFreq);
pulseDurSamples = samplesSinceLastPulse;
samplesSinceLastPulse = 0;
isRisingEdge = false;
} else if (samplesSinceLastPulse > sampleRate * timeoutDuration) {
// It's been too long since we've received a pulse.
clockFreq = 0.0f;
} else if (samplesSinceLastPulse > pulseDurSamples) {
// Tempo is slowing down; recalculate it.
clockFreq = sig_dsp_ClockFreqDetector_calcClockFreq(
sampleRate, samplesSinceLastPulse, clockFreq);
}
FLOAT_ARRAY(output)[i] = clockFreq;
previousTrigger = sourceSamp;
}
self->previousTrigger = previousTrigger;
self->clockFreq = clockFreq;
self->isRisingEdge = isRisingEdge;
self->samplesSinceLastPulse = samplesSinceLastPulse;
self->pulseDurSamples = pulseDurSamples;
}
void sig_dsp_ClockFreqDetector_destroy(struct sig_Allocator* allocator,
struct sig_dsp_ClockFreqDetector* self) {
sig_dsp_Signal_destroy(allocator, self);
}
| 32.74026 | 110 | 0.668222 |
adb8ad4c9938a57ea621e32a6dbca1a2b6d48fdf | 59,358 | sql | SQL | doctxnyx_bari.sql | rimonnahid/DoctorEbari-Laravel-PHP | db518d0b83af8a7c118ce4f484a46ff337eb19eb | [
"MIT"
] | null | null | null | doctxnyx_bari.sql | rimonnahid/DoctorEbari-Laravel-PHP | db518d0b83af8a7c118ce4f484a46ff337eb19eb | [
"MIT"
] | null | null | null | doctxnyx_bari.sql | rimonnahid/DoctorEbari-Laravel-PHP | db518d0b83af8a7c118ce4f484a46ff337eb19eb | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 03, 2020 at 01:30 PM
-- Server version: 10.3.24-MariaDB-log-cll-lve
-- PHP Version: 7.3.6
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: `doctxnyx_bari`
--
-- --------------------------------------------------------
--
-- Table structure for table `advertises`
--
CREATE TABLE `advertises` (
`id` bigint(20) UNSIGNED NOT NULL,
`image1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image1_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image2_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`animation` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`animation_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`video` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`video_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `advertises`
--
INSERT INTO `advertises` (`id`, `image1`, `image1_link`, `image2`, `image2_link`, `animation`, `animation_link`, `video`, `video_link`, `status`, `created_at`, `updated_at`) VALUES
(1, 'image/advertise/rGNbgWDJaTpMp2eewkOgRENnffY19kIhS9ViGk94.jpeg', '#', 'image/advertise/91E7mw1iQdTnOBzRm7DFa4IFCFM2r7j4itMC2lJE.jpeg', '#', 'image/advertise/PgzUekTNOieruaiEhZAq9LQskZbuBrcB9IhvFmTg.gif', NULL, 'image/advertise/h1ew0rJppQd2rEOBQhH9UFrgkI9GaflJA5kb5h4r.mp4', NULL, NULL, '2020-10-30 05:12:02', '2020-10-31 21:56:06');
-- --------------------------------------------------------
--
-- Table structure for table `ambulances`
--
CREATE TABLE `ambulances` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `ambulances`
--
INSERT INTO `ambulances` (`id`, `name`, `slug`, `phone`, `hotline`, `address`, `details`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 'আদর্শ এম্বুলেন্স সার্ভিস', 'adarsha-ambulance-service', '+8801715971685', '+8801715971685', 'ওসমানী মেডিকেল কলেজ ও হাসপাতাল, সিলেট।', '<p>আদর্শ এম্বুলেন্স সার্ভিস এন্ড লাশবাহী ফ্রিজিং গাড়ী সার্ভিস<br />\r\nদিবারাত্রি এ্যাম্বুলেন্স সার্ভিস</p>\r\n\r\n<p>ঠিকানাঃ ওসমানী মেডিকেল কলেজ ও হাসপাতাল, সিলেট।</p>\r\n\r\n<p>যোগাযোগ: +8801715971685</p>', 'image/ambulances/Idm8LsB0WsJMxr2zxJgBkP1bejzVP6W5GTo4QDeL.jpeg', 1, '2020-11-02 21:36:44', '2020-11-02 21:36:44');
-- --------------------------------------------------------
--
-- Table structure for table `appoinments`
--
CREATE TABLE `appoinments` (
`appoint_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`department_id` bigint(20) UNSIGNED NOT NULL,
`doc_id` bigint(20) UNSIGNED DEFAULT NULL,
`age` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`doctor_shown` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`past_doctor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`appoint_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`entry_date` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`month` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`year` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `appoinments`
--
INSERT INTO `appoinments` (`appoint_id`, `name`, `department_id`, `doc_id`, `age`, `phone`, `email`, `doctor_shown`, `past_doctor`, `details`, `appoint_date`, `time`, `entry_date`, `month`, `year`, `status`, `created_at`, `updated_at`) VALUES
(7, 'Md Shahed Hossain', 1, 4, '35', '01710888280', NULL, 'No', NULL, 'জ্বর,কাশি, শ্বাসকষ্ট', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 12:12:10', '2020-11-03 12:12:10'),
(8, 'Md Shahed Hossain', 1, 4, '35', '01710888280', NULL, 'No', NULL, 'জ্বর,কাশি, শ্বাসকষ্ট', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 12:12:10', '2020-11-03 12:12:10'),
(9, 'Sadi', 1, 4, '27', '01829844898', '[email protected]', 'Yes', 'Dr Azadur Rahman', 'Gastrological problem.', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 13:49:57', '2020-11-03 13:49:57'),
(10, 'Sadi', 1, 4, '27', '01829844898', '[email protected]', 'Yes', 'Dr Azadur Rahman', 'Gastrological problem.', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 13:49:57', '2020-11-03 13:49:57'),
(11, 'Zahra Islam Rahmi', 4, 5, '3month 13days', '01758494795', '[email protected]', 'Yes', 'Dr Ronjit, lions children hospital', 'ডায়রিয়া,পেট ব্যাথা', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 14:34:24', '2020-11-03 14:34:24'),
(12, 'Zahra Islam Rahmi', 4, 5, '3month 13days', '01758494795', '[email protected]', 'Yes', 'Dr Ronjit, lions children hospital', 'ডায়রিয়া,পেট ব্যাথা', '2020-11-03', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 14:34:24', '2020-11-03 14:34:24'),
(13, 'তামিম আহমদ', 14, 6, '১১', '০১৭২১৫৯৪১৮৮', NULL, 'Yes', 'ডাঃ মোহাম্মদ মাহিন', 'পায়ের হাড়ে সমস্যা', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 1, '2020-11-03 17:27:11', '2020-11-03 18:04:14'),
(14, 'তামিম আহমদ', 14, 6, '১১', '০১৭২১৫৯৪১৮৮', NULL, 'Yes', 'ডাঃ মোহাম্মদ মাহিন', 'পায়ের হাড়ে সমস্যা', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 1, '2020-11-03 17:27:11', '2020-11-03 18:04:25'),
(15, 'সায়া', 14, 7, '২৮', '01726690431', '[email protected]', 'No', NULL, 'বুক্সকমস', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 18:25:21', '2020-11-03 18:25:21'),
(16, 'সায়া', 14, 7, '২৮', '01726690431', '[email protected]', 'No', NULL, 'বুক্সকমস', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 18:25:21', '2020-11-03 18:25:21'),
(17, 'ন্ধজ্জদ্মদ', 14, 7, '২৮', '01813868878', '[email protected]', 'No', NULL, 'BbccgKao', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 18:31:32', '2020-11-03 18:31:32'),
(18, 'ন্ধজ্জদ্মদ', 14, 7, '২৮', '01813868878', '[email protected]', 'No', NULL, 'BbccgKao', '2020-11-04', NULL, '03-11-2020', 'November', '2020', 0, '2020-11-03 18:31:32', '2020-11-03 18:31:32');
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
CREATE TABLE `clients` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`review` text COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`subject` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`message` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `contacts`
--
INSERT INTO `contacts` (`id`, `name`, `email`, `subject`, `message`, `created_at`, `updated_at`) VALUES
(1, 'HR Mahid', '[email protected]', 'Hello', 'How are you?', '2020-10-31 18:01:21', '2020-10-31 18:01:21');
-- --------------------------------------------------------
--
-- Table structure for table `departments`
--
CREATE TABLE `departments` (
`department_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `departments`
--
INSERT INTO `departments` (`department_id`, `name`, `slug`, `image`, `description`, `status`, `created_at`, `updated_at`) VALUES
(1, 'মেডিসিন বিশেষজ্ঞ', 'medicine-specialist', 'image/departments/JNf7BpDFAbRmr1w0XTxYXlRtGzLWtvOTctopithI.jpeg', '<p>This is the invention</p>', 1, '2020-10-01 14:05:19', '2020-10-31 16:41:34'),
(2, 'সার্জারী/ ল্যাপারোস্কপিক বিশেষজ্ঞ', 'surgery-specialist', 'image/departments/XvVI7qwo2NbZgkewich43uhZenmklI1TJM7BhIXB.jpeg', '<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci</p>\r\n\r\n<h2 style=\"font-style:italic\"><strong><em>suscipit eaque vitae</em></strong></h2>\r\n\r\n<p>quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!</p>', 1, '2020-10-01 14:05:30', '2020-10-28 12:00:47'),
(3, 'কিডনী বিশেষজ্ঞ', 'kidney-specialist', 'image/departments/jbkMck5kRp39S3FWUOXQFA7KZMxvTevn8nHC4C9c.jpeg', '<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum voluptatibus corrupti ducimus sequi vero eos nisi architecto optio quaerat adipisci suscipit eaque vitae, quia animi fugit at. Maiores, est omnis!</p>', 1, '2020-10-01 14:05:52', '2020-10-28 12:01:52'),
(4, 'শিশু রোগ বিশেষজ্ঞ', 'pediatrician', 'image/departments/2FmUco7nQCyWBf96YxwbbfLDEEM64WUZXiRAD5HJ.jpeg', '<p>শিশু রোগ বিশেষজ্ঞ</p>', 1, '2020-10-28 12:10:08', '2020-10-28 12:10:08'),
(5, 'হৃদরোগ/কার্ডিওলজি বিশেষজ্ঞ চক্ষু বিশেষজ্ঞ', 'cardiologist-ophthalmologist', 'image/departments/9VYQ1ZDx4NXvRvdVB4FYkirQFpkBXhQ1O2TB5ThP.png', '<p>হৃদরোগ/কার্ডিওলজি বিশেষজ্ঞ চক্ষু বিশেষজ্ঞ</p>', 1, '2020-10-28 12:13:02', '2020-10-28 12:13:02'),
(6, 'নাক, কান, গলা বিশেষজ্ঞ', 'nose-ear-throat-specialist', 'image/departments/YkiyhWDe17k1S93TnfBN58EZnpPAFLANO0flNOpV.png', '<p>নাক, কান, গলা বিশেষজ্ঞ</p>', 1, '2020-10-28 12:13:57', '2020-10-28 12:13:57'),
(7, 'গাইনী/স্ত্রী রোগ বিশেষজ্ঞ', 'gynecologist', 'image/departments/LLUkE29AOtS3Gsn8EU9F0MHXgLhgWbRQ4tPKZ7sC.png', '<p>গাইনী/স্ত্রী রোগ বিশেষজ্ঞ</p>', 1, '2020-10-28 12:14:38', '2020-10-28 12:14:38'),
(8, 'ডায়বেটিস বিশেষজ্ঞ', 'diabetes-specialist', 'image/departments/BURdGK9xNpFdkCIP2VK5myPdI760cln1QhjDjuC9.jpeg', '<p>ডায়বেটিস বিশেষজ্ঞ</p>', 1, '2020-10-28 12:27:13', '2020-10-28 12:27:13'),
(9, 'ইউরোলজী বিশেষজ্ঞ', 'urologist', 'image/departments/PrSmL3PYuNwh48xgM5RAZwRIlvuWMCHM5qfiQeQ2.jpeg', '<p>ইউরোলজী বিশেষজ্ঞ</p>', 1, '2020-10-28 12:27:56', '2020-10-28 12:27:56'),
(10, 'নিউরোলজী বিশেষজ্ঞ', 'neurology-specialist', 'image/departments/Z3kqnKzTNhlLi1G4HFZH7A7gWkcfKiOBLeIxKf9F.jpeg', '<p>নিউরোলজী বিশেষজ্ঞ</p>', 1, '2020-10-28 12:28:43', '2020-10-28 12:28:43'),
(11, 'বার্ণ ও প্লাস্টিক সার্জারী', 'burn-and-plastic-surgery', 'image/departments/f0zby675I1vDRuZej2zP5E55JKiQhIsoGIW983oU.jpeg', '<p>বার্ণ ও প্লাস্টিক সার্জারী</p>', 1, '2020-10-28 12:29:59', '2020-10-28 12:29:59'),
(12, 'রক্ত রোগ বিশেষজ্ঞ', 'hematologist', 'image/departments/F3cL3EoJbA49sjdGOWeGmVS5fCos5UuFxqU5hgjZ.png', '<p>রক্ত রোগ বিশেষজ্ঞ</p>', 1, '2020-10-28 12:30:40', '2020-10-28 12:30:40'),
(13, 'দন্তরোগ বিশেষজ্ঞ', 'dentist', 'image/departments/duSk8vV7fEOQW4726VLWDA9CfkA7NrNF1HLcvMte.jpeg', '<p>দন্তরোগ বিশেষজ্ঞ</p>', 1, '2020-10-28 12:31:16', '2020-10-28 12:31:16'),
(14, 'ট্রমা,অর্থোপেডিক্স ও হাড় জোড় বিশেষজ্ঞ', 'trauma-orthopedics-and-orthopedic-specialist', 'image/departments/Mp6NnKEoqiLMEUjgAj7uo8ZKjoBYdxTeOpxI8cUr.jpeg', '<p>ট্রমা,অর্থোপেডিক্স ও হাড় জোড় বিশেষজ্ঞ</p>', 1, '2020-10-28 12:32:06', '2020-10-28 12:32:06'),
(15, 'মানসিক/মনোরোগ রোগ বিশেষজ্ঞ', 'psychiatrist', 'image/departments/K4be2tCI31kRMQWLU4Ku23ehgld7NhzZviexrC7r.png', '<p>মানসিক/মনোরোগ রোগ বিশেষজ্ঞ</p>', 1, '2020-10-28 12:41:59', '2020-10-28 12:41:59'),
(16, 'বক্ষব্যাধি ও এজমা বিশেষজ্ঞ', 'chest-and-asthma-specialist', 'image/departments/pluzASaGdEYUZnt1PafeCktbfbNbMWud7G5oW1qM.jpeg', '<p>বক্ষব্যাধি ও এজমা বিশেষজ্ঞ</p>', 1, '2020-10-28 12:42:44', '2020-10-28 12:42:44'),
(17, 'বাত, ব্যাথা,প্যারালাইসিস বিশেষজ্ঞ', 'arthritis-pain-paralysis-specialist', 'image/departments/DWjovqvuUm89YVadfxWfuaZaSRsXMMBFLZUMTXa8.jpeg', '<p>বাত, ব্যাথা,প্যারালাইসিস বিশেষজ্ঞ</p>', 1, '2020-10-28 12:44:38', '2020-10-28 12:44:38'),
(18, 'ফিজিওথেরাপিস্ট', 'physiotherapist', 'image/departments/y3rx16ygtxarxFbgID4Se1A5QH5RVjG4PngjJGw5.jpeg', '<p>ফিজিওথেরাপিস্ট</p>', 1, '2020-10-28 12:46:10', '2020-10-28 12:46:10'),
(19, 'প্রাথমিক চিকিৎসাক/ লোকাল ডাক্তার', 'primary-physician-local-doctor', 'image/departments/Wi0EdpIQwlNK27oVaiP1eyH81PfNA3DLFyOFGFHs.png', '<p>প্রাথমিক চিকিৎসাক/ লোকাল ডাক্তার</p>', 1, '2020-10-28 12:49:03', '2020-10-28 12:49:03');
-- --------------------------------------------------------
--
-- Table structure for table `diagnostics`
--
CREATE TABLE `diagnostics` (
`diag_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `diagnostics`
--
INSERT INTO `diagnostics` (`diag_id`, `name`, `slug`, `phone`, `hotline`, `address`, `details`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Popular Medical Center Ltd, Sylhet', 'popular-medical-centre-hospital', '+8801715971685', '+8801715971685', 'New Medical Road, Kajalshah, Sylhet, 3100', '<h1>Contact Details</h1>\r\n\r\n<h1>New Medical Road, Kajalshah, Sylhet, 3100</h1>', 'image/diagnostics/JUEvCPQuW1A9is0Zt9Ep2Suy04k75AsyvRo1MnjJ.jpeg', 1, '2020-11-01 23:35:21', '2020-11-01 23:35:21'),
(2, 'Medinova Medical Services Ltd', 'medinova-medical-services-ltd', '+8801715971685', '+8801715971685', '98, Kajal Shah, New Medical Road, Sylhet', '<h1><em><strong>98, Kajal Shah, </strong></em></h1>\r\n\r\n<h1><em><strong>New Medical Road</strong></em></h1>\r\n\r\n<h1><em><strong>(Near Osmani Medical College East Gate), </strong></em></h1>\r\n\r\n<h1><em><strong>Sylhet, 3100 </strong></em></h1>', 'image/diagnostics/YdTl9r04vXixtT2c2L4WRND75w1ELlZEkUViBdQm.png', 1, '2020-11-01 23:39:21', '2020-11-01 23:39:21'),
(3, 'Trust Medical Services, Sylhet', 'trust-medical-services', '+8801715971685', '+8801715971685', '16, Madhu Shahid, Medical College Roadm, Sylhet', '<h1>Contact Details</h1>\r\n\r\n<h1>16, Madhu Shahid, Medical College Road,</h1>\r\n\r\n<h1>Rikabi Bazar , Sylhet, 3100</h1>', 'image/diagnostics/DNPw8KRY218Dr2eosUZpZcq64YNEYthebIysEtfH.jpeg', 1, '2020-11-01 23:42:17', '2020-11-01 23:42:17'),
(4, 'Medi Aid Diagnostic & Consultation Center', 'medi-aid-diagnostic', '+8801715971685', '+8801715971685', 'Osmani Medical Road, Sylhet, 3100', '<h3>Contact Details</h3>\r\n\r\n<h1>Osmani Medical Road, Sylhet, 3100</h1>', 'image/diagnostics/ZZ5In5k1CEVC1eC1TwlE3muQkYeEjkTM85UKOcwi.png', 1, '2020-11-01 23:46:23', '2020-11-01 23:46:23'),
(5, 'Ibn Sina Diagnostic and Consultation Center', 'ibn-sina-hospital-sylhet-ltd', '+8801715971685', '+8801715971685', 'Medical College Road, Rikabi Bazar, Sylhet', '<h1>Contact Details</h1>\r\n\r\n<h1>Medical College Road, Rikabi Bazar,</h1>\r\n\r\n<h1>Madhu Shahid, Sylhet, 3100</h1>', 'image/diagnostics/ay1NUnwkvVBmVkiyEViS2IzZe07Sck0pOpS0Wq9D.png', 1, '2020-11-01 23:49:26', '2020-11-01 23:49:26'),
(6, 'Comfort Medical Services', 'comfort-medical-services', '+8801715971685', '+8801715971685', '17, Kajolshah, New Medical Road, Sylhet', '<h1>Contact Details:</h1>\r\n\r\n<h1>17, Kajolshah, New Medical Road,</h1>\r\n\r\n<h1>Sylhet, 3100</h1>', 'image/diagnostics/XlAwK1qa3tads6KGE4WiQ6NfZ1rbTnH4q7yU1Hx5.png', 1, '2020-11-01 23:52:12', '2020-11-01 23:52:12'),
(7, 'Popular Diagnostic Complex', 'popular-diagnostic-complex', '+8801715971685', '+8801715971685', 'Mirboxtula, East Chowhatta, Sylhet', '<h3>Contact Details</h3>\r\n\r\n<h1>Mirboxtula, East Chowhatta,</h1>\r\n\r\n<h1>Sylhet, 3100</h1>', 'image/diagnostics/H0Qs1V96TCs8hXChH1rzr6rjgjP0pFEDjPBUgbsq.png', 1, '2020-11-02 00:01:25', '2020-11-02 00:01:25'),
(8, 'Shahjalal Medical Services', 'shahjalal-medical-services', '+8801715971685', '+8801715971685', 'Ornob - 33, Mirer Moidan, Sylhet, 3100', '<h1>Contact Details</h1>\r\n\r\n<h1>Ornob - 33, Mirer Moidan,</h1>\r\n\r\n<h1>Sylhet, 3100</h1>', 'image/diagnostics/CIH1dISxntXdYuAdJ9uJmEaHs8lc7dOq7FMh02h0.jpeg', 1, '2020-11-02 00:10:04', '2020-11-02 00:10:04');
-- --------------------------------------------------------
--
-- Table structure for table `districts`
--
CREATE TABLE `districts` (
`id` bigint(20) UNSIGNED NOT NULL,
`district_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`division_id` bigint(20) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `districts`
--
INSERT INTO `districts` (`id`, `district_name`, `division_id`, `created_at`, `updated_at`) VALUES
(3, 'Sylhet', 4, '2020-10-24 09:16:45', '2020-10-24 09:16:45'),
(4, 'Habiganj', 4, '2020-10-24 09:16:56', '2020-10-24 09:16:56'),
(5, 'Moulvibazar', 4, '2020-10-28 08:56:28', '2020-10-28 08:56:28'),
(6, 'Sunamganj', 4, '2020-10-28 08:56:46', '2020-10-28 08:56:46'),
(7, 'Dhaka', 5, '2020-10-28 09:12:04', '2020-10-28 09:12:04'),
(8, 'Gazipur', 5, '2020-10-28 09:12:41', '2020-10-28 09:12:41'),
(9, 'Kishoreganj', 5, '2020-10-28 09:12:55', '2020-10-28 09:12:55'),
(10, 'Manikganj', 5, '2020-10-28 09:13:11', '2020-10-28 09:13:11'),
(11, 'Munshiganj', 5, '2020-10-28 09:13:34', '2020-10-28 09:13:34'),
(12, 'Narayanganj', 5, '2020-10-28 09:13:51', '2020-10-28 09:13:51'),
(13, 'Narsingdi', 5, '2020-10-28 09:14:06', '2020-10-28 09:14:06'),
(14, 'Tangail', 5, '2020-10-28 09:14:24', '2020-10-28 09:14:24'),
(15, 'Faridpur', 5, '2020-10-28 09:14:38', '2020-10-28 09:14:38'),
(16, 'Gopalganj', 5, '2020-10-28 09:14:59', '2020-10-28 09:14:59'),
(17, 'Madaripur', 5, '2020-10-28 09:15:16', '2020-10-28 09:15:16'),
(18, 'Rajbari', 5, '2020-10-28 09:15:30', '2020-10-28 09:15:30'),
(19, 'Shariatpur', 5, '2020-10-28 09:15:45', '2020-10-28 09:15:45'),
(20, 'Rajshahi', 6, '2020-10-31 17:26:46', '2020-10-31 17:26:46');
-- --------------------------------------------------------
--
-- Table structure for table `divisions`
--
CREATE TABLE `divisions` (
`id` bigint(20) UNSIGNED NOT NULL,
`division_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `divisions`
--
INSERT INTO `divisions` (`id`, `division_name`, `created_at`, `updated_at`) VALUES
(4, 'Sylhet', '2020-10-24 09:16:24', '2020-10-24 09:16:24'),
(5, 'Dhaka', '2020-10-28 08:52:40', '2020-10-28 08:52:40'),
(6, 'Rajshahi', '2020-10-31 17:26:23', '2020-10-31 17:26:23');
-- --------------------------------------------------------
--
-- Table structure for table `doctors`
--
CREATE TABLE `doctors` (
`doc_id` bigint(20) UNSIGNED NOT NULL,
`department_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`designation` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sur_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`division_id` int(11) NOT NULL,
`district_id` int(11) NOT NULL,
`upzila_id` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`h_status` int(11) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `doctors`
--
INSERT INTO `doctors` (`doc_id`, `department_id`, `name`, `slug`, `phone`, `hotline`, `designation`, `sur_name`, `description`, `image`, `division_id`, `district_id`, `upzila_id`, `status`, `h_status`, `created_at`, `updated_at`) VALUES
(1, 10, 'ডাঃ এম এ মুনিম সাজু', 'dr-m-a-munim-saju', '01715971685', '01715971685', 'এমবিবিএস(এসইউ), এমডি (আমেরিকা), এমআরসিপি (যুক্তরাজ্য) মেম্বার অফ দ্যা এনএএমইউ (কনসালটেন্ট নিউরোলজিস্ট)', 'Dr. M A Munim Saju', '<p>ডাঃ এম, এ, মুনিম, সাজু</p>\r\n\r\n<p>মাথাব্যাথা, মস্তিষ্ক, ও স্নায়ুরোগ বিশেষজ্ঞ<br />\r\nএম.বি.বি.এস(এসইউ), এম.ডি (আমেরিকা), এম.আর.সি.পি (যুক্তরাজ্য)<br />\r\nমেম্বার অফ দ্যা এন.এ.এম.ইউ (কনসালটেন্ট নিউরোলজিস্ট)<br />\r\nসহযোগী অধ্যাপক, <br />\r\nএনাম মেডিকেল কলেজ, ঢাকা।<br />\r\nবিএমডিসি নং- ৩৮০৯৭</p>\r\n\r\n<p>চেম্বার-দি মেডিনোভা ডায়াগনস্টিক এন্ড কলসালটেশন সেন্টার।<br />\r\n(রিকাবীবাজার, মদন মোহন কলেজের পাশে)</p>\r\n\r\n<p>রোগী দেখার সময়ঃ<br />\r\nপ্রতিদিন বিকাল ৫ টা থেকে রাত ৯ টা পর্যন্ত। (শুক্রবার বন্ধ)</p>\r\n\r\n<p>যোগাযোগ +৮৮০১৭১৫৯৭১৬৮৫</p>', 'image/doctors/6tFB9HWfBVzkJvtjy0Vmz0W4agyhmW6r6pURdLfZ.jpeg', 4, 3, 1, 1, 1, '2020-10-31 17:02:52', '2020-11-03 16:14:06'),
(2, 6, 'ডা: মোঃ আজিজুল হক মানিক', 'dr-azizul-haque-manik', '+8801715971685', '+8801715971685', 'ডিএলও, এমসিপিএস, এফসিপিএস (ইএনটি) এমবিবিএস, বিসিএস (স্বাস্থ্য)', 'Dr. Md. Azizul Hoque Manik', '<p>ডা: মোঃ আজিজুল হক মানিক<br />\r\nডিএলও, এমসিপিএস, এফসিপিএস (ইএনটি)<br />\r\nএমবিবিএস, বিসিএস (স্বাস্থ্য)<br />\r\nবঙ্গবন্ধু শেখ মুজিব মেডিকেল বিশ্ববিদ্যালয়<br />\r\nনাক, কান, গলারোগ বিশেষজ্ঞ ও হেড নেক সার্জন</p>\r\n\r\n<p>চেম্বার ০১: শাহজালাল মেডিকেল সার্ভিস, মিরের ময়দান, সিলেট।<br />\r\nপ্রতি বুধবার ২:৩০ টা হতে ৬:৩০ টা পর্যন্ত এবং বৃহস্পতিবার ২:০০টা হতে ৪:০০টা পর্যন্ত।</p>\r\n\r\n<p>চেম্বার ০২: পপুলার মেডিকেল সেন্টার এন্ড হসপিটাল, সোবহানিঘাট, সিলেট।<br />\r\nপ্রতি বুধবার ৬:৩০ টা হতে ৮:০০ টা পর্যন্ত।</p>\r\n\r\n<p>যোগাযোগ- +৮৮০১৭১৫৯৭১৬৮৫</p>', 'image/doctors/qW1B9GPaTIm9eQ7plYiEMHVn7Bx2gG1YJ7vjrD6e.jpeg', 4, 3, 1, 1, 1, '2020-11-02 00:21:26', '2020-11-03 16:23:26'),
(3, 14, 'অধ্যাপক ডাঃ দীপংকর নাথ তালুকদার', 'dr-diponkor-nath-talukdar', '+8801715971685', '+8801715971685', 'এম.বি.বি.এস, এম.পি.এইচ.এম.এস (অর্থো) হাড়-জোড়া ও বিকলাঙ্গ বিশেষজ্ঞ ট্রমা ও অর্থোপেডিক সার্জন অধ্যাপক ও প্রাক্তন বিভাগীয় প্রধান অর্থোপেডিক সার্জারী', 'Dr. Diponkor Nath Talukder', '<p>অধ্যাপক ডাঃ দীপংকর নাথ তালুকদার<br />\r\nএম.বি.বি.এস, এম.পি.এইচ.এম.এস (অর্থো)<br />\r\nহাড়-জোড়া ও বিকলাঙ্গ বিশেষজ্ঞ<br />\r\nট্রমা ও অর্থোপেডিক সার্জন<br />\r\nঅধ্যাপক ও প্রাক্তন বিভাগীয় প্রধান<br />\r\nঅর্থোপেডিক সার্জারী<br />\r\nএম.এ.জি ওসমানী মেডিকেল কলেজ ও হাসপাতাল সিলেট</p>\r\n\r\n<p>চেম্বারঃ এ.বি.সি ডায়গনস্টিক সেন্টারের নীচতলা, সেন্ট্রাল ফার্মেসীর পাশে, চৌহাট্টা পয়েন্ট, সিলেট</p>\r\n\r\n<p>রোগী দেখার সময়ঃ প্রতিদিন বিকাল ৪টা হতে রাত ৯টা পর্যন্ত<br />\r\n(শুক্রবার ও সরকারি ছুটির দিন বন্ধ)</p>\r\n\r\n<p>যোগাযোগ +8801715971685</p>', 'image/doctors/bfKSvRCl8MBGcPCJZrOeu6B0KhNt2L4eZYmbbzOG.jpeg', 4, 3, 1, 1, 1, '2020-11-02 21:15:47', '2020-11-03 23:02:36'),
(4, 1, 'ডাঃ মোঃ জাহাঙ্গীর আলম', 'dr-jahangir-alam', '8801715971685', '+8801715971685', 'এম.বি.বি.এস (ঢাকা), এম.সি.পি.এস (মেডিসিন) এম.ডি (গ্যাস্ট্রো এন্টারলজী) মেডিসিন, গ্যাস্ট্রোইনটেষ্টাইন ও লিভার ব্যাধি বিশেষজ্ঞ', 'Dr. Md. Jahangir Alam', '<p>ডাঃ মোঃ জাহাঙ্গীর আলম<br />\r\nএম.বি.বি.এস (ঢাকা), এম.সি.পি.এস (মেডিসিন) এম.ডি (গ্যাস্ট্রো এন্টারলজী)<br />\r\nমেডিসিন, গ্যাস্ট্রোইনটেষ্টাইন ও লিভার ব্যাধি বিশেষজ্ঞ<br />\r\nসহযোগী অধ্যাপক ও বিভাগীয় প্রধান<br />\r\nএম.এ.জি ওসমানী মেডিকেল কলেজ হাসপাতাল, সিলেট</p>\r\n\r\n<p>চেম্বারঃ ট্রাস্ট মেডিকেল সার্ভিসেস<br />\r\n১৬,মধুশহীদ, ওসমানী মেডিকেল রোড, সিলেট।</p>\r\n\r\n<p>রোগী দেখার সময়ঃ প্রতিদিন বিকাল ৫ টা থেকে রাত ৯ টা পর্যন্ত</p>\r\n\r\n<p>যোগাযোগ +8801715971685</p>', 'image/doctors/pcwJqjKJP57MJyPS2fA5x3vJbbVRNqeeskia5EDK.jpeg', 4, 3, 1, 1, 1, '2020-11-02 21:19:06', '2020-11-03 22:58:32'),
(5, 4, 'অধ্যাপক ডাঃ সৈয়দ মূসা এম.এ কাইয়ুম', 'dr-syed-musa-m-a-kaiyum', '+8801715971685', '+8801715971685', 'এম.বি.বি.এস, ডি.সি.এইচ, এফ.সি.পি.এস, পি.জি.পি.এন (ইউ.এস.এ) আর.সি.পি.এন্ড এস (আয়ারল্যান্ড)', 'Dr. Syed Musa M.A Kaiyum', '<p>অধ্যাপক ডাঃ সৈয়দ মূসা এম.এ কাইয়ুম<br />\r\nএম.বি.বি.এস, ডি.সি.এইচ, এফ.সি.পি.এস, পি.জি.পি.এন (ইউ.এস.এ)<br />\r\nআর.সি.পি.এন্ড এস (আয়ারল্যান্ড)<br />\r\nপ্রাক্তন বিভাগীয় প্রধান (শিশু রোগ বিভাগ)<br />\r\nনর্থইস্ট মেডিকেল কলেজ হাসপাতাল এবং রাগিব রাবেয়া মেডিকেল কলেজ প্রাক্তন শিশুরোগ বিশেষজ্ঞ, মদিনা হসপিটাল ও রয়েল হসপিটাল,গ্লাসগো,যুক্তরাজ্য।</p>\r\n\r\n<p>চেম্বার: ইবনে সিনা হাসপাতাল সিলেট।<br />\r\nসোবহানীঘাট পয়েন্ট, সিলেট।</p>\r\n\r\n<p>রোগী দেখার সময়: প্রতিদিন বিকাল ৪টা থেকে রাত ৯টা পর্যন্ত।</p>\r\n\r\n<p>যোগাযোগ - +৮৮০১৭১৫৯৭১৬৮৫</p>', 'image/doctors/zSlOAxw8FXIXCDWLtgsb3E2ics1QOnMWluifMSxg.jpeg', 4, 3, 1, 1, 1, '2020-11-02 21:45:50', '2020-11-02 22:46:05'),
(6, 14, 'ডাঃ মোহাম্মদ মাহিন', 'dr-mohammad-mahin', '+8801715971685', '+8801715971685', 'এম.বি.বি.এস, (ডি অর্থো)', 'Dr. Mohammad Mahin', '<p>ডাঃ মোহাম্মদ মাহিন<br />\r\nএম.বি.বি.এস, (ডি অর্থো)<br />\r\nবঙ্গবন্ধু শেখ মুজিব মেডিকেল বিশ্ববিদ্যালয়</p>\r\n\r\n<p>অর্থোপেডিক ও ট্রমা সার্জন</p>\r\n\r\n<p>(বাত-ব্যাথা,মেরুদণ্ড ও হাড় জোড়া রোগ বিশেষজ্ঞ ও সার্জন)<br />\r\nনর্থ ইষ্ট মেডিকেল কলেজ ও হাসপাতাল,সিলেট।</p>\r\n\r\n<p><br />\r\nচেম্বার ০১ঃ ৭১-৭২ নং, পূর্ব স্টেডিয়াম মার্কেট (২য় তলা), সিলেট।<br />\r\nরোগী দেখার সময়ঃ প্রতিদিন বিকাল ৫টা থেকে রাত ৯টা</p>\r\n\r\n<p>চেম্বার ০২ঃ নিউ নাহিদ ফার্মেসী-২<br />\r\nমোকাম রোড, বিয়ানীবাজার, সিলেট।<br />\r\nরোগী দেখার সময়ঃ প্রতি শুক্রবার সকাল ১০টা থেকে বিকাল ৪টা</p>\r\n\r\n<p>যোগাযোগ- ০১৭১৫৯৭১৬৮৫</p>', 'image/doctors/hZPjV0wavQ1rmO3Jj0AfcRa0EgUDDyTr1saCmokO.jpeg', 4, 3, 1, 1, 1, '2020-11-02 21:49:30', '2020-11-03 16:30:37'),
(7, 14, 'ডাঃ ইশতিয়াক উল ফাত্তাহ', 'dr-eshtiaque-ul-fattah', '01715971685', '+8801715971685', 'এম.বি.বি.এস, এম.এস (অর্থোপেডিক্স) হাড়-জোড়া, বিকলাঙ্গ ও আঘাতজনিত রোগ বিশেষজ্ঞ', 'Dr. Ishtiaque ul Fattah', '<p>ডাঃ ইশতিয়াক উল ফাত্তাহ<br />\r\nএম.বি.বি.এস, এম.এস (অর্থোপেডিক্স)<br />\r\nহাড়-জোড়া, বিকলাঙ্গ ও আঘাতজনিত রোগ বিশেষজ্ঞ<br />\r\nঅধ্যাপক, অর্থো-সার্জারী বিভাগ<br />\r\nএম.এ.জি ওসমানী মেডিকেল কলেজ ও হাসপাতাল সিলেট</p>\r\n\r\n<p>চেম্বারঃ মেডিএইড ডায়গনস্টিক এন্ড কনসালটেশন সেন্টার<br />\r\nওসমানী মেডিকেল রোড(মধুশহীদ মাজার সংলগ্ন), সিলেট</p>\r\n\r\n<p>রোগী দেখার সময়ঃ প্রতিদিন বিকাল ৪ঃ৩০ থেকে রাত ৯ঃ৩০ পর্যন্ত (শুক্রবার বন্ধ)</p>\r\n\r\n<p>সিরিয়ালের জন্য সকাল ৯ঃ৩০থেকে - 01792326212</p>', 'image/doctors/ZBPlWsz6m7sKOk7VFPegzXsWmVrfUiRAiyhLEEqL.jpeg', 4, 3, 1, 1, 1, '2020-11-02 22:29:04', '2020-11-03 19:08:17');
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `galleries`
--
CREATE TABLE `galleries` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `hospitals`
--
CREATE TABLE `hospitals` (
`h_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `hospitals`
--
INSERT INTO `hospitals` (`h_id`, `name`, `slug`, `phone`, `hotline`, `address`, `details`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 'AL HARAMAIN HOSPITAL PVT LTD', 'al-haramain-hospital', '01715971685', '01715971685', 'Chali Bandar, Subhani Ghat, Sylhet-3100', '<p>The Hospital provides round-the-clock emergency and hospitalization services.</p>', 'image/hospitals/xc7sQ9G6UPt4odr6Sby3t6XjVzWBbSjSPwhH0Q6e.jpeg', 1, '2020-10-31 17:10:15', '2020-11-01 21:28:38'),
(2, 'MAG Osmani Medical College Sylhet', 'osmani-medical-college', '0821-713667', '0821-713667', 'Medical Road, Kajolshah, Sylhet', '<p>সিলেট এম.এ.জি ওসমানী মেডিকেল কলেজ</p>', 'image/hospitals/OPIzX84EwL0qf6vcoEWnqLCs8FGaVnGgohBA4okr.png', 1, '2020-11-01 21:10:30', '2020-11-01 21:10:30'),
(3, 'Jalalabad Ragib-Rabeya Medical College & Hospital', 'jalalabad-ragib-rabeya-medical-college', '0821-719090', '0821-719090', '29/5 Pathantola Rd, Sylhet', '<p>Jalalabad Ragib-Rabeya Medical College & Hospital</p>', 'image/hospitals/pr0l7aF8vQTlVsZmrpmSWpptkqSQRumF3ELu5sEe.jpeg', 1, '2020-11-01 21:18:23', '2020-11-01 21:18:23'),
(4, 'North East Medical College & Hospital', 'north-east-medical-college-sylhet', '0821-728587', '0821-728587', 'South Surma, Gohorpur Rd, Sylhet 3100', '<h2>North East Medical College & Hospital</h2>', 'image/hospitals/B2ltgwBOBg9M69dlzTQLsvkKBuoUGR0J2ZZPCFdw.jpeg', 1, '2020-11-01 21:24:17', '2020-11-01 21:24:17'),
(5, 'Park View Medical College Hospital', 'park-view-medical-college', '0821-728878', '0821-728878', 'VIP Road, Taltala, Sylhet, Bangladesh.', '<h2>Park View Medical College Hospital</h2>', 'image/hospitals/ES8RZ8evgtkTiXcHkedDki04h0RVuroYNKRjpN2I.png', 1, '2020-11-01 21:27:49', '2020-11-01 21:27:49'),
(6, 'Oasis Hospital', 'oasis-hospital', '01611-99 0000', '01611-99 0000', 'Subani Ghat Road, Machimpur, Sylhet 3100', '<h2>Oasis Hospital</h2>', 'image/hospitals/qTH3RaCDZMnSLyBW2QXpiqjlJKr8dbmz8PG9nwvN.png', 1, '2020-11-01 21:31:50', '2020-11-01 21:31:50'),
(7, 'Mount Adora Hospital, Akhalia', 'mount-adora-hospital-akhalia', '+8801707 079717', '+8801707 079717', 'Akhalia, Sylhet-Sunamganj Road, Sylhet -3100', '<h3>Mount Adora Hospital, Akhalia</h3>', 'image/hospitals/skUSRt0lx3kX6rtIhuc2fwESoEJqsFROvSxXcIH6.png', 1, '2020-11-01 21:36:38', '2020-11-01 21:36:38'),
(8, 'Mount Adora Hospital, Nayasarak', 'mount-adora-hospital-nayasarak', '+8801786-637 476', '+8801786-637 476', 'Mirboxtula, Nayasarak Sylhet -3100', '<h3>Mount Adora Hospital, Nayasarak</h3>', 'image/hospitals/Jbdj5XZuwk1IOBf58pYVpLYoZLLey5GtdIB8YofL.png', 1, '2020-11-01 21:38:15', '2020-11-01 21:38:15'),
(9, 'Popular Medical Centre and Hospital', 'popular-medical-centre-hospital', '+8801730935676', '+8801730935676', 'Subhanighat, Sylhet-3100', '<p>Popular Medical Centre and Hospital</p>', 'image/hospitals/AcBWtEdv8Wzw68M2sRHBMmWoipAtbsStytVpImoz.jpeg', 1, '2020-11-01 22:08:58', '2020-11-01 22:08:58'),
(10, 'Ibn Sina Hospital Sylhet Ltd', 'ibn-sina-hospital-sylhet-ltd', '+88 08212832735', '+88 08212832735', 'Subhanighat Point, Sylhet 3100, Bangladesh', '<p>Ibn Sina Hospital Sylhet Ltd</p>', 'image/hospitals/L4BjmQoPLnbSGZRWyuVP8QDenfZP2w9lk0EkPHmm.png', 1, '2020-11-01 22:12:54', '2020-11-01 22:12:54'),
(11, 'Matrimangal and Red Crescent Hospital', 'matrimangal-red-cresent', '+88 0821716214', '+88 0821716214', 'Zindabazar, Sylhet 3100, Bangladesh', '<p>Matrimangal and Red Crescent Hospital</p>\r\n\r\n<p><a href=\"https://www.google.com/search?client=firefox-b-d&q=Matrimangal+and+Red+Crescent+Hospital#\">0821-724098</a></p>', 'image/hospitals/h1kwJWafJQjhD64e55HqK0TMmkOB5KWKCJTNE51v.png', 1, '2020-11-01 22:58:42', '2020-11-01 22:58:42'),
(12, 'Niramoy Poly Clinic', 'niramoy-poly-clinic', '+8801715971685', '+8801715971685', 'Nowab road, Sylhet 3100, Bangladesh', '<p>Niramoy Poly Clinic</p>', 'image/hospitals/dVGY7wdcrpA2xqi95vQpNdydY54qanwDmirdb32N.jpeg', 1, '2020-11-01 23:03:09', '2020-11-01 23:03:09'),
(13, 'Sylhet Diabetic Hospital', 'sylhet-diabetic-hospital', '+88 0821713632', '+88 0821713632', 'Modhuban Super Market, Zindabazar Sylhet Sadar', '<p>Sylhet Diabetic Hospital<br />\r\nModhuban Super Market, Zindabazar<br />\r\nSylhet Sadar<br />\r\nSylhet 3100, Bangladesh<br />\r\nPhone: +88 0821713632, +88 08212830383</p>', 'image/hospitals/LQvFfY62kymOmAPugwuOCYIkL5EQYRmfGckmzxxW.jpeg', 1, '2020-11-01 23:05:51', '2020-11-01 23:05:51'),
(14, 'Sadar Hospital', 'sadar-hospital', '+88 0821713506', '+88 0821713506', 'Chowhatta, Sylhet 3100, Bangladesh', '<p>Sadar Hospital<br />\r\nChowhatta<br />\r\nSylhet Sadar<br />\r\nSylhet 3100, Bangladesh<br />\r\nPhone: +88 0821713506</p>', 'image/hospitals/Wvz8tDuqPk9TzVdaqHReXxarERDq79RZhhj0bH3p.jpeg', 1, '2020-11-01 23:08:44', '2020-11-01 23:08:44'),
(15, 'Sylhet Womens Medical College Hospital', 'sylhet-womens-medical-college-hospital', '+8808212830040', '+8808212830040', 'Mirboxtula, Sylhet 3100, Bangladesh', '<h2 style=\"font-style: italic;\"><em><strong>Sylhet Womens Medical College Hospital<br />\r\nMirboxtula<br />\r\nSylhet Sadar<br />\r\nSylhet 3100, Bangladesh<br />\r\nPhone: +8808212830040</strong></em></h2>', 'image/hospitals/nUSp6GQX32f1Xy7Zl9M3lU6a4gBcBpfTvw87EkDm.jpeg', 1, '2020-11-01 23:11:57', '2020-11-01 23:11:57'),
(16, 'Nurjahan Hospital', 'nurjahan-hospital', '+8801715971685', '+8801715971685', 'Dorgah Gate, Sylhet 3100, Bangladesh', '<h2><big><strong><em>Nurjahan Hospital<br />\r\nDorgah Gate<br />\r\nSylhet Sadar<br />\r\nSylhet 3100, Bangladesh</em></strong></big></h2>', 'image/hospitals/5PXYj8Ma6GKifWUsEU8JPMYSDHtQ4Cqfize7EV9e.png', 1, '2020-11-01 23:19:54', '2020-11-01 23:19:54');
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2020_09_24_133751_create_departments_table', 1),
(5, '2020_09_24_144034_create_doctors_table', 1),
(6, '2020_09_26_084356_create_hospitals_table', 1),
(7, '2020_09_26_095047_create_diagnostics_table', 1),
(8, '2020_09_26_103051_create_ambulances_table', 1),
(9, '2020_09_26_111728_create_socialorganizes_table', 1),
(10, '2020_09_26_131915_create_shops_table', 1),
(11, '2020_09_26_144510_create_settings_table', 1),
(12, '2020_09_27_073525_create_clients_table', 1),
(13, '2020_09_27_080311_create_galleries_table', 1),
(14, '2020_09_27_085208_create_postcategories_table', 1),
(15, '2020_09_27_134208_create_posts_table', 1),
(16, '2020_09_27_144245_create_appoinments_table', 1),
(17, '2020_09_28_092534_create_sliders_table', 1),
(18, '2020_09_28_112742_create_staff_table', 1),
(19, '2020_10_02_001844_create_contacts_table', 1),
(20, '2020_10_23_203248_create_divisions_table', 1),
(21, '2020_10_23_203545_create_districts_table', 1),
(22, '2020_10_24_150029_create_upzilas_table', 1),
(23, '2020_10_24_185115_create_advertises_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `postcategories`
--
CREATE TABLE `postcategories` (
`cat_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `postcategories`
--
INSERT INTO `postcategories` (`cat_id`, `name`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Health Tips', 'health-tips', 1, '2020-10-31 17:14:58', '2020-10-31 17:14:58');
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE `posts` (
`post_id` bigint(20) UNSIGNED NOT NULL,
`cat_id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`body` text COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE `settings` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`about` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_keywords` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`web_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`fb_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`twitter_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`instagram_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`youtube_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`service_years` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`total_patients` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`total_doctors` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`total_staffs` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`notice` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`favicon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`cover_image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`id`, `title`, `meta_description`, `about`, `meta_keywords`, `email`, `phone`, `hotline`, `address`, `web_link`, `fb_link`, `twitter_link`, `instagram_link`, `youtube_link`, `service_years`, `total_patients`, `total_doctors`, `total_staffs`, `notice`, `logo`, `favicon`, `cover_image`, `created_at`, `updated_at`) VALUES
(1, 'DoctorEbari', 'DoctorEbari is the largest finding doctor guide website. You will also find a doctor list, get appointments, hospital list, clinic. Doctor Serial Bangladesh', 'Contact us for a variety of hassle-free medical assistance. Request an appointment from our web site to get the serial of doctors with your required experience', 'doctorbari,doctorebari,find doctor,best doctor bd, doctor appointment, doctor booking, doctor service bd, doctor ticket, doctor service, bangldadesh doctor, doctors help', '[email protected]', '8801715971685', '8801765885996', 'Sylhet-3100, Bangladesh', 'https://doctorebari.com', 'https://facebook.com/doctorEbari', 'https://twitter.com/doctorebari', 'https://www.instagram.com/doctorebari/', 'https://www.youtube.com/channel/UCK6wWhN5vM7Deg8CIPcoO3w', NULL, NULL, '5', NULL, 'প্রিয় ভিজিট\'র আসসালামু আলাইকুম DoctorEbari.com এর পক্ষ থেকে আপনাকে স্বাগতম। আমরা সিলেট বিভাগে ফেইসবুক গ্রুপ- \"সিলেট ডাক্তারি সহায়তা\" এর মাধ্যমে দীর্ঘ দিন যাবত ফ্রী\'তে ডাক্তারি তথ্যসেবা দিয়ে যাচ্ছি। এরই ধারাবাহিকতায় সুবিধাভোগিদের কথা চিন্তা করে আরও উন্নত চিকিৎসা সেবা সহজ ভাবে প্রদান করার লক্ষে \"DoctorEbari.com এর শুভসূচনা করলাম। এখন থেকে এই ওয়েবসাইটের মাধ্যমে খুব সহজেই আপনারা আপনার কাঙ্খিত ডাক্তারের এপয়ন্টমেন্ট নিতে পারেন। অথবা আমাদের ওয়েবসাইটের হটলাইন নাম্বারে যোগাযোগ করতে পারেন। আপনাদের যে কোন পরামর্শ ও অভিযোগ থাকলে ফোন করুন +৮৮০১৭৬৫৮৮৫৯৯৬', 'image/setting/sdhCPuD3sTG4CmLEisOiOrYLIpEfY1wyvXnnt0iR.png', NULL, 'image/setting/AFI3kzazeFXcbLesJzwPHACanwYj2dnkOaD0u9lH.jpeg', '2020-10-30 05:18:14', '2020-11-01 23:29:30');
-- --------------------------------------------------------
--
-- Table structure for table `shops`
--
CREATE TABLE `shops` (
`shop_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`category` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sell_price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`buy_price` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `sliders`
--
CREATE TABLE `sliders` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`details` text COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `sliders`
--
INSERT INTO `sliders` (`id`, `title`, `details`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 'DoctorEbari', 'The Best Platform For Getting Doctors Appointment in Bangladesh', 'image/sliders/bAHjLGGeNHItuXjr3saaKYRiHgpQSKziTFkvyi9d.jpeg', 1, '2020-10-30 08:00:54', '2020-10-30 08:09:51');
-- --------------------------------------------------------
--
-- Table structure for table `socialorganizes`
--
CREATE TABLE `socialorganizes` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`organizes` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`hotline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `staff`
--
CREATE TABLE `staff` (
`staff_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`designation` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`details` text COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`fb_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`twitter_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`instagram_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `upzilas`
--
CREATE TABLE `upzilas` (
`id` bigint(20) UNSIGNED NOT NULL,
`division_id` int(11) NOT NULL,
`district_id` int(11) NOT NULL,
`upzila_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `upzilas`
--
INSERT INTO `upzilas` (`id`, `division_id`, `district_id`, `upzila_name`, `created_at`, `updated_at`) VALUES
(1, 4, 3, 'Shadar -3100', '2020-10-24 09:27:33', '2020-10-24 09:49:26'),
(2, 4, 3, 'Balaganj', '2020-10-28 08:58:13', '2020-10-28 08:58:13'),
(3, 4, 3, 'Beanibazar', '2020-10-28 08:58:23', '2020-10-28 08:58:23'),
(4, 4, 3, 'Bishwanath', '2020-10-28 08:58:39', '2020-10-28 08:58:39'),
(5, 4, 3, 'Companiganj', '2020-10-28 08:58:50', '2020-10-28 08:58:50'),
(6, 4, 3, 'Dakshin Surma', '2020-10-28 08:58:59', '2020-10-28 08:58:59'),
(7, 4, 3, 'Fenchuganj', '2020-10-28 08:59:15', '2020-10-28 08:59:15'),
(8, 4, 3, 'Golapganj', '2020-10-28 08:59:26', '2020-10-28 08:59:26'),
(9, 4, 3, 'Gowainghat', '2020-10-28 08:59:34', '2020-10-28 08:59:34'),
(10, 4, 3, 'Jaintiapur', '2020-10-28 08:59:44', '2020-10-28 08:59:44'),
(11, 4, 3, 'Kanaighat', '2020-10-28 08:59:53', '2020-10-28 08:59:53'),
(12, 4, 3, 'Osmani Nagar', '2020-10-28 09:00:03', '2020-10-28 09:00:03'),
(13, 4, 3, 'Zakiganj', '2020-10-28 09:00:14', '2020-10-28 09:00:14'),
(14, 4, 4, 'Ajmiriganj', '2020-10-28 09:00:41', '2020-10-28 09:00:41'),
(15, 4, 4, 'Baniachang', '2020-10-28 09:02:10', '2020-10-28 09:02:10'),
(16, 4, 4, 'Bahubal', '2020-10-28 09:02:19', '2020-10-28 09:02:19'),
(17, 4, 4, 'Chunarughat', '2020-10-28 09:02:30', '2020-10-28 09:02:30'),
(18, 4, 4, 'Habiganj Sadar', '2020-10-28 09:02:42', '2020-10-28 09:02:42'),
(19, 4, 4, 'Lakhai', '2020-10-28 09:02:58', '2020-10-28 09:02:58'),
(20, 4, 4, 'Madhabpur', '2020-10-28 09:03:13', '2020-10-28 09:03:13'),
(21, 4, 4, 'Nabiganj', '2020-10-28 09:03:23', '2020-10-28 09:03:23'),
(22, 4, 4, 'Sayestaganj', '2020-10-28 09:03:31', '2020-10-28 09:03:56'),
(23, 4, 5, 'Moulvibazar Sadar', '2020-10-28 09:05:00', '2020-10-28 09:05:00'),
(24, 4, 5, 'Kamalganj', '2020-10-28 09:05:19', '2020-10-28 09:05:19'),
(25, 4, 5, 'Kulaura', '2020-10-28 09:05:31', '2020-10-28 09:05:31'),
(26, 4, 5, 'Rajnagar', '2020-10-28 09:05:42', '2020-10-28 09:05:42'),
(27, 4, 5, 'Sreemangal', '2020-10-28 09:05:57', '2020-10-28 09:05:57'),
(28, 4, 5, 'Barlekha', '2020-10-28 09:06:14', '2020-10-28 09:06:14'),
(29, 4, 5, 'Juri', '2020-10-28 09:06:42', '2020-10-28 09:06:42'),
(30, 4, 6, 'Sunamganj Sadar', '2020-10-28 09:07:11', '2020-10-28 09:07:11'),
(31, 4, 6, 'Bishwamvarpur', '2020-10-28 09:07:24', '2020-10-28 09:07:24'),
(32, 4, 6, 'Chhatak', '2020-10-28 09:07:34', '2020-10-28 09:07:34'),
(33, 4, 6, 'Derai', '2020-10-28 09:08:22', '2020-10-28 09:08:22'),
(34, 4, 6, 'Dharamapasha', '2020-10-28 09:08:33', '2020-10-28 09:08:33'),
(35, 4, 6, 'Dowarabazar', '2020-10-28 09:08:44', '2020-10-28 09:08:44'),
(36, 4, 6, 'Jagannathpur', '2020-10-28 09:08:53', '2020-10-28 09:08:53'),
(37, 4, 6, 'Jamalganj', '2020-10-28 09:09:02', '2020-10-28 09:09:02'),
(38, 4, 6, 'Sullah', '2020-10-28 09:09:12', '2020-10-28 09:09:12'),
(39, 4, 6, 'Tahirpur', '2020-10-28 09:09:24', '2020-10-28 09:09:24'),
(40, 5, 7, 'Dhamrai', '2020-10-28 09:17:18', '2020-10-28 09:17:18'),
(41, 5, 7, 'Dohar', '2020-10-28 09:17:35', '2020-10-28 09:17:35'),
(42, 5, 7, 'Keraniganj', '2020-10-28 09:17:55', '2020-10-28 09:17:55'),
(43, 5, 7, 'Nawabganj', '2020-10-28 09:18:13', '2020-10-28 09:18:13'),
(44, 5, 7, 'Savar', '2020-10-28 09:18:29', '2020-10-28 09:18:29'),
(45, 5, 7, 'Demra', '2020-10-28 09:18:41', '2020-10-28 09:18:41'),
(46, 5, 8, 'Gazipur Sadar', '2020-10-28 09:19:04', '2020-10-28 09:19:04'),
(47, 5, 8, 'Kaliakair', '2020-10-28 09:19:19', '2020-10-28 09:19:19'),
(48, 5, 8, 'Kapasia', '2020-10-28 09:19:34', '2020-10-28 09:19:34'),
(49, 5, 8, 'Sreepur', '2020-10-28 09:19:48', '2020-10-28 09:19:48'),
(50, 5, 8, 'Kaliganj', '2020-10-28 09:20:00', '2020-10-28 09:20:00'),
(51, 6, 20, 'Shadar', '2020-10-31 17:27:11', '2020-10-31 17:27:11');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`is_admin` int(11) DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `is_admin`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Rimon Nahid', '[email protected]', NULL, 1, '$2y$10$r3rq2/NixMjM6WqOgkb.jubiIvsLtJ/Z6PGAPjM1kTKmczqPXCzTu', NULL, '2020-10-30 04:48:41', '2020-10-30 04:48:41'),
(2, 'Tanvir Hossain', '[email protected]', NULL, 1, '$2y$10$EMxwJPYWIp3kG/1Wee/GU./5JviihPP/T1ysqfJeT/v81mN9ix/RW', NULL, '2020-11-01 12:26:40', '2020-11-01 12:26:40'),
(3, 'Sabbir Ahmed', '[email protected]', NULL, 1, '$2y$10$7zeLxsYwYpr1aCAYgJaPb.qZmeOa85LLe.ICGfo5s2uinp0hXjPdC', NULL, '2020-11-01 12:28:01', '2020-11-01 12:28:01');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `advertises`
--
ALTER TABLE `advertises`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `ambulances`
--
ALTER TABLE `ambulances`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `appoinments`
--
ALTER TABLE `appoinments`
ADD PRIMARY KEY (`appoint_id`);
--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contacts`
--
ALTER TABLE `contacts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `departments`
--
ALTER TABLE `departments`
ADD PRIMARY KEY (`department_id`);
--
-- Indexes for table `diagnostics`
--
ALTER TABLE `diagnostics`
ADD PRIMARY KEY (`diag_id`);
--
-- Indexes for table `districts`
--
ALTER TABLE `districts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `divisions`
--
ALTER TABLE `divisions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `doctors`
--
ALTER TABLE `doctors`
ADD PRIMARY KEY (`doc_id`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `galleries`
--
ALTER TABLE `galleries`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `hospitals`
--
ALTER TABLE `hospitals`
ADD PRIMARY KEY (`h_id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
ADD KEY `password_resets_email_index` (`email`);
--
-- Indexes for table `postcategories`
--
ALTER TABLE `postcategories`
ADD PRIMARY KEY (`cat_id`);
--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
ADD PRIMARY KEY (`post_id`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `shops`
--
ALTER TABLE `shops`
ADD PRIMARY KEY (`shop_id`);
--
-- Indexes for table `sliders`
--
ALTER TABLE `sliders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `socialorganizes`
--
ALTER TABLE `socialorganizes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `staff`
--
ALTER TABLE `staff`
ADD PRIMARY KEY (`staff_id`),
ADD UNIQUE KEY `staff_slug_unique` (`slug`);
--
-- Indexes for table `upzilas`
--
ALTER TABLE `upzilas`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `users_email_unique` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `advertises`
--
ALTER TABLE `advertises`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `ambulances`
--
ALTER TABLE `ambulances`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `appoinments`
--
ALTER TABLE `appoinments`
MODIFY `appoint_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `contacts`
--
ALTER TABLE `contacts`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
MODIFY `department_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `diagnostics`
--
ALTER TABLE `diagnostics`
MODIFY `diag_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `districts`
--
ALTER TABLE `districts`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `divisions`
--
ALTER TABLE `divisions`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `doctors`
--
ALTER TABLE `doctors`
MODIFY `doc_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `galleries`
--
ALTER TABLE `galleries`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hospitals`
--
ALTER TABLE `hospitals`
MODIFY `h_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `postcategories`
--
ALTER TABLE `postcategories`
MODIFY `cat_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
MODIFY `post_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `shops`
--
ALTER TABLE `shops`
MODIFY `shop_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `socialorganizes`
--
ALTER TABLE `socialorganizes`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `staff`
--
ALTER TABLE `staff`
MODIFY `staff_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `upzilas`
--
ALTER TABLE `upzilas`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
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 */;
| 57.685131 | 1,556 | 0.677971 |
165b3771c831696be92c8d46c19a662d03618686 | 1,314 | h | C | Classes/CCCAssetsViewController/CCCAssetsModel/CCCAssetsModel.h | ccchang0227/CCCUIKit | b1cab52ca159e0e40238fe189298cfa188039cd9 | [
"MIT"
] | null | null | null | Classes/CCCAssetsViewController/CCCAssetsModel/CCCAssetsModel.h | ccchang0227/CCCUIKit | b1cab52ca159e0e40238fe189298cfa188039cd9 | [
"MIT"
] | null | null | null | Classes/CCCAssetsViewController/CCCAssetsModel/CCCAssetsModel.h | ccchang0227/CCCUIKit | b1cab52ca159e0e40238fe189298cfa188039cd9 | [
"MIT"
] | null | null | null | //
// CCCAssetsModel.h
//
// Created by realtouchapp on 2016/1/16.
// Copyright © 2016年 CHIEN-HSU WU. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CCCAssetsGroup.h"
#import "CCCAsset.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSUInteger, CCCAssetsFetchType) {
CCCAssetsFetchTypeImage = 1<<0,
CCCAssetsFetchTypeVideo = 1<<1,
CCCAssetsFetchTypeBoth = (CCCAssetsFetchTypeImage|CCCAssetsFetchTypeVideo)
};
@interface CCCAssetsModel : NSObject
+ (ALAssetsLibrary *)sharedAssetsLibrary;
@property (readonly, nonatomic) BOOL isPhotoLibraryAuthorized;
- (void)loadAssetsGroupsWithAssetFetchType:(CCCAssetsFetchType)type
handler:(void(^ _Nullable)(NSArray<CCCAssetsGroup *> *__nullable assetsGroups))handler;
- (void)loadAllAssetsFromGroup:(CCCAssetsGroup *)assetsGroup
withAssetFetchType:(CCCAssetsFetchType)type
handler:(void(^ _Nullable)(NSArray<CCCAsset *> *__nullable allAssets))handler;
#pragma mark -
+ (BOOL)isValidMediaItem:(MPMediaItem *)mpMediaItem;
#pragma mark -
+ (UIImage *)resizeAspectFillImage:(UIImage *)image maxSize:(CGFloat)max;
+ (UIImage *)resizeAspectFitImage:(UIImage *)image maxSize:(CGFloat)max;
+ (UIImage *)createSquareImageFromImage:(UIImage *)image;
@end
NS_ASSUME_NONNULL_END
| 27.957447 | 122 | 0.737443 |
46832d48d5544bf936e1b4b9b0c2ab8330fcfd01 | 171 | css | CSS | css/page-test.css | NardiniA/Design-Test | 7c1ccc248d1d8371a2a8dfcb79155972c9e0f22c | [
"MIT"
] | null | null | null | css/page-test.css | NardiniA/Design-Test | 7c1ccc248d1d8371a2a8dfcb79155972c9e0f22c | [
"MIT"
] | null | null | null | css/page-test.css | NardiniA/Design-Test | 7c1ccc248d1d8371a2a8dfcb79155972c9e0f22c | [
"MIT"
] | null | null | null | a.page-test {
color: #fff !important;
background: rgba(0,0,0,0.625) !important;
border: 1px solid gray !important;
padding: 25px 10px;
z-index: 1800;
} | 24.428571 | 45 | 0.631579 |
a8764ef4457f506f9d020520ad352da6b4ec791b | 9,555 | tab | SQL | mdpi/_journals.tab | rordi/journals | ce4a95e86987ebf0815fa7fdde6da433e31d359a | [
"MIT"
] | null | null | null | mdpi/_journals.tab | rordi/journals | ce4a95e86987ebf0815fa7fdde6da433e31d359a | [
"MIT"
] | null | null | null | mdpi/_journals.tab | rordi/journals | ce4a95e86987ebf0815fa7fdde6da433e31d359a | [
"MIT"
] | null | null | null | Title eISSN
Acoustics 2624-599Xa
Actuators 2076-0825
Administrative Sciences 2076-3387
Adolescents 2673-7051
Aerospace 2226-4310
Agriculture 2077-0472
AgriEngineering 2624-7402
Agronomy 2073-4395
AI 2673-2688
Algorithms 1999-4893
Allergies 2313-5786
Alloys 2674-063X
Analytica 2673-4532
Animals 2076-2615
Antibiotics 2079-6382
Antibodies 2073-4468
Antioxidants 2076-3921
Applied Mechanics 2673-3161
Applied Microbiology 2673-8007
Applied Nano 2673-3501
Applied Sciences 2076-3417
Applied System Innovation 2571-5577
AppliedChem 2673-9623
AppliedMath 2673-9909
Aquaculture Journal 2673-9496
Architecture 2673-8945
Arts 2076-0752
Astronomy 2674-0346
Atmosphere 2073-4433
Atoms 2218-2004
Audiology Research 2039-4349
Automation 2673-4052
Axioms 2075-1680
Batteries 2313-0105
Behavioral Sciences 2076-328X
Beverages 2306-5710
Big Data and Cognitive Computing 2504-2289
BioChem 2673-6411
Bioengineering 2306-5354
Biologics 2673-8449
Biology 2079-7737
Biology and Life Sciences Forum 2673-9976
Biomass 2673-8783
Biomechanics 2673-7078
BioMed 2673-8430
Biomedicines 2227-9059
BioMedInformatics 2673-7426
Biomimetics 2313-7673
Biomolecules 2218-273X
Biophysica 2673-4125
Biosensors 2079-6374
BioTech 2673-6284
Birds 2673-6004
Brain Sciences 2076-3425
Buildings 2075-5309
Businesses 2673-7116
C 2311-5629
Cancers 2072-6694
Cardiogenetics 2035-8148
Catalysts 2073-4344
Cells 2073-4409
Ceramics 2571-6131
Challenges 2078-1547
ChemEngineering 2305-7084
Chemistry 2624-8549
Chemistry Proceedings 2673-4583
Chemosensors 2227-9040
Children 2227-9067
Chips 2674-0729
Chromatography 2227-9075
CivilEng 2673-4109
Clean Technologies 2571-8797
Climate 2225-1154
Clinical and Translational Neuroscience 2514-183X
Clinics and Practice 2039-7283
Clocks & Sleep 2624-5175
Coasts 2673-964X
Coatings 2079-6412
Colloids and Interfaces 2504-5377
Colorants 2079-6447
Compounds 2673-6918
Computation 2079-3197
Computers 2073-431X
Condensed Matter 2410-3896
Conservation 2673-7159
Construction Materials 2673-7108
Corrosion and Materials Degradation 2624-5558
Cosmetics 2079-9284
COVID 2673-8112
Crops 2673-7655
Cryptography 2410-387X
Crystals 2073-4352
Current Issues in Molecular Biology 1467-3045
Current Oncology 1718-7729
Dairy 2624-862X
Data 2306-5729
Dentistry Journal 2304-6767
Dermato 2673-6179
Dermatopathology 2296-3529
Designs 2411-9660
Diabetology 2673-4540
Diagnostics 2075-4418
Dietetics 2674-0311
Digital 2673-6470
Disabilities 2673-7272
Diseases 2079-9721
Diversity 1424-2818
DNA 2673-8856
Drones 2504-446X
Dynamics 2673-8716
Earth 2673-4834
Ecologies 2673-4133
Econometrics 2225-1146
Economies 2227-7099
Education Sciences 2227-7102
Electricity 2673-4826
Electrochem 2673-3293
Electronic Materials 2673-3978
Electronics 2079-9292
Encyclopedia 2673-8392
Endocrines 2673-396X
Energies 1996-1073
Eng 2673-4117
Entropy 1099-4300
Environmental Sciences Proceedings 2673-4931
Environments 2076-3298
Epidemiologia 2673-3986
Epigenomes 2075-4655
European Burn Journal 2673-1991
European Journal of Investigation in Health, Psychology and Education 2254-9625
Fermentation 2311-5637
Fibers 2079-6439
Fire 2571-6255
Fishes 2410-3888
Fluids 2311-5521
Foods 2304-8158
Forecasting 2571-9394
Forensic Sciences 2673-6756
Forests 1999-4907
Foundations 2673-9321
Fractal and Fractional 2504-3110
Fuels 2673-3994
Future Internet 1999-5903
Future Pharmacology 2673-9879
Future Physics 2624-6503
Future Transportation 2673-7590
Galaxies 2075-4434
Games 2073-4336
Gases 2673-5628
Gastroenterology Insights 2036-7422
Gastrointestinal Disorders 2624-5647
Gels 2310-2861
Genealogy 2313-5778
Genes 2073-4425
Geographies 2673-7086
GeoHazards 2624-795X
Geomatics 2673-7418
Geosciences 2076-3263
Geotechnics 2673-7094
Geriatrics 2308-3417
Healthcare 2227-9032
Hearts 2673-3846
Hemato 2673-6357
Heritage 2571-9408
High-Throughput 2571-5135
Histories 2409-9252
Horticulturae 2311-7524
Humanities 2076-0787
Humans 2673-9461
Hydrobiology 2673-9917
Hydrogen 2673-4141
Hydrology 2306-5338
Hygiene 2673-947X
Immuno 2673-5601
Infectious Disease Reports 2036-7449
Informatics 2227-9709
Information 2078-2489
Infrastructures 2412-3811
Inorganics 2304-6740
Insects 2075-4450
Instruments 2410-390X
International Journal of Environmental Research and Public Health 1660-4601
International Journal of Financial Studies 2227-7072
International Journal of Molecular Sciences 1422-0067
International Journal of Neonatal Screening 2409-515X
International Journal of Translational Medicine 2673-8937
International Journal of Turbomachinery, Propulsion and Power 2504-186X
Inventions 2411-5134
IoT 2624-831X
ISPRS International Journal of Geo-Information 2220-9964
J 2571-8800
Journal of Ageing and Longevity 2673-9259
Journal of Cardiovascular Development and Disease 2308-3425
Journal of Clinical Medicine 2077-0383
Journal of Composites Science 2504-477X
Journal of Cybersecurity and Privacy 2624-800X
Journal of Developmental Biology 2221-3759
Journal of Functional Biomaterials 2079-4983
Journal of Functional Morphology and Kinesiology 2411-5142
Journal of Fungi 2309-608X
Journal of Imaging 2313-433X
Journal of Intelligence 2079-3200
Journal of Low Power Electronics and Applications 2079-9268
Journal of Manufacturing and Materials Processing 2504-4494
Journal of Marine Science and Engineering 2077-1312
Journal of Molecular Pathology 2673-5261
Journal of Nanotheranostics 2624-845X
Journal of Nuclear Engineering 2673-4362
Journal of Open Innovation: Technology, Market, and Complexity 2199-8531
Journal of Otorhinolaryngology, Hearing and Balance Medicine 2504-463X
Journal of Personalized Medicine 2075-4426
Journal of Respiration 2673-527X
Journal of Risk and Financial Management 1911-8074
Journal of Sensor and Actuator Networks 2224-2708
Journal of Theoretical and Applied Electronic Commerce Research 7181-1876
Journal of Xenobiotics 2039-4713
Journal of Zoological and Botanical Gardens 2673-5636
Journalism and Media 2673-5172
Kidney and Dialysis 2673-8236
Knowledge 2673-9585
Land 2073-445X
Languages 2226-471X
Laws 2075-471X
Life 2075-1729
Liquids 2673-8015
Literature 2410-9789
Livers 2673-4389
Logistics 2305-6290
Lubricants 2075-4442
Machine Learning and Knowledge Extraction 2504-4990
Machines 2075-1702
Macromol 2673-6209
Magnetism 2673-8724
Magnetochemistry 2312-7481
Marine Drugs 1660-3397
Materials 1996-1944
Mathematical and Computational Applications 2297-8747
Mathematics 2227-7390
Medical Sciences 2076-3271
Medical Sciences Forum 2673-9992
Medicina 1648-9144
Medicines 2305-6320
Membranes 2077-0375
Merits 2673-8104
Metabolites 2218-1989
Metals 2075-4701
Meteorology 2674-0494
Methane 2674-0389
Methods and Protocols 2409-9279
Metrology 2673-8244
Micro 2673-8023
Microarrays 2076-3905
Microbiology Research 2036-7481
Micromachines 2072-666X
Microorganisms 2076-2607
Microplastics 2673-8929
Minerals 2075-163X
Mining 2673-6489
Modelling 2673-3951
Molbank 1422-8599
Molecules 1420-3049
Multimodal Technologies and Interaction 2414-4088
Nanoenergy Advances 2673-706X
Nanomanufacturing 2673-687X
Nanomaterials 2079-4991
Network 2673-8732
Neuroglia 2571-6980
Neurology International 2035-8377
NeuroSci 2673-4087
Nitrogen 2504-3129
Non-Coding RNA 2311-553X
Nursing Reports 2039-4403
Nutraceuticals 1661-3821
Nutrients 2072-6643
Obesities 2673-4168
Oceans 2673-1924
Onco 2673-7523
Optics 2673-3269
Oral 2673-6373
Organics 2673-401X
Organoids 2674-1172
Osteology 2673-4036
Oxygen 2673-9801
Parasitologia 2673-6772
Particles 2571-712X
Pathogens 2076-0817
Pathophysiology 1873-149X
Pediatric Reports 2036-7503
Pharmaceuticals 1424-8247
Pharmaceutics 1999-4923
Pharmacy 2226-4787
Philosophies 2409-9287
Photochem 2673-7256
Photonics 2304-6732
Phycology 2673-9410
Physchem 2673-7167
Physical Sciences Forum 2673-9984
Physics 2624-8174
Physiologia 2673-9488
Plants 2223-7747
Plasma 2571-6182
Pollutants 2673-4672
Polymers 2073-4360
Polysaccharides 2673-4176
Poultry 2674-1164
Proceedings 2504-3900
Processes 2227-9717
Prosthesis 2673-1592
Proteomes 2227-7382
Psych 2624-8611
Psychiatry International 2673-5318
Publications 2304-6775
Quantum Beam Science 2412-382X
Quantum Reports 2624-960X
Quaternary 2571-550X
Radiation 2673-592X
Reactions 2624-781X
Recycling 2313-4321
Religions 2077-1444
Remote Sensing 2072-4292
Reports 2571-841X
Reproductive Medicine 2673-3897
Resources 2079-9276
Rheumato 2674-0621
Risks 2227-9091
Robotics 2218-6581
Ruminants 2673-933X
Safety 2313-576X
Sci 2413-4155
Scientia Pharmaceutica 2218-0532
Seeds 2674-1024
Sensors 1424-8220
Separations 2297-8739
Sexes 2411-5118
Signals 2624-6120
Sinusitis 2673-351X
Sinusitis and Asthma 2624-7003
Smart Cities 2624-6511
Social Sciences 2076-0760
Societies 2075-4698
Soil Systems 2571-8789
Soils 2411-5126
Solar 2673-9941
Solids 2673-6497
Sports 2075-4663
Standards 2305-6703
Stats 2571-905X
Stresses 2673-7140
Surfaces 2571-9637
Surgeries 2673-4095
Sustainability 2071-1050
Sustainable Chemistry 2673-4079
Symmetry 2073-8994
SynBio 2674-0583
Systems 2079-8954
Taxonomy 2673-6500
Technologies 2227-7080
Telecom 2673-4001
Textiles 2673-7248
Thermo 2673-7264
Tomography 2379-139X
Tourism and Hospitality 2673-5768
Toxics 2305-6304
Toxins 2072-6651
Transplantology 2673-3943
Trauma Care 2673-866X
Tropical Medicine and Infectious Disease 2414-6366
Universe 2218-1997
Urban Science 2413-8851
Uro 2673-4397
Vaccines 2076-393X
Vehicles 2624-8921
Venereology 2674-0710
Veterinary Sciences 2306-7381
Vibration 2571-631X
Viruses 1999-4915
Vision 2411-5150
Water 2073-4441
Wildlife Ecology and Management 1234-4321
Wind 2674-032X
Women 2673-4184
World 2673-4060
World Electric Vehicle Journal 2032-6653
Youth 2673-995X
Zoonoses 2673-9968
| 24.689922 | 79 | 0.850968 |
6054f2ea8ad5961fe4f09c28f545991a207794f3 | 1,013 | html | HTML | tests/two-series.html | dygraphs/dygraphs.github.io | c7cd3ee161f36419ffce27e68e5884442f74ad74 | [
"MIT"
] | 1 | 2020-07-01T00:13:43.000Z | 2020-07-01T00:13:43.000Z | tests/two-series.html | bombela/dygraphs | 752bf55c12dae737e10d8dfdbb73e2512be41d28 | [
"MIT"
] | null | null | null | tests/two-series.html | bombela/dygraphs | 752bf55c12dae737e10d8dfdbb73e2512be41d28 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>two series</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
<![endif]-->
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
<script type="text/javascript" src="../dygraph-dev.js"></script>
<script type="text/javascript" src="data.js"></script>
</head>
<body>
<p>No rollup:</p>
<div id="div_g" style="width:600px; height:300px;"></div>
<p>30-Day Rollup:</p>
<div id="div_g30" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
document.getElementById("div_g"),
data, {}
);
g30 = new Dygraph(
document.getElementById("div_g30"),
data, {
rollPeriod: 30
}
);
</script>
</body>
</html>
| 27.378378 | 78 | 0.550839 |
645ce9eb8368ef45d1d5f1eef02a4449c64f98e2 | 15,808 | lua | Lua | dataseries/init.lua | LuaDist-testing/torch-dataframe | d6437ce987e55779090552d3b81c66a156f535e5 | [
"MIT"
] | 77 | 2016-04-01T14:11:26.000Z | 2022-02-02T17:17:27.000Z | dataseries/init.lua | LuaDist-testing/torch-dataframe | d6437ce987e55779090552d3b81c66a156f535e5 | [
"MIT"
] | 26 | 2016-04-01T11:28:52.000Z | 2017-04-12T08:31:23.000Z | dataseries/init.lua | LuaDist-testing/torch-dataframe | d6437ce987e55779090552d3b81c66a156f535e5 | [
"MIT"
] | 11 | 2015-11-19T11:14:19.000Z | 2022-02-17T09:50:46.000Z | -- Main Dataseries file
require 'torch'
local argcheck = require "argcheck"
local doc = require "argcheck.doc"
doc[[
## Dataseries
The Dataseries is an array of data with an additional layer
of missing data info. The class contains two main elements:
* A data container
* A hash with the missing data positions
The missing data are presented as `nan` values. A `nan` has the
behavior that `nan ~= nan` evaluates to `true`. There is a helper
function in the package, `isnan()`, that can be used to identify
`nan` values.
The class has the following metatable functions available:
* `__index__`: You can access any element by `[]`
* `__newindex__`: You can set the value of an element via `[]`
* `__len__`: The `#` returns the length of the series
]]
-- create class object
local Dataseries, parent_class = torch.class('Dataseries', 'tnt.Dataset')
Dataseries.__init = argcheck{
doc = [[
<a name="Dataseries.__init">
### Dataseries.__init(@ARGP)
Creates and initializes an empty Dataseries. Envoked through `local my_series = Dataseries()`.
The type can be:
- boolean
- integer
- double
- string
- torch tensor or tds.Vec
@ARGT
]],
{name="self", type="Dataseries"},
{name="type", type="string", doc="The type of data storage to init.", default="string"},
call=function(self, type)
parent_class.__init(self)
self.data = self.new_storage(0, type)
self.missing = tds.Hash()
self._variable_type = type
end}
Dataseries.__init = argcheck{
doc = [[
### Dataseries.__init(@ARGP)
Creates and initializes a Dataseries class. Envoked through `local my_series = Dataseries()`.
The type can be:
- boolean
- integer
- double
- string
- torch tensor or tds.Vec
@ARGT
]],
overload=Dataseries.__init,
{name="self", type="Dataseries"},
{name="size", type="number", doc="The size of the new series"},
{name="type", type="string", doc="The type of data storage to init.", opt=true},
call=function(self, size, type)
assert(isint(size) and size >= 0, "Size has to be a positive integer")
parent_class.__init(self)
self.data = self.new_storage(size, type)
self.missing = tds.Hash()
self._variable_type = type
end}
Dataseries.__init = argcheck{
doc = [[
### Dataseries.__init(@ARGP)
Creates and initializes a Dataseries with a given Tensor or Vector. Envoked through `local my_series = Dataseries(myData)`.
The data can be a torch tensor or a tds.Vec.
@ARGT
]],
{name="self", type="Dataseries"},
{name="data", type="torch.*Tensor|tds.Vec"},
overload=Dataseries.__init,
call=function(self, data)
local size
local thname = torch.type(data)
if (thname:match("^tds")) then
size = #data
else
size = data:size(1)
end
-- Create the basic datastructures
self:__init(size, thname)
-- Copy values
for i=1,size do
self:set(i, data[i])
end
end}
Dataseries.__init = argcheck{
doc = [[
### Dataseries.__init(@ARGP)
Creates and initializes a Dataseries with a given Df_Array. Envoked through `local my_series = Dataseries(Df_Array(myTable))`.
@ARGT
]],
{name="self", type="Dataseries"},
{name="data", type="Df_Array"},
{name="max_elmnts4type", type="number",
doc="The maximum number of elements to traverse before settling a type",
default=1e3},
overload=Dataseries.__init,
call=function(self, data, max_elmnts4type)
data = data.data
max_elmnts4type = math.min(#data, max_elmnts4type)
local type = nil
for i=1,max_elmnts4type do
type = get_variable_type{value = data[i], prev_type = type}
end
-- Create the basic datastructures
self:__init(#data, type)
-- Copy values
for i=1,#data do
self:set(i, data[i])
end
end}
Dataseries.load = argcheck{
doc=[[
<a name="Dataseries.load">
### Dataseries.load(@ARGP)
Load a Tensor or tds.Vec without checking type or missing values.
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="data", type="torch.*Tensor|tds.Vec", doc="data to load"},
call=function(self, data)
self.data = data
self.missing = tds.Hash()
self._variable_type = torch.type(self.data)
return self
end}
Dataseries.new_storage = argcheck{
doc = [[
<a name="Dataseries.new_storage">
### Dataseries.new_storage(@ARGP)
Internal method to retrieve a storage element for the Dataseries. The type can be:
- boolean
- integer
- double
- string
- torch tensor or tds.Vec
@ARGT
]],
{name="size", type="number", doc="The size of the storage"},
{name="type", type="string", doc="The type of data storage to initialize", default="string"},
call = function(size, type)
if (type == "integer") then
return torch.IntTensor(size)
end
if (type == "long") then
return torch.LongTensor(size)
end
if (type == "double") then
return torch.DoubleTensor(size)
end
if (type == "boolean" or
type == "string" or
type == "tds.Vec" or
type == nil) then
local data = tds.Vec()
if (size > 0) then
data:resize(size)
end
return data
end
if (type:match("torch.*Tensor")) then
return torch.Tensor(size):type(type)
end
assert(false, ("The type '%s' has not yet been implemented"):format(type))
end}
Dataseries.copy = argcheck{
doc=[[
<a name="Dataseries.copy">
### Dataseries.copy(@ARGP)
Creates a new Dataseries and with a copy/clone of the current data
@ARGT
_Return value_: Dataseries
]],
{name="self", type="Dataseries"},
{name="type", type="string", opt=true,
doc="Specify type if you want other type than the current"},
call=function(self, type)
type = type or self:get_variable_type()
local ret = Dataseries.new(#self, type)
for i=1,#self do
ret:set(i, self:get(i))
end
return ret
end}
-- Function that copies another dataset into the current together with all the
-- metadata
Dataseries._replace_data = argcheck{
{name="self", type="Dataseries"},
{name="new_data", type="Dataseries"},
call=function(self, new_data)
assert(self:size() == new_data:size(), "Can't replace when of different size")
for k,val in pairs(new_data) do
self[k] = val
end
return self
end}
Dataseries.size = argcheck{
doc=[[
<a name="Dataseries.size">
### Dataseries.size(@ARGP)
Returns the number of elements in the Dataseries
@ARGT
_Return value_: number
]],
{name="self", type="Dataseries"},
call=function(self)
if (self:is_tensor()) then
return self.data:nElement()
else
return #self.data
end
end}
Dataseries.resize = argcheck{
doc=[[
<a name="Dataseries.resize">
### Dataseries.resize(@ARGP)
Resizes the underlying storage to the new size. If the size is shrunk
then it also clears any missing values in the hash. If the size is increased
the new values are automatically set to missing.
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="new_size", type="number", doc="The new size for the series"},
call=function(self, new_size)
local current_size = self:size()
if (current_size < new_size) then
self.data:resize(new_size)
for i = (current_size + 1), new_size do
self.missing[i] = true
end
elseif(current_size > new_size) then
self.data:resize(new_size)
for i = (new_size + 1),current_size do
self.missing[i] = nil
end
end
return self
end}
Dataseries.assert_is_index = argcheck{
doc=[[
<a name="Dataseries.assert_is_index">
### Dataseries.assert_is_index(@ARGP)
Assertion that checks if index is an integer and within the span of the series
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="index", type="number", doc="The index to check"},
{name = "plus_one", type = "boolean", default = false,
doc= "Count next non-existing index as good. When adding rows, an index of size(1) + 1 is OK"},
call = function(self, index, plus_one)
if (plus_one) then
if (not isint(index) or
index < 0 or
index > self:size() + 1) then
assert(false, ("The index has to be an integer between 1 and %d - you've provided %s"):
format(self:size() + 1, index))
end
else
if (not isint(index) or
index < 0 or
index > self:size()) then
assert(false, ("The index has to be an integer between 1 and %d - you've provided %s"):
format(self:size(), index))
end
end
return true
end}
Dataseries.is_tensor = argcheck{
doc = [[
<a name="Dataseries.is_numerical">
### Dataseries.is_numerical(@ARGP)
Checks if tensor
@ARGT
_Return value_: boolean
]],
{name="self", type="Dataseries"},
call=function(self)
if (torch.type(self.data):match(("torch.*Tensor"))) then
return true
else
return false
end
end}
Dataseries.is_numerical = argcheck{
doc = [[
<a name="Dataseries.is_numerical">
### Dataseries.is_numerical(@ARGP)
Checks if numerical
@ARGT
_Return value_: boolean
]],
{name="self", type="Dataseries"},
call=function(self)
return self:get_variable_type() == "integer" or
self:get_variable_type() == "long" or
self:get_variable_type() == "double"
end}
Dataseries.is_boolean = argcheck{
doc = [[
<a name="Dataseries.is_boolean">
### Dataseries.is_boolean(@ARGP)
Checks if boolean
@ARGT
_Return value_: boolean
]],
{name="self", type="Dataseries"},
call=function(self)
return self:get_variable_type() == "boolean"
end}
Dataseries.is_string = argcheck{
doc = [[
<a name="Dataseries.is_string">
### Dataseries.is_string(@ARGP)
Checks if boolean
@ARGT
_Return value_: boolean
]],
{name="self", type="Dataseries"},
call=function(self)
return self:get_variable_type() == "string"
end}
Dataseries.type = argcheck{
doc=[[
<a name="Dataseries.type">
### Dataseries.type(@ARGP)
Gets the torch.typename of the storage
@ARGT
_Return value_: string
]],
{name="self", type="Dataseries"},
call=function(self)
return torch.typename(self.data)
end}
-- TODO : Change method name to something more explicit to avoid confusion between
-- getting type and changing type (information VS action).
-- name proposition : astype (inspired from pandas)
Dataseries.type = argcheck{
doc=[[
You can also set the type by calling type with a type argument
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="type", type="string", doc="The type of column that you want to convert to"},
overload=Dataseries.type,
call=function(self, type)
local new_data = self:copy(type)
self:_replace_data(new_data)
return self
end}
Dataseries.get_variable_type = argcheck{
doc=[[
<a name="Dataseries.get_variable_type">
### Dataseries.get_variable_type(@ARGP)
Gets the variable type that was used to initiate the Dataseries
@ARGT
_Return value_: string
]],
{name="self", type="Dataseries"},
call=function(self)
return self._variable_type
end}
Dataseries.boolean2tensor = argcheck{
doc = [[
<a name="Dataseries.boolean2tensor">
### Dataseries.boolean2tensor(@ARGP)
Converts a boolean Dataseries into a torch.ByteTensor
@ARGT
_Return value_: self, boolean indicating successful conversion
]],
{name="self", type="Dataseries"},
{name="false_value", type="number",
doc="The numeric value for false"},
{name="true_value", type="number",
doc="The numeric value for true"},
call=function(self, false_value, true_value)
if (not self:is_boolean()) then
warning("The series isn't a boolean")
return self, false
end
-- Create a ByteTensor with the same size as the current dataseries and
-- fill it with false values
local data = torch.ByteTensor(self:size()):fill(false_value)
for i=1,self:size() do
local val = self:get(i)
if (not isnan(val)) then
if (val) then
data[i] = true_value
end
end
end
self.data = data
self._variable_type = "integer"
return self, true
end}
Dataseries.fill = argcheck{
doc = [[
<a name="Dataseries.fill">
### Dataseries.fill(@ARGP)
Fills all values with a default value
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="default_value", type="number|string|boolean",
doc="The default value"},
call=function(self, default_value)
if (self:is_tensor()) then
self.data:fill(default_value)
else
for i=1,self:size() do
self:set(i, default_value)
end
end
return self
end}
Dataseries.fill_na = argcheck{
doc = [[
<a name="Dataseries.fill_na">
### Dataseries.fill_na(@ARGP)
Replace missing values with a specific value
@ARGT
_Return value_: self
]],
{name="self", type="Dataseries"},
{name="default_value", type="number|string|boolean",
doc="The default missing value", default=0},
call=function(self, default_value)
if (self:count_na() == 0) then
return self
end
if (self:is_categorical() and
not self:has_cat_key("__nan__")) then
assert(isint(default_value), "The default value has to be an integer")
assert(not self:has_cat_value(default_value),
"The value " .. default_value .. " is already present in the Dataseries")
self:add_cat_key("__nan__", default_value)
default_value = "__nan__"
end
if (self:is_tensor()) then
-- Get the mask differentiating values/missing_values
local mask = self:get_data_mask{missing = true}
-- Use this mask to only replace missing values
self.data:maskedFill(mask, default_value)
-- Reset missing values list
self.missing = tds.Hash()
else
-- Browse row by row
for pos,_ in pairs(self.missing) do
self:set(pos, default_value)
end
-- Here no need to reset missing values list, it is handled in `set()` method
end
return self
end}
Dataseries.tostring = argcheck{
doc = [[
<a name="Dataseries.tostring">
### Dataseries.tostring(@ARGP)
Converts the series into a string output
@ARGT
_Return value_: string
]],
{name="self", type="Dataseries"},
{name="max_elmnts", type="number", doc="Number of elements to convert",
default=20},
call=function(self, max_elmnts)
max_elmnts = math.min(self:size(), max_elmnts)
ret = ("Type: %s (%s)\nLength: %d\n-----"):
format(self:get_variable_type(), self:type(), self:size())
for i=1,max_elmnts do
ret = ret .. "\n" .. tostring(self:get(i))
end
if (max_elmnts < self:size()) then
ret = ret .. "\n..."
end
ret = ret .. "\n-----\n"
return ret
end}
-- TODO : use same logic as bulk_load_csv to extract a subset
Dataseries.sub = argcheck{
doc = [[
<a name="Dataseries.sub">
### Dataseries.sub(@ARGP)
Subsets the Dataseries to the element span
@ARGT
_Return value_: Dataseries
]],
{name="self", type="Dataseries"},
{name="start", type="number", default=1},
{name="stop", type="number", opt=true},
call=function(self, start, stop)
stop = stop or self:size()
assert(start <= stop,
("Start larger than stop, i.e. %d > %d"):format(start, stop))
self:assert_is_index(start)
self:assert_is_index(stop)
local ret = Dataseries.new(stop - start + 1, self:get_variable_type())
for idx = start,stop do
ret:set(idx + 1 - start, self:get(idx))
end
return ret
end}
Dataseries.eq = argcheck{
doc = [[
<a name="Dataseries.eq">
### Dataseries.eq(@ARGP)
Compares to Dataseries or table in order to see if they are identical
@ARGT
_Return value_: string
]],
{name="self", type="Dataseries"},
{name="other", type="Dataseries|table"},
call=function(self, other)
if (self:size() ~= #other) then
return false
end
for i=1,self:size() do
if (self:get(i) ~= other[i]) then
return false
end
end
return true
end}
Dataseries.get_data_mask = argcheck{
doc=[[
<a name="Dataseries.get_data_mask">
### Dataseries.get_data_mask(@ARGP)
Retrieves a mask that can be used to select missing or active values
@ARGT
_Return value_: torch.ByteTensor
]],
{name="self", type="Dataseries"},
{name="missing", type="boolean", default=false,
doc="Set to true if you want only the missing values"},
call=function(self, missing)
local fill_value = 1
local missing_value = 0
if (missing) then
fill_value = 0
missing_value = 1
end
-- Create a ByteTensor with the same size as the current dataseries and
-- fill it with defined filling value
local mask = torch.ByteTensor():resize(self:size()):fill(fill_value)
for i,_ in pairs(self.missing) do
mask[i] = missing_value
end
return mask
end}
return Dataseries
| 22.016713 | 126 | 0.700025 |
0b4dc3067343c33e32c44d539a787edba0c40515 | 2,197 | py | Python | torchvision/prototype/datasets/_builtin/country211.py | SariaCxs/vision | 1db8795733b91cd6dd62a0baa7ecbae6790542bc | [
"BSD-3-Clause"
] | 1 | 2022-03-31T02:37:35.000Z | 2022-03-31T02:37:35.000Z | torchvision/prototype/datasets/_builtin/country211.py | SariaCxs/vision | 1db8795733b91cd6dd62a0baa7ecbae6790542bc | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/datasets/_builtin/country211.py | SariaCxs/vision | 1db8795733b91cd6dd62a0baa7ecbae6790542bc | [
"BSD-3-Clause"
] | null | null | null | import pathlib
from typing import Any, Dict, List, Tuple
from torchdata.datapipes.iter import IterDataPipe, Mapper, Filter
from torchvision.prototype.datasets.utils import Dataset, DatasetConfig, DatasetInfo, HttpResource, OnlineResource
from torchvision.prototype.datasets.utils._internal import path_comparator, hint_sharding, hint_shuffling
from torchvision.prototype.features import EncodedImage, Label
class Country211(Dataset):
def _make_info(self) -> DatasetInfo:
return DatasetInfo(
"country211",
homepage="https://github.com/openai/CLIP/blob/main/data/country211.md",
valid_options=dict(split=("train", "val", "test")),
)
def resources(self, config: DatasetConfig) -> List[OnlineResource]:
return [
HttpResource(
"https://openaipublic.azureedge.net/clip/data/country211.tgz",
sha256="c011343cdc1296a8c31ff1d7129cf0b5e5b8605462cffd24f89266d6e6f4da3c",
)
]
_SPLIT_NAME_MAPPER = {
"train": "train",
"val": "valid",
"test": "test",
}
def _prepare_sample(self, data: Tuple[str, Any]) -> Dict[str, Any]:
path, buffer = data
category = pathlib.Path(path).parent.name
return dict(
label=Label.from_category(category, categories=self.categories),
path=path,
image=EncodedImage.from_file(buffer),
)
def _filter_split(self, data: Tuple[str, Any], *, split: str) -> bool:
return pathlib.Path(data[0]).parent.parent.name == split
def _make_datapipe(
self, resource_dps: List[IterDataPipe], *, config: DatasetConfig
) -> IterDataPipe[Dict[str, Any]]:
dp = resource_dps[0]
dp = Filter(dp, path_comparator("parent.parent.name", self._SPLIT_NAME_MAPPER[config.split]))
dp = hint_shuffling(dp)
dp = hint_sharding(dp)
return Mapper(dp, self._prepare_sample)
def _generate_categories(self, root: pathlib.Path) -> List[str]:
resources = self.resources(self.default_config)
dp = resources[0].load(root)
return sorted({pathlib.Path(path).parent.name for path, _ in dp})
| 38.54386 | 114 | 0.65817 |
7ab38b9c934e0c8138b2c54e7fc5fa13dfb45949 | 2,384 | rs | Rust | src/days/day12.rs | fxwiegand/advent-of-code-2021 | c164630bb2567585ff3e8574892eb67e4d777243 | [
"MIT"
] | null | null | null | src/days/day12.rs | fxwiegand/advent-of-code-2021 | c164630bb2567585ff3e8574892eb67e4d777243 | [
"MIT"
] | null | null | null | src/days/day12.rs | fxwiegand/advent-of-code-2021 | c164630bb2567585ff3e8574892eb67e4d777243 | [
"MIT"
] | 1 | 2021-12-01T17:47:04.000Z | 2021-12-01T17:47:04.000Z | use std::collections::HashMap;
pub(crate) fn solve_day12() -> u32 {
let input = include_str!("../puzzles/day12.txt");
let mut map = HashMap::new();
for line in input.lines() {
let (cave, cave2) = line.split_once('-').unwrap();
let entry = map.entry(cave.to_owned()).or_insert_with(Vec::new);
entry.push(cave2.to_string());
let entry2 = map.entry(cave2.to_owned()).or_insert_with(Vec::new);
entry2.push(cave.to_string());
}
get_paths("start".to_string(), &map, vec!["start".to_string()])
}
fn get_paths(cave: String, map: &HashMap<String, Vec<String>>, visited: Vec<String>) -> u32 {
if cave == "end" {
return 1;
}
let mut sum = 0;
for neighbour in map.get(&cave).unwrap() {
if !(visited.contains(neighbour) && &neighbour.to_lowercase() == neighbour) {
let mut seen = visited.clone();
seen.push(neighbour.to_string());
sum += get_paths(neighbour.to_string(), &map.clone(), seen)
}
}
sum
}
fn get_paths2(
cave: String,
map: &HashMap<String, Vec<String>>,
visited: Vec<String>,
twice: bool,
) -> u32 {
if cave == "end" {
return 1;
}
let mut sum = 0;
for neighbour in map.get(&cave).unwrap() {
if neighbour != "start" {
if !visited.contains(neighbour) || &neighbour.to_lowercase() != neighbour {
let mut seen = visited.clone();
seen.push(neighbour.to_string());
sum += get_paths2(neighbour.to_string(), &map.clone(), seen.clone(), twice);
} else if !twice {
let mut seen = visited.clone();
seen.push(neighbour.to_string());
sum += get_paths2(neighbour.to_string(), &map.clone(), seen.clone(), true);
}
}
}
sum
}
pub(crate) fn solve_day12_part2() -> u32 {
let input = include_str!("../puzzles/day12.txt");
let mut map = HashMap::new();
for line in input.lines() {
let (cave, cave2) = line.split_once('-').unwrap();
let entry = map.entry(cave.to_owned()).or_insert_with(Vec::new);
entry.push(cave2.to_string());
let entry2 = map.entry(cave2.to_owned()).or_insert_with(Vec::new);
entry2.push(cave.to_string());
}
get_paths2("start".to_string(), &map, vec!["start".to_string()], false)
}
| 34.550725 | 93 | 0.567953 |
6848f642f7cb65f44eea54eb7f0c18294ba825bc | 7,653 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1258.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1258.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1258.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x6dd9, %r9
nop
nop
nop
nop
sub %rdx, %rdx
movups (%r9), %xmm1
vpextrq $0, %xmm1, %rbx
add %rbx, %rbx
lea addresses_WT_ht+0x1d09, %r8
nop
nop
nop
sub %r12, %r12
mov (%r8), %edx
nop
nop
nop
and $57191, %r9
lea addresses_D_ht+0x165d9, %rsi
lea addresses_A_ht+0x1762d, %rdi
cmp %r8, %r8
mov $125, %rcx
rep movsq
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_WC_ht+0x110d9, %rdi
sub %r9, %r9
movups (%rdi), %xmm0
vpextrq $0, %xmm0, %rdx
nop
nop
nop
and %rsi, %rsi
lea addresses_UC_ht+0x9dd9, %rsi
lea addresses_D_ht+0x1e5d9, %rdi
and %rbx, %rbx
mov $50, %rcx
rep movsq
nop
nop
nop
add %rdx, %rdx
lea addresses_normal_ht+0x1e459, %r8
nop
xor $4700, %r12
mov (%r8), %rsi
nop
xor $56718, %r12
lea addresses_D_ht+0x16dd9, %rdx
nop
xor $1867, %rbx
and $0xffffffffffffffc0, %rdx
vmovntdqa (%rdx), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r12
xor $14909, %r12
lea addresses_normal_ht+0xb3d9, %rcx
clflush (%rcx)
nop
nop
sub $26477, %r9
movb (%rcx), %dl
nop
nop
nop
cmp $34629, %r9
lea addresses_A_ht+0x16f81, %rsi
and %rcx, %rcx
mov $0x6162636465666768, %r9
movq %r9, %xmm2
movups %xmm2, (%rsi)
nop
nop
add %rdi, %rdi
lea addresses_D_ht+0x10759, %r9
nop
sub $60832, %rdx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
movups %xmm6, (%r9)
nop
nop
add %r9, %r9
lea addresses_A_ht+0x4999, %r9
nop
nop
cmp %rdi, %rdi
vmovups (%r9), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rdx
nop
cmp $22627, %rbx
lea addresses_A_ht+0x1c589, %rdi
nop
and $6219, %rcx
mov (%rdi), %r9w
nop
nop
dec %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r14
push %r15
push %r9
// Store
lea addresses_UC+0x4ad9, %r9
nop
nop
nop
nop
cmp $9474, %r10
movl $0x51525354, (%r9)
nop
nop
nop
nop
nop
xor %r9, %r9
// Store
lea addresses_A+0x6d9, %r14
nop
xor %r13, %r13
movb $0x51, (%r14)
nop
nop
nop
and %r13, %r13
// Store
lea addresses_WT+0x1c255, %r15
nop
nop
nop
nop
sub %r10, %r10
movb $0x51, (%r15)
nop
nop
nop
nop
and %r10, %r10
// Faulty Load
mov $0x5792aa0000000dd9, %r12
nop
nop
nop
nop
add %r9, %r9
movb (%r12), %r10b
lea oracles, %r15
and $0xff, %r10
shlq $12, %r10
mov (%r15,%r10,1), %r10
pop %r9
pop %r15
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 34.945205 | 2,999 | 0.650856 |
9c2bef9eec101c417b13e58d3bcb3bee40a4d3ba | 1,371 | js | JavaScript | src/js/04-fav.js | Adalab/modulo-2-evaluacion-final-LuciaRoNova3005 | b22f782a732c56189ab231e2d327fbc0fb661ecf | [
"MIT"
] | null | null | null | src/js/04-fav.js | Adalab/modulo-2-evaluacion-final-LuciaRoNova3005 | b22f782a732c56189ab231e2d327fbc0fb661ecf | [
"MIT"
] | null | null | null | src/js/04-fav.js | Adalab/modulo-2-evaluacion-final-LuciaRoNova3005 | b22f782a732c56189ab231e2d327fbc0fb661ecf | [
"MIT"
] | null | null | null | //Si el array que guarda la informacion del local tiene contenido me ejecutas Recupero los datos y lo pinto
//Funcion que escucha click en las peliculas y en las peliculas de favoritas con la js-shows//
function addListenShow() {
const cardShows = document.querySelectorAll(".js-shows");
for (const card of cardShows) {
card.addEventListener("click", handleClickFav);
}
}
function handleClickFav(event) {
// Identificar la li pulsada
const selectCardFav = event.currentTarget;
// Obtener la información asociada a la serie
const filmId = parseInt(selectCardFav.dataset.id);
//Buscamos si elemento clicado esta en nuestro array de favoritos
const idExist = arrayFavorite.find(
(favoritedata) => favoritedata.show.id === filmId
);
if (idExist === undefined) {
// El ID del array en el que se ha hecho click no está en el array de favoritos lo añade
const Objseriedata = arrayShows.find(
(seriedata) => seriedata.show.id === filmId
);
arrayFavorite.push(Objseriedata);
// El ID del array en el que se ha hecho click esta en el array de favoritos hace un filtro para eliminarlo
} else {
arrayFavorite = arrayFavorite.filter((fav) => fav.show.id !== filmId);
}
// Pinta las tarjetas en favoritas y las guarda en local
renderFavorites();
renderShows();
savedFav();
}
| 38.083333 | 112 | 0.699489 |
e9b11384adefc1e7de00cb80735f661e7788d618 | 369 | rb | Ruby | db/migrations/20180515221734_create_primary_key_for_spaces_developers.rb | stephanme/cloud_controller_ng | eec758f42ad517711189b578772b9cbe5b8e160a | [
"Apache-2.0"
] | 152 | 2015-01-03T07:30:29.000Z | 2022-03-17T22:55:19.000Z | db/migrations/20180515221734_create_primary_key_for_spaces_developers.rb | stephanme/cloud_controller_ng | eec758f42ad517711189b578772b9cbe5b8e160a | [
"Apache-2.0"
] | 2,177 | 2015-01-07T05:34:11.000Z | 2022-03-31T12:42:29.000Z | db/migrations/20180515221734_create_primary_key_for_spaces_developers.rb | isabella232/cloud_controller_ng | 89eb8e344b34c8d601db4d2ef1161817c90160f2 | [
"Apache-2.0"
] | 298 | 2015-01-04T11:57:39.000Z | 2022-03-25T15:11:44.000Z | require File.expand_path('../../helpers/change_primary_key', __FILE__)
Sequel.migration do
up do
add_primary_key_to_table(:spaces_developers, :spaces_developers_pk)
end
down do
remove_primary_key_from_table(:spaces_developers,
:spaces_developers_pkey,
:spaces_developers_pk)
end
end
| 26.357143 | 71 | 0.650407 |
654b5be42b94507090bb99be14ad14d6bad404c8 | 427 | py | Python | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 26 | 2015-04-07T12:18:26.000Z | 2021-07-23T18:05:52.000Z | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 55 | 2016-10-25T08:13:50.000Z | 2022-03-04T12:53:24.000Z | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 16 | 2015-10-13T10:11:59.000Z | 2021-11-11T12:30:32.000Z | from rest_framework import status
from rest_framework.exceptions import APIException
class PreconditionFailed(APIException):
status_code = status.HTTP_412_PRECONDITION_FAILED
default_detail = "An HTTP precondition failed"
default_code = "precondition_failed"
class BadRequest(APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = "Validation failed"
default_code = "bad_request"
| 28.466667 | 53 | 0.800937 |
59198a69b3ac96b641ac4fa5756e83943847238c | 2,715 | kt | Kotlin | Android/app/src/main/java/com/lunesu/pengchauferry/PengChauToCentralFetcher.kt | lionello/PengChauFerry | 830fdee3ce171e8316d3dd9ef8167690f247f6b5 | [
"MIT"
] | 2 | 2020-03-21T05:35:57.000Z | 2020-03-21T15:12:30.000Z | Android/app/src/main/java/com/lunesu/pengchauferry/PengChauToCentralFetcher.kt | lionello/PengChauFerry | 830fdee3ce171e8316d3dd9ef8167690f247f6b5 | [
"MIT"
] | null | null | null | Android/app/src/main/java/com/lunesu/pengchauferry/PengChauToCentralFetcher.kt | lionello/PengChauFerry | 830fdee3ce171e8316d3dd9ef8167690f247f6b5 | [
"MIT"
] | null | null | null | package com.lunesu.pengchauferry
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.joda.time.Duration
import org.joda.time.LocalTime
object PengChauToCentralFetcher {
private const val url = "http://hkkf.com.hk/index.php?op=timetable&page=pengchau&style=en"
// TODO: fetch prices from web page as well
private const val fareSlowWD = "16.6"
private const val fareSlowPH = "23.9"
private const val fareFastWD = "31.0"
private const val fareFastPH = "45.6"
private val durationFast = Duration.standardMinutes(27)
private val durationSlow = Duration.standardMinutes(40)
suspend fun fetch(): List<Ferry> = withContext(Dispatchers.IO) {
val document = Utils.retryJsoupGet(url)
val ferryTimes = mutableListOf<Ferry>()
document
.select("div table tr td table tr td div table tr td table tbody tr")
.forEachIndexed { i, tr ->
val modifiers = mutableListOf<String>()
val div = tr.child(0).child(0)
// Handle initial <br> without whitespace
if ("br" == div.childNode(0).nodeName()) {
modifiers.add("")
}
modifiers.addAll(div.textNodes().map { text -> text.text() })
val times = tr.child(1).textNodes().map { text -> text.text().trim(Utils::isInvalidChar) }
val from = if ((i and 2) == 0) FerryPier.Central else FerryPier.PengChau
val to = if (from == FerryPier.Central) FerryPier.PengChau else FerryPier.Central
// FIXME: when the time is after MIDNIGHT (00:30) we need to fix-up the days as well
val monToSat = (i and 4) == 0
val days = if (monToSat) FerryDay.MondayToSaturday else FerryDay.SundayAndHolidays
val fareSlow = if (monToSat) fareSlowWD else fareSlowPH
val fareFast = if (monToSat) fareFastWD else fareFastPH
modifiers.zip(times).forEach { pair ->
val slow = pair.first.contains("*")
val hlc = pair.first.contains("#")
ferryTimes.add(
Ferry(
LocalTime.parse(pair.second),
from,
if (hlc) FerryPier.HeiLingChau else to,
if (slow) durationSlow else durationFast,
days,
if (slow) fareSlow else fareFast,
if (hlc) to else null
)
)
}
} // .flatten()
ferryTimes
}
}
| 42.421875 | 106 | 0.55175 |
721672734f962968d39c3dc223146aa32e355527 | 687 | lua | Lua | hack/scripts/on-new-fortress.lua | flber/df | 64191b2ba063f5bc11f566d5521b2dbc87c8e54d | [
"Zlib"
] | null | null | null | hack/scripts/on-new-fortress.lua | flber/df | 64191b2ba063f5bc11f566d5521b2dbc87c8e54d | [
"Zlib"
] | null | null | null | hack/scripts/on-new-fortress.lua | flber/df | 64191b2ba063f5bc11f566d5521b2dbc87c8e54d | [
"Zlib"
] | null | null | null | -- runs dfhack commands only in a newborn fortress
local HELP = [====[
on-new-fortress
===============
Runs commands like `multicmd`, but only in a newborn fortress.
Use this in ``onMapLoad.init`` with f.e. `ban-cooking`::
on-new-fortress ban-cooking tallow; ban-cooking honey; ban-cooking oil; ban-cooking seeds; ban-cooking brew; ban-cooking fruit; ban-cooking mill; ban-cooking thread; ban-cooking milk;
on-new-fortress 3dveins
]====]
if not (...) then
print(HELP)
return
end
if not (dfhack.world.isFortressMode() and df.global.ui.fortress_age == 0) then return end
for cmd in table.concat({...}, ' '):gmatch("%s*([^;]+);?%s*") do
dfhack.run_command(cmd)
end
| 25.444444 | 185 | 0.672489 |
85caca9a56b40286c1a4ed9519defec2322ac0c4 | 4,577 | c | C | compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | // Test whether mmap'ing profile counters onto an open file is feasible. As
// this involves some platform-specific logic, this test is designed to be a
// minimum viable proof-of-concept: it may be useful when porting the mmap()
// mode to a new platform, but is not in and of itself a test of the profiling
// runtime.
// REQUIRES: darwin
// Align counters and data to the maximum expected page size (16K).
// RUN: %clang -g -o %t %s \
// RUN: -Wl,-sectalign,__DATA,__pcnts,0x4000 \
// RUN: -Wl,-sectalign,__DATA,__pdata,0x4000
// Create a 'profile' using mmap() and validate it.
// RUN: %run %t create %t.tmpfile
// RUN: %run %t validate %t.tmpfile
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
__attribute__((section("__DATA,__pcnts"))) int counters[] = {0xbad};
extern int cnts_start __asm("section$start$__DATA$__pcnts");
const size_t cnts_len = 0x4000;
__attribute__((section("__DATA,__pdata"))) int data[] = {1, 2, 3};
extern int data_start __asm("section$start$__DATA$__pdata");
const size_t data_len = sizeof(int) * 3;
int create_tmpfile(char *path) {
// Create a temp file.
int fd = open(path, O_RDWR | O_TRUNC | O_CREAT, 0666);
if (fd == -1) {
perror("open");
return EXIT_FAILURE;
}
// Grow the file to hold data and counters.
if (0 != ftruncate(fd, cnts_len + data_len)) {
perror("ftruncate");
return EXIT_FAILURE;
}
// Write the data first (at offset 0x4000, after the counters).
if (data_len != pwrite(fd, &data, data_len, 0x4000)) {
perror("write");
return EXIT_FAILURE;
}
// Map the counters into the file, before the data.
//
// Requirements (on Darwin):
// - &cnts_start must be page-aligned.
// - The length and offset-into-fd must be page-aligned.
int *counter_map = (int *)mmap(&cnts_start, 0x4000, PROT_READ | PROT_WRITE,
MAP_FIXED | MAP_SHARED, fd, 0);
if (counter_map != &cnts_start) {
perror("mmap");
return EXIT_FAILURE;
}
// Update counters 1..9. These updates should be visible in the file.
// Expect counter 0 (0xbad), which is not updated, to be zero in the file.
for (int i = 1; i < 10; ++i)
counter_map[i] = i;
// Intentionally do not msync(), munmap(), or close().
return EXIT_SUCCESS;
}
int validate_tmpfile(char *path) {
int fd = open(path, O_RDONLY);
if (fd == -1) {
perror("open");
return EXIT_FAILURE;
}
// Verify that the file length is: sizeof(counters) + sizeof(data).
const size_t num_bytes = cnts_len + data_len;
int buf[num_bytes];
if (num_bytes != read(fd, &buf, num_bytes)) {
perror("read");
return EXIT_FAILURE;
}
// Verify the values of counters 1..9 (i.e. that the mmap() worked).
for (int i = 0; i < 10; ++i) {
if (buf[i] != i) {
fprintf(stderr,
"validate_tmpfile: Expected '%d' at pos=%d, but got '%d' instead.\n",
i, i, buf[i]);
return EXIT_FAILURE;
}
}
// Verify that the rest of the counters (after counter 9) are 0.
const int num_cnts = 0x4000 / sizeof(int);
for (int i = 10; i < num_cnts; ++i) {
if (buf[i] != 0) {
fprintf(stderr,
"validate_tmpfile: Expected '%d' at pos=%d, but got '%d' instead.\n",
0, i, buf[i]);
return EXIT_FAILURE;
}
}
// Verify that the data written after the counters is equal to the "data[]"
// array (i.e. {1, 2, 3}).
for (int i = num_cnts; i < num_cnts + 3; ++i) {
if (buf[i] != (i - num_cnts + 1)) {
fprintf(stderr,
"validate_tmpfile: Expected '%d' at pos=%d, but got '%d' instead.\n",
i - num_cnts + 1, i, buf[i]);
return EXIT_FAILURE;
}
}
// Intentionally do not close().
return EXIT_SUCCESS;
}
int main(int argc, char **argv) {
intptr_t cnts_start_int = (intptr_t)&cnts_start;
intptr_t data_start_int = (intptr_t)&data_start;
int pagesz = getpagesize();
if (cnts_start_int % pagesz != 0) {
fprintf(stderr, "__pcnts is not page-aligned: 0x%lx.\n", cnts_start_int);
return EXIT_FAILURE;
}
if (data_start_int % pagesz != 0) {
fprintf(stderr, "__pdata is not page-aligned: 0x%lx.\n", data_start_int);
return EXIT_FAILURE;
}
if (cnts_start_int + 0x4000 != data_start_int) {
fprintf(stderr, "__pdata not ordered after __pcnts.\n");
return EXIT_FAILURE;
}
char *action = argv[1];
char *path = argv[2];
if (0 == strcmp(action, "create"))
return create_tmpfile(path);
else if (0 == strcmp(action, "validate"))
return validate_tmpfile(path);
else
return EXIT_FAILURE;
}
| 30.111842 | 79 | 0.638191 |
d22443bc0e5cb301b03a9ff6caf413ce1d2eb0dd | 1,191 | lua | Lua | addons/serverguard/lua/plugins/restrictions/shared.lua | lechu2375/GM-DayZ | 35beb8cc80bc1673f45be8385b56c654fb066e8d | [
"MIT"
] | 4 | 2021-12-01T15:57:30.000Z | 2022-01-28T11:10:24.000Z | addons/serverguard/lua/plugins/restrictions/shared.lua | lechu2375/GM-DayZ | 35beb8cc80bc1673f45be8385b56c654fb066e8d | [
"MIT"
] | null | null | null | addons/serverguard/lua/plugins/restrictions/shared.lua | lechu2375/GM-DayZ | 35beb8cc80bc1673f45be8385b56c654fb066e8d | [
"MIT"
] | 3 | 2021-08-20T15:19:34.000Z | 2021-12-07T00:34:33.000Z | --[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author ([email protected]).
]]
local plugin = plugin
plugin.name = "Restrictions"
plugin.author = "`impulse"
plugin.version = "1.2"
plugin.description = "Provides restrictions for each player, like how many props you can spawn or if you're allowed to noclip."
plugin.permissions = {"Manage Restrictions"}
plugin:Hook("CanTool", "restrictions.CanTool", function(pPlayer, _, sRequestedTool)
local sUniqueID = serverguard.player:GetRank(pPlayer)
local tRestrictionData = serverguard.ranks:GetData(sUniqueID, "Restrictions", {})
local tToolList = tRestrictionData.Tools or {}
if next(tToolList) == nil and sUniqueID ~= "founder" then return false end
-- Fast AF check if the tool is allowed due to this great
-- design of the restrections table
for sTool, bIsAllowed in pairs(tToolList) do
if sTool == sRequestedTool and not bIsAllowed then
if SERVER then
serverguard.Notify(pPlayer, SERVERGUARD.NOTIFY.RED, "You are not permitted to use this tool!")
end
return false
end
end
end) | 38.419355 | 127 | 0.70529 |
f12d87d7fe8d19a29a79ff571e2d9eebc2a4b68f | 175 | rb | Ruby | config/schedule.rb | yr0/discursus | 17cf9d35935c5124fad7af800f9bc843f7d57243 | [
"MIT"
] | 2 | 2017-10-25T11:15:16.000Z | 2017-12-12T15:06:16.000Z | config/schedule.rb | yr0/discursus | 17cf9d35935c5124fad7af800f9bc843f7d57243 | [
"MIT"
] | 8 | 2021-05-20T18:39:57.000Z | 2022-03-30T22:27:37.000Z | config/schedule.rb | yr0/discursus | 17cf9d35935c5124fad7af800f9bc843f7d57243 | [
"MIT"
] | null | null | null | # frozen_string_literal: true
set :output, 'log/whenever.log'
every 30.minutes do
rake 'sunspot:reindex'
end
every 1.day, at: '8am' do
rake 'count_hlyna_downloads'
end
| 14.583333 | 31 | 0.737143 |
74de84ae7c38538e3d717e749723965fcbb772f3 | 3,230 | js | JavaScript | src/validation/countryValidation.js | Ibrahimng/code-jammers-backend | 79a0004108ccb516bac0c2907c7af2094ed4731e | [
"MIT"
] | 13 | 2020-10-30T06:57:51.000Z | 2021-07-16T11:59:26.000Z | src/validation/countryValidation.js | Ibrahimng/code-jammers-backend | 79a0004108ccb516bac0c2907c7af2094ed4731e | [
"MIT"
] | 24 | 2020-08-31T18:58:56.000Z | 2020-11-14T07:53:27.000Z | src/validation/countryValidation.js | Ibrahimng/code-jammers-backend | 79a0004108ccb516bac0c2907c7af2094ed4731e | [
"MIT"
] | 7 | 2020-08-31T10:15:42.000Z | 2021-03-02T06:48:59.000Z | import Joi from "joi";
const validation = country => {
const schema = Joi.object({
nameOfCountry: Joi.string().required().valid("Nigeria",
"Ethiopia",
"Egypt",
"Democratic Republic of the Congo",
"Tanzania",
"South Africa",
"Kenya",
"Uganda",
"Algeria",
"Sudan",
"Morocco",
"Mozambique",
"Ghana",
"Angola",
"Somalia",
"Ivory Coast",
"Madagascar",
"Cameroon",
"Burkina Faso",
"Niger",
"Malawi",
"Zambia",
"Mali",
"Senegal",
"Zimbabwe",
"Chad",
"Tunisia",
"Guinea",
"Rwanda",
"Benin",
"Burundi",
"South Sudan",
"Eritrea",
"Sierra Leone",
"Togo",
"Libya",
"Central African Republic",
"Mauritania",
"Republic of the Congo",
"Liberia",
"Namibia",
"Botswana",
"Lesotho",
"Gambia",
"Gabon",
"Guinea-Bissau",
"Mauritius",
"Equatorial Guinea",
"Eswatini",
"Djibouti",
"Réunion (France)",
"Comoros",
"Cape Verde",
"Mayotte (France)",
"São Tomé and Príncipe",
"Seychelles")
.messages({
"any.required": "Sorry, country name is required.",
"any.only": "Country must be an African country.",
"string.empty": "Country cannot be an empty field.",
"string.base": "Country name must contain only alphabetical characters."
}),
gallery: Joi.string().required()
.empty()
.messages({
"any.required": "An image is required.",
"string.empty": "gallery cannot be an empty field.",
"string.base": "Please provide a valid link."
}),
capital: Joi.string().required()
.empty()
.messages({
"any.required": "Name of capital is required.",
"string.empty": "Capital cannot be an empty field.",
"string.base": "Capital must contain only alphabetical characters."
}),
population: Joi.number().integer().required()
.empty()
.messages({
"any.required": "Population size is required.",
"number.empty": "Population cannot be an empty field."
}),
officialLanguage: Joi.string().required()
.empty()
.messages({
"any.required": "An official language is required.",
"string.empty": "Official language cannot be an empty field.",
"string.base": "Language must contain only alphabetical characters."
}),
region: Joi.string().required()
.empty()
.messages({
"any.required": "Sorry, region is required.",
"string.empty": "Region cannot be an empty field.",
"string.base": "Region must contain only alphabetical characters."
}),
currency: Joi.string().required()
.empty()
.messages({
"any.required": "Sorry, currency is required.",
"string.empty": "Currency cannot be an empty field.",
"string.base": "Currency must contain only alphabetical characters."
}),
}).messages({
"object.unknown": "You have used an invalid key."
}).options({ abortEarly: false });
return schema.validate(country);
};
export { validation };
| 27.844828 | 80 | 0.556347 |
5eff0b1eafd347492970be32fc7ecd7788da788c | 61,029 | asm | Assembly | Disassembly/Md5_6_NoTempVar.asm | bretcope/blog-md5 | e043cf92ad5495274530d270e845b59a5f372b0b | [
"MIT"
] | null | null | null | Disassembly/Md5_6_NoTempVar.asm | bretcope/blog-md5 | e043cf92ad5495274530d270e845b59a5f372b0b | [
"MIT"
] | null | null | null | Disassembly/Md5_6_NoTempVar.asm | bretcope/blog-md5 | e043cf92ad5495274530d270e845b59a5f372b0b | [
"MIT"
] | null | null | null | Md5DotNet.Md5_6_NoTempVar.GetDigest(Byte*, Int32, Md5DotNet.Md5Digest*)
Begin 00007ffe8d368960, size c1a
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 19:
>>> 00007ffe`8d368960 4157 push r15
00007ffe`8d368962 4156 push r14
00007ffe`8d368964 4155 push r13
00007ffe`8d368966 4154 push r12
00007ffe`8d368968 57 push rdi
00007ffe`8d368969 56 push rsi
00007ffe`8d36896a 55 push rbp
00007ffe`8d36896b 53 push rbx
00007ffe`8d36896c 4883ec78 sub rsp,78h
00007ffe`8d368970 488bf1 mov rsi,rcx
00007ffe`8d368973 488d7c2438 lea rdi,[rsp+38h]
00007ffe`8d368978 b910000000 mov ecx,10h
00007ffe`8d36897d 33c0 xor eax,eax
00007ffe`8d36897f f3ab rep stos dword ptr [rdi]
00007ffe`8d368981 488bce mov rcx,rsi
00007ffe`8d368984 488bd9 mov rbx,rcx
00007ffe`8d368987 8bfa mov edi,edx
00007ffe`8d368989 498bf0 mov rsi,r8
00007ffe`8d36898c 8d4708 lea eax,[rdi+8]
00007ffe`8d36898f 99 cdq
00007ffe`8d368990 83e23f and edx,3Fh
00007ffe`8d368993 03c2 add eax,edx
00007ffe`8d368995 c1f806 sar eax,6
00007ffe`8d368998 8d6801 lea ebp,[rax+1]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 21:
00007ffe`8d36899b c70601234567 mov dword ptr [rsi],67452301h
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 22:
00007ffe`8d3689a1 c7460489abcdef mov dword ptr [rsi+4],0EFCDAB89h
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 23:
00007ffe`8d3689a8 c74608fedcba98 mov dword ptr [rsi+8],98BADCFEh
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 24:
00007ffe`8d3689af c7460c76543210 mov dword ptr [rsi+0Ch],10325476h
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 26:
00007ffe`8d3689b6 33c9 xor ecx,ecx
00007ffe`8d3689b8 488d542438 lea rdx,[rsp+38h]
00007ffe`8d3689bd c4e17957c0 vxorpd xmm0,xmm0,xmm0
00007ffe`8d3689c2 c4e17a7f02 vmovdqu xmmword ptr [rdx],xmm0
00007ffe`8d3689c7 c4e17a7f4210 vmovdqu xmmword ptr [rdx+10h],xmm0
00007ffe`8d3689cd c4e17a7f4220 vmovdqu xmmword ptr [rdx+20h],xmm0
00007ffe`8d3689d3 c4e17a7f4230 vmovdqu xmmword ptr [rdx+30h],xmm0
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 28:
00007ffe`8d3689d9 4533f6 xor r14d,r14d
00007ffe`8d3689dc 85ed test ebp,ebp
00007ffe`8d3689de 0f8e850b0000 jle 00007ffe`8d369569
00007ffe`8d3689e4 4c8d7e04 lea r15,[rsi+4]
00007ffe`8d3689e8 4c8d6608 lea r12,[rsi+8]
00007ffe`8d3689ec 4c8d6e0c lea r13,[rsi+0Ch]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 30:
00007ffe`8d3689f0 418bc6 mov eax,r14d
00007ffe`8d3689f3 c1e006 shl eax,6
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 31:
00007ffe`8d3689f6 8d4840 lea ecx,[rax+40h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 35:
00007ffe`8d3689f9 3bcf cmp ecx,edi
00007ffe`8d3689fb 0f8e97000000 jle 00007ffe`8d368a98
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 37:
00007ffe`8d368a01 3bc7 cmp eax,edi
00007ffe`8d368a03 7c3c jl 00007ffe`8d368a41
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 39:
00007ffe`8d368a05 3bc7 cmp eax,edi
00007ffe`8d368a07 7507 jne 00007ffe`8d368a10
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 42:
00007ffe`8d368a09 c644243880 mov byte ptr [rsp+38h],80h
00007ffe`8d368a0e eb23 jmp 00007ffe`8d368a33
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 47:
00007ffe`8d368a10 33c9 xor ecx,ecx
00007ffe`8d368a12 488d442438 lea rax,[rsp+38h]
00007ffe`8d368a17 c4e17957c0 vxorpd xmm0,xmm0,xmm0
00007ffe`8d368a1c c4e17a7f00 vmovdqu xmmword ptr [rax],xmm0
00007ffe`8d368a21 c4e17a7f4010 vmovdqu xmmword ptr [rax+10h],xmm0
00007ffe`8d368a27 c4e17a7f4020 vmovdqu xmmword ptr [rax+20h],xmm0
00007ffe`8d368a2d c4e17a7f4030 vmovdqu xmmword ptr [rax+30h],xmm0
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 50:
00007ffe`8d368a33 4863cf movsxd rcx,edi
00007ffe`8d368a36 48c1e103 shl rcx,3
00007ffe`8d368a3a 48894c2470 mov qword ptr [rsp+70h],rcx
00007ffe`8d368a3f eb50 jmp 00007ffe`8d368a91
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 54:
00007ffe`8d368a41 2bcf sub ecx,edi
00007ffe`8d368a43 f7d9 neg ecx
00007ffe`8d368a45 448d4940 lea r9d,[rcx+40h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 55:
00007ffe`8d368a49 4c8d542438 lea r10,[rsp+38h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 56:
00007ffe`8d368a4e 4863c8 movsxd rcx,eax
00007ffe`8d368a51 4803cb add rcx,rbx
00007ffe`8d368a54 4c89542428 mov qword ptr [rsp+28h],r10
00007ffe`8d368a59 498bd2 mov rdx,r10
00007ffe`8d368a5c 44894c2434 mov dword ptr [rsp+34h],r9d
00007ffe`8d368a61 458bc1 mov r8d,r9d
00007ffe`8d368a64 e84795ffff call 00007ffe`8d361fb0 (Md5DotNet.Common.UnsafeMemoryCopy(Byte*, Byte*, Int32), mdToken: 0000000006000002)
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 59:
00007ffe`8d368a69 8b442434 mov eax,dword ptr [rsp+34h]
00007ffe`8d368a6d 4863d0 movsxd rdx,eax
00007ffe`8d368a70 488b4c2428 mov rcx,qword ptr [rsp+28h]
00007ffe`8d368a75 c6041180 mov byte ptr [rcx+rdx],80h
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 62:
00007ffe`8d368a79 ffc0 inc eax
00007ffe`8d368a7b f7d8 neg eax
00007ffe`8d368a7d 83c040 add eax,40h
00007ffe`8d368a80 83f808 cmp eax,8
00007ffe`8d368a83 7c0c jl 00007ffe`8d368a91
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 63:
00007ffe`8d368a85 4863c7 movsxd rax,edi
00007ffe`8d368a88 48c1e003 shl rax,3
00007ffe`8d368a8c 4889442470 mov qword ptr [rsp+70h],rax
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 67:
00007ffe`8d368a91 488d442438 lea rax,[rsp+38h]
00007ffe`8d368a96 eb06 jmp 00007ffe`8d368a9e
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 71:
00007ffe`8d368a98 4863c0 movsxd rax,eax
00007ffe`8d368a9b 4803c3 add rax,rbx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 74:
00007ffe`8d368a9e 8b16 mov edx,dword ptr [rsi]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 75:
00007ffe`8d368aa0 8b4e04 mov ecx,dword ptr [rsi+4]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 76:
00007ffe`8d368aa3 448b4608 mov r8d,dword ptr [rsi+8]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 77:
00007ffe`8d368aa7 448b4e0c mov r9d,dword ptr [rsi+0Ch]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 82:
00007ffe`8d368aab 458bd0 mov r10d,r8d
00007ffe`8d368aae 4533d1 xor r10d,r9d
00007ffe`8d368ab1 4423d1 and r10d,ecx
00007ffe`8d368ab4 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 83:
00007ffe`8d368ab7 4103d2 add edx,r10d
00007ffe`8d368aba 448b10 mov r10d,dword ptr [rax]
00007ffe`8d368abd 428d941278a46ad7 lea edx,[rdx+r10-28955B88h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 84:
00007ffe`8d368ac5 448bd2 mov r10d,edx
00007ffe`8d368ac8 41c1e207 shl r10d,7
00007ffe`8d368acc c1ea19 shr edx,19h
00007ffe`8d368acf 410bd2 or edx,r10d
00007ffe`8d368ad2 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 87:
00007ffe`8d368ad4 448bd1 mov r10d,ecx
00007ffe`8d368ad7 4533d0 xor r10d,r8d
00007ffe`8d368ada 4423d2 and r10d,edx
00007ffe`8d368add 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 88:
00007ffe`8d368ae0 4503ca add r9d,r10d
00007ffe`8d368ae3 448b5004 mov r10d,dword ptr [rax+4]
00007ffe`8d368ae7 478d8c1156b7c7e8 lea r9d,[r9+r10-173848AAh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 89:
00007ffe`8d368aef 458bd1 mov r10d,r9d
00007ffe`8d368af2 41c1e20c shl r10d,0Ch
00007ffe`8d368af6 41c1e914 shr r9d,14h
00007ffe`8d368afa 450bca or r9d,r10d
00007ffe`8d368afd 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 92:
00007ffe`8d368b00 448bd2 mov r10d,edx
00007ffe`8d368b03 4433d1 xor r10d,ecx
00007ffe`8d368b06 4523d1 and r10d,r9d
00007ffe`8d368b09 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 93:
00007ffe`8d368b0c 4503c2 add r8d,r10d
00007ffe`8d368b0f 448b5008 mov r10d,dword ptr [rax+8]
00007ffe`8d368b13 478d8410db702024 lea r8d,[r8+r10+242070DBh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 94:
00007ffe`8d368b1b 458bd0 mov r10d,r8d
00007ffe`8d368b1e 41c1e211 shl r10d,11h
00007ffe`8d368b22 41c1e80f shr r8d,0Fh
00007ffe`8d368b26 450bc2 or r8d,r10d
00007ffe`8d368b29 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 97:
00007ffe`8d368b2c 458bd1 mov r10d,r9d
00007ffe`8d368b2f 4433d2 xor r10d,edx
00007ffe`8d368b32 4523d0 and r10d,r8d
00007ffe`8d368b35 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 98:
00007ffe`8d368b38 4103ca add ecx,r10d
00007ffe`8d368b3b 448b500c mov r10d,dword ptr [rax+0Ch]
00007ffe`8d368b3f 428d8c11eecebdc1 lea ecx,[rcx+r10-3E423112h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 99:
00007ffe`8d368b47 448bd1 mov r10d,ecx
00007ffe`8d368b4a 41c1e216 shl r10d,16h
00007ffe`8d368b4e c1e90a shr ecx,0Ah
00007ffe`8d368b51 410bca or ecx,r10d
00007ffe`8d368b54 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 102:
00007ffe`8d368b57 458bd0 mov r10d,r8d
00007ffe`8d368b5a 4533d1 xor r10d,r9d
00007ffe`8d368b5d 4423d1 and r10d,ecx
00007ffe`8d368b60 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 103:
00007ffe`8d368b63 4103d2 add edx,r10d
00007ffe`8d368b66 448b5010 mov r10d,dword ptr [rax+10h]
00007ffe`8d368b6a 428d9412af0f7cf5 lea edx,[rdx+r10-0A83F051h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 104:
00007ffe`8d368b72 448bd2 mov r10d,edx
00007ffe`8d368b75 41c1e207 shl r10d,7
00007ffe`8d368b79 c1ea19 shr edx,19h
00007ffe`8d368b7c 410bd2 or edx,r10d
00007ffe`8d368b7f 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 107:
00007ffe`8d368b81 448bd1 mov r10d,ecx
00007ffe`8d368b84 4533d0 xor r10d,r8d
00007ffe`8d368b87 4423d2 and r10d,edx
00007ffe`8d368b8a 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 108:
00007ffe`8d368b8d 4503ca add r9d,r10d
00007ffe`8d368b90 448b5014 mov r10d,dword ptr [rax+14h]
00007ffe`8d368b94 478d8c112ac68747 lea r9d,[r9+r10+4787C62Ah]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 109:
00007ffe`8d368b9c 458bd1 mov r10d,r9d
00007ffe`8d368b9f 41c1e20c shl r10d,0Ch
00007ffe`8d368ba3 41c1e914 shr r9d,14h
00007ffe`8d368ba7 450bca or r9d,r10d
00007ffe`8d368baa 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 112:
00007ffe`8d368bad 448bd2 mov r10d,edx
00007ffe`8d368bb0 4433d1 xor r10d,ecx
00007ffe`8d368bb3 4523d1 and r10d,r9d
00007ffe`8d368bb6 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 113:
00007ffe`8d368bb9 4503c2 add r8d,r10d
00007ffe`8d368bbc 448b5018 mov r10d,dword ptr [rax+18h]
00007ffe`8d368bc0 478d8410134630a8 lea r8d,[r8+r10-57CFB9EDh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 114:
00007ffe`8d368bc8 458bd0 mov r10d,r8d
00007ffe`8d368bcb 41c1e211 shl r10d,11h
00007ffe`8d368bcf 41c1e80f shr r8d,0Fh
00007ffe`8d368bd3 450bc2 or r8d,r10d
00007ffe`8d368bd6 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 117:
00007ffe`8d368bd9 458bd1 mov r10d,r9d
00007ffe`8d368bdc 4433d2 xor r10d,edx
00007ffe`8d368bdf 4523d0 and r10d,r8d
00007ffe`8d368be2 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 118:
00007ffe`8d368be5 4103ca add ecx,r10d
00007ffe`8d368be8 448b501c mov r10d,dword ptr [rax+1Ch]
00007ffe`8d368bec 428d8c11019546fd lea ecx,[rcx+r10-2B96AFFh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 119:
00007ffe`8d368bf4 448bd1 mov r10d,ecx
00007ffe`8d368bf7 41c1e216 shl r10d,16h
00007ffe`8d368bfb c1e90a shr ecx,0Ah
00007ffe`8d368bfe 410bca or ecx,r10d
00007ffe`8d368c01 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 122:
00007ffe`8d368c04 458bd0 mov r10d,r8d
00007ffe`8d368c07 4533d1 xor r10d,r9d
00007ffe`8d368c0a 4423d1 and r10d,ecx
00007ffe`8d368c0d 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 123:
00007ffe`8d368c10 4103d2 add edx,r10d
00007ffe`8d368c13 448b5020 mov r10d,dword ptr [rax+20h]
00007ffe`8d368c17 428d9412d8988069 lea edx,[rdx+r10+698098D8h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 124:
00007ffe`8d368c1f 448bd2 mov r10d,edx
00007ffe`8d368c22 41c1e207 shl r10d,7
00007ffe`8d368c26 c1ea19 shr edx,19h
00007ffe`8d368c29 410bd2 or edx,r10d
00007ffe`8d368c2c 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 127:
00007ffe`8d368c2e 448bd1 mov r10d,ecx
00007ffe`8d368c31 4533d0 xor r10d,r8d
00007ffe`8d368c34 4423d2 and r10d,edx
00007ffe`8d368c37 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 128:
00007ffe`8d368c3a 4503ca add r9d,r10d
00007ffe`8d368c3d 448b5024 mov r10d,dword ptr [rax+24h]
00007ffe`8d368c41 478d8c11aff7448b lea r9d,[r9+r10-74BB0851h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 129:
00007ffe`8d368c49 458bd1 mov r10d,r9d
00007ffe`8d368c4c 41c1e20c shl r10d,0Ch
00007ffe`8d368c50 41c1e914 shr r9d,14h
00007ffe`8d368c54 450bca or r9d,r10d
00007ffe`8d368c57 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 132:
00007ffe`8d368c5a 448bd2 mov r10d,edx
00007ffe`8d368c5d 4433d1 xor r10d,ecx
00007ffe`8d368c60 4523d1 and r10d,r9d
00007ffe`8d368c63 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 133:
00007ffe`8d368c66 4503c2 add r8d,r10d
00007ffe`8d368c69 448b5028 mov r10d,dword ptr [rax+28h]
00007ffe`8d368c6d 478d8410b15bffff lea r8d,[r8+r10-0A44Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 134:
00007ffe`8d368c75 458bd0 mov r10d,r8d
00007ffe`8d368c78 41c1e211 shl r10d,11h
00007ffe`8d368c7c 41c1e80f shr r8d,0Fh
00007ffe`8d368c80 450bc2 or r8d,r10d
00007ffe`8d368c83 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 137:
00007ffe`8d368c86 458bd1 mov r10d,r9d
00007ffe`8d368c89 4433d2 xor r10d,edx
00007ffe`8d368c8c 4523d0 and r10d,r8d
00007ffe`8d368c8f 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 138:
00007ffe`8d368c92 4103ca add ecx,r10d
00007ffe`8d368c95 448b502c mov r10d,dword ptr [rax+2Ch]
00007ffe`8d368c99 428d8c11bed75c89 lea ecx,[rcx+r10-76A32842h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 139:
00007ffe`8d368ca1 448bd1 mov r10d,ecx
00007ffe`8d368ca4 41c1e216 shl r10d,16h
00007ffe`8d368ca8 c1e90a shr ecx,0Ah
00007ffe`8d368cab 410bca or ecx,r10d
00007ffe`8d368cae 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 142:
00007ffe`8d368cb1 458bd0 mov r10d,r8d
00007ffe`8d368cb4 4533d1 xor r10d,r9d
00007ffe`8d368cb7 4423d1 and r10d,ecx
00007ffe`8d368cba 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 143:
00007ffe`8d368cbd 4103d2 add edx,r10d
00007ffe`8d368cc0 448b5030 mov r10d,dword ptr [rax+30h]
00007ffe`8d368cc4 428d94122211906b lea edx,[rdx+r10+6B901122h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 144:
00007ffe`8d368ccc 448bd2 mov r10d,edx
00007ffe`8d368ccf 41c1e207 shl r10d,7
00007ffe`8d368cd3 c1ea19 shr edx,19h
00007ffe`8d368cd6 410bd2 or edx,r10d
00007ffe`8d368cd9 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 147:
00007ffe`8d368cdb 448bd1 mov r10d,ecx
00007ffe`8d368cde 4533d0 xor r10d,r8d
00007ffe`8d368ce1 4423d2 and r10d,edx
00007ffe`8d368ce4 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 148:
00007ffe`8d368ce7 4503ca add r9d,r10d
00007ffe`8d368cea 448b5034 mov r10d,dword ptr [rax+34h]
00007ffe`8d368cee 478d8c11937198fd lea r9d,[r9+r10-2678E6Dh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 149:
00007ffe`8d368cf6 458bd1 mov r10d,r9d
00007ffe`8d368cf9 41c1e20c shl r10d,0Ch
00007ffe`8d368cfd 41c1e914 shr r9d,14h
00007ffe`8d368d01 450bca or r9d,r10d
00007ffe`8d368d04 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 152:
00007ffe`8d368d07 448bd2 mov r10d,edx
00007ffe`8d368d0a 4433d1 xor r10d,ecx
00007ffe`8d368d0d 4523d1 and r10d,r9d
00007ffe`8d368d10 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 153:
00007ffe`8d368d13 4503c2 add r8d,r10d
00007ffe`8d368d16 448b5038 mov r10d,dword ptr [rax+38h]
00007ffe`8d368d1a 478d84108e4379a6 lea r8d,[r8+r10-5986BC72h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 154:
00007ffe`8d368d22 458bd0 mov r10d,r8d
00007ffe`8d368d25 41c1e211 shl r10d,11h
00007ffe`8d368d29 41c1e80f shr r8d,0Fh
00007ffe`8d368d2d 450bc2 or r8d,r10d
00007ffe`8d368d30 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 157:
00007ffe`8d368d33 458bd1 mov r10d,r9d
00007ffe`8d368d36 4433d2 xor r10d,edx
00007ffe`8d368d39 4523d0 and r10d,r8d
00007ffe`8d368d3c 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 158:
00007ffe`8d368d3f 4103ca add ecx,r10d
00007ffe`8d368d42 448b503c mov r10d,dword ptr [rax+3Ch]
00007ffe`8d368d46 428d8c112108b449 lea ecx,[rcx+r10+49B40821h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 159:
00007ffe`8d368d4e 448bd1 mov r10d,ecx
00007ffe`8d368d51 41c1e216 shl r10d,16h
00007ffe`8d368d55 c1e90a shr ecx,0Ah
00007ffe`8d368d58 410bca or ecx,r10d
00007ffe`8d368d5b 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 162:
00007ffe`8d368d5e 448bd1 mov r10d,ecx
00007ffe`8d368d61 4533d0 xor r10d,r8d
00007ffe`8d368d64 4523d1 and r10d,r9d
00007ffe`8d368d67 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 163:
00007ffe`8d368d6a 4103d2 add edx,r10d
00007ffe`8d368d6d 448b5004 mov r10d,dword ptr [rax+4]
00007ffe`8d368d71 428d941262251ef6 lea edx,[rdx+r10-9E1DA9Eh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 164:
00007ffe`8d368d79 448bd2 mov r10d,edx
00007ffe`8d368d7c 41c1e205 shl r10d,5
00007ffe`8d368d80 c1ea1b shr edx,1Bh
00007ffe`8d368d83 410bd2 or edx,r10d
00007ffe`8d368d86 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 167:
00007ffe`8d368d88 448bd2 mov r10d,edx
00007ffe`8d368d8b 4433d1 xor r10d,ecx
00007ffe`8d368d8e 4523d0 and r10d,r8d
00007ffe`8d368d91 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 168:
00007ffe`8d368d94 4503ca add r9d,r10d
00007ffe`8d368d97 448b5018 mov r10d,dword ptr [rax+18h]
00007ffe`8d368d9b 478d8c1140b340c0 lea r9d,[r9+r10-3FBF4CC0h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 169:
00007ffe`8d368da3 458bd1 mov r10d,r9d
00007ffe`8d368da6 41c1e209 shl r10d,9
00007ffe`8d368daa 41c1e917 shr r9d,17h
00007ffe`8d368dae 450bca or r9d,r10d
00007ffe`8d368db1 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 172:
00007ffe`8d368db4 458bd1 mov r10d,r9d
00007ffe`8d368db7 4433d2 xor r10d,edx
00007ffe`8d368dba 4423d1 and r10d,ecx
00007ffe`8d368dbd 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 173:
00007ffe`8d368dc0 4503c2 add r8d,r10d
00007ffe`8d368dc3 448b502c mov r10d,dword ptr [rax+2Ch]
00007ffe`8d368dc7 478d8410515a5e26 lea r8d,[r8+r10+265E5A51h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 174:
00007ffe`8d368dcf 458bd0 mov r10d,r8d
00007ffe`8d368dd2 41c1e20e shl r10d,0Eh
00007ffe`8d368dd6 41c1e812 shr r8d,12h
00007ffe`8d368dda 450bc2 or r8d,r10d
00007ffe`8d368ddd 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 177:
00007ffe`8d368de0 458bd0 mov r10d,r8d
00007ffe`8d368de3 4533d1 xor r10d,r9d
00007ffe`8d368de6 4423d2 and r10d,edx
00007ffe`8d368de9 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 178:
00007ffe`8d368dec 4103ca add ecx,r10d
00007ffe`8d368def 448b10 mov r10d,dword ptr [rax]
00007ffe`8d368df2 428d8c11aac7b6e9 lea ecx,[rcx+r10-16493856h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 179:
00007ffe`8d368dfa 448bd1 mov r10d,ecx
00007ffe`8d368dfd 41c1e214 shl r10d,14h
00007ffe`8d368e01 c1e90c shr ecx,0Ch
00007ffe`8d368e04 410bca or ecx,r10d
00007ffe`8d368e07 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 182:
00007ffe`8d368e0a 448bd1 mov r10d,ecx
00007ffe`8d368e0d 4533d0 xor r10d,r8d
00007ffe`8d368e10 4523d1 and r10d,r9d
00007ffe`8d368e13 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 183:
00007ffe`8d368e16 4103d2 add edx,r10d
00007ffe`8d368e19 448b5014 mov r10d,dword ptr [rax+14h]
00007ffe`8d368e1d 428d94125d102fd6 lea edx,[rdx+r10-29D0EFA3h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 184:
00007ffe`8d368e25 448bd2 mov r10d,edx
00007ffe`8d368e28 41c1e205 shl r10d,5
00007ffe`8d368e2c c1ea1b shr edx,1Bh
00007ffe`8d368e2f 410bd2 or edx,r10d
00007ffe`8d368e32 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 187:
00007ffe`8d368e34 448bd2 mov r10d,edx
00007ffe`8d368e37 4433d1 xor r10d,ecx
00007ffe`8d368e3a 4523d0 and r10d,r8d
00007ffe`8d368e3d 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 188:
00007ffe`8d368e40 4503ca add r9d,r10d
00007ffe`8d368e43 448b5028 mov r10d,dword ptr [rax+28h]
00007ffe`8d368e47 478d8c1153144402 lea r9d,[r9+r10+2441453h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 189:
00007ffe`8d368e4f 458bd1 mov r10d,r9d
00007ffe`8d368e52 41c1e209 shl r10d,9
00007ffe`8d368e56 41c1e917 shr r9d,17h
00007ffe`8d368e5a 450bca or r9d,r10d
00007ffe`8d368e5d 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 192:
00007ffe`8d368e60 458bd1 mov r10d,r9d
00007ffe`8d368e63 4433d2 xor r10d,edx
00007ffe`8d368e66 4423d1 and r10d,ecx
00007ffe`8d368e69 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 193:
00007ffe`8d368e6c 4503c2 add r8d,r10d
00007ffe`8d368e6f 448b503c mov r10d,dword ptr [rax+3Ch]
00007ffe`8d368e73 478d841081e6a1d8 lea r8d,[r8+r10-275E197Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 194:
00007ffe`8d368e7b 458bd0 mov r10d,r8d
00007ffe`8d368e7e 41c1e20e shl r10d,0Eh
00007ffe`8d368e82 41c1e812 shr r8d,12h
00007ffe`8d368e86 450bc2 or r8d,r10d
00007ffe`8d368e89 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 197:
00007ffe`8d368e8c 458bd0 mov r10d,r8d
00007ffe`8d368e8f 4533d1 xor r10d,r9d
00007ffe`8d368e92 4423d2 and r10d,edx
00007ffe`8d368e95 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 198:
00007ffe`8d368e98 4103ca add ecx,r10d
00007ffe`8d368e9b 448b5010 mov r10d,dword ptr [rax+10h]
00007ffe`8d368e9f 428d8c11c8fbd3e7 lea ecx,[rcx+r10-182C0438h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 199:
00007ffe`8d368ea7 448bd1 mov r10d,ecx
00007ffe`8d368eaa 41c1e214 shl r10d,14h
00007ffe`8d368eae c1e90c shr ecx,0Ch
00007ffe`8d368eb1 410bca or ecx,r10d
00007ffe`8d368eb4 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 202:
00007ffe`8d368eb7 448bd1 mov r10d,ecx
00007ffe`8d368eba 4533d0 xor r10d,r8d
00007ffe`8d368ebd 4523d1 and r10d,r9d
00007ffe`8d368ec0 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 203:
00007ffe`8d368ec3 4103d2 add edx,r10d
00007ffe`8d368ec6 448b5024 mov r10d,dword ptr [rax+24h]
00007ffe`8d368eca 428d9412e6cde121 lea edx,[rdx+r10+21E1CDE6h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 204:
00007ffe`8d368ed2 448bd2 mov r10d,edx
00007ffe`8d368ed5 41c1e205 shl r10d,5
00007ffe`8d368ed9 c1ea1b shr edx,1Bh
00007ffe`8d368edc 410bd2 or edx,r10d
00007ffe`8d368edf 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 207:
00007ffe`8d368ee1 448bd2 mov r10d,edx
00007ffe`8d368ee4 4433d1 xor r10d,ecx
00007ffe`8d368ee7 4523d0 and r10d,r8d
00007ffe`8d368eea 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 208:
00007ffe`8d368eed 4503ca add r9d,r10d
00007ffe`8d368ef0 448b5038 mov r10d,dword ptr [rax+38h]
00007ffe`8d368ef4 478d8c11d60737c3 lea r9d,[r9+r10-3CC8F82Ah]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 209:
00007ffe`8d368efc 458bd1 mov r10d,r9d
00007ffe`8d368eff 41c1e209 shl r10d,9
00007ffe`8d368f03 41c1e917 shr r9d,17h
00007ffe`8d368f07 450bca or r9d,r10d
00007ffe`8d368f0a 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 212:
00007ffe`8d368f0d 458bd1 mov r10d,r9d
00007ffe`8d368f10 4433d2 xor r10d,edx
00007ffe`8d368f13 4423d1 and r10d,ecx
00007ffe`8d368f16 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 213:
00007ffe`8d368f19 4503c2 add r8d,r10d
00007ffe`8d368f1c 448b500c mov r10d,dword ptr [rax+0Ch]
00007ffe`8d368f20 478d8410870dd5f4 lea r8d,[r8+r10-0B2AF279h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 214:
00007ffe`8d368f28 458bd0 mov r10d,r8d
00007ffe`8d368f2b 41c1e20e shl r10d,0Eh
00007ffe`8d368f2f 41c1e812 shr r8d,12h
00007ffe`8d368f33 450bc2 or r8d,r10d
00007ffe`8d368f36 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 217:
00007ffe`8d368f39 458bd0 mov r10d,r8d
00007ffe`8d368f3c 4533d1 xor r10d,r9d
00007ffe`8d368f3f 4423d2 and r10d,edx
00007ffe`8d368f42 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 218:
00007ffe`8d368f45 4103ca add ecx,r10d
00007ffe`8d368f48 448b5020 mov r10d,dword ptr [rax+20h]
00007ffe`8d368f4c 428d8c11ed145a45 lea ecx,[rcx+r10+455A14EDh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 219:
00007ffe`8d368f54 448bd1 mov r10d,ecx
00007ffe`8d368f57 41c1e214 shl r10d,14h
00007ffe`8d368f5b c1e90c shr ecx,0Ch
00007ffe`8d368f5e 410bca or ecx,r10d
00007ffe`8d368f61 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 222:
00007ffe`8d368f64 448bd1 mov r10d,ecx
00007ffe`8d368f67 4533d0 xor r10d,r8d
00007ffe`8d368f6a 4523d1 and r10d,r9d
00007ffe`8d368f6d 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 223:
00007ffe`8d368f70 4103d2 add edx,r10d
00007ffe`8d368f73 448b5034 mov r10d,dword ptr [rax+34h]
00007ffe`8d368f77 428d941205e9e3a9 lea edx,[rdx+r10-561C16FBh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 224:
00007ffe`8d368f7f 448bd2 mov r10d,edx
00007ffe`8d368f82 41c1e205 shl r10d,5
00007ffe`8d368f86 c1ea1b shr edx,1Bh
00007ffe`8d368f89 410bd2 or edx,r10d
00007ffe`8d368f8c 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 227:
00007ffe`8d368f8e 448bd2 mov r10d,edx
00007ffe`8d368f91 4433d1 xor r10d,ecx
00007ffe`8d368f94 4523d0 and r10d,r8d
00007ffe`8d368f97 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 228:
00007ffe`8d368f9a 4503ca add r9d,r10d
00007ffe`8d368f9d 448b5008 mov r10d,dword ptr [rax+8]
00007ffe`8d368fa1 478d8c11f8a3effc lea r9d,[r9+r10-3105C08h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 229:
00007ffe`8d368fa9 458bd1 mov r10d,r9d
00007ffe`8d368fac 41c1e209 shl r10d,9
00007ffe`8d368fb0 41c1e917 shr r9d,17h
00007ffe`8d368fb4 450bca or r9d,r10d
00007ffe`8d368fb7 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 232:
00007ffe`8d368fba 458bd1 mov r10d,r9d
00007ffe`8d368fbd 4433d2 xor r10d,edx
00007ffe`8d368fc0 4423d1 and r10d,ecx
00007ffe`8d368fc3 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 233:
00007ffe`8d368fc6 4503c2 add r8d,r10d
00007ffe`8d368fc9 448b501c mov r10d,dword ptr [rax+1Ch]
00007ffe`8d368fcd 478d8410d9026f67 lea r8d,[r8+r10+676F02D9h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 234:
00007ffe`8d368fd5 458bd0 mov r10d,r8d
00007ffe`8d368fd8 41c1e20e shl r10d,0Eh
00007ffe`8d368fdc 41c1e812 shr r8d,12h
00007ffe`8d368fe0 450bc2 or r8d,r10d
00007ffe`8d368fe3 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 237:
00007ffe`8d368fe6 458bd0 mov r10d,r8d
00007ffe`8d368fe9 4533d1 xor r10d,r9d
00007ffe`8d368fec 4423d2 and r10d,edx
00007ffe`8d368fef 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 238:
00007ffe`8d368ff2 4103ca add ecx,r10d
00007ffe`8d368ff5 448b5030 mov r10d,dword ptr [rax+30h]
00007ffe`8d368ff9 428d8c118a4c2a8d lea ecx,[rcx+r10-72D5B376h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 239:
00007ffe`8d369001 448bd1 mov r10d,ecx
00007ffe`8d369004 41c1e214 shl r10d,14h
00007ffe`8d369008 c1e90c shr ecx,0Ch
00007ffe`8d36900b 410bca or ecx,r10d
00007ffe`8d36900e 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 242:
00007ffe`8d369011 448bd1 mov r10d,ecx
00007ffe`8d369014 4533d0 xor r10d,r8d
00007ffe`8d369017 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 243:
00007ffe`8d36901a 4103d2 add edx,r10d
00007ffe`8d36901d 448b5014 mov r10d,dword ptr [rax+14h]
00007ffe`8d369021 428d94124239faff lea edx,[rdx+r10-5C6BEh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 244:
00007ffe`8d369029 448bd2 mov r10d,edx
00007ffe`8d36902c 41c1e204 shl r10d,4
00007ffe`8d369030 c1ea1c shr edx,1Ch
00007ffe`8d369033 410bd2 or edx,r10d
00007ffe`8d369036 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 247:
00007ffe`8d369038 448bd2 mov r10d,edx
00007ffe`8d36903b 4433d1 xor r10d,ecx
00007ffe`8d36903e 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 248:
00007ffe`8d369041 4503ca add r9d,r10d
00007ffe`8d369044 448b5020 mov r10d,dword ptr [rax+20h]
00007ffe`8d369048 478d8c1181f67187 lea r9d,[r9+r10-788E097Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 249:
00007ffe`8d369050 458bd1 mov r10d,r9d
00007ffe`8d369053 41c1e20b shl r10d,0Bh
00007ffe`8d369057 41c1e915 shr r9d,15h
00007ffe`8d36905b 450bca or r9d,r10d
00007ffe`8d36905e 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 252:
00007ffe`8d369061 458bd1 mov r10d,r9d
00007ffe`8d369064 4433d2 xor r10d,edx
00007ffe`8d369067 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 253:
00007ffe`8d36906a 4503c2 add r8d,r10d
00007ffe`8d36906d 448b502c mov r10d,dword ptr [rax+2Ch]
00007ffe`8d369071 478d841022619d6d lea r8d,[r8+r10+6D9D6122h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 254:
00007ffe`8d369079 458bd0 mov r10d,r8d
00007ffe`8d36907c 41c1e210 shl r10d,10h
00007ffe`8d369080 41c1e810 shr r8d,10h
00007ffe`8d369084 450bc2 or r8d,r10d
00007ffe`8d369087 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 257:
00007ffe`8d36908a 458bd0 mov r10d,r8d
00007ffe`8d36908d 4533d1 xor r10d,r9d
00007ffe`8d369090 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 258:
00007ffe`8d369093 4103ca add ecx,r10d
00007ffe`8d369096 448b5038 mov r10d,dword ptr [rax+38h]
00007ffe`8d36909a 428d8c110c38e5fd lea ecx,[rcx+r10-21AC7F4h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 259:
00007ffe`8d3690a2 448bd1 mov r10d,ecx
00007ffe`8d3690a5 41c1e217 shl r10d,17h
00007ffe`8d3690a9 c1e909 shr ecx,9
00007ffe`8d3690ac 410bca or ecx,r10d
00007ffe`8d3690af 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 262:
00007ffe`8d3690b2 448bd1 mov r10d,ecx
00007ffe`8d3690b5 4533d0 xor r10d,r8d
00007ffe`8d3690b8 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 263:
00007ffe`8d3690bb 4103d2 add edx,r10d
00007ffe`8d3690be 448b5004 mov r10d,dword ptr [rax+4]
00007ffe`8d3690c2 428d941244eabea4 lea edx,[rdx+r10-5B4115BCh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 264:
00007ffe`8d3690ca 448bd2 mov r10d,edx
00007ffe`8d3690cd 41c1e204 shl r10d,4
00007ffe`8d3690d1 c1ea1c shr edx,1Ch
00007ffe`8d3690d4 410bd2 or edx,r10d
00007ffe`8d3690d7 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 267:
00007ffe`8d3690d9 448bd2 mov r10d,edx
00007ffe`8d3690dc 4433d1 xor r10d,ecx
00007ffe`8d3690df 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 268:
00007ffe`8d3690e2 4503ca add r9d,r10d
00007ffe`8d3690e5 448b5010 mov r10d,dword ptr [rax+10h]
00007ffe`8d3690e9 478d8c11a9cfde4b lea r9d,[r9+r10+4BDECFA9h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 269:
00007ffe`8d3690f1 458bd1 mov r10d,r9d
00007ffe`8d3690f4 41c1e20b shl r10d,0Bh
00007ffe`8d3690f8 41c1e915 shr r9d,15h
00007ffe`8d3690fc 450bca or r9d,r10d
00007ffe`8d3690ff 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 272:
00007ffe`8d369102 458bd1 mov r10d,r9d
00007ffe`8d369105 4433d2 xor r10d,edx
00007ffe`8d369108 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 273:
00007ffe`8d36910b 4503c2 add r8d,r10d
00007ffe`8d36910e 448b501c mov r10d,dword ptr [rax+1Ch]
00007ffe`8d369112 478d8410604bbbf6 lea r8d,[r8+r10-944B4A0h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 274:
00007ffe`8d36911a 458bd0 mov r10d,r8d
00007ffe`8d36911d 41c1e210 shl r10d,10h
00007ffe`8d369121 41c1e810 shr r8d,10h
00007ffe`8d369125 450bc2 or r8d,r10d
00007ffe`8d369128 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 277:
00007ffe`8d36912b 458bd0 mov r10d,r8d
00007ffe`8d36912e 4533d1 xor r10d,r9d
00007ffe`8d369131 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 278:
00007ffe`8d369134 4103ca add ecx,r10d
00007ffe`8d369137 448b5028 mov r10d,dword ptr [rax+28h]
00007ffe`8d36913b 428d8c1170bcbfbe lea ecx,[rcx+r10-41404390h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 279:
00007ffe`8d369143 448bd1 mov r10d,ecx
00007ffe`8d369146 41c1e217 shl r10d,17h
00007ffe`8d36914a c1e909 shr ecx,9
00007ffe`8d36914d 410bca or ecx,r10d
00007ffe`8d369150 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 282:
00007ffe`8d369153 448bd1 mov r10d,ecx
00007ffe`8d369156 4533d0 xor r10d,r8d
00007ffe`8d369159 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 283:
00007ffe`8d36915c 4103d2 add edx,r10d
00007ffe`8d36915f 448b5034 mov r10d,dword ptr [rax+34h]
00007ffe`8d369163 428d9412c67e9b28 lea edx,[rdx+r10+289B7EC6h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 284:
00007ffe`8d36916b 448bd2 mov r10d,edx
00007ffe`8d36916e 41c1e204 shl r10d,4
00007ffe`8d369172 c1ea1c shr edx,1Ch
00007ffe`8d369175 410bd2 or edx,r10d
00007ffe`8d369178 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 287:
00007ffe`8d36917a 448bd2 mov r10d,edx
00007ffe`8d36917d 4433d1 xor r10d,ecx
00007ffe`8d369180 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 288:
00007ffe`8d369183 4503ca add r9d,r10d
00007ffe`8d369186 448b10 mov r10d,dword ptr [rax]
00007ffe`8d369189 478d8c11fa27a1ea lea r9d,[r9+r10-155ED806h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 289:
00007ffe`8d369191 458bd1 mov r10d,r9d
00007ffe`8d369194 41c1e20b shl r10d,0Bh
00007ffe`8d369198 41c1e915 shr r9d,15h
00007ffe`8d36919c 450bca or r9d,r10d
00007ffe`8d36919f 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 292:
00007ffe`8d3691a2 458bd1 mov r10d,r9d
00007ffe`8d3691a5 4433d2 xor r10d,edx
00007ffe`8d3691a8 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 293:
00007ffe`8d3691ab 4503c2 add r8d,r10d
00007ffe`8d3691ae 448b500c mov r10d,dword ptr [rax+0Ch]
00007ffe`8d3691b2 478d84108530efd4 lea r8d,[r8+r10-2B10CF7Bh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 294:
00007ffe`8d3691ba 458bd0 mov r10d,r8d
00007ffe`8d3691bd 41c1e210 shl r10d,10h
00007ffe`8d3691c1 41c1e810 shr r8d,10h
00007ffe`8d3691c5 450bc2 or r8d,r10d
00007ffe`8d3691c8 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 297:
00007ffe`8d3691cb 458bd0 mov r10d,r8d
00007ffe`8d3691ce 4533d1 xor r10d,r9d
00007ffe`8d3691d1 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 298:
00007ffe`8d3691d4 4103ca add ecx,r10d
00007ffe`8d3691d7 448b5018 mov r10d,dword ptr [rax+18h]
00007ffe`8d3691db 428d8c11051d8804 lea ecx,[rcx+r10+4881D05h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 299:
00007ffe`8d3691e3 448bd1 mov r10d,ecx
00007ffe`8d3691e6 41c1e217 shl r10d,17h
00007ffe`8d3691ea c1e909 shr ecx,9
00007ffe`8d3691ed 410bca or ecx,r10d
00007ffe`8d3691f0 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 302:
00007ffe`8d3691f3 448bd1 mov r10d,ecx
00007ffe`8d3691f6 4533d0 xor r10d,r8d
00007ffe`8d3691f9 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 303:
00007ffe`8d3691fc 4103d2 add edx,r10d
00007ffe`8d3691ff 448b5024 mov r10d,dword ptr [rax+24h]
00007ffe`8d369203 428d941239d0d4d9 lea edx,[rdx+r10-262B2FC7h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 304:
00007ffe`8d36920b 448bd2 mov r10d,edx
00007ffe`8d36920e 41c1e204 shl r10d,4
00007ffe`8d369212 c1ea1c shr edx,1Ch
00007ffe`8d369215 410bd2 or edx,r10d
00007ffe`8d369218 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 307:
00007ffe`8d36921a 448bd2 mov r10d,edx
00007ffe`8d36921d 4433d1 xor r10d,ecx
00007ffe`8d369220 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 308:
00007ffe`8d369223 4503ca add r9d,r10d
00007ffe`8d369226 448b5030 mov r10d,dword ptr [rax+30h]
00007ffe`8d36922a 478d8c11e599dbe6 lea r9d,[r9+r10-1924661Bh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 309:
00007ffe`8d369232 458bd1 mov r10d,r9d
00007ffe`8d369235 41c1e20b shl r10d,0Bh
00007ffe`8d369239 41c1e915 shr r9d,15h
00007ffe`8d36923d 450bca or r9d,r10d
00007ffe`8d369240 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 312:
00007ffe`8d369243 458bd1 mov r10d,r9d
00007ffe`8d369246 4433d2 xor r10d,edx
00007ffe`8d369249 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 313:
00007ffe`8d36924c 4503c2 add r8d,r10d
00007ffe`8d36924f 448b503c mov r10d,dword ptr [rax+3Ch]
00007ffe`8d369253 478d8410f87ca21f lea r8d,[r8+r10+1FA27CF8h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 314:
00007ffe`8d36925b 458bd0 mov r10d,r8d
00007ffe`8d36925e 41c1e210 shl r10d,10h
00007ffe`8d369262 41c1e810 shr r8d,10h
00007ffe`8d369266 450bc2 or r8d,r10d
00007ffe`8d369269 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 317:
00007ffe`8d36926c 458bd0 mov r10d,r8d
00007ffe`8d36926f 4533d1 xor r10d,r9d
00007ffe`8d369272 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 318:
00007ffe`8d369275 4103ca add ecx,r10d
00007ffe`8d369278 448b5008 mov r10d,dword ptr [rax+8]
00007ffe`8d36927c 428d8c116556acc4 lea ecx,[rcx+r10-3B53A99Bh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 319:
00007ffe`8d369284 448bd1 mov r10d,ecx
00007ffe`8d369287 41c1e217 shl r10d,17h
00007ffe`8d36928b c1e909 shr ecx,9
00007ffe`8d36928e 410bca or ecx,r10d
00007ffe`8d369291 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 322:
00007ffe`8d369294 458bd1 mov r10d,r9d
00007ffe`8d369297 41f7d2 not r10d
00007ffe`8d36929a 440bd1 or r10d,ecx
00007ffe`8d36929d 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 323:
00007ffe`8d3692a0 4103d2 add edx,r10d
00007ffe`8d3692a3 448b10 mov r10d,dword ptr [rax]
00007ffe`8d3692a6 428d9412442229f4 lea edx,[rdx+r10-0BD6DDBCh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 324:
00007ffe`8d3692ae 448bd2 mov r10d,edx
00007ffe`8d3692b1 41c1e206 shl r10d,6
00007ffe`8d3692b5 c1ea1a shr edx,1Ah
00007ffe`8d3692b8 410bd2 or edx,r10d
00007ffe`8d3692bb 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 327:
00007ffe`8d3692bd 458bd0 mov r10d,r8d
00007ffe`8d3692c0 41f7d2 not r10d
00007ffe`8d3692c3 440bd2 or r10d,edx
00007ffe`8d3692c6 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 328:
00007ffe`8d3692c9 4503ca add r9d,r10d
00007ffe`8d3692cc 448b501c mov r10d,dword ptr [rax+1Ch]
00007ffe`8d3692d0 478d8c1197ff2a43 lea r9d,[r9+r10+432AFF97h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 329:
00007ffe`8d3692d8 458bd1 mov r10d,r9d
00007ffe`8d3692db 41c1e20a shl r10d,0Ah
00007ffe`8d3692df 41c1e916 shr r9d,16h
00007ffe`8d3692e3 450bca or r9d,r10d
00007ffe`8d3692e6 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 332:
00007ffe`8d3692e9 448bd1 mov r10d,ecx
00007ffe`8d3692ec 41f7d2 not r10d
00007ffe`8d3692ef 450bd1 or r10d,r9d
00007ffe`8d3692f2 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 333:
00007ffe`8d3692f5 4503c2 add r8d,r10d
00007ffe`8d3692f8 448b5038 mov r10d,dword ptr [rax+38h]
00007ffe`8d3692fc 478d8410a72394ab lea r8d,[r8+r10-546BDC59h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 334:
00007ffe`8d369304 458bd0 mov r10d,r8d
00007ffe`8d369307 41c1e20f shl r10d,0Fh
00007ffe`8d36930b 41c1e811 shr r8d,11h
00007ffe`8d36930f 450bc2 or r8d,r10d
00007ffe`8d369312 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 337:
00007ffe`8d369315 448bd2 mov r10d,edx
00007ffe`8d369318 41f7d2 not r10d
00007ffe`8d36931b 450bd0 or r10d,r8d
00007ffe`8d36931e 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 338:
00007ffe`8d369321 4103ca add ecx,r10d
00007ffe`8d369324 448b5014 mov r10d,dword ptr [rax+14h]
00007ffe`8d369328 428d8c1139a093fc lea ecx,[rcx+r10-36C5FC7h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 339:
00007ffe`8d369330 448bd1 mov r10d,ecx
00007ffe`8d369333 41c1e215 shl r10d,15h
00007ffe`8d369337 c1e90b shr ecx,0Bh
00007ffe`8d36933a 410bca or ecx,r10d
00007ffe`8d36933d 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 342:
00007ffe`8d369340 458bd1 mov r10d,r9d
00007ffe`8d369343 41f7d2 not r10d
00007ffe`8d369346 440bd1 or r10d,ecx
00007ffe`8d369349 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 343:
00007ffe`8d36934c 4103d2 add edx,r10d
00007ffe`8d36934f 448b5030 mov r10d,dword ptr [rax+30h]
00007ffe`8d369353 428d9412c3595b65 lea edx,[rdx+r10+655B59C3h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 344:
00007ffe`8d36935b 448bd2 mov r10d,edx
00007ffe`8d36935e 41c1e206 shl r10d,6
00007ffe`8d369362 c1ea1a shr edx,1Ah
00007ffe`8d369365 410bd2 or edx,r10d
00007ffe`8d369368 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 347:
00007ffe`8d36936a 458bd0 mov r10d,r8d
00007ffe`8d36936d 41f7d2 not r10d
00007ffe`8d369370 440bd2 or r10d,edx
00007ffe`8d369373 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 348:
00007ffe`8d369376 4503ca add r9d,r10d
00007ffe`8d369379 448b500c mov r10d,dword ptr [rax+0Ch]
00007ffe`8d36937d 478d8c1192cc0c8f lea r9d,[r9+r10-70F3336Eh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 349:
00007ffe`8d369385 458bd1 mov r10d,r9d
00007ffe`8d369388 41c1e20a shl r10d,0Ah
00007ffe`8d36938c 41c1e916 shr r9d,16h
00007ffe`8d369390 450bca or r9d,r10d
00007ffe`8d369393 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 352:
00007ffe`8d369396 448bd1 mov r10d,ecx
00007ffe`8d369399 41f7d2 not r10d
00007ffe`8d36939c 450bd1 or r10d,r9d
00007ffe`8d36939f 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 353:
00007ffe`8d3693a2 4503c2 add r8d,r10d
00007ffe`8d3693a5 448b5028 mov r10d,dword ptr [rax+28h]
00007ffe`8d3693a9 478d84107df4efff lea r8d,[r8+r10-100B83h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 354:
00007ffe`8d3693b1 458bd0 mov r10d,r8d
00007ffe`8d3693b4 41c1e20f shl r10d,0Fh
00007ffe`8d3693b8 41c1e811 shr r8d,11h
00007ffe`8d3693bc 450bc2 or r8d,r10d
00007ffe`8d3693bf 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 357:
00007ffe`8d3693c2 448bd2 mov r10d,edx
00007ffe`8d3693c5 41f7d2 not r10d
00007ffe`8d3693c8 450bd0 or r10d,r8d
00007ffe`8d3693cb 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 358:
00007ffe`8d3693ce 4103ca add ecx,r10d
00007ffe`8d3693d1 448b5004 mov r10d,dword ptr [rax+4]
00007ffe`8d3693d5 428d8c11d15d8485 lea ecx,[rcx+r10-7A7BA22Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 359:
00007ffe`8d3693dd 448bd1 mov r10d,ecx
00007ffe`8d3693e0 41c1e215 shl r10d,15h
00007ffe`8d3693e4 c1e90b shr ecx,0Bh
00007ffe`8d3693e7 410bca or ecx,r10d
00007ffe`8d3693ea 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 362:
00007ffe`8d3693ed 458bd1 mov r10d,r9d
00007ffe`8d3693f0 41f7d2 not r10d
00007ffe`8d3693f3 440bd1 or r10d,ecx
00007ffe`8d3693f6 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 363:
00007ffe`8d3693f9 4103d2 add edx,r10d
00007ffe`8d3693fc 448b5020 mov r10d,dword ptr [rax+20h]
00007ffe`8d369400 428d94124f7ea86f lea edx,[rdx+r10+6FA87E4Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 364:
00007ffe`8d369408 448bd2 mov r10d,edx
00007ffe`8d36940b 41c1e206 shl r10d,6
00007ffe`8d36940f c1ea1a shr edx,1Ah
00007ffe`8d369412 410bd2 or edx,r10d
00007ffe`8d369415 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 367:
00007ffe`8d369417 458bd0 mov r10d,r8d
00007ffe`8d36941a 41f7d2 not r10d
00007ffe`8d36941d 440bd2 or r10d,edx
00007ffe`8d369420 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 368:
00007ffe`8d369423 4503ca add r9d,r10d
00007ffe`8d369426 448b503c mov r10d,dword ptr [rax+3Ch]
00007ffe`8d36942a 478d8c11e0e62cfe lea r9d,[r9+r10-1D31920h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 369:
00007ffe`8d369432 458bd1 mov r10d,r9d
00007ffe`8d369435 41c1e20a shl r10d,0Ah
00007ffe`8d369439 41c1e916 shr r9d,16h
00007ffe`8d36943d 450bca or r9d,r10d
00007ffe`8d369440 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 372:
00007ffe`8d369443 448bd1 mov r10d,ecx
00007ffe`8d369446 41f7d2 not r10d
00007ffe`8d369449 450bd1 or r10d,r9d
00007ffe`8d36944c 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 373:
00007ffe`8d36944f 4503c2 add r8d,r10d
00007ffe`8d369452 448b5018 mov r10d,dword ptr [rax+18h]
00007ffe`8d369456 478d8410144301a3 lea r8d,[r8+r10-5CFEBCECh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 374:
00007ffe`8d36945e 458bd0 mov r10d,r8d
00007ffe`8d369461 41c1e20f shl r10d,0Fh
00007ffe`8d369465 41c1e811 shr r8d,11h
00007ffe`8d369469 450bc2 or r8d,r10d
00007ffe`8d36946c 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 377:
00007ffe`8d36946f 448bd2 mov r10d,edx
00007ffe`8d369472 41f7d2 not r10d
00007ffe`8d369475 450bd0 or r10d,r8d
00007ffe`8d369478 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 378:
00007ffe`8d36947b 4103ca add ecx,r10d
00007ffe`8d36947e 448b5034 mov r10d,dword ptr [rax+34h]
00007ffe`8d369482 428d8c11a111084e lea ecx,[rcx+r10+4E0811A1h]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 379:
00007ffe`8d36948a 448bd1 mov r10d,ecx
00007ffe`8d36948d 41c1e215 shl r10d,15h
00007ffe`8d369491 c1e90b shr ecx,0Bh
00007ffe`8d369494 410bca or ecx,r10d
00007ffe`8d369497 4103c8 add ecx,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 382:
00007ffe`8d36949a 458bd1 mov r10d,r9d
00007ffe`8d36949d 41f7d2 not r10d
00007ffe`8d3694a0 440bd1 or r10d,ecx
00007ffe`8d3694a3 4533d0 xor r10d,r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 383:
00007ffe`8d3694a6 4103d2 add edx,r10d
00007ffe`8d3694a9 448b5010 mov r10d,dword ptr [rax+10h]
00007ffe`8d3694ad 428d9412827e53f7 lea edx,[rdx+r10-8AC817Eh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 384:
00007ffe`8d3694b5 448bd2 mov r10d,edx
00007ffe`8d3694b8 41c1e206 shl r10d,6
00007ffe`8d3694bc c1ea1a shr edx,1Ah
00007ffe`8d3694bf 410bd2 or edx,r10d
00007ffe`8d3694c2 03d1 add edx,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 387:
00007ffe`8d3694c4 458bd0 mov r10d,r8d
00007ffe`8d3694c7 41f7d2 not r10d
00007ffe`8d3694ca 440bd2 or r10d,edx
00007ffe`8d3694cd 4433d1 xor r10d,ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 388:
00007ffe`8d3694d0 4503ca add r9d,r10d
00007ffe`8d3694d3 448b502c mov r10d,dword ptr [rax+2Ch]
00007ffe`8d3694d7 478d8c1135f23abd lea r9d,[r9+r10-42C50DCBh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 389:
00007ffe`8d3694df 458bd1 mov r10d,r9d
00007ffe`8d3694e2 41c1e20a shl r10d,0Ah
00007ffe`8d3694e6 41c1e916 shr r9d,16h
00007ffe`8d3694ea 450bca or r9d,r10d
00007ffe`8d3694ed 4403ca add r9d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 392:
00007ffe`8d3694f0 448bd1 mov r10d,ecx
00007ffe`8d3694f3 41f7d2 not r10d
00007ffe`8d3694f6 450bd1 or r10d,r9d
00007ffe`8d3694f9 4433d2 xor r10d,edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 393:
00007ffe`8d3694fc 4503c2 add r8d,r10d
00007ffe`8d3694ff 448b5008 mov r10d,dword ptr [rax+8]
00007ffe`8d369503 478d8410bbd2d72a lea r8d,[r8+r10+2AD7D2BBh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 394:
00007ffe`8d36950b 458bd0 mov r10d,r8d
00007ffe`8d36950e 41c1e20f shl r10d,0Fh
00007ffe`8d369512 41c1e811 shr r8d,11h
00007ffe`8d369516 450bc2 or r8d,r10d
00007ffe`8d369519 4503c1 add r8d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 397:
00007ffe`8d36951c 448bd2 mov r10d,edx
00007ffe`8d36951f 41f7d2 not r10d
00007ffe`8d369522 450bd0 or r10d,r8d
00007ffe`8d369525 4533d1 xor r10d,r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 398:
00007ffe`8d369528 4103ca add ecx,r10d
00007ffe`8d36952b 8b4024 mov eax,dword ptr [rax+24h]
00007ffe`8d36952e 8d8c0191d386eb lea ecx,[rcx+rax-14792C6Fh]
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 399:
00007ffe`8d369535 8bc1 mov eax,ecx
00007ffe`8d369537 c1e015 shl eax,15h
00007ffe`8d36953a c1e90b shr ecx,0Bh
00007ffe`8d36953d 0bc1 or eax,ecx
00007ffe`8d36953f 4103c0 add eax,r8d
00007ffe`8d369542 8bc8 mov ecx,eax
00007ffe`8d369544 0116 add dword ptr [rsi],edx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 402:
00007ffe`8d369546 3936 cmp dword ptr [rsi],esi
00007ffe`8d369548 498bc7 mov rax,r15
00007ffe`8d36954b 0108 add dword ptr [rax],ecx
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 403:
00007ffe`8d36954d 3936 cmp dword ptr [rsi],esi
00007ffe`8d36954f 498bc4 mov rax,r12
00007ffe`8d369552 440100 add dword ptr [rax],r8d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 404:
00007ffe`8d369555 3936 cmp dword ptr [rsi],esi
00007ffe`8d369557 498bc5 mov rax,r13
00007ffe`8d36955a 440108 add dword ptr [rax],r9d
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 28:
00007ffe`8d36955d 41ffc6 inc r14d
00007ffe`8d369560 443bf5 cmp r14d,ebp
00007ffe`8d369563 0f8c87f4ffff jl 00007ffe`8d3689f0
c:\code\blog\md5\Md5DotNet\Md5DotNet\Md5_6_NoTempVar.cs @ 406:
00007ffe`8d369569 4883c478 add rsp,78h
00007ffe`8d36956d 5b pop rbx
00007ffe`8d36956e 5d pop rbp
00007ffe`8d36956f 5e pop rsi
00007ffe`8d369570 5f pop rdi
00007ffe`8d369571 415c pop r12
00007ffe`8d369573 415d pop r13
00007ffe`8d369575 415e pop r14
00007ffe`8d369577 415f pop r15
00007ffe`8d369579 c3 ret
| 46.199092 | 143 | 0.680201 |
3fc1177a6b9cbde8184a2a5438759ba9c1e5161f | 6,375 | c | C | src/tycmd/main.c | trustcrypto/tytools | 4aea4c404d40ac51658332211c3cd81dd30a4c0e | [
"Unlicense"
] | null | null | null | src/tycmd/main.c | trustcrypto/tytools | 4aea4c404d40ac51658332211c3cd81dd30a4c0e | [
"Unlicense"
] | null | null | null | src/tycmd/main.c | trustcrypto/tytools | 4aea4c404d40ac51658332211c3cd81dd30a4c0e | [
"Unlicense"
] | 2 | 2019-02-24T22:04:12.000Z | 2021-01-12T05:45:11.000Z | /* TyTools - public domain
Niels Martignène <[email protected]>
https://neodd.com/tytools
This software is in the public domain. Where that dedication is not
recognized, you are granted a perpetual, irrevocable license to copy,
distribute, and modify this file as you see fit.
See the LICENSE file for more details. */
#ifndef _WIN32
#include <signal.h>
#include <sys/wait.h>
#endif
#include "../libhs/common.h"
#include "../libty/system.h"
#include "main.h"
struct command {
const char *name;
int (*f)(int argc, char *argv[]);
const char *description;
};
int identify(int argc, char *argv[]);
int list(int argc, char *argv[]);
int monitor(int argc, char *argv[]);
int reset(int argc, char *argv[]);
int upload(int argc, char *argv[]);
static const struct command commands[] = {
{"identify", identify, "Identify models compatible with firmware"},
{"list", list, "List available boards"},
{"monitor", monitor, "Open serial (or emulated) connection with board"},
{"reset", reset, "Reset board"},
{"upload", upload, "Upload new firmware"},
{0}
};
const char *tycmd_executable_name;
static const char *main_board_tag = NULL;
static ty_monitor *main_board_monitor;
static ty_board *main_board;
static void print_version(FILE *f)
{
fprintf(f, "%s %s\n", tycmd_executable_name, ty_version_string());
}
static void print_main_usage(FILE *f)
{
fprintf(f, "usage: %s <command> [options]\n\n", tycmd_executable_name);
print_common_options(f);
fprintf(f, "\n");
fprintf(f, "Commands:\n");
for (const struct command *c = commands; c->name; c++)
fprintf(f, " %-24s %s\n", c->name, c->description);
fputc('\n', f);
fprintf(f, "Supported models:\n");
for (unsigned int i = 0; i < ty_models_count; i++) {
if (ty_models[i].mcu)
fprintf(f, " - %-22s (%s)\n", ty_models[i].name, ty_models[i].mcu);
}
}
void print_common_options(FILE *f)
{
fprintf(f, "General options:\n"
" --help Show help message\n"
" --version Display version information\n\n"
" -B, --board <tag> Work with board <tag> instead of first detected\n"
" -q, --quiet Disable output, use -qqq to silence errors\n");
}
static inline unsigned int get_board_priority(ty_board *board)
{
return ty_models[ty_board_get_model(board)].priority;
}
static int board_callback(ty_board *board, ty_monitor_event event, void *udata)
{
TY_UNUSED(udata);
switch (event) {
case TY_MONITOR_EVENT_ADDED: {
if ((!main_board || get_board_priority(board) > get_board_priority(main_board))
&& ty_board_matches_tag(board, main_board_tag)) {
ty_board_unref(main_board);
main_board = ty_board_ref(board);
}
} break;
case TY_MONITOR_EVENT_CHANGED:
case TY_MONITOR_EVENT_DISAPPEARED: {
} break;
case TY_MONITOR_EVENT_DROPPED: {
if (main_board == board) {
ty_board_unref(main_board);
main_board = NULL;
}
} break;
}
return 0;
}
static int init_monitor()
{
if (main_board_monitor)
return 0;
ty_monitor *monitor = NULL;
int r;
r = ty_monitor_new(&monitor);
if (r < 0)
goto error;
r = ty_monitor_register_callback(monitor, board_callback, NULL);
if (r < 0)
goto error;
r = ty_monitor_start(monitor);
if (r < 0)
goto error;
main_board_monitor = monitor;
return 0;
error:
ty_monitor_free(monitor);
return r;
}
int get_monitor(ty_monitor **rmonitor)
{
int r = init_monitor();
if (r < 0)
return r;
*rmonitor = main_board_monitor;
return 0;
}
int get_board(ty_board **rboard)
{
int r = init_monitor();
if (r < 0)
return r;
if (!main_board) {
if (main_board_tag) {
return ty_error(TY_ERROR_NOT_FOUND, "Board '%s' not found", main_board_tag);
} else {
return ty_error(TY_ERROR_NOT_FOUND, "No board available");
}
}
*rboard = ty_board_ref(main_board);
return 0;
}
bool parse_common_option(ty_optline_context *optl, char *arg)
{
if (strcmp(arg, "--board") == 0 || strcmp(arg, "-B") == 0) {
main_board_tag = ty_optline_get_value(optl);
if (!main_board_tag) {
ty_log(TY_LOG_ERROR, "Option '--board' takes an argument");
return false;
}
return true;
} else if (strcmp(arg, "--quiet") == 0 || strcmp(arg, "-q") == 0) {
ty_config_verbosity--;
return true;
} else {
ty_log(TY_LOG_ERROR, "Unknown option '%s'", arg);
return false;
}
}
int main(int argc, char *argv[])
{
const struct command *cmd;
int r;
if (argc && *argv[0]) {
tycmd_executable_name = argv[0] + strlen(argv[0]);
while (tycmd_executable_name > argv[0] && !strchr(TY_PATH_SEPARATORS, tycmd_executable_name[-1]))
tycmd_executable_name--;
} else {
#ifdef _WIN32
tycmd_executable_name = TY_CONFIG_TYCMD_EXECUTABLE ".exe";
#else
tycmd_executable_name = TY_CONFIG_TYCMD_EXECUTABLE;
#endif
}
hs_log_set_handler(ty_libhs_log_handler, NULL);
r = ty_models_load_patch(NULL);
if (r == TY_ERROR_MEMORY)
return EXIT_FAILURE;
if (argc < 2) {
print_main_usage(stderr);
return EXIT_SUCCESS;
}
if (strcmp(argv[1], "help") == 0 || strcmp(argv[1], "--help") == 0) {
if (argc > 2 && *argv[2] != '-') {
argv[1] = argv[2];
argv[2] = "--help";
} else {
print_main_usage(stdout);
return EXIT_SUCCESS;
}
} else if (strcmp(argv[1], "--version") == 0) {
print_version(stdout);
return EXIT_SUCCESS;
}
for (cmd = commands; cmd->name; cmd++) {
if (strcmp(cmd->name, argv[1]) == 0)
break;
}
if (!cmd->name) {
ty_log(TY_LOG_ERROR, "Unknown command '%s'", argv[1]);
print_main_usage(stderr);
return EXIT_FAILURE;
}
r = (*cmd->f)(argc - 1, argv + 1);
ty_board_unref(main_board);
ty_monitor_free(main_board_monitor);
return r;
}
| 26.127049 | 105 | 0.589647 |
a82d1405a4997f81ac3e98e1d2c37129a9418d6b | 3,047 | rs | Rust | src/libfolder/server_data.rs | DylanTheVillain/Rust-Game | b28fe7aef4fbd503c671448a06a2a5ae5735e539 | [
"MIT"
] | null | null | null | src/libfolder/server_data.rs | DylanTheVillain/Rust-Game | b28fe7aef4fbd503c671448a06a2a5ae5735e539 | [
"MIT"
] | null | null | null | src/libfolder/server_data.rs | DylanTheVillain/Rust-Game | b28fe7aef4fbd503c671448a06a2a5ae5735e539 | [
"MIT"
] | null | null | null | use little_rust_tcp::data::ServerData;
use std::io::TcpStream;
use std::collections::ring_buf::RingBuf;
use std::sync::{Arc, Mutex};
use std::string::String;
pub enum ServerState
{
GatherClients,
ActiveGame,
Idle
}
pub struct DataAnalyzerStruct
{
unprocessed_data: RingBuf<String>,
server_data: Arc<Mutex<RingBuf<String>>>,
server_state: ServerState
}
pub trait DataAnalyzer
{
fn new(new_server_data: Arc<Mutex<RingBuf<String>>>) -> Self;
fn interpret_data(&mut self);
fn alter_state(&mut self, new_state: ServerState);
}
trait PrivateDataAnalyzerTrait
{
fn push_request_to_unprocessed(&mut self);
}
impl PrivateDataAnalyzerTrait for DataAnalyzerStruct
{
fn push_request_to_unprocessed(&mut self)
{
let mut locked_server_data = self.server_data.lock().unwrap();
while locked_server_data.len() > 0
{
let request_string = locked_server_data.pop_front();
self.unprocessed_data.push_back(request_string.unwrap());
}
}
}
impl DataAnalyzer for DataAnalyzerStruct
{
fn new(new_server_data: Arc<Mutex<RingBuf<String>>>) -> DataAnalyzerStruct
{
let ringbuf = RingBuf::new();
let state = ServerState::Idle;
return DataAnalyzerStruct{unprocessed_data: ringbuf, server_data: new_server_data, server_state: state};
}
fn interpret_data(&mut self)
{
loop
{
if self.unprocessed_data.len() == 0
{
self.push_request_to_unprocessed();
}
let request_string = self.unprocessed_data.pop_front();
if request_string != None
{
match self.server_state
{
// Place Holder
ServerState::Idle => println!("{}", request_string.unwrap()),
ServerState::ActiveGame => println!("ActiveGame"),
ServerState::GatherClients => println!("GatherClients")
}
}
}
}
fn alter_state(&mut self, new_state: ServerState)
{
self.server_state = new_state;
}
}
pub struct ServerDataStruct
{
request_buffer: Arc<Mutex<RingBuf<String>>>
}
pub trait ServerDataConstructor
{
fn new(request_buffer_new: Arc<Mutex<RingBuf<String>>>) -> Self;
}
impl ServerDataConstructor for ServerDataStruct
{
fn new(request_buffer_new: Arc<Mutex<RingBuf<String>>>) -> ServerDataStruct
{
return ServerDataStruct{request_buffer: request_buffer_new};
}
}
impl ServerData for ServerDataStruct
{
fn process_request_data(&mut self, mut request: TcpStream)
{
let message = request.read_to_string();
let someobject = message.ok();
if someobject != None
{
let string = someobject.unwrap();
if string.len() > 0
{
let mut locked_request_buffer = self.request_buffer.lock().unwrap();
locked_request_buffer.push_back(string);
}
}
}
}
| 25.822034 | 112 | 0.621267 |
6055e125d8936316518bfd636a0b15ce37532704 | 1,221 | html | HTML | src/app/chat/chat.component.html | shimniok/sat-chat-client | cafea048b12c0869e1e9dffcf640dd202184e0b4 | [
"Apache-2.0"
] | null | null | null | src/app/chat/chat.component.html | shimniok/sat-chat-client | cafea048b12c0869e1e9dffcf640dd202184e0b4 | [
"Apache-2.0"
] | 6 | 2021-05-16T18:28:58.000Z | 2021-05-16T18:36:20.000Z | src/app/chat/chat.component.html | shimniok/sat-chat-client | cafea048b12c0869e1e9dffcf640dd202184e0b4 | [
"Apache-2.0"
] | null | null | null | <mat-drawer-container>
<div id="background">
<div class="box">
<mat-toolbar class="row header" color="primary">
<div><h2>Sat Chat</h2></div>
<div>
<button mat-icon-button class="button-container" aria-label="icon-button with menu icon">
<mat-icon>account_circle</mat-icon>
<mat-label>{{ me.name }}</mat-label>
</button>
</div>
<div>
<button mat-icon-button on-click="drawer.toggle()" class="button-container" aria-label="icon-button with menu icon">
<mat-icon>settings</mat-icon>
</button>
<button mat-icon-button on-click="logout()" class="button-container" aria-label="icon-button with menu icon">
<mat-icon>logout</mat-icon>
</button>
</div>
</mat-toolbar>
<div class="row content">
<div class="message-col">
<app-messages></app-messages>
</div>
</div>
<app-input class="row footer"></app-input>
</div>
</div>
<mat-drawer #drawer class="sidenav" mode="over">
<app-settings></app-settings>
</mat-drawer>
</mat-drawer-container>
| 33.916667 | 128 | 0.536446 |
5b4a70723f105a5eb574908ff42800566a8fe030 | 8,143 | h | C | gdx-jnigen/src/main/resources/com/badlogic/gdx/jnigen/resources/headers/jdwpTransport.h | marcin85/gdx-jnigen | c1b9fed0d5bd5a56d47b66ff538c7932f21008bf | [
"Apache-2.0"
] | 28 | 2019-09-19T12:13:44.000Z | 2022-03-31T05:05:29.000Z | gdx-jnigen/src/main/resources/com/badlogic/gdx/jnigen/resources/headers/jdwpTransport.h | marcin85/gdx-jnigen | c1b9fed0d5bd5a56d47b66ff538c7932f21008bf | [
"Apache-2.0"
] | 18 | 2019-09-19T12:14:37.000Z | 2022-03-30T03:23:24.000Z | gdx-jnigen/src/main/resources/com/badlogic/gdx/jnigen/resources/headers/jdwpTransport.h | marcin85/gdx-jnigen | c1b9fed0d5bd5a56d47b66ff538c7932f21008bf | [
"Apache-2.0"
] | 14 | 2020-04-27T14:05:31.000Z | 2022-03-31T05:05:38.000Z | /*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* Java Debug Wire Protocol Transport Service Provider Interface.
*/
#ifndef JDWPTRANSPORT_H
#define JDWPTRANSPORT_H
#include "jni.h"
enum {
JDWPTRANSPORT_VERSION_1_0 = 0x00010000,
JDWPTRANSPORT_VERSION_1_1 = 0x00010001
};
#ifdef __cplusplus
extern "C" {
#endif
struct jdwpTransportNativeInterface_;
struct _jdwpTransportEnv;
#ifdef __cplusplus
typedef _jdwpTransportEnv jdwpTransportEnv;
#else
typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
#endif /* __cplusplus */
/*
* Errors. Universal errors with JVMTI/JVMDI equivalents keep the
* values the same.
*/
typedef enum {
JDWPTRANSPORT_ERROR_NONE = 0,
JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
JDWPTRANSPORT_ERROR_INTERNAL = 113,
JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
JDWPTRANSPORT_ERROR_IO_ERROR = 202,
JDWPTRANSPORT_ERROR_TIMEOUT = 203,
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
} jdwpTransportError;
/*
* Structure to define capabilities
*/
typedef struct {
unsigned int can_timeout_attach :1;
unsigned int can_timeout_accept :1;
unsigned int can_timeout_handshake :1;
unsigned int reserved3 :1;
unsigned int reserved4 :1;
unsigned int reserved5 :1;
unsigned int reserved6 :1;
unsigned int reserved7 :1;
unsigned int reserved8 :1;
unsigned int reserved9 :1;
unsigned int reserved10 :1;
unsigned int reserved11 :1;
unsigned int reserved12 :1;
unsigned int reserved13 :1;
unsigned int reserved14 :1;
unsigned int reserved15 :1;
} JDWPTransportCapabilities;
/*
* Structures to define packet layout.
*
* See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
*/
#define JDWP_HEADER_SIZE 11
enum {
/*
* If additional flags are added that apply to jdwpCmdPacket,
* then debugLoop.c: reader() will need to be updated to
* accept more than JDWPTRANSPORT_FLAGS_NONE.
*/
JDWPTRANSPORT_FLAGS_NONE = 0x0,
JDWPTRANSPORT_FLAGS_REPLY = 0x80
};
typedef struct {
jint len;
jint id;
jbyte flags;
jbyte cmdSet;
jbyte cmd;
jbyte *data;
} jdwpCmdPacket;
typedef struct {
jint len;
jint id;
jbyte flags;
jshort errorCode;
jbyte *data;
} jdwpReplyPacket;
typedef struct {
union {
jdwpCmdPacket cmd;
jdwpReplyPacket reply;
} type;
} jdwpPacket;
/*
* JDWP functions called by the transport.
*/
typedef struct jdwpTransportCallback {
void *(*alloc)(jint numBytes); /* Call this for all allocations */
void (*free)(void *buffer); /* Call this for all deallocations */
} jdwpTransportCallback;
typedef jint (*jdwpTransport_OnLoad_t)(JavaVM *jvm,
jdwpTransportCallback *callback,
jint version,
jdwpTransportEnv** env);
/*
* JDWP transport configuration from the agent.
*/
typedef struct jdwpTransportConfiguration {
/* Field added in JDWPTRANSPORT_VERSION_1_1: */
const char* allowed_peers; /* Peers allowed for connection */
} jdwpTransportConfiguration;
/* Function Interface */
struct jdwpTransportNativeInterface_ {
/* 1 : RESERVED */
void *reserved1;
/* 2 : Get Capabilities */
jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
JDWPTransportCapabilities *capabilities_ptr);
/* 3 : Attach */
jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
const char* address,
jlong attach_timeout,
jlong handshake_timeout);
/* 4: StartListening */
jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
const char* address,
char** actual_address);
/* 5: StopListening */
jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
/* 6: Accept */
jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
jlong accept_timeout,
jlong handshake_timeout);
/* 7: IsOpen */
jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
/* 8: Close */
jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
/* 9: ReadPacket */
jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
jdwpPacket *pkt);
/* 10: Write Packet */
jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
const jdwpPacket* pkt);
/* 11: GetLastError */
jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
char** error);
/* 12: SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
jdwpTransportError (JNICALL *SetTransportConfiguration)(jdwpTransportEnv* env,
jdwpTransportConfiguration *config);
};
/*
* Use inlined functions so that C++ code can use syntax such as
* env->Attach("mymachine:5000", 10*1000, 0);
*
* rather than using C's :-
*
* (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
*/
struct _jdwpTransportEnv {
const struct jdwpTransportNativeInterface_ *functions;
#ifdef __cplusplus
jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
return functions->GetCapabilities(this, capabilities_ptr);
}
jdwpTransportError Attach(const char* address, jlong attach_timeout,
jlong handshake_timeout) {
return functions->Attach(this, address, attach_timeout, handshake_timeout);
}
jdwpTransportError StartListening(const char* address,
char** actual_address) {
return functions->StartListening(this, address, actual_address);
}
jdwpTransportError StopListening(void) {
return functions->StopListening(this);
}
jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
return functions->Accept(this, accept_timeout, handshake_timeout);
}
jboolean IsOpen(void) {
return functions->IsOpen(this);
}
jdwpTransportError Close(void) {
return functions->Close(this);
}
jdwpTransportError ReadPacket(jdwpPacket *pkt) {
return functions->ReadPacket(this, pkt);
}
jdwpTransportError WritePacket(const jdwpPacket* pkt) {
return functions->WritePacket(this, pkt);
}
jdwpTransportError GetLastError(char** error) {
return functions->GetLastError(this, error);
}
/* SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
jdwpTransportError SetTransportConfiguration(jdwpTransportEnv* env,
return functions->SetTransportConfiguration(this, config);
}
#endif /* __cplusplus */
};
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* JDWPTRANSPORT_H */
| 29.397112 | 85 | 0.680339 |
598e14f6de1820ccc9fe599716257368fc3a7d7e | 763 | asm | Assembly | oeis/027/A027284.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/027/A027284.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/027/A027284.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A027284: a(n) = Sum_{k=0..2*n-2} T(n,k) * T(n,k+2), with T given by A026584.
; Submitted by Christian Krause
; 5,28,167,1024,6359,39759,249699,1573524,9943905,62994733,399936573,2543992514,16210331727,103453402718,661164765879,4230874777682,27105456280491,173838468040879,1115987495619427,7170725839251598,46113396476943241,296773029762031990,1911309537927897841,12317577677016576702,79430597492434178357,512508428366432082855,3308635530136216620397,21370619104221040113374,138099574695861641336851,892817273227988269306873,5774531935584492121780147,37363264174853993828467912,241845115480657044506529237
mul $0,2
add $0,2
seq $0,26587 ; a(n) = T(n, n-2), T given by A026584. Also a(n) = number of integer strings s(0),...,s(n) counted by T, such that s(n)=2.
| 95.375 | 495 | 0.817824 |
2726df2d2a6794c5f06c5a405983b4f7d21f23e1 | 3,992 | sql | SQL | data/scraping/fake_extra_virgin_olive_oil_dataprices.sql | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | data/scraping/fake_extra_virgin_olive_oil_dataprices.sql | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | 8 | 2019-12-04T23:41:37.000Z | 2022-02-10T10:05:09.000Z | data/scraping/fake_extra_virgin_olive_oil_dataprices.sql | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2200, '2019-07-1 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-2 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2280, '2019-07-6 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2280, '2019-07-10 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2500, '2019-07-12 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2400, '2019-07-14 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-15 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2200, '2019-07-16 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2100, '2019-07-18 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-19 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-20 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-22 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(3300, '2019-07-23 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2500, '2019-07-24 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-25 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2600, '2019-07-26 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2600, '2019-07-28 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2500, '2019-07-29 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-07-30 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2200, '2019-08-1 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2100, '2019-08-2 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2200, '2019-08-3 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2300, '2019-08-4 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2500, '2019-08-5 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2500, '2019-08-6 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2900, '2019-08-7 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(2800, '2019-08-8 00:00:00.000', '2019-07-12 00:00:00', 1);
INSERT INTO loones.data_dataprice (price, `date`, add_date, subcategory_id) VALUES(3200, '2019-08-9 00:00:00.000', '2019-07-12 00:00:00', 1);
| 137.655172 | 142 | 0.719439 |
182c3e9bd1ca6dfabe9bd3fcce50fd87ce2bad99 | 213 | css | CSS | claswork 1problem.css | cs-fullstack-2019-spring/html-position-type-updated-cw-clyde5649 | c862540457f7f8ad85a9bbbdf0888a8c63005941 | [
"Apache-2.0"
] | null | null | null | claswork 1problem.css | cs-fullstack-2019-spring/html-position-type-updated-cw-clyde5649 | c862540457f7f8ad85a9bbbdf0888a8c63005941 | [
"Apache-2.0"
] | null | null | null | claswork 1problem.css | cs-fullstack-2019-spring/html-position-type-updated-cw-clyde5649 | c862540457f7f8ad85a9bbbdf0888a8c63005941 | [
"Apache-2.0"
] | null | null | null |
code {
background: gray;
color: black;
display: block;
}
}
header {
position: center;
margin: auto;
}
section{
position: absolute;
right: 600px;
display: inline-block;
}
| 7.888889 | 26 | 0.568075 |
855fb1a6226de687bfb07d86f4cc097180d4d2bd | 11,851 | js | JavaScript | extensions/lukasz-wronski.ftp-sync-0.3.2/modules/sync-helper.js | maxemiliang/vscode-ext | 3936431de4494e923d8b273ac399de2d65c2ea2d | [
"MIT"
] | null | null | null | extensions/lukasz-wronski.ftp-sync-0.3.2/modules/sync-helper.js | maxemiliang/vscode-ext | 3936431de4494e923d8b273ac399de2d65c2ea2d | [
"MIT"
] | 1 | 2020-07-21T12:37:28.000Z | 2020-07-21T12:37:28.000Z | extensions/lukasz-wronski.ftp-sync-0.3.2/modules/sync-helper.js | maxemiliang/vscode-ext | 3936431de4494e923d8b273ac399de2d65c2ea2d | [
"MIT"
] | null | null | null | var fs = require("fs");
var path = require("path");
var upath = require("upath");
var mkdirp = require("mkdirp");
var fswalk = require('fs-walk');
var _ = require('lodash');
var isIgnored = require('./is-ignored');
var output = require("./output");
var FtpWrapper = require("./ftp-wrapper");
var SftpWrapper = require("./sftp-wrapper");
var ftp;
//add options
var listRemoteFiles = function(remotePath, callback, originalRemotePath, options) {
output("[sync-helper] listRemoteFiles");
remotePath = upath.toUnix(remotePath);
if(!originalRemotePath)
originalRemotePath = remotePath;
ftp.list(remotePath, function(err, remoteFiles) {
if(err) {
if(err.code == 450)
callback(null, []);
else
callback(err);
return;
}
var result = [];
var subdirs = [];
if(remoteFiles.length == 0)
callback(null, result);
remoteFiles.forEach(function(fileInfo) {
//when listing remoteFiles by onPrepareRemoteProgress, ignore remoteFiles
if (isIgnored(ftpConfig.ignore, path.join(options.remotePath, fileInfo.name))) return;
if(fileInfo.name == "." || fileInfo.name == "..") return;
var remoteItemPath = upath.toUnix(path.join(remotePath, fileInfo.name));
if(fileInfo.type != 'd')
result.push({
name: remoteItemPath,
size: fileInfo.size,
isDir: false
})
else if(fileInfo.type == 'd') {
subdirs.push(fileInfo);
result.push({ name: remoteItemPath, isDir: true });
}
});
var finish = function() {
result.forEach(function(item) {
if(_.startsWith(item.name, originalRemotePath))
item.name = item.name.replace(originalRemotePath, "");
if(item.name[0] == "/") item.name = item.name.substr(1);
if(onPrepareRemoteProgress) onPrepareRemoteProgress(item.name);
});
result = _.sortBy(result, function(item) { return item.name });
callback(null, result);
}
var listNextSubdir = function() {
var subdir = subdirs.pop();
var subPath = upath.toUnix(path.join(remotePath, subdir.name));
listRemoteFiles(subPath, function(err, subResult) {
if(err) { callback(err); return; }
result = _.union(result, subResult)
if(subdirs.length == 0)
finish();
else
listNextSubdir();
}, originalRemotePath, options);
}
if(subdirs.length == 0)
finish();
else
listNextSubdir();
});
}
//add options
var listLocalFiles = function(localPath, callback, options) {
output("[sync-helper] listLocalFiles");
var files = [];
fswalk.walk(localPath, function(basedir, filename, stat, next) {
var filePath = path.join(basedir, filename);
//when listing localFiles by onPrepareLocalProgress, ignore localfile
if (isIgnored(ftpConfig.ignore, filePath)) return next();
filePath = filePath.replace(localPath, "");
filePath = upath.toUnix(filePath);
if(filePath[0] == "/") filePath = filePath.substr(1);
if(onPrepareLocalProgress) onPrepareLocalProgress(filePath);
files.push({
name: filePath,
size: stat.size,
isDir: stat.isDirectory()
});
next();
}, function(err) {
callback(err, files);
});
}
var prepareSyncObject = function(remoteFiles, localFiles, options, callback) {
output("[sync-helper] prepareSyncObject");
var from = options.upload ? localFiles : remoteFiles;
var to = options.upload ? remoteFiles : localFiles;
var skipIgnores = function(file) {
return isIgnored(ftpConfig.ignore, path.join(options.remotePath, file.name));
}
_.remove(from, skipIgnores);
_.remove(to, skipIgnores);
var filesToUpdate = [];
var filesToAdd = [];
var dirsToAdd = [];
var filesToRemove = [];
var dirsToRemove = [];
if(options.mode == "force")
from.forEach(function(fromFile) {
var toEquivalent = to.find(function(toFile) { return toFile.name == fromFile.name });
if(toEquivalent && !fromFile.isDir)
filesToUpdate.push(fromFile.name);
if(!toEquivalent) {
if(fromFile.isDir)
dirsToAdd.push(fromFile.name)
else
filesToAdd.push(fromFile.name);
}
});
else
from.forEach(function(fromFile) {
var toEquivalent = to.find(function(toFile) { return toFile.name == fromFile.name });
if(!toEquivalent && !fromFile.isDir) filesToAdd.push(fromFile.name);
if(!toEquivalent && fromFile.isDir) dirsToAdd.push(fromFile.name);
if(toEquivalent) toEquivalent.wasOnFrom = true;
if(toEquivalent && toEquivalent.size != fromFile.size && !fromFile.isDir)
filesToUpdate.push(fromFile.name);
});
if(options.mode == "full")
to.filter(function(toFile) { return !toFile.wasOnFrom })
.forEach(function(toFile) {
if(toFile.isDir)
dirsToRemove.push(toFile.name)
else
filesToRemove.push(toFile.name);
});
callback(null, {
_readMe: "Review list of sync operations, then use Ftp-sync: Commit command to accept changes",
_warning: "This file should not be saved, reopened review file won't work!",
filesToUpdate: filesToUpdate,
filesToAdd: filesToAdd,
dirsToAdd: dirsToAdd,
filesToRemove: filesToRemove,
dirsToRemove: dirsToRemove
});
}
var totalOperations = function(sync) {
return sync.filesToUpdate.length
+ sync.filesToAdd.length
+ sync.dirsToAdd.length
+ sync.filesToRemove.length
+ sync.dirsToRemove.length
}
var onPrepareRemoteProgress, onPrepareLocalProgress, onSyncProgress;
var connected = false;
var connect = function(callback) {
output("[sync-helper] connect");
if(connected == false)
{
ftp.connect(ftpConfig);
ftp.onready(function() {
connected = true;
if(!ftpConfig.passive && ftpConfig.protocol != "sftp")
callback();
else if(ftpConfig.protocol == "sftp")
ftp.goSftp(callback);
else if(ftpConfig.passive)
ftp.pasv(callback);
});
ftp.onerror(callback);
ftp.onclose(function(err) {
output("[sync-helper] connClosed");
connected = false;
});
}
else
callback();
}
var prepareSync = function(options, callback) {
output("[sync-helper] prepareSync");
connect(function(err) {
if(err) callback(err);
else listRemoteFiles(options.remotePath, function(err, remoteFiles) {
if(err) callback(err);
else listLocalFiles(options.localPath, function(err, localFiles) {
if(err) callback(err);
else prepareSyncObject(remoteFiles, localFiles, options, callback);
}, options)
}, null, options);
});
}
var executeSyncLocal = function(sync, options, callback) {
output("[sync-helper] executeSyncLocal");
if(onSyncProgress != null)
onSyncProgress(sync.startTotal - totalOperations(sync), sync.startTotal);
var replaceFile = function(fileToReplace) {
var local = path.join(options.localPath, fileToReplace);
var remote = upath.toUnix(path.join(options.remotePath, fileToReplace));
ftp.get(remote, local, function(err) {
if(err) callback(err);
else executeSyncLocal(sync, options, callback);
});
}
if(sync.dirsToAdd.length > 0) {
var dirToAdd = sync.dirsToAdd.pop();
var localPath = path.join(options.localPath, dirToAdd);
mkdirp(localPath, function(err) {
if(err) callback(err); else executeSyncLocal(sync, options, callback);
});
} else if(sync.filesToAdd.length > 0) {
var fileToAdd = sync.filesToAdd.pop();
replaceFile(fileToAdd);
} else if(sync.filesToUpdate.length > 0) {
var fileToUpdate = sync.filesToUpdate.pop();
replaceFile(fileToUpdate);
} else if(sync.filesToRemove.length > 0) {
var fileToRemove = sync.filesToRemove.pop();
var localPath = path.join(options.localPath, fileToRemove);
fs.unlink(localPath, function(err) {
if(err) callback(err); else executeSyncLocal(sync, options, callback);
});
} else if(sync.dirsToRemove.length > 0) {
var dirToRemove = sync.dirsToRemove.pop();
var localPath = path.join(options.localPath, dirToRemove);
fs.rmdir(localPath, function(err) {
if(err) callback(err); else executeSyncLocal(sync, options, callback);
});
} else {
callback();
}
}
var executeSyncRemote = function(sync, options, callback) {
output("[sync-helper] executeSyncRemote");
if(onSyncProgress != null)
onSyncProgress(sync.startTotal - totalOperations(sync), sync.startTotal);
var replaceFile = function(fileToReplace) {
var local = path.join(options.localPath, fileToReplace);
var remote = upath.toUnix(path.join(options.remotePath, fileToReplace));
ftp.put(local, remote, function(err) {
if(err) callback(err); else executeSyncRemote(sync, options, callback);
});
}
if(sync.dirsToAdd.length > 0) {
var dirToAdd = sync.dirsToAdd.shift();
var remotePath = upath.toUnix(path.join(options.remotePath, dirToAdd));
ftp.mkdir(remotePath, function(err) {
if(err) callback(err); else executeSyncRemote(sync, options, callback);
})
} else if(sync.filesToAdd.length > 0) {
var fileToAdd = sync.filesToAdd.shift();
replaceFile(fileToAdd);
} else if(sync.filesToUpdate.length > 0) {
var fileToUpdate = sync.filesToUpdate.shift();
replaceFile(fileToUpdate);
} else if(sync.filesToRemove.length > 0) {
var fileToRemove = sync.filesToRemove.pop();
var remotePath = upath.toUnix(path.join(options.remotePath, fileToRemove));
ftp.delete(remotePath, function(err) {
if(err) callback(err); else executeSyncRemote(sync, options, callback);
});
} else if(sync.dirsToRemove.length > 0) {
var dirToRemove = sync.dirsToRemove.pop();
var remotePath = upath.toUnix(path.join(options.remotePath, dirToRemove));
ftp.rmdir(remotePath, function(err) {
if(err) callback(err); else executeSyncRemote(sync, options, callback);
});
} else {
callback();
}
}
var ensureDirExists = function(remoteDir, callback) {
ftp.list(path.posix.join(remoteDir, ".."), function(err, list) {
if(err)
ensureDirExists(path.posix.join(remoteDir, ".."), function() {
ensureDirExists(remoteDir, callback);
});
else if(_.any(list, f => f.name == path.basename(remoteDir)))
callback();
else
ftp.mkdir(remoteDir, function(err) {
if(err) callback(err)
else callback();
})
});
}
var uploadFile = function(localPath, rootPath, callback) {
output("[sync-helper] uploadFile");
var remotePath = upath.toUnix(path.join(ftpConfig.remote, localPath.replace(rootPath, '')));
var remoteDir = upath.toUnix(path.dirname(remotePath));
connect(function(err) {
if(err) callback(err);
var putFile = function() {
ftp.put(localPath, remotePath, function(err) {
callback(err);
})
}
if(remoteDir != ".")
ensureDirExists(remoteDir, function(err) {
if(err) callback(err);
else putFile();
})
else
putFile();
})
}
var executeSync = function(sync, options, callback) {
output("[sync-helper] executeSync");
sync.startTotal = totalOperations(sync);
connect(function(err) {
if(err) callback(err);
else if(options.upload)
executeSyncRemote(sync, options, callback);
else
executeSyncLocal(sync, options, callback);
});
}
var ftpConfig;
var helper = {
useConfig: function(config) {
if(!ftpConfig || ftpConfig.protocol != config.protocol)
ftp = config.protocol == "sftp" ? new SftpWrapper() : new FtpWrapper();
ftpConfig = config;
},
getConfig: function() {
return ftpConfig;
},
prepareSync: prepareSync,
executeSync: executeSync,
totalOperations: totalOperations,
uploadFile: uploadFile,
disconnect: function() {
ftp.end();
},
onPrepareRemoteProgress: function(callback) {
onPrepareRemoteProgress = callback;
},
onPrepareLocalProgress: function(callback) {
onPrepareLocalProgress = callback;
},
onSyncProgress: function(callback) {
onSyncProgress = callback;
}
}
module.exports = function(config) {
return helper;
} | 30.861979 | 97 | 0.673192 |
7fd9b11da820bc6736217f5f27e7bf7ff873d383 | 834 | go | Go | internal/web/actions/default/settings/authority/expire/renew.go | 1uLang/EdgeAdmin | b10d1ea7e53e2c887bbd4aaa733d29495261e3d3 | [
"BSD-3-Clause"
] | null | null | null | internal/web/actions/default/settings/authority/expire/renew.go | 1uLang/EdgeAdmin | b10d1ea7e53e2c887bbd4aaa733d29495261e3d3 | [
"BSD-3-Clause"
] | 3 | 2021-06-30T07:50:34.000Z | 2021-11-25T12:41:01.000Z | internal/web/actions/default/settings/authority/expire/renew.go | 1uLang/EdgeAdmin | b10d1ea7e53e2c887bbd4aaa733d29495261e3d3 | [
"BSD-3-Clause"
] | 1 | 2021-06-09T08:04:56.000Z | 2021-06-09T08:04:56.000Z | package expire
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/index"
"github.com/iwind/TeaGo/actions"
)
type RenewAction struct {
actionutils.ParentAction
}
func (this *RenewAction) Init() {
this.Nav("", "", "index")
}
func (this *RenewAction) RunGet(params struct{}) {
var err error
this.Data["systemCode"], _, err = index.CheckExpire()
if err != nil {
this.ErrorPage(err)
}
this.Show()
}
func (this *RenewAction) RunPost(params struct {
Secret string
Must *actions.Must
CSRF *actionutils.CSRF
}) {
params.Must.Field("secret", params.Secret).Require("请输入续订密钥")
err := index.Renew(params.Secret)
if err != nil {
// 日志
this.CreateLogInfo("系统续订失败:%v", err)
this.FailField("secret", err.Error())
}
this.Success()
}
| 18.954545 | 67 | 0.70024 |
d78eb474aaf84b19695c9385338b83963203451f | 244 | sql | SQL | src/test/resources/whereA.test_14.sql | jdkoren/sqlite-parser | 9adf75ff5eca36f6e541594d2e062349f9ced654 | [
"MIT"
] | 131 | 2015-03-31T18:59:14.000Z | 2022-03-09T09:51:06.000Z | src/test/resources/whereA.test_14.sql | jdkoren/sqlite-parser | 9adf75ff5eca36f6e541594d2e062349f9ced654 | [
"MIT"
] | 20 | 2015-03-31T21:35:38.000Z | 2018-07-02T16:15:51.000Z | src/test/resources/whereA.test_14.sql | jdkoren/sqlite-parser | 9adf75ff5eca36f6e541594d2e062349f9ced654 | [
"MIT"
] | 43 | 2015-04-28T02:01:55.000Z | 2021-06-06T09:33:38.000Z | -- whereA.test
--
-- db eval {
-- CREATE TABLE t2(x);
-- INSERT INTO t2 VALUES(1);
-- INSERT INTO t2 VALUES(2);
-- SELECT x FROM t2;
-- }
CREATE TABLE t2(x);
INSERT INTO t2 VALUES(1);
INSERT INTO t2 VALUES(2);
SELECT x FROM t2; | 20.333333 | 32 | 0.598361 |
389889c718046b9795dec0b93748949c44d07176 | 40,070 | c | C | main.c | 3RUN/Dungeon-Generation-Algorithm | 17a71592d92a4ec72eedc93198fcee5f41a31153 | [
"MIT"
] | null | null | null | main.c | 3RUN/Dungeon-Generation-Algorithm | 17a71592d92a4ec72eedc93198fcee5f41a31153 | [
"MIT"
] | null | null | null | main.c | 3RUN/Dungeon-Generation-Algorithm | 17a71592d92a4ec72eedc93198fcee5f41a31153 | [
"MIT"
] | null | null | null |
// tutorial/idea from https://www.boristhebrave.com/2020/09/12/dungeon-generation-in-binding-of-isaac/
// also some details are taken from 'Binding of Isaac: Explained!' videos from https://youtube.com/playlist?list=PLm_aCwRGMyAdCkytm9sp2-X7jfEU9ccXm
#include <acknex.h>
#include <default.c>
#include <windows.h>
#include <strio.c>
#include "console.h"
#define PRAGMA_POINTER
#include "list.h"
// max grid size
#define GRID_MAX_X 32
#define GRID_MAX_Y 32
#define ROOM_SIZE 32
// different room types
#define ROOM_NONE 0
#define ROOM_NORMAL 1
#define ROOM_START 2
#define ROOM_BOSS 3
#define ROOM_SHOP 4
#define ROOM_ITEM 5
#define ROOM_SECRET 6
#define ROOM_SUPER_SECRET 7
STRING *room_only_up_mdl = "room_only_up.mdl";
STRING *room_only_right_mdl = "room_only_right.mdl";
STRING *room_only_bottom_mdl = "room_only_bottom.mdl";
STRING *room_only_left_mdl = "room_only_left.mdl";
STRING *room_up_right_mdl = "room_up_right.mdl";
STRING *room_right_bottom_mdl = "room_right_bottom.mdl";
STRING *room_bottom_left_mdl = "room_bottom_left.mdl";
STRING *room_left_up_mdl = "room_left_up.mdl";
STRING *room_up_bottom_mdl = "room_up_bottom.mdl";
STRING *room_left_right_mdl = "room_left_right.mdl";
STRING *room_up_right_left_mdl = "room_up_right_left.mdl";
STRING *room_up_right_bottom_mdl = "room_up_right_bottom.mdl";
STRING *room_right_bottom_left_mdl = "room_right_bottom_left.mdl";
STRING *room_bottom_left_up_mdl = "room_bottom_left_up.mdl";
STRING *room_all_mdl = "room_all.mdl";
STRING *room_none_mdl = "room_none.mdl";
typedef struct TILE
{
VECTOR pos;
int id;
int pos_x;
int pos_y;
int type;
int secret_chance;
int doors;
int up;
int right;
int bottom;
int left;
int secret_doors;
int secret_up;
int secret_right;
int secret_bottom;
int secret_left;
} TILE;
TILE map[GRID_MAX_X][GRID_MAX_Y];
TILE *start_room_tile = NULL; // starting room
TILE *boss_room_tile = NULL; // boss room (1 per level)
TILE *shop_room_tile = NULL; // shop room (1 per level)
TILE *super_secret_room_tile = NULL; // super secret room (1 per level)
// Lists which we are using for each dungeon generation !
List rooms_queue_list; // queue of rooms for checking
List end_rooms_list; // list of end rooms
List item_rooms_list; // list of item rooms
List secret_rooms_list; // list of secret rooms
List secret_position_list; // list of secret room potential positions
List super_position_list; // list of super secret room potential positions
VECTOR start_room_pos; // position of the starting room
int level_id = 1; // currently running level's ID (min 1 and max 10)
int max_rooms = 0; // max amount of rooms to be created (changed in map_generate + increases with level_id)
int created_rooms = 0; // amount of already created rooms
int max_secrets = 0; // max amount of secret rooms per level
// room function for visualisation
void room_fnc()
{
set(my, PASSABLE | NOFILTER);
}
// span given position to the grid
void vec_to_grid(VECTOR *pos)
{
if (!pos)
{
diag("\nERROR in vec_to_grid! Given vector pointer doesn't exist!");
return;
}
pos->x += (ROOM_SIZE / 2) * sign(pos->x);
pos->x = (integer(pos->x / ROOM_SIZE) * ROOM_SIZE);
pos->y += (ROOM_SIZE / 2) * sign(pos->y);
pos->y = (integer(pos->y / ROOM_SIZE) * ROOM_SIZE);
pos->z = 0;
}
// return center of the grid
void map_get_center_pos(VECTOR *out)
{
vec_set(out, vector(-((GRID_MAX_X / 2) * ROOM_SIZE), -((GRID_MAX_Y / 2) * ROOM_SIZE), 0));
}
// reset given tile
int map_reset_tile(TILE *tile)
{
if (!tile)
{
diag("\nERROR in map_reset_tile! Tile doesn't exist");
return false;
}
vec_set(&tile->pos, nullvector);
tile->id = -1;
tile->pos_x = -1;
tile->pos_y = -1;
tile->type = ROOM_NONE;
tile->secret_chance = 0;
tile->doors = 0;
tile->up = false;
tile->right = false;
tile->bottom = false;
tile->left = false;
tile->secret_doors = 0;
tile->secret_up = false;
tile->secret_right = false;
tile->secret_bottom = false;
tile->secret_left = false;
return true;
}
// reset the map
void map_reset_all()
{
created_rooms = 0; // no rooms yet created
start_room_tile = NULL;
boss_room_tile = NULL;
shop_room_tile = NULL;
super_secret_room_tile = NULL;
int i = 0, j = 0;
for (i = 0; i < GRID_MAX_X; i++)
{
for (j = 0; j < GRID_MAX_Y; j++)
{
vec_set(&map[i][j].pos, vector(-ROOM_SIZE * i, -ROOM_SIZE * j, 0));
map[i][j].id = -1;
map[i][j].pos_x = i;
map[i][j].pos_y = j;
map[i][j].type = ROOM_NONE;
map[i][j].secret_chance = 0;
map[i][j].doors = 0;
map[i][j].up = false;
map[i][j].right = false;
map[i][j].bottom = false;
map[i][j].left = false;
map[i][j].secret_doors = 0;
map[i][j].secret_up = false;
map[i][j].secret_right = false;
map[i][j].secret_bottom = false;
map[i][j].secret_left = false;
}
}
}
// visualize the map for debugging
void map_draw_debug()
{
var tile_size_factor = 0.25;
int i = 0, j = 0;
for (i = 0; i < GRID_MAX_X; i++)
{
for (j = 0; j < GRID_MAX_Y; j++)
{
VECTOR pos;
vec_set(&pos, &map[i][j].pos);
int type = map[i][j].type;
switch (type)
{
case ROOM_NONE:
draw_point3d(&pos, vector(0, 0, 0), 25, ROOM_SIZE * tile_size_factor); // black
break;
case ROOM_NORMAL:
draw_point3d(&pos, vector(255, 255, 255), 100, ROOM_SIZE * tile_size_factor); // white
break;
case ROOM_START:
draw_point3d(&pos, vector(0, 255, 0), 100, ROOM_SIZE * tile_size_factor); // green
break;
case ROOM_BOSS:
draw_point3d(&pos, vector(0, 0, 255), 100, ROOM_SIZE * tile_size_factor); // red
break;
case ROOM_SHOP:
draw_point3d(&pos, vector(255, 0, 255), 100, ROOM_SIZE * tile_size_factor); // purple
break;
case ROOM_ITEM:
draw_point3d(&pos, vector(255, 0, 0), 100, ROOM_SIZE * tile_size_factor); // blue
break;
case ROOM_SECRET:
draw_point3d(&pos, vector(128, 128, 128), 100, ROOM_SIZE * tile_size_factor); // dark grey
break;
case ROOM_SUPER_SECRET:
draw_point3d(&pos, vector(64, 128, 255), 100, ROOM_SIZE * tile_size_factor); // yellow
break;
}
// show secret room spawning chances
if (vec_to_screen(&pos, camera))
{
draw_text(str_for_int(NULL, map[i][j].secret_chance), pos.x - 4, pos.y - 4, COLOR_RED);
}
}
}
}
// add given tile to the given list
int map_add_tile_to_list(TILE *tile, List *list)
{
if (!tile)
{
diag("\nERROR in map_add_tile_to_list! Tile doesn't exist");
return false;
}
if (!list)
{
diag("\nERROR in map_add_tile_to_list! List doesn't exist");
return false;
}
if (list_contains(list, tile) == true)
{
diag("\nERROR in map_add_tile_to_list! Tile is already in the given list!");
return false;
}
list_add(list, tile);
return true;
}
// clear the given list
void map_clear_list(List *list)
{
if (!list)
{
diag("\nERROR in map_clear_list! List doesn't exist");
return;
}
list_clear(list);
}
// clear all lists
void map_clear_lists_all()
{
map_clear_list(&rooms_queue_list);
map_clear_list(&end_rooms_list);
map_clear_list(&item_rooms_list);
map_clear_list(&secret_rooms_list);
map_clear_list(&secret_position_list);
map_clear_list(&super_position_list);
}
// find and return starting room
TILE *map_get_starting_room()
{
// find the starting room (at the center of the grid)
VECTOR pos;
map_get_center_pos(&pos);
// find tile position from the world3d position
int i = 0, j = 0;
i = floor(-pos.x / ROOM_SIZE);
i = clamp(i, -1, GRID_MAX_X);
j = floor(-pos.y / ROOM_SIZE);
j = clamp(j, -1, GRID_MAX_Y);
return &map[i][j];
}
// return pos_x and pos_y of the given tile
// pos_x and pos_y will receive the position
void map_return_pos_x_y(TILE *tile, int *pos_x, int *pos_y)
{
if (!tile)
{
diag("\nERROR in map_return_pos_x_y! Tile doesn't exist!");
return false;
}
int i = 0, j = 0;
i = floor(-tile->pos.x / ROOM_SIZE);
i = clamp(i, -1, GRID_MAX_X);
j = floor(-tile->pos.y / ROOM_SIZE);
j = clamp(j, -1, GRID_MAX_Y);
*pos_x = i;
*pos_y = j;
}
// create room at the given tile with the given params
int map_create_room(TILE *tile, int type)
{
if (!tile)
{
diag("\nERROR in map_create_room! Tile doesn't exist!");
return false;
}
tile->type = type;
tile->id = created_rooms;
created_rooms++;
map_add_tile_to_list(tile, &rooms_queue_list);
}
// return amount of rooms currently given tile is bordering with !
// this is differnet from 'doors' counter, because 'doors' counter shows connections with other rooms
// while this one looks for bordering with rooms, even if they aren't connected (f.e. to find end rooms)
int count_bordering_rooms(TILE *tile)
{
if (!tile)
{
diag("\nERROR in count_bordering_rooms! Tile doesn't exist!");
return false;
}
// given tile's position on the grid
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(tile, &pos_x, &pos_y);
// from start we think that all 4 sides are occupied with other rooms
int counter = 4;
if (map[pos_x - 1][pos_y].type == ROOM_NONE)
{
counter--;
}
if (map[pos_x][pos_y + 1].type == ROOM_NONE)
{
counter--;
}
if (map[pos_x + 1][pos_y].type == ROOM_NONE)
{
counter--;
}
if (map[pos_x][pos_y - 1].type == ROOM_NONE)
{
counter--;
}
return counter;
}
// check if room has same neighbours or not (ignoring ROOM_NONE)
int map_room_all_same_neighbours(TILE *tile)
{
if (!tile)
{
diag("\nERROR in map_room_all_same_neighbours! Tile doesn't exist");
return false;
}
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(tile, &pos_x, &pos_y);
int i = 0;
int type[4];
int counter = 0;
for (i = 0; i < 4; i++)
{
type[i] = 0;
}
// up
if (map[pos_x - 1][pos_y].type != ROOM_NONE)
{
type[counter] = map[pos_x - 1][pos_y].type;
counter++;
}
// right
if (map[pos_x][pos_y + 1].type != ROOM_NONE)
{
type[counter] = map[pos_x][pos_y + 1].type;
counter++;
}
// bottom
if (map[pos_x + 1][pos_y].type != ROOM_NONE)
{
type[counter] = map[pos_x + 1][pos_y].type;
counter++;
}
// left
if (map[pos_x][pos_y - 1].type != ROOM_NONE)
{
type[counter] = map[pos_x][pos_y - 1].type;
counter++;
}
// not enough neighbours to compare...
if (counter <= 1)
{
return false;
}
int is_type_same = true;
int old_type = type[0];
// check if tiles are all the same
for (i = 0; i < counter; i++)
{
if (old_type != type[i])
{
is_type_same = false;
}
}
// so above is true ?
// that means that all tiles are the same...
// but we need to make sure, that they are not normal rooms !
if (old_type == ROOM_NORMAL)
{
is_type_same = false;
}
return is_type_same;
}
// can this room be added into the queue?
int is_valid_room(TILE *tile)
{
if (!tile)
{
diag("\nERROR in is_valid_room! Tile doesn't exist!");
return false;
}
if (tile->type != ROOM_NONE)
{
return false;
}
if (count_bordering_rooms(tile) > 1)
{
return false;
}
if (created_rooms >= max_rooms)
{
return false;
}
if (random(1) > 0.5)
{
return false;
}
return true;
}
// find all end rooms (bordering with one 1 room + have only 1 door)
int map_find_end_rooms()
{
// cycle though the queue of rooms
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&rooms_queue_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
// not a room at all ?
if (next_room->type != ROOM_NORMAL)
{
continue;
}
// too many doors ?
if (next_room->doors > 1)
{
continue;
}
// make sure that there is no bordering rooms around 3 sides
// if so, then we've found our item room (single neighbour room)
if (count_bordering_rooms(next_room) <= 1)
{
map_add_tile_to_list(next_room, &end_rooms_list);
}
}
list_end_iterate(it);
// not enough end rooms were created ?
if (end_rooms_list.count < 3)
{
return false;
}
else
{
return true;
}
}
// find the boss fight room
// return false is non was found, otherwise - true
int map_find_boss_room()
{
int pos_x = -1, pos_y = -1;
var farthest_distance = 0;
// cycle though the queue of rooms
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&end_rooms_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
// distance to the center of the starting room
var distance = vec_dist(&next_room->pos, &start_room_pos);
// far enough ?
if (distance > farthest_distance)
{
map_return_pos_x_y(next_room, &pos_x, &pos_y);
farthest_distance = distance; // save distance as the farthest one
}
}
list_end_iterate(it);
// boss room was found ?
if (pos_x != -1 && pos_y != -1)
{
map[pos_x][pos_y].type = ROOM_BOSS;
boss_room_tile = &map[pos_x][pos_y];
}
// make sure to return int
if (boss_room_tile == NULL)
{
return false;
}
else
{
return true;
}
}
// find shop room
// return false is non was found, otherwise - true
int map_find_shop_room()
{
// cycle though the queue of rooms
TILE *next_room = NULL;
while (!shop_room_tile)
{
int index = integer(random(end_rooms_list.count));
next_room = list_item_at(&end_rooms_list, index);
if (boss_room_tile != next_room)
{
next_room->type = ROOM_SHOP;
shop_room_tile = next_room;
}
}
// make sure to return int
if (shop_room_tile == NULL)
{
return false;
}
else
{
return true;
}
}
// we cycle though the end rooms and first or all define 1 boss room, then 1 shop room
// and then all the rest of end rooms are going to become item rooms !
// return false is non was found or not all end rooms are filled, otherwise - true
int map_find_item_rooms()
{
// cycle though the queue of rooms
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&end_rooms_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
// ignore boss room !
if (next_room == boss_room_tile)
{
continue;
}
// ignore shop room !
if (next_room == shop_room_tile)
{
continue;
}
next_room->type = ROOM_ITEM;
map_add_tile_to_list(next_room, &item_rooms_list);
}
list_end_iterate(it);
// make sure to return int
if (item_rooms_list.count != (end_rooms_list.count - 2))
{
return false;
}
else
{
return true;
}
}
// check if given tile should be added into the secret level spawning position
int is_valid_secret_pos(TILE *tile)
{
if (!tile)
{
diag("\nERROR in is_valid_secret_pos! Given tile doesn't exist");
return false;
}
// already occupied ?
if (tile->type != ROOM_NONE)
{
return false;
}
// not enough chances
if (tile->secret_chance <= 0)
{
return false;
}
// was already added into the list ?
if (list_contains(&secret_position_list, tile) == true)
{
return false;
}
return true;
}
// calculate chances for all empty tiles to spawn secret on the best tiles
// bordered with 3 rooms, or with at least 2
void map_calculate_secret_pos_chance()
{
// cycle though the queue
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&rooms_queue_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
int pos_x = -1, pos_y = -1;
map_return_pos_x_y(next_room, &pos_x, &pos_y);
// up
if (map[pos_x - 1][pos_y].type == ROOM_NONE)
{
map[pos_x - 1][pos_y].secret_chance++;
if (is_valid_secret_pos(&map[pos_x - 1][pos_y]) == true)
{
map_add_tile_to_list(&map[pos_x - 1][pos_y], &secret_position_list);
}
}
// right
if (map[pos_x][pos_y + 1].type == ROOM_NONE)
{
map[pos_x][pos_y + 1].secret_chance++;
if (is_valid_secret_pos(&map[pos_x][pos_y + 1]) == true)
{
map_add_tile_to_list(&map[pos_x][pos_y + 1], &secret_position_list);
}
}
// bottom
if (map[pos_x + 1][pos_y].type == ROOM_NONE)
{
map[pos_x + 1][pos_y].secret_chance++;
if (is_valid_secret_pos(&map[pos_x + 1][pos_y]) == true)
{
map_add_tile_to_list(&map[pos_x + 1][pos_y], &secret_position_list);
}
}
// left
if (map[pos_x][pos_y - 1].type == ROOM_NONE)
{
map[pos_x][pos_y - 1].secret_chance++;
if (is_valid_secret_pos(&map[pos_x][pos_y - 1]) == true)
{
map_add_tile_to_list(&map[pos_x][pos_y - 1], &secret_position_list);
}
}
}
list_end_iterate(it);
}
// check for the secret room's neighbour to see if we can connect to it or not
int is_valid_secret_neighbours(TILE *tile)
{
if (!tile)
{
diag("\nERROR in is_valid_secret_neighbours! Tile doesn't exist");
return false;
}
// don't point into the void...
if (tile->type == ROOM_NONE)
{
return false;
}
// don't point into the boss room
// ignore boss room
if (tile->type == ROOM_BOSS)
{
return false;
}
// or into the super secret !
if (tile->type == ROOM_SUPER_SECRET)
{
return false;
}
return true;
}
// find secret rooms
// return false is non was found, otherwise - true
int map_find_secret_rooms()
{
// we sort this like this (by hand)...
// ugly but works and not super slow, so it's kinda ok
// first we try to occupy all tiles with secret chance 4
int i = 0;
for (i = 0; i < 4; i++)
{
// enough secret rooms ?
if (secret_rooms_list.count >= max_secrets)
{
break;
}
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&secret_position_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
// enough secret rooms ?
if (secret_rooms_list.count >= max_secrets)
{
break;
}
// make sure that we don't spawn between all same kind of tiles (f.e. only between item rooms)
// maybe this isn't really needed, but we'll leave this like this for now
if (map_room_all_same_neighbours(next_room) == true)
{
continue;
}
// not enough chance ?
// 4, 3, 2
if (next_room->secret_chance != 4 - i)
{
continue;
}
// add into the secret list
map_add_tile_to_list(next_room, &secret_rooms_list);
}
list_end_iterate(it);
}
// cycle though the secret rooms and set their connections
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&secret_rooms_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(next_room, &pos_x, &pos_y);
// we finally found the secret room...
next_room->type = ROOM_SECRET;
// up neighbour
if (is_valid_secret_neighbours(&map[pos_x - 1][pos_y]) == true)
{
map[pos_x - 1][pos_y].secret_bottom = true;
map[pos_x - 1][pos_y].secret_doors++;
next_room->up = true;
next_room->doors++;
}
// right neighbour
if (is_valid_secret_neighbours(&map[pos_x][pos_y + 1]) == true)
{
map[pos_x][pos_y + 1].secret_left = true;
map[pos_x][pos_y + 1].secret_doors++;
next_room->right = true;
next_room->doors++;
}
// bottom neighbour
if (is_valid_secret_neighbours(&map[pos_x + 1][pos_y]) == true)
{
map[pos_x + 1][pos_y].secret_up = true;
map[pos_x + 1][pos_y].secret_doors++;
next_room->bottom = true;
next_room->doors++;
}
// left neighbour
if (is_valid_secret_neighbours(&map[pos_x][pos_y - 1]) == true)
{
map[pos_x][pos_y - 1].secret_right = true;
map[pos_x][pos_y - 1].secret_doors++;
next_room->left = true;
next_room->doors++;
}
}
list_end_iterate(it);
// make sure to return int
if (secret_rooms_list.count < max_secrets)
{
return false;
}
else
{
return true;
}
}
// check if neighbours of the given tile are normal rooms
// false - if they are not, otherwise - true
int is_valid_super_secret_neighbour(TILE *tile)
{
if (!tile)
{
diag("\nERROR in is_valid_super_secret_neighbour! Tile doesn't exist");
return false;
}
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(tile, &pos_x, &pos_y);
int i = 0;
int type[4];
int counter = 0;
for (i = 0; i < 4; i++)
{
type[i] = 0;
}
// up
if (map[pos_x - 1][pos_y].type != ROOM_NONE)
{
type[counter] = map[pos_x - 1][pos_y].type;
counter++;
}
// right
if (map[pos_x][pos_y + 1].type != ROOM_NONE)
{
type[counter] = map[pos_x][pos_y + 1].type;
counter++;
}
// bottom
if (map[pos_x + 1][pos_y].type != ROOM_NONE)
{
type[counter] = map[pos_x + 1][pos_y].type;
counter++;
}
// left
if (map[pos_x][pos_y - 1].type != ROOM_NONE)
{
type[counter] = map[pos_x][pos_y - 1].type;
counter++;
}
int is_type_same = true;
int old_type = ROOM_NORMAL;
// check if tiles are all the same
for (i = 0; i < counter; i++)
{
if (old_type != type[i])
{
is_type_same = false;
}
}
return is_type_same;
}
// find super secret room !
int map_find_super_secret_room()
{
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&secret_position_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
// make sure to find places with only one secret chance !
if (next_room->secret_chance != 1)
{
continue;
}
// make sure that it's bordering with only one room
if (count_bordering_rooms(next_room) > 1)
{
continue;
}
// also make sure that that single room we are next to is a normal room !
if (is_valid_super_secret_neighbour(next_room) == false)
{
continue;
}
// add into the secret list
map_add_tile_to_list(next_room, &super_position_list);
}
list_end_iterate(it);
// no positions were found ?
if (super_position_list.count <= 0)
{
return false;
}
// random index from the available super secret room positions
int index = integer(random(super_position_list.count));
// find the proper tile from the list
TILE *tile = list_item_at(&super_position_list, index);
tile->type = ROOM_SUPER_SECRET;
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(tile, &pos_x, &pos_y);
// update connection with the map
// up neighbour
if (is_valid_secret_neighbours(&map[pos_x - 1][pos_y]) == true)
{
map[pos_x - 1][pos_y].secret_bottom = true;
map[pos_x - 1][pos_y].secret_doors++;
tile->up = true;
tile->doors++;
}
// right neighbour
if (is_valid_secret_neighbours(&map[pos_x][pos_y + 1]) == true)
{
map[pos_x][pos_y + 1].secret_left = true;
map[pos_x][pos_y + 1].secret_doors++;
tile->right = true;
tile->doors++;
}
// bottom neighbour
if (is_valid_secret_neighbours(&map[pos_x + 1][pos_y]) == true)
{
map[pos_x + 1][pos_y].secret_up = true;
map[pos_x + 1][pos_y].secret_doors++;
tile->bottom = true;
tile->doors++;
}
// left neighbour
if (is_valid_secret_neighbours(&map[pos_x][pos_y - 1]) == true)
{
map[pos_x][pos_y - 1].secret_right = true;
map[pos_x][pos_y - 1].secret_doors++;
tile->left = true;
tile->doors++;
}
return true;
}
// generate new map
void map_generate()
{
// random amount of max_room per each generation
max_rooms = (integer(random(3)) + 4 + level_id * 2); // * 2;
// max 1 - 2 secret room per level
max_secrets = 1 + integer(random(2));
// clear all previous maps
map_reset_all();
// clear all previous data from the lists
map_clear_lists_all();
// this part is needed for removing created room tiles
level_load("");
wait(1);
VECTOR pos;
map_get_center_pos(&pos);
vec_set(&camera->x, vector(pos.x, pos.y, 1000));
vec_set(&camera->pan, vector(0, -90, 0));
// add starting room to the queue
TILE *starting_room = map_get_starting_room();
vec_set(&start_room_pos, &starting_room->pos);
map_create_room(starting_room, ROOM_START);
start_room_tile = starting_room;
// cycle though the queue
TILE *next_room = NULL;
ListIterator *it = list_begin_iterate(&rooms_queue_list);
for (next_room = list_iterate(it); it->hasNext; next_room = list_iterate(it))
{
int pos_x = 0, pos_y = 0;
map_return_pos_x_y(next_room, &pos_x, &pos_y);
// up neighbour
if (is_valid_room(&map[pos_x - 1][pos_y]) == true)
{
map_create_room(&map[pos_x - 1][pos_y], ROOM_NORMAL);
map[pos_x - 1][pos_y].bottom = true;
map[pos_x - 1][pos_y].doors++;
next_room->up = true;
next_room->doors++;
}
// right neighbour
if (is_valid_room(&map[pos_x][pos_y + 1]) == true)
{
map_create_room(&map[pos_x][pos_y + 1], ROOM_NORMAL);
map[pos_x][pos_y + 1].left = true;
map[pos_x][pos_y + 1].doors++;
next_room->right = true;
next_room->doors++;
}
// bottom neighbour
if (is_valid_room(&map[pos_x + 1][pos_y]) == true)
{
map_create_room(&map[pos_x + 1][pos_y], ROOM_NORMAL);
map[pos_x + 1][pos_y].up = true;
map[pos_x + 1][pos_y].doors++;
next_room->bottom = true;
next_room->doors++;
}
// left neighbour
if (is_valid_room(&map[pos_x][pos_y - 1]) == true)
{
map_create_room(&map[pos_x][pos_y - 1], ROOM_NORMAL);
map[pos_x][pos_y - 1].right = true;
map[pos_x][pos_y - 1].doors++;
next_room->left = true;
next_room->doors++;
}
}
list_end_iterate(it);
// make sure we have proper amount of rooms
if (created_rooms != max_rooms)
{
map_generate();
return;
}
// if our map is accepted, then find end rooms
// we need to have at least 3 end rooms per level (item, shop, boss)
if (map_find_end_rooms() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! Not enough of end rooms were created!");
return;
}
// find boss fight room
// no boss room found (for some reason...)
if (map_find_boss_room() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! Boss fight room wasn't created!");
return;
}
// no shop room found ?
if (map_find_shop_room() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! Shop room wasn't created!");
return;
}
// no item rooms or not all of the rest end rooms occupied ?
if (map_find_item_rooms() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! No item rooms were created!");
return;
}
// calculate positions for the secrets to spawn at
map_calculate_secret_pos_chance();
// no secret rooms ?
if (map_find_secret_rooms() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! No secret rooms were created!");
return;
}
// no super secret room ?
if (map_find_super_secret_room() == NULL)
{
map_generate();
diag("\nERROR in dungeon generation! No super secret room was created!");
return;
}
// create all 3d rooms
// currently only for visualisation/debugging
// this is very ugly... and will be removed !
int i = 0, j = 0;
for (i = 0; i < GRID_MAX_X; i++)
{
for (j = 0; j < GRID_MAX_Y; j++)
{
int type = map[i][j].type;
// room doesn't exist ?
if (type == ROOM_NONE)
{
continue;
}
VECTOR pos;
vec_set(&pos, &map[i][j].pos);
int room_up = map[i][j].up;
int room_right = map[i][j].right;
int room_bottom = map[i][j].bottom;
int room_left = map[i][j].left;
if (room_up == true && room_right == false && room_bottom == false && room_left == false) // only up / right / bottom / left
{
ENTITY *tile_ent = ent_create(room_only_up_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == true && room_bottom == false && room_left == false)
{
ENTITY *tile_ent = ent_create(room_only_right_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == false && room_bottom == true && room_left == false)
{
ENTITY *tile_ent = ent_create(room_only_bottom_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == false && room_bottom == false && room_left == true)
{
ENTITY *tile_ent = ent_create(room_only_left_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == true && room_bottom == false && room_left == false) // two sides at the same time
{
ENTITY *tile_ent = ent_create(room_up_right_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == true && room_bottom == true && room_left == false)
{
ENTITY *tile_ent = ent_create(room_right_bottom_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == false && room_bottom == true && room_left == true)
{
ENTITY *tile_ent = ent_create(room_bottom_left_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == false && room_bottom == false && room_left == true)
{
ENTITY *tile_ent = ent_create(room_left_up_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == false && room_bottom == true && room_left == false) // parallel sides ?
{
ENTITY *tile_ent = ent_create(room_up_bottom_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == true && room_bottom == false && room_left == true)
{
ENTITY *tile_ent = ent_create(room_left_right_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == true && room_bottom == false && room_left == true) // three sides ?
{
ENTITY *tile_ent = ent_create(room_up_right_left_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == true && room_bottom == true && room_left == false)
{
ENTITY *tile_ent = ent_create(room_up_right_bottom_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == false && room_right == true && room_bottom == true && room_left == true)
{
ENTITY *tile_ent = ent_create(room_right_bottom_left_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == false && room_bottom == true && room_left == true)
{
ENTITY *tile_ent = ent_create(room_bottom_left_up_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
else if (room_up == true && room_right == true && room_bottom == true && room_left == true) // all 4 doors ?
{
ENTITY *tile_ent = ent_create(room_all_mdl, &pos, room_fnc);
if (type == ROOM_SECRET || type == ROOM_SUPER_SECRET)
{
if (tile_ent)
{
set(tile_ent, TRANSLUCENT);
}
}
}
}
}
}
void on_exit_event()
{
map_clear_lists_all();
}
void main()
{
on_exit = on_exit_event;
on_space = map_generate;
fps_max = 60;
warn_level = 6;
random_seed(0);
video_mode = 9;
video_switch(video_mode, 0, 0);
level_load("");
map_generate();
VECTOR pos;
map_get_center_pos(&pos);
vec_set(&camera->x, vector(pos.x, pos.y, 1000));
vec_set(&camera->pan, vector(0, -90, 0));
mouse_pointer = 2;
mouse_mode = 4;
while (!key_esc)
{
DEBUG_VAR(item_rooms_list.count, 0);
DEBUG_VAR(end_rooms_list.count, 20);
DEBUG_VAR((end_rooms_list.count - 2), 40);
draw_text(
str_printf(NULL,
"created room: %d\nmax rooms: %d\nqueue count: %d\nend rooms: %d\nsecret rooms: %d\nmax secrets: %d\nitem rooms: %d",
(long)created_rooms, (long)max_rooms, (long)rooms_queue_list.count, (long)end_rooms_list.count, (long)secret_rooms_list.count, (long)max_secrets, (long)item_rooms_list.count),
10, 240, COLOR_RED);
VECTOR mouse_3d_pos;
vec_set(&mouse_3d_pos, vector(mouse_pos.x, mouse_pos.y, camera->z));
vec_for_screen(&mouse_3d_pos, camera);
vec_to_grid(&mouse_3d_pos);
draw_point3d(vector(mouse_3d_pos.x, mouse_3d_pos.y, 0), COLOR_RED, 100, ROOM_SIZE * 0.5);
int i = 0, j = 0;
i = floor(-mouse_3d_pos.x / ROOM_SIZE);
i = clamp(i, -1, GRID_MAX_X);
j = floor(-mouse_3d_pos.y / ROOM_SIZE);
j = clamp(j, -1, GRID_MAX_Y);
if (i >= 0 && i < GRID_MAX_X && j >= 0 && j < GRID_MAX_Y)
{
DEBUG_VAR(map_room_all_same_neighbours(&map[i][j]), 80);
draw_text(
str_printf(NULL,
"type: %d\ni: %d\nj: %d\nid: %d\ndoors: %d\nup: %d\nright: %d\nbottom: %d\nleft: %d\nsecret up: %d\nsecret right: %d\nsecret bottom: %d\nsecret left: %d",
(long)map[i][j].type, (long)map[i][j].pos_x, (long)map[i][j].pos_y, (long)map[i][j].id, (long)map[i][j].doors, (long)map[i][j].up, (long)map[i][j].right, (long)map[i][j].bottom, (long)map[i][j].left, (long)map[i][j].secret_up, (long)map[i][j].secret_right, (long)map[i][j].secret_bottom, (long)map[i][j].secret_left),
10, 420, COLOR_RED);
}
if (key_enter)
{
map_draw_debug();
}
wait(1);
}
sys_exit(NULL);
} | 27.807078 | 344 | 0.544647 |
810b0467108cc3c41cafe0cae2182708a302485f | 639 | kt | Kotlin | src/main/kotlin/mutableCollections/MutableMap.kt | jailsonsf/kotlin-collections | 03694fead5cee579f02adc5d214c892a372dd11d | [
"MIT"
] | null | null | null | src/main/kotlin/mutableCollections/MutableMap.kt | jailsonsf/kotlin-collections | 03694fead5cee579f02adc5d214c892a372dd11d | [
"MIT"
] | null | null | null | src/main/kotlin/mutableCollections/MutableMap.kt | jailsonsf/kotlin-collections | 03694fead5cee579f02adc5d214c892a372dd11d | [
"MIT"
] | null | null | null | package mutableCollections
import collections.Employee
fun main() {
val maria = Employee("Maria", 3000.0, "PJ")
val joao = Employee("João", 1000.0, "CLT")
val pedro = Employee("Pedro", 2000.0, "CLT")
val repository = Repository<Employee>()
repository.create(maria.name, maria)
repository.create(joao.name, joao)
repository.create(pedro.name, pedro)
println(repository.findById(pedro.name))
println("=======================")
repository.findAll().forEach { println(it) }
println("=======================")
repository.remove(maria.name)
repository.findAll().forEach { println(it) }
} | 27.782609 | 48 | 0.624413 |
4a3594a8bd9b3628a0f6f39f6b4e27c03f08a727 | 1,893 | sql | SQL | src/BugNET.Database/Stored Procedures/BugNet_IssueNotification_GetIssueNotificationsByIssueId.sql | thaihoc2/bugnet | 440bfd93d231c95acf20cf67d99a222d35bd7a4f | [
"MS-PL"
] | 200 | 2015-01-07T11:32:41.000Z | 2021-08-13T00:42:12.000Z | src/BugNET.Database/Stored Procedures/BugNet_IssueNotification_GetIssueNotificationsByIssueId.sql | China-HD/bugnet | cfab4aeacc7224425db86f0e1f94cf24e22acf2a | [
"MS-PL"
] | 203 | 2015-01-02T14:49:30.000Z | 2019-01-17T02:36:42.000Z | src/BugNET.Database/Stored Procedures/BugNet_IssueNotification_GetIssueNotificationsByIssueId.sql | China-HD/bugnet | cfab4aeacc7224425db86f0e1f94cf24e22acf2a | [
"MS-PL"
] | 236 | 2015-01-09T22:44:16.000Z | 2022-03-22T11:10:16.000Z |
CREATE PROCEDURE [dbo].[BugNet_IssueNotification_GetIssueNotificationsByIssueId]
@IssueId Int
AS
SET NOCOUNT ON
DECLARE @DefaultCulture NVARCHAR(50)
SET @DefaultCulture = (SELECT ISNULL(SettingValue, 'en-US') FROM BugNet_HostSettings WHERE SettingName = 'ApplicationDefaultLanguage')
DECLARE @tmpTable TABLE (IssueNotificationId int, IssueId int,NotificationUserId uniqueidentifier, NotificationUserName nvarchar(50), NotificationDisplayName nvarchar(50), NotificationEmail nvarchar(50), NotificationCulture NVARCHAR(50))
INSERT @tmpTable
SELECT
IssueNotificationId,
IssueId,
U.UserId NotificationUserId,
U.UserName NotificationUserName,
IsNull(DisplayName,'') NotificationDisplayName,
M.Email NotificationEmail,
ISNULL(UP.PreferredLocale, @DefaultCulture) AS NotificationCulture
FROM
BugNet_IssueNotifications
INNER JOIN Users U ON BugNet_IssueNotifications.UserId = U.UserId
INNER JOIN Memberships M ON BugNet_IssueNotifications.UserId = M.UserId
LEFT OUTER JOIN BugNet_UserProfiles UP ON U.UserName = UP.UserName
WHERE
IssueId = @IssueId
AND M.Email IS NOT NULL
ORDER BY
DisplayName
-- get all people on the project who want to be notified
INSERT @tmpTable
SELECT
ProjectNotificationId,
IssueId = @IssueId,
u.UserId NotificationUserId,
u.UserName NotificationUserName,
IsNull(DisplayName,'') NotificationDisplayName,
m.Email NotificationEmail,
ISNULL(UP.PreferredLocale, @DefaultCulture) AS NotificationCulture
FROM
BugNet_ProjectNotifications p,
BugNet_Issues i,
Users u,
Memberships m ,
BugNet_UserProfiles up
WHERE
IssueId = @IssueId
AND p.ProjectId = i.ProjectId
AND u.UserId = p.UserId
AND u.UserId = m.UserId
AND u.UserName = up.UserName
AND m.Email IS NOT NULL
SELECT DISTINCT IssueId,NotificationUserId, NotificationUserName, NotificationDisplayName, NotificationEmail, NotificationCulture FROM @tmpTable ORDER BY NotificationDisplayName
| 32.084746 | 237 | 0.820391 |
26fb39341bcaabf7c8d8c2a94e732d45b6a8e5f9 | 32,008 | sql | SQL | db/views/trade_shipments_appendix_i_view/20180705094119.sql | unepwcmc/SAPI | 405dea1e757ae6c6d2d9a831a21ea17c78183b0e | [
"BSD-3-Clause"
] | 6 | 2016-03-15T16:36:17.000Z | 2021-03-26T18:38:35.000Z | db/views/trade_shipments_appendix_i_view/20180705094119.sql | unepwcmc/SAPI | 405dea1e757ae6c6d2d9a831a21ea17c78183b0e | [
"BSD-3-Clause"
] | 236 | 2015-01-21T21:33:16.000Z | 2022-02-26T01:49:01.000Z | db/views/trade_shipments_appendix_i_view/20180705094119.sql | unepwcmc/SAPI | 405dea1e757ae6c6d2d9a831a21ea17c78183b0e | [
"BSD-3-Clause"
] | 2 | 2017-11-13T15:51:34.000Z | 2020-10-27T11:00:02.000Z | SELECT DISTINCT *
FROM (
SELECT ts.id, ts.year, ts.appendix, ts.taxon_concept_id,
ts.taxon_concept_author_year AS author_year,
ts.taxon_concept_name_status AS name_status,
ts.taxon_concept_full_name AS taxon_name,
ts.taxon_concept_phylum_id AS phylum_id,
ts.taxon_concept_class_id AS class_id,
ts.taxon_concept_class_name AS class_name,
ts.taxon_concept_order_id AS order_id,
ts.taxon_concept_order_name AS order_name,
ts.taxon_concept_family_id AS family_id,
ts.taxon_concept_family_name AS family_name,
ts.taxon_concept_genus_id AS genus_id,
ts.taxon_concept_genus_name AS genus_name,
terms.id AS term_id,
terms.name_en AS term,
CASE WHEN ts.reported_by_exporter IS FALSE THEN ts.quantity
ELSE NULL
END AS importer_reported_quantity,
CASE WHEN ts.reported_by_exporter IS TRUE THEN ts.quantity
ELSE NULL
END AS exporter_reported_quantity,
units.id AS unit_id,
units.name_en AS unit,
exporters.id AS exporter_id,
exporters.iso_code2 AS exporter_iso,
exporters.name_en AS exporter,
importers.id AS importer_id,
importers.iso_code2 AS importer_iso,
importers.name_en AS importer,
origins.iso_code2 AS origin,
purposes.id AS purpose_id,
purposes.name_en AS purpose,
sources.id AS source_id,
sources.name_en AS source,
ts.import_permits_ids AS import_permits,
ts.export_permits_ids AS export_permits,
ts.origin_permits_ids AS origin_permits,
ts.import_permit_number AS import_permit,
ts.export_permit_number AS export_permit,
ts.origin_permit_number AS origin_permit,
ranks.id AS rank_id,
ranks.name AS rank_name,
'AppendixI'::text AS issue_type
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes sources ON ts.source_id = sources.id
INNER JOIN trade_codes purposes ON ts.purpose_id = purposes.id
INNER JOIN ranks ON ranks.id = ts.taxon_concept_rank_id
LEFT OUTER JOIN trade_codes terms ON ts.term_id = terms.id
LEFT OUTER JOIN trade_codes units ON ts.unit_id = units.id
LEFT OUTER JOIN geo_entities exporters ON ts.exporter_id = exporters.id
LEFT OUTER JOIN geo_entities importers ON ts.importer_id = importers.id
LEFT OUTER JOIN geo_entities origins ON ts.country_of_origin_id = origins.id
WHERE ts.appendix = 'I'
AND purposes.type = 'Purpose'
AND purposes.code = 'T'
AND sources.type = 'Source'
AND sources.code IN ('W', 'X', 'F', 'R')
)
AS s
WHERE s.id NOT IN (
SELECT ts.id
FROM trade_shipments_with_taxa_view ts
INNER JOIN geo_entities importers ON ts.importer_id = importers.id
INNER JOIN geo_entities exporters ON ts.exporter_id = exporters.id
WHERE
(ts.year > 1991 AND ts.year < 2018 AND ts.taxon_concept_id = 8935 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NA')))
OR
(ts.year > 1991 AND ts.year < 2018 AND ts.taxon_concept_id = 1929 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NA')))
OR
(ts.year > 2003 AND ts.year < 2014 AND ts.taxon_concept_id = 3721 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2003 AND ts.year < 2014 AND ts.taxon_concept_id = 3721 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 2003 AND ts.year < 2018 AND ts.taxon_concept_id = 3721 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PH')))
OR
(ts.year > 2003 AND ts.year < 2014 AND ts.taxon_concept_id = 11033 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2003 AND ts.year < 2014 AND ts.taxon_concept_id = 11033 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 2003 AND ts.year < 2018 AND ts.taxon_concept_id = 11033 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PH')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 9871 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 6741 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1985 AND ts.year < 2014 AND ts.taxon_concept_id = 4650 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1985 AND ts.year < 2014 AND ts.taxon_concept_id = 4650 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1985 AND ts.year < 2018 AND ts.taxon_concept_id = 4650 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SR')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SR')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 8288 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1986 AND ts.year < 2018 AND ts.taxon_concept_id = 8288 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1986 AND ts.year < 2018 AND ts.taxon_concept_id = 8288 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NO')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NO')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 8288 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 6477 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 6477 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1986 AND ts.year < 2018 AND ts.taxon_concept_id = 6477 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NO')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NO')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 3975 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 3975 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 3975 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NO')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NO')))
OR
(ts.year > 1983 AND ts.year < 2018 AND ts.taxon_concept_id = 6352 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 10905 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1983 AND ts.year < 2018 AND ts.taxon_concept_id = 4329 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 9445 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 9445 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 9445 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NO')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NO')))
OR
(ts.year > 1983 AND ts.year < 2018 AND ts.taxon_concept_id = 9048 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 7286 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12278 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 12278 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 7286 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 4442 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12299 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 12299 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MK')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MK')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12168 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 12168 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MK')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MK')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 4442 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MK')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MK')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12199 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 12199 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MK')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MK')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12320 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 12320 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MK')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MK')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 4645 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1987 AND ts.year < 2014 AND ts.taxon_concept_id = 8725 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1987 AND ts.year < 2014 AND ts.taxon_concept_id = 8725 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1990 AND ts.year < 2018 AND ts.taxon_concept_id = 11071 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CU')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CU')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 11071 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 11071 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SR')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SR')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 6337 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 10248 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 9020 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 6280 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12205 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2010 AND ts.year < 2013 AND ts.taxon_concept_id = 7747 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2010 AND ts.year < 2013 AND ts.taxon_concept_id = 10745 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 8560 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 4062 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SR')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SR')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 12629 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 12629 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 3515 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1987 AND ts.year < 2014 AND ts.taxon_concept_id = 6833 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1987 AND ts.year < 2014 AND ts.taxon_concept_id = 6833 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1980 AND ts.year < 2018 AND ts.taxon_concept_id = 12165 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1990 AND ts.year < 2018 AND ts.taxon_concept_id = 7257 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CU')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CU')))
OR
(ts.year > 1980 AND ts.year < 2018 AND ts.taxon_concept_id = 12248 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 7257 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1989 AND ts.year < 2018 AND ts.taxon_concept_id = 7257 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'VC')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'VC')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 7466 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 8607 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12193 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 9441 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12238 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 10464 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 12332 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12332 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 12249 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12249 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 6244 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 6244 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 12254 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12254 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 3922 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 7821 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 6341 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 10054 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 12220 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 10804 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 3792 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 4979 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1990 AND ts.year < 2018 AND ts.taxon_concept_id = 4521 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'MW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'MW')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 3052 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1989 AND ts.year < 2018 AND ts.taxon_concept_id = 3052 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'VC')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'VC')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 14450 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 14450 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 26732 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 26732 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 17592 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 17592 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 22677 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1992 AND ts.year < 2014 AND ts.taxon_concept_id = 22677 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'LI')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'LI')))
OR
(ts.year > 2010 AND ts.year < 2013 AND ts.taxon_concept_id = 5003 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2005 AND ts.year < 2018 AND ts.taxon_concept_id = 9382 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 2005 AND ts.year < 2018 AND ts.taxon_concept_id = 11005 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 2000 AND ts.year < 2018 AND ts.taxon_concept_id = 10761 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'IS')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'IS')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 10761 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'JP')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'JP')))
OR
(ts.year > 1981 AND ts.year < 2018 AND ts.taxon_concept_id = 10761 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'NO')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'NO')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 10761 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 9919 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 531 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 8391 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2003 AND ts.year < 2018 AND ts.taxon_concept_id = 5863 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PH')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 9151 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 3592 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 2017 AND ts.year < 2018 AND ts.taxon_concept_id = 9644 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'AE')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'AE')))
OR
(ts.year > 2017 AND ts.year < 2018 AND ts.taxon_concept_id = 9644 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CD')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CD')))
OR
(ts.year > 2017 AND ts.year < 2018 AND ts.taxon_concept_id = 9644 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 3627 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 8325 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 3198 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 3370 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 5781 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 2004 AND ts.year < 2018 AND ts.taxon_concept_id = 7938 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'PW')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'PW')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 24119 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 2013 AND ts.year < 2015 AND ts.taxon_concept_id = 4306 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CA')))
OR
(ts.year > 1979 AND ts.year < 2014 AND ts.taxon_concept_id = 12206 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'CH')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'CH')))
OR
(ts.year > 1996 AND ts.year < 2018 AND ts.taxon_concept_id = 4494 AND ((ts.reported_by_exporter IS TRUE AND exporters.iso_code2 = 'SA')
OR (ts.reported_by_exporter IS FALSE AND importers.iso_code2 = 'SA')))
)
ORDER BY s.year, s.class_name, s.order_name, s.family_name, s.genus_name, s.taxon_name, s.term
| 45.08169 | 140 | 0.699513 |
2705f44d0c2440f760b17d0053b30ceee0401017 | 322 | css | CSS | src/main/resources/static/css/404.0307462e.css | NikolasProst/Java-blogAPI | cc70fc5b6939f5b2aa8828225ab8705597aee36b | [
"MIT"
] | 1 | 2021-07-11T18:55:21.000Z | 2021-07-11T18:55:21.000Z | src/main/resources/static/css/404.0307462e.css | NikolasProst/Java-blogAPI | cc70fc5b6939f5b2aa8828225ab8705597aee36b | [
"MIT"
] | 2 | 2020-11-17T15:01:36.000Z | 2021-01-16T08:17:27.000Z | src/main/resources/static/css/404.0307462e.css | IkkiKing/SkillboxDiplom | 4163e90d05993300f1d03f6941edfb9f7e1220a0 | [
"Unlicense"
] | 1 | 2022-02-07T10:17:47.000Z | 2022-02-07T10:17:47.000Z | .error404{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.error404-Text{width:70%;font-size:25px;font-weight:700;text-align:center} | 322 | 322 | 0.795031 |
2b257aab083ed2191de1e21331791fdc131ae5a9 | 288 | sql | SQL | AIDEBackendMaster/SQL Scripts/insert_Severity_Items.sql | chriscg/aide-backend | c7389b7d3da0b076d4975194a039f4ac4c77e2e3 | [
"BSD-3-Clause"
] | 2 | 2019-05-23T06:34:35.000Z | 2019-10-17T05:12:24.000Z | AIDEBackendMaster/SQL Scripts/insert_Severity_Items.sql | chriscg/aide-backend | c7389b7d3da0b076d4975194a039f4ac4c77e2e3 | [
"BSD-3-Clause"
] | 32 | 2019-05-23T12:48:45.000Z | 2020-07-23T10:28:25.000Z | AIDEBackendMaster/SQL Scripts/insert_Severity_Items.sql | chriscg/aide-backend | c7389b7d3da0b076d4975194a039f4ac4c77e2e3 | [
"BSD-3-Clause"
] | 2 | 2019-05-31T10:43:08.000Z | 2019-08-29T06:49:15.000Z | USE AIDE
GO
DELETE STATUS WHERE STATUS_NAME = 'SEVERITY'
INSERT INTO STATUS VALUES (13, 'SEVERITY', 'Low', 1)
INSERT INTO STATUS VALUES (13, 'SEVERITY', 'Medium', 2)
INSERT INTO STATUS VALUES (13, 'SEVERITY', 'High', 3)
INSERT INTO STATUS VALUES (13, 'SEVERITY', 'Critical', 4) | 32 | 57 | 0.6875 |
0e510f76422299d5ac90212a531e8ecd7895b653 | 275 | html | HTML | src/partials/scripts.html | delaneymethod/delaneymethod.github.io | e4f84aba96ef95227c89126f2416823a29a2a77e | [
"MIT"
] | null | null | null | src/partials/scripts.html | delaneymethod/delaneymethod.github.io | e4f84aba96ef95227c89126f2416823a29a2a77e | [
"MIT"
] | null | null | null | src/partials/scripts.html | delaneymethod/delaneymethod.github.io | e4f84aba96ef95227c89126f2416823a29a2a77e | [
"MIT"
] | null | null | null | <script src="{{root}}assets/js/app.js"></script>
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','UA-47570574-1','auto');ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
| 39.285714 | 81 | 0.683636 |
088ba03d3286a56ade1f0a36f4fe313ec3051c43 | 358 | go | Go | metrics/metrics_suite_test.go | mrbuk/sop112_exporter | 17c948ab693242a5139c96fd13f82f415a9a906e | [
"MIT"
] | null | null | null | metrics/metrics_suite_test.go | mrbuk/sop112_exporter | 17c948ab693242a5139c96fd13f82f415a9a906e | [
"MIT"
] | null | null | null | metrics/metrics_suite_test.go | mrbuk/sop112_exporter | 17c948ab693242a5139c96fd13f82f415a9a906e | [
"MIT"
] | null | null | null | package metrics_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
log "github.com/sirupsen/logrus"
)
func TestMetrics(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Metrics Suite")
}
var _ = Describe("Ensure GinkgoWriter is used for logging", func() {
BeforeSuite(func() {
log.SetOutput(GinkgoWriter)
})
})
| 16.272727 | 68 | 0.706704 |
061b7ee491c6f2f8183d69470867385eb6b738e9 | 531 | kt | Kotlin | app/src/main/java/net/saoshyant/Life/app/LruBitmapCache.kt | amirabbas8/life-android-client | ef5ac235333ec1dfbd4364769875f4ba1569e488 | [
"MIT"
] | 1 | 2020-08-06T03:28:23.000Z | 2020-08-06T03:28:23.000Z | app/src/main/java/net/saoshyant/Life/app/LruBitmapCache.kt | amirabbas8/life-android-client | ef5ac235333ec1dfbd4364769875f4ba1569e488 | [
"MIT"
] | null | null | null | app/src/main/java/net/saoshyant/Life/app/LruBitmapCache.kt | amirabbas8/life-android-client | ef5ac235333ec1dfbd4364769875f4ba1569e488 | [
"MIT"
] | null | null | null | package net.saoshyant.Life.app
import android.graphics.Bitmap
import android.support.v4.util.LruCache
import com.android.volley.toolbox.ImageLoader.ImageCache
class LruBitmapCache(maxSize: Int) : LruCache<String, Bitmap>(maxSize), ImageCache {
override fun sizeOf(key: String, value: Bitmap): Int {
return value.rowBytes * value.height
}
override fun getBitmap(url: String): Bitmap? {
return get(url)
}
override fun putBitmap(url: String, bitmap: Bitmap) {
put(url, bitmap)
}
} | 25.285714 | 84 | 0.702448 |
5a069359e73e90f9d16604bca6fef4b522a68a42 | 2,516 | rs | Rust | rust/day-2/src/lib.rs | nathankleyn/advent-of-code-2017 | 25e3681af98f9979989e94c75a4728334b11f054 | [
"MIT"
] | null | null | null | rust/day-2/src/lib.rs | nathankleyn/advent-of-code-2017 | 25e3681af98f9979989e94c75a4728334b11f054 | [
"MIT"
] | null | null | null | rust/day-2/src/lib.rs | nathankleyn/advent-of-code-2017 | 25e3681af98f9979989e94c75a4728334b11f054 | [
"MIT"
] | null | null | null | #[allow(dead_code)]
fn day_2_part_1(input: &str) -> i64 {
input.lines().map(|row| {
let state = row.split_whitespace().fold(ChecksumState::zero(), |acc, c| {
let incoming: i64 = c.parse().unwrap();
acc.update(incoming)
});
state.largest.unwrap_or(0) - state.smallest.unwrap_or(0)
}).sum()
}
#[allow(dead_code)]
fn day_2_part_2(input: &str) -> i64 {
input.lines().map(|row| {
let columns: Vec<i64> = row.split_whitespace().map(|c| c.parse().unwrap()).collect();
let mut result: i64 = 0;
'outer: for (i, x) in columns.iter().enumerate() {
for (j, y) in columns.iter().enumerate() {
if i == j {
continue;
}
let xm = std::cmp::max(x, y);
let ym = std::cmp::min(x, y);
if xm % ym == 0 {
result = xm / ym;
break 'outer;
}
}
}
result
}).sum()
}
struct ChecksumState {
largest: Option<i64>,
smallest: Option<i64>
}
impl ChecksumState {
fn zero() -> ChecksumState {
ChecksumState {
largest: None,
smallest: None
}
}
fn update(&self, incoming: i64) -> ChecksumState {
let largest = match self.largest {
None => incoming,
Some(curr) => {
if incoming > curr {
incoming
} else {
curr
}
}
};
let smallest = match self.smallest {
None => incoming,
Some(curr) => {
if incoming < curr {
incoming
} else {
curr
}
}
};
ChecksumState {
largest: Some(largest),
smallest: Some(smallest)
}
}
}
#[cfg(test)]
mod tests {
use day_2_part_1;
use day_2_part_2;
#[test]
fn day_2_part_1_examples() {
assert_eq!(day_2_part_1("5 1 9 5\n7 5 3\n2 4 6 8"), 18);
}
#[test]
fn day_2_part_2_examples() {
assert_eq!(day_2_part_2("5 9 2 8\n9 4 7 3\n3 8 6 5"), 9);
}
const INPUT: &'static str = include_str!("input");
#[test]
fn day_2_part_1_test_input() {
assert_eq!(day_2_part_1(INPUT), 45158);
}
#[test]
fn day_2_part_2_test_input() {
assert_eq!(day_2_part_2(INPUT), 294);
}
}
| 22.872727 | 93 | 0.459062 |
8e55fa406f8b97278d725a3b76b1a4b15a1fdda6 | 6,083 | sql | SQL | security-admin/db/mysql/alti_ranger_service.sql | Altiscale/ranger | cb87b6237d79cfe7bca45fb28b7409640834c031 | [
"Apache-2.0"
] | null | null | null | security-admin/db/mysql/alti_ranger_service.sql | Altiscale/ranger | cb87b6237d79cfe7bca45fb28b7409640834c031 | [
"Apache-2.0"
] | 8 | 2017-11-09T01:27:23.000Z | 2018-05-01T01:42:20.000Z | security-admin/db/mysql/alti_ranger_service.sql | Altiscale/ranger | cb87b6237d79cfe7bca45fb28b7409640834c031 | [
"Apache-2.0"
] | 2 | 2018-01-23T21:46:29.000Z | 2019-05-03T20:18:08.000Z | -- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
USE ranger;
SET @current_date_time = NOW();
SET @ranger_admin_username = 'ranger_username';
-- ranger admin creates services
SET @ranger_user_id = (SELECT xpu.id FROM x_portal_user xpu WHERE xpu.login_id = @ranger_admin_username);
-- Create TAG services first for hdfs and hive
SET @tag_service_type = (SELECT xsd.id FROM x_service_def xsd WHERE xsd.name = 'tag');
SET @service_guid = uuid();
-- Insert HDFS Tag
SET @hdfs_tag = 'hdfs';
INSERT INTO x_service (guid, create_time, update_time, added_by_id, upd_by_id, version, type, name, description, is_enabled, tag_version) VALUES (@service_guid, @current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, 1, @tag_service_type, @hdfs_tag, 'HDFS Tag', 1, 1);
-- Insert Hive Tag
SET @hive_tag = 'hive';
SET @service_guid = uuid();
INSERT INTO x_service (guid, create_time, update_time, added_by_id, upd_by_id, version, type, name, description, is_enabled, tag_version) VALUES (@service_guid, @current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, 1, @tag_service_type, @hive_tag, 'Hive Tag', 1, 1);
-- Create HDFS service
SET @hdfs_service_type = (SELECT xsd.id FROM x_service_def xsd WHERE xsd.name = @hdfs_tag);
SET @hdfs_service_name = 'hdfs_service';
-- Retrieve Tag Service ID for hdfs
SET @hdfs_tag_service = (SELECT xs.id FROM x_service xs WHERE xs.type = @tag_service_type AND xs.name = @hdfs_tag);
SET @hdfs_tag_service_version = (SELECT xs.version FROM x_service xs WHERE xs.id = @hdfs_tag_service);
SET @service_guid = uuid();
INSERT INTO x_service (guid, create_time, update_time, added_by_id, upd_by_id, version, type, name, description, is_enabled, tag_service, tag_version) VALUES (@service_guid, @current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, 1, @hdfs_service_type, @hdfs_service_name, 'Hadoop Environment', 1, @hdfs_tag_service, @hdfs_tag_service_version);
SET @hdfs_service_id = (SELECT LAST_INSERT_ID());
-- Insert configurations for HDFS
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hdfs_service_id, 'hadoop.security.authentication', 'kerberos');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hdfs_service_id, 'hadoop.rpc.protection', 'authentication');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hdfs_service_id, 'fs.default.name', 'hdfs://localhost:port');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hdfs_service_id, 'hadoop.security.authorization', 'true');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hdfs_service_id, 'username', @ranger_admin_username);
-- Enable deny and exclude policies by default for HDFS
UPDATE x_service_def SET def_options = "{\"enableDenyAndExceptionsInPolicies\":\"true\"}" WHERE id = @hdfs_service_type;
-- Create Hive service
SET @hive_service_type = (SELECT xsd.id FROM x_service_def xsd WHERE xsd.name = @hive_tag);
SET @hive_service_name = 'hive_service';
-- Retrieve Tag Service ID for hive
SET @hive_tag_service = (SELECT xs.id FROM x_service xs WHERE xs.type = @tag_service_type AND xs.name = @hive_tag);
SET @hive_tag_service_version = (SELECT xs.version FROM x_service xs WHERE xs.id = @hive_tag_service);
SET @service_guid = uuid();
INSERT INTO x_service (guid, create_time, update_time, added_by_id, upd_by_id, version, type, name, description, is_enabled, tag_service, tag_version) VALUES (@service_guid, @current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, 1, @hive_service_type, @hive_service_name, 'Hive Environment', 1, @hive_tag_service, @hive_tag_service_version);
SET @hive_service_id = (SELECT LAST_INSERT_ID());
-- Insert configurations for HIVE
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hive_service_id, 'jdbc.driverClassName', 'org.apache.hive.jdbc.HiveDriver');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hive_service_id, 'jdbc.url', '');
INSERT INTO x_service_config_map (create_time, update_time, added_by_id, upd_by_id, service, config_key, config_value) VALUES (@current_date_time, @current_date_time, @ranger_user_id, @ranger_user_id, @hive_service_id, 'username', @ranger_admin_username);
-- Enable deny and exclude policies by default for HIVE
UPDATE x_service_def SET def_options = "{\"enableDenyAndExceptionsInPolicies\":\"true\"}" WHERE id = @hive_service_type; | 98.112903 | 362 | 0.791879 |
f01b60da24ac57c6411633ed9cdae5efdce3f477 | 7,108 | js | JavaScript | app/models/logging.js | openwhyd/openwhyd-solo | da9c7953e2f7a58fe467e71a6d3da0d567b28fb3 | [
"MIT"
] | 1 | 2022-02-28T15:55:56.000Z | 2022-02-28T15:55:56.000Z | app/models/logging.js | openwhyd/openwhyd-solo | da9c7953e2f7a58fe467e71a6d3da0d567b28fb3 | [
"MIT"
] | 9 | 2022-03-01T18:11:34.000Z | 2022-03-29T10:55:32.000Z | app/models/logging.js | openwhyd/openwhyd-solo | da9c7953e2f7a58fe467e71a6d3da0d567b28fb3 | [
"MIT"
] | null | null | null | var http = require('http');
var querystring = require('querystring');
var errorTemplate = require('../templates/error.js');
const snip = require('../snip.js');
const genReqLogLine = ({ head, method, path, params, suffix }) =>
!process.appParams.color
? [
head,
method,
path[0] + (path.length > 1 ? '?' + path.slice(1).join('?') : ''),
suffix,
params,
]
: [
head.grey,
method.cyan,
path[0].green +
(path.length > 1 ? '?' + path.slice(1).join('?') : '').yellow,
suffix.white,
params.grey,
];
http.IncomingMessage.prototype.logToConsole = function (suffix, params) {
console.log(
...genReqLogLine({
head: '▶ ' + new Date().toISOString(),
method: this.method,
path: this.url.split('?'),
params:
typeof params === 'object'
? JSON.stringify(snip.formatPrivateFields(params))
: '',
suffix: suffix ? '(' + suffix + ')' : '',
})
);
};
var config = require('./config.js');
var mongodb = require('./mongodb.js');
var loggingTemplate = require('../templates/logging.js');
var renderUnauthorizedPage = loggingTemplate.renderUnauthorizedPage;
// ========= USER AGENT STUFF
/**
* Gets the http referer of a request
*/
http.IncomingMessage.prototype.getReferer = function () {
return this.headers['referrer'] || this.headers['referer'];
};
// ========= COOKIE STUFF
/**
* Generates a user session cookie string
* that can be supplied to a Set-Cookie HTTP header.
*/
/*
exports.makeCookie = function(user) {
var date = new Date((new Date()).getTime() + 1000 * 60 * 60 * 24 * 365);
return 'whydUid="'+(user.id || '')+'"; Expires=' + date.toGMTString();
};
*/
/**
* Transforms cookies found in the request into an object
*/
http.IncomingMessage.prototype.getCookies = (function () {
//var cookieReg = /([^=\s]+)="([^"]*)"/;
return function () {
//console.log("cookies raw:", this.headers.cookie);
if (!this.headers.cookie) return null;
var cookiesArray = this.headers.cookie.split(';');
//console.log("cookies array:", cookiesArray);
var cookies = {};
for (let i = 0; i < cookiesArray.length; i++) {
//var match = cookiesArray[i].trim().match(cookieReg);
//if (match)
cookiesArray[i] = cookiesArray[i].trim();
var separ = cookiesArray[i].indexOf('=');
if (separ > 0)
cookies[cookiesArray[i].substr(0, separ)] = cookiesArray[i].substring(
separ + 1
);
}
//console.log("cookies object:", cookies);
return cookies;
};
})();
// ========= USER ACCESSORS
/**
* Returns the logged in user's uid, from its openwhyd session cookie
*/
http.IncomingMessage.prototype.getUid = function () {
/*
var uid = (this.getCookies() || {})["whydUid"];
if (uid) uid = uid.replace(/\"/g, "");
//if (uid) console.log("found openwhyd session cookie", uid);
return uid;
*/
return (this.session || {}).whydUid;
};
/**
* Returns the logged in user as an object {_id, id, fbId, name, img}
*/
http.IncomingMessage.prototype.getUser = function () {
var uid = this.getUid();
if (uid) {
var user = mongodb.usernames[uid];
if (user) user.id = '' + user._id;
return user;
} else return null;
};
//http.IncomingMessage.prototype.getUserFromFbUid = mongodb.getUserFromFbUid;
http.IncomingMessage.prototype.getUserFromId = mongodb.getUserFromId;
http.IncomingMessage.prototype.getUserNameFromId = mongodb.getUserNameFromId;
// ========= LOGIN/SESSION/PRIVILEGES STUFF
/**
* Checks that a registered user is logged in, and return that user, or show an error page
*/
http.IncomingMessage.prototype.checkLogin = function (response, format) {
var user = this.getUser();
//console.log("checkLogin, cached record for logged in user: ", user);
if (!user /*|| !user.name*/) {
if (response) {
if (format && format.toLowerCase() == 'json')
errorTemplate.renderErrorResponse(
{ errorCode: 'REQ_LOGIN' },
response,
'json'
);
else response.renderHTML(renderUnauthorizedPage());
}
return false;
}
return user;
};
http.IncomingMessage.prototype.isUserAdmin = exports.isUserAdmin = function (
user
) {
return user.email && config.adminEmails[user.email];
};
http.IncomingMessage.prototype.isAdmin = function () {
return this.isUserAdmin(this.getUser());
};
http.IncomingMessage.prototype.checkAdmin = function (response, format) {
var user = this.checkLogin(response, format);
if (!user) return false;
else if (!exports.isUserAdmin(user)) {
console.log(
'access restricted, user is not an admin: ',
user._id || user.id
);
response && response.legacyRender('nice try! ;-)');
return false;
}
return user;
};
// ========= HTTP RESPONSE SNIPPETS
http.ServerResponse.prototype.renderHTML = function (html, statusCode) {
return this.legacyRender(
html,
null,
{ 'content-type': 'text/html; charset=utf-8' },
statusCode
);
};
http.ServerResponse.prototype.renderJSON = function (json, statusCode) {
return this.legacyRender(
json,
null,
{ 'content-type': 'application/json; charset=utf-8' },
statusCode
);
};
http.ServerResponse.prototype.renderWrappedJSON = function (json, statusCode) {
this.renderHTML(
'<!DOCTYPE html><html><body><textarea>' +
JSON.stringify(json) +
'</textarea></body></html>',
statusCode
);
};
http.ServerResponse.prototype.renderText = function (json, statusCode) {
return this.legacyRender(
json,
null,
{ 'content-type': 'text/text; charset=utf-8' },
statusCode
);
};
// TODO: this function is overrided by Express => delete it to prevent ambiguity
http.ServerResponse.prototype.redirect = function (url) {
return this.renderHTML(loggingTemplate.htmlRedirect(url));
};
http.ServerResponse.prototype.safeRedirect = function (url) {
const safeURL = snip.getSafeOpenwhydURL(url, config.urlPrefix);
if (safeURL === false) return this.forbidden();
this.redirect(url);
};
http.ServerResponse.prototype.redirectWithTracking = function (url, title) {
return this.renderHTML(
loggingTemplate.renderRedirectPageWithTracking(url, title)
);
};
http.ServerResponse.prototype.renderIframe = function (url, metaOverrides) {
return this.renderHTML(loggingTemplate.renderIframe(url, metaOverrides));
};
http.ServerResponse.prototype.temporaryRedirect = function (_url, _reqParams) {
let url = '' + _url;
if (_reqParams /*request.method.toLowerCase() == "get"*/) {
const reqParams = querystring.stringify(_reqParams);
if (reqParams.length) url += '?' + reqParams;
}
this.redirect(307, url); // see https://expressjs.com/fr/4x/api.html#res.redirect
};
http.ServerResponse.prototype.badRequest = function (error) {
this.status(400).send(error ? '' + error : 'BAD REQUEST');
};
http.ServerResponse.prototype.forbidden = function (error) {
this.status(403).send(error ? '' + error : 'FORBIDDEN');
};
http.ServerResponse.prototype.notFound = function () {
this.status(404).send();
};
| 28.318725 | 90 | 0.644766 |
5f92a7d03068326777cf58dc816fb8cf3602e851 | 2,779 | h | C | third_party/virtualbox/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xf86PciData.h | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 521 | 2019-03-29T15:44:08.000Z | 2022-03-22T09:46:19.000Z | third_party/virtualbox/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xf86PciData.h | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 30 | 2019-06-04T17:00:49.000Z | 2021-09-08T20:44:19.000Z | third_party/virtualbox/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xf86PciData.h | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 99 | 2019-03-29T16:04:13.000Z | 2022-03-28T16:59:34.000Z |
/*
* Copyright (c) 2000-2002 by The XFree86 Project, Inc.
*
* 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
*
* Except as contained in this notice, the name of the copyright holder(s)
* and author(s) shall not be used in advertising or otherwise to promote
* the sale, use or other dealings in this Software without prior written
* authorization from the copyright holder(s) and author(s).
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef PCI_DATA_H_
#define PCI_DATA_H_
#define NOVENDOR 0xFFFF
#define NODEVICE 0xFFFF
#define NOSUBSYS 0xFFFF
typedef Bool (*ScanPciSetupProcPtr)(void);
typedef void (*ScanPciCloseProcPtr)(void);
typedef int (*ScanPciFindByDeviceProcPtr)(
unsigned short vendor, unsigned short device,
unsigned short svendor, unsigned short subsys,
const char **vname, const char **dname,
const char **svname, const char **sname);
typedef int (*ScanPciFindBySubsysProcPtr)(
unsigned short svendor, unsigned short subsys,
const char **svname, const char **sname);
/*
* Whoever loads this module needs to define these and initialise them
* after loading.
*/
extern ScanPciSetupProcPtr xf86SetupPciIds;
extern ScanPciCloseProcPtr xf86ClosePciIds;
extern ScanPciFindByDeviceProcPtr xf86FindPciNamesByDevice;
extern ScanPciFindBySubsysProcPtr xf86FindPciNamesBySubsys;
Bool ScanPciSetupPciIds(void);
void ScanPciClosePciIds(void);
int ScanPciFindPciNamesByDevice(unsigned short vendor, unsigned short device,
unsigned short svendor, unsigned short subsys,
const char **vname, const char **dname,
const char **svname, const char **sname);
int ScanPciFindPciNamesBySubsys(unsigned short svendor, unsigned short subsys,
const char **svname, const char **sname);
#endif
| 39.7 | 78 | 0.77222 |
c669c051edbf093e7b531775b31b6bc8ad863908 | 3,398 | rb | Ruby | spec/unit/types/email_spec.rb | SchooLynk/custom_fields | 0fe0668a71ce281369b2ed28571a2d2c5b892489 | [
"MIT"
] | null | null | null | spec/unit/types/email_spec.rb | SchooLynk/custom_fields | 0fe0668a71ce281369b2ed28571a2d2c5b892489 | [
"MIT"
] | 2 | 2019-08-25T10:30:48.000Z | 2021-05-11T10:11:25.000Z | spec/unit/types/email_spec.rb | SchooLynk/custom_fields | 0fe0668a71ce281369b2ed28571a2d2c5b892489 | [
"MIT"
] | null | null | null | describe CustomFields::Types::Email do
let(:default) { nil }
let(:blog) { build_blog }
let(:field) { blog.posts_custom_fields.first }
let(:post) { blog.posts.build title: 'Hello world', body: 'Lorem ipsum...' }
it 'is not considered as a relationship field type' do
expect(field.is_relationship?).to be false
end
it 'sets a value' do
expect(post.email).to eq nil
post.email = '[email protected]'
expect(post.email).to eq '[email protected]'
end
describe 'validation' do
context 'email not required' do
let(:blog) { build_email_not_required_blog }
[nil, ''].each do |value|
it "should be valid if the value is #{value.inspect}" do
post.email = value
expect(post.valid?).to eq true
end
end
end
context 'email required' do
[nil, ''].each do |value|
it "should not valid if the value is #{value.inspect}" do
post.email = value
expect(post.valid?).to eq false
expect(post.errors[:email]).not_to be_blank
expect(post.errors[:email]).not_to be_blank
expect(post.errors.details[:email].first[:error]).to eq(:blank)
end
end
end
['foo.fr', 'foo@foo', '[email protected]', '[email protected] ', '[email protected] ', 'foo@foo.com', 'fo([email protected]', 'fo"[email protected]'].each do |value|
it "should not valid if the value is #{value.inspect}" do
post.email = value
expect(post.valid?).to eq false
expect(post.errors[:email]).not_to be_blank
expect(post.errors[:email]).not_to be_blank
expect(post.errors.details[:email].first[:error]).to eq(:invalid)
end
end
['[email protected]', '[email protected]', '[email protected]', '[email protected]','[email protected]'].each do |value|
it "should be valid if the value is #{value.inspect}" do
post.email = value
expect(post.valid?).to eq true
expect(post.errors[:email]).to be_blank
end
end
end
describe 'default value' do
let(:default) { '[email protected]' }
subject { post.email }
it { is_expected.to eq '[email protected]' }
context 'when unsetting a value' do
before { post.email = '[email protected]'; post.email = nil }
it { is_expected.to eq nil }
end
end
describe 'getter and setter' do
it 'returns an empty hash if no value has been set' do
expect(post.class.string_attribute_get(post, 'email')).to eq({})
end
it 'returns the value' do
post.email = '[email protected]'
expect(post.class.string_attribute_get(post, 'email')).to eq('email' => '[email protected]')
end
it 'sets a nil value' do
expect(post.class.string_attribute_set(post, 'email', {})).to be_nil
end
it 'sets a value' do
post.class.string_attribute_set(post, 'email', { 'email' => '[email protected]' })
expect(post.email).to eq '[email protected]'
end
end
protected
def build_blog
Blog.new(name: 'My personal blog').tap do |blog|
field = blog.posts_custom_fields.build label: 'Email', type: 'email', required: true, default: default
field.valid?
end
end
def build_email_not_required_blog
Blog.new(name: 'My personal blog').tap do |blog|
field = blog.posts_custom_fields.build label: 'Email', type: 'email', required: false, default: default
field.valid?
end
end
end
| 29.042735 | 137 | 0.620954 |
c43055f1177dc01778fe19ed177cfeb0f5a21da8 | 1,864 | h | C | HazelDash/src/Scripts/Level.h | 0xworks/HazelDash | ba5106526dc61e3647b2815156e0ac08a2d37f22 | [
"Apache-2.0"
] | 19 | 2020-04-26T19:16:16.000Z | 2021-05-31T07:31:20.000Z | HazelDash/src/Scripts/Level.h | 0xworks/HazelDash | ba5106526dc61e3647b2815156e0ac08a2d37f22 | [
"Apache-2.0"
] | 1 | 2020-06-28T10:30:07.000Z | 2020-07-02T09:11:18.000Z | HazelDash/src/Scripts/Level.h | 0xworks/HazelDash | ba5106526dc61e3647b2815156e0ac08a2d37f22 | [
"Apache-2.0"
] | 3 | 2021-09-02T07:38:41.000Z | 2021-11-12T09:10:51.000Z | #pragma once
#include "Components/Tile.h"
#include "Hazel/Scene/NativeScript.h"
class Level final : public Hazel::NativeScript {
public:
Level(Hazel::Entity entity, int level, float fixedTimeStep, float animationTimestep);
virtual ~Level();
virtual void OnUpdate(Hazel::Timestep ts) override;
void OnExplode(const int row, const int col);
void AmoebaFixedUpdate();
void OnSolidify(const Tile solidfyTo);
void ExploderUpdate(Hazel::Timestep ts);
void AnimatorUpdate(Hazel::Timestep ts);
float GetFixedTimestep();
uint32_t GetWidth();
uint32_t GetHeight();
Hazel::Entity GetPlayerEntity();
Hazel::Entity GetEntity(const int row, const int col);
void SetEntity(const int row, const int col, Hazel::Entity entity);
void ClearEntity(const int row, const int col);
void SwapEntities(const int rowA, const int colA, const int rowB, const int colB);
// TODO: should be "events"
void OnPlayerDied();
void OnLevelCompleted();
void OnIncreaseScore();
int GetScore();
int GetScoreRequired();
int GetAmoebaSize();
int GetAmoebaPotential();
bool HasWonLevel();
bool IsPlayerAlive();
public:
static Level* Get() {
HZ_ASSERT(sm_Instance, "Level has not been instantiated");
return sm_Instance;
}
private:
inline static Level* sm_Instance = nullptr;
private:
std::vector<Hazel::Entity> m_Entities;
Hazel::Entity m_EmptyEntity;
Hazel::Entity m_ExitEntity;
Hazel::Entity m_PlayerEntity;
float m_FixedTimestep = 1.0f / 10.0f;
float m_FixedUpdateAccumulatedTs = 0.0f;
float m_AnimationTimestep = 1.0f / 25.0f;
float m_AnimatorAccumulatedTs = 0.0f;
int m_Width = 0;
int m_Height = 0;
int m_Score = 0;
int m_ScoreRequired = 0;
int m_AmoebaSize = 0;
int m_AmoebaPotential = 0;
bool m_PlayerIsAlive = false; // if false, then pressing spacebar restarts. Otherwise, pressing spacebar pauses
bool m_WonLevel = false;
};
| 24.526316 | 115 | 0.744635 |
4fed4bd91b85e62f2be80a24edffa07b6d4de849 | 76 | lua | Lua | gamemode/rust/gamemode/modules/inventory/cl_meta_player.lua | Synix28/Gmod-Rust | 2f93b20f5e3ff86cb8f052faf537253d5423ad23 | [
"MIT"
] | 1 | 2019-05-10T17:56:03.000Z | 2019-05-10T17:56:03.000Z | gamemode/rust/gamemode/modules/inventory/cl_meta_player.lua | Synix28/Gmod-Rust | 2f93b20f5e3ff86cb8f052faf537253d5423ad23 | [
"MIT"
] | 1 | 2019-09-22T09:56:43.000Z | 2019-09-27T19:26:09.000Z | gamemode/rust/gamemode/modules/inventory/cl_meta_player.lua | Synix28/Gmod-Rust | 2f93b20f5e3ff86cb8f052faf537253d5423ad23 | [
"MIT"
] | null | null | null | --[[
Inventory - CL Meta
]]--
local PLAYER = FindMetaTable("Player")
| 9.5 | 38 | 0.592105 |
859a3dc5cd8e6106a2226fc8c77dc88a381cfa0e | 2,489 | js | JavaScript | cif/cart/test/integration/applyCouponToCartTest.js | lopesdasilva/commerce-cif-graphql-integration-hybris | 3db6966d29750d18897e0cc8bac7a616aa830901 | [
"Apache-2.0"
] | 8 | 2020-04-11T00:14:32.000Z | 2021-12-21T19:11:04.000Z | cif/cart/test/integration/applyCouponToCartTest.js | lopesdasilva/commerce-cif-graphql-integration-hybris | 3db6966d29750d18897e0cc8bac7a616aa830901 | [
"Apache-2.0"
] | 6 | 2022-03-14T10:37:17.000Z | 2022-03-14T10:39:09.000Z | cif/cart/test/integration/applyCouponToCartTest.js | lopesdasilva/commerce-cif-graphql-integration-hybris | 3db6966d29750d18897e0cc8bac7a616aa830901 | [
"Apache-2.0"
] | 4 | 2021-05-20T16:22:19.000Z | 2022-03-14T11:09:54.000Z | /*******************************************************************************
*
* Copyright 2019 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
******************************************************************************/
'use strict';
const sinon = require('sinon');
const assert = require('chai').assert;
const TestUtils = require('../../../utils/TestUtils.js');
const resolve = require('../../../cart/src/cartResolver.js').main;
const chai = require('chai');
const expect = require('chai').expect;
const chaiShallowDeepEqual = require('chai-shallow-deep-equal');
chai.use(chaiShallowDeepEqual);
const ApplyCouponLoader = require('../../src/ApplyCouponToCartLoader');
describe('ApplyCouponToCart', () => {
let ApplyCoupon;
before(() => {
sinon.stub(console, 'debug');
sinon.stub(console, 'error');
});
after(() => {
console.debug.restore();
console.error.restore();
});
beforeEach(() => {
// We "spy" all the loading functions
ApplyCoupon = sinon.spy(ApplyCouponLoader.prototype, '_applyCouponToCart');
});
describe('Integration Tests', () => {
//Returns object with hybris url and configuaration data
let args = TestUtils.getContextData();
before(async () => {
args.context.settings.bearer = await TestUtils.getBearer();
});
it('Mutation: validate apply coupon to cart', () => {
args.query =
'mutation {applyCouponToCart(input: {cart_id: "00000035",coupon_code: "BUYMORE16"}){cart{items{product{name}quantity}applied_coupon{code}prices{grand_total{value,currency}}}}}';
return resolve(args).then(result => {
const { errors } = result;
assert.isUndefined(result.errors); // N
let responseData = result.data.applyCouponToCart;
assert.notEqual(responseData, null);
expect(errors).to.be.undefined;
assert.equal(ApplyCoupon.callCount, 1);
});
});
});
});
| 38.292308 | 185 | 0.631177 |
4d056f46839000d66d39c00563b58916ba92e446 | 3,117 | lua | Lua | yatm_thermal_ducts/nodes/thermal_duct.lua | IceDragon200/mt-yatm | 7452f2905e1f4121dc9d244d18a23e76b11ebe5d | [
"Apache-2.0"
] | 3 | 2019-03-15T03:17:36.000Z | 2020-02-19T19:50:49.000Z | yatm_thermal_ducts/nodes/thermal_duct.lua | IceDragon200/mt-yatm | 7452f2905e1f4121dc9d244d18a23e76b11ebe5d | [
"Apache-2.0"
] | 24 | 2019-12-02T06:01:04.000Z | 2021-04-08T04:09:27.000Z | yatm_thermal_ducts/nodes/thermal_duct.lua | IceDragon200/mt-yatm | 7452f2905e1f4121dc9d244d18a23e76b11ebe5d | [
"Apache-2.0"
] | null | null | null | local cluster_thermal = assert(yatm.cluster.thermal)
local table_length = assert(foundation.com.table_length)
local table_merge = assert(foundation.com.table_merge)
-- A very thick duct
local size = 8 / 16 / 2
local groups = {
cracky = 1,
yatm_cluster_thermal = 1,
heatable_device = 1,
heater_device = 1,
thermal_duct = 1,
}
yatm.register_stateful_node("yatm_thermal_ducts:thermal_duct", {
description = "Thermal Duct",
groups = groups,
drop = "yatm_thermal_ducts:thermal_duct_off",
connects_to = {
"group:thermal_duct",
"group:heater_device",
"group:heatable_device",
},
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {-size, -size, -size, size, size, size},
connect_top = {-size, -size, -size, size, 0.5, size}, -- y+
connect_bottom = {-size, -0.5, -size, size, size, size}, -- y-
connect_front = {-size, -size, -0.5, size, size, size}, -- z-
connect_back = {-size, -size, size, size, size, 0.5 }, -- z+
connect_left = {-0.5, -size, -size, size, size, size}, -- x-
connect_right = {-size, -size, -size, 0.5, size, size}, -- x+
},
on_construct = function (pos)
local node = minetest.get_node(pos)
cluster_thermal:schedule_add_node(pos, node)
end,
after_destruct = function (pos, node)
cluster_thermal:schedule_remove_node(pos, node)
end,
thermal_interface = {
groups = {
duct = 1,
thermal_producer = 1, -- not actually, but it works like one
},
get_heat = function (self, pos, node)
local meta = minetest.get_meta(pos)
return meta:get_float("heat")
end,
update_heat = function (self, pos, node, heat, dtime)
local meta = minetest.get_meta(pos)
if yatm.thermal.update_heat(meta, "heat", heat, 10, dtime) then
yatm.queue_refresh_infotext(pos, node)
end
end,
},
refresh_infotext = function (pos, node)
local meta = minetest.get_meta(pos)
local available_heat = meta:get_float("heat")
local infotext =
cluster_thermal:get_node_infotext(pos) .. "\n" ..
"Heat: " .. math.floor(available_heat)
meta:set_string("infotext", infotext)
local new_name
if math.floor(available_heat) > 0 then
new_name = "yatm_thermal_ducts:thermal_duct_heating"
elseif math.floor(available_heat) < 0 then
new_name = "yatm_thermal_ducts:thermal_duct_cooling"
else
new_name = "yatm_thermal_ducts:thermal_duct_off"
end
if node.name ~= new_name then
node.name = new_name
minetest.swap_node(pos, node)
end
end,
}, {
off = {
tiles = {
"yatm_thermal_duct_side.off.png"
},
use_texture_alpha = "opaque",
},
heating = {
groups = table_merge(groups, { not_in_creative_inventory = 1 }),
tiles = {
"yatm_thermal_duct_side.heating.png"
},
use_texture_alpha = "opaque",
},
cooling = {
groups = table_merge(groups, { not_in_creative_inventory = 1 }),
tiles = {
"yatm_thermal_duct_side.cooling.png"
},
use_texture_alpha = "opaque",
},
})
| 25.54918 | 69 | 0.63683 |
d9083b21d76a6c3fdb6a3636f8bbe4320fb35cf1 | 912 | asm | Assembly | tests/fizzbuzz.asm | ntrupin/navmv | 7106f979419051119fcd3e9bf498b390d030d1e9 | [
"MIT"
] | 8 | 2020-01-12T07:11:21.000Z | 2021-12-23T08:59:55.000Z | tests/fizzbuzz.asm | ntrupin/navmv | 7106f979419051119fcd3e9bf498b390d030d1e9 | [
"MIT"
] | null | null | null | tests/fizzbuzz.asm | ntrupin/navmv | 7106f979419051119fcd3e9bf498b390d030d1e9 | [
"MIT"
] | null | null | null | section .data
.dec blank 0x10/
_start:
jmp fizzbuzz
fizzbuzz:
push ax
push bx
push cx
push dx
mov ax, 0
push ax
jmp fizzbuzz_loop
fizzbuzz_loop:
pop ax
inc ax
cmp ax, 101
je fizzbuzz_done
push ax
mov cx, ax
mod cx, 3
cmp cx, 0
je fizzbuzz_fizz
mov cx, ax
mod cx, 5
cmp cx, 0
je fizzbuzz_buzz
jne fizzbuzz_none
fizzbuzz_fizz:
mov ax, 1
mov bx, 1
mov cx, Fizz/
syscall
pop ax
push ax
mov cx, ax
mod cx, 5
cmp cx, 0
je fizzbuzz_buzz
jne fizzbuzz_nobuzz
fizzbuzz_buzz:
mov ax, 1
mov bx, 1
mov cx, Buzz
syscall
jmp fizzbuzz_loop
fizzbuzz_none:
mov bx, 1
pop ax
push ax
mov cx, ax
mov ax, 1
syscall
jmp fizzbuzz_loop
fizzbuzz_nobuzz:
mov ax, 1
mov bx, 1
mov cx, [blank]
syscall
jmp fizzbuzz_loop
fizzbuzz_done:
| 14.709677 | 23 | 0.587719 |
91f77a5b954fa57e748070f396ae9d2201c41196 | 643 | kt | Kotlin | packages/@simpli/cli-server/generator/injected/src/main/model/rm/TemplateRM.kt | simplitech/simpli-cli | 8c6a7f85da614627e205fca68125317d2732adcc | [
"MIT"
] | 3 | 2018-04-05T12:45:23.000Z | 2020-09-14T00:31:04.000Z | packages/@simpli/cli-server/generator/injected/src/main/model/rm/TemplateRM.kt | simplitech/simpli-cli | 8c6a7f85da614627e205fca68125317d2732adcc | [
"MIT"
] | 79 | 2019-02-06T19:35:42.000Z | 2022-02-13T19:58:38.000Z | packages/@simpli/cli-server/generator/injected/src/main/model/rm/TemplateRM.kt | simplitech/simpli-cli | 8c6a7f85da614627e205fca68125317d2732adcc | [
"MIT"
] | null | null | null | <%_ var packageAddress = options.serverSetup.packageAddress _%>
<%_ var startCase = options.serverSetup.startCase _%>
package <%-packageAddress%>.model.rm
import <%-packageAddress%>.model.resource.<%-table.modelName%>
import br.com.simpli.sql.Query
import br.com.simpli.sql.ResultBuilder
import java.sql.ResultSet
/**
* Relational Mapping of Principal from table <%-table.name%>
* @author Simpli CLI generator
*/
object <%-table.modelName%>RM {
<%-table.buildConstructor()-%>
<%-table.buildSelectFields()-%>
<%-table.buildFieldsToSearch()-%>
<%-table.buildOrderMap()-%>
<%-table.buildUpdateSet()-%>
<%-table.buildInsertValues()-%>
}
| 23.814815 | 63 | 0.723173 |
3bbfeafdc30d1cdfdf0140bbfcc2fc90f01d4359 | 24,650 | sql | SQL | sge.sql | yurrr/termPaper | 4a24e70331e2021c2d6bfbe796ad8a4728448475 | [
"MIT"
] | 2 | 2017-10-11T18:06:11.000Z | 2017-10-11T22:55:26.000Z | sge.sql | yurrr/termPaper | 4a24e70331e2021c2d6bfbe796ad8a4728448475 | [
"MIT"
] | 3 | 2017-10-12T03:26:34.000Z | 2017-10-12T17:45:51.000Z | sge.sql | yurrr/Neutron-Classes-management | 4a24e70331e2021c2d6bfbe796ad8a4728448475 | [
"MIT"
] | 3 | 2019-06-01T11:19:46.000Z | 2020-06-24T13:57:09.000Z | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 12, 2017 at 06:08 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
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: `sge`
--
-- --------------------------------------------------------
--
-- Table structure for table `aluno`
--
CREATE TABLE `aluno` (
`matricula` varchar(5) NOT NULL,
`nome` varchar(60) NOT NULL,
`data_nasc` date NOT NULL,
`email` varchar(30) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `aluno`
--
INSERT INTO `aluno` (`matricula`, `nome`, `data_nasc`, `email`, `data_mod`) VALUES
('12345', 'Seiya', '1973-12-01', '[email protected]', '0000-00-00 00:00:00'),
('12346', 'Shiryu', '1970-10-04', '[email protected]', '2016-10-06 22:21:35'),
('12347', 'Shun', '1973-02-23', '[email protected]', '2016-10-06 22:21:20'),
('12348', 'Hyoga', '1971-11-12', '[email protected]', '2016-10-06 22:23:07'),
('12349', 'Ikki', '1970-07-06', '[email protected]', '2016-10-06 22:24:05'),
('98712', 'Renan', '1657-03-12', '[email protected]', '2016-10-06 21:44:31');
-- --------------------------------------------------------
--
-- Table structure for table `aluno_nota`
--
CREATE TABLE `aluno_nota` (
`matricula` varchar(5) NOT NULL,
`disciplina_id` int(5) NOT NULL,
`nota` int(11) NOT NULL,
`ano_letivo` date NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='INCOMPLETO';
--
-- Dumping data for table `aluno_nota`
--
INSERT INTO `aluno_nota` (`matricula`, `disciplina_id`, `nota`, `ano_letivo`, `data_mod`) VALUES
('01671', 4, 6, '2016-12-18', '2016-12-22 00:16:42'),
('11223', 3, 8, '2016-12-18', '2016-12-22 00:16:47'),
('12345', 1, 8, '2016-12-18', '2016-12-19 01:23:57'),
('12346', 1, 10, '2016-12-19', '2016-12-19 02:46:07'),
('98712', 1, 3, '2016-12-18', '2016-12-19 01:25:52');
-- --------------------------------------------------------
--
-- Table structure for table `aluno_nota_tri`
--
CREATE TABLE `aluno_nota_tri` (
`matricula` varchar(15) NOT NULL,
`disciplina_id` varchar(2) NOT NULL,
`ttri1` float DEFAULT NULL,
`ptri1` float DEFAULT NULL,
`ttri2` float DEFAULT NULL,
`ptri2` float DEFAULT NULL,
`ttri3` float DEFAULT NULL,
`ptri3` float DEFAULT NULL,
`tri4` float DEFAULT NULL,
`ano` char(5) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `aluno_nota_tri`
--
INSERT INTO `aluno_nota_tri` (`matricula`, `disciplina_id`, `ttri1`, `ptri1`, `ttri2`, `ptri2`, `ttri3`, `ptri3`, `tri4`, `ano`, `data_mod`) VALUES
('11223', '1', 2, 3, 3, 4, 3, 7, 1, '2017', '2017-02-02 15:15:12'),
('11223', '2', 1, 1, 2, 2, 3, 7, 0, '2017', '2017-02-02 16:45:29'),
('12345', '1', 2, 3, 3, 4, 0, 4, 1, '2017', '2017-02-02 15:15:12'),
('12345', '2', 3, 1, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('12346', '1', 2, 3, 3, 4, 1, 5, 1, '2017', '2017-02-02 15:15:12'),
('12346', '2', 1, 1, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('12347', '1', 2, 3, 3, 4, 2, 6, 1, '2017', '2017-02-02 15:15:12'),
('12347', '2', 3, 1, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('12348', '1', 2, 3, 3, 4, 0, 0, 1, '2017', '2017-02-02 15:15:11'),
('12348', '2', 1, 1, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('12349', '1', 2, 3, 3, 4, 1, 1, 1, '2017', '2017-02-02 15:15:11'),
('12349', '2', 1, 7, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('24043', '1', 2, 3, 3, 4, 2, 2, 1, '2017', '2017-02-02 15:15:12'),
('24043', '2', 1, 7, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29'),
('98712', '1', 2, 3, 3, 4, 3, 3, 1, '2017', '2017-02-02 15:15:12'),
('98712', '2', 1, 1, 2, 2, 3, 3, 0, '2017', '2017-02-02 16:45:29');
-- --------------------------------------------------------
--
-- Table structure for table `calendario`
--
CREATE TABLE `calendario` (
`cod_evento` int(11) NOT NULL,
`matricula` int(10) NOT NULL,
`evento` tinytext NOT NULL,
`descricao` tinytext NOT NULL,
`datahora` datetime NOT NULL,
`datafim` datetime NOT NULL,
`allday` varchar(6) NOT NULL,
`cor` varchar(10) NOT NULL,
`cor2` varchar(10) NOT NULL,
`turma` varchar(6) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `disciplinas`
--
CREATE TABLE `disciplinas` (
`disciplina_id` int(5) NOT NULL,
`disciplina_nome` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `disciplinas`
--
INSERT INTO `disciplinas` (`disciplina_id`, `disciplina_nome`) VALUES
(1, 'Português'),
(2, 'Literatura'),
(7, 'Matemática I'),
(10, 'Matemática II'),
(13, 'Química I'),
(16, 'Química II'),
(19, 'Sociologia'),
(22, 'Geografia'),
(25, 'Biologia'),
(28, 'Física'),
(31, 'História'),
(34, 'Filosofia'),
(37, 'Inglês'),
(40, 'Espanhol'),
(43, 'Francês'),
(46, 'Ed. Física'),
(49, 'Artes'),
(50, 'Música'),
(51, 'Desenho Avançado'),
(53, 'ICC'),
(54, 'LPI'),
(55, 'LPII'),
(56, 'LPIII'),
(57, 'LPIV'),
(58, 'Eng. Software');
-- --------------------------------------------------------
--
-- Table structure for table `lembretes`
--
CREATE TABLE `lembretes` (
`ID` int(11) NOT NULL,
`user` varchar(15) NOT NULL,
`content` varchar(60) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `lembretes`
--
INSERT INTO `lembretes` (`ID`, `user`, `content`) VALUES
(0, '10', '');
-- --------------------------------------------------------
--
-- Table structure for table `materia`
--
CREATE TABLE `materia` (
`materia_id` int(5) NOT NULL,
`nome` text NOT NULL,
`descricao` text NOT NULL,
`disciplina_id` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `materia`
--
INSERT INTO `materia` (`materia_id`, `nome`, `descricao`, `disciplina_id`) VALUES
(1, 'Modernismo', 'Movimento Literário no Brasil', '2'),
(2, 'Matrizes', 'Cálculos em um conjunto retangular de números, símbolos ou expressões, organizados em linhas e colunas', '3'),
(3, 'Eletromagnetismo', 'Conjunto de fenômenos que dizem respeito à interação entre campos elétricos e magnéticos e sua inter-relação', '12'),
(4, 'Relevo', 'Estudo das diferentes formas que moldam a superfície terrestre', '8'),
(5, 'Relevo', 'Estudo das diferentes formas que moldam a superfície terrestre', '8');
-- --------------------------------------------------------
--
-- Table structure for table `professor_disciplinas`
--
CREATE TABLE `professor_disciplinas` (
`matricula` varchar(10) NOT NULL,
`disciplina_id` varchar(5) NOT NULL,
`ano_letivo` year(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `professor_disciplinas`
--
INSERT INTO `professor_disciplinas` (`matricula`, `disciplina_id`, `ano_letivo`) VALUES
('10', '1', 2016),
('10', '2', 2016);
-- --------------------------------------------------------
--
-- Table structure for table `profs`
--
CREATE TABLE `profs` (
`matricula` varchar(10) NOT NULL,
`nome` char(100) NOT NULL,
`data_nasc` date NOT NULL,
`cpf` char(15) NOT NULL,
`tel_cel` varchar(15) NOT NULL,
`email` varchar(50) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `profs`
--
INSERT INTO `profs` (`matricula`, `nome`, `data_nasc`, `cpf`, `tel_cel`, `email`, `data_mod`) VALUES
('1', 'Jacinto', '1946-09-06', '1', '1', '[email protected]', '2016-09-22 04:31:13'),
('10', 'Jesus', '1010-10-10', '101.010.101-01', '(10)10101-0101', '[email protected]', '2017-01-02 21:43:08'),
('123123', 'JoseTeste', '2312-12-31', '123.412.341-23', '(12)33123-1231', '[email protected]', '2017-02-03 05:55:21'),
('2', 'Nunes', '0000-00-00', '2', '(22)22222-2222', '[email protected]', '2016-11-27 04:25:44'),
('25', 'Kithdris', '0000-00-00', '127', '(12)34567-8900', '[email protected]', '2016-12-13 23:56:05'),
('3', 'Junes', '0000-00-00', '127', '(22)22222-2222', '[email protected]', '2016-12-13 23:05:58');
-- --------------------------------------------------------
--
-- Table structure for table `prof_diario`
--
CREATE TABLE `prof_diario` (
`cod_aula` int(12) NOT NULL COMMENT 'codigo associado a questao ( cahave primaria)',
`matricula` varchar(10) NOT NULL,
`turma` varchar(7) NOT NULL,
`data` date NOT NULL,
`horaStart` char(5) NOT NULL,
`disciplina_id` varchar(10) NOT NULL,
`comentario` text NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prof_diario`
--
INSERT INTO `prof_diario` (`cod_aula`, `matricula`, `turma`, `data`, `horaStart`, `disciplina_id`, `comentario`, `data_mod`) VALUES
(34, '10', 'IN313', '2017-01-28', '07:15', '2', ' teste26', '2017-01-28 23:42:55');
-- --------------------------------------------------------
--
-- Table structure for table `prof_diario_aluno`
--
CREATE TABLE `prof_diario_aluno` (
`cod_aula` varchar(10) NOT NULL,
`matricula` varchar(5) NOT NULL,
`presente` varchar(5) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prof_diario_aluno`
--
INSERT INTO `prof_diario_aluno` (`cod_aula`, `matricula`, `presente`, `data_mod`) VALUES
('31', '12348', 'true', '2017-01-28 18:11:22'),
('31', '12349', 'false', '2017-01-28 18:11:22'),
('31', '24043', 'false', '2017-01-28 18:11:22'),
('31', '98712', 'false', '2017-01-28 18:11:22'),
('31', '12345', 'false', '2017-01-28 18:11:22'),
('31', '12346', 'false', '2017-01-28 18:11:23'),
('31', '12347', 'false', '2017-01-28 18:11:23'),
('31', '11223', 'false', '2017-01-28 18:11:23'),
('32', '12348', 'true', '2017-01-28 18:11:35'),
('32', '12349', 'false', '2017-01-28 18:11:35'),
('32', '24043', 'false', '2017-01-28 18:11:35'),
('32', '98712', 'false', '2017-01-28 18:11:35'),
('32', '12345', 'false', '2017-01-28 18:11:35'),
('32', '12346', 'false', '2017-01-28 18:11:36'),
('32', '12347', 'false', '2017-01-28 18:11:36'),
('32', '11223', 'true', '2017-01-28 18:11:36'),
('33', '12348', 'true', '2017-01-28 20:59:48'),
('33', '12349', 'false', '2017-01-28 20:59:49'),
('33', '24043', 'false', '2017-01-28 20:59:49'),
('33', '98712', 'false', '2017-01-28 20:59:49'),
('33', '12345', 'false', '2017-01-28 20:59:49'),
('33', '12346', 'false', '2017-01-28 20:59:49'),
('33', '12347', 'false', '2017-01-28 20:59:49'),
('33', '11223', 'true', '2017-01-28 20:59:49'),
('34', '12348', 'false', '2017-01-28 23:42:55'),
('34', '12349', 'false', '2017-01-28 23:42:55'),
('34', '24043', 'false', '2017-01-28 23:42:55'),
('34', '98712', 'false', '2017-01-28 23:42:55'),
('34', '12345', 'false', '2017-01-28 23:42:55'),
('34', '12346', 'false', '2017-01-28 23:42:55'),
('34', '12347', 'false', '2017-01-28 23:42:56'),
('34', '11223', 'true', '2017-01-28 23:42:56');
-- --------------------------------------------------------
--
-- Table structure for table `prof_turma`
--
CREATE TABLE `prof_turma` (
`matricula` varchar(10) NOT NULL,
`cod_turma` varchar(5) NOT NULL,
`disciplina` varchar(20) NOT NULL,
`ano_letivo` year(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prof_turma`
--
INSERT INTO `prof_turma` (`matricula`, `cod_turma`, `disciplina`, `ano_letivo`) VALUES
('10', 'IN313', 'Literatura', 2016),
('10', 'IN313', 'Português', 2016),
('10', 'MA215', 'Matematica', 2016);
-- --------------------------------------------------------
--
-- Table structure for table `provas`
--
CREATE TABLE `provas` (
`cod_prova` int(12) NOT NULL,
`nome` varchar(30) NOT NULL,
`matricula` varchar(10) NOT NULL,
`cod_disciplina` varchar(5) NOT NULL,
`anoserie` varchar(5) NOT NULL,
`tipo_avaliacao` varchar(20) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `provas`
--
INSERT INTO `provas` (`cod_prova`, `nome`, `matricula`, `cod_disciplina`, `anoserie`, `tipo_avaliacao`, `data_mod`) VALUES
(1, 'Prova de Modernismo', '10', '2', '3º an', 'Prova', '2016-12-21 23:52:00'),
(2, '', '10', '1', '1º an', 'Prova', '2017-01-05 15:36:08'),
(3, '', '10', '2', '1º an', 'Prova', '2017-01-05 15:36:08'),
(4, '', '10', '3', '1º an', 'Prova', '2017-01-05 15:36:08'),
(5, 'Prova Do tcc', '10', '2', '3º an', 'Prova', '2017-10-12 05:36:51');
-- --------------------------------------------------------
--
-- Table structure for table `prova_questoes`
--
CREATE TABLE `prova_questoes` (
`cod_prova` varchar(10) NOT NULL,
`cod_quest` varchar(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prova_questoes`
--
INSERT INTO `prova_questoes` (`cod_prova`, `cod_quest`) VALUES
('1', '4'),
('1', '5'),
('1', '17'),
('1', '17'),
('1', '15'),
('1', '8'),
('2', '8'),
('3', '8'),
('4', '8'),
('1', '12'),
('2', '12'),
('3', '12'),
('4', '12'),
('1', '15'),
('2', '15'),
('3', '15'),
('4', '15'),
('1', '4'),
('2', '4'),
('3', '4'),
('4', '4'),
('1', '5'),
('2', '5'),
('3', '5'),
('4', '5'),
('1', '10'),
('2', '10'),
('3', '10'),
('4', '10'),
('1', '15'),
('2', '15'),
('3', '15'),
('4', '15'),
('5', '15'),
('1', '4'),
('2', '4'),
('3', '4'),
('4', '4'),
('5', '4'),
('1', '5'),
('2', '5'),
('3', '5'),
('4', '5'),
('5', '5'),
('1', '21'),
('2', '21'),
('3', '21'),
('4', '21'),
('5', '21'),
('1', '27'),
('2', '27'),
('3', '27'),
('4', '27'),
('5', '27'),
('6', '27'),
('1', '4'),
('2', '4'),
('3', '4'),
('4', '4'),
('5', '4'),
('6', '4'),
('1', '27'),
('2', '27'),
('3', '27'),
('4', '27'),
('5', '27'),
('6', '27'),
('7', '27'),
('1', '29'),
('2', '29'),
('3', '29'),
('4', '29'),
('5', '29'),
('6', '29'),
('7', '29'),
('8', '29'),
('9', '29'),
('10', '29'),
('1', '28'),
('2', '28'),
('3', '28'),
('4', '28'),
('5', '28'),
('6', '28'),
('7', '28'),
('8', '28'),
('9', '28'),
('10', '28');
-- --------------------------------------------------------
--
-- Table structure for table `questoes`
--
CREATE TABLE `questoes` (
`cod_quest` int(12) NOT NULL COMMENT 'codigo associado a questao ( cahave primaria)',
`autor` varchar(50) NOT NULL COMMENT 'autor da questao; ou cod_prof ou enem,uff etc ',
`nivel` char(20) NOT NULL COMMENT 'a dificuldade da questao: b>baixo,m>medio,a>alto',
`tipo` char(20) NOT NULL COMMENT 'd>discursiva e o>objetivas',
`disciplina_id` varchar(5) NOT NULL,
`materia_id` varchar(5) NOT NULL,
`enunciado` text NOT NULL,
`op1` text,
`op2` text,
`op3` text,
`op4` text,
`op5` text,
`gabarito` text NOT NULL,
`ano_letivo` varchar(4) NOT NULL,
`anoserie` varchar(20) NOT NULL,
`visibilidade` varchar(3) NOT NULL COMMENT 'pub:publico ou pri:privado(disponivel somente para o prof criador da questao)',
`quant_linhas` text NOT NULL,
`linhas_visiveis` tinyint(1) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `questoes`
--
INSERT INTO `questoes` (`cod_quest`, `autor`, `nivel`, `tipo`, `disciplina_id`, `materia_id`, `enunciado`, `op1`, `op2`, `op3`, `op4`, `op5`, `gabarito`, `ano_letivo`, `anoserie`, `visibilidade`, `quant_linhas`, `linhas_visiveis`, `data_mod`) VALUES
(4, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'EU NÃO AGUENTO MAIS ERROS4', '', '', '', '', '', 'asdjsauhdsakjdh', '2016', '3º ano', 'Púb', '', 0, '2016-10-13 04:10:49'),
(5, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'EU NÃO AGUENTO MAIS ERROS5', '', '', '', '', '', 'asdjsauhdsakjdh', '2016', '3º ano', 'Púb', '', 0, '2016-10-13 04:10:51'),
(7, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'Portugues é uma droga?', '', '', '', '', '', 'sim', '2016', '3º ano', 'Pri', '', 0, '2017-01-06 22:59:46'),
(8, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', '1212', '', '', '', '', '', 'asdasd', '2016', '1º ano', 'Pri', '', 0, '2016-10-14 17:15:07'),
(10, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'ghgvheh', '', '', '', '', '', '452642', '2016', '3º ano', 'Púb', '', 0, '2016-12-10 03:38:24'),
(11, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'vbnvbnvbn', '', '', '', '', '', 'asdasdasd', '2016', '3º ano', 'Púb', '', 0, '2016-12-10 03:44:52'),
(13, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'yuiyuiyui', '', '', '', '', '', 'undefined', 'unde', '3º ano', 'Púb', '', 0, '2016-12-10 03:49:14'),
(14, 'Jacinto', 'Mediana', 'Discursiva', '2', '1', 'yuiyuiyui', '', '', '', '', '', 'qweqweqwe', '2016', '3º ano', 'Púb', '', 0, '2016-12-10 03:49:14'),
(15, 'Jacinto', 'Mediana', 'Objetiva', '2', '1', 'asdasdasd', '1', '2', '3', '4', '5', 'C', '2016', '3º ano', 'Púb', '', 0, '2016-12-11 18:20:23'),
(17, 'Jacinto', 'Mediana', 'DiscursivaCALC', '3', '2', 'Quanto é 1+1?', NULL, NULL, NULL, NULL, NULL, '2', '2016', '3º ano', 'Púb', '', 0, '2016-12-12 22:04:28'),
(18, 'Jesus', 'Média', 'Discursiva', '2', '1', 'dsghuihfduih', NULL, NULL, NULL, NULL, NULL, 'huhsdfaiudshiadshdsaiudsa', '1851', '2º ano', 'Pri', '16', 1, '2017-01-06 22:26:19'),
(19, 'Jesus', 'Média', 'Discursiva', '2', '1', 'lllllllllllllllllll', NULL, NULL, NULL, NULL, NULL, 'lllllllllllllllllllllll', '1837', '2º ano', 'Pri', '-9', 0, '2017-01-06 22:45:20'),
(25, '10', 'Fácil', 'Discursiva', '2', '1', 'ddddddddddd', NULL, NULL, NULL, NULL, NULL, 'ddddddddddddddddddddddddddddd', '1964', '2º ano', 'Pri', '9', 1, '2017-01-11 19:06:14'),
(26, '10', 'Média', 'Discursiva', '2', '1', 'Aheooooooooooo', NULL, NULL, NULL, NULL, NULL, 'Sim, sim', '1860', '2º ano', 'Pri', '12', 1, '2017-01-13 15:48:45'),
(27, '10', 'Média', 'Discursiva', '2', '1', 'aiushdas', NULL, NULL, NULL, NULL, NULL, '6128736', '2017', '3º ano', 'Púb', '2', 0, '2017-01-20 19:09:28'),
(28, '10', 'Dificil', 'Discursiva', '2', '1', 'teste', NULL, NULL, NULL, NULL, NULL, 'oi', '2017', '3º ano', 'Púb', '2', 1, '2017-02-03 05:57:35'),
(29, '10', 'Media', 'Objetiva', '2', '1', 'fsdf', 'asdf', 'asdf', 'asdf', 'asdf', 'afd', 'Opção C', '2017', '3º ano', 'Púb', '', 0, '2017-02-03 06:00:34');
-- --------------------------------------------------------
--
-- Table structure for table `tipo_prova`
--
CREATE TABLE `tipo_prova` (
`tipo_avaliacao` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tipo_prova`
--
INSERT INTO `tipo_prova` (`tipo_avaliacao`) VALUES
('1° certificação '),
('1° certificação recuperação '),
('2° certificação '),
('2° certificação recuperação '),
('3° certificação '),
('3° certificação recuperação ');
-- --------------------------------------------------------
--
-- Table structure for table `turma`
--
CREATE TABLE `turma` (
`cod_turma` varchar(5) NOT NULL,
`anoserie` varchar(6) NOT NULL,
`email` varchar(100) NOT NULL,
`sala` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `turma`
--
INSERT INTO `turma` (`cod_turma`, `anoserie`, `email`, `sala`) VALUES
('IN313', '3º', '[email protected]', '12-B'),
('MA313', '3º', '', '13-B');
-- --------------------------------------------------------
--
-- Table structure for table `turma_aluno`
--
CREATE TABLE `turma_aluno` (
`cod_turma` varchar(5) NOT NULL,
`matricula` varchar(5) NOT NULL,
`ano_letivo` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `turma_aluno`
--
INSERT INTO `turma_aluno` (`cod_turma`, `matricula`, `ano_letivo`) VALUES
('IN313', '24043', '2016-01-01'),
('IN313', '11223', '2016-01-01'),
('IN313', '01673', '2016-01-01'),
('IN313', '98712', '2016-01-01'),
('IN313', '12345', '0000-00-00'),
('IN313', '12346', '0000-00-00'),
('IN313', '12347', '0000-00-00'),
('IN313', '12348', '0000-00-00'),
('IN313', '12349', '0000-00-00');
-- --------------------------------------------------------
--
-- Table structure for table `user_photo`
--
CREATE TABLE `user_photo` (
`matricula` varchar(10) NOT NULL,
`photoID` text NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `user_photo`
--
INSERT INTO `user_photo` (`matricula`, `photoID`, `data_mod`) VALUES
('10', '/uploads/10-userPhoto-1483162242715.jpg', '2016-12-31 05:30:42'),
('25', './uploads/25-userPhoto-1481673375785.png', '2016-12-13 23:56:15');
-- --------------------------------------------------------
--
-- Table structure for table `usuario`
--
CREATE TABLE `usuario` (
`matricula` varchar(10) NOT NULL,
`username` varchar(50) NOT NULL,
`salt` char(200) NOT NULL,
`senha` char(129) NOT NULL,
`permissao` varchar(15) NOT NULL,
`data_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `usuario`
--
INSERT INTO `usuario` (`matricula`, `username`, `salt`, `senha`, `permissao`, `data_mod`) VALUES
('10', 'Jesus', '07dd16ba40d8735f', '71eedb8d0069cba18ea93144855ca878f5c1860a668dc48716bc6ca6f29615af51ceb31b9cf538b2ce008dc744b408e78dfc2ae11097b18199e6161aecb570ea', 'Professor', '2017-10-12 05:31:23'),
('25', 'ADM', '07dd16ba40d8735f', '71eedb8d0069cba18ea93144855ca878f5c1860a668dc48716bc6ca6f29615af51ceb31b9cf538b2ce008dc744b408e78dfc2ae11097b18199e6161aecb570ea', 'Administrador', '2017-10-12 06:05:51');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `aluno`
--
ALTER TABLE `aluno`
ADD PRIMARY KEY (`matricula`);
--
-- Indexes for table `aluno_nota`
--
ALTER TABLE `aluno_nota`
ADD PRIMARY KEY (`matricula`,`disciplina_id`);
--
-- Indexes for table `aluno_nota_tri`
--
ALTER TABLE `aluno_nota_tri`
ADD PRIMARY KEY (`matricula`,`disciplina_id`,`ano`);
--
-- Indexes for table `calendario`
--
ALTER TABLE `calendario`
ADD PRIMARY KEY (`cod_evento`);
--
-- Indexes for table `disciplinas`
--
ALTER TABLE `disciplinas`
ADD PRIMARY KEY (`disciplina_id`);
--
-- Indexes for table `lembretes`
--
ALTER TABLE `lembretes`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `materia`
--
ALTER TABLE `materia`
ADD PRIMARY KEY (`materia_id`);
--
-- Indexes for table `professor_disciplinas`
--
ALTER TABLE `professor_disciplinas`
ADD PRIMARY KEY (`matricula`,`disciplina_id`,`ano_letivo`);
--
-- Indexes for table `profs`
--
ALTER TABLE `profs`
ADD PRIMARY KEY (`matricula`);
--
-- Indexes for table `prof_diario`
--
ALTER TABLE `prof_diario`
ADD PRIMARY KEY (`cod_aula`);
--
-- Indexes for table `prof_turma`
--
ALTER TABLE `prof_turma`
ADD PRIMARY KEY (`matricula`,`cod_turma`,`disciplina`,`ano_letivo`);
--
-- Indexes for table `provas`
--
ALTER TABLE `provas`
ADD PRIMARY KEY (`cod_prova`);
--
-- Indexes for table `questoes`
--
ALTER TABLE `questoes`
ADD PRIMARY KEY (`cod_quest`);
--
-- Indexes for table `turma`
--
ALTER TABLE `turma`
ADD PRIMARY KEY (`cod_turma`);
--
-- Indexes for table `user_photo`
--
ALTER TABLE `user_photo`
ADD PRIMARY KEY (`matricula`);
--
-- Indexes for table `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`matricula`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `calendario`
--
ALTER TABLE `calendario`
MODIFY `cod_evento` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=75;
--
-- AUTO_INCREMENT for table `disciplinas`
--
ALTER TABLE `disciplinas`
MODIFY `disciplina_id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
--
-- AUTO_INCREMENT for table `prof_diario`
--
ALTER TABLE `prof_diario`
MODIFY `cod_aula` int(12) NOT NULL AUTO_INCREMENT COMMENT 'codigo associado a questao ( cahave primaria)', AUTO_INCREMENT=35;
--
-- AUTO_INCREMENT for table `provas`
--
ALTER TABLE `provas`
MODIFY `cod_prova` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `questoes`
--
ALTER TABLE `questoes`
MODIFY `cod_quest` int(12) NOT NULL AUTO_INCREMENT COMMENT 'codigo associado a questao ( cahave primaria)', AUTO_INCREMENT=30;
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 */;
| 30.735661 | 249 | 0.591278 |
e71b6b6cf8e7c599604773b7595d55d7edc14a12 | 383 | js | JavaScript | src/utils/multiCommits.js | shinenic/a-tree | b8b56555b481003c566ff71ff43c9a17d9bf11f1 | [
"MIT"
] | 56 | 2021-11-26T14:43:08.000Z | 2022-02-25T07:47:02.000Z | src/utils/multiCommits.js | shinenic/github-review-enhancer | aabe312f542e5e1d5b284eb1b40691d136c9595b | [
"MIT"
] | 3 | 2021-09-16T18:03:50.000Z | 2021-12-04T03:55:57.000Z | src/utils/multiCommits.js | shinenic/github-review-enhancer | aabe312f542e5e1d5b284eb1b40691d136c9595b | [
"MIT"
] | 4 | 2021-11-26T15:46:49.000Z | 2022-03-17T07:30:44.000Z | /**
* @note We may got only the first 7 characters of the SHA from pathname
* when users select multi commits by the native dropdown,
* in order to align the query key and prevent redundant queries,
* store the first 7 characters of the sha as the query key
*/
export const getBasehead = (base, head) =>
base && head ? `${base.slice(0, 7)}...${head.slice(0, 7)}` : null
| 42.555556 | 72 | 0.681462 |
65805b1152428a66b0dfdc44d57447f48018d812 | 595 | rs | Rust | src/lib/token.rs | ceres-lang/ceres-rs | 97a230144012682172f15ba0fb95eebed38ee562 | [
"MIT"
] | 10 | 2021-04-08T11:40:47.000Z | 2021-04-30T07:47:41.000Z | src/lib/token.rs | ceres-lang/ceres-rs | 97a230144012682172f15ba0fb95eebed38ee562 | [
"MIT"
] | 1 | 2021-04-09T20:14:45.000Z | 2021-04-09T20:14:45.000Z | src/lib/token.rs | ceres-lang/ceres-rs | 97a230144012682172f15ba0fb95eebed38ee562 | [
"MIT"
] | null | null | null | #[derive(Debug, Clone, PartialEq)]
pub enum Token {
// Operators
Plus,
Minus,
Star,
Slash,
Dot,
Comma,
LeftParen,
RightParen,
LeftBrace,
RightBrace,
Colon,
Semicolon,
Not,
Equals,
EqualsEquals,
NotEquals,
Less,
Greater,
LesserEqual,
GreaterEqual,
// Reserved Keywords
Case,
Const,
Def,
If,
Elif,
Else,
For,
Fn,
While,
TypeInt,
TypeBool,
TypeChar,
TypeStr,
// Types
Identifier(String),
IntLit(i32),
StringLit(String),
CharLit(char)
} | 12.934783 | 34 | 0.541176 |
e788bfca052e68d97ed2795f42111f9b9baca80b | 178 | js | JavaScript | data/js/78/94/e8/00/00/00.24.js | p-g-krish/deepmac-tracker | 44d625a6b1ec30bf52f8d12a44b0afc594eb5f94 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | data/js/78/94/e8/00/00/00.24.js | p-g-krish/deepmac-tracker | 44d625a6b1ec30bf52f8d12a44b0afc594eb5f94 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | data/js/78/94/e8/00/00/00.24.js | p-g-krish/deepmac-tracker | 44d625a6b1ec30bf52f8d12a44b0afc594eb5f94 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | deepmacDetailCallback("7894e8000000/24",[{"d":"2019-12-03","t":"add","s":"ieee-oui.csv","a":"8601 73rd Ave N, Suite 38 Brooklyn Park MN US 55428","c":"US","o":"Radio Bridge"}]);
| 89 | 177 | 0.646067 |
7d5b6458eac0c826923bd073762cf35c3975ed27 | 829 | html | HTML | prof/support2/pure_js/scope/closure.html | fredatgithub/AngularTraining | 5fa16959e39e3668fa8cbda0de6895ef833182ba | [
"MIT"
] | null | null | null | prof/support2/pure_js/scope/closure.html | fredatgithub/AngularTraining | 5fa16959e39e3668fa8cbda0de6895ef833182ba | [
"MIT"
] | null | null | null | prof/support2/pure_js/scope/closure.html | fredatgithub/AngularTraining | 5fa16959e39e3668fa8cbda0de6895ef833182ba | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html ng-app='myApp'>
<head>
<meta charset="utf-8" />
<title>
Closure
</title>
</head>
<body >
<script>
function additioneur(increment) {
// la variable "increment" est ici enfermé dans un espace de nom pourque
// chaque nouvelle fonction ainsi créée. Ce phénomène, qui implique la
// mémorisation de la variable et la liaison avec le scope de la fonction,
// s'appelle une closure.
return function(valeur) {
return valeur + increment;
}
}
var plus_cinq = additioneur(5);
/* C'est la raison pour laquelle on peut utiliser une référence à une variable
extérieur dans les fonctions anonymes utilisées par les outils type forEach
d'angular ou jQuery. */
</script>
<p> <button onclick='alert(plus_cinq(2))'>Plus 5</button> </p>
</html>
</body>
</html>
| 20.725 | 78 | 0.6731 |
c5b1095ec3c77f6af2f1409ab62eafca4f9b2523 | 38 | lua | Lua | test/translation/lua/tupleReturnDefinition.lua | zengjie/TypescriptToLua | 68168d9a8d86a0af6d6c3104a4445d01508f81de | [
"MIT"
] | null | null | null | test/translation/lua/tupleReturnDefinition.lua | zengjie/TypescriptToLua | 68168d9a8d86a0af6d6c3104a4445d01508f81de | [
"MIT"
] | null | null | null | test/translation/lua/tupleReturnDefinition.lua | zengjie/TypescriptToLua | 68168d9a8d86a0af6d6c3104a4445d01508f81de | [
"MIT"
] | null | null | null | function myFunc()
return 3,"4"
end | 12.666667 | 17 | 0.657895 |
e8db35ba967d9e65ca9d8b55e48764bb1fce3b61 | 101 | py | Python | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | from django.contrib import admin
from parents.models import Guardian
admin.site.register(Guardian)
| 16.833333 | 35 | 0.831683 |
05ee95acb527c37d5bb667077f2f6de48a0de9f5 | 5,912 | swift | Swift | CartKit/Source/FlashCartridge.swift | tww0003/CartBoy | f853eaa12120f289aa44098c744fe8bcd1d92b67 | [
"Unlicense"
] | 49 | 2019-05-16T19:14:34.000Z | 2022-03-06T01:34:43.000Z | CartKit/Source/FlashCartridge.swift | tww0003/CartBoy | f853eaa12120f289aa44098c744fe8bcd1d92b67 | [
"Unlicense"
] | 7 | 2019-05-29T12:39:38.000Z | 2022-03-20T19:02:57.000Z | CartKit/Source/FlashCartridge.swift | tww0003/CartBoy | f853eaa12120f289aa44098c744fe8bcd1d92b67 | [
"Unlicense"
] | 6 | 2019-06-07T14:13:06.000Z | 2021-12-11T06:13:46.000Z | import Gibby
public protocol Chipset {
associatedtype Platform: Gibby.Platform where Platform.Cartridge.Index == Int
static func erase<SerialDevice: SerialPortController>(_ serialDevice: Result<SerialDevice,Swift.Error>) -> Result<SerialDevice,Swift.Error>
static func flash<SerialDevice>(_ serialDevice: Result<SerialDevice,Error>, cartridge: FlashCartridge<Self>, progress update: ((Progress) -> ())?) -> Result<SerialDevice,Error> where SerialDevice: SerialPortController
}
public enum ChipsetFlashProgram {
case _555
case _AAA
case _555_BitSwapped
case _AAA_BitSwapped
case _5555
public static let allFlashPrograms: [ChipsetFlashProgram] = [
._555,
._AAA,
._555_BitSwapped,
._AAA_BitSwapped,
._5555,
]
internal var addressAndBytes: [(address: UInt16, byte: UInt16)] {
switch self {
case ._555 :
return [
(0x555,0xAA),
(0x2AA,0x55),
(0x555,0x90),
]
case ._AAA :
return [
(0xAAA,0xAA),
(0x555,0x55),
(0xAAA,0x90),
]
case ._555_BitSwapped :
return [
(0x555,0xA9),
(0x2AA,0x56),
(0x555,0x90),
]
case ._AAA_BitSwapped :
return [
(0xAAA,0xA9),
(0x555,0x56),
(0xAAA,0x90),
]
case ._5555 :
return [
(0x5555,0xAA),
(0x2AAA,0x55),
(0x5555,0x90),
]
}
}
}
extension Result where Success == SerialDevice<GBxCart>, Failure == Swift.Error {
public func detectFlashID(using flashProgram: ChipsetFlashProgram) -> Result<Int,Failure> {
self.timeout(sending: "0".bytes())
.timeout(sending: "G\0".bytes())
.timeout(sending: "PW\0".bytes())
.flatMap { serialDevice in
Result {
try flashProgram.addressAndBytes.forEach { (address, byte) in
let addressString = String(address, radix: 16, uppercase: true)
let byteString = String(byte, radix: 16, uppercase: true)
let _: Data = try sendAndWait("0F\(addressString)\0\(byteString)\0".bytes()).get()
}
return serialDevice
}
}
.sendAndWait("A0\0R".bytes())
.flatMap { data in
sendAndWait("0F0\0F0\0".bytes()).map { (_: Data) in
Int(data.hexString(separator: ""), radix: 16) ?? NSNotFound
}
}
}
}
public struct FlashCartridge<C: Chipset>: Cartridge {
public typealias Platform = C.Platform
public typealias Index = Platform.Cartridge.Index
public init(bytes: Data) {
self.cartridge = .init(bytes: bytes)
}
private let cartridge: Platform.Cartridge
public subscript(position: Index) -> Data.Element {
return cartridge[Index(position)]
}
public var startIndex: Index {
return Index(cartridge.startIndex)
}
public var endIndex: Index {
return Index(cartridge.endIndex)
}
public func index(after i: Index) -> Index {
return Index(cartridge.index(after: i))
}
public var fileExtension: String {
cartridge.fileExtension
}
}
public struct AM29F016B: Chipset {
public typealias Platform = GameboyClassic
public static func erase<SerialDevice>(_ serialDevice: Result<SerialDevice, Error>) -> Result<SerialDevice, Swift.Error> where SerialDevice: SerialPortController {
serialDevice
.sendAndWait("0F0\0F0\0".bytes())
.timeout(sending:"G".bytes())
.timeout(sending:"PW".bytes())
.sendAndWait("0F555\0AA\0".bytes())
.sendAndWait("0F2AA\055\0".bytes())
.sendAndWait("0F555\080\0".bytes())
.sendAndWait("0F555\0AA\0".bytes())
.sendAndWait("0F2AA\055\0".bytes())
.sendAndWait("0F555\010\0".bytes())
.sendAndWait("0A0\0R".bytes(),
packetByteSize :64,
isValidPacket :{ serialDevice, data in
guard data!.starts(with: [0xFF]) else {
serialDevice.send("1".bytes(), timeout: 250)
return false
}
return true
})
.flatMap { (_: Data) in
serialDevice
}
.sendAndWait("0F0\0F0\0".bytes())
}
public static func flash<SerialDevice>(_ serialDevice: Result<SerialDevice,Error>, cartridge: FlashCartridge<AM29F016B>, progress update: ((Progress) -> ())?) -> Result<SerialDevice,Error> where SerialDevice: SerialPortController {
serialDevice
.timeout(sending:"G".bytes())
.timeout(sending:"PW".bytes())
.timeout(sending:"E".bytes())
.sendAndWait("555\0".bytes())
.sendAndWait("AA\0".bytes())
.sendAndWait("2AA\0".bytes())
.sendAndWait("55\0".bytes())
.sendAndWait("555\0".bytes())
.sendAndWait("A0\0".bytes())
.isTypeOf(CartKit.SerialDevice<GBxCart>.self) /* FIXME */
.flatMap {
flashGBxCart(.success($0), cartridge: cartridge, progress: update)
}
.map { $0 as! SerialDevice }
}
private static func flashGBxCart(_ serialDevice: Result<SerialDevice<GBxCart>,Error>, cartridge: FlashCartridge<AM29F016B>, progress update: ((Progress) -> ())?) -> Result<SerialDevice<GBxCart>,Error> {
serialDevice.flashClassicCartridge(cartridge, progress: update)
}
}
| 35.614458 | 235 | 0.54567 |
7f1d02cd86f10d023692949faf3c68cdffdd8b62 | 7,984 | go | Go | pkg/apis/kuadrant/v1/types.go | Kuadrant/kcp-glbc | 59a41250a6dd7699ba914d496c171dc4a2f77fc4 | [
"Apache-2.0"
] | null | null | null | pkg/apis/kuadrant/v1/types.go | Kuadrant/kcp-glbc | 59a41250a6dd7699ba914d496c171dc4a2f77fc4 | [
"Apache-2.0"
] | 10 | 2022-02-24T16:06:43.000Z | 2022-03-31T12:34:23.000Z | pkg/apis/kuadrant/v1/types.go | Kuadrant/kcp-ingress | 368fc0c4c0fc929dbd2a78fe93cb262317dac0a0 | [
"Apache-2.0"
] | 3 | 2022-02-04T13:57:21.000Z | 2022-02-15T14:46:27.000Z | package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// DNSRecord is a DNS record managed by the HCG.
type DNSRecord struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// spec is the specification of the desired behavior of the dnsRecord.
Spec DNSRecordSpec `json:"spec"`
// status is the most recently observed status of the dnsRecord.
Status DNSRecordStatus `json:"status,omitempty"`
}
// GetProviderSpecificProperty returns a ProviderSpecificProperty if the property exists.
func (e *Endpoint) GetProviderSpecificProperty(key string) (ProviderSpecificProperty, bool) {
for _, providerSpecific := range e.ProviderSpecific {
if providerSpecific.Name == key {
return providerSpecific, true
}
}
return ProviderSpecificProperty{}, false
}
// SetID returns an id that should be unique across a set of endpoints
func (e *Endpoint) SetID() string {
if e.SetIdentifier != "" {
return e.SetIdentifier
}
return e.DNSName
}
// ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers
type ProviderSpecificProperty struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
}
// Targets is a representation of a list of targets for an endpoint.
type Targets []string
// TTL is a structure defining the TTL of a DNS record
type TTL int64
// Labels store metadata related to the endpoint
// it is then stored in a persistent storage via serialization
type Labels map[string]string
// ProviderSpecific holds configuration which is specific to individual DNS providers
type ProviderSpecific []ProviderSpecificProperty
// Endpoint is a high-level way of a connection between a service and an IP
type Endpoint struct {
// The hostname of the DNS record
DNSName string `json:"dnsName,omitempty"`
// The targets the DNS record points to
Targets Targets `json:"targets,omitempty"`
// RecordType type of record, e.g. CNAME, A, SRV, TXT etc
RecordType string `json:"recordType,omitempty"`
// Identifier to distinguish multiple records with the same name and type (e.g. Route53 records with routing policies other than 'simple')
SetIdentifier string `json:"setIdentifier,omitempty"`
// TTL for the record
RecordTTL TTL `json:"recordTTL,omitempty"`
// Labels stores labels defined for the Endpoint
// +optional
Labels Labels `json:"labels,omitempty"`
// ProviderSpecific stores provider specific config
// +optional
ProviderSpecific ProviderSpecific `json:"providerSpecific,omitempty"`
}
// DNSRecordSpec contains the details of a DNS record.
type DNSRecordSpec struct {
Endpoints []*Endpoint `json:"endpoints,omitempty"`
}
// DNSRecordStatus is the most recently observed status of each record.
type DNSRecordStatus struct {
// zones are the status of the record in each zone.
Zones []DNSZoneStatus `json:"zones,omitempty"`
// observedGeneration is the most recently observed generation of the
// DNSRecord. When the DNSRecord is updated, the controller updates the
// corresponding record in each managed zone. If an update for a
// particular zone fails, that failure is recorded in the status
// condition for the zone so that the controller can determine that it
// needs to retry the update for that specific zone.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
// DNSZone is used to define a DNS hosted zone.
// A zone can be identified by an ID or tags.
type DNSZone struct {
// id is the identifier that can be used to find the DNS hosted zone.
//
// on AWS zone can be fetched using `ID` as id in [1]
// on Azure zone can be fetched using `ID` as a pre-determined name in [2],
// on GCP zone can be fetched using `ID` as a pre-determined name in [3].
//
// [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options
// [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show
// [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get
// +optional
ID string `json:"id,omitempty"`
// tags can be used to query the DNS hosted zone.
//
// on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters,
//
// [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options
// +optional
Tags map[string]string `json:"tags,omitempty"`
}
// DNSZoneStatus is the status of a record within a specific zone.
type DNSZoneStatus struct {
// dnsZone is the zone where the record is published.
DNSZone DNSZone `json:"dnsZone"`
// conditions are any conditions associated with the record in the zone.
//
// If publishing the record fails, the "Failed" condition will be set with a
// reason and message describing the cause of the failure.
Conditions []DNSZoneCondition `json:"conditions,omitempty"`
// endpoints are the last endpoints that were successfully published to the provider
//
// Provides a simple mechanism to store the current provider records in order to
// delete any that are no longer present in DNSRecordSpec.Endpoints
//
// Note: This will not be required if/when we switch to using external-dns since when
// running with a "sync" policy it will clean up unused records automatically.
Endpoints []*Endpoint `json:"endpoints,omitempty"`
}
var (
// Failed means the record is not available within a zone.
DNSRecordFailedConditionType = "Failed"
)
// DNSZoneCondition is just the standard condition fields.
type DNSZoneCondition struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +required
Type string `json:"type"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +required
Status string `json:"status"`
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
// DNSRecordType is a DNS resource record type.
// +kubebuilder:validation:Enum=CNAME;A
type DNSRecordType string
const (
// CNAMERecordType is an RFC 1035 CNAME record.
CNAMERecordType DNSRecordType = "CNAME"
// ARecordType is an RFC 1035 A record.
ARecordType DNSRecordType = "A"
)
// +kubebuilder:object:root=true
// DNSRecordList contains a list of dnsrecords.
type DNSRecordList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DNSRecord `json:"items"`
}
func (endpoint *Endpoint) SetProviderSpecific(name, value string) {
var property *ProviderSpecificProperty
if endpoint.ProviderSpecific == nil {
endpoint.ProviderSpecific = ProviderSpecific{}
}
for _, pair := range endpoint.ProviderSpecific {
if pair.Name == name {
property = &pair
}
}
if property != nil {
property.Value = value
return
}
endpoint.ProviderSpecific = append(endpoint.ProviderSpecific, ProviderSpecificProperty{
Name: name,
Value: value,
})
}
func (endpoint *Endpoint) GetProviderSpecific(name string) (string, bool) {
for _, property := range endpoint.ProviderSpecific {
if property.Name == name {
return property.Value, true
}
}
return "", false
}
func (endpoint *Endpoint) DeleteProviderSpecific(name string) bool {
if endpoint.ProviderSpecific == nil {
return false
}
deleted := false
providerSpecific := make(ProviderSpecific, 0, len(endpoint.ProviderSpecific))
for _, pair := range endpoint.ProviderSpecific {
if pair.Name == name {
deleted = true
} else {
providerSpecific = append(providerSpecific, pair)
}
}
endpoint.ProviderSpecific = providerSpecific
return deleted
}
func (endpoint *Endpoint) GetAddress() (string, bool) {
if endpoint.SetIdentifier == "" || len(endpoint.Targets) == 0 {
return "", false
}
return string(endpoint.Targets[0]), true
}
| 32.855967 | 139 | 0.743111 |
5f99050e5b4df31ba54b1f155149bdf4502409fa | 316 | h | C | discordClient/discord/reaction.h | SeungheonOh/DisCpp | fe8c6b614f2ce8ea0c05f32f3bf0211d23a3e4a6 | [
"MIT"
] | 70 | 2019-07-19T21:47:52.000Z | 2021-12-06T15:10:58.000Z | discordClient/discord/reaction.h | SeungheonOh/DisCpp | fe8c6b614f2ce8ea0c05f32f3bf0211d23a3e4a6 | [
"MIT"
] | 5 | 2019-07-20T23:34:44.000Z | 2019-10-15T14:08:31.000Z | discordClient/discord/reaction.h | SeungheonOh/DisCpp | fe8c6b614f2ce8ea0c05f32f3bf0211d23a3e4a6 | [
"MIT"
] | 1 | 2019-07-20T19:03:28.000Z | 2019-07-20T19:03:28.000Z | #pragma once
#ifndef REACTION_H
#define REACTION_H
#include <string>
#include <sstream>
#include <json/json.h>
class Reaction{
public:
unsigned int m_count;
bool m_me;
std::string m_emoji;
Reaction(std::string s);
unsigned int count() const;
bool isMe() const;
std::string emoji() const;
};
#endif
| 14.363636 | 29 | 0.702532 |
f04859b27ee91e595f5a5127a619b6f6d8f15b47 | 5,391 | py | Python | extract_embeddings.py | Artem531/opencv-face-recognition-with-YOLOv3 | 53a93711a079ea3739cab068aeaf5c684f6e53c4 | [
"MIT"
] | null | null | null | extract_embeddings.py | Artem531/opencv-face-recognition-with-YOLOv3 | 53a93711a079ea3739cab068aeaf5c684f6e53c4 | [
"MIT"
] | null | null | null | extract_embeddings.py | Artem531/opencv-face-recognition-with-YOLOv3 | 53a93711a079ea3739cab068aeaf5c684f6e53c4 | [
"MIT"
] | null | null | null | # USAGE
# python extract_embeddings.py --dataset dataset --embeddings output/embeddings.pickle \
# --detector face_detection_model --embedding-model openface_nn4.small2.v1.t7
# import the necessary packages
from imutils.face_utils import FaceAligner
from imutils import paths
import numpy as np
import argparse
import imutils
import pickle
import cv2
import os
import dlib
from PIL import Image
from yolo import YOLO, detect_video
from yolo3.utils import letterbox_image
from keras import backend as K
def detect_image(self, image):
if self.model_image_size != (None, None):
assert self.model_image_size[0]%32 == 0, 'Multiples of 32 required'
assert self.model_image_size[1]%32 == 0, 'Multiples of 32 required'
boxed_image = letterbox_image(image, tuple(reversed(self.model_image_size)))
else:
new_image_size = (image.width - (image.width % 32),
image.height - (image.height % 32))
boxed_image = letterbox_image(image, new_image_size)
image_data = np.array(boxed_image, dtype='float32')
#print(image_data.shape)
image_data /= 255.
image_data = np.expand_dims(image_data, 0) # Add batch dimension.
out_boxes, out_scores, out_classes = self.sess.run(
[self.boxes, self.scores, self.classes],
feed_dict={
self.yolo_model.input: image_data,
self.input_image_shape: [image.size[1], image.size[0]],
K.learning_phase(): 0
})
print('Found {} boxes for {}'.format(len(out_boxes), 'img'))
return out_boxes, out_scores, out_classes
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--dataset", required=True,
help="path to input directory of faces + images")
ap.add_argument("-e", "--embeddings", required=True,
help="path to output serialized db of facial embeddings")
ap.add_argument("-m", "--embedding-model", required=True,
help="path to OpenCV's deep learning face embedding model")
ap.add_argument("-p", "--shape-predictor", required=True,
help="path to facial landmark predictor")
args = vars(ap.parse_args())
# load our serialized face detector from disk
print("[INFO] loading face detector...")
predictor = dlib.shape_predictor(args["shape_predictor"])
#detector = dlib.get_frontal_face_detector()
detector = YOLO()
# load our serialized face embedding model from disk
print("[INFO] loading face recognizer...")
embedder = cv2.dnn.readNetFromTorch(args["embedding_model"])
# grab the paths to the input images in our dataset
print("[INFO] quantifying faces...")
imagePaths = list(paths.list_images(args["dataset"]))
# initialize our lists of extracted facial embeddings and
# corresponding people names
knownEmbeddings = []
knownNames = []
# initialize the total number of faces processed
total = 0
# loop over the image paths
for (i, imagePath) in enumerate(imagePaths):
# extract the person name from the image path
print("[INFO] processing image {}/{}".format(i + 1,
len(imagePaths)))
name = imagePath.split(os.path.sep)[-2]
# load the image, resize it to have a width of 800 pixels (while
# maintaining the aspect ratio), and then grab the image
# dimensions
image = cv2.imread(imagePath)
image = imutils.resize(image, width=800)
#try to rise resolution
#gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#blurred = cv2.GaussianBlur(gray, (5, 5), 0)
#image = blurred
#clahe = cv2.createCLAHE(clipLimit=4.0, tileGridSize=(8,8))
#image = clahe.apply(image)
#image = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
(h, w) = image.shape[:2]
# we're making the assumption that each image has only ONE
# face, so find the bounding box with the largest probability
#align_faces
fa = FaceAligner(predictor, desiredFaceWidth=256)
#gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#rects = detector(gray, 2)
rects = []
out_boxes, out_scores, out_classes = detect_image(detector, Image.fromarray(image))
for i, c in reversed(list(enumerate(out_classes))):
(x, y, x1, y1) = out_boxes[i]
w = abs(x - x1)
h = abs(y - y1)
startX = int(min(x1, x))
endX = startX + w
startY = int(min(y1, y))
endY = startY + h
left, right, bottom, top = startX, endX, endY, startY
rect = dlib.rectangle(int(top), int(left), int(bottom) , int(right))
rects.append(rect)
for rect in rects:
faceAligned = fa.align(image, gray, rect)
print(faceAligned)
cv2.imshow("Aligned", np.asarray(faceAligned))
cv2.waitKey(0)
face = faceAligned
(fH, fW) = face.shape[:2]
# ensure the face width and height are sufficiently large
if fW < 20 or fH < 20:
continue
# construct a blob for the face ROI, then pass the blob
# through our face embedding model to obtain the 128-d
# quantification of the face
faceBlob = cv2.dnn.blobFromImage(face, 1.0 / 255,
(96, 96), (0, 0, 0), swapRB=True, crop=False)
embedder.setInput(faceBlob)
vec = embedder.forward()
# add the name of the person + corresponding face
# embedding to their respective lists
knownNames.append(name)
knownEmbeddings.append(vec.flatten())
total += 1
# dump the facial embeddings + names to disk
print("[INFO] serializing {} encodings...".format(total))
data = {"embeddings": knownEmbeddings, "names": knownNames}
f = open(args["embeddings"], "wb")
f.write(pickle.dumps(data))
f.close() | 32.475904 | 88 | 0.708959 |
05dd7ca1a3056a388029b682de03cb04b8dfd710 | 979 | rb | Ruby | lib/slack_notifier.rb | bbhunter/vinifera | 2cad4a821b957c600db8098ffc523ad72e53882a | [
"Apache-2.0"
] | 66 | 2021-02-23T04:32:01.000Z | 2022-03-30T06:44:01.000Z | lib/slack_notifier.rb | bbhunter/vinifera | 2cad4a821b957c600db8098ffc523ad72e53882a | [
"Apache-2.0"
] | 3 | 2022-01-27T15:16:48.000Z | 2022-03-31T01:50:39.000Z | lib/slack_notifier.rb | bbhunter/vinifera | 2cad4a821b957c600db8098ffc523ad72e53882a | [
"Apache-2.0"
] | 6 | 2021-02-23T04:46:20.000Z | 2021-06-18T11:49:22.000Z | class SlackNotifier
CHANNELS = {UPDATES: 'vinifera-updates',
TARGET: 'vinifera-targets',
USER_TRACKING: 'vinifera-user-tracking',
VIOLATIONS: 'vinifera-violations',
ERROR: 'vinifera-error'
}.freeze
def notify(message, channel = CHANNELS[:UPDATES])
channel_webhook = channel_resolver(channel)
SlackWebhookApi.new(channel_webhook).notify(message)
end
def self.async_notify(message,channel = CHANNELS[:UPDATES])
NotificationWorker.perform_async(message, channel)
end
private
def channel_resolver(channel)
if channel == CHANNELS[:TARGET]
ENV['SLACK_TARGETS_GROUP_URL']
elsif channel == CHANNELS[:USER_TRACKING]
ENV['SLACK_USER_TRACKING_GROUP_URL']
elsif channel == CHANNELS[:VIOLATIONS]
ENV['SLACK_VINIFERA_VIOLATION_GROUP_URL']
elsif channel == CHANNELS[:ERROR]
ENV['SLACK_ERROR_GROUP_URL']
else
ENV['SLACK_UPDATES_GROUP_URL']
end
end
end | 29.666667 | 61 | 0.691522 |
eca975a8278bc9e55f2122ba4541264e97365c7c | 2,707 | kt | Kotlin | app/src/main/java/com/barackbao/eyeread/mvp/presenter/VideoContentPersenter.kt | shentibeitaokongle/EyeRead | aae9a636135e377587e0ecb818a1f6876e98b2b5 | [
"Apache-2.0"
] | 1 | 2018-03-23T14:25:25.000Z | 2018-03-23T14:25:25.000Z | app/src/main/java/com/barackbao/eyeread/mvp/presenter/VideoContentPersenter.kt | shentibeitaokongle/EyeRead | aae9a636135e377587e0ecb818a1f6876e98b2b5 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/barackbao/eyeread/mvp/presenter/VideoContentPersenter.kt | shentibeitaokongle/EyeRead | aae9a636135e377587e0ecb818a1f6876e98b2b5 | [
"Apache-2.0"
] | null | null | null | package com.barackbao.eyeread.mvp.presenter
import android.app.Activity
import android.util.Log
import com.barackbao.eyeread.mvp.contract.VideoContentContract
import com.barackbao.eyeread.mvp.model.DetailModel
import com.barackbao.eyeread.mvp.model.bean.Issue
import com.barackbao.eyeread.mvp.model.bean.Item
import com.barackbao.eyeread.utils.getNetworkType
import io.reactivex.disposables.Disposable
/**
* Created by BarackBao on 2018/3/15.
*/
class VideoContentPersenter(view: VideoContentContract.VView) : VideoContentContract.VPersenter {
//持有model
val videoContentModel: DetailModel by lazy { DetailModel() }
//持有view
val videoContentView: VideoContentContract.VView
//更多视频评论
var moreCommentUrl: String? = null
init {
videoContentView = view
}
override fun initPlayer(itemData: Item): Disposable? {
val netWorkType = (videoContentView as Activity).getNetworkType()
val playerInfo = itemData.data?.playInfo
playerInfo?.let {
//如果是wifi,直接播放
if (netWorkType == 1) {
for (playinfo in playerInfo) {
if (playinfo.type == "high") {
val videoUrl = playinfo.url
videoContentView.setVideo(videoUrl)
break
}
}
} else {
//提示流量消耗
for (playinfo in playerInfo) {
if (playinfo.type == "normal") {
val videoUrl = playinfo.url
videoContentView.setVideo(videoUrl)
break
}
}
}
}
videoContentView.setVideoInfo(itemData)
Log.i("VideoInfo", itemData.data?.title)
return getVideoComment(itemData?.data?.id!!)
}
override fun getVideoComment(videoId: Long): Disposable? {
return videoContentModel.loadCommenList(videoId)
.subscribe({ t: Issue ->
moreCommentUrl = t.nextPageUrl
videoContentView.setVideoComment(t)
})
}
override fun getMoreVideoComment(): Disposable? {
moreCommentUrl?.let {
if (it !== "") {
return videoContentModel.loadMoreCommentList(it)
.subscribe({ t: Issue ->
moreCommentUrl = t.nextPageUrl
videoContentView.setMoreComment(t)
})
}
}
videoContentView.setMoreComment(null)
return null
}
} | 33.419753 | 98 | 0.549317 |
38a4d66c6f27f15981aae624b2c8159ca2a2c38b | 314 | h | C | Source/distortion.h | leocarrr/dig4150_2022 | 79a199b577ad4578ac2482bcfef97a35ecba1953 | [
"MIT"
] | null | null | null | Source/distortion.h | leocarrr/dig4150_2022 | 79a199b577ad4578ac2482bcfef97a35ecba1953 | [
"MIT"
] | null | null | null | Source/distortion.h | leocarrr/dig4150_2022 | 79a199b577ad4578ac2482bcfef97a35ecba1953 | [
"MIT"
] | null | null | null | /*
==============================================================================
distortion.h
Created: 30 Mar 2022 10:32:29am
Author: Leo Carr
==============================================================================
*/
#pragma once
#include "../JuceLibraryCode/JuceHeader.h"
| 24.153846 | 81 | 0.289809 |
c469a755f750b6fd3da0310840e25015230d08b9 | 2,463 | h | C | Fireworks/Geometry/interface/FWRecoGeometryESProducer.h | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | Fireworks/Geometry/interface/FWRecoGeometryESProducer.h | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 3 | 2018-08-23T13:40:24.000Z | 2019-12-05T21:16:03.000Z | Fireworks/Geometry/interface/FWRecoGeometryESProducer.h | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | #ifndef GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H
# define GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H
# include <memory>
# include "FWCore/Framework/interface/ESProducer.h"
# include "FWCore/Framework/interface/ESHandle.h"
# include "DataFormats/GeometryVector/interface/GlobalPoint.h"
namespace edm
{
class ParameterSet;
}
class CaloGeometry;
class HGCalGeometry;
class GlobalTrackingGeometry;
class TrackerGeometry;
class FastTimeGeometry;
class FWRecoGeometry;
class FWRecoGeometryRecord;
class GeomDet;
class FWRecoGeometryESProducer : public edm::ESProducer
{
public:
FWRecoGeometryESProducer( const edm::ParameterSet& );
~FWRecoGeometryESProducer( void ) override;
std::unique_ptr<FWRecoGeometry> produce( const FWRecoGeometryRecord& );
private:
FWRecoGeometryESProducer( const FWRecoGeometryESProducer& ) = delete;
const FWRecoGeometryESProducer& operator=( const FWRecoGeometryESProducer& ) = delete;
void addCSCGeometry( FWRecoGeometry& );
void addDTGeometry( FWRecoGeometry& );
void addRPCGeometry( FWRecoGeometry& );
void addGEMGeometry( FWRecoGeometry& );
void addME0Geometry( FWRecoGeometry& );
void addPixelBarrelGeometry( FWRecoGeometry& );
void addPixelForwardGeometry( FWRecoGeometry& );
void addTIBGeometry( FWRecoGeometry& );
void addTOBGeometry( FWRecoGeometry& );
void addTIDGeometry( FWRecoGeometry& );
void addTECGeometry( FWRecoGeometry& );
void addCaloGeometry( FWRecoGeometry& );
void addFTLGeometry( FWRecoGeometry& );
void ADD_PIXEL_TOPOLOGY( unsigned int rawid, const GeomDet* detUnit, FWRecoGeometry& );
unsigned int insert_id( unsigned int id, FWRecoGeometry& );
void fillPoints( unsigned int id,
std::vector<GlobalPoint>::const_iterator begin,
std::vector<GlobalPoint>::const_iterator end,
FWRecoGeometry& );
void fillShapeAndPlacement( unsigned int id, const GeomDet *det, FWRecoGeometry& );
void writeTrackerParametersXML(FWRecoGeometry&);
edm::ESHandle<GlobalTrackingGeometry> m_geomRecord;
const CaloGeometry* m_caloGeom;
edm::ESHandle<FastTimeGeometry> m_ftlBarrelGeom,m_ftlEndcapGeom;
std::vector<edm::ESHandle<HGCalGeometry> > m_hgcalGeoms;
const TrackerGeometry* m_trackerGeom;
unsigned int m_current;
bool m_tracker;
bool m_muon;
bool m_calo;
bool m_timing;
};
#endif // GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H
| 31.576923 | 89 | 0.750305 |
277c7ed9efe481fc8e6adc8e435cdf48d1ec7671 | 14,417 | css | CSS | css/style.css | tassiLuca/silmarillion | 3db7cc41354049d5826d723d22144403d4be079f | [
"MIT",
"OLDAP-2.2.1",
"Unlicense"
] | null | null | null | css/style.css | tassiLuca/silmarillion | 3db7cc41354049d5826d723d22144403d4be079f | [
"MIT",
"OLDAP-2.2.1",
"Unlicense"
] | null | null | null | css/style.css | tassiLuca/silmarillion | 3db7cc41354049d5826d723d22144403d4be079f | [
"MIT",
"OLDAP-2.2.1",
"Unlicense"
] | null | null | null | /****************************************************************************
* Common rules for all website.
****************************************************************************/
.hidden{ display: none; }
body, h1, h2, h3, ul, button {
margin: 0;
padding: 0;
}
body {
background-color: rgba(202, 240, 248, 0.25);
}
html {
font-family: "Futura-pt", Arial, Helvetica, sans-serif;
}
body > header {
background: linear-gradient(to bottom, #00D5FF, #CAF6FF);
border-radius: 0 0 20px 20px;
height: 150px;
box-shadow: 1px 1px 5px rgba(196, 196, 196, 0.82);
}
body > header > a > h1.hide {
text-align: center;
height: 88px;
background-image: url(../img/commons/mini-logo.svg);
background-position: center;
background-repeat: no-repeat;
}
/*header > .hide per gli screen reader*/
.hide {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
/*********************** Navbar buttons ***********************/
body > header > nav > ul {
height: 55px;
}
body > header > nav > ul > li {
list-style: none;
display: inline-block;
width: 17%;
text-align: center;
margin: 0 4% 0 4%;
vertical-align: top;
}
body > header > nav > ul > li > button {
background-color: transparent;
border: none;
height: 55px;
max-width: 75px;
padding: 10px 10% 0 10%;
}
body > header > nav > ul > li > a {
display: inline-block;
padding: 10px 10% 0 10%;
}
body > header > nav > ul > li > button.navActive {
background-color: #0047A0;
border-radius: 10px 10px 0 0;
}
/********************** Cart counter **************************/
#cart_badge {
border-radius: 100%;
background-color: #f60000;
text-align: center;
z-index: 0;
height: 18px;
width: 18px;
color: white;
font-weight: bold;
font-size: 11pt;
display: inline-block;
position: relative;
bottom: 43px;
right: -15px;
}
/*********************** Dropdown links ***********************/
body > header > nav > div {
background-color: #CAF0F8;
border-radius: 10px;
display: none;
position: relative;
/* Remove space between menu button and pop-up menu */
/* bottom: 4px; */
z-index: 1;
}
body > header > nav > div > ul {
list-style: none;
display: inline-block;
width: 100%;
border-radius: 10px;
}
body > header > nav > div > ul > li {
background-color: #0047A0;
margin: 2px 0 2px 0;
text-align: center;
font-size: 1.2em;
}
body > header > nav > div > ul > li:last-child {
border-radius: 0 0 10px 10px;
/* see bottom of body > header > nav > div rule */
/* margin-bottom: -4px; */
}
body > header > nav > div > ul > li:first-child {
border-radius: 10px 10px 0 0;
margin-top: 0;
}
body > header > nav > div > ul > li > a {
color: #CAF0F8;
text-decoration: none;
text-align: center;
width: 100%;
padding: 15px 0 15px 0;
display: inline-block;
}
body > header > nav > div > ul > li > a:hover {
font-weight: 900;
text-transform: uppercase;
}
body > header > nav > div > ul > li#login {
margin: 7px 0 7px 0;
}
/************************** Footer **************************/
body > footer > h4.hide {
background-image: url(../img/commons/footer-logo.svg);
background-position: center;
background-repeat: no-repeat;
padding-top: 15px;
margin: 0;
}
body > footer {
background: linear-gradient(to top, #00D5FF, #CAF6FF);
border-radius: 20px 20px 0 0;
box-shadow: 1px 1px 5px rgba(196, 196, 196, 0.82);
}
body > footer > div > h4 {
margin-bottom: 5px;
}
body > footer > div {
font-size: 11px;
display: inline-block;
vertical-align: top;
text-align: center;
margin-bottom: 20px;
}
body > footer > div:nth-of-type(2) {
width: 30%;
}
body > footer > div:first-of-type,
body > footer > div:last-of-type {
width: 35%;
}
body > footer > div > ul > li {
display: block;
}
/************************* Breadcrumb **************************/
main > div > ul {
padding: 15px 5%;
}
main > div > ul li + li::before {
content: "\003E";
padding: 0 10px;
color: #0047A0;
font-weight: bold;
}
main > div > ul > li {
display: inline-block;
color:#0047A0;
vertical-align: middle;
}
main > div > ul > li > a:hover {
font-weight: bold;
}
/********************** Navigation bar cart ***********************/
body > header > nav > div#navCart {
background-color: #0047A0;
text-align: center;
padding: 5px 5%;
}
body > header > nav > div#navCart > a {
color: #CBF6FF;
font-weight: bold;
}
body > header > nav > div#navCart > ul {
padding: 10px 0 5px 0;
}
body > header > nav > div#navCart > ul > li {
background-color: #CBF6FF;
height: 80px;
border-radius: 20px;
margin: 8px 0;
display: flex;
align-items: center;
justify-content: center;
}
body > header > nav > div#navCart > ul > li > img {
display: inline-block;
height: 60px;
}
body > header > nav > div#navCart > ul > li > div {
display: inline-block;
margin: 0 0 0 5%;
}
body > header > nav > div#navCart > ul > li > div > div {
padding: 10px 0 0 0;
}
body > header > nav > div#navCart > ul > li > div > p,
body > header > nav > div#navCart > ul > li > div > div > p:last-of-type {
margin: 0;
font-size: 12pt;
color: #0047A0;
}
body > header > nav > div#navCart > ul > li > div > div > p{
display: inline-block;
color: #0047A0;
font-weight: bold;
margin: 0 10px 0;
}
/**************** commons for login and search navbar **************/
body > header > nav > div > form > ul > li > label {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
body > header > nav > div > form > ul {
padding: 5% 10%;
box-shadow: 10px 10px 5px rgba(196, 196, 196, 0.82);
border-radius: 0 0 10px 10px;
text-align: center;
}
body > header > nav > div > form > ul > li {
display: block;
}
body > header > nav > div > form > ul > li > input {
border-radius: 10px;
margin: auto;
display: block;
}
body > header > nav > div > form > ul > li > input:not([type=submit]) {
border: none;
width: 100%;
font-size: 15px;
padding: 10px 0;
margin: 10px 0 15px 0;
text-indent: 15px;
font-weight: bold;
}
body > header > nav > div > form > ul > li > input::placeholder {
font-weight: normal;
font-style: italic;
}
body > header > nav > div > form > ul > li > input[type="submit"],
body > header > nav > div > form > ul > li > a:last-child {
-webkit-appearance: none; /* for Safari */
font-weight: bold;
font-size: 17px;
margin-top: 15px;
padding: 12px;
color: #0047A0;
background-color: white;
border: 1px solid #0047A0;
box-shadow: 1px 1px 5px rgba(196, 196, 196, 0.82);
}
body > header > nav > div > form > ul > li > a:last-child {
border-radius: 10px;
text-decoration: none;
margin: auto;
display: inline-block;
}
body > header > nav > div > form > ul > li > input[type="submit"]:hover,
body > header > nav > div > form > ul > li > a:last-child:hover {
box-shadow: 4px 4px 5px rgba(196, 196, 196, 0.82);
}
body > header > nav > div > form > ul > li > a:hover {
font-weight: bold;
}
body > header > nav > div > form > ul > li > p {
color: #0047A0;
font-weight: bold;
}
body > header > nav > div > form > header > ul > li {
background-color: #c4c4c450;
}
/********************** Navigation bar login ***********************/
body > header > nav > div#navLogin {
background-color: #0047A0;
}
body > header > nav > div#navLogin > form > h2 {
color: white;
text-align: center;
padding-top: 5%;
}
body > header > nav > div#navLogin > form > ul {
box-shadow: none;
padding-top: 0;
}
body > header > nav > div#navLogin > form > ul > li:nth-of-type(3) {
display: flex;
justify-content: center;
}
body > header > nav > div#navLogin > form > ul > li:nth-of-type(3) > div {
display: flex;
flex-direction: column;
align-self: center;
margin-right: 3%;
}
body > header > nav > div#navLogin > form > ul > li:nth-of-type(3) > div > a {
color: white;
padding-bottom: 5px;
}
body > header > nav > div#navLogin > form > ul > li:nth-of-type(3) > input {
margin: 0;
}
body > header > nav > div#navLogin > form > ul > li:last-of-type > p {
color: white;
}
/******************************** Messages *******************************/
body > header > nav > div#navLogin > form > ul > li.hasError > input {
border: 2px solid red !important;
}
body > header > nav > div#navLogin > form > ul > li > div.error {
padding: 5px 15px;
margin-bottom: 10px;
background-color: #F8D7DA;
color: #721C24;
text-align: left;
border: 1px solid red;
border-radius: 5px;
}
body > header > nav > div#navLogin > form > ul > li > div.error::before {
content: "\f00d";
padding-right: 5px;
font-family: FontAwesome;
}
/********************** Navigation bar search **********************/
body > header > nav > div#navSearch {
background-color: #0047A0;
}
body > header > nav > div#navSearch > form > h2 {
color: white;
text-align: center;
padding-top: 5%;
}
body > header > nav > div#navSearch > form > ul > li > input#search {
display: inline-block;
width: 80%;
vertical-align: top;
}
body > header > nav > div#navSearch > form > ul > li > input#search + button {
display: inline-block;
width: 15%;
margin: 10px 0 15px 0;
background: none;
border: none;
}
body > header > nav > div#navSearch > form > ul > li > input#search + button > img {
max-width: 100%;
max-height: 100%;
}
body > header > nav > div#navSearch > form > ul {
box-shadow: none;
padding-top: 0;
}
/************************ Desktop devices **************************/
@media screen and (min-width: 992px) and (max-width:1200px) {
body > header {
background: linear-gradient(to bottom, #00D5FF, #CAF6FF );
border-radius: 0 0 20px 20px;
height: 250px;
box-shadow: 1px 1px 5px rgba(196, 196, 196, 0.82);
}
body > header > a > h1.hide {
text-align: center;
height: 180px;
background-image: url(../img/commons/big-logo.svg);
background-position: center;
background-repeat: no-repeat;
}
/* menu icon */
body > header > nav > ul > li:first-child {
display: none;
}
body > header > nav > div#navMenu > ul > li,
body > header > nav > div#navMenu ,
body > header > nav > ul {
display: inline-block !important;
}
/* navbar */
body > header > nav {
border-radius: 20px;
margin-top: 15px;
}
/* text links */
body > header > nav > div#navMenu {
float: left;
background: none;
width: 76%;
height: 55px;
margin-left: 4%;
}
body > header > nav > div#navMenu > ul {
display: flex;
justify-content: space-between;
}
body > header > nav > div#navMenu > ul > li {
background: none;
margin: 2px 0 !important;
}
body > header > nav > div#navMenu > ul > li > a {
color: #0047A0;
}
/* buttons links */
body > header > nav > ul {
margin-right: 0%;
width: 19%;
padding-left: 1%;
vertical-align: middle;
}
body > header > nav > ul > li {
list-style: none;
display: inline-block;
width: 22%;
}
body > header > nav > ul > li > button,
body > header > nav > ul > li > a {
padding-top: 5px;
padding-bottom: 5px;
}
/* login link */
body > header > nav > div > ul > li#login {
display: none !important;
}
/* cart and login popup*/
body > header > nav > div#navCart,
body > header > nav > div#navLogin,
body > header > nav > div#navSearch {
width: 30%;
margin: 0 0 0 65%;
padding: 25px;
}
}
@media screen and (min-width: 1200px) {
body > header {
background: linear-gradient(to bottom, #00D5FF, #CAF6FF );
border-radius: 0 0 20px 20px;
height: 250px;
box-shadow: 1px 1px 5px rgba(196, 196, 196, 0.82);
}
body > header > a > h1.hide {
text-align: center;
height: 180px;
background-image: url(../img/commons/big-logo.svg);
background-position: center;
background-repeat: no-repeat;
}
/* menu icon */
body > header > nav > ul > li:first-child {
display: none;
}
body > header > nav > div#navMenu > ul > li,
body > header > nav > div#navMenu ,
body > header > nav > ul {
display: inline-block !important;
}
/* navbar */
body > header > nav {
border-radius: 20px;
margin-top: 15px;
}
/* text links */
body > header > nav > div#navMenu {
float: left;
background: none;
width: 75%;
height: 55px;
margin-left: 5%;
}
body > header > nav > div#navMenu > ul {
display: flex;
justify-content: space-between;
}
body > header > nav > div#navMenu > ul > li {
background: none;
margin: 2px 0 !important;
}
body > header > nav > div#navMenu > ul > li > a {
color: #0047A0;
}
/* buttons links */
body > header > nav > ul {
margin-right: 0;
width: 19%;
padding-left: 1%;
vertical-align: middle;
}
body > header > nav > ul > li {
list-style: none;
display: inline-block;
width: 22%;
height: 100%;
}
body > header > nav > ul > li > button,
body > header > nav > ul > li > a {
height: 100%;
padding-top: 5px;
padding-bottom: 5px;
}
/* login link */
body > header > nav > div > ul > li#login {
display: none !important;
}
/* cart and login popup*/
body > header > nav > div#navCart,
body > header > nav > div#navLogin,
body > header > nav > div#navSearch {
width: 30%;
margin: 0 0 0 65%;
padding: 25px;
}
}
/*disabled Link button*/
.disabled {
pointer-events: none;
filter: grayscale(1);
}
| 22.884127 | 84 | 0.537976 |
7b008f90c4d9d641f9ba3bbffc14e53f822a54e9 | 144 | rb | Ruby | db/migrate/20210126001307_add_featured_photo_to_restaurants.rb | mjones1818/neighborhood_food_backend | 4655e2c8489cf0bcad7c09e0b4908575c28ba084 | [
"MIT"
] | null | null | null | db/migrate/20210126001307_add_featured_photo_to_restaurants.rb | mjones1818/neighborhood_food_backend | 4655e2c8489cf0bcad7c09e0b4908575c28ba084 | [
"MIT"
] | null | null | null | db/migrate/20210126001307_add_featured_photo_to_restaurants.rb | mjones1818/neighborhood_food_backend | 4655e2c8489cf0bcad7c09e0b4908575c28ba084 | [
"MIT"
] | null | null | null | class AddFeaturedPhotoToRestaurants < ActiveRecord::Migration[6.0]
def change
add_column :restaurants, :featured_image, :string
end
end
| 24 | 66 | 0.784722 |
5c4302a27e6289031b2239bbf8b0449f6782f062 | 11,732 | css | CSS | public/css/monthly.css | sophanna999/smartcode_mef | bb4259294a105570ea138640ceb5861f939a5eee | [
"MIT"
] | null | null | null | public/css/monthly.css | sophanna999/smartcode_mef | bb4259294a105570ea138640ceb5861f939a5eee | [
"MIT"
] | null | null | null | public/css/monthly.css | sophanna999/smartcode_mef | bb4259294a105570ea138640ceb5861f939a5eee | [
"MIT"
] | null | null | null | @font-face {
font-family: 'KhmerOS_muolpali';
src: url('fonts/KhmerOS_muolpali.ttf') format('truetype');
}
.wrap-calendar{
background:#fff;
width:100%;
margin:0 auto 0;
/*padding:20px 20px 0;
box-shadow: 0 0 3px 1px rgba(0,0,0,0.07);
-webkit-box-shadow: 0 0 3px 1px rgba(0,0,0,0.07); */
}
.page{
/*padding:20px 20px;
background-image:url(../images/bg-kbach-left.png) , url(../images/bg-kbach-right.png) ;*/
background-position: left top, right top;
background-repeat: no-repeat, no-repeat;
background-size:100px;
}
.dotted_cal{
color : red;
position : absolute;
font-size : 0.6em;
top:-4px;
margin-left : 3px;
background:red;
color : #FFF;
padding : 0px 5px;
line-height:1.5;
border-radius : 7px;
}
.joined{
background:#000;
width:31px;
height:20px;
right:5px;
position:absolute;
background:url(../images/icn-ppl.png) no-repeat center center;
background-size:20px;
cursor:pointer;
}
.leader{
background:red;
width:15px;
height:18px;
right:36px;
/*bottom:17px;*/
position:absolute;
background:url(../images/icn-ppl1.png) no-repeat center center;
background-size:15px;
cursor:pointer;
}
/* Overall wrapper */
.monthly {
background: #F3F3F5;
color: #545454;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: relative;
}
/* Top bar containing title, navigation, and buttons */
.monthly-header {
position: relative;
text-align: center;
padding: 0.5em 0.5em 4em 0.5em;
background: #fff;
height: 3em;
box-sizing: border-box;
}
/* Center area of top bar containing title and buttons */
.monthly-header-title {
text-transform: uppercase;
margin-top:15px;
}
/* Buttons for reverting to "today", and closing event list */
.monthly-header-title a:link,
.monthly-header-title a:visited {
display: inline-block;
border: 1px solid #ccc;
color: #545454;
text-decoration: none;
height: 2.5em;
width: 10em;
line-height: 2.5em;
padding: 0 0.65em 0 0.65em;
box-sizing: border-box;
transition: background .1s;
font-family: 'KHMERMEF2';
font-size: 1.1em;
margin-top: -30px;
}
/* Add some roundy-ness */
.monthly-header-title a:first-of-type {
border-top-left-radius: 1em;
border-bottom-left-radius: 1em;
}
.monthly-header-title a:last-of-type {
border-top-right-radius: 1em;
border-bottom-right-radius: 1em;
}
.monthly-header-title a:hover {
background: #8b8b8b;
border: 1px solid #8b8b8b;
color: #fff;
}
.monthly-header-title a:active {
background: #222;
border: 1px solid #222;
transition: none;
}
/* current month/yr block */
.monthly-header-title-date,
.monthly-header-title-date:hover {
background: #32a68f !important;
border: 1px solid #ccc!important;
color: #fff !important;
cursor: default;
}
/* Button to reset to current month */
.monthly-reset {
border-left: 0!important;
}
.monthly-reset::before {
content: '\21BB';
margin-right: 0.25em;
}
/* Button to return to month view */
.monthly-cal {
border-right: 0!important;
}
.monthly-cal::before {
content: '\2637';
margin-right: 0.25em;
}
/* wrapper for left/right buttons to make the clickable area bigger */
.monthly-prev,
.monthly-next {
position: absolute;
top: 0;
width: 3em;
height: 100%;
opacity: .5;
}
.monthly-prev {
left: 0;
}
.monthly-next {
right: 0;
}
.monthly-prev:hover,
.monthly-next:hover {
opacity: 1;
}
/* Arrows */
.monthly-prev:after,
.monthly-next:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
border-style: solid;
color:#dea563;
width: 0.6em;
font-size:20px;
height: 0.6em;
margin: -0.4em 0 0 -0.4em;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
/* Left Arrow */
.monthly-prev:after{
border-width: 0 0 0.2em 0.2em;
}
/* Right Arrow */
.monthly-next:after {
border-width: 0.2em 0.2em 0 0;
}
/* Day of the week headings */
.monthly-day-title-wrap {
display: table;
table-layout: fixed;
width: 100%;
background: #fff;
padding-bottom:5px;
border-bottom: 1px solid #EBEBEB;
}
.monthly-day-title-wrap div {
width: 14.28%!important;
font-family: 'KhmerOS_muolpali';
color:#32a68f;
font-size:14px;
display: table-cell;
box-sizing: border-box;
position: relative;
text-align: center;
text-transform: uppercase;
}
/* Calendar days wrapper */
.monthly-day-wrap {
display: table;
table-layout: fixed;
width: 100%;
overflow: hidden;
}
.monthly-week {
display: table-row;
width: 100%;
}
/* Calendar Days */
.monthly-day, .monthly-day-blank {
width: 14.28%!important;
display: table-cell;
vertical-align: top;
box-sizing: border-box;
position: relative;
color: inherit;
background: #fff;
box-shadow: 0 0 0 1px #EBEBEB;
-webkit-transition: .25s;
transition: .25s;
padding: 0;
text-decoration: none;
}
/* Trick to make the days' width equal their height */
.monthly-day:before {
content: '';
display: block;
padding-top: 100%;
float: left;
}
/* Hover effect for non event calendar days */
.monthly-day-wrap > a:hover {
background: #A1C2E3;
}
/* Days that are part of previous or next month */
.monthly-day-blank {
background: #F3F3F5;
}
/* Event calendar day number styles */
.monthly-day-event > .monthly-day-number {
position: absolute;
line-height: 1em;
top: 0.2em;
left: 0.25em;
font-family: 'KhmerOS_muolpali';
font-size:1em;
}
/* Non-Event calendar day number styles */
.monthly-day-pick > .monthly-indicator-wrap {
margin: 0;
}
.monthly-day-pick > .monthly-day-number:before,
.monthly-day-pick > .monthly-day-number:after {
content: '';
display: block;
padding-top: calc(50% - 0.8em);
width: 0;
height: 0;
}
/* Days in the past in "picker" mode */
.monthly-week .m-d:nth-child(7n+1),
.monthly-day-title-wrap div:first-child{
color:red;
}
.monthly-past-day:after{
content: '';
width: 150%;
height: 2px;
-webkit-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
background: rgba(0, 0, 0, 0.1);
position: absolute;
left: 0;
top: 0;
}
.monthly-past-day:hover {
background: #fff!important;
}
/* Current day style */
.monthly-today .monthly-day-number {
/*color: #FFF;
background: #EA6565;*/
border:2px solid #32a68f;
border-radius: 0.75em;
top: 0.08em;
left: 0.05em;
font-size: 1.7em;
padding: 0;
width: 1.7em;
height: 1.7em;
line-height: 1.7em;
text-align: center;
}
.monthly-day-pick.monthly-today .monthly-day-number {
padding: 0.15em;
margin: calc(50% - 0.7em) auto auto auto;
font-size: 1em;
}
/* Wrapper around events */
.monthly-indicator-wrap {
position: relative;
text-align: center;
line-height: 0;
max-width: 1.5em;
margin: 30px auto 0;
padding-top: 1.2em;
}
/* Event indicator dots */
.monthly-day .monthly-event-indicator {
display: inline-block;
margin: 0.05em;
width: 0.5em;
height: 0.5em;
border-radius: 0.25em;
vertical-align: middle;
background: #7BA7CE;
}
.monthly-day .monthly-event-indicator span {
color: transparent;
}
.monthly-day .monthly-event-indicator:hover {
cursor: pointer;
}
/* Listing of events under calendar */
.monthly-event-list {
/*background: rgba(233, 235, 236, 1);*/
background:#ffffff;
overflow: auto;
position: absolute;
top: 4em;
width: 100%;
height: calc(100% - 2.5em);
display: none;
-webkit-transition: .25s;
transition: .25s;
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
}
/* Days in Events List */
.monthly-list-item {
position: relative;
/*padding: 0.5em 0.7em 0.25em 4em;*/
display: none;
/*border-top: 1px solid #D6D6D6;*/
border-top:1px dashed #EBE9E9;
text-align: left;
overflow:hidden;
}
.monthly-list-item:after{
padding: 0.4em 1em;
display: block;
margin-bottom: 0.5em;
width: 90%;
float: right;
}
.monthly-event-list .monthly-today .monthly-event-list-date {
color: #EA6565;
}
/* Events in Events List */
.monthly-event-list .listed-event {
display: block;
color: #fff;
padding: 0.4em 1em;
border-radius: 0.2em;
margin-bottom: 0.5em;
float:right;
width:90%;
box-shadow: 0 0 3px 1px rgba(0,0,0,0.4);
-webkit-box-shadow: 0 0 3px 1px rgba(0,0,0,0.4);
}
.listed-event:hover{text-decoration:none;}
.sch-location{
display:block;
background:url(../images/icn-locate.png) no-repeat left center;
padding-left:30px;
background-size:15px;
margin:10px 0;
}
.monthly-list-item a:link, .monthly-list-item a:visited {
text-decoration: none;
}
.item-has-event {
display: block;
overflow:hidden;
}
.item-has-event:after{
display: none!important;
}
.monthly-event-list-date {
width: 10%;
font-size:14px;
float:left;
/*position: absolute;*/
left: 0;
top: 1.2em;
margin-top:2em;
padding-bottom:1em;
text-align: center;
line-height: 1.5em;
font-family: 'KhmerOS_muolpali';
}
.monthly-list-time-start,
.monthly-list-time-end {
font-size: .8em;
display: inline-block;
}
.monthly-list-time-end:not(:empty):before {
content: '\2013';
padding: 0 2px;
}
/* Events List custom webkit scrollbar */
.monthly-event-list::-webkit-scrollbar {width: 0.75em;}
/* Track */
.monthly-event-list::-webkit-scrollbar-track {background: none;}
/* Handle */
.monthly-event-list::-webkit-scrollbar-thumb {
background: #ccc;
border: 1px solid #E9EBEC;
border-radius: 0.5em;
}
.monthly-event-list::-webkit-scrollbar-thumb:hover {background: #CBC7C7;}
/* Language-specific. Default is English. */
.monthly-reset:after { content: 'ថ្ងៃនេះ'; }
.monthly-cal:after { content: 'ប្រតិទិន'; }
.monthly-list-item:after { content: 'គ្មានកិច្ចប្រជំុ'; font-size:1.3em; padding:1.5em;
}
.monthly-locale-fr .monthly-reset:after { content: "aujourd'hui"; }
.monthly-locale-fr .monthly-cal:after { content: "mois"; }
.monthly-locale-fr .monthly-list-item:after { content: 'aucun événement'; }
/*
Calendar shows event titles if the device width allows for at least 3em per day (rounded
up to 25em total). This assumes the calendar font is close to the baseline font size and
the calendar takes up close to the full media width as the window is made smaller or the
font is zoomed. If one or both of these is not true, this will need to be overridden by
a layout-specific width, or you will need to use a library like css-element-queries to
establish the rules based on the calendar element width rather than the device width.
*/
@media (min-width: 25em) {
.monthly-day-event {
/* padding-top: 1.3em; */
}
.monthly-day-event > .monthly-indicator-wrap {
width: auto;
max-width: none;
}
.monthly-indicator-wrap {
padding: 0;
}
.monthly-day:before {
padding-top: calc(100% - 1.2em);
}
.monthly-day .monthly-event-indicator {
display: block;
margin: 0 0 1px 0;
width: auto;
height: 1.5em;
line-height: 1.2em;
padding: 0.125em 0 0.1em 0.125em;
border-radius: 0;
overflow: hidden;
background-color: #333;
color: #333;
text-decoration: none;
white-space: nowrap;
box-sizing: border-box;
}
.monthly-day .monthly-event-indicator.monthly-event-continued {
box-shadow: -1px 0 0 0;
}
.monthly-day .monthly-event-indicator span {
display: block;
width: auto;
margin: 0;
color: #fff;
padding: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size:12px;
}
}
@media only screen and (max-width:757px){
.monthly-day-event > .monthly-day-number{
font-size:0.8em;
}
.monthly-day-title-wrap div{
font-size:0.5em;
}
.dotted_cal{
margin-left:0;
}
.monthly-header-title a:link, .monthly-header-title a:visited{
font-size:0.5em;
}
.sche-date{
position:relative;
top:auto;
margin-top:10px;
text-align:center;
}
.page{
padding: 10px 10px;
background-size: 30px;
}
.dotted_cal{
padding:3px 5px;
}
} | 21.21519 | 90 | 0.683089 |
f6e619059a9fcfa502c9979700ea3cfcaef6a2b5 | 1,946 | swift | Swift | Chapter09/5623_09_code/5623_09_code/ButtonView.swift | PacktPublishing/Mastering-macOS-Programming | 4e65338aaccb3e20bef31167b192a178a4124879 | [
"MIT"
] | 21 | 2017-07-03T11:14:14.000Z | 2022-03-09T06:26:48.000Z | Chapter09/5623_09_code/5623_09_code/ButtonView.swift | PacktPublishing/Mastering-macOS-Programming | 4e65338aaccb3e20bef31167b192a178a4124879 | [
"MIT"
] | null | null | null | Chapter09/5623_09_code/5623_09_code/ButtonView.swift | PacktPublishing/Mastering-macOS-Programming | 4e65338aaccb3e20bef31167b192a178a4124879 | [
"MIT"
] | 11 | 2017-06-14T14:01:46.000Z | 2022-02-21T16:39:30.000Z | //
// ButtonView.swift
// 5623_09_code
//
// Created by Stuart Grimshaw on 1/11/16.
// Copyright © 2016 Stuart Grimshaw. All rights reserved.
//
import Cocoa
@IBDesignable
class ButtonView: NSButton
{
@IBInspectable var borderColor: NSColor = .orange
@IBInspectable var normalButtonColor: NSColor = .white
@IBInspectable var highlightedButtonColor: NSColor = .gray
@IBInspectable var roundIcon: Bool = true
var fillColor: NSColor {
return isHighlighted ?
highlightedButtonColor :
normalButtonColor
}
// sizes
var standardLineWidth: CGFloat {
return min(bounds.width, bounds.height) * 0.05
}
var insetRect: CGRect {
return bounds.insetBy(
dx: standardLineWidth ,
dy: standardLineWidth )
}
var iconRect: CGRect {
return insetRect.insetBy(
dx: min(bounds.width, bounds.height) * 0.15,
dy: min(bounds.width, bounds.height) * 0.15)
}
override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)
// Drawing code here.
// NSColor.black.setFill()
// NSRectFill(dirtyRect)
// circle
let circlePath = NSBezierPath(ovalIn: insetRect)
fillColor.setFill()
circlePath.fill()
circlePath.lineWidth = standardLineWidth
borderColor.setStroke()
circlePath.stroke()
// icon
// NSColor.gray.setFill()
// NSRectFill(iconRect)
let iconPath = NSBezierPath()
if roundIcon == true
{
iconPath.appendOval(in: iconRect)
}
else
{
iconPath.appendArc(withCenter: CGPoint(x: iconRect.midX,
y: iconRect.midY),
radius: min(iconRect.width, iconRect.height) / 2.0,
startAngle: 180.0,
endAngle: 0)
iconPath.close()
}
iconPath.lineWidth = standardLineWidth
borderColor.setStroke()
iconPath.stroke()
}
}
| 22.367816 | 77 | 0.615108 |
c3697edfe68dc21de74545afcefdff8f0ea10ab1 | 2,695 | go | Go | drpcsignal/signal.go | unistack-org/drpc | 7713ed76eb9b15259c57f7b85a1230628cf400ec | [
"MIT"
] | 992 | 2019-10-02T17:04:48.000Z | 2022-03-31T20:17:50.000Z | drpcsignal/signal.go | unistack-org/drpc | 7713ed76eb9b15259c57f7b85a1230628cf400ec | [
"MIT"
] | 23 | 2020-03-18T18:15:15.000Z | 2022-03-27T10:53:46.000Z | drpcsignal/signal.go | unistack-org/drpc | 7713ed76eb9b15259c57f7b85a1230628cf400ec | [
"MIT"
] | 29 | 2019-10-23T12:19:03.000Z | 2022-03-26T02:37:55.000Z | // Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package drpcsignal
import (
"sync"
"sync/atomic"
)
type signalStatus = uint32
const (
statusErrorSet = 0b10
statusChannelCreated = 0b01
)
// Signal contains an error value that can be set one and exports
// a number of ways to inspect it.
type Signal struct {
status signalStatus
mu sync.Mutex
ch chan struct{}
err error
}
// Wait blocks until the signal has been Set.
func (s *Signal) Wait() {
<-s.Signal()
}
// Signal returns a channel that will be closed when the signal is set.
func (s *Signal) Signal() chan struct{} {
if atomic.LoadUint32(&s.status)&statusChannelCreated != 0 {
return s.ch
}
return s.signalSlow()
}
// signalSlow is the slow path for Signal, so that the fast path is inlined into
// callers.
func (s *Signal) signalSlow() chan struct{} {
s.mu.Lock()
if set := s.status; set&statusChannelCreated == 0 {
s.ch = make(chan struct{})
atomic.StoreUint32(&s.status, set|statusChannelCreated)
}
s.mu.Unlock()
return s.ch
}
// Set stores the error in the signal. It only keeps track of the first
// error set, and returns true if it was the first error set.
func (s *Signal) Set(err error) (ok bool) {
if atomic.LoadUint32(&s.status)&statusErrorSet != 0 {
return false
}
return s.setSlow(err)
}
// setSlow is the slow path for Set, so that the fast path is inlined into
// callers.
func (s *Signal) setSlow(err error) (ok bool) {
s.mu.Lock()
if status := s.status; status&statusErrorSet == 0 {
ok = true
s.err = err
if status&statusChannelCreated == 0 {
s.ch = closed
}
// we have to store the flags after we set the channel but before we
// close it, otherwise there are races where a caller can hit the
// atomic fast path and observe invalid values.
atomic.StoreUint32(&s.status, statusErrorSet|statusChannelCreated)
if status&statusChannelCreated != 0 {
close(s.ch)
}
}
s.mu.Unlock()
return ok
}
// Get returns the error set with the signal and a boolean indicating if
// the result is valid.
func (s *Signal) Get() (error, bool) { //nolint
if atomic.LoadUint32(&s.status)&statusErrorSet != 0 {
return s.err, true
}
return nil, false
}
// IsSet returns true if the Signal is set.
func (s *Signal) IsSet() bool {
return atomic.LoadUint32(&s.status)&statusErrorSet != 0
}
// Err returns the error stored in the signal. Since one can store a nil error
// care must be taken. A non-nil error returned from this method means that
// the Signal has been set, but the inverse is not true.
func (s *Signal) Err() error {
if atomic.LoadUint32(&s.status)&statusErrorSet != 0 {
return s.err
}
return nil
}
| 24.724771 | 80 | 0.696104 |
041b6ad69c68f130c60c1013c0277859586772eb | 1,302 | js | JavaScript | sandbox/graphqlVersion/server/allLocales.js | guigrpa/abroad | 589b877de14c8a268997867da405d99d545ed295 | [
"MIT"
] | 94 | 2016-04-11T16:32:45.000Z | 2022-01-03T21:20:36.000Z | sandbox/graphqlVersion/server/allLocales.js | guigrpa/abroad | 589b877de14c8a268997867da405d99d545ed295 | [
"MIT"
] | 37 | 2016-04-30T13:58:47.000Z | 2022-02-17T20:57:14.000Z | sandbox/graphqlVersion/server/allLocales.js | guigrpa/abroad | 589b877de14c8a268997867da405d99d545ed295 | [
"MIT"
] | 16 | 2016-06-17T13:46:19.000Z | 2021-02-27T19:56:31.000Z | import fs from 'fs';
import path from 'path';
import _t from '../translate';
const SUPPORTED_LOCALES = ['en', 'en-US', 'en-GB', 'ca', 'es'];
const addLocaleCode = lang => {
const langPath = path.join(__dirname, `../locales/${lang}.js`);
const localeCode = fs.readFileSync(langPath, 'utf8');
_t.addLocaleCode(lang, localeCode);
};
const reactIntlMessages = {};
const addAllLocales = () => {
/* eslint-disable global-require */
_t.addLocales('en', require('../locales/en'));
_t.addLocales('en-US', require('../locales/en-US'));
_t.addLocales('en-GB', require('../locales/en-GB'));
_t.addLocales('ca', require('../locales/ca'));
_t.addLocales('es', require('../locales/es'));
/* eslint-enable global-require */
SUPPORTED_LOCALES.forEach(addLocaleCode);
SUPPORTED_LOCALES.forEach(lang => {
try {
const reactIntlPath = path.join(__dirname, `${lang}.reactIntl.json`);
reactIntlMessages[lang] = JSON.parse(
fs.readFileSync(reactIntlPath, 'utf8')
);
} catch (err) {
/* ignore */
}
});
};
const getReactIntlMessages = lang => reactIntlMessages[lang];
// =======================================
// Public API
// =======================================
export default addAllLocales;
export { SUPPORTED_LOCALES, getReactIntlMessages };
| 28.933333 | 75 | 0.611367 |
538de2e23f77840afb56e0666eb83b2a87142fb9 | 9,246 | swift | Swift | Select_Assignment1_Sorts.playground/Sources/XCTestAsserts.swift | huydangquoc/select_w1_assignment | 721c2c5d7b598a15aab1cdcfbfa608cc6b0e9ea8 | [
"Apache-2.0"
] | null | null | null | Select_Assignment1_Sorts.playground/Sources/XCTestAsserts.swift | huydangquoc/select_w1_assignment | 721c2c5d7b598a15aab1cdcfbfa608cc6b0e9ea8 | [
"Apache-2.0"
] | 1 | 2016-06-30T17:16:10.000Z | 2016-07-04T05:25:23.000Z | Select_Assignment1_Sorts.playground/Sources/XCTestAsserts.swift | huydangquoc/select_w1_assignment | 721c2c5d7b598a15aab1cdcfbfa608cc6b0e9ea8 | [
"Apache-2.0"
] | null | null | null | // Playground Tests
import Foundation
let defaultMessage = ""
/// Emits a test failure if the general `Boolean` expression passed
/// to it evaluates to `false`.
///
/// - Requires: This and all other XCTAssert* functions must be called from
/// within a test method, as passed to `XCTMain`.
/// Assertion failures that occur outside of a test method will *not* be
/// reported as failures.
///
/// - Parameter expression: A boolean test. If it evaluates to `false`, the
/// assertion fails and emits a test failure.
/// - Parameter message: An optional message to use in the failure if the
/// assertion fails. If no message is supplied a default message is used.
///
/// For example
///
/// ```swift
/// class TestCase: XCTestCase {
/// func testAssertions() {
/// XCTAssertEqual(1, 2)
/// XCTAssertEqual([1, 2], [2, 3])
/// XCTAssertGreaterThanOrEqual(1, 2)
/// XCTAssertTrue(true)
/// }
/// }
/// ```
///
public func XCTAssert(
@autoclosure expression: () -> BooleanType,
_ message: String = defaultMessage
) -> String {
return returnTestResult(expression(), message: message)
}
public func XCTAssertEqual<T : Equatable>(
@autoclosure expression1: () -> T?,
@autoclosure _ expression2: () -> T?,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() == expression2(),
message: "\(message) - expected: \(expression2()), actual: \(expression1())")
}
public func XCTAssertEqual<T : Equatable>(
@autoclosure expression1: () -> ArraySlice<T>,
@autoclosure _ expression2: () -> ArraySlice<T>,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() == expression2(),
message: "\(message) - expected: \(expression2()), actual: \(expression1())")
}
public func XCTAssertEqual<T : Equatable>(
@autoclosure expression1: () -> ContiguousArray<T>,
@autoclosure _ expression2: () -> ContiguousArray<T>,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() == expression2(),
message: "\(message) - expected: \(expression2()), actual: \(expression1())")
}
public func XCTAssertEqual<T : Equatable>(
@autoclosure expression1: () -> [T],
@autoclosure _ expression2: () -> [T],
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() == expression2(),
message: "\(message) - expected: \(expression2()), actual: \(expression1())")
}
public func XCTAssertEqual<T, U : Equatable>(
@autoclosure expression1: () -> [T : U],
@autoclosure _ expression2: () -> [T : U],
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() == expression2(),
message: "\(message) - expected: \(expression2()), actual: \(expression1())")
}
public func XCTAssertFalse(
@autoclosure expression: () -> BooleanType,
_ message: String = defaultMessage
) -> String {
return returnTestResult(!expression().boolValue, message: message)
}
public func XCTAssertGreaterThan<T : Comparable>(
@autoclosure expression1: () -> T,
@autoclosure _ expression2: () -> T,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() > expression2(),
message: "\(message) - actual: \(expression1()) > \(expression2())")
}
public func XCTAssertGreaterThanOrEqual<T : Comparable>(
@autoclosure expression1: () -> T,
@autoclosure _ expression2: () -> T,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() >= expression2(),
message: "\(message) - actual: \(expression1()) >= \(expression2())")
}
public func XCTAssertLessThan<T : Comparable>(
@autoclosure expression1: () -> T,
@autoclosure _ expression2: () -> T,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() < expression2(),
message: "\(message) - actual: \(expression1()) < \(expression2())")
}
public func XCTAssertLessThanOrEqual<T : Comparable>(
@autoclosure expression1: () -> T,
@autoclosure _ expression2: () -> T,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() <= expression2(),
message: "\(message) - actual: \(expression1()) <= \(expression2())")
}
public func XCTAssertNil(
@autoclosure expression: () -> Any?,
_ message: String = ""
) -> String {
var result = true
if let _ = expression() { result = false }
return returnTestResult(
result,
message: "\(message) - expected: nil, actual: \(expression())")
}
public func XCTAssertNotEqual<T : Equatable>(
@autoclosure expression1: () -> T?,
@autoclosure _ expression2: () -> T?,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() != expression2(),
message: "\(message) - expected: \(expression1()) =! \(expression2())")
}
public func XCTAssertNotEqual<T : Equatable>(
@autoclosure expression1: () -> ContiguousArray<T>,
@autoclosure _ expression2: () -> ContiguousArray<T>,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() != expression2(),
message: "\(message) - expected: \(expression1()) != \(expression2())")
}
public func XCTAssertNotEqual<T : Equatable>(
@autoclosure expression1: () -> ArraySlice<T>,
@autoclosure _ expression2: () -> ArraySlice<T>,
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() != expression2(),
message: "\(message) - expected: \(expression1()) != \(expression2())")
}
public func XCTAssertNotEqual<T : Equatable>(
@autoclosure expression1: () -> [T],
@autoclosure _ expression2: () -> [T],
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() != expression2(),
message: "\(message) - expected: \(expression1()) != \(expression2())")
}
public func XCTAssertNotEqual<T, U : Equatable>(
@autoclosure expression1: () -> [T : U],
@autoclosure _ expression2: () -> [T : U],
_ message: String = defaultMessage
) -> String {
return returnTestResult(
expression1() != expression2(),
message: "\(message) - expected: \(expression1()) != \(expression2())")
}
public func XCTAssertNotNil(
@autoclosure expression: () -> Any?,
_ message: String = ""
) -> String {
var result = false
if let _ = expression() { result = true }
return returnTestResult(result, message: message)
}
public func XCTAssertTrue(
@autoclosure expression: () -> BooleanType,
_ message: String = defaultMessage
) -> String {
return returnTestResult(expression(), message: message)
}
public func XCTFail(message: String = "") -> String {
return failMessage(message)
}
func returnTestResult(result: BooleanType, message: String) -> String {
return result.boolValue ? okMessage() : failMessage(message)
}
func okMessage() -> String { return "✅" }
func failMessage(message: String) -> String { return "❌" + message }
// This class was based on GitHub gist:
// https://gist.github.com/croath/a9358dac0530d91e9e2b
public class XCTestCase: NSObject {
public override init(){
super.init()
self.runTestMethods()
}
public class func setUp() {}
public func setUp() {}
public class func tearDown() {}
public func tearDown() {}
override public var description: String { return "" }
private func runTestMethods(){
self.dynamicType.setUp()
var mc: CUnsignedInt = 0
var mlist: UnsafeMutablePointer<Method> =
class_copyMethodList(self.dynamicType.classForCoder(), &mc);
(0 ..< mc).forEach { _ in
let m = method_getName(mlist.memory)
if String(m).hasPrefix("test") {
self.setUp()
let startTime = NSDate()
self.performSelectorOnMainThread(
m,
withObject: nil,
waitUntilDone: true)
let endTime = NSDate()
let runTime = endTime.timeIntervalSinceDate(startTime)
print("Run time: \(runTime)")
self.tearDown()
}
mlist = mlist.successor()
}
self.dynamicType.tearDown()
}
}
| 34.5 | 85 | 0.574519 |
ff1ab7212d0ba27bce662f21167aaf0f87837485 | 32,449 | sql | SQL | contrib/hawq-hadoop/hawq-mapreduce-tool/test-data/test_parquet_alltypes/test_parquet_alltypes.sql | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 450 | 2015-09-05T09:12:51.000Z | 2018-08-30T01:45:36.000Z | contrib/hawq-hadoop/hawq-mapreduce-tool/test-data/test_parquet_alltypes/test_parquet_alltypes.sql | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 1,274 | 2015-09-22T20:06:16.000Z | 2018-08-31T22:14:00.000Z | contrib/hawq-hadoop/hawq-mapreduce-tool/test-data/test_parquet_alltypes/test_parquet_alltypes.sql | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 278 | 2015-09-21T19:15:06.000Z | 2018-08-31T00:36:51.000Z | DROP TABLE IF EXISTS test_parquet_alltypes;
CREATE TABLE test_parquet_alltypes (c0 bool, c1 bit, c2 varbit, c3 bytea, c4 int2, c5 int4, c6 int8, c7 numeric, c8 char(10), c9 varchar(10), c10 text, c11 date, c12 time, c13 timestamp, c14 interval, c15 point, c16 lseg, c17 box, c18 circle, c19 path, c20 polygon, c21 macaddr, c22 inet, c23 cidr, c24 xml) with (appendonly=true, orientation=parquet, compresstype=none, rowgroupsize=8388608, pagesize=1048576, compresslevel=0);
INSERT INTO test_parquet_alltypes values (null, null, null, 'aaaaaaaaaaaaaaaaaaa', -128, 2147483647, -9223372036854775808, null, '123456789a', '123456789a', '', '4277-12-31 AD', '00:00:00', null, '178000000 years', POINT(1,2), null, null, null, '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '192.168.1.255/32', null),
('true', null, '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 0, 32767, 9223372036854775807, 0.0001, '123456789a', 'aaaa', 'hello world', '4277-12-31 AD', '00:00:00', '4713-01-01 BC', null, POINT(1,2), null, null, '<(1,2),3>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '2001::7344', '192.168.1.255/32', '<aa>bb</aa>'),
('false', null, null, 'hello world', 32767, 128, -32768, 0.0001, '123456789a', 'aaaa', '', '4713-01-01 BC', '00:00:00', null, null, null, '[(1,1),(2,2)]', null, '<(1,2),3>', '(1,1)', '((1,1),(3,2),(4,5))', null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('true', '1', '000000000011100', 'hello world', 32767, 0, 128, null, 'bbccddeeff', null, '', '4277-12-31 AD', '23:59:59', '4713-01-01 BC', null, POINT(100,200), '[(1,1),(2,2)]', null, null, null, '((100,123),(5,10),(7,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '172.20.143.0/24', '<name>wj</name>'),
(null, null, '000000000011100', 'hello world', null, 2147483647, 0, 6.54, '123456789a', 'bbccddeeff', repeat('b',1000), '4277-12-31 AD', '04:05:06', '1999-01-08 04:05:06', null, POINT(1,2), null, null, '<(100,200),300>', null, '((1,1),(3,2),(4,5))', null, '172.20.143.0', '192.168.1.255/32', '<name>wj</name>'),
('false', '1', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 0, -128, -9223372036854775808, 6.54, 'aaaa', 'bbccddeeff', '', null, null, '1999-01-08 04:05:06', '178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(1,2),3>', '(1,1)', null, null, null, '192.168.1.255/32', '<aa>bb</aa>'),
(null, null, null, 'aaaaaaaaaaaaaaaaaaa', 128, null, -128, null, null, null, repeat('b',1000), '2014-03-02', '23:59:59', '2942-12-31 AD', '178000000 years', null, '[(1,1),(2,2)]', null, null, null, null, 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '172.20.143.0/24', null),
('true', '1', null, 'aaaaaaaaaaaaaaaaaaa', 32767, 0, 32767, 0.0001, null, 'bbccddeeff', repeat('b',1000), '4713-01-01 BC', '23:59:59', '4713-01-01 BC', null, POINT(1000,2000), null, null, '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', null, '<name>wj</name>'),
(null, '0', null, 'hello world', -128, null, -2147483648, null, null, 'bbccddeeff', 'hello world', '4713-01-01 BC', null, '2942-12-31 AD', null, POINT(1000,2000), '[(0,0),(6,6)]', null, null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '172.20.143.0/24', '<name>wj</name>'),
('false', '0', '1111', 'aaaaaaaaaaaaaaaaaaa', -128, null, 128, 0.0001, 'aaaa', 'aaaa', repeat('b',1000), '4277-12-31 AD', '00:00:00', '4713-01-01 BC', '178000000 years', POINT(1,2), null, null, '<(1,2),3>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '172.20.143.0/24', null),
('true', '0', '000000000011100', 'hello world', 128, -32768, 128, 6.54, 'bbccddeeff', '123456789a', 'z', '4277-12-31 AD', '00:00:00', '1999-01-08 04:05:06', '-178000000 years', POINT(100,200), '[(0,0),(6,6)]', null, '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '192.168.1.255/24', '192.168.1.255/32', '<aa>bb</aa>'),
('false', '1', null, 'aaaaaaaaaaaaaaaaaaa', -128, -32768, 2147483647, null, 'bbccddeeff', 'aaaa', repeat('b',1000), '4277-12-31 AD', '00:00:00', '2004-10-19 10:23:54', null, null, '[(0,0),(6,6)]', '((100,200),(200,400))', '<(1,2),3>', '(1,1),(2,3),(4,5)', null, null, '172.20.143.0', null, null),
('false', '1', '1111', null, null, -32768, 9223372036854775807, 0.0001, null, 'aaaa', null, '2014-03-02', '23:59:59', '1999-01-08 04:05:06', '178000000 years', POINT(1000,2000), '[(0,0),(6,6)]', '((0,1),(2,3))', '<(100,200),300>', '(1,1)', null, 'FF:89:71:45:AE:01', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
(null, '0', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 32767, 32767, 32767, 6.54, '123456789a', 'bbccddeeff', '', null, '23:59:59', '1999-01-08 04:05:06', null, null, null, '((100,200),(200,400))', null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '2001::7344', '192.168.1.255/32', '<aa>bb</aa>'),
('false', '1', '000000000011100', 'hello world', 0, 2147483647, 9223372036854775807, 6.54, 'aaaa', 'bbccddeeff', null, '4713-01-01 BC', '23:59:59', null, null, POINT(1000,2000), null, '((0,1),(2,3))', null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, null, null, '<name>wj</name>'),
('false', '1', null, 'hello world', null, -32768, 128, 0.0001, 'bbccddeeff', 'aaaa', repeat('b',1000), '4277-12-31 AD', '00:00:00', '2004-10-19 10:23:54', '178000000 years', POINT(1,2), '[(0,0),(6,6)]', null, '<(1,2),3>', '(1,1)', null, null, '2001::7344', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
(null, '1', '000000000011100', 'hello world', 32767, 32767, 128, 0.0001, 'bbccddeeff', '123456789a', '', null, null, '2942-12-31 AD', null, POINT(100,200), null, '((100,200),(200,400))', '<(1,2),3>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', null, '<name>wj</name>'),
(null, null, '1111', 'hello world', -32768, 32767, null, 0.0001, null, 'bbccddeeff', '', '4713-01-01 BC', '23:59:59', null, '178000000 years', POINT(1,2), '[(1,1),(2,2)]', null, null, null, '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('true', null, '1111', null, -128, -2147483648, 9223372036854775807, null, '123456789a', null, null, '4713-01-01 BC', '23:59:59', '1999-01-08 04:05:06', null, POINT(1000,2000), '[(1,1),(2,2)]', null, null, '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '2001::7344', null, '<aa>bb</aa>'),
('false', '1', '1111', null, -128, -32768, null, 0.0001, '123456789a', '123456789a', repeat('b',1000), '4277-12-31 AD', '04:05:06', '1999-01-08 04:05:06', '-178000000 years', POINT(100,200), null, null, '<(1,2),3>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('false', null, '000000000011100', 'hello world', null, -2147483648, 2147483647, 6.54, '123456789a', null, 'z', '4713-01-01 BC', '00:00:00', '2942-12-31 AD', '-178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '172.20.143.0/24', '<name>wj</name>'),
('true', '0', '1111', null, null, 2147483647, 128, 0.0001, null, 'bbccddeeff', '', '4277-12-31 AD', null, '2004-10-19 10:23:54', null, POINT(1000,2000), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '172.20.143.0/24', '<aa>bb</aa>'),
('false', '1', '1111', null, 128, -2147483648, -32768, null, 'bbccddeeff', 'aaaa', '', null, '04:05:06', null, '178000000 years', POINT(1,2), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(1,2),3>', '(1,1)', null, null, '172.20.143.0', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', null, '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 128, -32768, 2147483647, null, '123456789a', 'bbccddeeff', null, null, '04:05:06', '2004-10-19 10:23:54', '-178000000 years', POINT(1,2), null, '((100,200),(200,400))', '<(100,200),300>', null, '((1,1),(3,2),(4,5))', null, null, null, '<aa>bb</aa>'),
(null, '1', '000000000011100', null, 32767, -32768, -9223372036854775808, 6.54, 'aaaa', 'bbccddeeff', null, '2014-03-02', '04:05:06', null, null, null, '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', '172.20.143.0/24', null),
('false', '1', '000000000011100', 'hello world', 128, null, -9223372036854775808, 6.54, 'aaaa', 'bbccddeeff', repeat('b',1000), '4277-12-31 AD', '04:05:06', '2004-10-19 10:23:54', '178000000 years', POINT(1,2), '[(0,0),(6,6)]', null, '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '172.20.143.0', '192.168.1.255/32', '<name>wj</name>'),
('true', null, null, 'aaaaaaaaaaaaaaaaaaa', 0, -32768, -32768, 0.0001, null, null, null, '4713-01-01 BC', null, '4713-01-01 BC', '178000000 years', POINT(1000,2000), null, '((100,200),(200,400))', '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', null, '<aa>bb</aa>'),
('false', '0', '1111', null, -128, 128, -9223372036854775808, 0.0001, 'aaaa', '123456789a', 'z', null, '00:00:00', '2004-10-19 10:23:54', '-178000000 years', null, null, '((0,1),(2,3))', '<(1,2),3>', '(1,1)', '((1,1),(3,2),(4,5))', null, null, null, null),
('false', '0', null, 'aaaaaaaaaaaaaaaaaaa', -128, -2147483648, -2147483648, null, '123456789a', 'bbccddeeff', null, '4713-01-01 BC', '23:59:59', '2004-10-19 10:23:54', '178000000 years', POINT(1000,2000), null, null, null, null, '((1,1),(3,2),(4,5))', null, '192.168.1.255/24', '172.20.143.0/24', '<name>wj</name>'),
('false', null, '000000000011100', null, -32768, 0, -9223372036854775808, 6.54, '123456789a', 'aaaa', 'hello world', '4713-01-01 BC', null, '2942-12-31 AD', null, null, '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', '0', '1111', 'hello world', null, -128, -32768, null, 'bbccddeeff', '123456789a', '', '4713-01-01 BC', '00:00:00', '2004-10-19 10:23:54', '178000000 years', null, null, '((100,200),(200,400))', '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', null, '<name>wj</name>'),
('true', '1', null, 'hello world', null, -128, 0, 0.0001, 'aaaa', 'aaaa', repeat('b',1000), null, '04:05:06', null, null, POINT(1000,2000), '[(1,1),(2,2)]', null, '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '2001::7344', '172.20.143.0/24', null),
(null, '1', null, 'aaaaaaaaaaaaaaaaaaa', 128, -2147483648, 9223372036854775807, 0.0001, '123456789a', null, 'hello world', null, '04:05:06', '2004-10-19 10:23:54', '178000000 years', null, '[(1,1),(2,2)]', null, null, null, '((1,1),(3,2),(4,5))', null, '172.20.143.0', '192.168.1.255/32', '<name>wj</name>'),
(null, null, null, 'aaaaaaaaaaaaaaaaaaa', 32767, null, null, null, 'aaaa', null, '', '4713-01-01 BC', '23:59:59', null, null, POINT(1,2), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(1,2),3>', null, null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '172.20.143.0/24', '<aa>bb</aa>'),
('false', '0', null, null, 0, 2147483647, null, null, '123456789a', 'bbccddeeff', null, null, '23:59:59', '4713-01-01 BC', null, POINT(1,2), '[(1,1),(2,2)]', '((0,1),(2,3))', null, '(1,1),(2,3),(4,5)', null, null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', null, '000000000011100', null, -128, null, 2147483647, 0.0001, '123456789a', null, 'z', null, null, '4713-01-01 BC', '178000000 years', POINT(100,200), null, '((0,1),(2,3))', '<(100,200),300>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', null, '<name>wj</name>'),
(null, '1', '000000000011100', null, null, 2147483647, -128, 0.0001, '123456789a', 'bbccddeeff', repeat('b',1000), '4277-12-31 AD', '04:05:06', null, '178000000 years', POINT(1,2), null, null, '<(1,2),3>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '172.20.143.0', '192.168.1.255/32', '<name>wj</name>'),
('false', '1', null, 'hello world', 0, 128, 32767, 6.54, '123456789a', 'aaaa', null, '4277-12-31 AD', '23:59:59', null, '-178000000 years', null, null, '((100,200),(200,400))', '<(1,2),3>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', '172.20.143.0/24', null),
('true', null, '1111', null, 32767, 2147483647, 9223372036854775807, 0.0001, '123456789a', 'aaaa', 'z', '4713-01-01 BC', '04:05:06', '2942-12-31 AD', null, POINT(1,2), null, '((100,200),(200,400))', '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('false', '1', '1111', 'hello world', null, 128, null, null, 'bbccddeeff', null, '', '2014-03-02', '23:59:59', '4713-01-01 BC', '178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(1,2),3>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', null, '192.168.1.255/24', null, null),
('true', '1', '000000000011100', null, -32768, -128, -9223372036854775808, 0.0001, null, '123456789a', 'hello world', null, '00:00:00', '4713-01-01 BC', '-178000000 years', null, '[(1,1),(2,2)]', '((0,1),(2,3))', '<(1,2),3>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
(null, '1', '000000000011100', 'hello world', 128, null, -128, 0.0001, null, null, 'hello world', '2014-03-02', '00:00:00', '2004-10-19 10:23:54', '178000000 years', null, null, '((100,200),(200,400))', '<(1,2),3>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', null, '192.168.1.255/32', '<aa>bb</aa>'),
(null, '1', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 32767, -32768, 0, 6.54, null, 'aaaa', '', '2014-03-02', '00:00:00', '4713-01-01 BC', '178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((0,1),(2,3))', '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', '1', '1111', 'hello world', -128, 0, -2147483648, 6.54, '123456789a', 'aaaa', repeat('b',1000), '4713-01-01 BC', '00:00:00', '1999-01-08 04:05:06', '178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', null, null, null, '((100,123),(5,10),(7,2),(4,5))', null, '192.168.1.255/24', '172.20.143.0/24', null),
(null, '0', '000000000011100', 'hello world', -128, -128, -9223372036854775808, null, 'aaaa', 'aaaa', 'z', null, '00:00:00', '2004-10-19 10:23:54', null, POINT(1000,2000), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
('true', null, null, 'aaaaaaaaaaaaaaaaaaa', 0, 2147483647, 0, null, '123456789a', 'aaaa', '', null, '04:05:06', '2004-10-19 10:23:54', '178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '192.168.1.255/32', '<name>wj</name>'),
('false', '1', null, null, 0, 0, -32768, 0.0001, '123456789a', null, repeat('b',1000), '4277-12-31 AD', '04:05:06', '1999-01-08 04:05:06', null, null, '[(1,1),(2,2)]', '((0,1),(2,3))', '<(100,200),300>', '(1,1)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '192.168.1.255/32', '<aa>bb</aa>'),
('true', '1', null, 'hello world', 32767, 0, 9223372036854775807, null, 'bbccddeeff', 'aaaa', repeat('b',1000), null, '04:05:06', null, '-178000000 years', POINT(1000,2000), null, null, '<(1,2),3>', null, '((1,1),(3,2),(4,5))', null, '2001::7344', '172.20.143.0/24', null),
(null, '1', '1111', 'aaaaaaaaaaaaaaaaaaa', null, -128, 0, 6.54, 'bbccddeeff', 'aaaa', '', '4713-01-01 BC', '00:00:00', '1999-01-08 04:05:06', '178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((0,1),(2,3))', '<(1,2),3>', '(1,1)', null, null, '2001::7344', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
('false', '0', '1111', 'hello world', 0, 32767, 0, 6.54, 'bbccddeeff', 'aaaa', '', null, '23:59:59', '1999-01-08 04:05:06', null, POINT(1,2), '[(0,0),(6,6)]', '((0,1),(2,3))', null, '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '172.20.143.0/24', null),
('true', '1', '1111', 'aaaaaaaaaaaaaaaaaaa', -32768, -32768, 0, null, null, null, '', '4713-01-01 BC', '23:59:59', '1999-01-08 04:05:06', '-178000000 years', POINT(100,200), '[(1,1),(2,2)]', null, '<(1,2),3>', null, '((100,123),(5,10),(7,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
(null, null, '000000000011100', null, -32768, 32767, 32767, 6.54, 'aaaa', 'bbccddeeff', 'hello world', '4713-01-01 BC', '23:59:59', '4713-01-01 BC', '178000000 years', POINT(1,2), '[(1,1),(2,2)]', null, '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', '0', null, 'aaaaaaaaaaaaaaaaaaa', 128, -2147483648, 2147483647, 6.54, '123456789a', 'bbccddeeff', null, '4713-01-01 BC', '00:00:00', null, '-178000000 years', null, '[(0,0),(6,6)]', '((100,200),(200,400))', '<(1,2),3>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '172.20.143.0', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', '1', '1111', null, 128, -32768, 0, 6.54, 'bbccddeeff', 'aaaa', null, '2014-03-02', null, '2942-12-31 AD', '-178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((100,200),(200,400))', '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '192.168.1.255/32', null),
(null, '0', null, null, null, 128, 0, 0.0001, 'aaaa', 'aaaa', repeat('b',1000), '4277-12-31 AD', '23:59:59', '1999-01-08 04:05:06', '-178000000 years', POINT(100,200), null, '((100,200),(200,400))', null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '192.168.1.255/32', null),
(null, '0', '000000000011100', 'hello world', null, null, -128, null, 'aaaa', null, 'z', '4277-12-31 AD', null, '1999-01-08 04:05:06', '178000000 years', POINT(1,2), '[(0,0),(6,6)]', null, null, '(1,1)', null, null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('false', '0', '1111', 'hello world', -128, -128, -9223372036854775808, 0.0001, 'aaaa', 'aaaa', null, '4277-12-31 AD', null, '1999-01-08 04:05:06', '178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((100,200),(200,400))', null, '(1,1)', null, 'FF:89:71:45:AE:01', '192.168.1.255/24', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
(null, null, '000000000011100', 'hello world', 128, 2147483647, null, 0.0001, 'aaaa', '123456789a', null, '4277-12-31 AD', '04:05:06', '1999-01-08 04:05:06', '178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(100,200),300>', null, null, 'FF:89:71:45:AE:01', '2001::7344', null, '<aa>bb</aa>'),
(null, null, '1111', 'aaaaaaaaaaaaaaaaaaa', -32768, -2147483648, 9223372036854775807, 6.54, 'bbccddeeff', null, 'z', '4713-01-01 BC', '00:00:00', null, null, POINT(1000,2000), '[(0,0),(6,6)]', null, null, null, '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '192.168.1.255/32', '<name>wj</name>'),
(null, '0', null, null, -128, -128, 128, null, '123456789a', 'aaaa', repeat('b',1000), '4277-12-31 AD', '04:05:06', null, '-178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((0,1),(2,3))', '<(1,2),3>', null, null, 'FF:89:71:45:AE:01', '2001::7344', '192.168.1.255/32', null),
('false', null, '1111', null, null, 128, -2147483648, null, null, 'aaaa', 'z', '4277-12-31 AD', '23:59:59', '2942-12-31 AD', null, POINT(100,200), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '172.20.143.0', '172.20.143.0/24', '<name>wj</name>'),
('true', '1', '1111', null, 0, 2147483647, 128, null, null, '123456789a', null, null, '23:59:59', '2004-10-19 10:23:54', null, POINT(100,200), null, null, '<(100,200),300>', '(1,1)', null, 'FF:89:71:45:AE:01', '2001::7344', '192.168.1.255/32', null),
(null, '0', null, null, 32767, 0, -128, 6.54, null, 'bbccddeeff', null, '4713-01-01 BC', '23:59:59', '4713-01-01 BC', '178000000 years', POINT(1000,2000), '[(0,0),(6,6)]', null, null, '(1,1),(2,3),(4,5)', null, 'FF:89:71:45:AE:01', '192.168.1.255/24', '172.20.143.0/24', '<name>wj</name>'),
('false', '0', null, 'aaaaaaaaaaaaaaaaaaa', 32767, -2147483648, 128, 0.0001, 'bbccddeeff', null, '', '4713-01-01 BC', '00:00:00', null, '178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', null, '<(1,2),3>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', null, null, 'hello world', -128, -128, null, null, '123456789a', '123456789a', '', '4277-12-31 AD', null, '1999-01-08 04:05:06', '178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((100,200),(200,400))', null, null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '192.168.1.255/32', '<name>wj</name>'),
('true', null, '000000000011100', 'aaaaaaaaaaaaaaaaaaa', null, 128, 128, 0.0001, null, 'aaaa', 'hello world', null, '00:00:00', '4713-01-01 BC', '-178000000 years', POINT(1000,2000), '[(0,0),(6,6)]', '((100,200),(200,400))', null, '(1,1)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '192.168.1.255/32', '<name>wj</name>'),
('false', null, '000000000011100', 'aaaaaaaaaaaaaaaaaaa', -32768, -32768, 0, null, 'bbccddeeff', null, null, null, null, '2942-12-31 AD', '-178000000 years', null, null, '((0,1),(2,3))', null, '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '192.168.1.255/24', null, null),
('true', '0', null, null, 0, null, 32767, null, 'bbccddeeff', 'aaaa', 'z', null, '23:59:59', '1999-01-08 04:05:06', null, POINT(1,2), null, null, null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '172.20.143.0/24', null),
('true', '0', null, null, -128, 128, -9223372036854775808, 0.0001, 'aaaa', null, 'hello world', '2014-03-02', '04:05:06', null, '-178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((0,1),(2,3))', null, '(1,1),(2,3),(4,5)', null, 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', null, null, 'hello world', null, null, null, null, null, 'bbccddeeff', '', '4277-12-31 AD', '23:59:59', '1999-01-08 04:05:06', null, POINT(1000,2000), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(1,2),3>', '(1,1),(2,3),(4,5)', null, 'FF:89:71:45:AE:01', '2001::7344', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', null, '000000000011100', 'hello world', null, -128, 32767, 6.54, 'aaaa', null, '', '4713-01-01 BC', '04:05:06', '4713-01-01 BC', '-178000000 years', POINT(1,2), '[(0,0),(6,6)]', '((100,200),(200,400))', '<(1,2),3>', '(1,1)', null, 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('false', '0', null, null, 0, 128, 32767, 0.0001, null, null, 'z', '4277-12-31 AD', null, '2942-12-31 AD', '178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', null, null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', null, '<name>wj</name>'),
('false', '1', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 128, 0, 9223372036854775807, 6.54, '123456789a', 'aaaa', 'z', '4277-12-31 AD', '00:00:00', '4713-01-01 BC', '178000000 years', POINT(100,200), '[(0,0),(6,6)]', '((0,1),(2,3))', null, '(1,1),(2,3),(4,5)', null, 'FF:89:71:45:AE:01', null, '192.168.1.255/32', '<aa>bb</aa>'),
('false', '0', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', -32768, -128, 0, null, null, '123456789a', 'z', '2014-03-02', '04:05:06', '2004-10-19 10:23:54', '178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
('true', null, null, null, -32768, -32768, 9223372036854775807, 0.0001, null, '123456789a', 'z', null, '23:59:59', '1999-01-08 04:05:06', '-178000000 years', POINT(1,2), '[(1,1),(2,2)]', null, null, null, '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001::7344', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
('false', '1', null, null, 0, -32768, 9223372036854775807, 6.54, '123456789a', null, 'z', '4277-12-31 AD', null, '4713-01-01 BC', null, POINT(1000,2000), '[(0,0),(6,6)]', null, '<(1,2),3>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('false', '1', '000000000011100', null, 32767, -32768, 9223372036854775807, 6.54, 'aaaa', '123456789a', '', '2014-03-02', '04:05:06', '2942-12-31 AD', '-178000000 years', null, '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', '((1,1),(3,2),(4,5))', null, null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
(null, '1', null, null, 128, 128, 0, 6.54, '123456789a', null, 'z', '2014-03-02', '04:05:06', '2942-12-31 AD', null, null, null, '((100,200),(200,400))', '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
('true', null, '1111', 'aaaaaaaaaaaaaaaaaaa', -32768, -32768, 9223372036854775807, 0.0001, '123456789a', 'bbccddeeff', null, null, '04:05:06', null, '-178000000 years', null, '[(1,1),(2,2)]', '((100,200),(200,400))', '<(1,2),3>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
('false', '1', null, 'aaaaaaaaaaaaaaaaaaa', null, 128, -128, null, 'bbccddeeff', '123456789a', null, '4713-01-01 BC', '00:00:00', null, null, POINT(1,2), '[(1,1),(2,2)]', null, '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', null, '<name>wj</name>'),
('false', null, '1111', 'hello world', 128, 32767, 9223372036854775807, null, 'bbccddeeff', 'aaaa', '', '4713-01-01 BC', '04:05:06', '4713-01-01 BC', '-178000000 years', POINT(1,2), '[(1,1),(2,2)]', '((0,1),(2,3))', '<(100,200),300>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '192.168.1.255/32', '<aa>bb</aa>'),
('false', '0', '1111', 'aaaaaaaaaaaaaaaaaaa', -32768, -2147483648, 128, 0.0001, 'aaaa', 'bbccddeeff', 'hello world', '4277-12-31 AD', '23:59:59', null, null, null, '[(0,0),(6,6)]', null, '<(100,200),300>', '(1,1)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', null, null),
('false', null, null, null, 128, 128, 9223372036854775807, 0.0001, null, null, 'hello world', '4277-12-31 AD', '00:00:00', '2004-10-19 10:23:54', '178000000 years', null, '[(0,0),(6,6)]', '((0,1),(2,3))', '<(100,200),300>', null, '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '192.168.1.255/24', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', null, '1111', null, null, 128, -9223372036854775808, 0.0001, '123456789a', null, 'z', null, '23:59:59', null, null, null, '[(1,1),(2,2)]', null, '<(1,2),3>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '172.20.143.0/24', null),
('true', '1', '000000000011100', 'hello world', -128, 128, 32767, null, '123456789a', '123456789a', 'z', '4277-12-31 AD', '04:05:06', '2942-12-31 AD', null, POINT(100,200), '[(0,0),(6,6)]', '((100,200),(200,400))', '<(1,2),3>', null, '((1,1),(3,2),(4,5))', null, '172.20.143.0', '172.20.143.0/24', null),
('false', '1', '1111', null, -32768, -128, -128, 6.54, 'bbccddeeff', 'bbccddeeff', 'z', null, '00:00:00', '2004-10-19 10:23:54', '-178000000 years', POINT(100,200), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', null, 'FF:89:71:45:AE:01', '172.20.143.0', '192.168.1.255/32', '<name>wj</name>'),
('true', '1', '000000000011100', 'aaaaaaaaaaaaaaaaaaa', -32768, -2147483648, null, null, '123456789a', null, null, '4713-01-01 BC', '23:59:59', '2942-12-31 AD', '-178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', null, '<(100,200),300>', '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', null, '172.20.143.0/24', null),
('true', null, '1111', 'hello world', 0, null, 0, null, 'aaaa', 'aaaa', 'z', '2014-03-02', null, '2942-12-31 AD', null, POINT(100,200), '[(1,1),(2,2)]', null, '<(100,200),300>', null, null, null, '2001::7344', '192.168.1.255/32', '<name>wj</name>'),
(null, '1', '000000000011100', null, 0, 32767, -9223372036854775808, 6.54, 'bbccddeeff', 'aaaa', null, '2014-03-02', '23:59:59', null, null, POINT(1000,2000), null, '((100,200),(200,400))', '<(1,2),3>', '(1,1)', null, null, '192.168.1.255/24', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
(null, '0', '1111', 'aaaaaaaaaaaaaaaaaaa', null, 0, 9223372036854775807, 0.0001, 'aaaa', '123456789a', null, null, '04:05:06', '2942-12-31 AD', null, POINT(1000,2000), '[(1,1),(2,2)]', '((100,200),(200,400))', '<(100,200),300>', '(1,1)', null, 'FF:89:71:45:AE:01', '192.168.1.255/24', '172.20.143.0/24', null),
('true', '1', '000000000011100', null, -32768, -2147483648, -9223372036854775808, null, '123456789a', '123456789a', 'hello world', '2014-03-02', '23:59:59', null, '178000000 years', POINT(1,2), null, '((0,1),(2,3))', null, '(1,1)', '((1,1),(3,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<name>wj</name>'),
('true', null, '000000000011100', 'aaaaaaaaaaaaaaaaaaa', 32767, -128, 0, 0.0001, null, 'bbccddeeff', '', '4713-01-01 BC', '23:59:59', null, null, POINT(1,2), null, null, '<(1,2),3>', null, null, null, null, '172.20.143.0/24', null),
(null, null, '000000000011100', 'hello world', -32768, null, -2147483648, null, '123456789a', 'bbccddeeff', repeat('b',1000), '4277-12-31 AD', '04:05:06', '2942-12-31 AD', '-178000000 years', null, null, '((0,1),(2,3))', '<(1,2),3>', '(1,1)', '((1,1),(3,2),(4,5))', null, '172.20.143.0', '192.168.1.255/32', null),
('true', '0', '000000000011100', 'hello world', 32767, -32768, null, 6.54, '123456789a', '123456789a', 'hello world', '4713-01-01 BC', '23:59:59', '4713-01-01 BC', '-178000000 years', null, null, null, '<(100,200),300>', '(1,1)', '((100,123),(5,10),(7,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', null),
(null, null, '000000000011100', null, null, -2147483648, 2147483647, null, 'aaaa', 'bbccddeeff', '', '2014-03-02', null, '2942-12-31 AD', '-178000000 years', POINT(1,2), '[(1,1),(2,2)]', null, null, null, '((1,1),(3,2),(4,5))', null, '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', null, null),
('false', null, '000000000011100', 'hello world', -32768, 2147483647, 9223372036854775807, 6.54, '123456789a', 'bbccddeeff', null, null, null, '4713-01-01 BC', '-178000000 years', null, null, null, null, '(1,1),(2,3),(4,5)', '((1,1),(3,2),(4,5))', null, '192.168.1.255/24', null, '<aa>bb</aa>'),
(null, null, null, null, null, -128, 0, null, '123456789a', 'bbccddeeff', 'z', '4277-12-31 AD', null, '4713-01-01 BC', '-178000000 years', POINT(1000,2000), null, '((0,1),(2,3))', '<(1,2),3>', '(1,1),(2,3),(4,5)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', null, null),
(null, '1', '1111', 'aaaaaaaaaaaaaaaaaaa', -128, 128, 128, 0.0001, 'bbccddeeff', '123456789a', '', '4277-12-31 AD', null, '2004-10-19 10:23:54', '-178000000 years', POINT(1000,2000), '[(1,1),(2,2)]', null, null, '(1,1)', null, 'FF:89:71:45:AE:01', '192.168.1.255/24', '2001:db8:85a3:8d3:1319:8a2e:370:7344/128', '<aa>bb</aa>'),
(null, null, '1111', 'aaaaaaaaaaaaaaaaaaa', 32767, -128, 2147483647, 0.0001, '123456789a', null, 'hello world', null, '00:00:00', '2942-12-31 AD', '-178000000 years', POINT(1000,2000), null, '((0,1),(2,3))', null, '(1,1)', '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '172.20.143.0', null, null),
('false', '1', '000000000011100', null, -32768, 0, 0, null, 'bbccddeeff', '123456789a', 'hello world', '4713-01-01 BC', '00:00:00', null, '178000000 years', POINT(1,2), '[(0,0),(6,6)]', null, '<(1,2),3>', null, '((100,123),(5,10),(7,2),(4,5))', 'FF:89:71:45:AE:01', '2001:db8:85a3:8d3:1319:8a2e:370:7344/64', '192.168.1.255/32', '<name>wj</name>'); | 318.127451 | 428 | 0.572714 |
0b3f95c97639b3abd555db4e30fef992d56dda30 | 1,954 | py | Python | tests/test_res_grp_config.py | danos/vplane-config-npf | 2103ac7e19ee77eacff30a3d11cf487dfbefee26 | [
"BSD-3-Clause"
] | null | null | null | tests/test_res_grp_config.py | danos/vplane-config-npf | 2103ac7e19ee77eacff30a3d11cf487dfbefee26 | [
"BSD-3-Clause"
] | null | null | null | tests/test_res_grp_config.py | danos/vplane-config-npf | 2103ac7e19ee77eacff30a3d11cf487dfbefee26 | [
"BSD-3-Clause"
] | 2 | 2020-05-27T10:34:20.000Z | 2021-01-20T05:40:32.000Z | #!/usr/bin/env python3
# Copyright (c) 2019, AT&T Intellectual Property.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-only
#
"""
Unit-tests for the qos_config.py module.
"""
from vyatta.res_grp.res_grp_config import ResGrpConfig
TEST_DATA = {
'vyatta-resources-v1:resources': {
'vyatta-resources-group-misc-v1:group': {
'vyatta-resources-dscp-group-v1:dscp-group': [
{
'group-name': 'group-a',
'dscp': [
'0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', '10', '11', '12', '13', '14', '15'
]
}, {
'group-name': 'group-b',
'dscp': [
'16', '17', '18', '19', '20', '21', '22', '23',
'24', '25', '26', '27', '28', '29', '30', '31'
]
}, {
'group-name': 'group-c',
'dscp': [
'32', '33', '34', '35', '36', '37', '38', '39',
'40', '41', '42', '43', '44', '45', '46', '47'
]
}, {
'group-name': 'group-d',
'dscp': [
'48', '49', '50', '51', '52', '53', '54', '55',
'56', '57', '58', '59', '60', '61', '62', '63'
]
}
]
}
}
}
def test_rgconfig():
""" Simple unit-test for the ResGrpConfig class """
config = ResGrpConfig(TEST_DATA)
assert config is not None
assert len(config.dscp_groups) == 4
assert config.get_dscp_group("group-a") is not None
assert config.get_dscp_group("group-b") is not None
assert config.get_dscp_group("group-c") is not None
assert config.get_dscp_group("group-d") is not None
assert config.get_dscp_group("group-e") is None
| 32.566667 | 71 | 0.413511 |
4e08551dfd056694bf217aa16d2c8e3b2f28f066 | 433 | rs | Rust | rftrace-frontend/src/lib.rs | mkroening/rftrace | 484a8bda052dff94de1e6f9b88864d261a9618c8 | [
"Apache-2.0",
"MIT"
] | 18 | 2020-06-27T11:09:48.000Z | 2022-03-26T12:58:01.000Z | rftrace-frontend/src/lib.rs | mkroening/rftrace | 484a8bda052dff94de1e6f9b88864d261a9618c8 | [
"Apache-2.0",
"MIT"
] | 10 | 2020-05-12T12:47:39.000Z | 2021-12-19T22:52:13.000Z | rftrace-frontend/src/lib.rs | mkroening/rftrace | 484a8bda052dff94de1e6f9b88864d261a9618c8 | [
"Apache-2.0",
"MIT"
] | 2 | 2021-04-06T08:57:06.000Z | 2021-07-14T12:09:36.000Z | //! This crate provides a possible frontend for rftracer.
//! It can initialize an event buffer, enable/disable tracing and save the trace to disk in a uftrace compatible format.
//! A lot of documentation can be found in the parent workspaces [readme](https://github.com/tlambertz/rftrace).
#![feature(vec_into_raw_parts)]
extern crate byteorder;
mod frontend;
mod interface;
// Re-export frontend functions
pub use frontend::*;
| 33.307692 | 120 | 0.769053 |
7d5bebcc228305ea4fceb55b3e72bf17040aacff | 5,549 | html | HTML | confirmation.html | MT2314/Date-Night-Planner | 2fd4fcd607767e60ce86ba4712d4cb13b8314fd7 | [
"MIT"
] | 4 | 2020-11-19T03:39:12.000Z | 2021-02-05T03:31:34.000Z | confirmation.html | MT2314/Date-Night-Planner | 2fd4fcd607767e60ce86ba4712d4cb13b8314fd7 | [
"MIT"
] | 10 | 2020-11-18T02:51:02.000Z | 2020-11-20T03:06:40.000Z | confirmation.html | ivanduranic/date-night-planner | f78a866e5e08bec1d3c9cad6f7a2d09f3e51a04f | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Reset CSS-->
<link rel="stylesheet" type="text/css" href="assets/reset.css"/>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--CSS Materialize CDN-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!--Mapbox-->
<script src='https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.css' rel='stylesheet' />
<script src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-directions/v4.1.0/mapbox-gl-directions.js"></script>
<link
rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-directions/v4.1.0/mapbox-gl-directions.css"
type="text/css"
/>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="assets/confirmation.css">
<title>Date Night</title>
</head>
<body>
<!--Parallax Container Picture 1 -->
<div class="parallax-container">
<div class="parallax">
<img src="assets/pexels-brett-sayles-2516541.jpg">
</div>
</div>
<!--MAIN CONTENT-->
<div class="section z-depth-5">
<div class="row container">
<!--Some "slogan" here-->
<h2 class="header col 12">Here's your date-night intinerary!</h2>
<div class="row">
<div class="col s12">
<div class="card z-depth-3 #b71c1c red darken-4 white-text">
<div class="card-content white-text">
<h3 id = "movie">Movie:</h3>
<!--Divider to sepparate h3 tag-->
<div class="divider"></div>
<h5 id = "theater">Theatre:</h5>
<h6 id = "showTime">Show Time:</h6>
<br>
<h5>Map: </h5>
<div id='map'></div>
</div>
<div class="card-action">
<!-- <div class="row">
<div class="col">
<a href="#">This is a link</a>
<a href="#">This is a link</a>
</div>
</div> -->
<div class="row">
<form action="index.html">
<div class="col">
<button class="btn #ff9800 orange" type="submit" name="Start a new date night plan">Let's make a new date-night!
<i class="material-icons right">send</i>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- <ul class="collapsible">
USER'S THEATRE SELECTION CONFIRMATION
<li>
<div class="collapsible-header #b71c1c red darken-4 white-text"><i class="material-icons">explore</i>Theatre:</div>
<div class="collapsible-body">
</div>
</li>
<li>
<div class="collapsible-header #b71c1c red darken-4 white-text"><i class="material-icons">camera_roll</i>Movie:</div>
<div class="collapsible-body">
</div>
</li>
<li>
<div class="collapsible-header #b71c1c red darken-4 white-text"><i class="material-icons">access_time</i>Showtime:</div>
<div class="collapsible-body">
</div>
</li>
breaks needed to make sure the selector is enclosed by the collapsible body
<br>
</ul> -->
</div>
</div>
<!--Parallax Container Picture 2-->
<div class="parallax-container">
<div class="parallax">
<img src="assets/pexels-mentatdgt-1167192.jpg">
</div>
</div>
<!--Jquery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!--JS Materialize CDN-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<!--JS Mapbox-->
<script src='https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.js'></script>
<!--Scripts to get components of page working from Materialize-->
<script>
$(document).ready(function(){
$('.parallax').parallax();
;$('.collapsible').collapsible();
$('select').formSelect();
$(".dropdown-content.select-dropdown > li span").css("color", "#fb8c00");
$('.tooltipped').tooltip();
$('.materialboxed').materialbox();
});
</script>
<script src="assets/confirmation.js"></script>
<!-- <script src="assets/script.js"></script> -->
<script src="assets/confirmationMap.js"></script>
</body>
</html> | 43.015504 | 152 | 0.470535 |
185eb8523ef8553fed06ed154077be9f6028d203 | 3,023 | rb | Ruby | test/rspecs/lib/command_module/callbacks_rspec.rb | adammw/sfn | cc601844a4208613803f784759242e88ae6c3546 | [
"Apache-2.0"
] | 69 | 2015-05-04T17:40:43.000Z | 2021-03-26T00:42:09.000Z | test/rspecs/lib/command_module/callbacks_rspec.rb | adammw/sfn | cc601844a4208613803f784759242e88ae6c3546 | [
"Apache-2.0"
] | 209 | 2015-02-20T22:52:19.000Z | 2020-08-16T03:46:15.000Z | test/rspecs/lib/command_module/callbacks_rspec.rb | adammw/sfn | cc601844a4208613803f784759242e88ae6c3546 | [
"Apache-2.0"
] | 29 | 2015-04-13T16:25:58.000Z | 2021-06-20T11:52:20.000Z | require_relative "../../../rspecs"
RSpec.describe Sfn::CommandModule::Callbacks do
let(:ui) { double(:ui) }
let(:callbacks) { [] }
let(:config) { double(:config) }
let(:arguments) { double(:arguments) }
let(:provider) { double(:provider) }
let(:instance) { klass.new(config, ui, arguments, provider) }
let(:klass) {
Class.new {
include Sfn::CommandModule::Callbacks
attr_reader :config, :ui, :arguments, :provider
def initialize(c, u, a, p)
@config = c
@ui = u
@arguments = a
@provider = p
end
def self.name
"Sfn::Callback::Status"
end
}
}
before do
allow(Sfn::Callback).to receive(:const_get).and_return(klass)
allow(config).to receive(:fetch).with(:callbacks, any_args).and_return(callbacks)
allow(ui).to receive(:debug)
allow(ui).to receive(:info)
allow(config).to receive(:[])
allow(ui).to receive(:color)
end
describe "#api_action!" do
before { allow(instance).to receive(:run_callbacks_for) }
it "should run specific and general before and after callbacks" do
expect(instance).to receive(:run_callbacks_for).with(["before_status", :before], any_args)
expect(instance).to receive(:run_callbacks_for).with(["after_status", :after], any_args)
instance.api_action!
end
it "should run failed callbacks on error" do
expect(instance).to receive(:run_callbacks_for).with(["before_status", :before], any_args)
expect(instance).to receive(:run_callbacks_for).with(["failed_status", :failed], any_args)
expect { instance.api_action! { raise "error" } }.to raise_error(RuntimeError)
end
it "should provide exception to callbacks on error" do
expect(instance).to receive(:run_callbacks_for).with(["failed_status", :failed], instance_of(RuntimeError))
expect { instance.api_action! { raise "error" } }.to raise_error(RuntimeError)
end
end
describe "#run_callbacks_for" do
let(:callbacks) { ["status"] }
it "should run the callback" do
expect_any_instance_of(klass).to receive(:before)
instance.run_callbacks_for(:before)
end
end
describe "#callbacks_for" do
it "should load callbacks defined within configuration" do
expect(config).to receive(:fetch).with(:callbacks, :before, []).and_return([])
expect(config).to receive(:fetch).with(:callbacks, :default, []).and_return([])
expect(instance.callbacks_for(:before)).to eq([])
end
context "callback name configured" do
let(:callbacks) { ["status"] }
it "should lookup callbacks within namespace" do
expect(Sfn::Callback).to receive(:const_get).with("Status").and_return(klass)
expect(instance.callbacks_for(:before)).to be_a(Array)
end
it "should raise error when class not found" do
expect(Sfn::Callback).to receive(:const_get).and_call_original
expect { instance.callbacks_for(:before) }.to raise_error(NameError)
end
end
end
end
| 33.966292 | 113 | 0.665564 |
0c98a8571671f7ec771a67037041f3b8e9ba1d24 | 274 | py | Python | tests/test_tradera.py | paeronskruven/lw | a2e4b6363656812a0857a8b2cf69be3e710afe94 | [
"MIT"
] | null | null | null | tests/test_tradera.py | paeronskruven/lw | a2e4b6363656812a0857a8b2cf69be3e710afe94 | [
"MIT"
] | null | null | null | tests/test_tradera.py | paeronskruven/lw | a2e4b6363656812a0857a8b2cf69be3e710afe94 | [
"MIT"
] | null | null | null | import lw.sources.tradera
def test_valid_query():
results = lw.sources.tradera.TraderaSource().query('a')
assert len(list(results)) > 0
def test_invalid_query():
results = lw.sources.tradera.TraderaSource().query('abc123')
assert len(list(results)) == 0
| 22.833333 | 64 | 0.70438 |
774f27659c8aa8ab6066ef7df04d00124b975a93 | 2,210 | rs | Rust | aquatic_http_load_test/src/utils.rs | greatest-ape/aquatic | 614dea755b5703018ccf42c1c28c7cc5de22305e | [
"Apache-2.0"
] | 220 | 2020-04-20T15:10:30.000Z | 2022-03-28T04:51:53.000Z | aquatic_http_load_test/src/utils.rs | greatest-ape/aquatic | 614dea755b5703018ccf42c1c28c7cc5de22305e | [
"Apache-2.0"
] | 5 | 2020-05-04T02:41:01.000Z | 2022-03-31T19:03:40.000Z | aquatic_http_load_test/src/utils.rs | greatest-ape/aquatic | 614dea755b5703018ccf42c1c28c7cc5de22305e | [
"Apache-2.0"
] | 4 | 2021-08-13T12:00:48.000Z | 2022-02-02T01:41:46.000Z | use std::sync::Arc;
use rand::distributions::WeightedIndex;
use rand::prelude::*;
use rand_distr::Pareto;
use crate::common::*;
use crate::config::*;
pub fn create_random_request(
config: &Config,
state: &LoadTestState,
rng: &mut impl Rng,
) -> Request {
let weights = [
config.torrents.weight_announce as u32,
config.torrents.weight_scrape as u32,
];
let items = [RequestType::Announce, RequestType::Scrape];
let dist = WeightedIndex::new(&weights).expect("random request weighted index");
match items[dist.sample(rng)] {
RequestType::Announce => create_announce_request(config, state, rng),
RequestType::Scrape => create_scrape_request(config, state, rng),
}
}
#[inline]
fn create_announce_request(config: &Config, state: &LoadTestState, rng: &mut impl Rng) -> Request {
let (event, bytes_left) = {
if rng.gen_bool(config.torrents.peer_seeder_probability) {
(AnnounceEvent::Completed, 0)
} else {
(AnnounceEvent::Started, 50)
}
};
let info_hash_index = select_info_hash_index(config, &state, rng);
Request::Announce(AnnounceRequest {
info_hash: state.info_hashes[info_hash_index],
peer_id: PeerId(rng.gen()),
bytes_left,
event,
key: None,
numwant: None,
compact: true,
port: rng.gen(),
})
}
#[inline]
fn create_scrape_request(config: &Config, state: &LoadTestState, rng: &mut impl Rng) -> Request {
let mut scrape_hashes = Vec::with_capacity(5);
for _ in 0..5 {
let info_hash_index = select_info_hash_index(config, &state, rng);
scrape_hashes.push(state.info_hashes[info_hash_index]);
}
Request::Scrape(ScrapeRequest {
info_hashes: scrape_hashes,
})
}
#[inline]
fn select_info_hash_index(config: &Config, state: &LoadTestState, rng: &mut impl Rng) -> usize {
pareto_usize(rng, &state.pareto, config.torrents.number_of_torrents - 1)
}
#[inline]
fn pareto_usize(rng: &mut impl Rng, pareto: &Arc<Pareto<f64>>, max: usize) -> usize {
let p: f64 = pareto.sample(rng);
let p = (p.min(101.0f64) - 1.0) / 100.0;
(p * max as f64) as usize
}
| 27.283951 | 99 | 0.645249 |
9ae98eb6967bbf24a2a9da4d1f839b542cc2d3bd | 43 | css | CSS | test/cycles/src/dependency.css | Munter/netlify-plugin-hashfiles | e3f0a5ccc908edef812c471cbe5b62a548f5b38b | [
"BSD-3-Clause"
] | 28 | 2019-10-21T13:24:09.000Z | 2022-03-18T01:35:08.000Z | test/cycles/src/dependency.css | Munter/netlify-plugin-hashfiles | e3f0a5ccc908edef812c471cbe5b62a548f5b38b | [
"BSD-3-Clause"
] | 45 | 2019-11-06T16:07:42.000Z | 2022-03-12T20:58:38.000Z | test/cycles/src/dependency.css | Munter/netlify-plugin-hashfiles | e3f0a5ccc908edef812c471cbe5b62a548f5b38b | [
"BSD-3-Clause"
] | 6 | 2019-12-06T23:26:12.000Z | 2020-09-11T11:51:31.000Z | @import 'main.css';
h1 {
color: blue;
}
| 7.166667 | 19 | 0.55814 |
32eb95e74eb0b1dea5ef539e7922bce0fca4bdf6 | 1,186 | asm | Assembly | testdata/unit/add_sub_cvzn_flag_test.asm | tehmaze/mos65xx | 60dbe6b949efcf197106eeae4382e084493a27b0 | [
"MIT"
] | 3 | 2019-10-24T09:41:14.000Z | 2021-12-12T08:11:52.000Z | testdata/unit/add_sub_cvzn_flag_test.asm | tehmaze/mos65xx | 60dbe6b949efcf197106eeae4382e084493a27b0 | [
"MIT"
] | null | null | null | testdata/unit/add_sub_cvzn_flag_test.asm | tehmaze/mos65xx | 60dbe6b949efcf197106eeae4382e084493a27b0 | [
"MIT"
] | 1 | 2020-11-11T17:11:54.000Z | 2020-11-11T17:11:54.000Z |
; Tests CV flags as described in http://www.6502.org/tutorials/vflag.html
; Also tests CLC/SEC/PHP and the NZ flags
; Note that 6502js does not set the I flag by default, so stack will differ
; without an additional SEI
CLC ; 1 + 1 = 2, returns C = 0
LDA #$01
ADC #$01
PHP ; 0x34 = --I-B1--
CLC ; 1 + -1 = 0, returns C = 1
LDA #$01
ADC #$FF
PHP ; 0x37 = CZI-B1--
CLC ; 127 + 1 = 128, returns C = 0
LDA #$7F
ADC #$01
PHP ; 0xF4 = --I-B1VN
CLC ; -128 + -1 = -129, returns C = 1
LDA #$80
ADC #$FF
PHP ; 0x75 = C-I-B1V-
CLC ; 1 + 1 = 2, returns V = 0
LDA #$01
ADC #$01
PHP ; 0x34 = --I-B1--
CLC ; 1 + -1 = 0, returns V = 0
LDA #$01
ADC #$FF
PHP ; 0x37 = CZI-B1--
CLC ; 127 + 1 = 128, returns V = 1
LDA #$7F
ADC #$01
PHP ; 0xF4 = --I-B1VN
CLC ; -128 + -1 = -129, returns V = 1
LDA #$80
ADC #$FF
PHP ; 0x75 = C-I-B1V-
SEC ; 0 - 1 = -1, returns V = 0
LDA #$00
SBC #$01
PHP ; 0xB4 = --I-B1-N
SEC ; -128 - 1 = -129, returns V = 1
LDA #$80
SBC #$01
PHP ; 0x75 = C-I-B1V-
SEC ; 127 - -1 = 128, returns V = 1
LDA #$7F
SBC #$FF
PHP ; 0xF4 = --I-B1VN
SEC ; 0 - 128 = 128, returns V = 1
LDA #$00
SBC #$80
PHP ; 0xF4 = --I-B1VN
| 17.701493 | 75 | 0.535413 |
ca90e039de77e3e2ea5c4df7b06036819efcd356 | 2,531 | swift | Swift | ios/app/occupyhdm/occupyhdm/SettingsTableViewController.swift | pguth/OccupyHdM | 7cf5381598d39d02cceedc6aebc7cf8b9dad5952 | [
"MIT"
] | null | null | null | ios/app/occupyhdm/occupyhdm/SettingsTableViewController.swift | pguth/OccupyHdM | 7cf5381598d39d02cceedc6aebc7cf8b9dad5952 | [
"MIT"
] | null | null | null | ios/app/occupyhdm/occupyhdm/SettingsTableViewController.swift | pguth/OccupyHdM | 7cf5381598d39d02cceedc6aebc7cf8b9dad5952 | [
"MIT"
] | null | null | null | import UIKit
class SettingsTableViewController: UITableViewController {
@IBOutlet weak var labelAccuracy: UILabel!
@IBOutlet weak var sliderAccuracy: UISlider!
@IBOutlet weak var labelDistance: UILabel!
@IBOutlet weak var sliderDistance: UISlider!
@IBOutlet weak var labelRefreshRate: UILabel!
@IBOutlet weak var sliderRefreshRate: UISlider!
@IBAction func Logout(sender: AnyObject) {
NSUserDefaults.standardUserDefaults().setObject("", forKey: "username")
NSUserDefaults.standardUserDefaults().setInteger(0, forKey: "score")
}
override func viewDidLoad() {
super.viewDidLoad()
let accuracy = Float(NSUserDefaults.standardUserDefaults().integerForKey("accuracy"))
sliderAccuracy.value = accuracy
labelAccuracy.text = String(Int(accuracy))
let distance = Float(NSUserDefaults.standardUserDefaults().integerForKey("distance"))
sliderDistance.value = distance
labelDistance.text = String(Int(distance))
let refreshRate = NSUserDefaults.standardUserDefaults().integerForKey("refreshRate")
sliderRefreshRate.value = Float(refreshRate)
labelRefreshRate.text = String(refreshRate)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return 5
}
@IBAction func accuracyChanged(sender: UISlider) {
let accuracy = Int(sender.value)
self.labelAccuracy.text = String(accuracy)
NSUserDefaults.standardUserDefaults().setInteger(accuracy, forKey: "accuracy")
}
@IBAction func distanceChanged(sender: UISlider) {
let distance = Int(sender.value)
self.labelDistance.text = String(distance)
NSUserDefaults.standardUserDefaults().setInteger(distance, forKey: "distance")
}
@IBAction func refreshRateChanged(sender: UISlider) {
let refreshRate = Int(sender.value)
self.labelRefreshRate.text = String(refreshRate)
NSUserDefaults.standardUserDefaults().setInteger(refreshRate, forKey: "refreshRate")
}
}
| 35.152778 | 96 | 0.705255 |
d85c8330f2cd5e25c4ca2f6bd475872252aba179 | 778 | kt | Kotlin | Parent/app/src/main/kotlin/com/github/midros/istheapp/data/rxFirebase/RxFirebaseStorage.kt | Michyus/IsTheApp | faab27dae4fbf7cb6b341fdd94f670ecb2308742 | [
"Apache-2.0"
] | 7 | 2020-01-28T14:36:55.000Z | 2021-02-28T23:06:03.000Z | Parent/app/src/main/kotlin/com/github/midros/istheapp/data/rxFirebase/RxFirebaseStorage.kt | Michyus/IsTheApp | faab27dae4fbf7cb6b341fdd94f670ecb2308742 | [
"Apache-2.0"
] | 2 | 2021-04-14T23:25:00.000Z | 2022-03-09T11:54:48.000Z | Parent/app/src/main/kotlin/com/github/midros/istheapp/data/rxFirebase/RxFirebaseStorage.kt | mfa237/Open-source-android-spyware | faab27dae4fbf7cb6b341fdd94f670ecb2308742 | [
"Apache-2.0"
] | 8 | 2018-12-14T18:02:36.000Z | 2021-04-24T15:25:40.000Z | package com.github.midros.istheapp.data.rxFirebase
import com.google.firebase.storage.FileDownloadTask
import com.google.firebase.storage.StorageReference
import io.reactivex.Single
import java.io.File
/**
* Created by luis rafael on 28/03/18.
*/
object RxFirebaseStorage {
fun StorageReference.rxGetFile(destinationFile: File): Single<FileDownloadTask.TaskSnapshot> {
return Single.create { emitter ->
val taskSnapshotStorageTask = getFile(destinationFile)
.addOnSuccessListener { taskSnapshot -> emitter.onSuccess(taskSnapshot) }
.addOnFailureListener { error -> if (!emitter.isDisposed) { emitter.onError(error) } }
emitter.setCancellable { taskSnapshotStorageTask.cancel() }
}
}
} | 35.363636 | 106 | 0.709512 |
6040f03e5ce6b91e1e50b2747d7cf5ea389cc6ff | 43,455 | html | HTML | index.html | united-earth/landingpage | a8c3e875ee9f44511849e09d988f57aeaf98e232 | [
"Apache-2.0"
] | null | null | null | index.html | united-earth/landingpage | a8c3e875ee9f44511849e09d988f57aeaf98e232 | [
"Apache-2.0"
] | null | null | null | index.html | united-earth/landingpage | a8c3e875ee9f44511849e09d988f57aeaf98e232 | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>United Earth</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/stylish-portfolio.css" rel="stylesheet">
<link href="css/united-earth.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/united-earth.js" type="text/javascript"></script>
<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12/video.js"></script>
</head>
<body>
<video autoplay loop poster="img/bg.jpg" id="bgvid" onclick="document.getElementById('bgvid').play()">
<source src="bg.mp4" type="video/mp4">
</video>
<!-- Navigation -->
<a id="menu-toggle" href="#" class="btn btn-dark btn-lg toggle"><i class="fa fa-bars"></i></a>
<nav id="sidebar-wrapper">
<ul class="sidebar-nav">
<a id="menu-close" href="#" class="btn btn-light btn-lg pull-right toggle"><i class="fa fa-times"></i></a>
<li class="sidebar-brand">
<a href="#top" onclick = $("#menu-close").click(); >United Earth</a>
</li>
<li>
<a href="#top" onclick = $("#menu-close").click(); >Home</a>
</li>
<li>
<a href="#about" onclick = $("#menu-close").click(); >Introduction</a>
</li>
<li>
<a href="#survey" onclick = $("#menu-close").click(); >Survey</a>
</li>
<li>
<a target="_blank" href="http://forum.united-earth.vision" onclick = $("#menu-close").click(); >Forum</a>
</li>
<li>
<a target="_blank" href="http://wiki.united-earth.vision" onclick = $("#menu-close").click(); >Wiki</a>
</li>
</ul>
</nav>
<!-- Header -->
<a target="_blank" href="http://eepurl.com/bufG2X" class="newsletter-fixed btn btn-light btn-lg"><i class="fa fa-envelope-o fa-fw"></i>Subscribe to the newsletter</a>
<div class="box">
<header id="top" class="header content">
<div class="text-vertical-center">
<img src="img/logo3.png"></img>
<p></p>
<a href="#quote" class="btn arrow-down">
<i class="fa fa-angle-double-down animated"></i>
</a>
</div>
</header>
</div>
<!-- About -->
<section id="quote" class="about">
<div class="background">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2><i>There will come a day...</i></h2>
<p class="lead"><i>...when people of all races, colors, and creeds will put aside their differences.
<br>They will come together in love, joining hands in unification, to heal the Earth and all Her children.</i></p>
<p>– From the Navajo-Hopi Prophecy of <i>The Whirling Rainbow</i></p>
</div>
</div>
<!-- /.row -->
</div>
</div>
<!-- /.container -->
</section>
<!-- Services -->
<!-- The circle icons use Font Awesome's stacked icon classes. For more information, visit http://fontawesome.io/examples/ -->
<section id="about" class="services bg-primary">
<div class="container">
<div class="row text-center">
<div class="col-lg-10 col-lg-offset-1">
<h2>Why a United Earth?</h2>
<video id="intro-video" controls preload="none" data-setup="{}" poster="img/intro-poster.jpg"
class="video-js vjs-default-skin" width="auto" height="500px">
<source src="intro.mp4" type="video/mp4">
</video>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8LXM9N4QD3J7G">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
</form>
<script src="http://coinwidget.com/widget/coin.js"></script>
<script>
CoinWidgetCom.go({
wallet_address: "135EyynJZvJFTHGwGUK9Ec3NCFBcUiGDgV"
, currency: "bitcoin"
, counter: "hide"
, alignment: "bl"
, qrcode: true
, auto_show: false
, lbl_button: "Donate"
, lbl_address: "United Earth's address"
, lbl_count: "donations"
, lbl_amount: "BTC"
});
</script>
<script>
CoinWidgetCom.go({
wallet_address: "135EyynJZvJFTHGwGUK9Ec3NCFBcUiGDgV"
, currency: "litecoin"
, counter: "hide"
, alignment: "bl"
, qrcode: true
, auto_show: false
, lbl_button: "Donate"
, lbl_address: "United Earth's address"
, lbl_count: "donations"
, lbl_amount: "LTC"
});
</script>
<h3>Translations</h3>
<div class="btn-group">
<button id="en-button" class="btn btn-primary">
EN
</button>
<button id="fr-button" class="btn btn-primary">
FR
</button>
<button id="es-button" class="btn btn-primary">
ES
</button>
<button id="pt-button" class="btn btn-primary">
PT
</button>
<button id="de-button" class="btn btn-primary">
DE
</button>
</div>
<div class="introduction collapse" id="en">
<p>The welfare of all Life on Earth hangs in the balance. And this is not just about the climate. Humanity is now at the crux of an evolutionary cross-roads where, as a species, we need to make a collective choice: We can either continue on this same path of competition, inequality and exploitation or we can take an entirely new direction towards cooperation, sharing and restoration. The first merely requires us to continue placing our trust in our political leaders and to keep doing what we are already doing- even by "being the change". The latter requires an unprecedented approach. To fundamentally alter the course of human society as a whole will require nothing less than intelligent, humble and innovative collaboration on a global scale.</p>
<p>Today there are hundreds of millions of people and hundreds of thousands of groups around the world working to create a brighter future for all Life. We are in the midst of what has been called The Great Turning or The Great Transition. Most people and all the groups pioneering and guiding this Transition are connected to the Internet, thus there exists a clear, yet latent potential for us to all work together for a common cause and vision. </p>
<p><i>But how to achieve global cooperation without a completely open, public and inclusive platform through which to unite in our collective intention?</i></p>
<p>A United Earth is a planetary initiative that has emerged through an online convergence of change-makers, concerned citizens and international organisations with this same intention: To create a global, commons-based and neutral platform through which we, as individuals and groups, can all unite as free equals to serve a whole-systems transformation towards a human society that is rooted in freedom, harmony, equality, honesty, sharing, cooperation, ecological restoration and reverence for all Life.</p>
<p>We are open and committed to using all available tools, networks and technologies to effectively guide, support and promote our intentional global collaboration. The recent online net neutrality campaigns show the success humanity is capable of when many organisations concentrate together on accomplishing a common purpose.</p>
<p>Here and now we are inviting each other, all existing movements and groups, to join hands to create the greatest and most inclusive unification possible for humanity. We are dedicated to cooperating in equal partnership, pooling our collective intelligence to share our ideas and experiential knowledge about global and local transition strategies. Without needing to sacrifice or compromise our individual, organisational, religious or ethnic identity or autonomy, we add our support and creativity to an over-lighting, leaderless framework that upholds and facilitates our common values and aspirations into manifestation.</p>
<p>By uniting we are coming to recognise that between our wealth of indigenous wisdom, social innovations, ecological solutions and alternative political & economic models; we already have the knowledge, the skills, the tools, the technology, the resources, the mentors and the living examples to create a more beautiful and abundant world for everyone. Furthermore, it is through our committed and unified action of working together for our common purpose that we can effectively attract the attention of our entire Human Family to share this vital and uplifting news.</p>
<p>Yes, it is time to dream BIG- perhaps the biggest dream ever to enter our collective consciousness. Surely it is emerging now because we have reached a critical mass of women, men and children of goodwill and understanding, who share this timely vision of planetary unity and cooperation for a conscious cultural transformation.</p>
<p>Ultimately, the manifestation of this vision is simply a matter of collectively choosing it- which, in turn, depends on our willingness and our capacity to cooperate. Thus, the challenge of our time is essentially one of spiritual and emotional maturity- for us to rise above our prejudices and ideologies, to fully embrace our diversity, and to realise the greatest potential of our unified collaboration.</p>
<p>Be welcome. We are one Human Family.</p>
</div>
<div class="introduction collapse" id="fr">
<p>Le devenir de chaque Vie sur Terre est en jeu. Et cela ne concerne pas seulement le climat. L’humanité est maintenant à un tournant où, en tant qu’espèce, elle doit faire un choix collectif : nous pouvons soit continuer sur cette même voie de compétition, dégradation et d’approche quantitative de la vie ou nous pouvons prendre une direction entièrement nouvelle vers la coopération, la guérison et une approche qualitative de la vie. La première direction nous demande tout simplement de continuer à faire ce que nous faisons déjà – même en tant que créateurs de culture. La dernière demande une approche sans précédent ; transformer fondamentalement le cours de la société humaine dans son ensemble demandera rien de moins qu’intelligence, humilité, collaboration innovante sur une échelle planétaire.</p>
<p>Il y a aujourd’hui des centaines de millions de personnes et des centaines de milliers de groupes autour du monde qui travaillent pour créer un avenir brillant pour toute Vie. Nous sommes au milieu de La Grande Transition. La plupart des gens et tous les groupes qui mènent et gouvernent cette Transition sont connectés à Internet. Il existe donc un potentiel clair et encore latent pour nous de travailler ensemble pour une cause et une vision commune.</p>
<p><i>Mais comment achever une coopération mondiale sans une plateforme complètement ouverte, publique et inclusive qui nous permettrait de nous unir dans notre intention collective ?</i></p>
<p>Une Terre Unie est une initiative planétaire qui a émergé d’une convergence en ligne entre des acteurs du changement ; s’y retrouvent des citoyens et des organisations avec la même intention : créer une plateforme mondiale, où nous, individus et groupes, pourrons tous nous unir, librement égaux, pour servir une transformation de l’ensemble du système en une société humaine qui soit fondée sur la liberté, l’égalité, l’honnêteté, le partage, la coopération, la restauration écologique et la vénération pour toute Vie.</p>
<p>Nous sommes ouverts et engagés à utiliser tous les outils, les réseaux et les technologies à disposition pour effectivement mener, supporter et promouvoir notre volonté de collaboration mondiale. La récente campagne en ligne de neutralité du Net montre de quel succès l’humanité est capable quand plusieurs organisations se concentrent ensemble pour accomplir un but commun.</p>
<p>Ici et maintenant, nous invitons tout le monde, tous les mouvements et les groupes existants à nous donner la main pour créer l’unification la plus grande et la plus inclusive possible de toute l’humanité. Nous avons à cœur de coopérer sur un pied d’égalité, de mettre en commun notre intelligence collective pour partager nos idées et notre expérience sur les stratégies à suivre pour la transition mondiale. Sans avoir besoin de sacrifier ou de compromettre notre identité ou notre liberté individuelle, communautaire, religieuse ou ethnique, nous ajoutons notre soutien et notre créativité à un cadre éclairé et sans leader, cadre qui soutient et facilite la manifestation de nos valeurs et aspirations communes.</p>
<p>En nous unifiant nous sommes amenés à reconnaître qu’au travers de la richesse de notre sagesse indigène, de nos innovations sociales, de nos solutions écologiques et de nos modèles alternatifs économiques et politiques, nous avons déjà le savoir, les techniques, les outils, la technologie, les ressources, les guides et les exemples vivants pour créer un monde bien plus merveilleux pour tout le monde. Bien plus, c’est par notre action engagée et unifiée de travailler ensemble pour un but commun que nous pouvons attirer effectivement l’attention de toute notre Famille Humaine pour partager cette information vitale et inspirante.</p>
<p>Oui, il est temps de penser GRAND- peut-être le plus grand rêve jamais fait pour entrer dans notre conscience collective. Assurément ce rêve émerge maintenant parce que nous avons atteint une masse critique de femmes, d’hommes et d’enfants de bonne volonté, qui partagent cette vision actuelle précise d’une unité et d’une coopération planétaire pour une transformation de notre conscience culturelle.</p>
<p>Fondamentalement, la manifestation de cette vision est simplement une question de choisir de le faire collectivement- ce qui, au passage, dépend de notre bienveillance et de notre capacité à coopérer. Ainsi, le défi de notre temps est essentiellement d’une nature spirituelle ou émotionnelle- il s’agit de dépasser nos préjugés et nos idéologies, d’embrasser pleinement notre diversité et de réaliser le très grand potentiel d’une collaboration unifiée.</p>
<p>Bienvenue. Nous sommes une Famille Humaine.</p>
</div>
<div class="introduction collapse" id="es">
<p>El bienestar de toda Vida en la Tierra está en peligro. La humanidad se encuentra ahora en una encrucijada evolutiva donde, como especie, tenemos que hacer una elección colectiva: podemos seguir en este mismo camino de la competencia, la degradación y el pensamiento cuantitativo o podemos tomar una dirección completamente nueva hacia la cooperación, la curación y el pensamiento cualitativo. El primero simplemente nos exige seguir haciendo lo que ya estamos haciendo - incluso como "creativos culturales". Esto último requiere un enfoque sin precedentes. Para alterar fundamentalmente el curso de la sociedad humana en su conjunto requerirá nada menos que una colaboración inteligente, humilde e innovadora a escala global.</p>
<p>Hoy en día hay cientos de millones de personas y cientos de miles de grupos alrededor del mundo que trabajan para crear un futuro mejor para toda la Vida. Estamos en medio de lo que se ha llamado el Gran Viraje o la Gran Transición. La mayoría de las personas y todos los grupos que lideran y guían esta transición, están conectados a la Red Mundial, por lo que existe un claro potencial, aún latente, para que trabajemos juntos por una causa y una visión común.</p>
<p><i>Pero, ¿Cómo conseguir la cooperación mundial sin una plataforma completamente abierta, pública e inclusiva a través de la cual nos unamos en nuestra intención colectiva?</i></p>
<p>Una Tierra Unida es una iniciativa planetaria que ha surgido a través de una convergencia on-line de los agentes de cambio (o hacedores del cambio), ciudadanos preocupados y organizaciones internacionales con esta misma intención: crear una plataforma global a través de la cual nosotros, como individuos y grupos, podemos todos unirnos como libres e iguales, para servir a una transformación a nivel del sistema entero, hacia una sociedad humana basada en la libertad, la armonía, la igualdad, la honestidad, el compartir, la cooperación, la restauración ecológica y la reverencia por toda la Vida.</p>
<p>Estamos abiertos a y comprometidos en usar todas las herramientas, redes y tecnologías disponibles para orientar, apoyar y promover de manera efectiva nuestra colaboración intencionada global. Las recientes campañas para la neutralidad de la red, muestran el éxito que la humanidad es capaz de conseguir cuando muchas organizaciones se concentran juntas en el logro de un objetivo común.</p>
<p>Aquí y ahora estamos invitándonos entre si, a los demás, a todos los movimientos y grupos existentes, a juntar las manos para crear la mayor y más inclusiva unificación posible de la humanidad. Estamos comprometidos a cooperar en pie de igualdad, poniendo en común la inteligencia colectiva, para compartir nuestras ideas y nuestro conocimiento basado en la experiencia, acerca de las estrategias globales y locales de transición. Sin necesidad de sacrificar o transigir nuestra identidad o autonomía individual, bien sea institucional, religiosa o étnica, añadimos nuestro apoyo y creatividad a un esquema esclarecedor, sin líderes, que defienda y facilite nuestros valores y aspiraciones comunes a la manifestación.</p>
<p>Al unirnos estamos llegando a reconocer que con nuestra riqueza de lasabiduría indígena, las innovaciones sociales, las soluciones ecológicas y los modelos políticos y económicos alternativos, ya tenemos el conocimiento, las habilidades, las herramientas, la tecnología, los recursos, los mentores y los ejemplos vivientes para crear un mundo más hermoso para todos. Además, es a través de nuestra acción comprometida y unificada de trabajar juntos para nuestro propósito común, que podemos atraer eficazmente la atención de toda nuestra Familia Humana para compartir esta noticia vital y edificante.</p>
<p>Sí, es tiempo de soñar en GRANDE, tal vez el sueño más grande que nunca entró en nuestra conciencia colectiva. Seguramente está surgiendo ahora porque hemos alcanzado una masa crítica de mujeres, hombres y niños de buena voluntad y comprensión, que comparten esta visión oportuna de la unidad y la cooperación planetaria para una transformación cultural consciente.</p>
<p>En última instancia, la manifestación de esta visión es simplemente una cuestión de elegirla colectivamente, que a su vez, depende de nuestra voluntad y nuestra capacidad de cooperar. Por lo tanto, el reto de nuestra época es esencialmente uno de madurez espiritual y emocional- de superar nuestros prejuicios e ideologías, de abrazar plenamente nuestra diversidad, y de realizar el mayor potencial de nuestra colaboración unificada.</p>
<p>Sed bienvenidos. Somos Una Familia Humana.</p>
</div>
<div class="introduction collapse" id="pt">
<p>O destino de toda a Vida do Planeta Terra está suspenso num equilíbrio precário. E não se deve apenas às alterações climáticas. A Humanidade encontra-se no ponto crucial de uma encruzilhada evolutiva onde, enquanto espécie, necessita fazer uma escolha colectiva: continuar neste mesmo caminho que assenta na competição, na desigualdade, na exploração e numa abordagem quantitativa da vida, ou, em alternativa, escolher uma direção totalmente nova no sentido da cooperação, da partilha, do cuidar e de uma abordagem qualitativa da vida. A primeira opção apenas requer que continuemos a depositar a nossa confiança nos líderes políticos e que simplesmente continuemos a fazer aquilo que já fazemos, mesmo quando achamos que já somos diferentes, que já pertencemos à mudança. A segunda opção requer uma abordagem pioneira e sem precedentes. Alterar, no fundamental, o rumo da sociedade como um todo, requer não menos que colaboração inteligente, humilde e inovadora à escala global.</p>
<p>Existem hoje no planeta centenas de milhões de pessoas e centenas de milhares de grupos empenhados em criar um futuro mais próspero para todas as formas de vida. Encontramo-nos no que tem sido designado como ‘A Grande Mudança’ ou ‘A Grande Transição’. A generalidade das pessoas e grupos que lideram e guiam este movimento de transição estão ligadas à Internet, pelo que há um claro, porém latente, potencial para que trabalhemos juntos por uma causa e visão comum. </p>
<p><i>Mas como podemos alcançar um nível de cooperação à escala global sem acesso a uma plataforma completamente aberta, pública e inclusiva que nos permita unirmo-nos na nossa intenção coletiva?</i></p>
<p>Uma Terra Unido é uma iniciativa planetária que emergiu de uma convergência online de empreendedores sociais e ambientais, cidadãos conscientes e preocupados e organizações internacionais que partilham o mesmo propósito: criar uma plataforma global, comum e neutra, através da qual indivíduos e grupos se possam unir livremente e em igualdade para participar na transformação global que nos conduzirá a uma sociedade humana fundada nos princípios da liberdade, harmonia, equidade, honestidade, partilha, cooperação, restauração ecológica e reverência por todas as formas de vida.</p>
<p>Estamos disponíveis e empenhados em recorrer a todas as ferramentas, redes e tecnologias existentes que efetivamente guiem, suportem e promovam este objectivo de alcançar um nível de cooperação à escala global. As recentes campanhas promovidas online pela neutralidade da Internet são um exemplo dos sucessos que a humanidade consegue alcançar quando um conjunto expressivo de organizações se juntam para realizar um propósito comum.</p>
<p>Aqui e agora, dirigimos um convite a todos os indivíduos, movimentos e grupos, para darmos as mãos na criação da maior e mais inclusiva unificação possível em toda a humanidade. Pretendemos cooperar em pé de igualdade e explorar a nossa inteligência coletiva para compartilhar ideias e conhecimento experimental sobre estratégias de transição aos níveis global e local. Sem necessidade de sacrificar ou comprometer a nossa liberdade individual, comunitária, religiosa ou identidade étnica, dêmos o nosso apoio e criatividade a uma estrutura esclarecida, transparente e sem líder que apoie e facilite a manifestação de nossos valores e aspirações comuns. </p>
<p>Unidos compreenderemos que, entre a riqueza da sabedoria ancestral e indígena, as inovações sociais, as soluções ambientais e os modelos económicos e políticos alternativos, já reunimos o conhecimento, as técnicas, as ferramentas, a tecnologia, os recursos, os mentores e os exemplos de vida que nos permitem criar um mundo mais aprazível e abundante para todos nós. Mais, será através da nossa acção, comprometida e unificada, de trabalho conjunto em prol de um objetivo comum que realmente poderemos chamar à atenção de toda nossa família humana para compartilhar esta informação vital e inspiradora.</p>
<p>Sim, é tempo de sonhar em GRANDE, talvez o maior sonho que alguma vez entrou na nossa consciência coletiva. É um sonho que emerge agora porque alcançamos uma massa crítica de mulheres, homens e crianças com boa vontade e compreensão que partilham esta visão premente de unidade e cooperação planetária para uma transformação da nossa consciência cultural.</p>
<p>Em última instância, a manifestação desta visão é simplesmente uma questão de fazermos esta escolha coletivamente, o que, por sua vez, depende da nossa vontade e capacidade de cooperamos. Os desafios do nosso tempo são essencialmente de natureza espiritual e emocional: ultrapassamos os nossos preconceitos e ideologias, abraçar plenamente a nossa diversidade e compreendemos o enorme potencial da colaboração unida.</p>
<p>Sê bem-vindo. Nós somos uma família humana.</p>
</div>
<div class="introduction panel-collapse collapse" id="de">
<p>Warum eine Vereinte Erde (United Earth)?</p>
<p>Das Wohl allen Lebens auf der Erde steht auf dem Spiel. Und hierbei geht es nicht nur um den Klimawandel. Die Menschheit ist an einem evolutionärem Scheideweg angekommen, an dem wir - als Spezies - eine kollektive Entscheidung treffen müssen: Wir können entweder weiter auf diesem Weg des Wettbewerbs, der Ungleichheit und der Degradierung und Ausbeutung bleiben oder wir richten uns grundsätzlich neu aus in Richtung Kooperation, Teilen und Erneuerung. Für ersteres reicht es damit fortzufahren unseren politischen Führern zu vertrauen und weiter das zu tun, was wir bereits tun - auch wenn wir "den Wandel Leben". Letzteres jedoch erfordert einen völlig neuen Ansatz. Um den Kurs der gesamten Menschheit grundsätzlich zu ändern, benötigt es nichts geringeres als eine intelligente, von Achtung getragene und innovative Kollaboration auf globaler Ebene.</p>
<p>Heutzutage arbeiten viele Millionen von Menschen und hunderttausende von Gruppen auf der ganzen Welt verteilt daran, eine strahlendende, glückliche Zukunft für das gesamte Leben zu schaffen. Wir sind mitten in einem Prozess, der bereits The Great Turning (die große Wende) oder The Great Transition (der große Übergang) genannt wird. Die meisten Menschen und alle Gruppen die diesen Wandeln hervorrufen und begleiten sind mit dem Internet verbunden - es existiert also ein klares, jedoch verborgenes Potential, aus welchem heraus wir alle zusammen an einer gemeinsamen Idee und Vision arbeiten.</p>
<p><i>Aber wie wollen wir auf globaler Ebene kooperieren ohne eine vollständig offene, öffentliche umd teilhabende neutrale Plattform auf welcher wir uns in unserem gemeinsamen Vorhaben zusammenschließen können?</i></p>
<p>Vereinte Erde ist eine planetare Initiative, die durch eine digitale Zusammenkunft von Change-Makern, besorgten Bürgern und internationalen Organisationen entstanden ist, welche alle die gleiche Intention teilen: nämlich eine globale und gemeinschaftliche Plattform ins Leben zu rufen, über welche wir uns als freie und gleichwertige Individuen und Gruppen vereinen können, um einen Systemwandel in Richtung einer in Freiheit, Harmonie, Gleichheit, Ehrlichkeit, Gerechtigkeit, Kooperation, ökologischer Wiederherstellung und Achtung allen Lebens basierten Gesellschaft voran zu treiben.</p>
<p>Wir sind offen und entschlossen, alle verfügbaren Werkzeuge, Netze und Technologien zu nutzen, um unsere globale Zusammenarbeit effektiv anzuleiten, zu unterstützen und zu fördern. Die jüngsten online Netzneutralitäts-Kampagnen zeigen, welchen Erfolg die Menschheit erzielen kann, wenn viele Organisationen sich gemeinsam auf ein Ziel konzentrieren.</p>
<p>Hier und jetzt laden wir jeden - alle bestehenden Bewegungen und Gruppen - ein, sich die Hände zu reichen, um die größtmöglichste und umfassendste Vereinigung der Menschheit ins Leben zu rufen. Wir widmen uns der Zusammenarbeit in einer gleichberechtigten Partnerschaft, der Bündelung unserer kollektiven Intelligenz, unserer Ideen und unseres Erfahrungswissens hinsichtlich globaler und lokaler Übergangsstrategien.</p>
<p>Ohne unsere individuellen, organisatorischen, religiösen oder ethnischen Identitäten oder unsere Autonomie zu opfern oder zu gefährden, lassen wir unsere Unterstützung und unsere Kreativität einer übergeordneten, führerlosen Struktur zuteil werden, die die Manifestierung unserer gemeinsamen Werte und Bestrebungen aufrechterhält und erleichtert. </p>
<p>Durch den Zusammenschluss erkennen wir, dass neben unserem Reichtum an indigener Weisheit, sozialer Innovationen, ökologischer Lösungen und alternativen politischen und ökonomische Modellen, wir außerdem bereits das Wissen, die Fähigkeiten, die Werkzeuge, die Technologie, die Ressourcen, die Mentoren und die lebenden Beispiele dafür besitzen, um eine schönere Welt für alle zu erschaffen. Darüber hinaus sind es unsere engagierten und gemeinsamen Aktionen der Zusammenarbeit auf unser gemeinsames Ziel hin, welche die Aufmerksamkeit der ganzen Menschheit effektiv auf sich ziehen können, um so diese wichtigen und hoffnungsvollen Neuigkeiten zu verbreiten.</p>
<p>Ja, es ist an der Zeit für große Träume - vielleicht für den größten Traum, welcher jemals in unser kollektives Bewusstsein eingetreten ist. Sicherlich entsteht dieser jetzt, weil wir nun eine kritische Masse an Frauen, Männern und Kindern erreicht haben, die genug Wohlwollen und Verständnis mitbringen und die rechtzeitig diese Vision der planetaren Einheit und Zusammenarbeit für eine bewusste kulturelle Transformation teilen.</p>
<p>Letztlich ist die Umsetzung dieser Vision nur davon abhängig, sich kollektiv dazu zu entscheiden - was wiederum von unserer Bereitschaft und unserer Fähigkeit abhängt, zu kooperieren. So ist die Herausforderung unserer Zeit im wesentlichen eine der geistigen und emotionalen Reife. Reife, sich über unsere Vorurteile und Ideologien zu erheben, unsere Vielfalt vollkommen zu begrüßen, und das größte Potenzial unserer vereinigten Kollaboration zu realisieren.</p>
<p>Sei willkommen. Wir sind eine große Menschenfamilie.</p>
</div>
</div>
<!-- /.col-lg-10 -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</section>
<!-- Callout -->
<aside id="survey" class="callout">
<div class="text-vertical-center">
<h2>Your Call to Action!</h2>
<div class="container iframe-sizing white-background">
<div class="">
<h3>Everyone is welcome... and needed!</h3>
<p class="invitation">Transparent, equal and global collaboration is at the core of a United Earth - so everyone is invited to co-create!
To help unify our vast and diverse Human Family for a common cause and vision, each of us is called to contribute in our own unique way.
<b>Please add your voice through the feedback form so a United Earth can benefit from your ideas, skills and experience.</b>
We look forward to welcoming new co-creators.
<b>Come! Let's make history together!</b>
</div>
</div>
<div class="container translation-buttons">
<div class="btn-group">
<button id="en-survey-button" class="btn btn-primary btn-success">
EN
</button>
<button id="fr-survey-button" class="btn btn-primary">
FR
</button>
<button id="es-survey-button" class="btn btn-primary">
ES
</button>
<button id="pt-survey-button" class="btn btn-primary">
PT
</button>
<button id="de-survey-button" class="btn btn-primary">
DE
</button>
</div>
</div>
<iframe id="survey-iframe" class="iframe-sizing" src="https://docs.google.com/forms/d/1YbQ1RjpsOifaz5IMOWnmHNQ9lVXRXTlACC0CmkiqCUQ/viewform?embedded=true" width="760" height="800" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</div>
</aside>
<!-- Call to Action -->
<aside class="call-to-action bg-primary">
<div class="container">
<div class="row">
<div id="begin-uniting" class="col-md-8 col-md-offset-2 text-center">
<h3>Begin uniting and collaborating with others here and now!</h3>
<p class="lead">Change-agents, innovators and unifiers from all over the world are already joining forces and resources through the United Earth vessel for a planetary whole-systems transition of human society.<br>For toolkits and more information about our vision, objectives, modus operandi and how to join our de-centralised and horizontal team of passionate co-creators, please have a look at <a href="http://wiki.united-earth.vision">our wiki</a>.</p>
<a target="_blank" href="http://wiki.united-earth.vision" class="btn btn-lg btn-light">Wiki</a>
<a target="_blank" href="http://eepurl.com/bufG2X" class="btn btn-light btn-lg"><i class="fa fa-envelope-o fa-fw"></i>Newsletter</a>
<a target="_blank" href="https://www.facebook.com/A.United.Earth" class="btn btn-light btn-lg"><i class="fa fa-facebook fa-fw"></i>Facebook</a>
<a target="_blank" href="https://twitter.com/aunitedearth" class="btn btn-light btn-lg"><i class="fa fa-twitter fa-fw"></i>Twitter</a>
<hr class="small">
<h3>And now we are thrilled to introduce and share with you a quantum leap in collaboration technology that befits a vision as vast and comprehensive as a United Earth…</h3>
</div>
</div>
</div>
</aside>
<aside id="noomap">
<!--<img class="background-image" src="img/Metatrons_cube.svg"></img>-->
<div class="container">
<div class="text-vertical-center">
<h2>Noomap - a Global Synergy Engine<br>for co-creating the world we know is possible</h2>
<div class="quote">“We become what we behold... we shape our tools and afterwards our tools shape us”<br>Marshall McLuhan</div>
<div class="col-md-6">
<img src="img/noomap-screenshot.jpg"></img>
</div>
<div class="col-md-6 justify">
Noomap is a visionary new social and digital prototype technology supporting the establishment of a United Earth platform. Noomap is gifting forward a fractal operating environment which is a whole systems tool for holonic communication and media. Noomap’s mission is to provide an evolutionary framework for facilitating a planet-wide inspirational network of community collaboration as well as opportunities for both decentralised and unified governance. We invite the world to join us in building a Global Synergy Engine featuring Resonance and Synergy Algorithms (Synergy Engine Optimization) that generate a literal ‘world wide web’ of planetary co-creation; connecting us all into a unified ecosystem through mapping our individual, communal and collective visions, intentions, passions, skills, resources, and more for all to see and share.
</div>
<div class="col-md-12">
<h3>Awakening the Noosphere</h3>
<div class="quote">“For Teilhard de Chardin, the noosphere is preceded by the elaboration of a planetary information network, which then also becomes the last material-technological rite of passage before reaching an “Omega point,” This Omega point… is the entrance of humanity, and the planet, into the noosphere, the One Mind of Earth...” Law of Time</div>
</div>
<div class="col-md-6">
<div class="justify">
Humanity’s most extraordinary wealth of energy and information includes our collective heart, passion for creativity and infinite imagination. In the Noo world our dreams, our intentions, our intuitions, and our spectrum of gifts become the planet’s most precious and abundant natural resources. As a species, we have not been able to truly explore reality from the non physical landscape in an intelligent way. We have mapped the oceans, the stars, the land … and now a new terrain beckons. From inner space, we will see ourselves anew, and as the noosphere awakens so do the most wonderful opportunities for transformation.
</div>
<h3>Co-creating Noomap</h3>
<div class="justify">
The United Earth community and the Noomap Family are in an emergent co-creationship. Together, along with every community, organization, group and individual, we invite you to all join us in co-creating Noomap and catalyzing the greatest game of co-creation the planet has ever seen. A unified network of co-creators experiencing their natural interconnectedness and interdependence through resonance, synergy, compassion, and the collective wisdom of the awakening social body.
In the spirit of realizing our gift civilization as one United Earth, connect with us to explore how we can all co-develop, co-incubate, co-innovate, co-resource, co-gift, co-fund and co-prosper Noomap for all. Noomap is currently at prototype and our team must now expand in order to realize this beautiful vision for all. Please email us at [email protected] with any gifts and inspiration you can offer or questions about becoming co-creators with us. Our immediate intentions include receiving the support of developers, GUI/UX Designers, co-creation facilitators and funding and resources for the core team’s basic needs (this can be resources like ideas, collaborations, accommodations, currency donations, or connections to philanthropists and evolutionary investors who would resonate with our mission and enjoy supporting the planetary community through the project).
</div>
</div>
<div class="col-md-6">
<!--<img src="img/onthebigscreen.jpg"></img>-->
<iframe height="415" src="https://www.youtube.com/embed/etE6k6nKyEg" frameborder="0" allowfullscreen></iframe>
<small>Since releasing this video 15 months ago, Noomap’s user interface, capabilities and team has evolved significantly. Nonetheless, this video exemplifies the heart and spirit behind Noomap which remains consistent. We look forward to sharing more up-to-date communications very soon.</small>
</div>
</div>
</div>
</aside>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1 text-center">
<hr class="small">
<p class="text-muted col-lg-12">
<a href="http://creativecommons.org/licenses/by-nc/4.0/">
<i class="fa fa-cc"></i>
<br>
United Earth by United Earth is licensed under a Creative Commons<br>
Attribution-NonCommercial 4.0 International License.<br>
Based on a work at http://united-earth.vision.
</a>
</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script>
// Closes the sidebar menu
$("#menu-close").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
// Opens the sidebar menu
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
// Scrolls to the selected menu item on the page
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
var video = document.getElementById('bgvid');
video.play();
document.onclick = function (){
document.getElementById('bgvid').play();
};
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66666923-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
| 103.95933 | 1,008 | 0.684386 |
a229884ff78297f1e960916a7afb503eb336a167 | 147 | asm | Assembly | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: interrupt.asm
Type: file
Size: 19083
Last-Modified: '1992-10-05T06:12:42Z'
SHA-1: C76D989143FB47E4CED4C8C716CC182D879D9EF9
Description: null
| 21 | 47 | 0.816327 |