language
stringclasses 15
values | src_encoding
stringclasses 34
values | length_bytes
int64 6
7.85M
| score
float64 1.5
5.69
| int_score
int64 2
5
| detected_licenses
listlengths 0
160
| license_type
stringclasses 2
values | text
stringlengths 9
7.85M
|
|---|---|---|---|---|---|---|---|
Markdown
|
UTF-8
| 544
| 2.515625
| 3
|
[] |
no_license
|
# Article 227-15
Le fait, par un ascendant ou toute autre personne exerçant à son égard l'autorité parentale ou ayant autorité sur un mineur de quinze ans, de priver celui-ci d'aliments ou de soins au point de compromettre sa santé est puni de sept ans d'emprisonnement et de 100 000 euros d'amende.
Constitue notamment une privation de soins le fait de maintenir un enfant de moins de six ans sur la voie publique ou dans un espace affecté au transport collectif de voyageurs, dans le but de solliciter la générosité des passants.
|
Java
|
UTF-8
| 547
| 3.03125
| 3
|
[] |
no_license
|
package model.items;
/**
* This class represents a Safari Ball object and it a child of the Item class.
* The Safari Ball is used to catch Pokemon in the Safari Zone.
*
* @author Alan D., Paria K., Samantha F., Rajeev R., Scrum Master: Niven
* Francis, CSC 335 Final Project
*/
public class SafariBall extends Item {
/**
* The constructor requires a file path
*
* @param path
* the location of the image
*/
public SafariBall(String path) {
super(path);
this.name = "Safari Ball";
}
}
|
Shell
|
UTF-8
| 484
| 3.125
| 3
|
[] |
no_license
|
#!/bin/bash
set -e
HERE="$( readlink -f "$( dirname "$BASH_SOURCE" )" )"
WORKDIR="$PWD"
PM="${WORKDIR}/venv/bin/password_manager"
export GNUPGHOME="${WORKDIR}/gnupghome-2"
git clone ./passwords ./passwords-2
cd ./passwords-2
echo "Secret4" | ${PM} secret put PW4
${PM} key regen
git add -A
git commit -m 'Changes by user #2'
echo "----------------------------------------------------------------------"
echo "Done. Now \`cd ${WORKDIR}/passwords-2 && git push' to break things"
|
Go
|
UTF-8
| 547
| 2.578125
| 3
|
[
"MIT"
] |
permissive
|
package formats
import (
"bytes"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
)
func TestWriteDOT(t *testing.T) {
net := buildNetwork()
net.Name = "TestNN"
b := bytes.NewBufferString("")
err := WriteDOT(b, net)
require.NoError(t, err, "failed to DOT encode")
t.Log(b)
assert.NotEmpty(t, b)
}
func TestWriteDOT_Write_Error(t *testing.T) {
net := buildNetwork()
net.Name = "TestNN"
errWriter := ErrorWriter(1)
err := WriteDOT(&errWriter, net)
assert.EqualError(t, err, alwaysErrorText)
}
|
JavaScript
|
UTF-8
| 2,238
| 2.6875
| 3
|
[
"BSD-3-Clause"
] |
permissive
|
function urlB64ToUint8Array(base64String) {
const padding = '='.repeat((4 - base64String.length % 4) % 4);
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');
const rawData = window.atob(base64);
const outputArray = new Uint8Array(rawData.length);
for (let i = 0; i < rawData.length; ++i) {
outputArray[i] = rawData.charCodeAt(i);
}
return outputArray;
}
class WebPushManager {
manager: any;
subscriptionAttempt: boolean;
constructor() {
this.manager = null;
this.subscriptionAttempt = false;
}
set = manager => {
this.manager = manager;
if (this.subscriptionAttempt) {
this.subscribe();
} else if (this.unsubscriptionAttempt) {
this.unsubscribe();
}
};
subscribe = () => {
if (!this.manager) {
this.subscriptionAttempt = true;
return Promise.reject('Please try again.');
}
return this.manager.subscribe({
userVisibleOnly: true,
applicationServerKey: urlB64ToUint8Array(
'BPJAFt0MO2BkTYSuzNdGHbVD6lbk2bzYqMBp1gBXLKUupEIIV7yXViZ1D7SyrJfFbYkKuoxwyaP8YcHU8nRDQsA'
),
});
};
unsubscribe = () => {
if (!this.manager) {
this.unsubscriptionAttempt = true;
return Promise.resolve(true);
}
return this.getSubscription().then(subscription =>
subscription.unsubscribe()
);
};
getPermissionState = () => {
// No compat
if (!('serviceWorker' in navigator) || !('PushManager' in window)) {
return new Promise(res => {
res(false);
});
}
// Old API
if (navigator.permissions) {
return navigator.permissions
.query({ name: 'notifications' })
.then(result => result.state);
}
// New API
return new Promise(res => {
res(Notification.permission);
});
};
_getSubscription = () => {
return this.manager.getSubscription();
};
getSubscription = () =>
new Promise(res => {
// Recursively call this method until we got a manager
if (!this.manager) {
setTimeout(() => {
res(this.getSubscription());
}, 500);
} else {
res(this._getSubscription());
}
});
}
export default new WebPushManager();
|
Java
|
UTF-8
| 1,611
| 2.3125
| 2
|
[
"MIT"
] |
permissive
|
package org.frekele.fiscal.focus.nfe.client.enumeration;
import org.frekele.fiscal.focus.nfe.client.testng.InvokedMethodListener;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import java.util.List;
import static org.testng.Assert.*;
/**
* @author frekele - Leandro Kersting de Freitas
*/
@Listeners(InvokedMethodListener.class)
public class NFeFormaIntermedioEnumTest {
@Test
public void testFromCode() throws Exception {
NFeFormaIntermedioEnum entity = NFeFormaIntermedioEnum.fromCode("1");
assertNotNull(entity);
assertEquals(entity.getCode(), "1");
assertEquals(entity.getDescription(), "Importação por conta própria");
entity = NFeFormaIntermedioEnum.fromCode("2");
assertNotNull(entity);
entity = NFeFormaIntermedioEnum.fromCode("3");
assertNotNull(entity);
entity = NFeFormaIntermedioEnum.fromCode(null);
assertNull(entity);
entity = NFeFormaIntermedioEnum.fromCode("");
assertNull(entity);
entity = NFeFormaIntermedioEnum.fromCode("XXXXXXXXXX");
assertNull(entity);
}
@Test
public void testGetAll() throws Exception {
List<NFeFormaIntermedioEnum> listAll = NFeFormaIntermedioEnum.getAll();
assertNotNull(listAll);
assertEquals(listAll.size(), 3);
assertTrue(listAll.contains(NFeFormaIntermedioEnum.IMPORTACAO_POR_CONTA_PROPRIA));
assertTrue(listAll.contains(NFeFormaIntermedioEnum.IMPORTACAO_POR_CONTA_E_ORDEM));
assertTrue(listAll.contains(NFeFormaIntermedioEnum.IMPORTACAO_POR_ENCOMENDA));
}
}
|
Java
|
UTF-8
| 1,750
| 3.296875
| 3
|
[] |
no_license
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.mycompany.fieldday;
import java.util.Scanner;
/**
*
* @author ajplarson
*/
public class App {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String lastName;
System.out.println("Please Enter Your Last Name: ");
lastName = sc.nextLine();
char letter = lastName.charAt(0);
int asciiName = Character.getNumericValue(letter);
while(true) {
if (asciiName < 10) {
System.out.println("Please enter a number.");
break;
}
else if (asciiName < 12) {
System.out.println("You are on team Red Dragons!");
break;
}
else if (asciiName == 12) {
System.out.println("You are on team Dark Wizards!");
break;
}
else if (asciiName < 17) {
System.out.println("You are on team Moving Castles!");
break;
}
else if (asciiName < 25) {
System.out.println("You are on team Golden Snitches");
break;
}
else if (asciiName < 31) {
System.out.println("You are on team Night Guards!");
break;
}
else {
System.out.println("You are on team Black Holes");
break;
}
}
System.out.println("Best of Luck to you " + lastName + "\nMay the best team win!");
}
}
|
Python
|
UTF-8
| 4,043
| 2.65625
| 3
|
[] |
no_license
|
#!/usr/bin/env python
from history import History
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
import datetime
import os
import time
import sys
import subprocess
import re
import urllib.parse
import urllib.request
debug = False
class AppURLopener(urllib.request.FancyURLopener):
version = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11' # Set this to a string you want for your user agent
class RottenTomatoesRating:
def search_movie(self):
print ("Hello, it\'s the movie search function.\n Here are the movie scoring sources: \n")
scoring = {"rotten tomato" : "https://www.rottentomatoes.com/browse/dvd-top-rentals?minTomato=0&maxTomato=100&minPopcorn=60&maxPopcorn=100&services=amazon;hbo_go;itunes;netflix_iw;vudu;amazon_prime;fandango_now&genres=1;2;4;5;6;8;9;10;11;13;18;14&sortBy=release"}
for k in scoring.items():
print (k)
url = scoring["rotten tomato"]
opener = AppURLopener()
soup = BeautifulSoup(opener.open(url).read(), 'html5lib')
if debug:
f = open('workfile', 'w')
f.write(str(soup))
f.close()
contents = soup.find('title').contents
titles = self.parseSoupMovieTitle(soup)
if contents[0] == "Page Not Found":
return 'Sorry, there is no movie found'
else:
return titles
def parseSoupMovieTitle(self, soup):
text = str(soup)
titles = re.findall(r"title\".*?,", text)
result = []
for st in titles:
st = st[:-1]
st = st.replace("title\":", "")
st = st.replace("\"", "")
result.append(st)
return result
def fetch_torrent(self, titles, res):
history = History()
downloaded_titles = history.init_downloaded_title()
computed_titles = self.diff(titles, downloaded_titles)
print ('computed titles: ', computed_titles);
if not computed_titles:
print ('nothing to download...exit now')
return
url_base = 'https://thepiratebay.org'
for title in computed_titles:
torrent_page_url = url_base + '/search/' + title +'%20' + res + '/0/99/207'
print (torrent_page_url)
history = History()
history.add_downloaded_title(title)
time.sleep(1)
self.invoke_transmission(title, torrent_page_url)
time.sleep(5)
def invoke_transmission(self, title, link):
url = link
opener = AppURLopener()
soup = BeautifulSoup(opener.open(url).read(), 'html5lib')
if debug:
f = open('torrent_page_workfile', 'w')
f.write(str(soup))
f.close()
magnet_link = self.parseSoupMagnetLink(soup)
if magnet_link is None:
print ('Unable to find torrent for it')
else:
now = str(datetime.datetime.now())
with open('transmission.' + now + '.log', 'w') as output:
cwd=(os.getcwd())
p = subprocess.Popen([ cwd + "/" + "call_transmission.sh", magnet_link], stdout=output)
p.communicate()
def parseSoupMagnetLink(self, soup):
text = str(soup)
links = re.findall(r"magnet\:\?xt.*?\"", text)
if not links:
print("List is empty")
return None
else:
result = []
for st in links:
st = st[:-1]
st = st.replace("\"", "")
result.append(st)
return result[0]
def diff(self, first, second):
second = set(second)
return [item for item in first if item not in second]
def main(argv):
print ('Argument List:' + ' ' + str(len(argv)), '\n')
if (len(argv) == 0):
rt = RottenTomatoesRating()
titles = rt.search_movie()
print ('\n### Here are the results:\n')
print (titles)
rt.fetch_torrent(titles, '1080p')
elif (len(argv) == 2):
print ('fetching: ' + argv[0], '\n')
rt = RottenTomatoesRating()
title = argv[0]
res = argv[1]
titles = []
titles.append(title)
rt.fetch_torrent(titles, res)
elif (len(argv) == 1):
print ('fetching: ' + argv[0], '\n')
rt = RottenTomatoesRating()
title = argv[0]
res = '1080p'
titles = []
titles.append(title)
rt.fetch_torrent(titles, res)
else:
print ('incorrent input\n')
print ('Usage: python3 movie_search.py [movie title]')
if __name__ == "__main__":
main(sys.argv[1:])
|
Markdown
|
UTF-8
| 640
| 3.890625
| 4
|
[] |
no_license
|
给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。
示例 1:
输入: "babad"
输出: "bab"
注意: "aba" 也是一个有效答案。
示例 2:
输入: "cbbd"
输出: "bb"
思路:
使用暴力法,对每个字符求回文子串的长度,统计最大长度即可。
此时应注意奇回文(如aba)和偶回文(如bb)的处理方式不同,为了统一进行处理,给原字符串增加占位符。
如原字符串“aba”,增加占位符后变为“#a#b#a#”,占位符可以为任意字符。
得到最长回文子串后再将占位符去掉即可。
|
Java
|
UTF-8
| 5,092
| 2.046875
| 2
|
[] |
no_license
|
package com.mclr.mini.riesgosmovil.fragmentos;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.mclr.mini.riesgosmovil.MainActivity;
import com.mclr.mini.riesgosmovil.R;
import com.mclr.mini.riesgosmovil.utilitarios.Constants;
import com.mclr.mini.riesgosmovil.utilitarios.ListaAdapter;
import com.mclr.mini.riesgosmovil.utilitarios.ListaDatos;
import java.util.ArrayList;
/**
* Created by mini on 07/06/16.
*/
public class HallazgosFragment extends Fragment {
private MainActivity myActivity = null;
public static final String ARG_HALLAZGO_NUMBER = "hallazgo_number";
private ListView lista;
private String[] mPropertyTitles;
private String[] mPropertyDesc;
private ArrayList<ListaDatos> propertyTypes;
public HallazgosFragment() {
}
@Override
public void onAttach(Context activity) {
super.onAttach(activity);
myActivity = (MainActivity) activity;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.hallazgos, container, false);
mPropertyTitles = getResources().getStringArray(R.array.property_types);
mPropertyDesc = getResources().getStringArray(R.array.property_types_description);
propertyTypes = new ArrayList<ListaDatos>();
propertyTypes.add(new ListaDatos(R.mipmap.aquaculture_blue, mPropertyTitles[0], mPropertyDesc[0], Constants.AQUACULTURE));
propertyTypes.add(new ListaDatos(R.mipmap.dams_blue, mPropertyTitles[1], mPropertyDesc[1], Constants.DAM));
propertyTypes.add(new ListaDatos(R.mipmap.education_blue, mPropertyTitles[2], mPropertyDesc[2], Constants.EDUCATION));
propertyTypes.add(new ListaDatos(R.mipmap.health_blue, mPropertyTitles[3], mPropertyDesc[3], Constants.HEALT));
propertyTypes.add(new ListaDatos(R.mipmap.hydraulic_infrastructure_blue, mPropertyTitles[4], mPropertyDesc[4], Constants.HIDRAULIC));
propertyTypes.add(new ListaDatos(R.mipmap.historical_and_archaeological_blue, mPropertyTitles[5], mPropertyDesc[5], Constants.HISTORICAL));
propertyTypes.add(new ListaDatos(R.mipmap.urban_infraestructure_blue, mPropertyTitles[6], mPropertyDesc[6], Constants.URBAN));
propertyTypes.add(new ListaDatos(R.mipmap.waste_disposal_blue, mPropertyTitles[7], mPropertyDesc[7], Constants.WASTE_DISPOSAL));
propertyTypes.add(new ListaDatos(R.mipmap.ways_blue, mPropertyTitles[8], mPropertyDesc[8], Constants.WAYS));
int i = getArguments().getInt(ARG_HALLAZGO_NUMBER);
String seleccion = getResources().getStringArray(R.array.menu_array)[i];
myActivity.setTitle(seleccion);
myActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
myActivity.getSupportActionBar().setHomeButtonEnabled(true);
myActivity.getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
return rootView;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
lista = (ListView) getActivity().findViewById(R.id.propertyTypes_hallazgo);
lista.setAdapter(new ListaAdapter(getActivity(), R.layout.fila_hallazgo, propertyTypes){
@Override
public void onEntrada(Object entrada, View view) {
if (entrada != null) {
TextView texto_superior_entrada = (TextView) view.findViewById(R.id.textHallazgo_Superior);
if (texto_superior_entrada != null)
texto_superior_entrada.setText(((ListaDatos) entrada).getTitulo());
TextView texto_inferior_entrada = (TextView) view.findViewById(R.id.textHallazgo_Inferior);
if (texto_inferior_entrada != null)
texto_inferior_entrada.setText(((ListaDatos) entrada).getDescripcion());
ImageView imagen_entrada = (ImageView) view.findViewById(R.id.imageHallazgo);
if (imagen_entrada != null)
imagen_entrada.setImageResource(((ListaDatos) entrada).getIdImagen());
}
}
});
lista.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
ListaDatos selection = (ListaDatos) parent.getItemAtPosition(position);
String propertyTypeIDselection = selection.getPropertyTypeID();
myActivity.selectPropertyItem(propertyTypeIDselection, "Nuevo", "Nuevo");
}
});
}
}
|
Java
|
UTF-8
| 877
| 2.015625
| 2
|
[] |
no_license
|
package com.dao;
import com.model.Order;
import com.model.Praise;
import com.model.PraiseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PraiseMapper extends BaseDao<Praise>{
long countByExample(PraiseExample example);
int deleteByExample(PraiseExample example);
int deleteByPrimaryKey(String id);
int insert(Praise record);
int insertSelective(Praise record);
List<Praise> selectByExample(PraiseExample example);
Praise selectByPrimaryKey(String id);
List<Praise> selectByAllBypage();
int updateByExampleSelective(@Param("record") Praise record, @Param("example") PraiseExample example);
int updateByExample(@Param("record") Praise record, @Param("example") PraiseExample example);
int updateByPrimaryKeySelective(Praise record);
int updateByPrimaryKey(Praise record);
}
|
Java
|
UTF-8
| 720
| 3.671875
| 4
|
[
"Apache-2.0"
] |
permissive
|
//Write a function that takes a string as input and returns the string reversed.
//
//Example 1:
//
//Input: "hello"
//Output: "olleh"
//Example 2:
//
//Input: "A man, a plan, a canal: Panama"
//Output: "amanaP :lanac a ,nalp a ,nam A"
package wenxinjie3;
public class leetcode344_Reverse_String {
public String reverseString(String s) {
char[] ans = s.toCharArray();
int len = ans.length;
if (len == 0) return new String(ans);
for (int i = 0; i < len / 2; i ++){
char tem = ans[i];
ans[i] = ans[len - i - 1];
ans[len - i - 1] = tem;
}
return new String(ans);
}
}
//Time: O(n)
//Space: O(n)
//Difficulty: easy
|
Markdown
|
UTF-8
| 16,629
| 3
| 3
|
[
"MIT"
] |
permissive
|
---
title: '#DearID Episode 54: Building a Network'
path: "/blog/dearid-episode-54-building-a-network"
date: '2018-09-27'
featured: "../featured/Building-a-network.png"
categories: ["Dear ID Show", "elearning"]
tags: ["freelancing", "freelance", "DearID", "network", "networking"]
---
This episode I wanted to talk a bit about how I’ve built and continue to build my network from the perspective of an introvert.
Be sure to check out a transcript of the episode below the player. And the shownotes are here: [https://simplecast.com/s/7c3c8a1c](https://simplecast.com/s/7c3c8a1c)
<iframe frameBorder='0' height='200px' scrolling='no' seamless src='https://embed.simplecast.com/7c3c8a1c?color=f5f5f5' width='100%'></iframe>
Hey everybody and welcome back to Dear Instructional Designer, the show about the instructional design journey. I’m your host, Kristin Anthony.
We’re in Season 4 of Dear ID where we are concentrating on the journey into freelancing as an instructional designer. This episode I wanted to talk a bit about how I’ve built and continue to build my network.
So I recently finished Susan Cain’s Quiet (didn’t love it, but that’s another story) but I am a deeply, deeply introverted individual and the book had some interesting insights into the strengths and temperaments of introverts, in general. And I want to talk about building a network from this perspective because I’ve heard from a lot of other IDs who have said that they also consider themselves introverted and I think it would be useful to talk about building relationships when you might not be the sort of person to go to ALL the THINGS, or hey you just may not have the resources to get to all of the conferences or meetups you might want to go to.
I’m going to tackle this in a three-fold answer. First, I want to talk about the impactful things I’ve been able to do in a way that has still allowed me time to think and articulate myself and be generally introvert-y. Second, I want to talk about conferences especially since I’m such a newbie with them. And then, third, I want to talk about the activities I’d like to begin engaging in in the future.
But first, I should probably define a bit more about what I mean when I say network. Christy Tucker, who was a guest on the show, wrote a bit a while back about how careful she’s been about accumulating LinkedIn connections in order to make sure that she’s building more meaningful relationships. I have NOT been very careful there, perhaps just because at this point in my career, I’m interested in making connections to a bunch of different people AND LinkedIn is not typically a social network that I find disruptive to my workday. So a lot of those people would be on the outer rings of my network universe. BUT, like Christy, when I think about my network, I’m thinking about people with whom I have had sustained, deeper contact with. People who I’ve had google hangouts with. People I’ve worked with in the xAPI cohort. And people who I’ve interviewed on the show because having an hour-long conversation with someone is a deep act, I think. So when I’m thinking about cultivating relationships and the network of people who I might ask questions of or ask for help from, those are the folks I’m thinking about.
Now we can move on to the things I’ve done to build up that network.
Probably the most impactful thing I did to start was to consistently share my experience via my blog. I intended my blog as a way to reflect on my own journey as an instructional designer and along the way, I started using Buffer, which I talked about last episode to automate sharing my posts via Twitter. This opened up a TON of conversations with other people who happened upon my writing. This was awesome because it let me meet other IDs and talk and geek out about in-depth topics while skipping the small talk. I wrote very consistently for the first couple of years and I met a bunch of people. And again, I want to emphasize that I’m not just talking about gaining Twitter followers (more on that in a bit) but I’m talking about my blog as being a gateway to some more sustained relationships. With some of those people I particularly gelled with, we had DM Twitter conversations or email conversations; and sometimes we met for Google hangouts, outside of any particular project, we would just meet face-to-face via hangouts to talk. So from my blog, I was able to create those more meaningful relationships and conversations.
When I was starting out, I tried Twitter chats and they were a really great means of introducing me to the work of a lot of leaders in the community, such as Jane Bozarth and Cathy Moore, who I might not have discovered on my own. But, as I progressed and continued exploring my own experience, I realized that Twitter chats, weren’t really my thing. There was too much information, moving too quickly and I found it really hard to participate and concentrate and schedule time for them. But I was able to find other smaller communities to participate in more intimate groups. There was a HipChat community I participated in at one point. And I also found the instructional design subreddit, which, the odd ugly comment or post aside, has really awesome for me because it’s highly asynchronous and I don’t need to let it steal my focus from other work (though of course, I, like anyone have been guilty of wasting time on social media in lieu of concentrating on the task at hand). These were communities that were and are, again, really focused on work and on a small group of people who are consistently around so we’ve able to have deeper conversations around topics, which I find really helpful.
Another really impactful activity for building my network, as you might imagine, has been this podcast. I get to really meet and talk with people who I might have only met on Reddit or who have reached out to me on Twitter and I really value reaching out to other people who are on the ground, working around their frustrations to do their best work. I like to start off or end every guest chat by continuing to talk to them about their ideas. This has been a really great medium for me to build meaningful relationships with people who I might never meet otherwise.
One thing in common about each of these activities (blogging, participating in a curated set of social media, and podcasting) is that they all allow me to work from my strengths. I get to articulate my ideas or my questions and share them in a way that puts my voice out there into the world without asking me to change into someone else. And I also get to meet so many awesome people via the interwebs. I have found, and you heard Devlin Peck mention this as well, that IDs, in general, are very helpful so reaching out to people, asking to hear their stories, asking questions, questions, questions, has been incredibly rewarding for me AND it’s helped me to build up a network of people who are familiar with my work, who’s work I’m familiar with and who could be allies for me or for whom I could be an ally.
Conferences, on the other hand, have been a much more recent phenomenon for me. As an employee, I had not ever been able to get an employer to pay for a conference. I’ve gone to two now as a freelancer. Because I’m paying for them myself, I, of course, am having to be very careful about what I want to be involved in. And I’ve decided that I want to stick to those more intimate, smaller conferences. Having just returned from Learning Dev Camp(where I got to meet up with Cara North, Joseph Suarez (both previous guests), and Anna Leach, who I first talked with on LinkedIn), I noticed a couple of things for myself. First, having to be at a session at 7:30 AM was absolutely awful, I’m a night owl and always have been, so I was dealing with a lot of sleep debt throughout the experience. Second, though I was able to attend some really great sessions, I was absolutely exhausted at the end of each day. So I can’t imagine how one of those tens of thousands of people-sized conferences would affect me. And third, I was actually able to see the same people in a lot of sessions and talk with them, and also talk with the presenters. And to me, that’s where one of the main benefits of going to conferences lay. For me, if I can’t have serious conversations, it’s probably a not worth it. So I’ve made a commitment to attend at least one small conference a year.
And, you know, to this point one of the things that has been in my mind is that I had someone, while I was at Learning Dev Camp, ask why I didn’t stop “hiding behind the desk” and get up and make presentations. That comment really struck me. There was a point where I did really want to present, and I would like to actually see more diversity in the experiences offered in presentations. I’ve been seeing just recently the TLDC community tweeting about mentoring newbie presenters. So there are resources out there for you and for me and I’ll put some in the shownotes.
But I don’t like this idea that, as an introvert, I’m hiding behind something because I’m not presenting. I think that’s really harmful. I reach out and talk to people and put my voice out there into the world in ways that have been working for me. I do believe that introverts can make great performers and presenters. For me, I think that moving again towards presenting would require A, me having a project that I felt like allowed me to share some particular success and B. my throwing all of my effort towards being a better presenter. And right now, my One Thing for myself is actually game development, so I’m not willing to split my focus. All of that to say that, as an introvert, you can still put your voice out there in the world. If you want to be a presenter, then the Internet allows you to reach out to communities like TLDC to get some mentorship about getting proposals accepted. But if you don’t want to do that right now, you aren’t hiding. There are other means for you to build meaningful relationships and it doesn’t make you less-than.
The other thing that this really relates to for me was this super impactful statement I heard, I think it was on a podcast, though the particular one escapes me. The podcast host was talking with someone about their business and they exchanged business cards. And, like you do, this host looked up this other person on Twitter. And they felt really good about themselves because they had thousands of Twitter followers while this other person only had like two hundred. But later the host came to find out that this other person was doing millions of dollars worth of business with these huge companies. They were out there quietly, effectively doing the work, even though Twitter didn’t show it. And I just had a similar experience myself. I reached out to a presenter from Learning Dev Camp and though they only have a couple hundred followers on Twitter, this person has been in business for 15 years, has a successful company, and is doing business with these huge innovative companies as well as startups. And when I think about who I want to be like, who I’m jealous of, to use one of the litmus tests Susan Cain recommends in Quiet, it’s those people who are out there doing really cool things. People who have those stories to tell about the impact of their work and who concentrate on doing that excellent work to the exclusion of other things. So, again, for me, I want to concentrate first on building a business that makes an impact and then, at some later point of my career, I might be ready to share those experiences via presenting at conferences. But right now, that’s not where my focus is and that’s okay. And I want you to be okay with where you are. If you want to present at conferences, make that your focus and Go for it! If you don’t, that’s okay. Think about how conferences could fit into your networking and think about the size of the conference too and the experience you want to have.
To recap, when it comes to building a network of people with whom I have built more sustainable, meaningful relationships, I’ve found blogging, participating in some social media, and podcasting, or more generally inviting people to talk one-on-one have been really impactful for me. I don’t have a lot of experience with conferences but I’ve found that there are pros and cons for me, so I’m committing to stick to the small ones right now, where I feel like I can build experiences that better suit me.
Last, I want to talk about activities I’d like to participate in.
I’ve mentioned Cal Newport’s book, Deep Work, several times on this podcast and in my blog and one of the things he mentions as he advocates for quitting (or at least ruthlessly trimming) social media is that you can build much more meaningful relationships by engaging in local groups. When I lived in Austin, Texas, I actually was starting to go to coding meetups regularly but since I’ve moved to the suburbs, I’ve found that my access to the kinds of meetups I’d like to go to has been restricted. But I’m currently looking for a city and a living situation that would allow me to participate with local groups like this because I do think that I would get a lot of value from that.
On a related note, I was also introduced to the concept of a mastermind group from the $100 MBA podcast. The idea is that you have a small group of other people that you meet with regularly to talk about your projects, hold each other accountable, and support each other. I’m really interested in that, too. I’d love to be a part of a mastermind group of active IDs from a variety of backgrounds to jam with regularly. As a side note, the ONLIP LinkedIn group Christy mentioned might work for many of you in this capacity, but I think I’m looking for something a little different. So that’s something I keep thinking about. I don’t know if it will happen, but I’d love to hear from any of you who might be interested in something similar.
Last, I’m trying to really implement the lessons from the One Thing and focus on one thing at a time. Right now, I’m still in the middle of some time-blocked professional development, a Udacity nanodegree, so I am trying really hard to focus all of my energy and attention on completing that first. Once that is over, I want to refocus on my own game development work. I recently purchased Sharon Boller and Karl Kapp’s PlayToLearn as well as Melissa Ford’s Writing Interactive Fiction with Twine. And I have a TON of game making courses and tutorials I want to get through. So my idea is that I’d like to give myself a weekly assignment from Play to Learn to play games and evaluate them from an ID perspective and perhaps a monthly assignment to make a game. I think that this may offer an opportunity for me to collect learning-game prompts, which has been my biggest blocker when it comes to practicing making games that are more portfolio pieces rather than just making games generally. So that’s something I’m hoping to engage in in August or September. It’s my intention to be working out loud so, again, it’s a way to share my voice and work from my strengths and I hope it will get a conversation started with other IDs who are interested in making impactful learning games.
That, my friends, is how I’ve built my network and hope to continue building it as an introvert. I’ve really been deeply grateful for the opportunity to speak with so many people and share with so many people while being able to be myself. I’ve haven’t needed to put on a mask or be a pseudo-extrovert. I’ve been very me this whole time, and I’ve been really honored to call so many of you my colleagues. I’m really hoping that, for any other introvert IDs out there, the activities I’ve shared here will be helpful to you as you seek to build relationships with other professionals from your own places of strength.
That’s it for this episode! I would love to hear from you. If you’ve got any follow up questions about this the activities I used to build my network or if you have any suggestions from either the extrovert or introvert POV or both or neither, feel free to reach out to me. I’m @anthkris on Twitter, or you can shoot me an email at kristin AT dearinstructionaldesigner.com
And don’t forget to leave a review on iTunes! Your review helps other people find the show and lets me know how I’m doing. I would really, really appreciate it.
Thanks so much for listening and I will see you back here next time. Take care!
|
C#
|
ISO-8859-3
| 1,419
| 2.625
| 3
|
[] |
no_license
|
using System;
using System.Reflection;
using NTools.Logging.Log4Net;
namespace NTools.Core.Reflection {
/// <summary>
/// Klasse zur Serialisierung von Membern, die eigentlich nicht serialisierbar sind.
/// Die Serialisierung erfolgt ber Reflection.
/// </summary>
[Serializable]
public class FieldReflector : MemberReflector {
private static readonly ITraceLog s_log = TraceLogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FieldReflector(Type type, string fieldName)
: this(type, fieldName, AllDeclared) {
}
public FieldReflector(Type type, string fieldName, BindingFlags bindingFlags)
: base(type, fieldName, bindingFlags) {
using (var log = new EnterExitLogger(s_log, "type = {0}, fieldName = {1}, bindingFlags = {2}", type, fieldName, bindingFlags)) {
Info = type.GetField(fieldName, bindingFlags);
}
}
public FieldReflector(MemberInfo fieldInfo)
: base(fieldInfo) {
using (var log = new EnterExitLogger(s_log, "fieldInfo = {0}", fieldInfo)) {
}
}
public new FieldInfo Info {
get { return (FieldInfo)base.Info; }
set { base.Info = value; }
}
public object GetValue(object instance) {
return Info.GetValue(instance);
}
public void SetValue(object instance, object value) {
Info.SetValue(instance, value);
}
}
}
|
C++
|
UTF-8
| 1,668
| 2.515625
| 3
|
[] |
no_license
|
#pragma once
#include "../Include/Interface.hxx"
struct TemporalMedian final {
static constexpr auto Name = "TemporalMedian";
static constexpr auto Parameters = "clip:clip;radius:int:opt;";
self(InputClip, Clip{});
self(Radius, 1);
auto Initialize(auto Arguments, auto Console) {
InputClip = Arguments["clip"];
if (Arguments["radius"].Exists())
Radius = Arguments["radius"];
if (!InputClip.WithConstantFormat() || !InputClip.WithConstantDimensions() || !InputClip.IsSinglePrecision())
return Console.RaiseError("only single precision floating point clips with constant format and dimensions supported.");
if (Radius < 0)
return Console.RaiseError("radius cannot be negative!");
return true;
}
auto RegisterVideoInfo(auto Core) {
return InputClip.ExposeVideoInfo();
}
auto RequestReferenceFrames(auto Index, auto FrameContext) {
InputClip.RequestFrames(Index, Radius, FrameContext);
}
auto DrawFrame(auto Index, auto Core, auto FrameContext) {
auto InputFrames = InputClip.GetFrames<const float>(Index, Radius, PaddingPolicies::Temporal::Reflect, FrameContext);
auto ProcessedFrame = Core.CreateNewFrameFrom(InputFrames[0]);
auto Samples = std::vector<float>{};
Samples.resize(2 * Radius + 1);
for (auto c : Range{ ProcessedFrame.PlaneCount })
for (auto y : Range{ ProcessedFrame[c].Height })
for (auto x : Range{ ProcessedFrame[c].Width }) {
for (auto t : Range{ -Radius, Radius + 1 })
Samples[t + Radius] = InputFrames[t][c][y][x];
std::nth_element(Samples.begin(), Samples.begin() + Radius, Samples.end());
ProcessedFrame[c][y][x] = Samples[Radius];
}
return ProcessedFrame.Leak();
}
};
|
C#
|
UTF-8
| 3,772
| 3.109375
| 3
|
[] |
no_license
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace InvoiceTotal
{
public partial class frmInvoiceTotal : Form
{
public frmInvoiceTotal()
{
InitializeComponent();
}
private void btnCalculate_Click(object sender, EventArgs e)
{
try /*try and catch error to try the code and if there is an exception, catch it and
present a messagebox with an error for user to fix what was entered*/
{
if (IsValidData())
{
decimal subtotal = Convert.ToDecimal(txtSubtotal.Text); //Converts subtotal text into a decimal
decimal discountPercent = 0m; //a decimal value
if (subtotal >= 500) //if the subtotal entered is greater or equal to 500 then the percentage off is 20 percent
{
discountPercent = .2m;
}
else if (subtotal >= 250 && subtotal < 500) //if the subtotal entered is 250 and less than 500 then the percentage off is 15 percent
{
discountPercent = .15m;
}
else if (subtotal >= 100 && subtotal < 250) //if the subtotal entered is 100 and less than 250 then the percentage off is 10 percent
{
discountPercent = .1m;
}
decimal discountAmount = subtotal * discountPercent; //the discount amount is the subtotal multiplied by discount percentage off
decimal invoiceTotal = subtotal - discountAmount; //the invoice total is the subtotal minus the discount amount
txtDiscountPercent.Text = discountPercent.ToString("p1");//formats the discountpercent text to a percent format with 1 decimal place
txtDiscountAmount.Text = discountAmount.ToString("c"); //formats the discountamount to a currency format
txtTotal.Text = invoiceTotal.ToString("c"); //formats the invoicetotal value into a currency format
txtSubtotal.Focus(); //moves the focus to the subtotal text box where the outcome will be
}
}
catch
{
MessageBox.Show("Please enter a valid number for the Subutotal field", "Entry Error");
}
}
public bool IsValidData() //validates data
{
return
IsPresent(txtSubtotal, "Subtotal") &&
IsWithinRange(txtSubtotal, "Subtotal", 0, 10000);
}
public bool IsPresent(TextBox textBox, string name) //validates the error that will show up with subtotal field is not present
{
if (textBox.Text == "")
{
MessageBox.Show(name + " is a required field.", "Entry Error");
textBox.Focus();
return false;
}
return true;
}
public bool IsWithinRange(TextBox textBox, string name, decimal min, decimal max) //Validation for a range of numbers
{
decimal number = Convert.ToDecimal(textBox.Text);
if (number < min || number > max)
{
MessageBox.Show(name + " must be between " + min + " and " + max + ".", "Entry Error");
textBox.Focus();
return false;
}
return true;
}
private void btnExit_Click_1(object sender, EventArgs e)
{
this.Close();
}
}
}
|
Python
|
UTF-8
| 2,517
| 2.859375
| 3
|
[] |
no_license
|
import tkinter
class LoginScreen:
Frame=None
UsernameTextBox=None
PasswordTextBox=None
SubmitButton=None
ButtonHeight=3
ButtonWidth=10
TextBoxHeight=3
TextBoxWidth=50
root=None
invalidText=None
emailID=""
def __init__(self,root):
self.root=root
self.Frame=tkinter.Frame(root)
self.Frame.pack()
self.UsernameTextBox=tkinter.Text(self.Frame,width=self.TextBoxWidth,height=self.TextBoxHeight)
self.UsernameTextBox.insert("insert",'atharvadhanvate@gmail.com')
self.PasswordTextBox = tkinter.Text(self.Frame,width=self.TextBoxWidth,height=self.TextBoxHeight)
self.PasswordTextBox.insert("insert", '1234')
self.invalidText=tkinter.Text()
self.UsernameTextBox.pack()
self.PasswordTextBox.pack()
self.SubmitButton=tkinter.Button(self.Frame,text='Submit',width=self.ButtonWidth,height=self.ButtonHeight,command=lambda:self.__credentailValidator())
self.SubmitButton.pack()
#check for credentials: next screen if corect else invalid. called when submit clicked
def __credentailValidator(self):
correctUsername='atharvadhanvate@gmail.com'
correctPass='1234'
inputUsername = self.UsernameTextBox.get("1.0", tkinter.END).strip()
inputPass = self.PasswordTextBox.get("1.0", tkinter.END).strip()
self.invalidText.pack_forget()
print("ipUsr=",inputUsername)
print("ipPass=",inputPass)
if correctUsername==inputUsername and correctPass==inputPass:
print("Success")
self.__validCredentails()
else:
print("Fail")
self.__invalidCredentials()
def __invalidCredentials(self):
self.invalidText=tkinter.Text(self.Frame,height=self.TextBoxHeight//2,width=self.TextBoxWidth)
self.invalidText.insert('insert','Invalid username or password. Try again')
self.invalidText.config(state=tkinter.DISABLED)
self.invalidText.pack()
def __validCredentails(self):
self.emailID=self.UsernameTextBox.get("1.0", tkinter.END).strip()
self.Frame.pack_forget()
import movieSelection
canvas=movieSelection.create(self.root,self.emailID)
#self.root.destroy()
#def CreateNewAcc(self):
rootHeight=400
rootWidth=800
root=tkinter.Tk()
root.geometry('{}x{}'.format(rootWidth,rootHeight))
root.config(bg='white')
screen=LoginScreen(root)
root.mainloop()
|
PHP
|
UTF-8
| 1,856
| 3.078125
| 3
|
[] |
no_license
|
<?php
/**
*
*/
class DataValidator {
public function __construct() {
}
private function TestMinimalLength($length, $string = "") {
echo'validator';
if (strlen($string) < $length) {
return FALSE;
} else {
return TRUE;
}
}
private function TestMaximumLength($length, $string = "") {
echo'validator';
if (strlen($string) > $length) {
return FALSE;
} else {
return TRUE;
}
}
private function TestIfNumeric($string) {
echo'validator';
if (is_numeric($string)) {
return TRUE;
} else {
return FALSE;
}
}
private function TestIfInt($string) {
echo'validator';
if (is_numeric($string) && floor($string) == $string) {
return TRUE;
} else {
return FALSE;
}
}
private function TestIfBoolean($string) {
echo'validator';
if ($string == '1' || $string == 1 || $string == TRUE ||
$string == '0' || $string == 0 || $string == FALSE) {
return TRUE;
} else {
return FALSE;
}
}
private function TestIfEmail() {
echo'validator';
if (!filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) {
return TRUE;
} else {
return FALSE;
}
}
private function TestIfNotEmpty($string) {
$string = trim($string);
echo'validator';
if (empty($string) ) {
return FALSE;
} else {
return TRUE;
}
}
private function Trim($string) {
echo'validator';
return trim($string);
}
}
?>
|
C#
|
UTF-8
| 1,039
| 2.609375
| 3
|
[] |
no_license
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
// QUI16000158 | James Quinney
public class DisplayStats : MonoBehaviour
{
[SerializeField]
TMP_Text displayText;
// This will fill in a text box with the player's stats
public void UpdateDisplay()
{
string currentText = "";
Stats stats = PlayerLevelManager.instance.stats;
// Level Display
currentText += "Level: " + stats.level + "\n";
// Mathf.FloorToInt is used to negate the effects of floating point precision loss
// EXP Display
currentText += "EXP: " + Mathf.FloorToInt(stats.EXP) + "/" + Mathf.FloorToInt(stats.LevelFromEXP) + "\n";
currentText += "\n"; // Separate level/exp from health/stamina
// Health display
currentText += "Health: " + Mathf.FloorToInt(stats.MaxHealth) + "\n";
// Stamina display
currentText += "Stamina: " + Mathf.FloorToInt(stats.MaxStamina);
displayText.text = currentText;
}
}
|
C#
|
UTF-8
| 1,269
| 3.25
| 3
|
[] |
no_license
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace WebShop.Models
{
// Class to simplify work with paginated results (since we could have quite a lot of imported items)
public class PaginatedList<T> : List<T>
{
private const int PageSize = 20;
public int TotalAmount { get; }
public int PageNumber { get; }
public int TotalPages { get; }
public PaginatedList(List<T> items, int count, int pageNumber)
{
PageNumber = pageNumber;
TotalPages = (int)Math.Ceiling(count / (float)PageSize);
TotalAmount = count;
AddRange(items);
}
public bool HasPreviousPage => PageNumber > 1;
public bool HasNextPage => PageNumber < TotalPages;
public static async Task<PaginatedList<T>> CreateAsync(IQueryable<T> source, int pageNumber)
{
var count = await source.CountAsync();
var items = await source
.Skip((pageNumber - 1) * PageSize)
.Take(PageSize)
.ToListAsync();
return new PaginatedList<T>(items, count, pageNumber);
}
}
}
|
C#
|
UTF-8
| 487
| 2.640625
| 3
|
[] |
no_license
|
if(items.SelectedItem== null)
{
item.BList.Add(AllList.Where(x => x.Id == id).FirstOrDefault());
item.Blist.RemoveAll(i => i == null); // You donn't have to iterate the list to do this
foreach (var dep in item.Blist)
{
// Do whatever you want with your items or just remove the forach loop altogether
// item.Blist.RemoveAll(item => dep == null); // don't have to do this here
}
return;
}
|
Java
|
UTF-8
| 524
| 2.4375
| 2
|
[] |
no_license
|
package edu.cs.birzeit.assignment1;
public class detailsForLogin {
public String name, password;
public detailsForLogin(String name, String password) {
this.name = name;
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String passwordassword) {
this.password = password;
}
}
|
C++
|
UTF-8
| 1,376
| 2.90625
| 3
|
[] |
no_license
|
struct node
{
int val, i, j;
};
struct comp
{
bool operator()(node a, node b)
{
return a.val > b.val;
}
};
class Solution
{
public:
vector<vector<int>> kSmallestPairs(vector<int> &a, vector<int> &b, int k)
{
priority_queue<node, vector<node>, comp> q;
vector<vector<int>> ans;
unordered_map<string, int> m;
if (a.empty() || b.empty())
return ans;
q.push({a[0] + b[0], 0, 0});
m[to_string(a[0] + b[0]) + "#0" + "#0"] = 1;
while (q.size() > 0 && k > 0)
{
auto p = q.top();
q.pop();
ans.push_back({a[p.i], b[p.j]});
if (p.i <= ((int)a.size()) - 2 && m[to_string(a[p.i + 1] + b[p.j]) + "#" + to_string(p.i + 1) + "#" + to_string(p.j)] == 0)
{
q.push({a[p.i + 1] + b[p.j], p.i + 1, p.j});
m[to_string(a[p.i + 1] + b[p.j]) + "#" + to_string(p.i + 1) + "#" + to_string(p.j)] = 1;
}
if ((p.j <= ((int)b.size()) - 2) && m[to_string(a[p.i] + b[p.j + 1]) + "#" + to_string(p.i) + "#" + to_string(p.j + 1)] == 0)
{
q.push({a[p.i] + b[p.j + 1], p.i, p.j + 1});
m[to_string(a[p.i] + b[p.j + 1]) + "#" + to_string(p.i) + "#" + to_string(p.j + 1)] = 1;
}
k--;
}
return ans;
}
};
|
C++
|
UTF-8
| 130
| 2.640625
| 3
|
[] |
no_license
|
#pragma once
class Edge
{
public:
int from = 0;
int to = 0;
int weight = 0;
Edge(int from, int to, int weight);
~Edge();
};
|
Java
|
UTF-8
| 1,493
| 2.5625
| 3
|
[] |
no_license
|
package com.niit.goonline.DAOImpl;
import java.util.List;
import javax.transaction.Transactional;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.niit.goonline.DAO.ProductDAO;
import com.niit.goonline.model.Products;
@Repository("productDAO")
public class ProductDaoImpl implements ProductDAO {
@Autowired
private SessionFactory sessionFactory;
// At the time of creation of instance, you have to pass sessionFactory
public ProductDaoImpl(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
System.out.println(sessionFactory);
}
public List<Products> list() {
Session session = sessionFactory.getCurrentSession();
Query query = session.createQuery("from Product");
List<Products> productList = query.list();
session.flush();
return productList;
}
public Products get(String id) {
return (Products) sessionFactory.getCurrentSession().get(Products.class, id);
}
@Transactional
public boolean save(Products product) {
try {
sessionFactory.getCurrentSession().save(product);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
public boolean update(Products product) {
try {
sessionFactory.getCurrentSession().update(product);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
}
|
PHP
|
UTF-8
| 502
| 2.859375
| 3
|
[] |
no_license
|
<?php
declare(strict_types=1);
namespace CloudDfe\Sdk;
class Base
{
protected $client;
public function __construct(Client $client)
{
$this->client = $client;
}
protected static function checkKey(array $payload): string
{
$key = preg_replace("/[^0-9]/", "", $payload['chave']);
if (empty($key) || strlen($key) != 44) {
throw new \Exception('A chave para gerar o PDF deve ter 44 digitos numericos');
}
return $key;
}
}
|
Markdown
|
UTF-8
| 469
| 2.8125
| 3
|
[
"MIT"
] |
permissive
|
1. git clone repository
2. masuk ke folder
3. Berikan perintah berikut:
```$ composer install ```
4. Pada folder bisa ditemukan sebuah file .env-example, copy isi dari file tersebut lalu buat file dengan nama ".env" dan paste ke file ".env" tersebut.
5. setelah selesai perintah sebelumnya, berikan perintah berikut:
``` $ php artisan key:generate ```
6. Buat branch dengan nama sendiri.
7. Jalankan server dengan artisan serve:
``` $ php artisan serve ```
|
PHP
|
UTF-8
| 2,416
| 2.921875
| 3
|
[
"MIT"
] |
permissive
|
<?php
/**
* Vainyl
*
* PHP Version 7
*
* @package Core
* @license https://opensource.org/licenses/MIT MIT License
* @link https://vainyl.com
*/
declare(strict_types=1);
namespace Vainyl\Core\Comparator\Decorator;
use Vainyl\Core\AbstractIdentifiable;
use Vainyl\Core\Comparator\ComparatorInterface;
use Vainyl\Core\IdentifiableInterface;
/**
* Class AbstractComparatorDecorator
*
* @author Taras P. Girnyk <taras.p.gyrnik@gmail.com>
*/
abstract class AbstractComparatorDecorator extends AbstractIdentifiable implements ComparatorInterface
{
private $comparator;
/**
* AbstractComparatorDecorator constructor.
*
* @param ComparatorInterface $comparator
*/
public function __construct(ComparatorInterface $comparator)
{
$this->comparator = $comparator;
}
/**
* @inheritDoc
*/
public function eq(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->eq($what, $to);
}
/**
* @inheritDoc
*/
public function neq(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->neq($what, $to);
}
/**
* @inheritDoc
*/
public function lt(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->lt($what, $to);
}
/**
* @inheritDoc
*/
public function gt(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->gt($what, $to);
}
/**
* @inheritDoc
*/
public function lte(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->lte($what, $to);
}
/**
* @inheritDoc
*/
public function gte(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->gte($what, $to);
}
/**
* @inheritDoc
*/
public function like(IdentifiableInterface $what, IdentifiableInterface $to): bool
{
return $this->comparator->like($what, $to);
}
/**
* @inheritDoc
*/
public function compare(IdentifiableInterface $what, IdentifiableInterface $to): int
{
return $this->comparator->compare($what, $to);
}
/**
* @inheritDoc
*/
public function getName(): string
{
return $this->comparator->getName();
}
}
|
PHP
|
UTF-8
| 2,837
| 2.59375
| 3
|
[] |
no_license
|
<?php
namespace Walterra\J4p5Bundle\j4p5\parse;
use \Walterra\J4p5Bundle\j4p5\parse\Bug;
use \Walterra\J4p5Bundle\j4p5\parse\Helpers;
use \Walterra\J4p5Bundle\j4p5\parse\token;
class Helpers {
public static $FA_NO_MARK = 99999;
static public function bug_unless($assertion, $gripe='Bug found.') { if (!$assertion) throw new Bug($gripe); }
static public function span($class, $text, $title='') {
$title = htmlspecialchars($title);
if ($title) $extra = " title=\"$title\"";
else $extra = '';
echo "<span class=\"$class\"{$extra}>".$text."</span>\n";
}
static public function gen_label() {
# Won't return the same number twice. Note that we use state labels
# for hash keys all over the place. To prevent PHP from doing the
# wrong thing when we merge such hashes, we tack a letter on the
# front of the labels.
static $count = 0;
$count ++;
return 's'.$count;
}
/*
Note that you should really throw away any NFA once you have
used one of the below functions on it, because the result will contain
indentically named state labels from the originals. We could fix this
apparent problem, but it would mean establishing a state-renaming function
for NFAs. Because I don't care to do this just now, and it's not important
anyway, I'm not doing it.
*/
static public function nfa_union($nfa_list) {
$out = new enfa();
foreach($nfa_list as $nfa) {
$out->copy_in($nfa);
$out->add_epsilon($out->initial, $nfa->initial);
$out->add_epsilon($nfa->final, $out->final);
}
return $out;
}
static public function nfa_concat($nfa_list) {
$out = new enfa();
$last_state = $out->initial;
foreach($nfa_list as $nfa) {
$out->copy_in($nfa);
$out->add_epsilon($last_state, $nfa->initial);
$last_state = $nfa->final;
}
$out->add_epsilon($last_state, $out->final);
return $out;
}
public static function null_token() { return new token('','','',''); }
public static function preg_pattern($regex, $type, $ignore, $action) {
return array($regex, $type, $ignore, $action);
}
public static function preg_pattern_test($pattern, $string) {
if (preg_match($pattern.'A', $string, $match)) return $match;
}
public static function send_parse_error_css_styles() {
?>
<style>
.term { border: 1px solid green; margin: 2px; }
.char { border: 1px solid red; margin: 2px; }
.nonterm { border: 1px solid blue; margin: 10px; }
.wierd { border: 1px solid purple; margin: 2px; }
pre { line-height: 1.5; }
</style>
<?php
}
}
?>
|
Java
|
UTF-8
| 12,511
| 1.8125
| 2
|
[
"MIT"
] |
permissive
|
package fi.solita.utils.api;
import static fi.solita.utils.functional.Collections.emptyList;
import static fi.solita.utils.functional.Collections.newList;
import static fi.solita.utils.functional.Collections.newMutableList;
import static fi.solita.utils.functional.Collections.newSet;
import static fi.solita.utils.functional.Collections.newSortedSet;
import static fi.solita.utils.functional.Functional.concat;
import static fi.solita.utils.functional.Functional.cons;
import static fi.solita.utils.functional.Functional.distinct;
import static fi.solita.utils.functional.Functional.exists;
import static fi.solita.utils.functional.Functional.filter;
import static fi.solita.utils.functional.Functional.flatMap;
import static fi.solita.utils.functional.Functional.flatten;
import static fi.solita.utils.functional.Functional.forall;
import static fi.solita.utils.functional.Functional.group;
import static fi.solita.utils.functional.Functional.head;
import static fi.solita.utils.functional.Functional.map;
import static fi.solita.utils.functional.Functional.size;
import static fi.solita.utils.functional.Functional.sort;
import static fi.solita.utils.functional.Functional.subtract;
import static fi.solita.utils.functional.FunctionalM.find;
import static fi.solita.utils.functional.FunctionalM.groupBy;
import static fi.solita.utils.functional.Predicates.equalTo;
import static fi.solita.utils.functional.Predicates.greaterThan;
import static fi.solita.utils.functional.Predicates.not;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import fi.solita.utils.api.format.SerializationFormat;
import fi.solita.utils.api.functions.FunctionProvider;
import fi.solita.utils.api.resolving.ResolvableMember;
import fi.solita.utils.api.resolving.ResolvableMemberProvider;
import fi.solita.utils.api.resolving.ResolvableMemberProvider_;
import fi.solita.utils.api.types.PropertyName;
import fi.solita.utils.api.types.PropertyName_;
import fi.solita.utils.api.util.MemberUtil;
import fi.solita.utils.api.util.MemberUtil_;
import fi.solita.utils.api.util.RedundantPropertiesException;
import fi.solita.utils.functional.Apply;
import fi.solita.utils.functional.Collections;
import fi.solita.utils.functional.Function;
import fi.solita.utils.functional.Functional;
import fi.solita.utils.functional.Option;
import fi.solita.utils.functional.Transformers;
import fi.solita.utils.functional.lens.Builder;
import fi.solita.utils.meta.MetaNamedMember;
public class Includes<T> implements Iterable<MetaNamedMember<T,?>> {
public static class InvalidResolvableExclusionException extends RuntimeException {
public final MetaNamedMember<?,?> member;
public InvalidResolvableExclusionException(MetaNamedMember<?,?> member) {
super(member.getName());
this.member = member;
}
}
public final List<MetaNamedMember<T, ?>> includesFromColumnFiltering;
public final List<MetaNamedMember<T, ?>> includesFromRowFiltering;
public final List<MetaNamedMember<T, ?>> geometryMembers;
public final Builder<?>[] builders;
public final boolean includesEverything;
public final List<MetaNamedMember<T, ?>> includes() {
return newList(distinct(concat(includesFromColumnFiltering, includesFromRowFiltering)));
}
public static final <T> Includes<T> none() {
return new Includes<T>(Collections.<MetaNamedMember<? super T, ?>>emptyList(), Collections.<MetaNamedMember<? super T, ?>>emptyList(), Collections.<MetaNamedMember<? super T, ?>>emptyList(), false);
}
public static final <T> Includes<T> all(Collection<? extends MetaNamedMember<? super T,?>> includes, Builder<?>[] builders) {
return new Includes<T>(Includes.withNestedMembers(includes, Include.All, builders), Collections.<MetaNamedMember<? super T, ?>>emptyList(), Collections.<MetaNamedMember<? super T, ?>>emptyList(), true);
}
@SuppressWarnings("unchecked")
public Includes(Iterable<? extends MetaNamedMember<? super T,?>> includesColumn, Iterable<? extends MetaNamedMember<? super T,?>> includesRow, Iterable<? extends MetaNamedMember<? super T, ?>> geometryMembers, boolean includesEverything, Builder<?>... builders) {
this.includesFromColumnFiltering = newList((Iterable<MetaNamedMember<T, ?>>) includesColumn);
this.includesFromRowFiltering = newList((Iterable<MetaNamedMember<T, ?>>) includesRow);
this.geometryMembers = newList((Iterable<MetaNamedMember<T, ?>>) geometryMembers);
this.builders = builders;
this.includesEverything = includesEverything;
}
@Override
public Iterator<MetaNamedMember<T, ?>> iterator() {
return includes().iterator();
}
/**
* Convert to Includes of a subtype
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public <SUB extends T> Includes<SUB> cast(Builder<?>[] subtypeBuilders) {
return new Includes(includesFromColumnFiltering, includesFromRowFiltering, geometryMembers, false, subtypeBuilders);
}
@Deprecated
public static final <T> Includes<T> resolveIncludes(ResolvableMemberProvider provider, FunctionProvider fp, SerializationFormat format, Iterable<PropertyName> propertyNames, final Collection<? extends MetaNamedMember<? super T,?>> members, Builder<?>[] builders, Iterable<? extends MetaNamedMember<? super T,?>> geometries, boolean onlyExact) {
return resolveIncludes(provider, fp, format, Option.of(propertyNames), members, builders, geometries, onlyExact);
}
/**
*
* @param members All members of T, which would be possible to use for filtering the result.
* @param builders Builders defining what are considered as "nested properties". That is, these define the objects in the hierarchy whose members can be filtered with <i>propertyName</i>
* @param propertyNames Filtering given by the API user. Empty if not given.
* @param geometries Geometry members. Subset of <i>members</i>.
*/
@SuppressWarnings("unchecked")
public static final <T> Includes<T> resolveIncludes(ResolvableMemberProvider provider, FunctionProvider fp, SerializationFormat format, Option<? extends Iterable<PropertyName>> propertyNames, final Collection<? extends MetaNamedMember<? super T,?>> members, Builder<?>[] builders, Iterable<? extends MetaNamedMember<? super T,?>> geometries, boolean onlyExact) {
List<MetaNamedMember<? super T, ?>> ret = null;
boolean includesEverything = false;
if (propertyNames.isDefined() && newList(propertyNames.get()).size() > newSet(map(PropertyName_.toProperty.apply(Function.__, fp), propertyNames.get())).size()) {
throw new RedundantPropertiesException(newSortedSet(flatten(filter(Transformers.size.andThen(greaterThan(1l)), group(sort(map(PropertyName_.toProperty.apply(Function.__, fp), propertyNames.get())))))));
}
if (propertyNames.isDefined() && (Functional.isEmpty(propertyNames.get()) ||
size(propertyNames.get()) == 1 && head(propertyNames.get()).isEmpty(fp))) {
// propertyNames is empty or contains only the empty string
ret = emptyList();
} else if (!propertyNames.isDefined() || forall(PropertyName_.isExclusion, propertyNames.get())) {
// if no propertyNames given, or given but contains only exclusions:
// For PNG exclude everything (geometry included back in the end)
// For HTML and spreadsheet formats, exclude parent of nested members.
// For others, include everything.
switch (format) {
case PNG:
ret = emptyList();
break;
case CSV:
case XLSX:
case HTML:
ret = Includes.withNestedMembers(members, Includes.Include.OnlyLeaf, builders);
break;
case GEOJSON:
case GML:
case JSON:
case JSONL:
case XML:
case COUNT:
ret = Includes.withNestedMembers(members, Includes.Include.All, builders);
break;
}
if (!propertyNames.isDefined()) {
includesEverything = true;
}
} else {
ret = newList(flatMap(MemberUtil_.<T>toMembers().ap(provider, fp, onlyExact, Includes.withNestedMembers(members, Includes.Include.All, builders)), filter(not(PropertyName_.isExclusion), ((Option<Iterable<PropertyName>>)propertyNames).getOrElse(Collections.<PropertyName>emptyList()))));
}
// Include geometries for png/geojson/gml even if not explicitly requested
switch (format) {
case PNG:
case GEOJSON:
case GML:
for (MetaNamedMember<? super T,?> geometry: geometries) {
if (!exists(MemberUtil_.memberName.andThen(equalTo((CharSequence)geometry.getName())), ret)) {
ret = newList(cons(geometry, ret));
}
}
break;
case JSON:
case JSONL:
case HTML:
case CSV:
case XLSX:
case XML:
case COUNT:
}
// Exclusions. Also excludes geometries if explicitly excluded.
List<MetaNamedMember<? super T, ?>> toRemove = newList(flatMap(MemberUtil_.<T>toMembers().ap(provider, fp, false, Includes.withNestedMembers(members, Includes.Include.All, builders)), map(PropertyName_.omitExclusion, filter(PropertyName_.isExclusion, ((Option<Iterable<PropertyName>>)propertyNames).getOrElse(Collections.<PropertyName>emptyList())))));
ret = newList(subtract(ret, toRemove));
if (toRemove != null) {
for (MetaNamedMember<?,?> m: toRemove) {
if (ResolvableMemberProvider.isResolvableMember(m)) {
throw new Includes.InvalidResolvableExclusionException(m);
}
}
}
final Map<String, List<MetaNamedMember<? super T, ?>>> resolvable = groupBy(MemberUtil_.memberName, filter(ResolvableMemberProvider_.isResolvableMember, ret));
ret = newList(distinct(map(new Apply<MetaNamedMember<? super T,?>, MetaNamedMember<? super T,?>>() {
@Override
public MetaNamedMember<? super T, ?> apply(MetaNamedMember<? super T, ?> t) {
Option<List<MetaNamedMember<? super T, ?>>> x = find(t.getName(), resolvable);
if (x.isDefined()) {
return ResolvableMember.combineAll(x.get());
} else {
return t;
}
}
}, ret)));
return new Includes<T>(ret, ret, geometries, includesEverything, builders);
}
public enum Include {
All,
OnlyLeaf,
NoBuildable
}
/**
* Returns "nested properties" hierarchically. That is, those for which there is a builder in <i>builders</i>.
* For example, if:
* <p>Foo { A a, B b, C c } and B { A a } and C { A a }
* <p>then
* <code>withNestedMembers([foo.a, foo.b, foo.c], Builder<A>, Builder<B>)</code>
* <p>would return [a, a.b, a.b.a, b, b.a, c]
*/
@SuppressWarnings("unchecked")
public static <T> List<MetaNamedMember<? super T, ?>> withNestedMembers(Collection<? extends MetaNamedMember<? super T, ?>> members, Includes.Include include, Builder<?>... builders) {
List<MetaNamedMember<? super T, ?>> ret = newMutableList();
for (MetaNamedMember<? super T, ?> member: members) {
ret.add(member);
for (Builder<?> builder: MemberUtil.findBuilderFor(newList(builders), MemberUtil.memberClassUnwrappingGeneric(member))) {
if (include == Includes.Include.NoBuildable) {
ret.remove(member);
}
for (MetaNamedMember<?, ?> nestedMember: withNestedMembers((Collection<? extends MetaNamedMember<T, ?>>) builder.getMembers(), include, builders)) {
ret.add(NestedMember.unchecked(member, nestedMember));
if (include == Includes.Include.OnlyLeaf) {
ret.remove(member);
}
}
}
}
return ret;
}
}
|
Java
|
UTF-8
| 2,526
| 1.953125
| 2
|
[] |
no_license
|
package com.shangde.edu.feed.service;
import com.shangde.edu.feed.condition.QueryStatCommonCondition;
import com.shangde.edu.feed.domain.UserUse;
public interface IUserUse {
/**
* 添加
*
* @param userUse
* @return
*/
public int addUserUse(UserUse userUse);
/**
* 条件查询
*
* 需要三个参数 startTime,endTime,type[1=注册点击,2=注册成功,3=登录点击,4=登录成功]
*
* @param queryStatCommonCondition;
* @return
*/
public int getUserUseCount(QueryStatCommonCondition queryStatCommonCondition);
public int getUserUseGroupCount(
QueryStatCommonCondition queryStatCommonCondition);
/**
* 根据时间段,type,fromId查询
*
* @param queryStatCommonCondition
* @return
*/
public int getUserUseAndTypeFromIdCount(
QueryStatCommonCondition queryStatCommonCondition);
/**
* 日数据量查询
*
* 需要 type参数[1=注册点击,2=注册成功,3=登录点击,4=登录成功]
*
* @param type
*
* @return
*/
public int getUserUseDATECount(int type);
/**
* 日数据查询
*
* @return
*/
public int getUserUseDATEGroupCount();
/**
* 日数据查询,条件type=2/4,fromId=(num),根据渠道查询
*
* @param queryStatCommonCondition
* @return
*/
public int getUserUseDATEAndTypeFromIdCount(
QueryStatCommonCondition queryStatCommonCondition);
/**
* 周数据量查询
*
* 需要 type参数[1=注册点击,2=注册成功,3=登录点击,4=登录成功]
*
* @param type
* @return
*/
public int getUserUseWEEKCount(int type);
/**
* 周数据查询
*
* @return
*/
public int getUserUseWEEKGroupCount();
/**
* 周数据查询,条件type=2/4,fromId=(num),根据渠道查询
*
* @param queryStatCommonCondition
* @return
*/
public int getUserUseWEEKAndTypeFromIdCount(
QueryStatCommonCondition queryStatCommonCondition);
/**
* 月数据量查询
*
* 需要 type参数[1=注册点击,2=注册成功,3=登录点击,4=登录成功]
*
* @param type
* @return
*/
public int getUserUseMONTHCount(int type);
/**
* 月数据查询
*
* @return
*/
public int getUserUseMONTHGroupCount();
/**
* 月数据查询,条件type=2/4,fromId=(num),根据渠道查询
*
* @param queryStatCommonCondition
* @return
*/
public int getUserUseMONTHAndTypeFromIdCount(
QueryStatCommonCondition queryStatCommonCondition);
}
|
C#
|
UTF-8
| 5,043
| 2.59375
| 3
|
[
"MIT"
] |
permissive
|
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using ClientFramework;
namespace ClientPlatform
{
public sealed class WebClient : IWebClient
{
private readonly HttpClient httpClient;
private readonly IStringSerializer stringSerializer;
private readonly IStringDeserializer stringDeserializer;
private readonly IFilledUrlFactory filledUrlRetriever;
public WebClient(HttpClient httpClient, IStringSerializer stringSerializer, IStringDeserializer stringDeserializer, IFilledUrlFactory filledUrlRetriever)
{
this.httpClient = httpClient;
this.stringSerializer = stringSerializer;
this.stringDeserializer = stringDeserializer;
this.filledUrlRetriever = filledUrlRetriever;
}
public RoutedServiceResponse<TResponse> Send<TRequest, TResponse>(TRequest request, string fullUrl, RouteVerb routeVerb)
{
string filledUrl = filledUrlRetriever.GetFilledUrl(request, fullUrl, routeVerb);
var webRequest = WebRequest.Create(filledUrl);
webRequest.Method = routeVerb.ToString();
webRequest.Headers.Add("accept", "application/json");
if (routeVerb != RouteVerb.Get && routeVerb != RouteVerb.Delete)
{
var content = stringSerializer.Serialize(request);
var contentAsByteArray = Encoding.UTF8.GetBytes(content);
webRequest.ContentType = "application/json";
webRequest.ContentLength = contentAsByteArray.Length;
using (var requestStream = webRequest.GetRequestStream())
{
requestStream.Write(contentAsByteArray, 0, contentAsByteArray.Length);
}
}
HttpWebResponse webResponse = null;
try
{
webResponse = (HttpWebResponse)webRequest.GetResponse();
}
catch (WebException exception)
{
if(exception.Status != WebExceptionStatus.ProtocolError)
{
throw exception;
}
webResponse = (HttpWebResponse)exception.Response;
}
if (webResponse.StatusCode != HttpStatusCode.OK)
{
return new RoutedServiceResponse<TResponse>(default(TResponse), false, webResponse.StatusDescription);
}
string responseAsString = string.Empty;
using (var responseData = webResponse.GetResponseStream())
using (var streamReader = new StreamReader(responseData))
{
responseAsString = streamReader.ReadToEnd();
}
return CreateSuccessResponse<TResponse>(responseAsString);
}
private async Task<RoutedServiceResponse<TResponse>> SendAsync<TRequest, TResponse>(TRequest request, string fullUrl, RouteVerb routeVerb)
{
string filledUrl = filledUrlRetriever.GetFilledUrl(request, fullUrl, routeVerb);
var verb = MapVerb(routeVerb);
var httpMessageRequest = new HttpRequestMessage(verb, filledUrl);
httpMessageRequest.Headers.Add("accept", "application/json");
if (routeVerb != RouteVerb.Get && routeVerb != RouteVerb.Delete)
{
var requestAsString = new StringContent(stringSerializer.Serialize(request), Encoding.UTF8, "application/json");
httpMessageRequest.Content = requestAsString;
}
var httpResponse = await httpClient.SendAsync(httpMessageRequest);
if (!httpResponse.IsSuccessStatusCode)
{
return new RoutedServiceResponse<TResponse>(default(TResponse), false, httpResponse.ReasonPhrase);
}
var responseAsString = await httpResponse.Content.ReadAsStringAsync();
return CreateSuccessResponse<TResponse>(responseAsString);
}
private RoutedServiceResponse<TResponse> CreateSuccessResponse<TResponse>(string responseAsString)
{
return new RoutedServiceResponse<TResponse>(stringDeserializer.Deserialize<TResponse>(responseAsString), true, string.Empty);
}
private HttpMethod MapVerb(RouteVerb routeVerb)
{
switch (routeVerb)
{
case RouteVerb.Post:
return HttpMethod.Post;
case RouteVerb.Get:
return HttpMethod.Get;
case RouteVerb.Put:
return HttpMethod.Put;
case RouteVerb.Delete:
return HttpMethod.Delete;
case RouteVerb.Patch:
return new HttpMethod("PATCH");
default:
throw new ArgumentOutOfRangeException(nameof(routeVerb), routeVerb, null);
}
}
}
}
|
C++
|
UTF-8
| 595
| 2.921875
| 3
|
[] |
no_license
|
#include <bits/stdc++.h>
using namespace std;
class A
{
public:
int a, b;
A(int k)
{
a = 0, b = k;
}
A() {}
void setData(int a, int b)
{
this->a = a;
this->b = b;
}
void getData()
{
cout << "a= " << a << " b= " << b << endl;
}
};
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
// freopen("input1.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
#endif
A a;
int k = 23;
a.setData(2, 3);
a.getData();
A s = k;
s.getData();
cout << endl;
return 0;
}
|
C++
|
UTF-8
| 1,890
| 2.59375
| 3
|
[] |
no_license
|
#include "proceduralgrass.h"
#include <random>
const GLuint ATTRIBINDEX_VERTEX = 0;
ProceduralGrass::ProceduralGrass() {
initializeOpenGLFunctions();
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
glGenBuffers(1, &posVbo);
glEnableVertexAttribArray(ATTRIBINDEX_VERTEX);
glBindBuffer(GL_ARRAY_BUFFER, posVbo);
const int numNodes = 14;
const GLfloat gridStep = 3.0f;
const GLfloat xDispAmp = 5.0f;
const GLfloat zDispAmp = 5.0f;
const GLfloat yDispAmp = 0.3f;
numClusters = numNodes * numNodes;
GLfloat *vertices = new GLfloat[numClusters * 4];
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_real_distribution<GLfloat> xDisp(-xDispAmp, xDispAmp);
std::uniform_real_distribution<GLfloat> yDisp(-yDispAmp, yDispAmp);
std::uniform_real_distribution<GLfloat> zDisp(-zDispAmp, zDispAmp);
std::uniform_int_distribution<GLint> numStems(12, 64);
for(int i = 0; i < numNodes; ++i) {
for(int j = 0; j < numNodes; ++j) {
const int idx = (i * numNodes + j) * 4;
vertices[idx] = (i - numNodes / 2) * gridStep + xDisp(mt);
vertices[idx + 1] = yDisp(mt);
vertices[idx + 2] = (j - numNodes / 2) * gridStep + zDisp(mt);
vertices[idx + 3] = numStems(mt);
}
}
glVertexAttribPointer(ATTRIBINDEX_VERTEX, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * numClusters * 4, vertices, GL_STATIC_DRAW);
glFinish();
delete[] vertices;
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
}
void ProceduralGrass::draw() {
glBindVertexArray(vao);
glPatchParameteri(GL_PATCH_VERTICES, 1);
glDrawArrays(GL_PATCHES, 0, numClusters);
glBindVertexArray(0);
}
ProceduralGrass::~ProceduralGrass() {
glDeleteBuffers(1, &posVbo);
glDeleteVertexArrays(1, &vao);
}
|
Python
|
UTF-8
| 1,030
| 4.125
| 4
|
[] |
no_license
|
class OrcRace:
def __init__(self, name, damage, health):
self.name = name
self.damage = damage
self.health = health
def deal_damage(self):
print(f"Unit {self.name} dealt {self.damage} damage")
def goto(self, x, y):
print(f"Unit {self.name} went to {x} {y}")
class Troll(OrcRace):
def throw_spear(self):
print(f"Unit {self.name} threw spear")
super().deal_damage()
class Tauren(OrcRace):
def __init__(self, name, damage, health, special_totem=False):
self.special_totem = special_totem
super().__init__(name, damage, health)
def use_totem(self):
print(f"The unit {self.name} used totem")
super().deal_damage()
if self.special_totem:
print(f"The unit {self.name} used Special Totem and dealt additional damage")
troll = Troll('Troll', 20, 100)
troll.throw_spear()
troll.goto(45,90)
print("---------------------------------------")
tauren = Tauren('Tauren', 50, 200, True)
tauren.use_totem()
|
JavaScript
|
UTF-8
| 3,845
| 2.6875
| 3
|
[
"MIT"
] |
permissive
|
import React, { useState } from 'react';
import { Nav } from 'react-bootstrap';
import Header from './common/header.js';
import Button from 'react-bootstrap/Button';
import { useDispatch } from 'react-redux';
import { searchTweets } from "./../features/twitter";
import InputGroup from 'react-bootstrap/InputGroup';
import Tab from 'react-bootstrap/Tab';
import Form from 'react-bootstrap/Form'
import FormControl from 'react-bootstrap/FormControl';
import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
/* Allow user to place a new search request for inputted handle and any additional search parameters */
const NewSearch = () => {
const dispatch = useDispatch();
const currUser = useSelector(state => state.auth.currUser);
const history = useHistory();
const [handle, setHandle] = useState();
const [words, setWords] = useState();
const onFinish = () => {
dispatch(searchTweets(handle, words, currUser));
history.push('/dashboard');
}
const handleFinish = (event) => {
setHandle(event.target.value);
}
const wordsFinish = (event) => {
setWords(event.target.value)
}
return (
<>
<Header />
<h1 className="Home-header">New Search</h1>
<Tab.Container defaultActiveKey="1">
<Nav justify variant="tabs" defaultActiveKey="1">
<Nav.Item>
<Nav.Link eventKey="1">Step 1: Twitter Handle</Nav.Link>
</Nav.Item>
<Nav.Item>
<Nav.Link eventKey="2">Step 2: Search Parameters</Nav.Link>
</Nav.Item>
<Nav.Item>
<Nav.Link eventKey="3">Step 3: Review and Submit</Nav.Link>
</Nav.Item>
</Nav>
<Form className="tab">
<Tab.Content>
<Tab.Pane eventKey="1">
<Form.Group controlId="input-handles" name="handle" onChange={handleFinish}
rules={[
{
required: true,
message: 'Please input the Twitter handle.',
},
]}>
<Form.Label>Please enter the Twitter handle of the Twitter account you wish
to perform a search on.
</Form.Label>
<InputGroup>
<InputGroup.Prepend>
<InputGroup.Text id="basic-addon1">@</InputGroup.Text>
</InputGroup.Prepend>
<FormControl
placeholder="Twitter Handle"
aria-label="Twitter Handle"
aria-describedby="basic-addon1"
/>
</InputGroup>
</Form.Group>
</Tab.Pane>
<Tab.Pane eventKey="2">
<p>Our application will search your tweets against a comprehensive list our team
of developers created to find any potentially inappropriate language. If you would like to add your own words
to be queried for, please enter them below. Leave blank if you do not wish to add any more parameters.</p>
<Form.Group controlId="additional-search-params-text" name="words" onChange={wordsFinish}>
<FormControl as="textarea" placeholder="Enter words, separated by commas, you wish to additionally query for." />
</Form.Group>
</Tab.Pane>
<Tab.Pane eventKey="3">
<h3>Review Search Details</h3>
<h5>Almost Done! Before submitting, please review the information below. If all is
correct, complete your order by clicking "Submit."</h5>
<p>Twitter handle: @{handle}</p>
<p>Additional Search Parameters: {words}</p>
<Button type="primary" className="submit-form" htmlType="submit" onClick={onFinish}>Submit</Button>
</Tab.Pane>
</Tab.Content>
</Form>
</Tab.Container>
</>
);
};
export default NewSearch;
|
Ruby
|
UTF-8
| 1,342
| 2.546875
| 3
|
[
"MIT"
] |
permissive
|
# frozen_string_literal: true
require 'lighthouse/audit_service'
RSpec.describe AuditService do
let(:runner) { double }
let(:url) { 'example.com' }
let(:audit) { :performance }
let(:score) { 75 }
subject { described_class.new(url, audit, score) }
before do
Lighthouse::Matchers.lighthouse_cli = 'lighthouse-stub'
Lighthouse::Matchers.runner = runner
end
describe '#passing_score?' do
context 'when the score matches' do
it 'returns true' do
stub_command(response_fixture)
expect(subject.passing_score?).to eq true
end
end
context 'when the score is below the threshold' do
it 'returns false' do
stub_command(response_fixture(score - 1))
expect(subject.passing_score?).to eq false
end
end
context 'when the score is above the threshold' do
it 'returns true' do
stub_command(response_fixture(score + 1))
expect(subject.passing_score?).to eq true
end
end
end
private
def stub_command(result)
allow(runner)
.to receive(:call)
.with("lighthouse-stub 'example.com' --quiet --output=json --only-categories=#{audit}")
.and_return(result)
end
def response_fixture(result_score = score)
JSON.generate(categories: { audit => { score: result_score / 100.0 } })
end
end
|
Python
|
UTF-8
| 1,800
| 3.6875
| 4
|
[] |
no_license
|
from string import punctuation, digits, printable
import csv
def extract_words(input_string):
"""
Helper function for bag_of_words()
Inputs a text string
Returns a list of lowercase words in the string.
Punctuation and digits are separated out into their own words.
"""
for c in punctuation + digits:
input_string = input_string.replace(c, ' ' + c + ' ')
# return [ps.stem(w) for w in input_string.lower().split()]
return input_string.lower().split()
def bag_of_words(texts):
"""
Inputs a list of string reviews
Returns a dictionary of unique unigrams occurring over the input
Feel free to change this code as guided by Section 3 (e.g. remove stopwords, add bigrams etc.)
"""
dictionary = {} # maps word to unique index
for text in texts:
word_list = extract_words(text)
for word in word_list:
if word not in dictionary:
dictionary[word] = len(dictionary)
return dictionary
def extract_bow_feature_vectors(reviews, dictionary):
"""
Inputs a list of string reviews
Inputs the dictionary of words as given by bag_of_words
Returns the bag-of-words feature matrix representation of the data.
The returned matrix is of shape (n, m), where n is the number of reviews
and m the total number of entries in the dictionary.
"""
num_reviews = len(reviews)
feature_matrix = np.zeros([num_reviews, len(dictionary)])
for i, text in enumerate(reviews):
word_list = extract_words(text)
for word in word_list:
if word in dictionary:
feature_matrix[i, dictionary[word]] = 1
# We want the feature vectors as columns
return feature_matrix.T
|
Python
|
UTF-8
| 1,222
| 2.71875
| 3
|
[] |
no_license
|
from __future__ import print_function
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
import pandas as pd
import sys
ps = PorterStemmer()
sentiment = open("C:\\Users\\teja\\Documents\\1.MS\\1.Masters\\Semester-2\\800-AdvancedMachineLearning\\Twitter\\sentiments1000_byProf.csv", "w+")
ip_file = pd.read_csv('C:\\Users\\teja\\Documents\\1.MS\\1.Masters\\Semester-2\\800-AdvancedMachineLearning\\Twitter\\1000TweetsOrlandoStrong.csv')
names = ip_file['from_user_screen_name']
content = ip_file['content']
word_file = open(sys.argv[1])
scores = {} # initialize an empty dictionary
for line in word_file:
term, score = line.split("\t")
scores[term] = int(score)
for i in range(len(content)):
twt = content.ix[i]
#print(twt)
twt = twt.decode('ascii', 'ignore')
twt = twt.encode('ascii', 'ignore')
ter = twt.split(" ")
summ = 0
for a in ter:
# print a
#include the below commented line inorder to stem the words
#a = ps.stem(a)
if a in scores:
summ = summ + scores.get(a)
print (summ, file = sentiment)
'''
words = ["eating","crawling","crying","hit","hello","eater"]
for w in words:
print (ps.stem(w))
'''
|
C#
|
UTF-8
| 243
| 2.609375
| 3
|
[] |
no_license
|
public class MyCustomLogger : ISuperLogger
{
public void Log(string toLog)
{
UnityEngine.Debug.Log(toLog);
}
~MyCustomLogger()
{
UnityEngine.Debug.Log("MyCustomLogger was destroyed from the GC");
}
}
|
Java
|
UTF-8
| 193
| 1.835938
| 2
|
[] |
no_license
|
package com.example.radiobe.database;
import com.example.radiobe.models.RadioItem;
import java.util.List;
public interface DatabaseReaderListener {
void done(List<RadioItem> streams);
}
|
Markdown
|
UTF-8
| 8,616
| 2.734375
| 3
|
[] |
no_license
|
# 2018公益演講心得文之一BY李兄
# 績優股夢想家
加入社團剛好滿一年了,因為工作的關係,很多社團辦的活動無法參與。這次尼莫大和麥克風大辦的投資公益講座是第一次參加。時間安排上也是排除很多困難才好不容易來參與這次的講座。因為個人較懶惰且文筆不好,本來不好意思來發上課心得,在社團黃大的鼓勵下厚著臉皮來發一篇上課心得,寫的不好請多多指教,希望可以鞭小力一點。
本人追蹤尼莫大的部落格與粉絲頁大概有6-7年了,這次是第一次看到本人,尼莫給人一種文人氣息與`儒生’風範,覺得非常客氣與和善。貓大是最近這一年加入社團後才開始接觸他的投資方法與理念,這次上過貓大的課之後也要將貓大的粉絲頁與部落格做為長期追蹤的目標。
以下為上課心得整理。
貓大上課講的第一件事引用巴菲特所說:對一般人而言長期投入指數型基金可以獲得穩定的報酬。做為開場。
接下來講述了其投資SOP的十二字箴言: 「分散投資.價值選股.順勢操作」
一. 分散投資: 貓大把可以花費時間在投資研究上的人分為三種:
1. 每周研究分析股票時間20小時以下的人,分散投資在20檔以上的股票。要分散在不同產業,且分散在獲利目標不同國家的股票。
2. 每周研究分析股票時間20-40小時的人,可以將股票分散在10-15檔股票
3. 每周研究分析股票時間40小時以上的人,可以集中投資在10檔以下股票。
二. 價值選股:二低一高
1. 低本益比(PER)一般選8倍本益比以下的股票
2. 低股價淨值比(PBR),一般選PB低於0.6的股票
3. 高現金殖利率
如果可以量化回測請查詢有真憑實據的網站,例: 博碩士論文加值系統搜尋
https://ndltd.ncl.edu.tw/cgi-…/…/gsweb.cgi/ccd=pqQ2iQ/login…
貓大在講述價值選股時有問大家一個問題,請上課的人舉手回答。價值低廉但是獲利不是很好的股票與獲利良好成長股,哪一種股票的長期報酬率較高。答案是價值低廉的股票而非成長股,因為價值股可獲得價值風險溢酬(這個概念好像在<投資金律>這本書上提到過) 。而大家都知道的擁有高護城河公司,反而容易溢價。股票買便宜的就對了,低股價淨值比(PB低於0.6)長期而言可以回歸平均值。當然,也要注意自由現金流、董監持股質押比例,負債比等?(有些記的不是很清楚了,如果有錯請幫忙指正)。貓大也推薦財報狗https://statementdog.com/跟(goodinfo) https://goodinfo.tw/StockInfo/這兩個網站,可以將二低一高的股票篩選出來建立自己的股票追蹤池。
三. 順勢投資(獲利是等出來的)
貓大稱為一條鞭的獲利出場條件,漲多了的股票,可以用一條季線OR半年線當作出場的條件。
貓大相關的書籍推薦可以參考社團 黃崧棓大大 的文章連結。本人接觸貓大的投資部落格時間較短,上過這次講座後也要買貓大的著作https://www.books.com.tw/products/0010652329
來研讀,希望可以更了解貓大的投資理念與方法。
中場分隔線————————-————–
尼莫大雖然也是第一次見到本人,但是我比較早接觸到尼莫的部落格和粉絲頁,所以尼莫大的一些投資理念與心法相對而言較熟悉。社團黃崧棓大大對這次講座的感受到的兩個字是「漣漪」,出現在小弟我腦海中的是「種子」二字。以前就在尼莫大的粉絲頁,聽他提到過《當和尚遇到鑽石》這本書,可能以前緣分未到,尚未買來看,經過這次尼莫大強力推薦,這本書也一定要買來看。好幾年前參加過一個別的講座,那位演講者有講過要投資賺錢分為三個層級,第一級是投資的技巧與方法;第二級是NLP神經語言規劃(Neuro-Linguistic Programming),屬於心理與精神層面;第三級是福報。尼莫大介紹《當和尚遇到鑽石》提到想要得什麼果要先種什麼因。所以,尼莫大跟貓大經常以這種公益投資課程的方式,講課給我們聽同時做公益累積福報。這顆福報的種子在大家之間種下,等待他發芽長大。
尼莫上課的重點。
一. 行動的秘訣:一件事情持續做21天以上就會變成習慣。
利用番茄鐘工作法,提升做事的效率與工作的紀律。這本書我之前就是聽尼莫大介紹而看,也有在社團發過一篇簡單的閱讀心得。這本書在提升我的做事效率方面有不小的幫助,其他相關的工作管理方法還可以閱讀<GTD搞定>。
二. 建立自己投資作業流程。尼莫大分享一些他平常使用的工具,Feedly、Google快訊建立關鍵字(擴廠、併購、供需變化、新產品應用、併購等關鍵字)、Mops等來收集訊息。經過篩選與過濾選擇有興趣的訊息當作選股參考方向。
三. 建立投資聯絡名單。
尼莫大說想要賺錢要主動些,而且要厚臉皮一些。加入投資社團,就像我們這個社團一樣。要厚臉皮和專業的投資人主動的作互動,不要不好意思,所以小弟我接受了這個觀念,厚起臉皮來發這篇言不及義的心得。自己平時要多做功課、多作研究和分析,要拿出有內容的研究心得。再主動和社團的專業人士多學習多互動,慢慢就能建立屬於自己的投資人脈。尼莫大透過粉絲頁,部落格和投資課程,建立自己的人脈。他提到<非常潛力股>的作者也建議投資人多和專業人士交流,增加自己投資想法。
四. 投資想法的大於投資的技術。
這一點和<一個投機者的告白>作者,科斯托蘭尼的觀點頗為相似。投資要有主見,在過濾訊息時,要能發現事件與某支股票的關聯性,產生這個想法再深入研究。尼莫大舉了幾個例子,好公司遇到倒楣事的時候,要有怎樣的想法。他舉了貴州茅台的投資案例,因為2013年習近平在當年打貪腐,打奢華,可是他研究了茅台的基本面並沒有太大變化而是市場對打貪腐的消息過度反應,他就以當時接近打5折價位具有相當好的<安全邊際>(這本卡拉曼的書也是尼莫大推薦的必讀書籍,因已絕版目前淘寶上還可買到簡體版,小弟我現在正在拜讀中,等讀完我試著發一篇閱讀心得)而買入貴州茅台,現在已經漲了好幾倍了。另外一個案例是遠雄港這家公司公告說服務費用即將調升,而使尼莫大產生因漲價可以帶來營收成長的想法。這是尼莫大常年歷練產生的投資邏輯而得出結果。
課程中尼莫大也有建議散戶投資人,可以去看19555-1971年巴菲特寫給股東的信,因為當時巴菲特的資金部位較小,其投資的方法可能適合散戶投資人。
上課完,我有跟尼莫大請教幾個問題,尼莫告訴我閱讀投資書籍或投資相關文章時一定做筆記,從自己做的筆記中整理出幾個投資重點與方法,使用這些方法做好計畫用小額資金做測試,並隨時記錄這些方法優點與缺點以供日後回頭來檢討。如果某種方法適合自己,就將這個方法納入自己的投資流程。
在上課時有些同學問貓大和尼莫大存股相關的問題,貓大和尼莫好像說台股因為市場太小,較不建議存個股,兩位大大建議如果存股的可以定期定額買0050等ETF來當作存股,這樣可以減少個股風險。小弟我也有買ETF,如果研究分析股票時間不是很充裕的朋友,可以把ETF也納入投資的標的,這樣可享受與大盤相同的獲利。
最後小弟我也來分享幾個我有在追蹤的部落格和粉絲頁希望我的這顆<種子>種下去,也可以發芽、開枝、散葉。
http://richard-rrb.blogspot.com/2015_11_01_archive.html
這個部落格主會寫一些產業與個股的深度分析報告,很有深度我這個初學者很多都看不懂,希望有一天可以能多吸收這位格主的研究知識。
https://statementdog.com/insight
財報狗的洞見,很多個股分析文章,較適合初學者。
JC 趨勢財經觀點 粉絲頁
https://www.facebook.com/JustinInvesting/…
這作者產量超高,可以多逛逛。
我是想到哪邊就寫到哪邊,排版與資料整理較凌亂,還請各位社友不要太 介意,如果有錯誤的地方也請不吝指教。
|
Python
|
UTF-8
| 1,811
| 2.96875
| 3
|
[
"CC0-1.0"
] |
permissive
|
# This is just an example how to use faker
# faker is extrimly slow.
# check out data_gen_saprk for fas code
import csv
from faker import Faker
import datetime
def datagenerate(records, headers):
fake = Faker('en_US')
fake1 = Faker('en_GB') # To generate phone numbers
with open("People_data.csv", 'wt') as csvFile:
writer = csv.DictWriter(csvFile, fieldnames=headers)
writer.writeheader()
for i in range(records):
full_name = fake.name()
FLname = full_name.split(" ")
Fname = FLname[0]
Lname = FLname[1]
domain_name = "@testDomain.com"
userId = Fname +"."+ Lname + domain_name
writer.writerow({
"Email Id" : userId,
"Prefix" : fake.prefix(),
"Name": fake.name(),
"Birth Date" : fake.date(pattern="%d-%m-%Y", end_datetime=datetime.date(2000, 1,1)),
"Phone Number" : fake1.phone_number(),
"Additional Email Id": fake.email(),
"Address" : fake.address(),
"Zip Code" : fake.zipcode(),
"City" : fake.city(),
"State" : fake.state(),
"Country" : fake.country(),
"Year":fake.year(),
"Time": fake.time(),
"Link": fake.url(),
"Text": fake.word(),
})
if __name__ == '__main__':
records = 100000000
headers = ["Email Id", "Prefix", "Name", "Birth Date", "Phone Number", "Additional Email Id",
"Address", "Zip Code", "City","State", "Country", "Year", "Time", "Link", "Text"]
datagenerate(records, headers)
print("CSV generation complete!")
|
Markdown
|
UTF-8
| 19,609
| 2.59375
| 3
|
[] |
no_license
|
<p class="channel-type">(Carla channeling)</p>
<p>[I am Laitos,] and I greet you, my friends, in the love and the light of our infinite Creator. We thank you for the great blessing you have offered us in asking us to come and work with those who have gathered here in the name of the Creator, the Source. We attempted for a time before we contacted this instrument to make contact with the one known as S1. We say this in order that this instrument may know those sensations that she was feeling were those of contact. We shall continue for a short period working with each instrument as we speak through this one.</p>
<p>My friends, in these groups in which we concentrate so much upon service, sometimes we of Laitos may stress too much that great pillar of “the life lived in knowledge of <a id="_ftnref1" href="#_ftn1" name="_ftnref1">[1]</a>,” and forget to stress with the most abundant emphasis the joy that permeates the universe of this Creator Whom we serve. Too much we stress responsibilities connected with being a pilgrim and not enough do we share with you the reality of freedom that that service brings, for in each attempt to serve the Creator you have freed yourself from the opinion of a disillusioned illusion, you have removed yourself from a dimly lit, habitually angry and negative set of circumstances which persist despite all the beauties of the creation around you, and you have with your eyes in your inner selves glimpsed the reality of an infinite merrymaking, an eternal joyousness, the love that is without end.</p>
<p>Because of the medium of speech, we do not seem to you to be constantly joyful, and because of those things which we wish to teach, those skills which we wish to share, we seem bent single-mindedly upon the great responsibilities of service, and it is true, my friends, that those who wish to become shepherds must rise up and take the shepherd’s crook, and stand by the sheep in daytime and in dark, in safety and in peril. You do not know when you shall be called upon to channel in your own way. Consequently, we speak frequently on the service that is to be kept in mind. But, my friends, if we could but skip and jump and rejoice among you, laughing and shouting and making merry, for we are drunk on the very joy of the universe! We shall never be able to bring this into your language or your illusion, yet as you meditate, this feeling may come to you at any moment as you touch the Kingdom of the Father and His reality. As we charge you to meditate, to seek the truth, to attempt to be of service, if that is your desire, we invite you also to a grand party. Everyone is there. It is just, my friends, that some do not yet know it.</p>
<p>We would at this time again transfer this contact to the one known as S1. I am Laitos.</p>
<p class="channel-type">(S1 channeling)</p>
<p>I am Laitos. I am with this instrument. She was afraid to speak before, thinking that it was her own thoughts and not ours she perceived, but this is not true. She was receiving our thoughts, and she will find it easier as she practices. I am Laitos. I will now at this time transfer this contact to the one known as D. I am Laitos.</p>
<p class="channel-type">(S1 channeling)</p>
<p>I am Laitos. I am again with this instrument. The one known as D did not wish this contact at this time. We will therefore, continue to work with him in hopes that he will in the future rely more on his feeling than his analysis. I am Laitos. I will transfer this contact to the one known as Carla. I am Laitos.</p>
<p class="channel-type">(Carla channeling)</p>
<p>I am Laitos, and I greet you again in love and Light. We would say to the one known as D that the brothers of Hatonn are joining us in twisting your arm, and we shall contact you again later [in the evening.]</p>
<p>We would at this time ask your patience as we wish to spend some time familiarizing the one known as M with our vibrations. We would attempt to speak a very, very simple phrase through this instrument in order that the words themselves do not constitute a difficulty, but merely the experience of channeling will be the focus of the experience. We shall repeat, “I am Laitos,” and this repetition will seem as though it is the thought of the instrument. Nevertheless, my friends, none of you goes through life say to himself, “I am Laitos.” This is not a normal thought.</p>
<p>Consequently, we ask the one known as M to comfort himself, and not to analyze this thought when it appears within his conscious mind. We urge him, rather, simply to speak this thought and then await another thought. We shall repeat this transmission several times in order to familiarize the instrument with the experience of speaking our concepts. We ask that the instrument relax and refrain in the most rigorous manner possible from analysis, as analysis will block our transmissions. We would at this time, with the permission of the instrument, transfer this contact to the one known as M. I am Laitos.</p>
<p class="channel-type">(M channeling)</p>
<p>I am Laitos. I am with this instrument. I am Laitos. I am Laitos. I am Laitos. I am with this instrument. We are glad to speak to this instrument. We have had a desire for a long time to work with the one known as M, but due to his reluctance we have not been able to do so. We are glad to be with this instrument. I am Laitos. I am Laitos. I am Laitos. I am Laitos. I am with this instrument. I am Laitos.</p>
<p class="channel-type">(Carla channeling)</p>
<p>I am Laitos. I am again with this instrument. We are extremely pleased to be able to make such rapid contact with the one known as M. The way has indeed been made plain for us by this instrument’s desire. This instrument has an extremely strong ability to concentrate upon the tuning which is so great a part of this type of contact. For this, we are most grateful, also, for it shall greatly accelerate the speed with which we are able to open this particular channel. The one known as Hatonn has been conditioning the one known as D, and at this time we would step aside, that those of Hatonn may offer their greeting through this instrument. We would now leave this instrument temporarily. I am Laitos.</p>
<p class="channel-type">(D channeling)</p>
<p>I am Hatonn. I am with this instrument. It is with great difficulty we use this instrument, due to his concentration. I am Hatonn.</p>
<p class="channel-type">(Carla channeling)</p>
<p>I am Laitos, and I am again with this instrument. At this time we would like to share with the one known as J and the one known as R with the vibrations of ourselves and of Hatonn in order that we may deeply share in consciousness, and more deeply share in meditation. We now pause.</p>
<p class="comment">(Pause)</p>
<p>I am Laitos. I am Laitos. We would now exercise the instrument known as S2. It is with great pleasure that we move with this contact to that instrument. I am Laitos.</p>
<p class="channel-type">(S2 channeling)</p>
<p>I am Laitos. I am pleased to greet you once again with this instrument. It has been quite some time since we have been able to speak our words through her. She is most frequently used by those known to you as Hatonn and we are indeed happy that she has all us to be—correction—to speak through her today. We of Laitos are pleased with the progress of all those who are attempting to improve their abilities to speak our words, and are amazed at the speed with which all of you are beginning to, what you might call, grasp our thought out of thin air. It is often confusing to those who are not so experienced to distinguish between those thoughts of the instrument and those thoughts which we are attempting to send them. However, we wish to let you all know that you are correctly receiving these messages which you have been speaking.</p>
<p>We are aware of some of the difficulties you have when we are not able to direct our beam of thought in the precise manner in order to make a clear and concise contact. We are grateful for your patience with us, and we will try to zero in on each of you individually as we become more accustomed to your own particular frequency.</p>
<p class="comment">(Side one of tape ends.)</p>
<p>I am Laitos. We apologize for the interruption, but as you know, we were unable to speak momentarily. As we were saying, it is now with a great deal of pleasure that we would turn our contact over to those known to you as Latwii, as we know that there are many of you who are anxious to communicate with Latwii. We would leave you now, my friends, in the love and in the light which we arrived in. I am Laitos.</p>
<p class="channel-type">(Carla channeling)</p>
<p>I am Latwii, and I am surprising this instrument in the love and the light of the infinite Creator, for we wish to speak a few words through her, and also depart greatly from established custom in this group. However, there is one in this group which has been toying with the idea of attempting contact with the Confederation, and this particular instrument has its wiring strung somewhat delicately, and it was a thought, as we counseled together, those of us who serve you at this time, that the one known as A would perhaps best comfortably be able to communicate a few words with our particular vibration, which this instrument feels with a strength akin to the two-by-four, but which to other vibratory complexes is far more comfortable than even that vibration of old, easy-going Hatonn. Therefore, we would at this time ask your patience as we repeat with the one known as A the exercise of the repetition of our simple identity so that the one known as A may have the experience, if she wishes it, of this channeling. We ask the instrument to relax, and to mentally inform us if there is discomfort, and we shall adjust accordingly our vibration. We would transfer at this time. I am Latwii.</p>
<p class="comment">(Pause)</p>
<p class="channel-type">(Carla channeling)</p>
<p>I am Latwii. I am again with this instrument. I fear that we have, shall we say, inadvertently blown some circuitry, even as we were attempting to be most careful not to. Also, the desire to be of service in this particular manner is not yet a fixed star, but rather one which twinkles on and off. So be it.</p>
<p>We thank the one known as A, and may we say to each of you, we shall, along with our brothers and sisters, be with you at any time you may wish to work with our vibrations. We leave this instrument now in order to get on with the answering of any questions that you may have. We leave this instrument in love and light. I am Latwii.</p>
<p class="channel-type">(Jim channeling)</p>
<p>I am Latwii, and greet you all once again in love and light. We are privileged at this time to be able to offer ourselves in the capacity of attempting to answer your queries, for we are aware that there are those questions upon some minds which might prove useful in the answering. May we at this time, therefore, ask if there is a question which we might attempt to answer?</p>
<p><strong>R:</strong> Yes, Latwii, I’ve asked this before, and the answer is bothering me quite a bit. I’m curious, an experience I had—I’m wondering how much damage [there is] or how thwarted my abilities to receive mentally your conditioning, and conditioning in general [is] for the Confederation. Is there any way I can take care of that, or is there any way back, or do I just have to learn to function with whatever I have left of those abilities? Can I undo the damage?</p>
<p>I am Latwii, and am aware of your query, my brother. The experience of which you speak was one which was most intense on those minor circuits of your metaphysical body, shall we say. This body might be likened unto that which is not visible, and is that body which is activated at the times in which you are engaging in what you call meditation, a deep contemplation, and for many entities, the activity of prayer. It has been somewhat affected, shall we say, in its ability to make its manifestations known to your physical vehicle, as you are in the meditative state. The circuitry has suffered some impairment of connections. These connections might be most fruitfully repaired by your conscientious observance of regular periods of meditation, and the continued strengthening of your seeking of the one Creator.</p>
<p>The experience of which you speak has had beneficial effects as well, for it has made various portions of your metaphysical body more finely tuned, shall we say, and able to receive impressions and transmissions from other sources such as the Confederation. This occurred in, shall we say, somewhat of a premature manner, and therefore resulted in that impairment of the transmission of these perceptions to your physical conscious vehicle. But we are of the opinion that your continuation in strengthening your desire to seek the one Creator in the meditative state shall be most beneficial in the repairing of these circuits.</p>
<p>May we answer you further, my brother?</p>
<p><strong>R:</strong> No. Thank you.</p>
<p>We thank you. Is there another question at this time?</p>
<p><strong>Carla:</strong> We have a couple of friends that do work with crystals, and both of them seem to be good crystal healers to me. Would R’s particular metaphysical difficulties be aided by this type of healing?</p>
<p>I am Latwii. My sister, we feel that the type of healing which you have referred to as crystal healing would have at best what might be described as short-term benefits, for the impairment of the circuitry connecting the metaphysical and physical vehicles is that which was made in free will, and which must also be repaired by that same free will. It is, of course, possible that this free will could seek an avenue of expression through a response in a positive nature to this crystal healing of which you speak. This is possible, though our recommendation for the continuation of the meditative periods and the strengthening of the desire to seek are our best suggestion.</p>
<p>May we answer you further, my sister?</p>
<p><strong>Carla:</strong> No, thank you, Latwii. I believe I have you pegged. Take two meditations and call me in the morning.</p>
<p>I am Latwii. My sister, we hope you shall not report us for practicing without one of your licenses. May we answer another question at this time?</p>
<p><strong>Questioner:</strong> Yes, Latwii. What can you tell me in general, and I won’t mind if you’re brief, about the benefits of going through hypnotic regression?</p>
<p>I am Latwii, and am aware of your query, my sister. The process of enhancing the memory of previous experiences through that which you have called the hypnotic regression is a process in which information is added unto an entity’s conscious mind from those levels of the unconscious which are not normally available to the conscious mind. Therefore, information of this sort is usually of such an unique nature that its use is often not discovered until much of what you call time is passed. This is usually the case unless an entity has quite specific purposes for seeking information from previous incarnations. Most entities are unaware of the most beneficial type of information which could be sought. Therefore, the information which is received is usually not of much use.</p>
<p>Were an entity to look upon that life which is presently being experienced and see in that life those lessons which are being attempted, and attempt to trace those lessons in a previous incarnation so as to see their roots, then it might be possible for the entity to use that information in a more beneficial manner, for each bias which an entity develops during any incarnation shall at some time need to be what you call balanced with its opposite bias. This usually occurs in a future incarnation. Therefore, if one is able to look upon the current incarnation as a balancing effort set in motion by a previous incarnation’s gaining of bias, then there might be information of a most helpful nature which could be obtained by using the tools of regressive hypnosis.</p>
<p>May we answer you further, my sister?</p>
<p><strong>Questioner:</strong> Might I say, “Aha, that’s exactly what I was after.” Thank you very much.</p>
<p>I am Latwii. We thank you. Is there another question at this time?</p>
<p><strong>M:</strong> Yes, Latwii. In recent months I’ve read volumes of back issues of meditations and something I’ve noticed in many of the question and answer periods are some extremely long answers to what sometimes seem as relatively simple questions, and as I read over these, it seems as though the length and some of the things you go into in your answer actually add confusion to the answers. Why are you not more concise more often?</p>
<p>I am Latwii, and am aware of your query, my brother. In responding, we may respond in two ways, hopefully with brevity. Firstly, the question which is asked by any entity has components which often reach into unspoken portions of inquiry. In order to be of the most service to such an entity, we feel a responsibility to speak to these portions which have not been verbalized, but have, shall we say, been tacked on in a nonverbal manner. Often we speak to another portion of the mind complex of the questioner. Secondly, the instrument through which we speak has an effect upon the upon the type of response, and even its length, for some instruments have certain strengths, certain characteristics and means of expressing thoughts. When we present our responses to queries, most often they are in a somewhat seed or crystallized form, not yet at the level of the spoken word. It is therefore up to the instrument to clothe these thoughts in the words considered most appropriate for their transmission. Some instruments feel more inadequacy, shall we say, in able—we correct this instrument—some instruments feel more inadequacy in being able to clothe our thoughts in the most precise words, and therefore use what might be called the shotgun approach on occasion, hoping that by expressing the thought in more than one way that it shall be correctly expressed in its total summation.</p>
<p>May we answer you further?</p>
<p><strong>M:</strong> No, Latwii, that makes a lot of sense. I knew you had good reasons all along.</p>
<p>I am Latwii. We thank you, my brother, for your patience and your good humor. We hope that we shall be able to provide each entity with those thoughts which are most coherent and crystallinely pure as we respond to your queries. We realize that we are quite frequently unable to do this to the satisfaction of all present, yet we shall continue in our efforts, for we find great joy in being able to provide this service, even if it is occasionally clothed in more verbiage than the prevailing styles of speech would allow.</p>
<p>May we ask if there is another question at this time?</p>
<p class="comment">(Pause)</p>
<p>I am Latwii. We find that we have exhausted the questions, but hopefully have left your minds somewhat more intact. We appreciate the invitation to join this group, and we look forward to each meeting. We are with each of you in your meditations as requested. We remind each that a simple request will bring us in joy. We leave you now in the love and in the light of the one infinite Creator. We are known to you as Latwii. Adonai vasu borragus.</p>
<p class="separator-left-33"> </p>
<p class="footnote"><a id="_ftn1" href="#_ftnref1" name="_ftn1">[1]</a> Carla: The consciously lived life or the reviewed life.</p>
|
JavaScript
|
UTF-8
| 1,685
| 3.34375
| 3
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] |
permissive
|
var cart = [];
function setCart(newCart) {
cart = newCart;
}
// done
function getCart() {
return cart;
}
// done
function addToCart(item_name) {
var price = Math.floor(Math.random() * 100)
var object = { [item_name]: price}
cart.push(object)
console.log(`${item_name} has been added to your cart.`)
return cart
}
function removeFromCart(item_name) {
not_in_cart = true;
for (var i = 0; i < cart.length; i++) {
var object = cart[i];
if (Object.keys(object)[0] === item_name){
cart.splice(i, 1);
in_cart = false;
}
}
if (not_in_cart) {
console.log("That item is not in your cart.");
}
return cart
}
function viewCart() {
if (cart.length === 0) {
console.log("Your shopping cart is empty.");
return "Your shopping cart is empty."
} else {
var string = "In your cart, you have";
for (var i = 0; i < cart.length; i++) {
var object = cart[i];
var item_name = Object.keys(object)[0];
var price = object[item_name]
string = string.concat(` ${item_name} at $${price}`);
if (i < cart.length - 1) {
string = string.concat(",");
} else {
string = string.concat(".");
}
}
console.log(string);
return string;
}
}
function total() {
let t = 0
for (var i = 0, l = cart.length; i < l; i++) {
for (var item in cart[i]) {
t += cart[i][item]
}
}
return t
}
function placeOrder(cc_info) {
if (cc_info === undefined) {
console.log("We don't have a credit card on file for you to place your order.")
} else {
console.log(`Your total cost is $${total()}, which will be charged to the card 123.`);
setCart([]);
}
}
|
Java
|
UTF-8
| 4,769
| 1.890625
| 2
|
[
"CC-BY-4.0",
"Apache-2.0"
] |
permissive
|
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.dataengine.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Objects;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
/**
* The type Schema type.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class SchemaType extends Referenceable {
private static final long serialVersionUID = 1L;
private String displayName;
private String author;
private String usage;
private String encodingStandard;
private String versionNumber;
private String type;
@JsonProperty("columns")
private List<Attribute> attributeList;
/**
* Gets display name.
*
* @return the display name
*/
public String getDisplayName() {
return displayName;
}
/**
* Sets display name.
*
* @param displayName the display name
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
* Gets author.
*
* @return the author
*/
public String getAuthor() {
return author;
}
/**
* Sets author.
*
* @param author the author
*/
public void setAuthor(String author) {
this.author = author;
}
/**
* Gets usage.
*
* @return the usage
*/
public String getUsage() {
return usage;
}
/**
* Sets usage.
*
* @param usage the usage
*/
public void setUsage(String usage) {
this.usage = usage;
}
/**
* Gets encoding standard.
*
* @return the encoding standard
*/
public String getEncodingStandard() {
return encodingStandard;
}
/**
* Sets encoding standard.
*
* @param encodingStandard the encoding standard
*/
public void setEncodingStandard(String encodingStandard) {
this.encodingStandard = encodingStandard;
}
/**
* Gets version number.
*
* @return the version number
*/
public String getVersionNumber() {
return versionNumber;
}
/**
* Sets version number.
*
* @param versionNumber the version number
*/
public void setVersionNumber(String versionNumber) {
this.versionNumber = versionNumber;
}
/**
* Gets attribute list.
*
* @return the attribute list
*/
public List<Attribute> getAttributeList() {
return attributeList;
}
/**
* Sets attribute list.
*
* @param attributeList the attribute list
*/
public void setAttributeList(List<Attribute> attributeList) {
this.attributeList = attributeList;
}
/**
* Gets type.
*
* @return the type
*/
public String getType() {
return type;
}
/**
* Sets type.
*
* @param type the type
*/
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return "SchemaType{" +
", displayName='" + displayName + '\'' +
", author='" + author + '\'' +
", usage='" + usage + '\'' +
", encodingStandard='" + encodingStandard + '\'' +
", versionNumber='" + versionNumber + '\'' +
", type=" + type +
", attributeList=" + attributeList +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SchemaType that = (SchemaType) o;
return Objects.equals(displayName, that.displayName) &&
Objects.equals(author, that.author) &&
Objects.equals(usage, that.usage) &&
Objects.equals(encodingStandard, that.encodingStandard) &&
Objects.equals(versionNumber, that.versionNumber) &&
Objects.equals(type, that.type) &&
Objects.equals(attributeList, that.attributeList);
}
@Override
public int hashCode() {
return Objects.hash(displayName, author, usage, encodingStandard, versionNumber, attributeList);
}
}
|
C#
|
UTF-8
| 666
| 3.25
| 3
|
[
"MIT"
] |
permissive
|
using System;
interface I
{
void f();
}
class B : I
{
public virtual void f()
{
Console.WriteLine("B::f()");
}
void I.f()
{
Console.WriteLine("B::I.f()");
}
}
class A : B, I
{
public override void f()
{
Console.WriteLine("A::f()");
}
void I.f()
{
Console.WriteLine("A::I.f()");
}
}
class Program
{
static void Test1()
{
var obj = new A();
obj.f();
((I)obj).f();
}
static void Test2()
{
var obj = new B();
obj.f();
((I)obj).f();
}
static void Main()
{
Test1();
Test2();
Console.WriteLine("<%END%>");
}
}
|
Java
|
UTF-8
| 988
| 3.53125
| 4
|
[] |
no_license
|
package com.hd520.thinking_in_code.dynamic_pro;
/**
* @Description 删除字符使得两个字符串相等, 最少需要多少步
* @Author xierishi
* @Date 2020-12-22 16:27:04
*/
public class MiniDeleteDistance {
public int minDistance(String s1, String s2) {
int len1 = s1.length();
int len2 = s2.length();
Integer[][] dp = new Integer[len1 + 1][len2 + 1];
// base case
for (int i = 0; i <= len1; i++){
dp[i][0] = i;
}
for (int i = 0; i <= len2; i++){
dp[0][i] = i;
}
for (int i = 0; i < len1 ; i++) {
for (int j = 0; j < len2; j++) {
if (s1.charAt(i) == s2.charAt(j)) {
dp[i + 1][j + 1] = dp[i][j];
}else {
dp[i + 1][j + 1] = Math.min(dp[i + 1][j], dp[i][j + 1]) + 1;
}
}
}
return dp[len1][len2];
}
public static void main(String[] args) {
MiniDeleteDistance miniDeleteDistance = new MiniDeleteDistance();
int minDistance = miniDeleteDistance.minDistance("sea", "eat");
System.out.println(minDistance);
}
}
|
Python
|
UTF-8
| 3,408
| 2.515625
| 3
|
[] |
no_license
|
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import sys
import time
import couchdb
import logging
from twython import Twython
from twython import TwythonError
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
sys.path.append('/usr/local/lib/python3.4/dist-packages')
##Assigns sentiment scores to tweets
##------------------------------------------------------------------
def sentiment_analyzer(tweet_text):
analyzer=SentimentIntensityAnalyzer()
return analyzer.polarity_scores(tweet_text)
##Tests whether the rate limit of the last request has been reached
##------------------------------------------------------------------
def test_rate_limit(api, wait=True, buffer=.1):
log=logging.getLogger(__name__)
# Get the number of remaining requests
remaining = float(api.get_lastfunction_header(header='x-rate-limit-reset'))-time.time()
# Check if we have reached the limit
if remaining == 0:
limit = int(api.get_lastfunction_header(header='x-rate-limit-reset'))
log.info("0 of %d requests remaining", limit)
#time.sleep(600)
time.sleep(600)
#Rate limit not reached
return True
##Couch dB connection
##------------------------------------------------------------------
user='admin'
password='admin'
couchserver = couchdb.Server("http://%s:%s@115.146.95.146:5984/" % (user,password))
print(couchserver)
dbname='sentiment_tweets'
if dbname in couchserver:
db=couchserver[dbname]
else:
db=couchserver.create(dbname)
##Twitter search
##------------------------------------------------------------------
APP_KEY='olVpEB3ytC8IwuYxtZRbT0VvI'
APP_SECRET='aQdXuTU256cVO7YSCNESD6Cd6JODc7lobt03w59g3TO3jOCJbL'
#KEY_FILE = os.path.join('app_keys.txt')
#keys=[]
#for key in open(KEY_FILE, 'r').readlines():
# keys.append(key.rstrip())
#APP_KEY=keys[0]
#APP_SECRET=keys[1]
#print(APP_KEY)
#print(APP_SECRET)
twitter = Twython(APP_KEY, APP_SECRET, oauth_version=2)
ACCESS_TOKEN = twitter.obtain_access_token()
twitter = Twython(APP_KEY, access_token=ACCESS_TOKEN)
##Bag of positive and negative words
POS_WORDS_FILE = os.path.join('positive-words.txt')
NEG_WORDS_FILE = os.path.join('negative-words.txt')
pos_words = []
neg_words = []
for pos_word in open(POS_WORDS_FILE, 'r').readlines()[35:]:
pos_words.append(pos_word.rstrip())
for neg_word in open(NEG_WORDS_FILE, 'r').readlines()[35:]:
neg_words.append(neg_word.rstrip())
keywords=pos_words+neg_words
MAX_COUNT=100
GEO_CODE1='-32.562280134847995,144.53837739637368,704.978km'
#GEO_CODE1=keys[2]
##Fetching tweets
loop=True
while loop:
for keyword in keywords:
try:
t=twitter.search(q=keyword,count=MAX_COUNT, lang='en', geocode=GEO_CODE1)
time.sleep(6)
tweet_object=t['statuses']
for tweet in tweet_object:
if len(tweet)>0:
tweet['sentiment']=sentiment_analyzer(tweet['text'])
tweet['keyword']=keyword
tw_id=tweet['id_str']
if tw_id in db:
print('Duplicate tweet')
else:
db[tw_id] = tweet
print('Written to database')
else:
break
except:
print("Twython error")
loop=test_rate_limit(twitter)
continue
|
PHP
|
UTF-8
| 4,577
| 2.828125
| 3
|
[] |
no_license
|
<?php
class CompraEstadoTipo {
private $idcompraestadotipo;
private $cetdescripcion;
private $cetdetalle;
private $mensajeoperacion;
public function getIdcompraestadotipo()
{
return $this->idcompraestadotipo;
}
public function setIdcompraestadotipo($idcompraestadotipo)
{
$this->idcompraestadotipo = $idcompraestadotipo;
}
public function getCetdescripcion()
{
return $this->cetdescripcion;
}
public function setCetdescripcion($cetdescripcion)
{
$this->cetdescripcion = $cetdescripcion;
}
public function setCetdetalle($cetdetalle)
{
$this->cetdetalle = $cetdetalle;
}
public function getCetdetalle()
{
return $this->cetdetalle;
}
public function getMensajeoperacion()
{
return $this->mensajeoperacion;
}
public function setMensajeoperacion($mensajeoperacion)
{
$this->mensajeoperacion = $mensajeoperacion;
}
public function __construct(){
$this->idcompraestadotipo="";
$this->cetdescripcion="" ;
$this->cetdetalle="";
$this->mensajeoperacion ="";
}
public function setear($idcompraestadotipo, $cetdescripcion, $cetdetalle) {
$this->setIdcompraestadotipo($idcompraestadotipo);
$this->setCetdescripcion($cetdescripcion);
$this->setCetdetalle($cetdetalle);
}
public function cargar(){
$base=new BaseDatos();
$sql="SELECT * FROM compraestadotipo WHERE idcompraestadotipo = ".$this->getIdcompraestadotipo();
if (!$base->Iniciar()) {
$this->setMensajeoperacion("CompraItem->cargar: ".$base->getError()[2]);
return false;
}
if($base->Ejecutar($sql) > 0){
$row = $base->Registro();
$this->setear($row['idcompraestadotipo'], $row['cetdescripcion'], $row['cetdetalle']);
}
return true;
}
public function insertar(){
$resp = false;
$base=new BaseDatos();
$sql="INSERT INTO CompraEstadoTipo( cetdescripcion, cetdetalle ) ";
$sql.="VALUES('".$this->getCetdescripcion()."', '".$this->getCetdetalle()."');";
if ($base->Iniciar()) {
if ($elid = $base->Ejecutar($sql)) {
$this->setIdcompraestadotipo($elid);
$resp = true;
} else {
$this->setMensajeoperacion("CompraItem->insertar: ".$base->getError()[2]);
}
} else {
$this->setMensajeoperacion("CompraItem->insertar: ".$base->getError()[2]);
}
return $resp;
}
public function modificar(){
$resp = false;
$base=new BaseDatos();
$sql="UPDATE CompraEstadoTipo SET cetdescripcion='".$this->getCetdescripcion()."', cetdetalle='".$this->getCetdetalle()."'";
$sql.= " WHERE idcompraestadotipo = ".$this->getIdcompraestadotipo();
if ($base->Iniciar()) {
if ($base->Ejecutar($sql)) {
$resp = true;
} else {
$this->setMensajeoperacion("CompraItem->modificar 1: ".$base->getError());
}
} else {
$this->setMensajeoperacion("CompraItem->modificar 2: ".$base->getError());
}
return $resp;
}
public function eliminar(){
$resp = false;
$base=new BaseDatos();
$sql="DELETE FROM compraestadotipo WHERE idcompraestadotipo =".$this->getIdcompraestadotipo();
if ($base->Iniciar()) {
if ($base->Ejecutar($sql)) {
$resp = true;
} else {
$this->setMensajeoperacion("CompraItem->eliminar: ".$base->getError());
}
} else {
$this->setMensajeoperacion("Productoo->eliminar: ".$base->getError());
}
return $resp;
}
public static function listar($parametro=""){
$arreglo = array();
$base=new BaseDatos();
$sql="SELECT * FROM compraestadotipo ";
if ($parametro!="") {
$sql.='WHERE '.$parametro;
}
$res = $base->Ejecutar($sql);
if($res>-1){
if($res>0){
while ($row = $base->Registro()){
$obj = new CompraEstadoTipo();
$obj->setear($row['idcompraestadotipo'], $row['cetdescripcion'], $row['cetdetalle']);
array_push($arreglo, $obj);
}
}
}
return $arreglo;
}
}
?>
|
Java
|
UTF-8
| 235
| 2.578125
| 3
|
[] |
no_license
|
package sistemacarro;
import java.util.Comparator;
public class ComparatorCarro implements Comparator<Carro> {
@Override
public int compare(Carro o1, Carro o2) {
return (int) (o1.getValorAluguel() - o2.getValorAluguel());
}
}
|
PHP
|
UTF-8
| 2,009
| 2.8125
| 3
|
[
"BSD-3-Clause"
] |
permissive
|
<?php
namespace Europa;
use Europa\Fs\Locator;
/**
* Handles class loading.
*
* @category Fs
* @package Europa
* @author Trey Shugart <treshugart@gmail.com>
* @license Copyright (c) 2011 Trey Shugart http://europaphp.org/license
*/
class ClassLoader
{
/**
* The locator to use for locating class files.
*
* @var \Europa\Fs\Locator
*/
private $locator;
/**
* Searches for a class and loads it if it is found. If the class is found, true is returned. Otherwise false is
* returned.
*
* @param string $class The class to search for.
*
* @return \Europa\ClassLoader
*/
public function load($class)
{
if (class_exists($class, false)) {
return true;
}
// normalize
$file = str_replace('\\', DIRECTORY_SEPARATOR, $class);
$file = trim($file, DIRECTORY_SEPARATOR);
// attempt loading of classes at same level as framework
if ($fullpath = realpath(dirname(__FILE__) . '/../' . $file . '.php')) {
include $fullpath;
return true;
}
// attempt loading from other sources
if ($this->locator) {
if ($fullpath = $this->locator->locate($file)) {
include $fullpath;
return true;
}
}
return false;
}
/**
* Sets the locator.
*
* @param \Europa\Fs\Locator $locator The locator to use for locating class files.
*
* @return \Europa\ClassLoader
*/
public function setLocator(Locator $locator)
{
$this->locator = $locator;
return $this;
}
/**
* Registers the auto-load handler and automatically registers the Europa install path to the load paths.
*
* @return \Europa\ClassLoader
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'load'), true, $prepend);
return $this;
}
}
|
Java
|
UTF-8
| 2,921
| 2.4375
| 2
|
[] |
no_license
|
package uk.ac.birmingham;
import org.renjin.invoke.codegen.scalars.ByteType;
import org.scijava.ItemIO;
import org.scijava.command.Command;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.ui.UIService;
import net.imagej.Dataset;
import net.imagej.ImageJ;
import net.imagej.ops.OpService;
import net.imglib2.Cursor;
import net.imglib2.IterableInterval;
import net.imglib2.RandomAccess;
import net.imglib2.RandomAccessible;
import net.imglib2.exception.IncompatibleTypeException;
import net.imglib2.img.Img;
import net.imglib2.img.array.ArrayImgFactory;
import net.imglib2.type.logic.BitType;
import net.imglib2.type.numeric.RealType;
import net.imglib2.type.numeric.integer.UnsignedByteType;
import net.imglib2.type.numeric.real.DoubleType;
import net.imglib2.util.Util;
/**
* This is a minimal ImageJ command implements a manual threshold
*/
@Plugin(type = Command.class, menuPath = "Plugins>maual threshold")
public class SimpleThreshold<T extends RealType<T>> implements Command {
@Parameter(label = "Define the threshold value: ", persist = false)
private double thresholdVal = 0.;
@Parameter
private Dataset currentData;
@Parameter(type = ItemIO.OUTPUT)
private Img<BitType> result;
@Override
public void run() {
final Img<T> img = (Img<T>) currentData.getImgPlus();
final Object type = Util.getTypeFromInterval( img );
System.out.println( "Pixel Type: " + type.getClass() );
System.out.println( "Img Type: " + img.getClass() );
long[] dims = new long[img.numDimensions()];
img.dimensions(dims);
try {
result = img.factory().imgFactory(new BitType()).create(img, new BitType());
} catch (IncompatibleTypeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
T thresholdD = img.firstElement();
thresholdD.setReal(thresholdVal);
threshold(img, result, thresholdD);
}
public static <K extends Comparable<K>> void threshold(final RandomAccessible<K> source,
final IterableInterval<BitType> target, K thresh) {
final RandomAccess<K> in = source.randomAccess();
final Cursor<BitType> out = target.localizingCursor();
while (out.hasNext()) {
out.fwd();
in.setPosition(out);
final BitType type = out.get();
if (in.get().compareTo(thresh) > 0) {
type.setOne();
} else {
type.setZero();
}
}
}
/**
* This main function serves for development purposes.
*
* @param args
* whatever, it's ignored
* @throws Exception
*/
public static void main(final String... args) throws Exception {
// create the ImageJ application context
final ImageJ ij = new ImageJ();
ij.ui().showUI();
// load example dataset
final Dataset dataset = ij.scifio().datasetIO().open("http://imagej.net/images/FluorescentCells.jpg");
// show the image
ij.ui().show(dataset);
// invoke the plugin
ij.command().run(SimpleThreshold.class, true);
}
}
|
Java
|
UTF-8
| 513
| 3.0625
| 3
|
[] |
no_license
|
package com.company.stocks;
/**
* Created by manisharana on 5/5/15.
*/
public class Employee {
private String name;
private Company company;
Employee(String name, Company company) {
this.name = name;
this.company = company;
company.addEmployees(company.getName(), this);
}
public void notifyObserver() {
System.out.println(this.name+"- Stock prices of " + company.getName() + " changed");
}
public String getName() {
return name;
}
}
|
Python
|
UTF-8
| 2,609
| 3.09375
| 3
|
[] |
no_license
|
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import unicodedata
import re
# In[2]:
standard_header = ['bairros', 'rotas']
zonas = pd.read_excel('zonas_bairros.xlsx', names=standard_header)
print(zonas.columns)
# In[3]:
def RemoverCaracteresEspeciais(palavra):
# Unicode normalize transforma um caracter em seu equivalente em latin.
nfkd = unicodedata.normalize('NFKD', palavra)
palavraSemAcento = u"".join([c for c in nfkd if not unicodedata.combining(c)])
# Usa expressão regular para retornar a palavra apenas com números, letras e espaço
return re.sub('[^a-zA-Z0-9 \\\]', '', palavraSemAcento)
bairros_sem_caracteres_especiais = []
for each in zonas['bairros']:
clean = RemoverCaracteresEspeciais(each)
bairros_sem_caracteres_especiais.append(clean)
zonas['bairros'] = bairros_sem_caracteres_especiais
# In[4]:
zonas['bairros'] = zonas['bairros'].str.lower().str.strip().str.replace('2', 'ii')
zonas['rotas'] = zonas['rotas'].str.lower().str.strip()
print(zonas['rotas'].unique())
bairros_unicos = zonas['bairros'].unique()
bairros_unicos = pd.DataFrame(bairros_unicos)
bairros_unicos[0].value_counts().sort_values(ascending=False)
# In[5]:
bairro_centro = zonas['rotas'] == 'centro'
zona_centro = zonas.loc[bairro_centro, 'bairros'].str.upper()
zona_centro = zona_centro.str.strip()
zona_centro = zona_centro.unique()
bairro_norte = zonas['rotas'] == 'norte'
zona_norte = zonas.loc[bairro_norte, 'bairros'].str.upper().str.strip()
zona_norte = zona_norte.unique()
bairro_leste = zonas['rotas'] == 'leste'
zona_leste = zonas.loc[bairro_leste, 'bairros'].str.upper().str.strip()
zona_leste = zona_leste.unique()
bairro_sul = zonas['rotas'] == 'sul'
zona_sul = zonas.loc[bairro_sul, 'bairros'].str.upper().str.strip()
zona_sul = zona_sul.unique()
bairro_sdc = zonas['rotas'] == 'sdc'
zona_sdc = zonas.loc[bairro_sdc, 'bairros'].str.upper().str.strip()
zona_sdc = zona_sdc.unique()
bairro_sdb = zonas['rotas'] == 'sdb'
zona_sdb = zonas.loc[bairro_sdb, 'bairros'].str.upper().str.strip()
zona_sdb = zona_sdb.unique()
bairro_timon = zonas['rotas'] == 'timon'
zona_timon = zonas.loc[bairro_timon, 'bairros'].str.upper().str.strip()
zona_timon = zona_timon.unique()
# In[6]:
zonas_final_nomes = ['SDB', 'SDC', 'SUL', 'LESTE', 'NORTE', 'CENTRO','TIMON']
zonas_final = zona_sdb, zona_sdc, zona_sul, zona_leste, zona_norte, zona_centro, zona_timon
rotas_final = pd.DataFrame(zonas_final)
rotas_final = rotas_final.T
rotas_final.columns = zonas_final_nomes
print(rotas_final)
rotas_final.to_excel('rotas_final.xlsx')
# In[ ]:
|
C++
|
UTF-8
| 4,349
| 2.765625
| 3
|
[] |
no_license
|
/*
* Connection.cpp
*
* Created on: Dec 13, 2011
* Author: NGUYEN Hong San
*/
#include "Connection.h"
#include <glog/logging.h>
#include "Message.h"
#include <boost/make_shared.hpp>
#include "commons/SocketUtil.h"
#include "Server.h"
#define MAXTRIES 100
Connection::Connection(int fd)
{
this->fd = fd;
received = 0;
processing = false;
some_event_come = false;
task = new Task(0, boost::make_shared<ReadContext>(this));
}
Connection::~Connection()
{
}
void Connection::push_read_task(Server* server)
{
TaskQueue& tasks = server->get_tasks();
boost::mutex::scoped_lock lock(check_mutex);
if (processing) watch_dog++;
else
{
tasks.enqueue(task);
processing = true;
}
}
int Connection::get_socket()
{
return fd;
}
int Connection::send(char* data, size_t size)
{
boost::mutex::scoped_lock slock(send_mutex);
size_t sent = 0;
int tries = 0;
while (sent < size)
{
int n = write(fd, data + sent, (size - sent));
if (n == -1)
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
{
tries++;
if (tries > MAXTRIES)
{
DLOG(ERROR)<< "Network may has some problems";
return -1;
}
usleep(100);
}
else return -1;
}
else
{
sent += n;
tries = 0;
}
}
return size;
}
int Connection::send_message(message_ptr const & message)
{
int n = send(message->get_data(), message->size);
return n;
}
bool Connection::alive()
{
int error = 0;
socklen_t len = sizeof(error);
int retval = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len);
return (retval == 0);
}
bool Connection::read_message(Server* server)
{
while (1) //loop until no more data in socket
{
watch_dog = 0;
if (received < PACKET_HEADER_SIZE)
{
/* read header data */
int count = read(fd, header, PACKET_HEADER_SIZE - received);
if (count == 0)
{
DLOG(INFO)<< "Close connection:" << fd;
server->close_connection(fd);
return false;
}
else if (count == -1)
{
if (errno != EAGAIN)
{
DLOG(ERROR) << "Something wrong with connection:" << fd;
return false;
}
else
{
boost::mutex::scoped_lock lock(check_mutex);
if (watch_dog == 0)
{
processing = false;
break;
}
else continue;
}
}
received += count;
if (received == PACKET_HEADER_SIZE)
{
if (header[0] != PACKET_MAGIC || header[1] != PACKET_MAGIC)
{
DLOG(ERROR)<< "Magic bytes are not matched";
//TODO: handle error
}
int size, type;
size = (header[2] << 8) + header[3]; // 2 bytes for size
type = (header[4] << 16) + (header[5] << 8) + header[6];//3 bytes for type
reading_message = boost::make_shared<Message>(size, type);
memcpy(reading_message->get_data(), header, PACKET_HEADER_SIZE);
}
}
else if (received < reading_message->size) //size here mean packet size not content size
{
/* read message data */
int count = read(fd, reading_message->get_data() + received, reading_message->size - received);
if (count == 0)
{
//DLOG(INFO) << "Close connection:" << ev->fd;
reading_message.reset();
return false;
}
else if (count == -1)
{
if (errno != EAGAIN)
{
DLOG(ERROR) << "Something wrong with connection:" << fd;
reading_message.reset();
return false;
}
else
{
boost::mutex::scoped_lock lock(check_mutex);
if (watch_dog == 0)
{
processing = false;
break;
}
else continue;
}
}
received += count;
}
else if (received == reading_message->size)
{
/* decode message_id and streaming type*/
bool has_id;
has_id = ((header[7] & 0x02) == 2);
unsigned char* tmp_data = (unsigned char*) (reading_message->get_data() + 8);
if (has_id)
{
uint64_t message_id = tmp_data[0];
message_id <<= 8;
message_id += tmp_data[1];
message_id <<= 8;
message_id += tmp_data[2];
message_id <<= 8;
message_id += tmp_data[3];
message_id <<= 8;
message_id += tmp_data[4];
message_id <<= 8;
message_id += tmp_data[5];
message_id <<= 8;
message_id += tmp_data[6];
message_id <<= 8;
message_id += tmp_data[7];
reading_message->id = message_id;
}
else reading_message->id = 0;
server->push_tcp_task(reading_message, this);
received = 0;//ready for new packet
reading_message.reset();
}
}
return true;
}
|
Python
|
UTF-8
| 222
| 2.765625
| 3
|
[] |
no_license
|
def interseccao_chaves (dic_1, dic_2):
lista = []
for chave_1, indice_1 in dic_1 .items():
i = 0
if chave_1 == dic_2[i]:
lista.append(chave_1)
i += 1
return lista
|
TypeScript
|
UTF-8
| 5,280
| 2.546875
| 3
|
[
"ISC"
] |
permissive
|
import discord from "discord.js";
import logging from "../logging";
import { TinyEmitter } from "tiny-emitter";
import {
Interaction,
SlashCommandListener,
} from "./slash-commands/api/listen-to-commands";
import {
SlashCommand,
SlashCommandName,
} from "./slash-commands/api/SlashCommand";
import { registerCommand } from "./slash-commands/api/register-command";
import { activeGuilds } from "./guilds";
const log = logging("bot");
export interface BotOptions {
token?: string;
}
export interface DiscordMessageHandler {
handle(message: discord.Message): void;
}
export type SlashCommandCreator = () => Promise<SlashCommand>;
export type Event = string;
export const events = new TinyEmitter();
export class Bot {
public client: discord.Client;
options: BotOptions;
isReady = false;
public messageHandlers: DiscordMessageHandler[] = [];
private slashCommandHandlers: Map<
SlashCommandName,
SlashCommandListener
> = new Map();
private slashCommandCreators: Map<Event, SlashCommandCreator[]> = new Map();
constructor(options: BotOptions = {}) {
this.client = new discord.Client();
this.options = options;
this.options.token = this.options.token || process.env.DISCORD_BOT_TOKEN;
}
/**
* @param event when the command should be re-registered
* @param createSlashCommand the function that creates the new slash command
*/
public addDynamicCommand(
event: string|string[],
createSlashCommand: SlashCommandCreator
) {
const events = Array.isArray(event) ? event : [event];
for (let e of events) {
let creators = this.slashCommandCreators.get(e);
if (!creators) {
creators = [];
}
creators.push(createSlashCommand);
this.slashCommandCreators.set(e, creators);
}
}
// TODO: get an even for when new players are added, and re-run the createSlashCommand.
public addHandler(
slashCommand: SlashCommand,
listener: SlashCommandListener
) {
this.slashCommandHandlers.set(slashCommand.name.toLowerCase(), listener);
}
public async start() {
if (!this.options.token || this.options.token === "<missing>") {
log.error(
{
tokenUri: `https://discord.com/developers/applications/${process.env.DISCORD_BOT_CLIENT_ID}/bot`,
},
"Discord token is missing! Set it in .env as DISCORD_BOT_TOKEN"
);
return;
}
this.listenToReady();
this.listenToSlashCommands();
this.listenToMessages();
try {
log.info("Logging in to discord...");
await this.client.login(this.options.token);
log.info("Logged in");
} catch (err) {
log.error(
{ err, token: this.options.token },
"Failed to log in to discord: %s",
err.message
);
}
}
private listenToReady() {
this.client.once("ready", () => {
this.isReady = true;
const servers = this.client.guilds.cache.map((guild) => guild.name);
log.info({ servers }, "Discord client is ready");
this.client.user?.setActivity("!help", {
type: "WATCHING",
});
this.listenToCustomEvents();
events.emit("start");
});
}
private listenToCustomEvents() {
const eventNames = this.slashCommandCreators.keys();
for (const ev of eventNames) {
const guilds = activeGuilds();
events.on(ev, async () => {
const handlers = this.slashCommandCreators.get(ev) ?? [];
for (const handler of handlers) {
for (const guild of guilds) {
registerCommand(this.client, guild, await handler());
}
}
});
}
}
private listenToMessages() {
this.client.on("message", (message) => {
this.handleMessage(message);
});
}
handleMessage(message: discord.Message) {
this.messageHandlers.forEach((handler) => {
handler.handle(message);
});
}
private listenToSlashCommands() {
this.client.ws.on(
"INTERACTION_CREATE" as any,
(interaction: Interaction) => {
this.handleInteractions(interaction);
}
);
}
/** Interactions are also known as slash commands. */
private async handleInteractions(interaction: Interaction) {
const commandName = interaction.data?.name;
if (!commandName) {
log.warn(
{ interaction },
"No command name found in interaction %s",
interaction.id
);
return;
}
const handler = this.slashCommandHandlers.get(commandName);
if (!handler) {
log.warn(
{ interaction },
"No handler found for interaction %s",
interaction.id
);
return;
}
try {
const responseMessage = await handler.onCommand(this.client, interaction);
(this.client as any).api
.interactions(interaction.id, interaction.token)
.callback.post({
data: {
type: 4,
data: responseMessage,
},
});
// Alternatively to send followup messages
//new Discord.WebhookClient(client.user.id, interaction.token).send('hello world')
} catch (err) {
log.error(
{ err, interaction },
"Failed to get response for command %s (%s)",
commandName,
interaction.id
);
}
}
}
|
Go
|
UTF-8
| 5,691
| 3.015625
| 3
|
[
"MIT"
] |
permissive
|
package transfig_test
import (
"encoding/json"
"io/ioutil"
"os"
"reflect"
"testing"
"github.com/sironfoot/transfig"
)
type complex struct {
StringValue string `json:"stringValue"`
IntValue int `json:"intValue"`
FloatValue float64 `json:"floatValue"`
BoolValue bool `json:"boolValue"`
SliceValueStrings []string `json:"sliceValueStrings"`
SliceValueFloats []float64 `json:"sliceValueFloats"`
SliceValueInts []int `json:"sliceValueInts"`
SliceValueBools []bool `json:"sliceValueBools"`
ObjectValue subConfiguration `json:"objectValue"`
SliceValueObjects []slicedConfig `json:"sliceValueObjects"`
}
type subConfiguration struct {
StringValue string `json:"stringValue"`
IntValue int `json:"intValue"`
ObjectValue subSubConfiguration `json:"objectValue"`
}
type subSubConfiguration struct {
StringValue string `json:"stringValue"`
IntValue int `json:"intValue"`
}
type slicedConfig struct {
StringValue string `json:"stringValue"`
IntValue int `json:"intValue"`
}
var expectedConfig = complex{
StringValue: "Hello world",
IntValue: 123,
FloatValue: 123.45,
BoolValue: true,
SliceValueStrings: []string{"string1", "string2", "string3"},
SliceValueFloats: []float64{1.2, 2.3, 3.4},
SliceValueInts: []int{1, 2, 3},
SliceValueBools: []bool{true, false, true},
ObjectValue: subConfiguration{
StringValue: "Hello world",
IntValue: 123,
ObjectValue: subSubConfiguration{
StringValue: "Hello world",
IntValue: 123,
},
},
SliceValueObjects: []slicedConfig{
slicedConfig{
StringValue: "Hello world",
IntValue: 123,
},
slicedConfig{
StringValue: "Hello world",
IntValue: 123,
},
slicedConfig{
StringValue: "Hello world",
IntValue: 123,
},
},
}
func TestLoad_WithEnvironment(t *testing.T) {
// arrange
var actualConfig complex
altConfigString := `
{
"stringValue": "Hello world 2",
"intValue": 456,
"floatValue": 456.78,
"boolValue": false,
"sliceValueStrings": [ "string4", "string5", "string6", "string7", "string8" ],
"sliceValueFloats": [ 4.5, 5.6, 7.8, 8.9 ],
"sliceValueInts": [ 4, 5 ],
"sliceValueBools": [ true ],
"objectValue": {
"stringValue": "Hello world 2",
"intValue": 456,
"objectValue": {
"stringValue": "Hello world 2",
"intValue": 456
}
},
"sliceValueObjects": [
{
"stringValue": "Hello world 2",
"intValue": 456
},
{
"stringValue": "Hello world 2",
"intValue": 456
},
{
"stringValue": "Hello world 2",
"intValue": 456
},
{
"stringValue": "Hello world 2",
"intValue": 456
}
]
}`
var expectedAltConfig complex
err := json.Unmarshal([]byte(altConfigString), &expectedAltConfig)
if err != nil {
t.Fatal(err)
}
err = ioutil.WriteFile("complex.test.json", []byte(altConfigString), 0644)
if err != nil {
t.Fatal(err)
}
defer func() {
err = os.Remove("complex.test.json")
if err != nil {
t.Fatal(err)
}
}()
// act
err = transfig.Load("complex.json", "test", &actualConfig)
// assert
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(expectedAltConfig, actualConfig) {
t.Errorf("expected and actual config are different.\nExpected:\n%v\n\nActual:\n%v", expectedAltConfig, actualConfig)
}
}
func TestLoad_WithPartialEnvironment(t *testing.T) {
// arrange
var actualConfig complex
altConfigString := `
{
"stringValue": "Hello world 2",
"sliceValueInts": [ 1, 2, 3, 4, 5, 6 ],
"objectValue": {
"stringValue": "Hello world 2",
"objectValue": {
"intValue": 456
}
}
}`
err := ioutil.WriteFile("complex.test.json", []byte(altConfigString), 0644)
if err != nil {
t.Fatal(err)
}
defer func() {
err = os.Remove("complex.test.json")
if err != nil {
t.Fatal(err)
}
}()
// act
err = transfig.Load("complex.json", "test", &actualConfig)
// assert
if err != nil {
t.Fatal(err)
}
if actualConfig.StringValue != "Hello world 2" {
t.Errorf("StringValue: expected '%s', actual '%s'", "Hello world 2", actualConfig.StringValue)
}
if len(actualConfig.SliceValueInts) != 6 {
t.Errorf("SliceValueInts: expected %d items, actual was %d items", 6, len(actualConfig.SliceValueInts))
}
for i, num := range actualConfig.SliceValueInts {
if num != (i + 1) {
t.Errorf("SliceValueInts[%d]: expected %d, actual %d", i, i+1, num)
}
}
if actualConfig.ObjectValue.StringValue != "Hello world 2" {
t.Errorf("ObjectValue.StringValue: expected '%s', actual '%s'",
"Hello world 2", actualConfig.ObjectValue.StringValue)
}
if actualConfig.ObjectValue.ObjectValue.IntValue != 456 {
t.Errorf("ObjectValue.ObjectValue.StringValue: expected '%d', actual '%s'",
456, actualConfig.ObjectValue.ObjectValue.StringValue)
}
// check other probs are same
actualConfig.StringValue = expectedConfig.StringValue
actualConfig.SliceValueInts = append(make([]int, 0), expectedConfig.SliceValueInts...)
actualConfig.ObjectValue.StringValue = expectedConfig.ObjectValue.StringValue
actualConfig.ObjectValue.ObjectValue.IntValue = expectedConfig.ObjectValue.ObjectValue.IntValue
if !reflect.DeepEqual(expectedConfig, actualConfig) {
t.Errorf("expected and actual config are different.\nExpected:\n%v\n\nActual:\n%v", expectedConfig, actualConfig)
}
}
|
TypeScript
|
UTF-8
| 1,142
| 2.53125
| 3
|
[] |
no_license
|
import { Component, OnInit } from '@angular/core';
import {HttpClient} from "@angular/common/http";
@Component({
selector: 'app-address',
templateUrl: './address.component.html',
styleUrls: ['./address.component.css']
})
export class AddressComponent implements OnInit {
model : AddressModel={
locality:'',
city:'',
zip : 0,
landMark:'',
customerId:0
};
constructor(private http:HttpClient) { }
ngOnInit(): void {
}
sendAddress(customerId :number):void{
let url = "http://localhost:8080/newAddress/"
this.http.post(url+customerId,this.model).subscribe(
res => {
alert("success in adding new address");
location.reload();
},
err=>{
alert("There is some error giving new address");
}
);
}
getAllAddresses():void{
let url="http://localhost:8080/getAddresses";
this.http.get(url).subscribe(
data=>{
alert(data);
console.log(data);
},
error=>{
alert("some problem");
}
);
}
}
export interface AddressModel{
locality:String;
city:String;
zip:number;
landMark:string;
customerId:number;
}
|
JavaScript
|
UTF-8
| 2,378
| 2.515625
| 3
|
[
"MIT"
] |
permissive
|
import uuidv4 from 'uuid/v4';
import Filesystem from '../src/filesystem';
describe('new Filesystem()', () => {
it('creates a new filesystem', () => {
const filesystem = new Filesystem({ name: uuidv4() });
expect(!!filesystem).toBe(true);
});
});
describe('async new Filesystem().isMaster', () => {
it('filesystem is not master before starting', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
expect(filesystem.isMaster).toBe(false);
});
it('filesystem is master after starting', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
await filesystem.start();
expect(filesystem.isMaster).toBe(true);
await filesystem.finish();
});
it('filesystem is master after finishing', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
await filesystem.start();
await filesystem.finish();
expect(filesystem.isMaster).toBe(true);
});
});
describe('async new Filesystem().isStarted()', () => {
it('filesystem is not started before starting', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
expect(await filesystem.isStarted()).toBe(false);
await filesystem.finish();
});
it('filesystem is started after starting', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
await filesystem.start();
expect(await filesystem.isStarted()).toBe(true);
await filesystem.finish();
});
it('filesystem is not started after finishing', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
await filesystem.start();
await filesystem.finish();
expect(await filesystem.isStarted()).toBe(false);
});
});
describe('async new Filesystem().setConfig(config)', () => {
it('sets config', async () => {
const filesystem = new Filesystem({ name: uuidv4() });
await filesystem.start();
await filesystem.setConfig({ hello: 'world' });
expect(await filesystem.getConfig()).toEqual({ hello: 'world' });
await filesystem.finish();
});
});
describe('new Filesystem().setConfig(config)', () => {
it('sets config', () => {
const filesystem = new Filesystem({ name: uuidv4() });
filesystem.startSync();
filesystem.setConfigSync({ hello: 'world' });
expect(filesystem.getConfigSync()).toEqual({ hello: 'world' });
filesystem.finishSync();
});
});
|
Python
|
UTF-8
| 490
| 3.890625
| 4
|
[] |
no_license
|
#!/usr/bin/python3
"""function that finds a peak in a list of unsorted integers"""
def find_peak(list_of_integers):
"""function thats finds a peak in a list of unsorted integers"""
l_int = list_of_integers
length = len(l_int)
if l_int == []:
return None
if length == 0:
return
if length == 1:
return (l_int[0])
for i in range(0, length - 1):
if l_int[i] > l_int[i + 1]:
return (l_int[i])
return (l_int[i + 1])
|
Python
|
UTF-8
| 580
| 2.796875
| 3
|
[] |
no_license
|
from option import Option
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument( "--word", "-w", help="Find score for word", type=str)
group.add_argument( "--file", "-f", help="Find score for given word", action='store_true')
group.add_argument( "--score", "-s", help="Find word for given score", type=int)
args = parser.parse_args()
option = Option()
if args.word:
print(option.score_from_word(args.word))
elif args.file:
print(option.score_from_file())
elif args.score:
option.word_from_score(args.score)
|
PHP
|
UTF-8
| 556
| 2.953125
| 3
|
[] |
no_license
|
<?php
foreach ($data as $row)
{
foreach ($row['Person'] as &$value)
{
$value = '"' . $value . '"';
}
foreach ($row['Course'] as &$value)
{
$value = '"' . $value . '"';
}
foreach ($row['DesembarqueIdaPoint'] as &$value)
{
$value = '"' . $value . '"';
}
echo
implode(';',$row['Person']) . ';' .
implode(';',$row['Course']) . ';' .
implode(';',$row['DesembarqueIdaPoint']) . "\n";
}
?>
|
C++
|
UTF-8
| 713
| 2.984375
| 3
|
[] |
no_license
|
//
// insertion sort
// Created by taha nebti.
// Copyright (c) 2019. All rights reserved.
//
#include <bits/stdc++.h>
using namespace std;
template<typename T>
void insertion_sort(vector<T>& a) {
int n = a.size();
for (int i = 0; i < n; i++) {
int id = i;
for (int j = i-1; j >= 0 && a[j] > a[id]; j--) {
swap(a[j], a[id]);
id = j;
}
}
}
int main(){
srand(time(0));
int n; cin >> n;
vector<int> data(n);
for (int i = 0; i < n; i++) {
data[i] = rand()%100;
}
insertion_sort(data);
for (int i = 0; i < n; i++) {
cout << data[i] << " ";
} cout << "\n";
return 0;
}
|
Markdown
|
UTF-8
| 2,595
| 3.78125
| 4
|
[] |
no_license
|
# CSS padding 属性
## 实例
设置 p 元素的 4 个内边距:
```
p
{
padding:2cm 4cm 3cm 4cm;
}
```
## 浏览器支持
所有浏览器都支持 padding 属性。
注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit"。
## 定义和用法
padding 简写属性在一个声明中设置所有内边距属性。
### 说明
这个简写属性设置元素所有内边距的宽度,或者设置各边上内边距的宽度。行内非替换元素上设置的内边距不会影响行高计算;因此,如果一个元素既有内边距又有背景,从视觉上看可能会延伸到其他行,有可能还会与其他内容重叠。元素的背景会延伸穿过内边距。不允许指定负边距值。
注释:不允许使用负值。
#### 例子 1
```
padding:10px 5px 15px 20px;
```
* 上内边距是 10px
* 右内边距是 5px
* 下内边距是 15px
* 左内边距是 20px
#### 例子 2
```
padding:10px 5px 15px;
```
* 上内边距是 10px
* 右内边距和左内边距是 5px
* 下内边距是 15px
#### 例子 3
```
padding:10px 5px;
```
* 上内边距和下内边距是 10px
* 右内边距和左内边距是 5px
#### 例子 4
```
padding:10px;
```
* 所有 4 个内边距都是 10px
| 默认值: | 0 |
| --- | --- |
| 继承性: | no |
| --- | --- |
| 版本: | CSS1 |
| --- | --- |
| JavaScript 语法: | _object_.style.padding="10px 5px" |
| --- | --- |
## 可能的值
| 值 | 描述 |
| --- | --- |
| auto | 浏览器计算内边距。 |
| _length_ | 规定以具体单位计的内边距值,比如像素、厘米等。默认值是 0px。 |
| _%_ | 规定基于父元素的宽度的百分比的内边距。 |
| inherit | 规定应该从父元素继承内边距。 |
## TIY 实例
[所有内边距属性在一个声明中](/tiy/t.asp?f=csse_padding)
本例演示使用简写属性将所有的内边距属性设置于一个声明中,可以有一到四个值。
```
<html>
<head>
<style type="text/css">
td.test1 {padding: 1.5cm}
td.test2 {padding: 0.5cm 2.5cm}
</style>
</head>
<body>
<table border="1">
<tr>
<td class="test1">
这个表格单元的每个边拥有相等的内边距。
</td>
</tr>
</table>
<br />
<table border="1">
<tr>
<td class="test2">
这个表格单元的上和下内边距是 0.5cm,左和右内边距是 2.5cm。
</td>
</tr>
</table>
</body>
</html>
```
## 相关页面
CSS 教程:[CSS 内边距](/css/css_padding.asp "CSS 内边距")
HTML DOM 参考手册:[padding 属性](/jsref/prop_style_padding.asp "HTML DOM padding 属性")
|
Java
|
UTF-8
| 367
| 1.679688
| 2
|
[] |
no_license
|
package com.sanguine.webclub.dao;
import com.sanguine.webclub.model.clsWebClubProfessionMasterModel;
public interface clsWebClubProfessionMasterDao {
public void funAddUpdateWebClubProfessionMaster(clsWebClubProfessionMasterModel objMaster);
public clsWebClubProfessionMasterModel funGetWebClubProfessionMaster(String docCode, String clientCode);
}
|
Java
|
UTF-8
| 2,995
| 2.765625
| 3
|
[] |
no_license
|
package fr.charlier.puissance4game.view;
import fr.charlier.puissance4game.controller.Constante;
import javax.swing.*;
import java.awt.*;
public class JPanelAnimate extends JPanel {
private int posX = 0;
private int posY = 0;
Point points = new Point(posX, posY);
private Color color = new Color(0,0,0,0);
public JPanelAnimate() {
super();
/* setDoubleBuffered(true);
isOptimizedDrawingEnabled();*/
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(getColor());
g.fillOval(getPosX(), getPosY(), Constante.TOKEN_WIDTH, Constante.TOKEN_HEIGHT);
}
public void goAnimatePanel(Point points) {
setPosX((int) points.getX());
setPosY((int) points.getY());
System.out.println("dans animate panel1" + posX + " :" + posY);
}
public int getPosX() {
return posX;
}
public void setPosX(int posX) {
this.posX = posX;
}
public int getPosY() {
return posY;
}
public void setPosY(int posY) {
this.posY = posY;
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
public Point getPoints() {
return points;
}
public void setPoints(Point p) {
this.points = p;
}
}
/*
startButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
progressBar.setValue(0);
progressBar.setStringPainted(true);
// Runs outside of the Swing UI thread
new Thread(new Runnable() {
public void run() {
for (i = 0; i <= 100; i++) {
// Runs inside of the Swing UI thread
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressBar.setValue(i);
}
});
try {
java.lang.Thread.sleep(100);
}
catch(Exception e) { }
}
}
}).start();
}
});
public AnimateJPanel1() {
super();
}
*/
/*
public JPanel createJPanel(){
JPanel jp =new JPanel();
jp.setBounds(50,50,400,400);
jp.setBackground(new Color(0, 0, 0, 200));
jp.setOpaque(true);
return jp;
}*/
/*public void initialise(){
setBounds(50,50,400,400);
setBackground(new Color(0, 0, 0, 200));
setOpaque(true);
}*/
// setBounds(100,100,400,400);
// setBackground(new Color(50, 50, 50, 10));
// setOpaque(false);
// initialise();
// goAnimatePanel();
//createJPanel();
// super();
/* try {
URL url =getClass().getResource("RegateF.png");
if (url == null){
System.out.println("Could find image!");
}
else{
System.out.println("image chargée");
}
image= ImageIO.read(url);
} catch (Exception ex) {
ex.printStackTrace();
}*/
|
Java
|
UTF-8
| 859
| 2.46875
| 2
|
[] |
no_license
|
package com.example.a10.guideapplication.presenter;
import com.example.a10.guideapplication.model.Token;
import com.example.a10.guideapplication.repository.TokenRepository;
import com.example.a10.guideapplication.view.TokenListener;
import java.util.Map;
public class TokenPresenter {
TokenListener listener;
TokenRepository repository;
public TokenPresenter(TokenListener listener, TokenRepository repository){
this.listener = listener;
this.repository = repository;
}
public void getToken(String userName, String password, String grantType){
TokenListener tokenListener = new TokenListener() {
@Override
public void token(Token token) {
listener.token(token);
}
};
repository.getToken(userName, password, grantType, tokenListener);
}
}
|
Java
|
UTF-8
| 800
| 3.21875
| 3
|
[] |
no_license
|
package project.joseph.operators;
import project.joseph.exceptions.CalculatorError;
import project.joseph.exceptions.CalculatorException;
import java.util.Stack;
/**
* Created by josephgan on 5/12/18.
*/
public class Subtraction extends Operator {
public Subtraction() {
this.operator = OperatorEnum.SUBTRACTION;
}
@Override
public void execute(Stack<Double> stack) throws CalculatorException {
if (stack.size() < 2) {
throw new CalculatorException(CalculatorError.INSUFFICIENT_PARAMETERS);
}
Double operand2 = stack.pop();
Double operand1 = stack.pop();
stack.push(subtract(operand1, operand2));
}
public static Double subtract(Double operand1, Double operand2) {
return operand1 - operand2;
}
}
|
JavaScript
|
UTF-8
| 1,144
| 2.671875
| 3
|
[] |
no_license
|
$(document).ready(function() {
// mouseover easter egg
regularText = {
ryan: "",
alex: "",
kyle: "",
jesse: "",
shuyang: "",
zach: ""
};
$(".team-wrapper").hover(function() {
// mouse on
mouseoverText = {
ryan: "the crazy one",
alex: "the misfit",
kyle: "the rebel",
jesse: "the troublemaker",
shuyang: "the round peg in the square hole",
zach: "the one who sees things differently"
};
id = this.id;
for (var key in mouseoverText) {
if (mouseoverText.hasOwnProperty(key) && key == id) {
subtitle = $(this).find("h3")
regularText[key] = subtitle.text()
subtitle.text(mouseoverText[key])
}
}
}, function() {
// mouse off
id = this.id;
for (var key in regularText) {
if (mouseoverText.hasOwnProperty(key) && key == id) {
subtitle = $(this).find("h3")
subtitle.text(regularText[key])
}
}
});
})
|
C
|
UTF-8
| 525
| 4.1875
| 4
|
[] |
no_license
|
#include <stdio.h>
int sum(int* a, int* b)
{
return *a+*b; // Function should be declared first then it should be called in main.
}
int difference(int* x, int* y)
{
return (*x-(*y));// the difference is not working
}
int main()
{
int a,b;
printf("Enter the value of a and b\n");
scanf("%d %d",&a, &b);
a=sum(&a, &b);
b=difference(&a, &b);
printf("The sum is %d\n", a);
printf("The difference is %d\n", b);
return 0;
// With arguments and with return value
}
|
Markdown
|
UTF-8
| 3,186
| 3.03125
| 3
|
[] |
no_license
|
---
title: CS 380 Homework #8
---
<div id="header">
| **CS 380 Homework #8**
| Prof. Richard Eisenberg
| Spring 2017
|
| Due date: Wednesday, April 12, 2017
</div>
Halgebra 2.0
------------
This week's assignment is to update your computer algebra solver from
Homework #3 to use GADTs to eliminate the need for `error`. This is
done by adding a new Step 0 to the procedure that you followed in
Homework #3: convert the `Equation` to the new `LEquation` type that
allows only *linear* equations. The type is declared in the `LArith`
module I have provided.
Here are the relevant modules:
* [Parser.hs](Parser.hs)
* [Arith.hs](Arith.hs)
* [LArith.hs](LArith.hs)
* [Halgebra.hs](Halgebra.hs) (this is where the work is)
* [Main.hs](Main.hs)
The bundle of modules includes a `Main` module. This is not part of
the assignment, but using it, you can say `ghc Main` at the command-line,
and GHC will build an executable `Main` for you that you can use to
solve equations.
If it's helpful, the solution to the last Halgebra assignment is on Moodle.
Portfolio guidelines
--------------------
Here is the breakdown of the functions you have been asked to write for your
type-level portfolio:
* Functions that work straightforwardly on `Vec` (`and`, `or`, `any`, `map`,
`unzip`, `insert`, `sort`,
`foldl`, `foldr`, `scanl`, `scanr`, `mapAccumL`, `mapAccumR`): 13
* Functions that are partial on lists but can be made total on `Vec`s (`last`,
`uncons`, `foldl1`, `foldr1`, `scanl1`, `scanr1`): 6
* Functions that require some type families or other type-level twists (`init`,
`stripPrefix`): 2
* Functions that require interacting with singletons (`null`, `length`,
`take`, `drop`, `replicate`, `splitAt`): 6
* Proofs of reasonable difficulty (commutativity of `+`, associativity of `+`): 2
* Proofs of unreasonable difficulty (commutativity of `*`): 1
* `VecList` functions of reasonable difficulty (`intersperse`): 1
* `VecList` functions of unreasonable difficulty (`inits`, `tails`, `intercalate`,
`subsequences`, `permutations`, `transpose`): 6
* `EVec` functions (`concatMap`, `unfoldr`, `takeWhile`, `dropWhile`, `dropWhileEnd`,
`filter`, `nub`, `delete`, `(\\)`, `union`, `intersect`): 11
* `Fin` functions (`(!!)`, `elemIndex`, `elemIndices`, `findIndex`, `findIndices`): 5
* Functions for which you need to write your own GADT (`span`, `break`, `partition`,
`group`): 4
* The Halgebra solver: one big problem.
This adds up to:
* 46 functions of reasonable difficulty (1 pt each)
* 4 where you have to write a GADT (2 pts each)
* 7 of unreasonable difficulty (5 pts each)
* and Halgebra (10 pts)
The total here is 99 points, but the goal isn't to get to 100. Throwing out the
unreasonable problems gives us 64. Arriving at a power of 2 at this point is
auspicious. (It certainly wasn't planned!) Here are the point values and how much,
roughly, they are worth on the 4.0-point scale:
* 50+ pts: 4.0
* 40+ pts, including at least 1 custom-GADT question *or* Halgebra: 3.7
* 40+ pts, otherwise: 3.3
* 35+ pts: 3.0
* 30+ pts: 2.7
* 25+ pts: 2.3
* 20+ pts: 2.0
As always, do let me know if you have any questions.
|
Java
|
UTF-8
| 1,142
| 2.21875
| 2
|
[] |
no_license
|
package com.start.model;
import com.start.core.CoreModel;
public class FriendHistory extends CoreModel {
public static final String TABLE_NAME="ST_FRIENDHISTORY";
public static final String COLUMN_NAME_MYID="myId";
public static final String COLUMN_NAME_FRIENDID="friendId";
public static final String COLUMN_NAME_UPDATETIME="uTime";
public static final String CREATE_TABLE_SQL =
"CREATE TABLE " + TABLE_NAME + " ("
+ COLUMN_NAME_ID + " TEXT,"
+ COLUMN_NAME_NO+ " TEXT,"
+ COLUMN_NAME_MYID + " TEXT,"
+ COLUMN_NAME_FRIENDID + " TEXT,"
+ COLUMN_NAME_UPDATETIME + " TEXT"
+ ");";
private String myId;
private String friendId;
private String createTime;
public String getMyId() {
return myId;
}
public void setMyId(String myId) {
this.myId = myId;
}
public String getFriendId() {
return friendId;
}
public void setFriendId(String friendId) {
this.friendId = friendId;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return myId;
}
}
|
Java
|
UTF-8
| 2,703
| 2.296875
| 2
|
[] |
no_license
|
package com.arashivision.bmgmedia.utils;
import android.opengl.GLES20;
import android.opengl.GLU;
import android.util.Log;
public class GLUtils {
public static final String TAG = "ins";
public static boolean checkGLError(String str) {
int glGetError = GLES20.glGetError();
if (glGetError == 0) {
return false;
}
String str2 = "ins";
Log.e(str2, String.format("%s error: %s", new Object[]{str, GLU.gluErrorString(glGetError)}));
return true;
}
public static int createProgram(String str, String str2) {
int loadShader = loadShader(35633, str);
int i2 = 0;
if (loadShader == 0) {
return 0;
}
int loadShader2 = loadShader(35632, str2);
if (loadShader2 == 0) {
return 0;
}
int glCreateProgram = GLES20.glCreateProgram();
if (glCreateProgram != 0) {
GLES20.glAttachShader(glCreateProgram, loadShader);
GLES20.glAttachShader(glCreateProgram, loadShader2);
GLES20.glLinkProgram(glCreateProgram);
int[] iArr = new int[1];
GLES20.glGetProgramiv(glCreateProgram, 35714, iArr, 0);
if (iArr[0] != 1) {
String str3 = "ins";
Log.e(str3, "Could not link program");
Log.e(str3, GLES20.glGetProgramInfoLog(glCreateProgram));
GLES20.glDeleteProgram(glCreateProgram);
GLES20.glDeleteShader(loadShader);
GLES20.glDeleteShader(loadShader2);
return i2;
}
}
i2 = glCreateProgram;
GLES20.glDeleteShader(loadShader);
GLES20.glDeleteShader(loadShader2);
return i2;
}
public static int loadShader(int i2, String str) {
int glCreateShader = GLES20.glCreateShader(i2);
if (glCreateShader == 0) {
return glCreateShader;
}
GLES20.glShaderSource(glCreateShader, str);
GLES20.glCompileShader(glCreateShader);
int[] iArr = new int[1];
GLES20.glGetShaderiv(glCreateShader, 35713, iArr, 0);
if (iArr[0] != 0) {
return glCreateShader;
}
Object[] objArr = new Object[1];
objArr[0] = i2 == 35632 ? "fragment" : "vertex";
String format = String.format("failed compile %s shader.", objArr);
String str2 = "ins";
Log.e(str2, format);
StringBuilder sb = new StringBuilder();
sb.append("Shader log: ");
sb.append(GLES20.glGetShaderInfoLog(glCreateShader));
Log.e(str2, sb.toString());
GLES20.glDeleteShader(glCreateShader);
return 0;
}
}
|
Java
|
UTF-8
| 2,962
| 2.125
| 2
|
[
"Apache-2.0"
] |
permissive
|
/*-
* ================================================================================
* DCAE DMaaP Bus Controller Models
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ================================================================================
*/
package org.onap.dcae.dmaapbc.model;
import java.util.List;
/**
* Bean that models a DMaaP Message Router cluster.
*/
public class MR_Cluster extends DmaapObject {
/** dcaeLocation where cluster VMs are deployed */
private String dcaeLocationName;
/** DNS name used by MR clients for this cluster */
private String fqdn;
/** an array of hosts that are part of the MR Cluster. */
private List<String> hosts;
/** TODO */
private String topicPort;
/** TODO */
private String topicProtocol;
public MR_Cluster() {
}
/**
* @param status
* Status
* @param lastMod
* Last modification
* @param dcaeLocationName
* dcaeLocation where cluster VMs are deployed
* @param fqdn
* DNS name used by MR clients for this cluster
* @param hosts
* an array of hosts that are part of the MR Cluster
*/
public MR_Cluster(Dmaap_Status status, String lastMod, String dcaeLocationName, String fqdn, final String[] hosts) {
super(lastMod, status);
this.dcaeLocationName = dcaeLocationName;
this.fqdn = fqdn;
for (String h : hosts)
this.hosts.add(h);
}
public String getDcaeLocationName() {
return dcaeLocationName;
}
public void setDcaeLocationName(String dcaeLocationName) {
this.dcaeLocationName = dcaeLocationName;
}
public String getFqdn() {
return fqdn;
}
public void setFqdn(String fqdn) {
this.fqdn = fqdn;
}
public List<String> getHosts() {
return hosts;
}
public void setHosts(List<String> hosts) {
this.hosts = hosts;
}
public String getTopicPort() {
return topicPort;
}
public void setTopicPort(String topicPort) {
this.topicPort = topicPort;
}
public String getTopicProtocol() {
return topicProtocol;
}
public void setTopicProtocol(String topicProtocol) {
this.topicProtocol = topicProtocol;
}
@Override
public String toString() {
return "MR_Cluster[dcaeLocationName=" + dcaeLocationName + ", fqdn=" + fqdn + ", ...]";
}
}
|
Markdown
|
UTF-8
| 2,268
| 2.609375
| 3
|
[
"MIT"
] |
permissive
|
---
name: 1.6.7
title: 1.6.7 - ERSPAN
short-title: ERSPAN
exam: both
category: Layer 2
collection: Layer2
layout: page
---
Encapsulated Remote SPAN (ERSPAN) is a variant of RSPAN in which we are encapsulating the Remote SPAN information. ERSPAN creates a GRE tunnel for all captured traffic and allows it to be extended across Layer 3 domains. This became an option with IOS-XE.
In this ERSPAN example, ee will configure R1 to capture received traffic and send it to SW1 gig2/1.
```
R1(config)# monitor session 1 type erspan-source
R1(config-mon-erspan-src)# source interface gig1/1 rx
R1(config-mon-erspan-src)# no shutdown
R1(config-mon-erspan-src)# destination
R1(config-mon-erspan-src-dst)# erspan-id 101
R1(config-mon-erspan-src-dst)# ip address 10.1.1.1
R1(config-mon-erspan-src-dst)# origin ip address 172.16.1.1
```
```
SW1(config)# monitor session 2 type erspan-destination
SW1(config-mon-erspan-dst)# destination interface gig2/1
SW1(config-mon-erspan-dst)# no shutdown
SW1(config-mon-erspan-dst)# source
SW1(config-mon-erspan-dst-src)# erspan-id 101
SW1(config-mon-erspan-dst)# ip address 10.1.1.1
```
A couple of configuration notes. First, you must make sure the destination port is not in a shutdown state or else the SPAN session will not come up.
If you want to leave the original encapsulation of the frames intact, use the `encapsulation replicate` option on the monitor session destination command.
One confusing option is the `ingress dot1q vlan 10` option on the destination interface. This is actually telling the switch to accept incoming frames on the *destination* monitor switch and place the frames in VLAN 10. This would let you use the destination port like a normal access port. Seems kind of silly to me as to why you would want to do that, but I am sure there is a reason.
```
monitor session 1 destination interface gig0/24 ingress dot1q vlan 146
```
The above accepts inbound packets with 802.1Q encapsulation with the given VLAN as the default VLAN. Compare that to the example below, which accepts incoming packets with untagged encapsulation type with the specified VLAN as the default VLAN.
```
monitor session 1 destination interface gig0/24 ingress vlan 146
```
To view the session, simply use `show monitor session 1`.
|
Java
|
UTF-8
| 1,859
| 2.40625
| 2
|
[] |
no_license
|
package org.erp.tarak.balanceSheet;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository("balanceSheetDao")
public class BalanceSheetDaoImpl implements BalanceSheetDao {
@Autowired
private SessionFactory sessionFactory;
public void addBalanceSheet(BalanceSheet balanceSheet) {
if (balanceSheet.getBalanceSheetId() > 0) {
sessionFactory.getCurrentSession().update(balanceSheet);
} else {
sessionFactory.getCurrentSession().save(balanceSheet);
}
}
@SuppressWarnings("unchecked")
public List<BalanceSheet> listBalanceSheets() {
return (List<BalanceSheet>) sessionFactory.getCurrentSession()
.createCriteria(BalanceSheet.class).list();
}
public BalanceSheet getBalanceSheet(long empid) {
return (BalanceSheet) sessionFactory.getCurrentSession().get(BalanceSheet.class,
empid);
}
public void deleteBalanceSheet(BalanceSheet balanceSheet) {
sessionFactory
.getCurrentSession()
.createQuery(
"DELETE FROM BalanceSheet WHERE balanceSheetId = "
+ balanceSheet.getBalanceSheetId()).executeUpdate();
}
@Override
public List<BalanceSheet> listPendingBalanceSheets() {
Criteria crit = sessionFactory.getCurrentSession().createCriteria(
BalanceSheet.class);
crit.add(Restrictions.eq("processed", false));
List results = crit.list();
return results;
}
@Override
public List<BalanceSheet> listProcessedBalanceSheets() {
Criteria crit = sessionFactory.getCurrentSession().createCriteria(
BalanceSheet.class);
crit.add(Restrictions.eq("processed", true));
List results = crit.list();
return results;
}
}
|
Java
|
UTF-8
| 602
| 1.953125
| 2
|
[] |
no_license
|
package com.cn.web;
import com.cn.kafka.KafkaProductor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/messageinfo")
public class MessageInfo {
@Autowired
public KafkaProductor kafkaProductor;
@RequestMapping("/send/{msg}")
public String send(@PathVariable("msg") String msg) {
kafkaProductor.send(msg);
return "success";
}
}
|
PHP
|
UTF-8
| 5,365
| 3.09375
| 3
|
[
"MIT"
] |
permissive
|
<?php
// If the form was submitted, scrub the input (server-side validation)
// see below in the html for the client-side validation using jQuery
$name = '';
$gender = '';
$address = '';
$email = '';
$username = '';
$password = '';
$output = '';
$username = $_COOKIE["username"];
$SESID = $_COOKIE["PHPSESSID"];
//Task 2.4 SESSION
if ($username != null && $SESID != null)
echo "<h1>HELLO " . $username . ", you are still logged in</h1>";
//Task 2.4 COOKIE ONLY
else if ($username != null)
echo "<h1>HELLO " . $username . "</h1>";
if ($_POST) {
// collect all input and trim to remove leading and trailing whitespaces
$name = trim($_POST['name']);
$gender = trim($_POST['gender']);
$address = trim($_POST['address']);
$email = trim($_POST['email']);
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$errors = array();
// Validate the input
if (strlen($name) == 0)
array_push($errors, "Please enter your name");
if (!(strcmp($gender, "Male") || strcmp($gender, "Female") || strcmp($gender, "Other")))
array_push($errors, "Please specify your gender");
if (strlen($address) == 0)
array_push($errors, "Please specify your address");
if (!filter_var($email, FILTER_VALIDATE_EMAIL))
array_push($errors, "Please specify a valid email address");
if (strlen($username) == 0)
array_push($errors, "Please enter a valid username");
if (strlen($password) < 5)
array_push($errors, "Please enter a password. Passwords must contain at least 5 characters.");
// If no errors were found, proceed with storing the user input
if (count($errors) == 0) {
array_push($errors, "No errors were found. Thanks!");
}
//Prepare errors for output
$output = '';
foreach ($errors as $val) {
$output .= "<p class='output'>$val</p>";
}
}
?>
<html>
<head>
<!-- Define some CSS -->
<style type="text/css">
.label {
width: 100px;
text-align: right;
float: left;
padding-right: 10px;
font-weight: bold;
}
#register-form label.error, .output {
color: #FB3A3A;
font-weight: bold;
}
</style>
<!-- Load jQuery and the validate plugin -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
<!-- jQuery Form Validation code -->
<script>
// When the browser is ready...
$(function () {
// Setup form validation on the #register-form element
$("#register-form").validate({
// Specify the validation rules
rules: {
name: "required",
gender: "required",
address: "required",
email: {
required: true,
email: true
},
username: "required",
password: {
required: true,
minlength: 5
}
},
// Specify the validation error messages
messages: {
name: "Please enter your name",
gender: "Please specify your gender",
address: "Please enter your address",
email: "Please enter a valid email address",
username: "Please enter a valid username",
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
}
},
submitHandler: function (form) {
form.submit();
}
});
});
</script>
</head>
<body>
<?php echo $output; ?>
<!-- The form that will be parsed by jQuery before submit -->
<form action="process.php" method="post" id="register-form" novalidate="novalidate">
<div class="label">Name</div>
<input type="text" id="name" name="name" value="<?= $name; ?>"/><br/>
<div class="label">Gender</div>
<select id="gender" name="gender">
<option value="Female">Female</option>
<option value="Male">Male</option>
<option value="Other">Other</option>
</select><br/>
<div class="label">Address</div>
<input type="text" id="address" name="address" value="<?= $address; ?>"/><br/>
<div class="label">Email</div>
<input type="text" id="email" name="email" value="<?= $email; ?>"/><br/>
<div class="label">Username</div>
<input type="text" id="username" name="username" value="<?= $username; ?>"/><br/>
<div class="label">Password</div>
<input type="password" id="password" name="password"/><br/>
<div style="margin-left:140px;"><input type="submit" name="submit" value="Submit"/></div>
<div style="margin-left:140px;"><input type="checkbox" name="remember">Remember me</input></div>
</form>
</body>
</html>
|
Java
|
UTF-8
| 7,554
| 1.765625
| 2
|
[] |
no_license
|
package com.sybase365.mobiliser.web.cst.pages.notificationmgr;
import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByBorder;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.basic.MultiLineLabel;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.PropertyModel;
import com.sybase365.mobiliser.util.contract.v5_0.messaging.beans.AttachmentSearchCriteria;
import com.sybase365.mobiliser.util.contract.v5_0.messaging.beans.MessageAttachment;
import com.sybase365.mobiliser.util.tools.wicketutils.ErrorIndicator;
import com.sybase365.mobiliser.web.common.components.CustomPagingNavigator;
import com.sybase365.mobiliser.web.common.dataproviders.DataProviderLoadException;
import com.sybase365.mobiliser.web.common.dataproviders.MessageAttachmentDataProvider;
import com.sybase365.mobiliser.web.util.Constants;
import com.sybase365.mobiliser.web.util.PortalUtils;
@AuthorizeInstantiation(Constants.PRIV_NMGR_EDIT)
public class FindAttachmentPage extends BaseNotificationMgrPage {
private static final long serialVersionUID = 1L;
private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory
.getLogger(FindAttachmentPage.class);
private String name;
private String contentType;
private List<MessageAttachment> attachmentList;
private MessageAttachmentDataProvider dataProvider;
// Table Items
private String totalItemString = null;
private int startIndex = 0;
private int endIndex = 0;
private static final String WICKET_ID_navigator = "navigator";
private static final String WICKET_ID_totalItems = "totalItems";
private static final String WICKET_ID_startIndex = "startIndex";
private static final String WICKET_ID_endIndex = "endIndex";
private static final String WICKET_ID_orderByName = "orderByName";
private static final String WICKET_ID_pageable = "pageable";
private static final String WICKET_ID_Ltype = "Ltype";
private static final String WICKET_ID_Lname = "Lname";
private static final String WICKET_ID_noItemsMsg = "noItemsMsg";
private static final String WICKET_ID_editAction = "editAction";
@Override
protected void initOwnPageComponents() {
super.initOwnPageComponents();
final Form<?> form = new Form("findAttachmentForm",
new CompoundPropertyModel<FindAttachmentPage>(this));
form.add(new FeedbackPanel("errorMessages"));
form.add(new TextField<String>("name").add(new ErrorIndicator()));
form.add(new TextField<String>("contentType").add(new ErrorIndicator()));
final WebMarkupContainer dataViewContainer = new WebMarkupContainer(
"dataViewContainer");
form.add(dataViewContainer);
form.add(new Button("findAttachment") {
private static final long serialVersionUID = 1L;
@Override
public void onSubmit() {
createFindAttachmentDataView(dataViewContainer, true);
}
});
add(form);
createFindAttachmentDataView(dataViewContainer, false);
}
protected void createFindAttachmentDataView(
final WebMarkupContainer dataViewContainer, final boolean isVisible) {
dataProvider = new MessageAttachmentDataProvider(WICKET_ID_pageable,
this);
attachmentList = new ArrayList<MessageAttachment>();
final DataView<MessageAttachment> dataView = new DataView<MessageAttachment>(
WICKET_ID_pageable, dataProvider) {
private static final long serialVersionUID = 1L;
@Override
protected void onBeforeRender() {
try {
AttachmentSearchCriteria criteria = new AttachmentSearchCriteria();
if (PortalUtils.exists(getName()))
criteria.setName(getName().replaceAll("\\*", "%"));
if (PortalUtils.exists(getContentType()))
criteria.setContentType(getContentType().replaceAll(
"\\*", "%"));
dataProvider.findAttachmentsList(criteria, true);
refreshTotalItemCount();
if (dataProvider.size() > 0) {
setVisible(true);
} else {
setVisible(false);
}
} catch (DataProviderLoadException dple) {
LOG.error("An error occured while loading Attachment list",
dple);
error(getLocalizer().getString("attachment.find.error",
this));
}
refreshTotalItemCount();
super.onBeforeRender();
}
@SuppressWarnings("rawtypes")
@Override
protected void populateItem(final Item<MessageAttachment> item) {
final MessageAttachment entry = item.getModelObject();
attachmentList.add(entry);
item.add(new Label(WICKET_ID_Lname, entry.getName()));
item.add(new Label(WICKET_ID_Ltype, String.valueOf(entry
.getContentType())));
// Edit Action
Link<MessageAttachment> editLink = new Link<MessageAttachment>(
WICKET_ID_editAction, item.getModel()) {
@Override
public void onClick() {
MessageAttachment entry = (MessageAttachment) getModelObject();
setResponsePage(new EditAttachmentPage(entry));
}
};
item.add(editLink);
}
private void refreshTotalItemCount() {
totalItemString = Integer.toString(dataProvider.size());
int total = getItemCount();
if (total > 0) {
startIndex = getCurrentPage() * getItemsPerPage() + 1;
endIndex = startIndex + getItemsPerPage() - 1;
if (endIndex > total)
endIndex = total;
} else {
startIndex = 0;
endIndex = 0;
}
}
};
dataView.setItemsPerPage(10);
dataViewContainer.addOrReplace(dataView);
dataViewContainer.addOrReplace(new OrderByBorder(WICKET_ID_orderByName,
WICKET_ID_Lname, dataProvider) {
private static final long serialVersionUID = 1L;
@Override
protected void onSortChanged() {
// For some reasons the dataView can be null when the
// page is
// loading
// and the sort is clicked (clicking the name header),
// so handle
// it
if (dataView != null) {
dataView.setCurrentPage(0);
}
}
});
dataViewContainer.addOrReplace(new MultiLineLabel(WICKET_ID_noItemsMsg,
getLocalizer().getString("attachmentList.noItemsMsg", this)) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
if (dataView.getItemCount() > 0) {
return false;
} else {
return super.isVisible();
}
}
});
// Navigator example: << < 1 2 > >>
dataViewContainer.addOrReplace(new CustomPagingNavigator(
WICKET_ID_navigator, dataView));
dataViewContainer.addOrReplace(new Label(WICKET_ID_totalItems,
new PropertyModel<String>(this, "totalItemString")));
dataViewContainer.addOrReplace(new Label(WICKET_ID_startIndex,
new PropertyModel(this, "startIndex")));
dataViewContainer.addOrReplace(new Label(WICKET_ID_endIndex,
new PropertyModel(this, "endIndex")));
dataViewContainer.setVisible(isVisible);
}
public void setName(final String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setContentType(final String contentType) {
this.contentType = contentType;
}
public String getContentType() {
return contentType;
}
}
|
Java
|
UTF-8
| 798
| 1.976563
| 2
|
[] |
no_license
|
package com.bootdo.increment.dao;
import com.bootdo.increment.domain.TbIncrementUser;
import com.bootdo.increment.domain.dto.UserDTO;
import java.util.List;
/**用户增值日报表Dao
* @Author : oysy
* @Version: 0.0.1
* @Date : 2020-04-14 18:00
**/
public interface UserDayAmountDao {
/**
* 用户增值日报表查询
* @param userDTO
* userName
* userMobile
* userEmail
* entName
* 统计日期
* statisticsDateStart
* statisticsDateEnd
* @return
*/
List<TbIncrementUser> selectUserDayAmountList(UserDTO userDTO);
/**
* 用户增值日报表查询count
* @param userDTO
* @return
*/
int selectUserDayAmountCount(UserDTO userDTO);
}
|
Java
|
UTF-8
| 771
| 2.0625
| 2
|
[] |
no_license
|
package com.zcbl.compent.function.sys;
import java.util.UUID;
import com.zcbl.compent.language.respertories.CmdFactory;
import com.zcbl.compent.language.respertories.Compent;
import com.zcbl.compent.language.respertories.Input;
import com.zcbl.compent.language.respertories.Output;
import com.zcbl.compent.language.respertories.SystemCompent;
import com.zcbl.compent.task.client.annation.SysLoader;
@SysLoader
public class UUidCompent extends SystemCompent
{
public void execute(Compent compent, Input input, Output output)
{
output.getUser().put("result", uuid());
}
public static String uuid()
{
return UUID.randomUUID().toString().replaceAll("-", "");
}
public void load()
{
CmdFactory.getInstance().addCmd(UUidCompent.class.getName(), this);
}
}
|
Java
|
UTF-8
| 317
| 2.171875
| 2
|
[] |
no_license
|
package com.xgame.logic.server.core.gamelog.task;
import com.xgame.logic.server.core.gamelog.logs.BaseLog;
/**
*
*
* @author ye.yuan
*
*/
public class FileLogTask implements Runnable {
BaseLog log;
public FileLogTask(BaseLog log) {
this.log = log;
}
public void run() {
this.log.logToFile();
}
}
|
PHP
|
IBM852
| 446
| 2.765625
| 3
|
[] |
no_license
|
<?php
$Salario = $_POST ["salario"] ;
$Calculo = $_POST["calculo"];
if (($Calculo)== "Reajuste") {
$aumento = ($Salario/100)*38;
echo "Seu Reajuste de : R$" . $aumento ;
}
if (($Calculo)== "Gratificaao") {
$aumento = ($Salario/100)*20;
echo "Sua Gratificaao de : R$" . $aumento ;
}
if (($Calculo)== "Desconto") {
$aumento = ($Salario/100)*15 ;
echo "Seu Salario sera descontado em : R$" . $aumento ;
}
?>
|
C++
|
WINDOWS-1252
| 624
| 3.125
| 3
|
[] |
no_license
|
//1252366 賬 һ
#include <iostream>
using namespace std;
int main()
{
double str1[]={0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9};
double str2[11];
double a;
int i,j;
cout << "Plese enter a number,and place into the aray in the specific raw." << endl;
cin >> a;
for(i=0; i<10; i++)
{
for(j=0; j<i; j++)
str2[j]=str1[j];
if(str1[i]>=a)
{
j=i;
str2[j]=a;
for(int j=i+1; j<11; j++)
str2[j]=str1[j-1];
break;
}
if(i==9)
{
str2[9]=str1[9];
str2[10]=a;
}
}
for(int k=0; k<10; k++)
cout << str2[k] << ' ';
cout << str2[10] << endl;
return 0;
}
|
Markdown
|
UTF-8
| 852
| 3.28125
| 3
|
[
"MIT"
] |
permissive
|
AngularIsomer
=============
Angular JS directives for Isomer <a href="http://jdan.github.io/isomer/">http://jdan.github.io/isomer/</a>
This directive allows you to bind a canvas to an array of isomer shapes, by passing the array into the "ng-shapes" attribute. You can use "isomer" as either an element or attribute on a canvas, for example:
```html
<canvas isomer width="500" height="500" ng-shapes="shapes"></canvas>
<!-- or -->
<isomer width="500" height="500" ng-shapes="shapes"></isomer>
```
ng-shapes can either be an array of shapes, or of objects containing a "shape" and "colour":
```javascript
var shapes = [Isomer.Shape.Prism(Isomer.Point.ORIGIN, 1, 1, 1)];
// or
shapes = [{shape: Isomer.Shape.Prism(Isomer.Point.ORIGIN, 1, 1, 1), colour = new Isomer.Color(255,0,0)}];
```
<i>Note: the directive deep watches the ng-shapes array.</i>
|
Markdown
|
UTF-8
| 2,875
| 3.125
| 3
|
[] |
no_license
|
---
title: "The Background Music of My Life"
date: 2020-08-16T14:01:19-04:00
draft: false
tags: ["reflection"]
---
The background music my life is in Hindi. The funny thing about that fact is I don't understand Hindi. Yet, I find myself here, writing my first blog post with headphones in and the soft lyrics of Arijit Singh ringing in my ears. I knew today was the right day to begin, because of the weather outside. It's especially average, but the air holds a slight chill that's indicative of the coming fall. The feeling of uncertain excitement I've associated with this moment (the change in season) has remained the same over the past 10 years. In middle school, it meant moving to a new house and starting anew. In high school, it meant a new year as a more important leader in the music program. Today, it means the beginning of my third year at UVA. And in this year, compared to others, my uncertainty and excitement are exponentially larger. I'm uncertain about my ability to balance time for work with time for relationships. Despite that, I'm so excited for what I know I can accomplish. (More on previously poor attempts at this balancing act in a different post)
It seems during each experience in my 20 years of life, Hindi music has been a constant. The trend must have originated from experiences in my dad's car. Whenever I had somewhere to be - whether it was basketball tryouts, travel soccer tryouts, clarinet auditions, or my SAT's - it was my dad who would drop me off and pick me up. And for as long as I can remember, he'd refuse to play anything else. My memories of those car rides aren't the most eventful, but they *are* meaningful, because I knew, regardless of my experience at the event I was at, I'd be able to open the door of my dad's car at its end and have that familiar Hindi music fill my ears once again. And in this way, so many of my emotions became subliminaly tied to that sweet music. Uncertainty, disappointment, stress, happiness, fear, anger - each one was felt with it playing in the background. I just never made that realization until recently.
My first two years at UVA were characterized by plenty of personal growth, but that growth came from a place of challenge and disappointment. In moments of stress to perform better, I found listening to Hindi music would calm my nerves. All of my memories linked to the music would resurface in a whirlwhind of nostalgia. And through these memories, I'd subconsciously accept that while there were times where I fell short in the past, life always went on then and it will go on now. This is the power of my life's background music. It grounds me. Through it's melody, I'm reminded of every experience that has played a role in bringing me this far. It's funny to see how the music that held no semantic value for so long grew to represent something much more important.
|
Python
|
UTF-8
| 2,165
| 3.375
| 3
|
[] |
no_license
|
#!/usr/bin/python3.4
"""
Description:
Learning Markov chain part
Usage:
phrase_generator <words> ... [--n <num>]
phrase_generator -h | --help
Options:
-h --help Show this screen.
--n=num Number of words to complement
"""
import pickle
from random import randint
from os import path
from docopt import docopt
from schema import Schema, Use, Optional
def main():
args = docopt(__doc__)
schema = Schema({
'--n': Use(int),
Optional('--help'): object,
'<words>': object,
})
args = schema.validate(args)
num_of_words = args['--n']
words = args['<words>']
order = len(words)
chain = load_chain_from_file(order)
phrase = ' '.join(words)
for i in range(num_of_words):
word = get_next_word(chain, ' '.join(words[-order:]))
if word:
phrase = ' '.join([phrase, word])
words.append(word)
else:
break
print(phrase)
def load_chain_from_file(order):
"""
Загружает цепь из файла, при наличии цепи соответствующего порядка. Иначе прерывает работу.
"""
data_dir = path.join(path.dirname(path.abspath(__file__)), 'data')
filename = data_dir + '/chain_' + str(order) + '.pkl'
if not path.isfile(filename):
print('Вероятно, цепь {0}-порядка еще не создана'.format(order))
exit()
with open(filename, 'rb') as f:
return pickle.load(f)
def get_next_word(chain, phrase_part):
"""
Возвращает следющее случайное слово из возможных за заданной фразой. Вероятность пропорциональна частоте.
Длина фразы должна быть равна порядку цепи.
"""
possible_words = chain.get(phrase_part, '')
if not possible_words:
return
rand = randint(1, sum(possible_words.values()))
for word, weigth in possible_words.items():
rand -= weigth
if rand <= 0:
return word
if __name__ == '__main__':
main()
|
Java
|
UTF-8
| 5,552
| 2.015625
| 2
|
[] |
no_license
|
package com.example.bitinsider;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.media.VolumeShaper;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.Map;
import java.util.Set;
public class MainActivity extends AppCompatActivity {
EditText rollNoEditText, passwordEditText;
Button loginButton;
TextView contactTextView;
public static String studyear,rollno;
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference student = database.getReference(studyear + "/" + rollno);
String storedPass,storedPass1;
boolean flag=false;
public static final String TAG="MainActivity";
@Override
protected void onStop() {
super.onStop();
student.child("LINSTAT").setValue("NO");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
rollNoEditText = (EditText)findViewById(R.id.rollNoEditText);
passwordEditText = (EditText)findViewById(R.id.passwordEditText);
loginButton = (Button)findViewById(R.id.loginButton);
contactTextView = (TextView)findViewById(R.id.contactTextView);
loginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
rollno = rollNoEditText.getText().toString();
String studyeartemp = rollno.substring(rollno.length() - 2);
studyear = "20" + studyeartemp;
final String pass = passwordEditText.getText().toString();
DatabaseReference dbr = database.getReference("");
dbr.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
Map<String, Object> map = (Map<String, Object>) dataSnapshot.getValue();
Set set = map.keySet();
if (set.contains(rollno)) {
flag = true;
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
//if (flag == true){
student = database.getReference(studyear + "/" + rollno);
student.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
Map<String, String> map = (Map<String, String>) dataSnapshot.getValue();
String storedPass = map.get("Pass");
if (pass.equals(storedPass)) {
String LINSTAT = map.get("LINSTAT");
if (LINSTAT.equals("NO")) {
student.child("LINSTAT").setValue("YES");
student.child("Photo").setValue(R.mipmap.ic_launcher);
student.child("About").setValue(rollno);
Intent i = new Intent(MainActivity.this, Years.class);
startActivity(i);
finish();
}
} else {
Toast.makeText(MainActivity.this, "Authentication Problem\nPlease try again.", Toast.LENGTH_LONG).show();
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
Toast.makeText(MainActivity.this, databaseError.getMessage(), Toast.LENGTH_SHORT).show();
}
});
//}
// else
// {
// Toast.makeText(MainActivity.this, "Roll Number Not Found", Toast.LENGTH_SHORT).show();
// }
}
});
// DatabaseReference stud=database.getReference(studyear+"/"+rollno);
// stud.addValueEventListener(new ValueEventListener() {
// @Override
// public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
//
// Map<String,String> map=(Map<String,String>) dataSnapshot.getValue();
// String LINSTAT=map.get("LINSTAT");
// if(LINSTAT.equals("YES"))
// {
// Intent j=new Intent(MainActivity.this, Years.class);
// startActivity(j);
// finish();
// }
// }
//
// @Override
// public void onCancelled(@NonNull DatabaseError databaseError) {
// Toast.makeText(MainActivity.this, databaseError.getMessage(), Toast.LENGTH_SHORT).show();
// }
// });
}
}
|
Go
|
UTF-8
| 709
| 3.25
| 3
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
package experiments
import (
"fmt"
"io/ioutil"
"net/http"
)
func init() {
Experiments["write_temp"] = Experiment{
Name: "Write temp",
Description: "Writes to /home/vcap/tmp",
Handler: http.HandlerFunc(WriteTemp),
}
}
func WriteTemp(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<html><head></head><body>`))
defer w.Write([]byte(`</body></html>`))
err := ioutil.WriteFile("/home/vcap/tmp/foo", []byte("HELLO"), 0777)
if err != nil {
fmt.Fprintf(w, "WRITE ERROR:%s", err.Error())
return
}
data, err := ioutil.ReadFile("/home/vcap/tmp/foo")
if err != nil {
fmt.Fprintf(w, "READ ERROR:%s", err.Error())
return
}
fmt.Fprintf(w, "DATA: %s", string(data))
}
|
Swift
|
UTF-8
| 2,328
| 2.546875
| 3
|
[
"MIT"
] |
permissive
|
//
// TransactionListCell.swift
import UIKit
class TransactionListCell: BaseTableViewCell {
// MARK: - Properties (Lazy)
private lazy var dateLabel: UILabel = {
let label = UILabel()
label.textColor = AppTheme.Color.text_light
label.font = AppTheme.Font.text_smaller
return label
}()
private lazy var statusLabel: UILabel = {
let label = UILabel()
label.textColor = AppTheme.Color.main_green
label.font = AppTheme.Font.text_smaller
label.textAlignment = .right
return label
}()
// MARK: - Life Cycles
override func initCell() {
super.initCell()
nameLabel.font = AppTheme.Font.text_normal_
detailLabel.font = AppTheme.Font.text_normal_.medium()
detailLabel.textColor = AppTheme.Color.text_dark
contentView.addSubViews([
iconView,
nameLabel,
detailLabel,
dateLabel,
statusLabel,
])
}
override func frameLayout() {
let line1H = max(detailLabel.font.lineHeight, nameLabel.font.lineHeight)
let line2H = dateLabel.font.lineHeight
let V_padding = CGFloat(8.0)
let top = (height - line1H - V_padding - line2H) * 0.5
iconView.updateFrame(CGRect(x: 25, y: top + (line1H - 15) * 0.5, width: 15, height: 15))
nameLabel.updateFrame(CGRect(x: iconView.maxX + 10, y: top, width: 80, height: line1H))
detailLabel.updateFrame(CGRect(x: nameLabel.maxX + 10, y: top, width: width - (nameLabel.maxX + 10) - 25, height: line1H))
statusLabel.updateFrame(CGRect(x: width - 100, y: detailLabel.maxY + V_padding, width: 75, height: line2H))
dateLabel.updateFrame(CGRect(x: nameLabel.x, y: nameLabel.maxY + V_padding, width: statusLabel.x - nameLabel.x - 10, height: line2H))
}
// MARK: - Configure Model
override func configure(with row: TableViewRow) {
guard let model: TransactionListCellFrame = row.serializeModel() else { return }
iconView.image = model.icon
nameLabel.text = model.nameText
detailLabel.text = model.detailText
dateLabel.text = model.dateText
statusLabel.text = model.statusText
statusLabel.textColor = model.statusTextColor
}
}
|
SQL
|
UTF-8
| 71,307
| 3.171875
| 3
|
[] |
no_license
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Jan 24, 2021 at 08:17 AM
-- Server version: 8.0.21
-- PHP Version: 7.4.9
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: `masterDB_CT`
--
-- --------------------------------------------------------
--
-- Table structure for table `course_artimat`
--
CREATE TABLE `course_artimat` (
`cartimat_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`conum` int NOT NULL,
`costmt` varchar(255) NOT NULL,
`po1` int DEFAULT NULL,
`po2` int DEFAULT NULL,
`po3` int DEFAULT NULL,
`po4` int DEFAULT NULL,
`po5` int DEFAULT NULL,
`po6` int DEFAULT NULL,
`po7` int DEFAULT NULL,
`po8` int DEFAULT NULL,
`po9` int DEFAULT NULL,
`po10` int DEFAULT NULL,
`po11` int DEFAULT NULL,
`po12` int DEFAULT NULL,
`ps1` int DEFAULT NULL,
`ps2` int DEFAULT NULL,
`ps3` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_assesseval`
--
CREATE TABLE `course_assesseval` (
`cassesseval_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`assess_num` int NOT NULL,
`question_num` varchar(10) NOT NULL,
`reg_no` int NOT NULL,
`mark` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_assessment`
--
CREATE TABLE `course_assessment` (
`cassess_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`assess_num` int NOT NULL,
`question_num` varchar(10) NOT NULL,
`question_stmt` longtext,
`question_img` varchar(100) DEFAULT NULL,
`blooms_level` int NOT NULL,
`co_num` int NOT NULL,
`marks` int NOT NULL,
`entry_date` datetime NOT NULL,
`section` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_assigneval`
--
CREATE TABLE `course_assigneval` (
`cassigneval_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`assign_num` int NOT NULL,
`question_num` int NOT NULL,
`reg_no` int NOT NULL,
`mark` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_assignment`
--
CREATE TABLE `course_assignment` (
`cassign_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`entry_date` date NOT NULL,
`assign_num` int NOT NULL,
`question_num` varchar(10) NOT NULL,
`question_stmt` longtext,
`question_img` varchar(100) DEFAULT NULL,
`co_num` int NOT NULL,
`marks` int NOT NULL,
`deadline` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_attendance`
--
CREATE TABLE `course_attendance` (
`cattend_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`reg_no` int NOT NULL,
`date` date NOT NULL,
`period` int NOT NULL,
`presence` char(1) NOT NULL DEFAULT 'P'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_cacomp`
--
CREATE TABLE `course_cacomp` (
`ccacomp_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`component` varchar(15) NOT NULL,
`total_marks` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_evaluation`
--
CREATE TABLE `course_evaluation` (
`caval_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`type` int NOT NULL,
`total_mark` int NOT NULL,
`marks_obtained` int NOT NULL,
`reg_no` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `course_extcalc`
--
CREATE TABLE `course_extcalc` (
`cextcalc_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`reg_num` int NOT NULL,
`question_num` varchar(10) NOT NULL,
`marks` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_extcomp`
--
CREATE TABLE `course_extcomp` (
`cextcomp_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`question_num` varchar(10) NOT NULL,
`question_co` int NOT NULL,
`question_mark` int NOT NULL,
`question_section` char(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_internalcalc`
--
CREATE TABLE `course_internalcalc` (
`cintcalc_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`reg_no` int NOT NULL,
`ca` float NOT NULL,
`midterm` float NOT NULL,
`total_marks` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_lessonplan`
--
CREATE TABLE `course_lessonplan` (
`clp_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`actual_date` date NOT NULL,
`period` int NOT NULL,
`course_ctopic_id` int NOT NULL,
`references` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_list`
--
CREATE TABLE `course_list` (
`course_code` varchar(15) NOT NULL,
`stream` int NOT NULL,
`regulation` int NOT NULL,
`semester` int NOT NULL,
`title` varchar(55) NOT NULL,
`credit` int NOT NULL,
`objectives` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_reference_table`
--
CREATE TABLE `course_reference_table` (
`reference_id` int NOT NULL,
`ref_code` int NOT NULL,
`category` varchar(30) DEFAULT NULL,
`ref_name` varchar(100) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_registered_students`
--
CREATE TABLE `course_registered_students` (
`cregst_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`reg_no` int NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `course_topic`
--
CREATE TABLE `course_topic` (
`ctopic_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`module_num` int NOT NULL,
`topic_num` varchar(10) NOT NULL,
`topic` varchar(100) NOT NULL,
`conum` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `credentials`
--
CREATE TABLE `credentials` (
`Credentials_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Username` text NOT NULL,
`Password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person`
--
CREATE TABLE `person` (
`Person_ID` int NOT NULL,
`Prefix_Ref` int DEFAULT NULL,
`First_Name` varchar(50) DEFAULT NULL,
`Last_Name` varchar(50) DEFAULT NULL,
`Gender_Ref` int DEFAULT NULL,
`DOB` date DEFAULT NULL,
`Designation` int DEFAULT NULL,
`date_of_joining` date DEFAULT NULL,
`Community_Ref` int DEFAULT NULL,
`Caste` varchar(50) DEFAULT NULL,
`Primary_MailID` varchar(50) DEFAULT NULL,
`Secondary_MailID` varchar(50) DEFAULT NULL,
`Aadhar_Card` bigint DEFAULT NULL,
`PAN_Card` varchar(10) DEFAULT NULL,
`Passport_Number` varchar(10) DEFAULT NULL,
`Primary_ContactNumber` varchar(15) DEFAULT NULL,
`Secondary_ContactNumber` varchar(15) DEFAULT NULL,
`Intercom_Number` varchar(5) DEFAULT NULL,
`Alias_Name` varchar(5) DEFAULT NULL,
`Address_Line1` varchar(250) DEFAULT NULL,
`Address_Line2` varchar(250) DEFAULT NULL,
`Address_Line3` varchar(45) DEFAULT NULL,
`Address_Line4` varchar(45) DEFAULT NULL,
`Photo` blob,
`Marital_Status_Ref` int DEFAULT NULL,
`Room_Num` varchar(6) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_academic`
--
CREATE TABLE `person_academic` (
`Academic_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Course_Code` varchar(7) DEFAULT NULL,
`Session` varchar(20) DEFAULT NULL,
`Semester` int DEFAULT NULL,
`Group` varchar(2) DEFAULT NULL,
`Degree_Ref` int DEFAULT NULL,
`Branch_Ref` int DEFAULT NULL,
`Class_Time` time DEFAULT NULL,
`Class_Type_Ref` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_additional_duties`
--
CREATE TABLE `person_additional_duties` (
`Duty_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Duty_Allotted` varchar(45) DEFAULT NULL,
`Organization` varchar(100) DEFAULT NULL,
`Description` varchar(255) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_awards`
--
CREATE TABLE `person_awards` (
`Award_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Title` varchar(100) DEFAULT NULL,
`Organization` varchar(100) DEFAULT NULL,
`Place` varchar(15) DEFAULT NULL,
`Start_Year` year DEFAULT NULL,
`Details` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_course_details`
--
CREATE TABLE `person_course_details` (
`Course_ID` int NOT NULL,
`Course_Code` varchar(7) NOT NULL,
`Course_Name` varchar(50) DEFAULT NULL,
`Regulation` year DEFAULT NULL,
`Credit` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_events_attended`
--
CREATE TABLE `person_events_attended` (
`Event_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Event_Type_Ref` int DEFAULT NULL,
`Level_Ref` int DEFAULT NULL,
`Event_Title` varchar(100) DEFAULT NULL,
`Hosting_Organization` varchar(100) DEFAULT NULL,
`Place` varchar(45) DEFAULT NULL,
`Participation_Status_Ref` int DEFAULT NULL,
`Role` varchar(45) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_experience`
--
CREATE TABLE `person_experience` (
`Experience_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Designation_Ref` int DEFAULT NULL,
`Organization` varchar(100) DEFAULT NULL,
`Department` varchar(50) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL,
`Emp_Category_Ref` int DEFAULT NULL,
`Work_Nature_Ref` int DEFAULT NULL,
`Position_Held` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_guestlecture`
--
CREATE TABLE `person_guestlecture` (
`GuestLecture_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Level_Ref` int DEFAULT NULL,
`Topic` varchar(100) DEFAULT NULL,
`Programme` varchar(100) DEFAULT NULL,
`Organization` varchar(100) DEFAULT NULL,
`Place` varchar(20) DEFAULT NULL,
`Start_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_membership`
--
CREATE TABLE `person_membership` (
`Member_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Prof_Body` varchar(45) DEFAULT NULL,
`Membership_NUM` varchar(15) DEFAULT NULL,
`Member_Type` int DEFAULT NULL,
`Sart_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_patents`
--
CREATE TABLE `person_patents` (
`Patent_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Title` varchar(100) DEFAULT NULL,
`Patent_Number` varchar(15) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`Place` varchar(15) DEFAULT NULL,
`Patent_Status_Ref` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_project_allocation`
--
CREATE TABLE `person_project_allocation` (
`Project_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Qualification_Level_Ref` int DEFAULT NULL,
`Batch_ID` varchar(5) DEFAULT NULL,
`Reg_Num` bigint DEFAULT NULL,
`Title` varchar(100) DEFAULT NULL,
`Project_Domain` varchar(45) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_project_proposal`
--
CREATE TABLE `person_project_proposal` (
`Proposal_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Title` varchar(100) DEFAULT NULL,
`Project_Type_Ref` int DEFAULT NULL,
`PI_Name` varchar(45) DEFAULT NULL,
`COI1_Name` varchar(45) DEFAULT NULL,
`COI2_Name` varchar(45) DEFAULT NULL,
`Status_Ref` int DEFAULT NULL,
`Fund_Agency` varchar(100) DEFAULT NULL,
`TotalSanctionedAmount` double DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL,
`Dept` varchar(45) DEFAULT NULL,
`Co_Dept` varchar(45) DEFAULT NULL,
`Co_Institution` varchar(100) DEFAULT NULL,
`Abstract` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_publication`
--
CREATE TABLE `person_publication` (
`Publication_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Publication_Type_Ref` int DEFAULT NULL,
`Level_Ref` int DEFAULT NULL,
`Paper_Title` varchar(255) DEFAULT NULL,
`First_Author` varchar(50) DEFAULT NULL,
`Second_Author` varchar(50) DEFAULT NULL,
`Other_Authors` varchar(255) DEFAULT NULL,
`Journal_Name` varchar(255) DEFAULT NULL,
`Volume` int DEFAULT NULL,
`Issue` int DEFAULT NULL,
`DOI` varchar(50) DEFAULT NULL,
`Year_Of_Publish` year DEFAULT NULL,
`Start_Page_No` int DEFAULT NULL,
`End_Page_No` int DEFAULT NULL,
`Publisher` varchar(50) DEFAULT NULL,
`Impact_Factor` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_qualification`
--
CREATE TABLE `person_qualification` (
`Qualification_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Qualification_Level_Ref` int DEFAULT NULL,
`Degree_Ref` int DEFAULT NULL,
`Branch_Ref` int DEFAULT NULL,
`Institution` varchar(100) DEFAULT NULL,
`University` varchar(50) DEFAULT NULL,
`Start_Date` year DEFAULT NULL,
`End_Date` year DEFAULT NULL,
`Class_Obtained_Ref` int DEFAULT NULL,
`Thesis_Title` varchar(150) DEFAULT NULL,
`Specialization` varchar(45) DEFAULT NULL,
`Faculty_Research` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_reference_table`
--
CREATE TABLE `person_reference_table` (
`Reference_ID` int NOT NULL,
`Ref_Code` int NOT NULL,
`Category` varchar(25) DEFAULT NULL,
`Ref_Name` varchar(100) DEFAULT NULL,
`Description` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_responsibility`
--
CREATE TABLE `person_responsibility` (
`Responsibility_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Responsibility_Ref` int DEFAULT NULL,
`Description` varchar(255) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_scholardetails`
--
CREATE TABLE `person_scholardetails` (
`Scholar_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Reg_No` varchar(10) DEFAULT NULL,
`Scholar_Name` varchar(45) DEFAULT NULL,
`Title` varchar(100) DEFAULT NULL,
`Status_Ref` int DEFAULT NULL,
`Guide_Type_Ref` int DEFAULT NULL,
`Fellowship_Received_Ref` int DEFAULT NULL,
`Fellowship_Agency` varchar(45) DEFAULT NULL,
`Fellowship_Amount` float DEFAULT NULL,
`Year_Of_Registration` date DEFAULT NULL,
`Research_Area` varchar(45) DEFAULT NULL,
`Registration_Mode_Ref` int DEFAULT NULL,
`Fellowship_Name` varchar(45) DEFAULT NULL,
`Fellowship_Year` date DEFAULT NULL,
`Year_Of_Completion` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_specialization`
--
CREATE TABLE `person_specialization` (
`Specialization_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`AOS1` varchar(45) DEFAULT NULL,
`AOS2` varchar(45) DEFAULT NULL,
`AOS3` varchar(45) DEFAULT NULL,
`AOS4` varchar(45) DEFAULT NULL,
`AOS5` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_supervision`
--
CREATE TABLE `person_supervision` (
`Supervision_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Degree_Ref` int DEFAULT NULL,
`Guide_Type_Ref` int DEFAULT NULL,
`Reg_No` bigint DEFAULT NULL,
`Start_Year` year DEFAULT NULL,
`End_Year` year DEFAULT NULL,
`Status_Ref` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `person_travel_history`
--
CREATE TABLE `person_travel_history` (
`Travel_ID` int NOT NULL,
`Person_ID` int NOT NULL,
`Title` varchar(100) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL,
`Organization` varchar(100) DEFAULT NULL,
`Place` varchar(15) DEFAULT NULL,
`Agency` varchar(100) DEFAULT NULL,
`Purpose` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `staff_list`
--
CREATE TABLE `staff_list` (
`staff_id` int NOT NULL,
`name` varchar(55) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE `student` (
`Register_No` int NOT NULL,
`First_Name` varchar(50) DEFAULT NULL,
`Middle_Name` varchar(50) DEFAULT NULL,
`Last_Name` varchar(50) DEFAULT NULL,
`Gender_Ref` int DEFAULT NULL,
`DOB` date DEFAULT NULL,
`Community_Ref` int DEFAULT NULL,
`Caste` varchar(50) DEFAULT NULL,
`MailID` varchar(50) DEFAULT NULL,
`Aadhar_Card` varchar(15) DEFAULT NULL,
`Primary_ContactNumber` varchar(15) DEFAULT NULL,
`Secondary_ContactNumber` varchar(15) DEFAULT NULL,
`Address_Line1` varchar(250) DEFAULT NULL,
`Address_Line2` varchar(250) DEFAULT NULL,
`Address_Line3` varchar(45) DEFAULT NULL,
`Address_Line4` varchar(45) DEFAULT NULL,
`Correspondence_Address` varchar(255) DEFAULT NULL,
`Photo` varchar(255) DEFAULT NULL,
`Residential_Type_Ref` int DEFAULT NULL,
`FA` int DEFAULT NULL,
`Programme_Ref` int DEFAULT NULL,
`Branch_Ref` int DEFAULT NULL,
`Registration_Mode_Ref` int DEFAULT NULL,
`Blood_Group_Ref` int DEFAULT NULL,
`GATE_Cutoff_Mark` float DEFAULT NULL,
`Admission_Date` date DEFAULT NULL,
`Admission_Category_Ref` int DEFAULT NULL,
`Scholarship_Received_Ref` int DEFAULT NULL,
`Scholarship_Details` varchar(255) DEFAULT NULL,
`NSS_NSO_YRC_Volunteer_Ref` int DEFAULT NULL,
`Hostel_Block_Room` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_awards`
--
CREATE TABLE `student_awards` (
`Award_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Award_Name` varchar(255) DEFAULT NULL,
`Organizer_Name` varchar(255) DEFAULT NULL,
`Award_Type_Ref` int DEFAULT NULL,
`Award_Category_Ref` int DEFAULT NULL,
`Place_of_Event` varchar(50) DEFAULT NULL,
`Certificate_Copy` varchar(255) DEFAULT NULL,
`Award_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_endsemmarks`
--
CREATE TABLE `student_endsemmarks` (
`Mark_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Semester` int NOT NULL,
`Course_Code` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`Session_Ref` int DEFAULT NULL,
`Grade` varchar(3) NOT NULL,
`Credits` int DEFAULT NULL,
`Entry_Date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_events_participated`
--
CREATE TABLE `student_events_participated` (
`Event_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Event_Name` varchar(50) DEFAULT NULL,
`Event_Type_Ref` int DEFAULT NULL,
`Participation_Type_Ref` int DEFAULT NULL,
`Team_Size` int DEFAULT NULL,
`Event_Organizer` varchar(50) DEFAULT NULL,
`Event_Date` date DEFAULT NULL,
`Prize_Won_Details` varchar(255) DEFAULT NULL,
`Certificate_Copy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_family_details`
--
CREATE TABLE `student_family_details` (
`Family_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Father_Name` varchar(50) DEFAULT NULL,
`Mother_Name` varchar(50) DEFAULT NULL,
`Father_ContactNumber` varchar(15) DEFAULT NULL,
`Mother_ContactNumber` varchar(15) DEFAULT NULL,
`Father_MailID` varchar(50) DEFAULT NULL,
`Mother_MailID` varchar(15) DEFAULT NULL,
`Father_Occupation` varchar(255) DEFAULT NULL,
`Mother_Occupation` varchar(255) DEFAULT NULL,
`Father_Affilation` varchar(50) DEFAULT NULL,
`Mother_Affilation` varchar(50) DEFAULT NULL,
`Father_Company` varchar(50) DEFAULT NULL,
`Mother_Company` varchar(50) DEFAULT NULL,
`Parents_Annual_Income` bigint DEFAULT NULL,
`Local_Guardian_Name` varchar(50) DEFAULT NULL,
`Local_Guardian_Address` varchar(255) DEFAULT NULL,
`Local_Guardian_Contact_Number` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_gpa`
--
CREATE TABLE `student_gpa` (
`Gpa_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Semester` int NOT NULL,
`GPA` float NOT NULL,
`Grade_Sheet` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_higherstudies`
--
CREATE TABLE `student_higherstudies` (
`HigherStudies_ID` int NOT NULL,
`Register_No` int NOT NULL,
`University` varchar(255) DEFAULT NULL,
`Degree` varchar(50) DEFAULT NULL,
`Specialization` varchar(50) DEFAULT NULL,
`Admission_Mode_Ref` int DEFAULT NULL,
`Score` float DEFAULT NULL,
`Country` varchar(45) DEFAULT NULL,
`Location` varchar(45) DEFAULT NULL,
`LOR_Details` varchar(255) DEFAULT NULL,
`Score_Card_Copy` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_internship`
--
CREATE TABLE `student_internship` (
`Internship_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Company` varchar(255) DEFAULT NULL,
`Title` varchar(255) NOT NULL,
`Order_Copy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`Address` varchar(255) DEFAULT NULL,
`Start_Date` date DEFAULT NULL,
`End_Date` date DEFAULT NULL,
`Stiphend_Option_Ref` int DEFAULT NULL,
`Stiphend_Amount` float DEFAULT NULL,
`Selection_Mode_Ref` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `student_list`
--
CREATE TABLE `student_list` (
`reg_no` int NOT NULL,
`name` varchar(55) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `student_placement`
--
CREATE TABLE `student_placement` (
`Placement_ID` int NOT NULL,
`Register_No` int NOT NULL,
`Company` varchar(255) DEFAULT NULL,
`Package` float DEFAULT NULL,
`Appointment_Order_Copy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`Location` varchar(45) DEFAULT NULL,
`Designation` varchar(45) DEFAULT NULL,
`Appointment_OrderNum` varchar(45) DEFAULT NULL,
`Appointment_Letter_IssueDate` date DEFAULT NULL,
`Joining_Date` date DEFAULT NULL,
`Placement_Type_Ref` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `subj_allot`
--
CREATE TABLE `subj_allot` (
`sallot_id` int NOT NULL,
`staff_id` int NOT NULL,
`course_code` varchar(15) NOT NULL,
`group_ref` int NOT NULL,
`session_ref` int NOT NULL,
`class_room` varchar(15) DEFAULT NULL,
`student_count` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `user_info`
--
CREATE TABLE `user_info` (
`user_ID` int NOT NULL,
`username` int NOT NULL,
`user_role` int DEFAULT NULL,
`password` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
`status` varchar(10) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `course_artimat`
--
ALTER TABLE `course_artimat`
ADD PRIMARY KEY (`cartimat_id`),
ADD KEY `code_fk_idx` (`course_code`);
--
-- Indexes for table `course_assesseval`
--
ALTER TABLE `course_assesseval`
ADD PRIMARY KEY (`cassesseval_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`),
ADD KEY `regnum_fk_idx` (`reg_no`);
--
-- Indexes for table `course_assessment`
--
ALTER TABLE `course_assessment`
ADD PRIMARY KEY (`cassess_id`),
ADD UNIQUE KEY `cassess_id_UNIQUE` (`cassess_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`);
--
-- Indexes for table `course_assigneval`
--
ALTER TABLE `course_assigneval`
ADD PRIMARY KEY (`cassigneval_id`),
ADD UNIQUE KEY `cassigneval_id_UNIQUE` (`cassigneval_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`),
ADD KEY `regnum_fk_idx` (`reg_no`);
--
-- Indexes for table `course_assignment`
--
ALTER TABLE `course_assignment`
ADD PRIMARY KEY (`cassign_id`),
ADD UNIQUE KEY `cassign_id_UNIQUE` (`cassign_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`);
--
-- Indexes for table `course_attendance`
--
ALTER TABLE `course_attendance`
ADD PRIMARY KEY (`cattend_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`),
ADD KEY `regno_fk_idx` (`reg_no`);
--
-- Indexes for table `course_cacomp`
--
ALTER TABLE `course_cacomp`
ADD PRIMARY KEY (`ccacomp_id`),
ADD UNIQUE KEY `cintcomp_id_UNIQUE` (`ccacomp_id`),
ADD KEY `code_fk10_idx` (`course_code`),
ADD KEY `group_fk10_idx` (`group_ref`),
ADD KEY `session_fk10_idx` (`session_ref`);
--
-- Indexes for table `course_evaluation`
--
ALTER TABLE `course_evaluation`
ADD PRIMARY KEY (`caval_id`);
--
-- Indexes for table `course_extcalc`
--
ALTER TABLE `course_extcalc`
ADD PRIMARY KEY (`cextcalc_id`),
ADD UNIQUE KEY `cextcalc_id_UNIQUE` (`cextcalc_id`),
ADD KEY `code_fk13_idx` (`course_code`),
ADD KEY `group_fk13_idx` (`group_ref`),
ADD KEY `session_fk13_idx` (`session_ref`),
ADD KEY `regno_fk13_idx` (`reg_num`);
--
-- Indexes for table `course_extcomp`
--
ALTER TABLE `course_extcomp`
ADD PRIMARY KEY (`cextcomp_id`),
ADD UNIQUE KEY `cextcomp_id_UNIQUE` (`cextcomp_id`),
ADD KEY `code_fk12_idx` (`course_code`),
ADD KEY `group_fk12_idx` (`group_ref`),
ADD KEY `session_fk12_idx` (`session_ref`);
--
-- Indexes for table `course_internalcalc`
--
ALTER TABLE `course_internalcalc`
ADD PRIMARY KEY (`cintcalc_id`),
ADD UNIQUE KEY `cintcalc_id_UNIQUE` (`cintcalc_id`),
ADD KEY `code_fk11_idx` (`course_code`),
ADD KEY `group_fk11_idx` (`group_ref`),
ADD KEY `session_fk11_idx` (`session_ref`),
ADD KEY `regnum_fk11_idx` (`reg_no`);
--
-- Indexes for table `course_lessonplan`
--
ALTER TABLE `course_lessonplan`
ADD PRIMARY KEY (`clp_id`),
ADD UNIQUE KEY `clp_id_UNIQUE` (`clp_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`),
ADD KEY `topic_fk_idx` (`course_ctopic_id`);
--
-- Indexes for table `course_list`
--
ALTER TABLE `course_list`
ADD PRIMARY KEY (`course_code`);
--
-- Indexes for table `course_reference_table`
--
ALTER TABLE `course_reference_table`
ADD PRIMARY KEY (`reference_id`),
ADD UNIQUE KEY `reference_id_UNIQUE` (`reference_id`),
ADD UNIQUE KEY `ref_code_UNIQUE` (`ref_code`);
--
-- Indexes for table `course_registered_students`
--
ALTER TABLE `course_registered_students`
ADD PRIMARY KEY (`cregst_id`),
ADD UNIQUE KEY `cregst_id_UNIQUE` (`cregst_id`),
ADD KEY `code_fk_idx` (`course_code`),
ADD KEY `regno_fk_idx` (`reg_no`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`);
--
-- Indexes for table `course_topic`
--
ALTER TABLE `course_topic`
ADD PRIMARY KEY (`ctopic_id`),
ADD UNIQUE KEY `ctopic_id_UNIQUE` (`ctopic_id`),
ADD KEY `code_fk_idx` (`course_code`);
--
-- Indexes for table `credentials`
--
ALTER TABLE `credentials`
ADD PRIMARY KEY (`Credentials_ID`),
ADD UNIQUE KEY `Username` (`Username`(128)),
ADD KEY `Person_ID` (`Person_ID`);
--
-- Indexes for table `person`
--
ALTER TABLE `person`
ADD PRIMARY KEY (`Person_ID`),
ADD UNIQUE KEY `Person_ID_UNIQUE` (`Person_ID`),
ADD KEY `Gender_Reference_ID_FK_idx` (`Gender_Ref`),
ADD KEY `Community_Reference_ID_FK_idx` (`Community_Ref`),
ADD KEY `Marital_Status_Reference_ID_FK_idx` (`Marital_Status_Ref`),
ADD KEY `Prefix_Reference_ID_FK_idx` (`Prefix_Ref`),
ADD KEY `Designation_FK` (`Designation`);
--
-- Indexes for table `person_academic`
--
ALTER TABLE `person_academic`
ADD PRIMARY KEY (`Academic_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Academic_ID`),
ADD KEY `Branch_Reference_ID_FK_idx` (`Branch_Ref`),
ADD KEY `Person_ID_FK219` (`Person_ID`),
ADD KEY `Degree_Reference_ID_FK2_idx` (`Degree_Ref`),
ADD KEY `Class_Type_Reference_ID_FK2_idx` (`Class_Type_Ref`),
ADD KEY `Course_Code_FK_idx` (`Course_Code`);
--
-- Indexes for table `person_additional_duties`
--
ALTER TABLE `person_additional_duties`
ADD PRIMARY KEY (`Duty_ID`),
ADD UNIQUE KEY `Supervision_ID_UNIQUE` (`Duty_ID`),
ADD KEY `Person_ID_FK213` (`Person_ID`);
--
-- Indexes for table `person_awards`
--
ALTER TABLE `person_awards`
ADD PRIMARY KEY (`Award_ID`),
ADD UNIQUE KEY `Award_ID_UNIQUE` (`Award_ID`),
ADD KEY `Person_ID_FK218` (`Person_ID`);
--
-- Indexes for table `person_course_details`
--
ALTER TABLE `person_course_details`
ADD PRIMARY KEY (`Course_ID`,`Course_Code`),
ADD UNIQUE KEY `Member_ID_UNIQUE` (`Course_ID`),
ADD UNIQUE KEY `Course_Code_UNIQUE` (`Course_Code`);
--
-- Indexes for table `person_events_attended`
--
ALTER TABLE `person_events_attended`
ADD PRIMARY KEY (`Event_ID`),
ADD UNIQUE KEY `Event_ID_UNIQUE` (`Event_ID`),
ADD KEY `Event_Type_Reference_ID_FK_idx` (`Event_Type_Ref`),
ADD KEY `Participation_Status_Reference_ID_FK_idx` (`Participation_Status_Ref`),
ADD KEY `Status_Reference_ID_FK_idx` (`Level_Ref`),
ADD KEY `Person_ID_FK2110` (`Person_ID`);
--
-- Indexes for table `person_experience`
--
ALTER TABLE `person_experience`
ADD PRIMARY KEY (`Experience_ID`),
ADD UNIQUE KEY `Experience_ID_UNIQUE` (`Experience_ID`),
ADD KEY `Designation_Reference_ID_FK_idx` (`Designation_Ref`),
ADD KEY `Emp_category_Reference_ID_FK_idx` (`Emp_Category_Ref`),
ADD KEY `Work_Nature_Reference_ID_FK_idx` (`Work_Nature_Ref`),
ADD KEY `Person_ID_FK2` (`Person_ID`);
--
-- Indexes for table `person_guestlecture`
--
ALTER TABLE `person_guestlecture`
ADD PRIMARY KEY (`GuestLecture_ID`),
ADD UNIQUE KEY `GuestLecture_ID_UNIQUE` (`GuestLecture_ID`),
ADD KEY `Level_Reference_ID_FK_idx` (`Level_Ref`),
ADD KEY `Person_ID_FK215` (`Person_ID`);
--
-- Indexes for table `person_membership`
--
ALTER TABLE `person_membership`
ADD PRIMARY KEY (`Member_ID`),
ADD UNIQUE KEY `Member_ID_UNIQUE` (`Member_ID`),
ADD KEY `Person_ID_FK210` (`Person_ID`),
ADD KEY `Member_Type_Reference_FK_idx` (`Member_Type`);
--
-- Indexes for table `person_patents`
--
ALTER TABLE `person_patents`
ADD PRIMARY KEY (`Patent_ID`),
ADD UNIQUE KEY `Patent_ID_UNIQUE` (`Patent_ID`),
ADD KEY `Patent_Status_idx` (`Patent_Status_Ref`),
ADD KEY `Person_ID_FK217` (`Person_ID`);
--
-- Indexes for table `person_project_allocation`
--
ALTER TABLE `person_project_allocation`
ADD PRIMARY KEY (`Project_ID`),
ADD UNIQUE KEY `Supervision_ID_UNIQUE` (`Project_ID`),
ADD KEY `Person_ID_FK213` (`Person_ID`);
--
-- Indexes for table `person_project_proposal`
--
ALTER TABLE `person_project_proposal`
ADD PRIMARY KEY (`Proposal_ID`),
ADD UNIQUE KEY `Proposal_ID_UNIQUE` (`Proposal_ID`),
ADD KEY `Type_Reference_ID_FK_idx` (`Project_Type_Ref`),
ADD KEY `Status_Reference_ID_FK_idx` (`Status_Ref`),
ADD KEY `Person_ID_FK212` (`Person_ID`);
--
-- Indexes for table `person_publication`
--
ALTER TABLE `person_publication`
ADD PRIMARY KEY (`Publication_ID`),
ADD UNIQUE KEY `Journal_ID_UNIQUE` (`Publication_ID`),
ADD KEY `Level_Reference_ID_FK_idx` (`Level_Ref`),
ADD KEY `Person_ID_FK20` (`Person_ID`),
ADD KEY `Type_Reference_ID_FK1_idx` (`Publication_Type_Ref`);
--
-- Indexes for table `person_qualification`
--
ALTER TABLE `person_qualification`
ADD PRIMARY KEY (`Qualification_ID`),
ADD UNIQUE KEY `Qualification_ID_UNIQUE` (`Qualification_ID`),
ADD KEY `Qualify_Level_Reference_ID_FK_idx` (`Qualification_Level_Ref`),
ADD KEY `Degree_Reference_ID_FK_idx` (`Degree_Ref`),
ADD KEY `Branch_Reference_ID_FK_idx` (`Branch_Ref`),
ADD KEY `Class_Reference_ID_FK_idx` (`Class_Obtained_Ref`),
ADD KEY `Person_ID_FK1` (`Person_ID`);
--
-- Indexes for table `person_reference_table`
--
ALTER TABLE `person_reference_table`
ADD PRIMARY KEY (`Reference_ID`),
ADD UNIQUE KEY `Reference_ID_UNIQUE` (`Reference_ID`),
ADD UNIQUE KEY `Ref_Code_Unique` (`Ref_Code`),
ADD UNIQUE KEY `Ref_Code` (`Ref_Code`) USING BTREE;
--
-- Indexes for table `person_responsibility`
--
ALTER TABLE `person_responsibility`
ADD PRIMARY KEY (`Responsibility_ID`),
ADD UNIQUE KEY `Responsibility_ID_UNIQUE` (`Responsibility_ID`),
ADD KEY `Person_ID_FK211` (`Person_ID`),
ADD KEY `Responsibility_Type_Reference_FK_idx` (`Responsibility_Ref`);
--
-- Indexes for table `person_scholardetails`
--
ALTER TABLE `person_scholardetails`
ADD PRIMARY KEY (`Scholar_ID`),
ADD UNIQUE KEY `Scholar_ID_UNIQUE` (`Scholar_ID`),
ADD KEY `Status_Reference_ID_FK_idx` (`Status_Ref`),
ADD KEY `Guide_Type_Reference_ID_FK_idx` (`Guide_Type_Ref`),
ADD KEY `Person_ID_FK214` (`Person_ID`),
ADD KEY `Fellowship_Received_Ref_FK_idx` (`Fellowship_Received_Ref`),
ADD KEY `Registration_Mode_Ref_FK_idx` (`Registration_Mode_Ref`);
--
-- Indexes for table `person_specialization`
--
ALTER TABLE `person_specialization`
ADD PRIMARY KEY (`Specialization_ID`),
ADD UNIQUE KEY `Supervision_ID_UNIQUE` (`Specialization_ID`),
ADD KEY `Person_ID_FK213` (`Person_ID`);
--
-- Indexes for table `person_supervision`
--
ALTER TABLE `person_supervision`
ADD PRIMARY KEY (`Supervision_ID`),
ADD UNIQUE KEY `Supervision_ID_UNIQUE` (`Supervision_ID`),
ADD KEY `Person_ID_FK213` (`Person_ID`),
ADD KEY `Degree_Reference_ID_FK1_idx` (`Degree_Ref`),
ADD KEY `Guide_Type_Reference_ID_FK2_idx` (`Guide_Type_Ref`),
ADD KEY `Status_Reference_ID_FK2_idx` (`Status_Ref`);
--
-- Indexes for table `person_travel_history`
--
ALTER TABLE `person_travel_history`
ADD PRIMARY KEY (`Travel_ID`),
ADD UNIQUE KEY `Abroad_ID_UNIQUE` (`Travel_ID`),
ADD KEY `Person_ID_FK216` (`Person_ID`);
--
-- Indexes for table `staff_list`
--
ALTER TABLE `staff_list`
ADD PRIMARY KEY (`staff_id`),
ADD UNIQUE KEY `staff_id_UNIQUE` (`staff_id`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`Register_No`),
ADD UNIQUE KEY `Person_ID_UNIQUE` (`Register_No`),
ADD KEY `Gender_Reference_ID_FK_idx` (`Gender_Ref`),
ADD KEY `Resedential_Reference_ID_FK_idx` (`Residential_Type_Ref`),
ADD KEY `Programme_Reference_ID_FK_idx` (`Programme_Ref`),
ADD KEY `Branch_Reference_ID_FK_idx` (`Branch_Ref`),
ADD KEY `Community_Reference_ID_FK_idx` (`Community_Ref`),
ADD KEY `Registration_Mode_FK_idx` (`Registration_Mode_Ref`),
ADD KEY `Blood_Group_FK_idx` (`Blood_Group_Ref`),
ADD KEY `Admission_Category_FK_idx` (`Admission_Category_Ref`),
ADD KEY `Scholarship_FK_idx` (`Scholarship_Received_Ref`),
ADD KEY `Volunteer_FK_idx` (`NSS_NSO_YRC_Volunteer_Ref`);
--
-- Indexes for table `student_awards`
--
ALTER TABLE `student_awards`
ADD PRIMARY KEY (`Award_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Award_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Award_Type_FK_idx` (`Award_Type_Ref`),
ADD KEY `Award_Category_FK_idx` (`Award_Category_Ref`);
--
-- Indexes for table `student_endsemmarks`
--
ALTER TABLE `student_endsemmarks`
ADD PRIMARY KEY (`Mark_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Mark_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Session_FK_idx2` (`Session_Ref`),
ADD KEY `Course_Code` (`Course_Code`);
--
-- Indexes for table `student_events_participated`
--
ALTER TABLE `student_events_participated`
ADD PRIMARY KEY (`Event_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Event_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Event_Type_FK_idx` (`Event_Type_Ref`),
ADD KEY `Participation_Type_FK_idx` (`Participation_Type_Ref`);
--
-- Indexes for table `student_family_details`
--
ALTER TABLE `student_family_details`
ADD PRIMARY KEY (`Family_ID`),
ADD UNIQUE KEY `Family_ID_UNIQUE` (`Family_ID`),
ADD KEY `Register_Num_FK` (`Register_No`);
--
-- Indexes for table `student_gpa`
--
ALTER TABLE `student_gpa`
ADD PRIMARY KEY (`Gpa_ID`),
ADD KEY `Register_No` (`Register_No`);
--
-- Indexes for table `student_higherstudies`
--
ALTER TABLE `student_higherstudies`
ADD PRIMARY KEY (`HigherStudies_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`HigherStudies_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Admission_Mode_FK_idx` (`Admission_Mode_Ref`);
--
-- Indexes for table `student_internship`
--
ALTER TABLE `student_internship`
ADD PRIMARY KEY (`Internship_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Internship_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Stiphend_Option_FK_idx` (`Stiphend_Option_Ref`),
ADD KEY `Stiphend_Mode_FK_idx` (`Selection_Mode_Ref`);
--
-- Indexes for table `student_list`
--
ALTER TABLE `student_list`
ADD PRIMARY KEY (`reg_no`),
ADD UNIQUE KEY `reg_no_UNIQUE` (`reg_no`);
--
-- Indexes for table `student_placement`
--
ALTER TABLE `student_placement`
ADD PRIMARY KEY (`Placement_ID`),
ADD UNIQUE KEY `Academic_ID_UNIQUE` (`Placement_ID`),
ADD KEY `Person_ID_FK219` (`Register_No`),
ADD KEY `Placement_Type_FK_idx` (`Placement_Type_Ref`);
--
-- Indexes for table `subj_allot`
--
ALTER TABLE `subj_allot`
ADD PRIMARY KEY (`sallot_id`),
ADD UNIQUE KEY `sallot_id_UNIQUE` (`sallot_id`),
ADD KEY `staff_id_fk_idx` (`staff_id`),
ADD KEY `course_id_fk_idx` (`course_code`),
ADD KEY `group_fk_idx` (`group_ref`),
ADD KEY `session_fk_idx` (`session_ref`);
--
-- Indexes for table `user_info`
--
ALTER TABLE `user_info`
ADD PRIMARY KEY (`user_ID`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `course_artimat`
--
ALTER TABLE `course_artimat`
MODIFY `cartimat_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course_assesseval`
--
ALTER TABLE `course_assesseval`
MODIFY `cassesseval_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course_assessment`
--
ALTER TABLE `course_assessment`
MODIFY `cassess_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
--
-- AUTO_INCREMENT for table `course_assigneval`
--
ALTER TABLE `course_assigneval`
MODIFY `cassigneval_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course_assignment`
--
ALTER TABLE `course_assignment`
MODIFY `cassign_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `course_attendance`
--
ALTER TABLE `course_attendance`
MODIFY `cattend_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `course_cacomp`
--
ALTER TABLE `course_cacomp`
MODIFY `ccacomp_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `course_evaluation`
--
ALTER TABLE `course_evaluation`
MODIFY `caval_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `course_extcalc`
--
ALTER TABLE `course_extcalc`
MODIFY `cextcalc_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `course_extcomp`
--
ALTER TABLE `course_extcomp`
MODIFY `cextcomp_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `course_internalcalc`
--
ALTER TABLE `course_internalcalc`
MODIFY `cintcalc_id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `course_lessonplan`
--
ALTER TABLE `course_lessonplan`
MODIFY `clp_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course_reference_table`
--
ALTER TABLE `course_reference_table`
MODIFY `reference_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `course_registered_students`
--
ALTER TABLE `course_registered_students`
MODIFY `cregst_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course_topic`
--
ALTER TABLE `course_topic`
MODIFY `ctopic_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `credentials`
--
ALTER TABLE `credentials`
MODIFY `Credentials_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `person_academic`
--
ALTER TABLE `person_academic`
MODIFY `Academic_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_additional_duties`
--
ALTER TABLE `person_additional_duties`
MODIFY `Duty_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_awards`
--
ALTER TABLE `person_awards`
MODIFY `Award_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `person_course_details`
--
ALTER TABLE `person_course_details`
MODIFY `Course_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_events_attended`
--
ALTER TABLE `person_events_attended`
MODIFY `Event_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_experience`
--
ALTER TABLE `person_experience`
MODIFY `Experience_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `person_guestlecture`
--
ALTER TABLE `person_guestlecture`
MODIFY `GuestLecture_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_membership`
--
ALTER TABLE `person_membership`
MODIFY `Member_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_patents`
--
ALTER TABLE `person_patents`
MODIFY `Patent_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `person_project_allocation`
--
ALTER TABLE `person_project_allocation`
MODIFY `Project_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_project_proposal`
--
ALTER TABLE `person_project_proposal`
MODIFY `Proposal_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `person_publication`
--
ALTER TABLE `person_publication`
MODIFY `Publication_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `person_qualification`
--
ALTER TABLE `person_qualification`
MODIFY `Qualification_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `person_reference_table`
--
ALTER TABLE `person_reference_table`
MODIFY `Reference_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87;
--
-- AUTO_INCREMENT for table `person_responsibility`
--
ALTER TABLE `person_responsibility`
MODIFY `Responsibility_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_scholardetails`
--
ALTER TABLE `person_scholardetails`
MODIFY `Scholar_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_specialization`
--
ALTER TABLE `person_specialization`
MODIFY `Specialization_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_supervision`
--
ALTER TABLE `person_supervision`
MODIFY `Supervision_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `person_travel_history`
--
ALTER TABLE `person_travel_history`
MODIFY `Travel_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `student_awards`
--
ALTER TABLE `student_awards`
MODIFY `Award_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `student_endsemmarks`
--
ALTER TABLE `student_endsemmarks`
MODIFY `Mark_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=250;
--
-- AUTO_INCREMENT for table `student_events_participated`
--
ALTER TABLE `student_events_participated`
MODIFY `Event_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54;
--
-- AUTO_INCREMENT for table `student_family_details`
--
ALTER TABLE `student_family_details`
MODIFY `Family_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `student_gpa`
--
ALTER TABLE `student_gpa`
MODIFY `Gpa_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `student_higherstudies`
--
ALTER TABLE `student_higherstudies`
MODIFY `HigherStudies_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `student_internship`
--
ALTER TABLE `student_internship`
MODIFY `Internship_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `student_placement`
--
ALTER TABLE `student_placement`
MODIFY `Placement_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `subj_allot`
--
ALTER TABLE `subj_allot`
MODIFY `sallot_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `user_info`
--
ALTER TABLE `user_info`
MODIFY `user_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `course_artimat`
--
ALTER TABLE `course_artimat`
ADD CONSTRAINT `code_fk2` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_assesseval`
--
ALTER TABLE `course_assesseval`
ADD CONSTRAINT `code_fk6` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk6` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regnum_fk6` FOREIGN KEY (`reg_no`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk6` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_assessment`
--
ALTER TABLE `course_assessment`
ADD CONSTRAINT `code_fk5` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk5` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk5` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_assigneval`
--
ALTER TABLE `course_assigneval`
ADD CONSTRAINT `code_fk8` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk8` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regnum_fk8` FOREIGN KEY (`reg_no`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk8` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_assignment`
--
ALTER TABLE `course_assignment`
ADD CONSTRAINT `code_fk7` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk7` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk7` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_attendance`
--
ALTER TABLE `course_attendance`
ADD CONSTRAINT `code_fk4` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk4` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regno_fk4` FOREIGN KEY (`reg_no`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk4` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_cacomp`
--
ALTER TABLE `course_cacomp`
ADD CONSTRAINT `code_fk10` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk10` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk10` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_extcalc`
--
ALTER TABLE `course_extcalc`
ADD CONSTRAINT `code_fk13` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk13` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regno_fk13` FOREIGN KEY (`reg_num`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk13` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_extcomp`
--
ALTER TABLE `course_extcomp`
ADD CONSTRAINT `code_fk12` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk12` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk12` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_internalcalc`
--
ALTER TABLE `course_internalcalc`
ADD CONSTRAINT `code_fk11` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk11` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regnum_fk11` FOREIGN KEY (`reg_no`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk11` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_lessonplan`
--
ALTER TABLE `course_lessonplan`
ADD CONSTRAINT `code_fk21` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk3` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk3` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `topic_fk3` FOREIGN KEY (`course_ctopic_id`) REFERENCES `course_topic` (`ctopic_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_registered_students`
--
ALTER TABLE `course_registered_students`
ADD CONSTRAINT `code_fk` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_fk1` FOREIGN KEY (`group_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `regno_fk1` FOREIGN KEY (`reg_no`) REFERENCES `student_list` (`reg_no`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `session_fk1` FOREIGN KEY (`session_ref`) REFERENCES `course_reference_table` (`ref_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `course_topic`
--
ALTER TABLE `course_topic`
ADD CONSTRAINT `code_fk1` FOREIGN KEY (`course_code`) REFERENCES `course_list` (`course_code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `credentials`
--
ALTER TABLE `credentials`
ADD CONSTRAINT `fk_Person_ID` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`);
--
-- Constraints for table `person`
--
ALTER TABLE `person`
ADD CONSTRAINT `Community_Reference_ID_FK` FOREIGN KEY (`Community_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Designation_FK` FOREIGN KEY (`Designation`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `Gender_Reference_ID_FK` FOREIGN KEY (`Gender_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Marital_Status_Reference_ID_FK` FOREIGN KEY (`Marital_Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_ref_FK` FOREIGN KEY (`Person_ID`) REFERENCES `user_info` (`username`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `Prefix_Reference_ID_FK` FOREIGN KEY (`Prefix_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_academic`
--
ALTER TABLE `person_academic`
ADD CONSTRAINT `Branch_Reference_ID_FK1` FOREIGN KEY (`Branch_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Class_Type_Reference_ID_FK2` FOREIGN KEY (`Class_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Course_Code_FK` FOREIGN KEY (`Course_Code`) REFERENCES `person_course_details` (`Course_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Degree_Reference_ID_FK2` FOREIGN KEY (`Degree_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK219` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_additional_duties`
--
ALTER TABLE `person_additional_duties`
ADD CONSTRAINT `Person_ID_FK21310` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_awards`
--
ALTER TABLE `person_awards`
ADD CONSTRAINT `Person_ID_FK218` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_events_attended`
--
ALTER TABLE `person_events_attended`
ADD CONSTRAINT `Event_Type_Reference_ID_FK` FOREIGN KEY (`Event_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Level_Reference1_ID_FK` FOREIGN KEY (`Level_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Participation_Status_Reference_ID_FK` FOREIGN KEY (`Participation_Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK2110` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_experience`
--
ALTER TABLE `person_experience`
ADD CONSTRAINT `Designation_Reference_ID_FK` FOREIGN KEY (`Designation_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Emp_category_Reference_ID_FK` FOREIGN KEY (`Emp_Category_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK2` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Work_Nature_Reference_ID_FK` FOREIGN KEY (`Work_Nature_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_guestlecture`
--
ALTER TABLE `person_guestlecture`
ADD CONSTRAINT `Level_Reference_ID_FK2` FOREIGN KEY (`Level_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK215` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_membership`
--
ALTER TABLE `person_membership`
ADD CONSTRAINT `Member_Type_Reference_FK` FOREIGN KEY (`Member_Type`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK210` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_patents`
--
ALTER TABLE `person_patents`
ADD CONSTRAINT `Patent_Status` FOREIGN KEY (`Patent_Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK217` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_project_allocation`
--
ALTER TABLE `person_project_allocation`
ADD CONSTRAINT `Person_ID_FK2131` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_project_proposal`
--
ALTER TABLE `person_project_proposal`
ADD CONSTRAINT `Person_ID_FK212` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Status_Reference_ID_FK` FOREIGN KEY (`Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Type_Reference_ID_FK` FOREIGN KEY (`Project_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_publication`
--
ALTER TABLE `person_publication`
ADD CONSTRAINT `Level_Reference_ID_FK` FOREIGN KEY (`Level_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK20` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Type_Reference_ID_FK1` FOREIGN KEY (`Publication_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_qualification`
--
ALTER TABLE `person_qualification`
ADD CONSTRAINT `Branch_Reference_ID_FK` FOREIGN KEY (`Branch_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Class_Reference_ID_FK` FOREIGN KEY (`Class_Obtained_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Degree_Reference_ID_FK` FOREIGN KEY (`Degree_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK1` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Qualify_Level_Reference_ID_FK` FOREIGN KEY (`Qualification_Level_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_responsibility`
--
ALTER TABLE `person_responsibility`
ADD CONSTRAINT `Person_ID_FK211` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Responsibility_Type_Reference_FK` FOREIGN KEY (`Responsibility_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_scholardetails`
--
ALTER TABLE `person_scholardetails`
ADD CONSTRAINT `Fellowship_Received_Ref_FK` FOREIGN KEY (`Fellowship_Received_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Guide_Type_Reference_ID_FK1` FOREIGN KEY (`Guide_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK214` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Registration_Mode_Ref_FK` FOREIGN KEY (`Registration_Mode_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Status_Reference_ID_FK1` FOREIGN KEY (`Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_specialization`
--
ALTER TABLE `person_specialization`
ADD CONSTRAINT `Person_ID_FK213` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_supervision`
--
ALTER TABLE `person_supervision`
ADD CONSTRAINT `Degree_Reference_ID_FK1` FOREIGN KEY (`Degree_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Guide_Type_Reference_ID_FK2` FOREIGN KEY (`Guide_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK2130` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Status_Reference_ID_FK2` FOREIGN KEY (`Status_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `person_travel_history`
--
ALTER TABLE `person_travel_history`
ADD CONSTRAINT `Person_ID_FK216` FOREIGN KEY (`Person_ID`) REFERENCES `person` (`Person_ID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student`
--
ALTER TABLE `student`
ADD CONSTRAINT `Admission_Category_FK` FOREIGN KEY (`Admission_Category_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Blood_Group_FK` FOREIGN KEY (`Blood_Group_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Branch_Reference_ID_FK0` FOREIGN KEY (`Branch_Ref`) REFERENCES `person_reference_table` (`Ref_Code`),
ADD CONSTRAINT `Community_Reference_ID_FK0` FOREIGN KEY (`Community_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Gender_Reference_ID_FK0` FOREIGN KEY (`Gender_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Programme_Reference_ID_FK` FOREIGN KEY (`Programme_Ref`) REFERENCES `person_reference_table` (`Ref_Code`),
ADD CONSTRAINT `Registration_Mode_FK` FOREIGN KEY (`Registration_Mode_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Resedential_Reference_ID_FK` FOREIGN KEY (`Residential_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Scholarship_FK` FOREIGN KEY (`Scholarship_Received_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `User_ID_Ref` FOREIGN KEY (`Register_No`) REFERENCES `user_info` (`username`) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT `Volunteer_FK` FOREIGN KEY (`NSS_NSO_YRC_Volunteer_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_awards`
--
ALTER TABLE `student_awards`
ADD CONSTRAINT `Award_Category_FK` FOREIGN KEY (`Award_Category_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Award_Type_FK` FOREIGN KEY (`Award_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK21902` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_endsemmarks`
--
ALTER TABLE `student_endsemmarks`
ADD CONSTRAINT `Person_ID_FK21900` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Session_FK2` FOREIGN KEY (`Session_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `student_endsemmarks_ibfk_1` FOREIGN KEY (`Course_Code`) REFERENCES `course_list` (`course_code`);
--
-- Constraints for table `student_events_participated`
--
ALTER TABLE `student_events_participated`
ADD CONSTRAINT `Event_Type_FK` FOREIGN KEY (`Event_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Participation_Type_FK` FOREIGN KEY (`Participation_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK219020` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_family_details`
--
ALTER TABLE `student_family_details`
ADD CONSTRAINT `Register_Num_FK` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_gpa`
--
ALTER TABLE `student_gpa`
ADD CONSTRAINT `student_gpa_ibfk_1` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `student_higherstudies`
--
ALTER TABLE `student_higherstudies`
ADD CONSTRAINT `Admission_Mode_FK` FOREIGN KEY (`Admission_Mode_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Person_ID_FK21901` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_internship`
--
ALTER TABLE `student_internship`
ADD CONSTRAINT `Person_ID_FK21903` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Stiphend_Mode_FK` FOREIGN KEY (`Selection_Mode_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Stiphend_Option_FK` FOREIGN KEY (`Stiphend_Option_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `student_placement`
--
ALTER TABLE `student_placement`
ADD CONSTRAINT `Person_ID_FK2190` FOREIGN KEY (`Register_No`) REFERENCES `student` (`Register_No`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `Placement_Type_FK` FOREIGN KEY (`Placement_Type_Ref`) REFERENCES `person_reference_table` (`Ref_Code`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;
|
JavaScript
|
UTF-8
| 630
| 2.65625
| 3
|
[] |
no_license
|
module.exports = {
name: 'gordia',
aliases: ["g", "grodiag"],
description: "I,m tri ying two lern how too spel. Lett,s C ...",
execute(message) {
const letters = ["", "a", "d", "g", "i", "r", "o"];
const l2 = letters[Math.floor(Math.random() * letters.length)];
const l3 = letters[Math.floor(Math.random() * letters.length)];
const l4 = letters[Math.floor(Math.random() * letters.length)];
const l5 = letters[Math.floor(Math.random() * letters.length)];
const l6 = letters[Math.floor(Math.random() * letters.length)];
message.channel.send(`g${l2}${l3}${l4}${l5}${l6}g`);
},
};
|
Markdown
|
UTF-8
| 384
| 3.0625
| 3
|
[
"Apache-2.0"
] |
permissive
|
# Log Trimmer
Cuts out parts of log files, based on timestamp. Uses binary search to efficiently find bounds.
# Examples:
Cut log with standard timestamp format.
```log_trimmer.py -r "2012-10-09 15:45:38" "2012-10-12 14:34:43" -f bigbig.log```
Custom format (Python notation):
```log_trimmer.py -r "30-01-1999 15:55:09" "02-02-1999 22:01:01" -f file.log -t "%d-%m-%Y %H:%M:%S"```
|
PHP
|
UTF-8
| 2,900
| 2.984375
| 3
|
[] |
no_license
|
<?php
/**
* This is an abstract class which will be extended
* by all other classes which will process and display model data.
* The data should be passed as an argument to these classes by a controller
* as these classes will not be able to communicate with the db.
* @author peterg
*
*/
abstract class evbase_view extends ebase{
/**
* This variable will hold a reference to the view object that will display this class
* @var epPage_View
*/
var $m_viewObject;
/**
* Name under which to search the metadata for the object in the view object.
* This name is used when looking for templates
* @var unknown_type
*/
var $m_nameInViewObject;
var $m_dontProcessData;
function __construct($pData){
$this->m_dontProcessData = false;
$this->m_pubdata = array_change_key_case($pData, CASE_LOWER);
$this->m_viewObject = $pData['view_object'];
$this->m_nameInViewObject = $pData['name_in_viewobject'];
}
/**
* Changes the view object which will display this object.
* When we change the view object we tell the object that if it
* has already processed the data - it should do it again.
* @param BaseView $pViewObject
*/
public function setViewObject($pViewObject){
$this->m_viewObject = $pViewObject;
$this->m_dontProcessData = false;
}
/**
* Returns a reference to the view object that will display this object
*/
public function getViewObject(){
return $this->m_viewObject;
}
/**
* Asks the view to replace all the meaningful things in the
* passed string
* @param unknown_type $pStr
*/
protected function ReplaceHtmlFields($pStr) {
if($this->m_viewObject){
return $this->m_viewObject->ReplaceHtmlFields($pStr, $this);
}
}
function DisplayTemplate($pTemplId) {
$lmas = $this->getTemplate($pTemplId);
return $this->ReplaceHtmlFields($lmas);
}
function ProcessData(){
$this->m_dontProcessData = true;
}
/**
* We process the data first (if we haven\'t processed it already) and
* after that we display it.
* @see cbase::Display()
*/
function Display(){
if(!$this->m_dontProcessData){
$this->ProcessData();
}
}
protected function HtmlPrepare($pName) {
if($this->m_viewObject){
return $this->m_viewObject->HtmlPrepare($pName, $this);
}
}
function getTemplate($pTemplName) {
if($this->m_viewObject){
return $this->m_viewObject->getTemplate($pTemplName);
}
}
function getObjTemplate($pTemplId, $templadd="") {
if($this->m_viewObject){
return $this->m_viewObject->getObjectTemplate($pTemplId, $templadd, $this->m_nameInViewObject);
}
}
function objname() {
$lViewObjectHash = '';
if($this->m_viewObject){
$lViewObjectHash = $this->m_viewObject->getPubdataHash();
}
return $this->m_pubdata['cache'] . '_' . get_class($this) . '_' . get_parent_class($this) . '_' . sprintf("%x", $this->getPubdataHash()) . '_' . sprintf("%x", $lViewObjectHash);
}
}
?>
|
SQL
|
UTF-8
| 78,200
| 3.0625
| 3
|
[] |
no_license
|
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2014 at 07:09 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Database: `db_bridgeway`
--
-- --------------------------------------------------------
--
-- Table structure for table `employees`
--
CREATE TABLE IF NOT EXISTS `employees` (
`employee_id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(100) NOT NULL,
`middle_initial` varchar(100) NOT NULL,
`lastname` varchar(100) NOT NULL,
`address1` varchar(100) NOT NULL,
`birthdate` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`position` varchar(100) NOT NULL,
`hire_date` varchar(100) NOT NULL,
`department` varchar(100) NOT NULL,
`edu_vocational` varchar(100) NOT NULL,
`edu_college` varchar(100) NOT NULL,
`edu_secondary` varchar(100) NOT NULL,
`edu_elementary` varchar(100) NOT NULL,
`status` varchar(100) NOT NULL,
`cellphone` varchar(100) NOT NULL,
`telephone` varchar(100) NOT NULL,
`date_applied` varchar(100) NOT NULL,
`date_decline` varchar(100) NOT NULL,
`employee_reference` varchar(100) NOT NULL,
`barcode` varchar(1000) NOT NULL,
`id_images` varchar(100) NOT NULL,
`civil_status` varchar(100) NOT NULL,
PRIMARY KEY (`employee_id`),
KEY `employee_id` (`employee_id`),
KEY `firstname` (`firstname`,`middle_initial`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ;
--
-- Dumping data for table `employees`
--
INSERT INTO `employees` (`employee_id`, `firstname`, `middle_initial`, `lastname`, `address1`, `birthdate`, `email`, `position`, `hire_date`, `department`, `edu_vocational`, `edu_college`, `edu_secondary`, `edu_elementary`, `status`, `cellphone`, `telephone`, `date_applied`, `date_decline`, `employee_reference`, `barcode`, `id_images`, `civil_status`) VALUES
(25, 'Juan', 'C', 'Flavier', 'Cainta Life Homes', '11/13/1982', 'flavio@hotmail.com', 'Sales Agent', '2012-9-10 17:20:10', '', '', '', '', '', 'decline', '09256855555', '', '', '2014-01-01 10:43:01', 'BRW-00025', '4809010508898', '', 'married'),
(27, 'Christopher', 'Lanio', 'Marasigan', 'Fords Street Taniman bayan Cubao Quezon City', '04/06/1993', 'assman_34533@yahoo.com', 'Sales Manager', '2014-01-10 12:04:15', '', '', 'New York State University', 'Afternoon High School', 'Morning Elementary', 'hired', '09183566855', '8885556', '2012-11-12 00:13:56', '2014-01-10 12:04:07', 'BRW-00027', '48037877', '-1.jpg', 'single'),
(30, 'Linda', 'D', 'Curtis', '144 Antipolo City', '02/31/1970', 'lcurtis@hotmail.com', 'Cashier', '2012-10-16 00:13:33', '', '', 'Ateneo Manila', 'Rizal Technology', 'Antipolo Elementary', 'hired', '09144587854', '8659955', '2012-10-13 00:13:23', '', 'BRW-00030', '4800067055861', '30-Photo Id.jpg', 'single'),
(31, 'Andrew', 'T', 'Ang', 'China Town', '10/29/1977', 'ang@gmail.com', 'Sales Agent', '2012-10-15 00:14:10', '', '', 'UP diliman', 'Morning High School', 'Daylight Elementary School', 'hired', '09148546846', '6995788', '', '', 'BRW-00031', '005101520100016', '31-id-pic9.jpg', 'married'),
(32, 'Robert', 'T', 'Patterson', '175 Pasig', '10/10/1990', 'rob@gmail.com', 'Staff', '2014-01-01 10:42:28', '', '', '', '', '', 'decline', '09256845555', '5685455', '2012-12-26 11:19:55', '2014-01-01 10:42:39', 'BRW-00032', '', '-1.jpg', ''),
(33, 'Robert', '', 'Patterson', '', '', 'robert@gmail.com', '', '', '', '', '', '', '', '', '', '', '2012-12-26 11:20:45', '', 'BRW-00033', '', '', ''),
(34, 'sdfsf', '', 'sdfsf', '', '', 'pstomon', '', '', '', '', '', '', '', '', '', '', '2014-01-01 11:59:16', '', 'BRW-00034', '', '', ''),
(35, 'sdfsf', 'T', 'sdfsf', 'Pasig', '11/11/1990', 'mhke_aj5566@yahoo.com', '', '', '', '', '', '', '', 'decline', '19544544455', '', '2014-01-01 12:00:23', '2014-01-01 12:39:25', 'BRW-00035', '', '35-2.jpg', ''),
(36, 'salve', 'G', 'salve', 'pasig', '01/02/2000', 'pagdanganan_michael_ryan@yahoo.com', 'Sales Manager', '2014-01-01 12:40:44', '', '', '', '', '', 'hired', '19544544455', '7874455', '2014-01-01 12:40:01', '', 'BRW-00036', '', '', ''),
(37, 'Elijah', '', 'Jacinto', '', '', 'jacintoelijah@yahoo.com', '', '', '', '', '', '', '', '', '', '', '2014-01-06 09:01:31', '', 'BRW-00037', '', '', ''),
(38, 'carla', 'requireddaw', 'natics', '123 sisa cor basilio st. samaypaloc manila', '04/02/1998', 'maayosnasir@yahoo.com', 'Cashier', '', '', '', '', '', '', 'decline', '12345678901', '', '2014-01-10 11:58:10', '2014-01-10 12:01:31', 'BRW-00038', '', '', ''),
(39, 'joseph', 'p', 'bejar', '3131', '04/13/1995', 'josephbejarfiles@yahoo.com', 'Staff', '', '', '', '', '', '', 'Applicant', '34234', '23423', '2014-01-13 00:58:12', '', 'BRW-00039', '', '', ''),
(40, 'Randell', 'G.', 'Nido', 'Taguig City', '02/11/1991', 'Randell@yahoo.com', 'General Managers', '', '', '', '', '', '', 'decline', '09341435345', '877987', '2014-01-15 16:38:47', '2014-01-15 16:44:33', 'BRW-00040', '', '', ''),
(41, 'Joseph', 'b', 'Amiel', 'fgf', '07//1995', 'joseph@yahoo.com.ph', 'Staff', '', '', '', '', '', '', 'Applicant', '09654645664', '', '2014-01-15 16:54:42', '', 'BRW-00041', '', '', ''),
(42, 'Marc', '', 'Rigor', '', '', 'marc.rig0r', '', '', '', '', '', '', '', '', '', '', '2014-01-31 03:46:59', '', 'BRW-00042', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `existing_employees`
--
CREATE TABLE IF NOT EXISTS `existing_employees` (
`employee_id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(100) NOT NULL,
`middle_initial` varchar(100) NOT NULL,
`lastname` varchar(100) NOT NULL,
`address1` varchar(100) NOT NULL,
`birthdate` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`position` varchar(100) NOT NULL,
`hire_date` varchar(100) NOT NULL,
`department` varchar(100) NOT NULL,
`edu_vocational` varchar(100) NOT NULL,
`edu_college` varchar(100) NOT NULL,
`edu_secondary` varchar(100) NOT NULL,
`edu_elementary` varchar(100) NOT NULL,
`status` varchar(100) NOT NULL,
`cellphone` varchar(100) NOT NULL,
`telephone` varchar(100) NOT NULL,
`date_applied` varchar(100) NOT NULL,
`date_decline` varchar(100) NOT NULL,
`employee_reference` varchar(100) NOT NULL,
`barcode` varchar(1000) NOT NULL,
`id_images` varchar(100) NOT NULL,
`civil_status` varchar(100) NOT NULL,
PRIMARY KEY (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `existing_employees`
--
INSERT INTO `existing_employees` (`employee_id`, `firstname`, `middle_initial`, `lastname`, `address1`, `birthdate`, `email`, `position`, `hire_date`, `department`, `edu_vocational`, `edu_college`, `edu_secondary`, `edu_elementary`, `status`, `cellphone`, `telephone`, `date_applied`, `date_decline`, `employee_reference`, `barcode`, `id_images`, `civil_status`) VALUES
(1, 'Rea', 'M.', 'Taboada', '3554 Pelaez St. Mandaluyong City', '10/07/1979', 'rea@yahoo.com', 'Clerk', '', '', '', '', '', '', 'Applicant', '09062345684', '', '', '', 'BRD-00001', '', '', ''),
(2, 'Jennifer', 'S.', 'Sy', 'Makati City', '11/08/1973', 'jennifer@gmail.com', 'Assistant Managers', '', '', '', '', '', '', 'Applicant', '09341435345', '', '', '', 'BRD-00002', '', '', ''),
(3, 'Julius Caesar', 'G.', 'Galapun', 'Novaliches City', '09/10/1971', 'julius@hotmail.com', 'Chief Executives', '', '', '', '', '', '', 'Applicant', '09341435342', '', '', '', 'BRD-00003', '', '', ''),
(4, 'Vic Arthur', 'C.', 'Tamayo', 'Makati City', '06/06/1971', 'victamayo@yahoo.com', 'Chief Executives', '', '', '', '', '', '', 'Applicant', '09072245684', '', '', '', 'BRD-00004', '', '', ''),
(5, 'Samuel', 'F.', 'Cruz', 'Pasig City', '03/25/1977', 'cruz_samuel77@yahoo.com', 'Staff', '', '', '', '', '', '', 'Applicant', '09302564364', '', '', '', 'BRD-00005', '', '', ''),
(6, 'JUAN', 'D', 'JUAN', 'FDHFJ', '10/18/2000', 'JUAN@YAHOO.COM', 'Sales Manager', '', '', '', '', '', '', 'Applicant', '8293294', '3223', '', '', 'BRD-00006', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_customer`
--
CREATE TABLE IF NOT EXISTS `tbl_customer` (
`cust_id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(100) NOT NULL,
`middle_name` varchar(20) DEFAULT NULL,
`lastname` varchar(100) NOT NULL,
`address` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`contact` varchar(100) NOT NULL,
`gender` varchar(10) NOT NULL,
`civil_status` varchar(15) NOT NULL,
`citizenship` varchar(30) NOT NULL,
`religion` varchar(30) NOT NULL,
`emergency_name` varchar(50) NOT NULL,
`emergency_no` varchar(20) NOT NULL,
`emergency_address` varchar(100) NOT NULL,
`relationship` varchar(50) NOT NULL,
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`date_registered` varchar(100) NOT NULL,
PRIMARY KEY (`cust_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
--
-- Dumping data for table `tbl_customer`
--
INSERT INTO `tbl_customer` (`cust_id`, `firstname`, `middle_name`, `lastname`, `address`, `email`, `contact`, `gender`, `civil_status`, `citizenship`, `religion`, `emergency_name`, `emergency_no`, `emergency_address`, `relationship`, `username`, `password`, `date_registered`) VALUES
(1, 'sheela', NULL, 'marinay', '', 'angpait@yahoo.ahah', 'hahahaha', '', '', '', '', '', '', '', '', 'edgars', '1234', ''),
(3, 'sheela', NULL, 'marinay', '', 'angpait@yahoo.ahah', 'hahahaha', '', '', '', '', '', '', '', '', 'jacinto', '12345', '2014-01-06 09:10:21'),
(4, 'sheela', NULL, 'marinay', '', 'angpait@yahoo.ahah', 'hahahaha', '', '', '', '', '', '', '', '', 'sheelamarinay', '123', '2014-01-10 11:45:56'),
(5, 'kevin', NULL, 'mark', '', 'mkiek@yahoo.com', '123456', '', '', '', '', '', '', '', '', 'mark', '123', '2014-01-10 12:07:50'),
(6, 'Joseph', NULL, 'Bejar', '', 'josephbejarfiles@yahoo.com', '12345678901', '', '', '', '', '', '', '', '', 'joseph', 'bejar', '2014-01-13 00:48:44'),
(7, 'qjweyhquw', NULL, 'qweiou', '', 'ajskdh@yahoo.com', '03493845734', '', '', '', '', '', '', '', '', 'jorelkimcruz', 'qwe', '2014-01-31 00:41:37'),
(8, 'asd', NULL, 'asd', '', 'marcrigor08@yahoo.com', '09068615252', '', '', '', '', '', '', '', '', 'qwe', 'qwe', '2014-01-31 04:07:38'),
(9, 'kioi', NULL, 'popo', '', 'popo@yahoo.com', '090909', '', '', '', '', '', '', '', '', 'popo', 'popo', '2014-01-31 04:26:53'),
(10, 'qweee', NULL, 'qweeee', '', 'marcrigor08@yahoo.com', '09068615252', '', '', '', '', '', '', '', '', 'mnm', 'asd', '2014-01-31 04:54:18'),
(11, 'gh', NULL, 'gh', '', 'marcrigor08@yahoo.com', '09068615252', '', '', '', '', '', '', '', '', 'df', 'asd', '2014-01-31 04:58:04'),
(12, 'dddd', NULL, 'dddd', '', 'marcrigor08@yahoo.com', '09068615252', '', '', '', '', '', '', '', '', 'dddd', 'ddd', '2014-01-31 04:58:53');
-- --------------------------------------------------------
--
-- Table structure for table `tb_attendance`
--
CREATE TABLE IF NOT EXISTS `tb_attendance` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`emp_name` varchar(100) NOT NULL,
`time_in` datetime NOT NULL,
`time_out` datetime NOT NULL,
`date` date NOT NULL,
`emp_id` int(5) NOT NULL,
`job` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=89 ;
--
-- Dumping data for table `tb_attendance`
--
INSERT INTO `tb_attendance` (`id`, `emp_name`, `time_in`, `time_out`, `date`, `emp_id`, `job`) VALUES
(1, 'qqwe', '0000-00-00 00:00:00', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(2, 'jayven', '0000-00-00 00:00:00', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(15, 'jayven', '0000-00-00 00:00:00', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(29, 'jayven', '0000-00-00 00:00:00', '2014-02-04 07:08:24', '0000-00-00', 0, 'out'),
(31, 'emp_admin', '2014-02-03 01:07:46', '2014-02-04 07:04:06', '0000-00-00', 45, 'out'),
(34, 'jayven', '2014-02-03 01:33:02', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(35, 'jayven', '2014-02-03 01:35:29', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(36, 'employee', '2014-02-03 10:49:17', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(38, 'employee', '2014-02-03 11:04:04', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(40, 'jorel', '2014-02-03 11:05:19', '2014-02-04 19:30:58', '0000-00-00', 4, 'out'),
(44, 'jayven', '2014-02-03 11:14:14', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(45, 'jayven', '2014-02-03 11:18:35', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(46, 'jayven', '2014-02-03 11:21:42', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(47, 'jayven', '2014-02-03 11:22:16', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(48, 'jayven', '2014-02-03 11:24:08', '2014-02-03 23:39:59', '2014-02-01', 2, 'out'),
(49, 'qweqweqwe', '2014-02-03 11:25:50', '2014-02-03 23:46:36', '0000-00-00', 3, 'out'),
(51, 'jayven', '2014-02-03 11:35:41', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(53, 'jayven', '2014-02-03 11:37:41', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(60, 'jayven', '2014-02-03 11:40:33', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(61, 'pansit', '2014-02-03 11:45:25', '2014-02-21 03:40:40', '0000-00-00', 5, 'out'),
(62, 'pansit', '2014-02-03 11:58:22', '2014-02-21 03:40:40', '0000-00-00', 5, 'out'),
(63, 'jason', '2014-02-03 12:15:36', '2014-02-03 13:42:22', '0000-00-00', 6, 'out'),
(64, 'jason jason', '2014-02-03 13:42:13', '2014-02-03 13:42:22', '0000-00-00', 6, 'out'),
(65, 'employee employee', '2014-02-03 17:13:42', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(66, 'jesica jesica', '2014-02-04 06:30:32', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(67, 'jesica jesica', '2014-02-04 06:31:29', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(68, 'jesica jesica', '2014-02-04 06:32:07', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(69, 'jesica jesica', '2014-02-04 06:32:58', '2014-02-04 07:01:31', '0000-00-00', 7, 'out'),
(70, 'jesica jesica', '2014-02-04 06:35:22', '2014-02-04 07:01:31', '2014-02-04', 7, 'out'),
(71, 'jesica jesica', '2014-02-04 07:01:29', '2014-02-04 07:01:31', '2014-02-04', 7, 'out'),
(72, 'jayven javier', '2014-02-04 07:05:49', '2014-02-03 23:39:59', '2014-02-04', 2, 'out'),
(73, 'qweqweqwe qweqwe', '2014-02-04 07:07:32', '2014-02-03 23:46:36', '2014-02-04', 3, 'out'),
(74, 'employee employee', '2014-02-04 07:08:01', '2014-02-03 23:46:12', '2014-02-04', 1, 'out'),
(75, 'jayven javier', '2014-02-04 07:08:22', '2014-02-03 23:39:59', '2014-02-04', 2, 'out'),
(76, 'jayven javier', '2014-02-04 19:15:47', '2014-02-03 23:39:59', '2014-02-04', 2, 'out'),
(77, 'jorel jorel', '2014-02-04 19:30:52', '2014-02-04 19:30:58', '2014-02-04', 4, 'out'),
(78, 'pansit pansit', '2014-02-04 19:34:08', '2014-02-21 03:40:40', '2014-02-04', 5, 'out'),
(79, 'employee employee', '2014-02-03 23:39:24', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(80, 'jayven javier', '2014-02-03 23:39:36', '2014-02-03 23:39:59', '0000-00-00', 2, 'out'),
(81, 'employee employee', '2014-02-03 23:40:04', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(82, 'employee employee', '2014-02-03 23:40:09', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(83, 'employee employee', '2014-02-03 23:40:13', '2014-02-03 23:46:12', '0000-00-00', 1, 'out'),
(84, 'employee employee', '2014-02-03 23:46:07', '2014-02-03 23:46:12', '2014-02-03', 1, 'out'),
(85, 'jayven javier', '2014-02-03 23:46:28', '0000-00-00 00:00:00', '2014-02-03', 2, 'in'),
(86, 'jorel jorel', '2014-02-03 23:46:34', '0000-00-00 00:00:00', '2014-02-03', 4, 'in'),
(87, 'qweqweqwe qweqwe', '2014-02-03 23:46:38', '0000-00-00 00:00:00', '2014-02-03', 3, 'in'),
(88, 'pansit pansit', '2014-02-21 03:40:37', '2014-02-21 03:40:40', '2014-02-21', 5, 'out');
-- --------------------------------------------------------
--
-- Table structure for table `tb_audit_trail`
--
CREATE TABLE IF NOT EXISTS `tb_audit_trail` (
`audit_trail_tr_no` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
`id` char(9) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`object` varchar(100) NOT NULL,
`action` varchar(30) NOT NULL,
`description` varchar(30) NOT NULL,
PRIMARY KEY (`audit_trail_tr_no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1423 ;
--
-- Dumping data for table `tb_audit_trail`
--
INSERT INTO `tb_audit_trail` (`audit_trail_tr_no`, `id`, `date`, `object`, `action`, `description`) VALUES
(0000000851, '', '2014-02-01 12:39:17', 'Authentication', 'Logout', 'Successful'),
(0000000852, '', '2014-02-01 13:32:25', 'Authentication', 'Login', 'Successful'),
(0000000853, '', '2014-02-01 13:33:18', 'Authentication', 'Logout', 'Successful'),
(0000000854, '', '2014-02-01 13:33:45', 'Authentication', 'Login', 'Successful'),
(0000000855, '', '2014-02-01 13:34:43', 'Authentication', 'Logout', 'Successful'),
(0000000856, '', '2014-02-01 13:34:54', 'Authentication', 'Login', 'Successful'),
(0000000857, '', '2014-02-01 13:35:00', 'Authentication', 'Logout', 'Successful'),
(0000000858, '', '2014-02-01 13:35:15', 'Authentication', 'Login', 'Successful'),
(0000000859, '', '2014-02-01 17:52:18', 'Authentication', 'Login', 'Successful'),
(0000000860, '', '2014-02-01 18:19:47', 'Authentication', 'Logout', 'Successful'),
(0000000861, '', '2014-02-01 18:19:57', 'Authentication', 'Login', 'Successful'),
(0000000862, '', '2014-02-01 18:20:18', 'Authentication', 'Logout', 'Successful'),
(0000000863, '', '2014-02-01 18:20:37', 'Authentication', 'Login', 'Successful'),
(0000000864, '', '2014-02-01 18:20:48', 'Authentication', 'Logout', 'Successful'),
(0000000865, '', '2014-02-01 18:20:55', 'Authentication', 'Login', 'Successful'),
(0000000866, '', '2014-02-01 18:21:00', 'Authentication', 'Logout', 'Successful'),
(0000000867, '', '2014-02-01 18:21:38', 'Authentication', 'Logout', 'Successful'),
(0000000868, '', '2014-02-01 18:21:47', 'Authentication', 'Login', 'Successful'),
(0000000869, '', '2014-02-01 18:23:08', 'Authentication', 'Logout', 'Successful'),
(0000000870, '', '2014-02-01 18:23:19', 'Authentication', 'Login', 'Successful'),
(0000000871, '', '2014-02-01 18:23:33', 'Authentication', 'Logout', 'Successful'),
(0000000872, '', '2014-02-01 18:23:57', 'Authentication', 'Login', 'Successful'),
(0000000873, '', '2014-02-01 18:25:02', 'Authentication', 'Logout', 'Successful'),
(0000000874, '', '2014-02-01 18:25:09', 'Authentication', 'Login', 'Successful'),
(0000000875, '', '2014-02-01 18:31:20', 'Authentication', 'Logout', 'Successful'),
(0000000876, '', '2014-02-01 18:31:49', 'Authentication', 'Login', 'Successful'),
(0000000877, '', '2014-02-01 18:33:39', 'Authentication', 'Logout', 'Successful'),
(0000000878, '', '2014-02-01 18:33:45', 'Authentication', 'Login', 'Successful'),
(0000000879, '', '2014-02-01 20:43:55', 'Authentication', 'Logout', 'Successful'),
(0000000880, '', '2014-02-01 20:44:02', 'Authentication', 'Login', 'Successful'),
(0000000881, '', '2014-02-02 11:47:50', 'Authentication', 'Login', 'Successful'),
(0000000882, '', '2014-02-02 11:55:15', 'Authentication', 'Logout', 'Successful'),
(0000000883, '', '2014-02-02 11:55:24', 'Authentication', 'Login', 'Successful'),
(0000000884, '', '2014-02-02 11:57:59', 'Authentication', 'Logout', 'Successful'),
(0000000885, '', '2014-02-02 11:58:16', 'Authentication', 'Login', 'Successful'),
(0000000886, '', '2014-02-02 12:00:20', 'Authentication', 'Logout', 'Successful'),
(0000000887, '', '2014-02-02 12:00:25', 'Authentication', 'Login', 'Successful'),
(0000000888, '', '2014-02-02 13:22:42', 'Authentication', 'Logout', 'Successful'),
(0000000889, '', '2014-02-02 13:22:47', 'Authentication', 'Login', 'Successful'),
(0000000890, '', '2014-02-02 13:39:05', 'Authentication', 'Logout', 'Successful'),
(0000000891, '', '2014-02-02 13:39:16', 'Authentication', 'Login', 'Successful'),
(0000000892, '', '2014-02-02 13:39:19', 'Authentication', 'Logout', 'Successful'),
(0000000893, '', '2014-02-02 13:39:23', 'Authentication', 'Login', 'Successful'),
(0000000894, '', '2014-02-02 13:40:34', 'Authentication', 'Logout', 'Successful'),
(0000000895, '', '2014-02-02 13:40:42', 'Authentication', 'Login', 'Successful'),
(0000000896, '', '2014-02-02 13:40:53', 'Authentication', 'Logout', 'Successful'),
(0000000897, '', '2014-02-02 13:40:58', 'Authentication', 'Login', 'Successful'),
(0000000898, '', '2014-02-02 14:08:09', 'Authentication', 'Logout', 'Successful'),
(0000000899, '', '2014-02-02 14:08:16', 'Authentication', 'Login', 'Successful'),
(0000000900, '', '2014-02-02 17:44:42', 'Authentication', 'Logout', 'Successful'),
(0000000901, '', '2014-02-02 17:44:46', 'Authentication', 'Login', 'Successful'),
(0000000902, '', '2014-02-02 17:45:29', 'Authentication', 'Logout', 'Successful'),
(0000000903, '', '2014-02-02 17:45:35', 'Authentication', 'Login', 'Successful'),
(0000000904, '', '2014-02-02 17:54:36', 'Authentication', 'Logout', 'Successful'),
(0000000905, '', '2014-02-02 17:54:41', 'Authentication', 'Login', 'Successful'),
(0000000906, '', '2014-02-02 17:55:19', 'Authentication', 'Logout', 'Successful'),
(0000000907, '', '2014-02-02 17:55:26', 'Authentication', 'Login', 'Successful'),
(0000000908, '', '2014-02-02 17:56:28', 'Authentication', 'Logout', 'Successful'),
(0000000909, '', '2014-02-02 17:56:32', 'Authentication', 'Login', 'Successful'),
(0000000910, '', '2014-02-02 17:56:54', 'Authentication', 'Logout', 'Successful'),
(0000000911, '', '2014-02-02 17:57:06', 'Authentication', 'Login', 'Successful'),
(0000000912, '', '2014-02-02 17:58:03', 'Authentication', 'Logout', 'Successful'),
(0000000913, '', '2014-02-02 17:58:09', 'Authentication', 'Login', 'Successful'),
(0000000914, '', '2014-02-02 17:58:18', 'Authentication', 'Logout', 'Successful'),
(0000000915, '', '2014-02-02 17:58:22', 'Authentication', 'Login', 'Successful'),
(0000000916, '', '2014-02-02 17:58:26', 'Authentication', 'Logout', 'Successful'),
(0000000917, '', '2014-02-02 17:58:33', 'Authentication', 'Login', 'Successful'),
(0000000918, '', '2014-02-02 17:59:57', 'Authentication', 'Logout', 'Successful'),
(0000000919, '', '2014-02-02 18:00:03', 'Authentication', 'Login', 'Successful'),
(0000000920, '', '2014-02-02 18:00:15', 'Authentication', 'Logout', 'Successful'),
(0000000921, '', '2014-02-02 18:00:21', 'Authentication', 'Login', 'Successful'),
(0000000922, '', '2014-02-02 18:01:38', 'Authentication', 'Logout', 'Successful'),
(0000000923, '', '2014-02-02 18:01:43', 'Authentication', 'Login', 'Successful'),
(0000000924, '', '2014-02-02 18:01:50', 'Authentication', 'Logout', 'Successful'),
(0000000925, '', '2014-02-02 18:01:56', 'Authentication', 'Login', 'Successful'),
(0000000926, '', '2014-02-02 18:02:12', 'Authentication', 'Logout', 'Successful'),
(0000000927, '', '2014-02-02 18:02:19', 'Authentication', 'Login', 'Successful'),
(0000000928, '', '2014-02-02 18:02:28', 'Authentication', 'Logout', 'Successful'),
(0000000929, '', '2014-02-02 18:02:33', 'Authentication', 'Login', 'Successful'),
(0000000930, '', '2014-02-02 18:03:24', 'Authentication', 'Logout', 'Successful'),
(0000000931, '', '2014-02-02 18:03:29', 'Authentication', 'Login', 'Successful'),
(0000000932, '', '2014-02-02 18:03:48', 'Authentication', 'Logout', 'Successful'),
(0000000933, '', '2014-02-02 18:03:56', 'Authentication', 'Login', 'Successful'),
(0000000934, '', '2014-02-02 18:05:47', 'Authentication', 'Logout', 'Successful'),
(0000000935, '', '2014-02-02 18:05:52', 'Authentication', 'Login', 'Successful'),
(0000000936, '', '2014-02-02 18:06:08', 'Authentication', 'Logout', 'Successful'),
(0000000937, '', '2014-02-02 18:06:14', 'Authentication', 'Login', 'Successful'),
(0000000938, '', '2014-02-02 18:07:39', 'Authentication', 'Logout', 'Successful'),
(0000000939, '', '2014-02-02 18:08:05', 'Authentication', 'Login', 'Successful'),
(0000000940, '', '2014-02-02 18:08:23', 'Authentication', 'Logout', 'Successful'),
(0000000941, '', '2014-02-02 18:08:33', 'Authentication', 'Login', 'Successful'),
(0000000942, '', '2014-02-02 18:09:02', 'Authentication', 'Logout', 'Successful'),
(0000000943, '', '2014-02-02 18:09:08', 'Authentication', 'Login', 'Successful'),
(0000000944, '', '2014-02-02 18:09:14', 'Authentication', 'Logout', 'Successful'),
(0000000945, '', '2014-02-02 18:09:19', 'Authentication', 'Login', 'Successful'),
(0000000946, '', '2014-02-03 15:07:09', 'Authentication', 'Login', 'Successful'),
(0000000947, '', '2014-02-03 15:13:42', 'Authentication', 'Logout', 'Successful'),
(0000000948, '', '2014-02-03 15:13:49', 'Authentication', 'Login', 'Successful'),
(0000000949, '', '2014-02-03 15:13:57', 'Authentication', 'Logout', 'Successful'),
(0000000950, '', '2014-02-03 15:14:02', 'Authentication', 'Login', 'Successful'),
(0000000951, '', '2014-02-03 15:14:10', 'Authentication', 'Logout', 'Successful'),
(0000000952, '', '2014-02-03 15:14:18', 'Authentication', 'Login', 'Successful'),
(0000000953, '', '2014-02-03 15:20:10', 'Authentication', 'Logout', 'Successful'),
(0000000954, '', '2014-02-03 15:20:18', 'Authentication', 'Login', 'Successful'),
(0000000955, '', '2014-02-03 15:20:25', 'Authentication', 'Logout', 'Successful'),
(0000000956, '', '2014-02-03 15:20:32', 'Authentication', 'Login', 'Successful'),
(0000000957, '', '2014-02-03 15:21:34', 'Authentication', 'Logout', 'Successful'),
(0000000958, '', '2014-02-03 15:21:41', 'Authentication', 'Login', 'Successful'),
(0000000959, '', '2014-02-03 15:21:53', 'Authentication', 'Logout', 'Successful'),
(0000000960, '', '2014-02-03 15:22:01', 'Authentication', 'Login', 'Successful'),
(0000000961, '', '2014-02-03 15:23:28', 'Authentication', 'Logout', 'Successful'),
(0000000962, '', '2014-02-03 15:23:33', 'Authentication', 'Login', 'Successful'),
(0000000963, '', '2014-02-03 15:23:39', 'Authentication', 'Logout', 'Successful'),
(0000000964, '', '2014-02-03 15:23:45', 'Authentication', 'Login', 'Successful'),
(0000000965, '', '2014-02-03 15:24:30', 'Authentication', 'Logout', 'Successful'),
(0000000966, '', '2014-02-03 15:24:34', 'Authentication', 'Login', 'Successful'),
(0000000967, '', '2014-02-03 15:24:46', 'Authentication', 'Logout', 'Successful'),
(0000000968, '', '2014-02-03 15:24:57', 'Authentication', 'Login', 'Successful'),
(0000000969, '', '2014-02-03 15:25:56', 'Authentication', 'Logout', 'Successful'),
(0000000970, '', '2014-02-03 15:26:00', 'Authentication', 'Login', 'Successful'),
(0000000971, '', '2014-02-03 15:26:19', 'Authentication', 'Logout', 'Successful'),
(0000000972, '', '2014-02-03 15:26:25', 'Authentication', 'Login', 'Successful'),
(0000000973, '', '2014-02-03 15:29:31', 'Authentication', 'Logout', 'Successful'),
(0000000974, '', '2014-02-03 15:29:35', 'Authentication', 'Login', 'Successful'),
(0000000975, '', '2014-02-03 15:29:40', 'Authentication', 'Logout', 'Successful'),
(0000000976, '', '2014-02-03 15:29:46', 'Authentication', 'Login', 'Successful'),
(0000000977, '', '2014-02-03 15:30:05', 'Authentication', 'Logout', 'Successful'),
(0000000978, '', '2014-02-03 15:30:10', 'Authentication', 'Login', 'Successful'),
(0000000979, '', '2014-02-03 15:30:17', 'Authentication', 'Logout', 'Successful'),
(0000000980, '', '2014-02-03 15:30:24', 'Authentication', 'Login', 'Successful'),
(0000000981, '', '2014-02-03 15:32:03', 'Authentication', 'Logout', 'Successful'),
(0000000982, '', '2014-02-03 15:32:08', 'Authentication', 'Login', 'Successful'),
(0000000983, '', '2014-02-03 15:32:19', 'Authentication', 'Logout', 'Successful'),
(0000000984, '', '2014-02-03 15:32:23', 'Authentication', 'Login', 'Successful'),
(0000000985, '', '2014-02-03 15:34:56', 'Authentication', 'Logout', 'Successful'),
(0000000986, '', '2014-02-03 15:35:01', 'Authentication', 'Login', 'Successful'),
(0000000987, '', '2014-02-03 15:35:07', 'Authentication', 'Logout', 'Successful'),
(0000000988, '', '2014-02-03 15:35:13', 'Authentication', 'Login', 'Successful'),
(0000000989, '', '2014-02-03 15:39:11', 'Authentication', 'Logout', 'Successful'),
(0000000990, '', '2014-02-03 15:39:17', 'Authentication', 'Login', 'Successful'),
(0000000991, 'emp_admin', '2014-02-03 15:39:24', 'Authentication', 'Time in Employee', 'Successfull'),
(0000000992, 'emp_admin', '2014-02-03 15:39:36', 'Authentication', 'Time in Employee', 'Successfull'),
(0000000993, 'emp_admin', '2014-02-03 15:39:41', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000994, 'emp_admin', '2014-02-03 15:39:44', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000995, 'emp_admin', '2014-02-03 15:39:46', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000996, 'emp_admin', '2014-02-03 15:39:48', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000997, 'emp_admin', '2014-02-03 15:39:58', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000998, 'emp_admin', '2014-02-03 15:39:59', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000000999, 'emp_admin', '2014-02-03 15:40:04', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001000, 'emp_admin', '2014-02-03 15:40:08', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001001, 'emp_admin', '2014-02-03 15:40:09', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001002, 'emp_admin', '2014-02-03 15:40:11', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001003, 'emp_admin', '2014-02-03 15:40:13', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001004, 'emp_admin', '2014-02-03 15:40:15', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001005, 'emp_admin', '2014-02-03 15:45:18', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001006, 'emp_admin', '2014-02-03 15:45:53', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001007, 'emp_admin', '2014-02-03 15:46:07', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001008, 'emp_admin', '2014-02-03 15:46:12', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001009, 'emp_admin', '2014-02-03 15:46:28', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001010, 'emp_admin', '2014-02-03 15:46:34', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001011, 'emp_admin', '2014-02-03 15:46:36', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001012, 'emp_admin', '2014-02-03 15:46:38', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001013, 'emp_admin', '2014-02-03 15:46:45', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001014, '', '2014-02-03 15:49:55', 'Authentication', 'Logout', 'Successful'),
(0000001015, '', '2014-02-03 15:50:00', 'Authentication', 'Login', 'Successful'),
(0000001016, '3', '2014-02-03 19:36:11', 'Authentication', 'Logout', 'Successful'),
(0000001017, '4', '2014-02-03 19:36:17', 'Authentication', 'Login', 'Successful'),
(0000001018, '4', '2014-02-03 20:14:23', 'Authentication', 'Logout', 'Successful'),
(0000001019, '10', '2014-02-03 20:15:01', 'Authentication', 'Login', 'Successful'),
(0000001020, '10', '2014-02-03 20:15:07', 'Authentication', 'Logout', 'Successful'),
(0000001021, '4', '2014-02-03 20:15:14', 'Authentication', 'Login', 'Successful'),
(0000001022, '4', '2014-02-03 20:15:24', 'Authentication', 'Logout', 'Successful'),
(0000001023, '10', '2014-02-03 20:15:37', 'Authentication', 'Login', 'Successful'),
(0000001024, '10', '2014-02-03 20:15:47', 'Authentication', 'Logout', 'Successful'),
(0000001025, '10', '2014-02-03 20:16:30', 'Authentication', 'Login', 'Successful'),
(0000001026, '10', '2014-02-03 20:17:13', 'Authentication', 'Logout', 'Successful'),
(0000001027, '3', '2014-02-03 20:17:17', 'Authentication', 'Login', 'Successful'),
(0000001028, '3', '2014-02-03 20:18:59', 'Authentication', 'Logout', 'Successful'),
(0000001029, '10', '2014-02-03 20:19:04', 'Authentication', 'Login', 'Successful'),
(0000001030, '10', '2014-02-03 20:26:10', 'Authentication', 'Logout', 'Successful'),
(0000001031, '4', '2014-02-03 20:26:15', 'Authentication', 'Login', 'Successful'),
(0000001032, '4', '2014-02-03 20:44:07', 'Authentication', 'Logout', 'Successful'),
(0000001033, '3', '2014-02-03 20:44:11', 'Authentication', 'Login', 'Successful'),
(0000001034, '3', '2014-02-03 20:44:18', 'Authentication', 'Logout', 'Successful'),
(0000001035, '10', '2014-02-03 20:44:27', 'Authentication', 'Login', 'Successful'),
(0000001036, '10', '2014-02-03 21:21:00', 'Authentication', 'Logout', 'Successful'),
(0000001037, '4', '2014-02-03 21:21:04', 'Authentication', 'Login', 'Successful'),
(0000001038, '4', '2014-02-03 21:22:52', 'Authentication', 'Logout', 'Successful'),
(0000001039, '3', '2014-02-03 21:22:56', 'Authentication', 'Login', 'Successful'),
(0000001040, '3', '2014-02-03 21:23:14', 'Authentication', 'Logout', 'Successful'),
(0000001041, '10', '2014-02-03 21:23:17', 'Authentication', 'Login', 'Successful'),
(0000001042, '10', '2014-02-03 21:24:50', 'Authentication', 'Logout', 'Successful'),
(0000001043, '4', '2014-02-03 21:24:56', 'Authentication', 'Login', 'Successful'),
(0000001044, '4', '2014-02-03 21:25:02', 'Authentication', 'Logout', 'Successful'),
(0000001045, '10', '2014-02-03 21:25:08', 'Authentication', 'Login', 'Successful'),
(0000001046, '10', '2014-02-03 21:25:15', 'Authentication', 'Logout', 'Successful'),
(0000001047, '4', '2014-02-03 21:25:20', 'Authentication', 'Login', 'Successful'),
(0000001048, '4', '2014-02-03 21:27:13', 'Authentication', 'Logout', 'Successful'),
(0000001049, '10', '2014-02-03 21:27:35', 'Authentication', 'Login', 'Successful'),
(0000001050, '10', '2014-02-03 21:27:44', 'Authentication', 'Logout', 'Successful'),
(0000001051, '4', '2014-02-03 21:27:49', 'Authentication', 'Login', 'Successful'),
(0000001052, '4', '2014-02-03 21:28:37', 'Authentication', 'Logout', 'Successful'),
(0000001053, '10', '2014-02-03 21:28:41', 'Authentication', 'Login', 'Successful'),
(0000001054, '10', '2014-02-03 21:28:49', 'Authentication', 'Logout', 'Successful'),
(0000001055, '4', '2014-02-03 21:28:59', 'Authentication', 'Login', 'Successful'),
(0000001056, '4', '2014-02-03 21:29:29', 'Authentication', 'Logout', 'Successful'),
(0000001057, '10', '2014-02-03 21:29:34', 'Authentication', 'Login', 'Successful'),
(0000001058, '10', '2014-02-03 21:29:48', 'Authentication', 'Logout', 'Successful'),
(0000001059, '4', '2014-02-03 21:29:53', 'Authentication', 'Login', 'Successful'),
(0000001060, '4', '2014-02-03 21:30:36', 'Authentication', 'Logout', 'Successful'),
(0000001061, '10', '2014-02-03 21:30:40', 'Authentication', 'Login', 'Successful'),
(0000001062, '10', '2014-02-03 21:31:02', 'Authentication', 'Logout', 'Successful'),
(0000001063, '4', '2014-02-03 21:31:09', 'Authentication', 'Login', 'Successful'),
(0000001064, '4', '2014-02-03 21:32:00', 'Authentication', 'Logout', 'Successful'),
(0000001065, '10', '2014-02-03 21:32:05', 'Authentication', 'Login', 'Successful'),
(0000001066, '10', '2014-02-03 21:32:14', 'Authentication', 'Logout', 'Successful'),
(0000001067, '4', '2014-02-03 21:32:20', 'Authentication', 'Login', 'Successful'),
(0000001068, '4', '2014-02-03 21:32:35', 'Authentication', 'Logout', 'Successful'),
(0000001069, '10', '2014-02-03 21:32:40', 'Authentication', 'Login', 'Successful'),
(0000001070, '10', '2014-02-03 21:39:05', 'Authentication', 'Logout', 'Successful'),
(0000001071, '4', '2014-02-03 21:39:09', 'Authentication', 'Login', 'Successful'),
(0000001072, '4', '2014-02-03 21:39:16', 'Authentication', 'Logout', 'Successful'),
(0000001073, '10', '2014-02-03 21:39:29', 'Authentication', 'Login', 'Successful'),
(0000001074, '10', '2014-02-03 21:39:35', 'Authentication', 'Logout', 'Successful'),
(0000001075, '4', '2014-02-03 21:39:41', 'Authentication', 'Login', 'Successful'),
(0000001076, '4', '2014-02-03 21:39:48', 'Authentication', 'Logout', 'Successful'),
(0000001077, '10', '2014-02-03 21:40:09', 'Authentication', 'Login', 'Successful'),
(0000001078, '10', '2014-02-03 21:40:36', 'Authentication', 'Logout', 'Successful'),
(0000001079, '4', '2014-02-03 21:40:41', 'Authentication', 'Login', 'Successful'),
(0000001080, '8', '2014-02-03 21:56:16', 'Authentication', 'Login', 'Successful'),
(0000001081, '8', '2014-02-03 21:56:29', 'Authentication', 'Logout', 'Successful'),
(0000001082, '4', '2014-02-03 21:56:58', 'Authentication', 'Login', 'Successful'),
(0000001083, '4', '2014-02-03 22:26:23', 'Authentication', 'Logout', 'Successful'),
(0000001084, '1', '2014-02-03 22:26:42', 'Authentication', 'Login', 'Successful'),
(0000001085, '1', '2014-02-03 22:31:22', 'Authentication', 'Logout', 'Successful'),
(0000001086, '4', '2014-02-03 22:31:31', 'Authentication', 'Login', 'Successful'),
(0000001087, '4', '2014-02-03 22:31:40', 'Authentication', 'Logout', 'Successful'),
(0000001088, '4', '2014-02-03 22:33:06', 'Authentication', 'Login', 'Successful'),
(0000001089, '4', '2014-02-03 22:35:55', 'Authentication', 'Logout', 'Successful'),
(0000001090, '1', '2014-02-03 22:36:03', 'Authentication', 'Login', 'Successful'),
(0000001091, '1', '2014-02-03 22:36:17', 'Authentication', 'Logout', 'Successful'),
(0000001092, '4', '2014-02-03 22:36:35', 'Authentication', 'Login', 'Successful'),
(0000001093, '4', '2014-02-03 22:39:02', 'Authentication', 'Logout', 'Successful'),
(0000001094, '1', '2014-02-03 22:39:06', 'Authentication', 'Login', 'Successful'),
(0000001095, '1', '2014-02-03 22:41:38', 'Authentication', 'Logout', 'Successful'),
(0000001096, '4', '2014-02-03 22:41:48', 'Authentication', 'Login', 'Successful'),
(0000001097, '4', '2014-02-03 22:42:35', 'Authentication', 'Logout', 'Successful'),
(0000001098, '4', '2014-02-03 22:42:55', 'Authentication', 'Login', 'Successful'),
(0000001099, '4', '2014-02-03 22:43:12', 'Authentication', 'Logout', 'Successful'),
(0000001100, '8', '2014-02-03 22:43:16', 'Authentication', 'Login', 'Successful'),
(0000001101, '8', '2014-02-03 22:43:20', 'Authentication', 'Added New Batch Order', 'Successful'),
(0000001102, '', '2014-02-03 22:43:50', 'Authentication', 'Delete Product from Batch Orde', 'Successful'),
(0000001103, '8', '2014-02-03 22:43:56', 'Authentication', 'Logout', 'Successful'),
(0000001104, '4', '2014-02-03 22:44:02', 'Authentication', 'Login', 'Successful'),
(0000001105, '4', '2014-02-03 22:44:05', 'Authentication', 'Logout', 'Successful'),
(0000001106, '1', '2014-02-03 22:44:17', 'Authentication', 'Login', 'Successful'),
(0000001107, '1', '2014-02-03 22:45:27', 'Authentication', 'Logout', 'Successful'),
(0000001108, '4', '2014-02-03 22:47:33', 'Authentication', 'Login', 'Successful'),
(0000001109, '4', '2014-02-03 22:54:40', 'Authentication', 'Add Payable', 'Successful'),
(0000001110, '4', '2014-02-03 23:25:28', 'Authentication', 'Update customer profile', 'Successful'),
(0000001111, '4', '2014-02-03 23:26:24', 'Authentication', 'Update customer profile', 'Successful'),
(0000001112, '4', '2014-02-03 23:27:20', 'Authentication', 'Update customer profile', 'Successful'),
(0000001113, '4', '2014-02-03 23:32:27', 'Authentication', 'Register New Customer', 'Successful'),
(0000001114, '4', '2014-02-03 23:32:35', 'Authentication', 'Update customer profile', 'Successful'),
(0000001115, '4', '2014-02-03 23:32:39', 'Authentication', 'Delete Customer', 'Successful'),
(0000001116, '4', '2014-02-03 23:34:55', 'Authentication', 'Logout', 'Successful'),
(0000001117, '8', '2014-02-03 23:35:28', 'Authentication', 'Login', 'Successful'),
(0000001118, '8', '2014-02-03 23:35:41', 'Authentication', 'Added New Batch Order', 'Successful'),
(0000001119, '8', '2014-02-03 23:35:52', 'Authentication', 'Logout', 'Successful'),
(0000001120, '4', '2014-02-03 23:35:58', 'Authentication', 'Login', 'Successful'),
(0000001121, '4', '2014-02-03 23:36:15', 'Authentication', 'Logout', 'Successful'),
(0000001122, '8', '2014-02-03 23:36:23', 'Authentication', 'Login', 'Successful'),
(0000001123, '8', '2014-02-03 23:36:33', 'Authentication', 'Added New Batch Order', 'Successful'),
(0000001124, '8', '2014-02-03 23:36:42', 'Authentication', 'Logout', 'Successful'),
(0000001125, '4', '2014-02-03 23:36:55', 'Authentication', 'Login', 'Successful'),
(0000001126, '4', '2014-02-03 23:37:21', 'Authentication', 'Logout', 'Successful'),
(0000001127, '8', '2014-02-03 23:37:32', 'Authentication', 'Login', 'Successful'),
(0000001128, '2', '2014-02-04 10:33:22', 'Authentication', 'Login', 'Successful'),
(0000001129, '2', '2014-02-04 10:33:36', 'Authentication', 'Logout', 'Successful'),
(0000001130, '4', '2014-02-04 10:39:54', 'Authentication', 'Login', 'Successful'),
(0000001131, '4', '2014-02-04 11:02:58', 'Authentication', 'Logout', 'Successful'),
(0000001132, '11', '2014-02-04 11:08:09', 'Authentication', 'Login', 'Successful'),
(0000001133, '11', '2014-02-04 11:08:24', 'Authentication', 'Add Payable', 'Successful'),
(0000001134, '11', '2014-02-04 11:14:17', 'Authentication', 'Add Payable', 'Successful'),
(0000001135, '11', '2014-02-04 11:16:39', 'Authentication', 'Add Payable', 'Successful'),
(0000001136, '11', '2014-02-04 11:16:43', 'Authentication', 'Add Payable', 'Successful'),
(0000001137, '11', '2014-02-04 11:24:31', 'Authentication', 'Logout', 'Successful'),
(0000001138, '4', '2014-02-04 11:24:59', 'Authentication', 'Login', 'Successful'),
(0000001139, '4', '2014-02-04 11:27:05', 'Authentication', 'Delete Customer', 'Successful'),
(0000001140, '4', '2014-02-04 11:27:28', 'Authentication', 'Delete Customer', 'Successful'),
(0000001141, '4', '2014-02-04 11:28:01', 'Authentication', 'Delete Customer', 'Successful'),
(0000001142, '4', '2014-02-04 11:30:49', 'Authentication', 'Delete Customer', 'Successful'),
(0000001143, '4', '2014-02-04 11:32:15', 'Authentication', 'Delete Customer', 'Successful'),
(0000001144, '4', '2014-02-04 11:35:42', 'Authentication', 'Delete Customer', 'Successful'),
(0000001145, '4', '2014-02-04 11:35:59', 'Authentication', 'Delete Customer', 'Successful'),
(0000001146, '4', '2014-02-04 11:40:25', 'Authentication', 'Delete Customer', 'Successful'),
(0000001147, '4', '2014-02-04 12:01:04', 'Authentication', 'Logout', 'Successful'),
(0000001148, '8', '2014-02-04 12:01:22', 'Authentication', 'Login', 'Successful'),
(0000001149, '8', '2014-02-04 12:01:34', 'Authentication', 'Added New Batch Order', 'Successful'),
(0000001150, '8', '2014-02-04 12:01:51', 'Authentication', 'Add to existing order', 'Successful'),
(0000001151, '8', '2014-02-04 12:01:58', 'Authentication', 'Logout', 'Successful'),
(0000001152, '4', '2014-02-04 12:02:11', 'Authentication', 'Login', 'Successful'),
(0000001153, '4', '2014-02-04 12:04:16', 'Authentication', 'Delete Customer', 'Successful'),
(0000001154, '4', '2014-02-04 12:05:52', 'Authentication', 'Delete Customer', 'Successful'),
(0000001155, '4', '2014-02-04 12:09:06', 'Authentication', 'Logout', 'Successful'),
(0000001156, '8', '2014-02-04 12:09:12', 'Authentication', 'Login', 'Successful'),
(0000001157, '8', '2014-02-04 12:09:16', 'Authentication', 'Added New Batch Order', 'Successful'),
(0000001158, '8', '2014-02-04 12:09:28', 'Authentication', 'Logout', 'Successful'),
(0000001159, '4', '2014-02-04 12:09:33', 'Authentication', 'Login', 'Successful'),
(0000001160, '4', '2014-02-04 12:09:41', 'Authentication', 'Logout', 'Successful'),
(0000001161, '8', '2014-02-04 12:09:49', 'Authentication', 'Login', 'Successful'),
(0000001162, '8', '2014-02-04 12:09:59', 'Authentication', 'Logout', 'Successful'),
(0000001163, '4', '2014-02-04 12:10:04', 'Authentication', 'Login', 'Successful'),
(0000001164, '4', '2014-02-04 12:16:15', 'Authentication', 'Logout', 'Successful'),
(0000001165, '8', '2014-02-04 12:16:19', 'Authentication', 'Login', 'Successful'),
(0000001166, '8', '2014-02-04 12:16:32', 'Authentication', 'Logout', 'Successful'),
(0000001167, '4', '2014-02-04 12:16:36', 'Authentication', 'Login', 'Successful'),
(0000001168, '4', '2014-02-04 13:02:00', 'Authentication', 'Logout', 'Successful'),
(0000001169, '4', '2014-02-04 13:02:06', 'Authentication', 'Login', 'Successful'),
(0000001170, '4', '2014-02-04 13:02:09', 'Authentication', 'Logout', 'Successful'),
(0000001171, '11', '2014-02-04 13:02:56', 'Authentication', 'Login', 'Successful'),
(0000001172, '11', '2014-02-04 13:05:15', 'Authentication', 'Logout', 'Successful'),
(0000001173, '8', '2014-02-04 13:05:20', 'Authentication', 'Login', 'Successful'),
(0000001174, '8', '2014-02-04 13:06:56', 'Authentication', 'Logout', 'Successful'),
(0000001175, '4', '2014-02-04 13:07:06', 'Authentication', 'Login', 'Successful'),
(0000001176, '4', '2014-02-04 13:07:55', 'Authentication', 'Logout', 'Successful'),
(0000001177, '8', '2014-02-04 13:08:00', 'Authentication', 'Login', 'Successful'),
(0000001178, '8', '2014-02-04 13:12:08', 'Authentication', 'Logout', 'Successful'),
(0000001179, '8', '2014-02-04 13:12:11', 'Authentication', 'Login', 'Successful'),
(0000001180, '8', '2014-02-04 13:15:57', 'Authentication', 'Logout', 'Successful'),
(0000001181, '4', '2014-02-04 13:16:04', 'Authentication', 'Login', 'Successful'),
(0000001182, '4', '2014-02-04 13:20:54', 'Authentication', 'Logout', 'Successful'),
(0000001183, '8', '2014-02-04 13:21:04', 'Authentication', 'Login', 'Successful'),
(0000001184, '8', '2014-02-04 13:24:49', 'Authentication', 'Logout', 'Successful'),
(0000001185, '8', '2014-02-04 13:24:49', 'Authentication', 'Logout', 'Successful'),
(0000001186, '8', '2014-02-04 13:24:55', 'Authentication', 'Login', 'Successful'),
(0000001187, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001188, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001189, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001190, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001191, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001192, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001193, '8', '2014-02-04 13:25:55', 'Authentication', 'Logout', 'Successful'),
(0000001194, '4', '2014-02-04 13:26:01', 'Authentication', 'Login', 'Successful'),
(0000001195, '4', '2014-02-04 13:26:20', 'Authentication', 'Logout', 'Successful'),
(0000001196, '8', '2014-02-04 13:26:23', 'Authentication', 'Login', 'Successful'),
(0000001197, '8', '2014-02-04 13:33:41', 'Authentication', 'Logout', 'Successful'),
(0000001198, '8', '2014-02-04 13:33:45', 'Authentication', 'Login', 'Successful'),
(0000001199, '8', '2014-02-04 13:34:05', 'Authentication', 'Logout', 'Successful'),
(0000001200, '8', '2014-02-04 13:34:10', 'Authentication', 'Login', 'Successful'),
(0000001201, '8', '2014-02-04 13:37:58', 'Authentication', 'Login', 'Successful'),
(0000001202, '8', '2014-02-04 13:44:02', 'Authentication', 'Logout', 'Successful'),
(0000001203, '8', '2014-02-04 13:44:02', 'Authentication', 'Logout', 'Successful'),
(0000001204, '8', '2014-02-04 13:44:02', 'Authentication', 'Logout', 'Successful'),
(0000001205, '8', '2014-02-04 13:44:02', 'Authentication', 'Logout', 'Successful'),
(0000001206, '8', '2014-02-04 13:44:02', 'Authentication', 'Logout', 'Successful'),
(0000001207, '8', '2014-02-04 13:44:03', 'Authentication', 'Logout', 'Successful'),
(0000001208, '8', '2014-02-04 16:37:21', 'Authentication', 'Login', 'Successful'),
(0000001209, '8', '2014-02-04 16:56:33', 'Authentication', 'Logout', 'Successful'),
(0000001210, '4', '2014-02-04 16:56:39', 'Authentication', 'Login', 'Successful'),
(0000001211, '4', '2014-02-04 17:00:32', 'Authentication', 'Delete Customer', 'Successful'),
(0000001212, '4', '2014-02-04 17:01:31', 'Authentication', 'Logout', 'Successful'),
(0000001213, '8', '2014-02-04 17:01:38', 'Authentication', 'Login', 'Successful'),
(0000001214, '4', '2014-02-05 00:30:28', 'Authentication', 'Login', 'Successful'),
(0000001215, '4', '2014-02-05 00:34:30', 'Authentication', 'Delete Customer', 'Successful'),
(0000001216, '4', '2014-02-05 00:50:00', 'Authentication', 'Update Product', 'Successful'),
(0000001217, '4', '2014-02-05 00:52:18', 'Authentication', 'Update Product', 'Successful'),
(0000001218, '4', '2014-02-05 00:52:21', 'Authentication', 'Logout', 'Successful'),
(0000001219, '1', '2014-02-05 00:52:29', 'Authentication', 'Login', 'Successful'),
(0000001220, '4', '2014-02-05 02:49:24', 'Authentication', 'Login', 'Successful'),
(0000001221, '4', '2014-02-05 02:53:08', 'Authentication', 'Update Product', 'Successful'),
(0000001222, '4', '2014-02-05 02:53:18', 'Authentication', 'Update Product', 'Successful'),
(0000001223, '4', '2014-02-05 02:54:35', 'Authentication', 'Update Product', 'Successful'),
(0000001224, '4', '2014-02-05 02:55:54', 'Authentication', 'Update Product', 'Successful'),
(0000001225, '4', '2014-02-05 02:56:30', 'Authentication', 'Update Product', 'Successful'),
(0000001226, '4', '2014-02-05 02:57:19', 'Authentication', 'Update Product', 'Successful'),
(0000001227, '4', '2014-02-05 03:10:29', 'Authentication', 'Update Product', 'Successful'),
(0000001228, '8', '2014-02-05 03:14:59', 'Authentication', 'Login', 'Successful'),
(0000001229, '8', '2014-02-05 03:15:07', 'Authentication', 'Logout', 'Successful'),
(0000001230, '4', '2014-02-05 03:15:12', 'Authentication', 'Login', 'Successful'),
(0000001231, '8', '2014-02-10 13:59:13', 'Authentication', 'Login', 'Successful'),
(0000001232, '8', '2014-02-11 06:22:52', 'Authentication', 'Login', 'Successful'),
(0000001233, '2', '2014-02-20 14:41:39', 'Authentication', 'Login', 'Successful'),
(0000001234, '2', '2014-02-20 15:29:37', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001235, '2', '2014-02-20 15:54:17', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001236, '2', '2014-02-20 15:59:16', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001237, '2', '2014-02-20 15:59:51', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001238, '2', '2014-02-20 16:16:05', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001239, '2', '2014-02-20 16:19:50', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001240, '2', '2014-02-20 16:21:12', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001241, '2', '2014-02-20 16:27:55', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001242, '2', '2014-02-20 16:41:08', 'Authentication', 'Logout', 'Successful'),
(0000001243, '6', '2014-02-20 16:41:17', 'Authentication', 'Login', 'Successful'),
(0000001244, 'emp_admin', '2014-02-20 16:55:57', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001245, '6', '2014-02-20 16:56:52', 'Authentication', 'Logout', 'Successful'),
(0000001246, '6', '2014-02-20 16:56:58', 'Authentication', 'Login', 'Successful'),
(0000001247, 'emp_admin', '2014-02-20 17:19:06', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001248, 'emp_admin', '2014-02-20 17:47:37', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001249, '6', '2014-02-20 17:55:34', 'Authentication', 'Logout', 'Successful'),
(0000001250, '2', '2014-02-20 17:55:39', 'Authentication', 'Login', 'Successful'),
(0000001251, '2', '2014-02-20 17:55:49', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001252, '2', '2014-02-20 17:58:05', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001253, '2', '2014-02-20 17:59:45', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001254, '2', '2014-02-20 18:01:37', 'Authentication', 'Logout', 'Successful'),
(0000001255, '6', '2014-02-20 18:01:42', 'Authentication', 'Login', 'Successful'),
(0000001256, '6', '2014-02-20 18:16:22', 'Authentication', 'Logout', 'Successful'),
(0000001257, '2', '2014-02-20 18:16:28', 'Authentication', 'Login', 'Successful'),
(0000001258, '2', '2014-02-20 18:16:47', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001259, '2', '2014-02-20 18:17:10', 'Authentication', 'Logout', 'Successful'),
(0000001260, '6', '2014-02-20 18:17:26', 'Authentication', 'Login', 'Successful'),
(0000001261, '2', '2014-02-20 18:21:03', 'Authentication', 'Login', 'Successful'),
(0000001262, '2', '2014-02-20 18:21:16', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001263, '2', '2014-02-20 18:50:42', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001264, '2', '2014-02-20 18:59:48', 'Authentication', 'Logout', 'Successful'),
(0000001265, '2', '2014-02-20 18:59:53', 'Authentication', 'Login', 'Successful'),
(0000001266, '2', '2014-02-20 19:00:03', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001267, '6', '2014-02-20 19:02:02', 'Authentication', 'Logout', 'Successful'),
(0000001268, '2', '2014-02-20 19:02:07', 'Authentication', 'Login', 'Successful'),
(0000001269, '2', '2014-02-20 19:02:15', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001270, '2', '2014-02-20 19:02:29', 'Authentication', 'Logout', 'Successful'),
(0000001271, '6', '2014-02-20 19:02:48', 'Authentication', 'Login', 'Successful'),
(0000001272, '6', '2014-02-20 19:03:56', 'Authentication', 'Logout', 'Successful'),
(0000001273, '2', '2014-02-20 19:04:01', 'Authentication', 'Login', 'Successful'),
(0000001274, '2', '2014-02-20 19:04:09', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001275, '2', '2014-02-20 19:04:10', 'Authentication', 'Logout', 'Successful'),
(0000001276, '6', '2014-02-20 19:04:14', 'Authentication', 'Login', 'Successful'),
(0000001277, '2', '2014-02-20 19:07:55', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001278, '2', '2014-02-20 19:07:57', 'Authentication', 'Logout', 'Successful'),
(0000001279, '6', '2014-02-20 19:08:02', 'Authentication', 'Login', 'Successful'),
(0000001280, '6', '2014-02-20 19:14:30', 'Authentication', 'Logout', 'Successful'),
(0000001281, '2', '2014-02-20 19:14:34', 'Authentication', 'Login', 'Successful'),
(0000001282, '2', '2014-02-20 19:15:02', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001283, '2', '2014-02-20 19:40:04', 'Authentication', 'Logout', 'Successful'),
(0000001284, '6', '2014-02-20 19:40:10', 'Authentication', 'Login', 'Successful'),
(0000001285, 'emp_admin', '2014-02-20 19:40:37', 'Authentication', 'Time in Employee', 'Successfull'),
(0000001286, 'emp_admin', '2014-02-20 19:40:40', 'Authentication', 'Timed out Employee', 'Successfull'),
(0000001287, 'emp_admin', '2014-02-20 19:42:36', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001288, '6', '2014-02-20 19:43:27', 'Authentication', 'Logout', 'Successful'),
(0000001289, '2', '2014-02-20 19:43:41', 'Authentication', 'Login', 'Successful'),
(0000001290, '2', '2014-02-20 19:55:17', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001291, '2', '2014-02-20 19:56:19', 'Authentication', 'Logout', 'Successful'),
(0000001292, '6', '2014-02-20 19:56:35', 'Authentication', 'Login', 'Successful'),
(0000001293, '6', '2014-02-20 19:57:58', 'Authentication', 'Logout', 'Successful'),
(0000001294, '2', '2014-02-20 19:58:03', 'Authentication', 'Login', 'Successful'),
(0000001295, '2', '2014-02-20 19:58:15', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001296, '2', '2014-02-20 19:58:18', 'Authentication', 'Logout', 'Successful'),
(0000001297, '6', '2014-02-20 19:58:26', 'Authentication', 'Login', 'Successful'),
(0000001298, '6', '2014-02-20 19:59:52', 'Authentication', 'Logout', 'Successful'),
(0000001299, '2', '2014-02-20 20:00:01', 'Authentication', 'Login', 'Successful'),
(0000001300, '2', '2014-02-20 20:00:11', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001301, '2', '2014-02-20 20:00:12', 'Authentication', 'Logout', 'Successful'),
(0000001302, '6', '2014-02-20 20:00:16', 'Authentication', 'Login', 'Successful'),
(0000001303, '6', '2014-02-20 20:02:46', 'Authentication', 'Logout', 'Successful'),
(0000001304, '2', '2014-02-20 20:02:52', 'Authentication', 'Login', 'Successful'),
(0000001305, '2', '2014-02-20 20:03:02', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001306, '2', '2014-02-20 20:03:04', 'Authentication', 'Logout', 'Successful'),
(0000001307, '6', '2014-02-20 20:03:09', 'Authentication', 'Login', 'Successful'),
(0000001308, '6', '2014-02-20 20:04:51', 'Authentication', 'Logout', 'Successful'),
(0000001309, '2', '2014-02-20 20:04:56', 'Authentication', 'Login', 'Successful'),
(0000001310, '2', '2014-02-20 20:05:15', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001311, '2', '2014-02-20 20:05:17', 'Authentication', 'Logout', 'Successful'),
(0000001312, '6', '2014-02-20 20:05:21', 'Authentication', 'Login', 'Successful'),
(0000001313, '6', '2014-02-20 20:08:32', 'Authentication', 'Logout', 'Successful'),
(0000001314, '2', '2014-02-20 20:08:36', 'Authentication', 'Login', 'Successful'),
(0000001315, '2', '2014-02-20 20:08:51', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001316, '2', '2014-02-20 20:08:54', 'Authentication', 'Logout', 'Successful'),
(0000001317, '6', '2014-02-20 20:09:04', 'Authentication', 'Login', 'Successful'),
(0000001318, '6', '2014-02-20 20:09:40', 'Authentication', 'Logout', 'Successful'),
(0000001319, '2', '2014-02-20 20:09:45', 'Authentication', 'Login', 'Successful'),
(0000001320, '2', '2014-02-20 20:09:59', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001321, '2', '2014-02-20 20:10:01', 'Authentication', 'Logout', 'Successful'),
(0000001322, '6', '2014-02-20 20:10:05', 'Authentication', 'Login', 'Successful'),
(0000001323, '6', '2014-02-20 20:10:36', 'Authentication', 'Logout', 'Successful'),
(0000001324, '2', '2014-02-20 20:11:25', 'Authentication', 'Login', 'Successful'),
(0000001325, '2', '2014-02-20 20:11:40', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001326, '2', '2014-02-20 20:11:46', 'Authentication', 'Logout', 'Successful'),
(0000001327, '6', '2014-02-20 20:11:51', 'Authentication', 'Login', 'Successful'),
(0000001328, 'emp_admin', '2014-02-20 20:17:42', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001329, 'emp_admin', '2014-02-20 20:28:40', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001330, '6', '2014-02-20 20:29:32', 'Authentication', 'Logout', 'Successful'),
(0000001331, '4', '2014-02-20 20:29:50', 'Authentication', 'Login', 'Successful'),
(0000001332, '4', '2014-02-20 20:36:26', 'Authentication', 'Logout', 'Successful'),
(0000001333, '6', '2014-02-20 20:36:31', 'Authentication', 'Login', 'Successful'),
(0000001334, '6', '2014-02-20 20:38:21', 'Authentication', 'Logout', 'Successful'),
(0000001335, '4', '2014-02-20 20:38:33', 'Authentication', 'Login', 'Successful'),
(0000001336, '4', '2014-02-20 20:53:00', 'Authentication', 'Logout', 'Successful'),
(0000001337, '1', '2014-02-20 20:53:18', 'Authentication', 'Login', 'Successful'),
(0000001338, '1', '2014-02-20 21:03:17', 'Authentication', 'Logout', 'Successful'),
(0000001339, '9', '2014-02-20 22:20:50', 'Authentication', 'Login', 'Successful'),
(0000001340, '9', '2014-02-20 22:22:06', 'Authentication', 'Logout', 'Successful'),
(0000001341, '9', '2014-02-20 22:31:27', 'Authentication', 'Login', 'Successful'),
(0000001342, '9', '2014-02-20 22:48:31', 'Authentication', 'Update Profile', 'Successful'),
(0000001343, '9', '2014-02-20 22:48:42', 'Authentication', 'Update Profile', 'Successful'),
(0000001344, '9', '2014-02-20 23:03:27', 'Authentication', 'Update Profile', 'Successful'),
(0000001345, '9', '2014-02-20 23:19:19', 'Authentication', 'Update Profile', 'Successful'),
(0000001346, '9', '2014-02-20 23:19:28', 'Authentication', 'Update Profile', 'Successful'),
(0000001347, '9', '2014-02-20 23:21:30', 'Authentication', 'Logout', 'Successful'),
(0000001348, '6', '2014-02-21 00:26:33', 'Authentication', 'Login', 'Successful'),
(0000001349, '6', '2014-02-21 00:28:51', 'Authentication', 'Logout', 'Successful'),
(0000001350, '6', '2014-02-21 00:32:49', 'Authentication', 'Login', 'Successful'),
(0000001351, 'emp_admin', '2014-02-21 00:49:40', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001352, 'emp_admin', '2014-02-21 00:51:09', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001353, '6', '2014-02-21 00:53:04', 'Authentication', 'Logout', 'Successful'),
(0000001354, '6', '2014-02-21 00:55:52', 'Authentication', 'Login', 'Successful'),
(0000001355, 'emp_admin', '2014-02-21 00:58:01', 'Authentication', 'Add UserAccount&Employee', 'Successfull'),
(0000001356, '6', '2014-02-21 00:58:38', 'Authentication', 'Logout', 'Successful'),
(0000001357, '17', '2014-02-21 00:58:43', 'Authentication', 'Login', 'Successful'),
(0000001358, '17', '2014-02-21 01:07:04', 'Authentication', 'Logout', 'Successful'),
(0000001359, '25', '2014-02-21 01:07:21', 'Authentication', 'Login', 'Successful'),
(0000001360, '25', '2014-02-21 01:10:42', 'Authentication', 'Update Profile', 'Successful'),
(0000001361, '25', '2014-02-21 01:11:08', 'Authentication', 'Update Profile', 'Successful'),
(0000001362, '25', '2014-02-21 01:11:16', 'Authentication', 'Update Profile', 'Successful'),
(0000001363, '6', '2014-02-21 01:20:58', 'Authentication', 'Login', 'Successful'),
(0000001364, '6', '2014-02-21 01:29:18', 'Authentication', 'Logout', 'Successful'),
(0000001365, '1', '2014-02-21 01:29:36', 'Authentication', 'Login', 'Successful'),
(0000001366, '1', '2014-02-21 01:29:41', 'Authentication', 'Logout', 'Successful'),
(0000001367, '6', '2014-02-21 01:29:47', 'Authentication', 'Login', 'Successful'),
(0000001368, '6', '2014-02-21 01:35:41', 'Authentication', 'Logout', 'Successful'),
(0000001369, '2', '2014-02-21 01:35:45', 'Authentication', 'Login', 'Successful'),
(0000001370, '2', '2014-02-21 01:35:50', 'Authentication', 'Logout', 'Successful'),
(0000001371, '6', '2014-02-21 01:36:11', 'Authentication', 'Login', 'Successful'),
(0000001372, '6', '2014-02-21 01:40:54', 'Authentication', 'Logout', 'Successful'),
(0000001373, '6', '2014-02-21 01:40:59', 'Authentication', 'Login', 'Successful'),
(0000001374, '6', '2014-02-21 01:41:25', 'Authentication', 'Logout', 'Successful'),
(0000001375, '17', '2014-02-21 01:41:55', 'Authentication', 'Login', 'Successful'),
(0000001376, '17', '2014-02-21 01:42:09', 'Authentication', 'Update Profile', 'Successful'),
(0000001377, '17', '2014-02-21 01:43:07', 'Authentication', 'Logout', 'Successful'),
(0000001378, '6', '2014-02-21 01:43:17', 'Authentication', 'Login', 'Successful'),
(0000001379, '9', '2014-02-21 01:48:34', 'Authentication', 'Update Profile', 'Successful'),
(0000001380, '6', '2014-02-21 01:48:58', 'Authentication', 'Logout', 'Successful'),
(0000001381, '9', '2014-02-21 01:49:30', 'Authentication', 'Login', 'Successful'),
(0000001382, '9', '2014-02-21 01:49:33', 'Authentication', 'Logout', 'Successful'),
(0000001383, '17', '2014-02-21 01:49:45', 'Authentication', 'Login', 'Successful'),
(0000001384, '17', '2014-02-21 02:14:29', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001385, '17', '2014-02-21 02:16:27', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001386, '17', '2014-02-21 02:18:40', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001387, '17', '2014-02-21 02:19:59', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001388, '17', '2014-02-21 02:20:04', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001389, '17', '2014-02-21 02:20:34', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001390, '17', '2014-02-21 02:21:06', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001391, '17', '2014-02-21 02:21:41', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001392, '17', '2014-02-21 02:44:07', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001393, '17', '2014-02-21 02:46:47', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001394, '17', '2014-02-21 02:46:56', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001395, '17', '2014-02-21 02:48:03', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001396, '17', '2014-02-21 02:48:20', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001397, '17', '2014-02-21 02:48:28', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001398, '17', '2014-02-21 02:48:36', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001399, '17', '2014-02-21 02:48:42', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001400, '17', '2014-02-21 02:48:47', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001401, '17', '2014-02-21 02:50:27', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001402, '17', '2014-02-21 02:50:40', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001403, '17', '2014-02-21 02:50:48', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001404, '17', '2014-02-21 02:51:03', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001405, '17', '2014-02-21 02:52:44', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001406, '17', '2014-02-21 02:54:13', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001407, '17', '2014-02-21 02:54:23', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001408, '17', '2014-02-21 02:55:28', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001409, '17', '2014-02-21 03:17:21', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001410, '17', '2014-02-21 04:04:41', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001411, '17', '2014-02-21 04:06:50', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001412, '17', '2014-02-21 04:08:06', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001413, '17', '2014-02-21 04:09:23', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001414, '17', '2014-02-21 04:10:06', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001415, '17', '2014-02-21 04:10:27', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001416, '17', '2014-02-21 04:11:56', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001417, '17', '2014-02-21 04:14:37', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001418, '17', '2014-02-21 05:11:01', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001419, '17', '2014-02-21 05:13:12', 'Authentication', 'Passed Leave Request', 'Successfull'),
(0000001420, '17', '2014-02-21 05:14:03', 'Authentication', 'Logout', 'Successful'),
(0000001421, '6', '2014-02-21 05:14:07', 'Authentication', 'Login', 'Successful'),
(0000001422, '6', '2014-02-21 06:02:59', 'Authentication', 'Logout', 'Successful');
-- --------------------------------------------------------
--
-- Table structure for table `tb_employee`
--
CREATE TABLE IF NOT EXISTS `tb_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(5) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`middlename` varchar(50) NOT NULL,
`address` varchar(100) NOT NULL,
`email` varchar(50) NOT NULL,
`position` varchar(50) NOT NULL,
`date_hired` date NOT NULL,
`department` varchar(50) NOT NULL,
`elem_school` varchar(50) NOT NULL,
`h_school` varchar(50) NOT NULL,
`c_school` varchar(50) NOT NULL,
`status` varchar(50) NOT NULL,
`contact_no` int(50) NOT NULL,
`casual_no` int(5) NOT NULL,
`emergency_no` int(5) NOT NULL,
`date_renewal` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
--
-- Dumping data for table `tb_employee`
--
INSERT INTO `tb_employee` (`id`, `user_id`, `firstname`, `lastname`, `middlename`, `address`, `email`, `position`, `date_hired`, `department`, `elem_school`, `h_school`, `c_school`, `status`, `contact_no`, `casual_no`, `emergency_no`, `date_renewal`) VALUES
(1, 2, 'employee', 'employee', 'employee', 'employee', 'employee@yahoo.com', 'employee', '2013-05-12', 'employee', 'employee', 'employee', 'employee', 'employee', 12345678, 0, 0, '0000-00-00'),
(2, 2, 'jayven', 'javier', 'santos', 'taytay rizal', 'asa@yahoo.com', 'employee', '2014-02-14', 'accounting', 'jose rizal university', 'jose rizal university', 'jose rizal university', '', 439534534, 0, 0, '0000-00-00'),
(3, 2, 'qweqweqwe', 'qweqwe', 'qweqwe', 'qweqwe', 'qweqweqwe', 'qrqwrqerwe', '0000-00-00', 'werwerwer', 'werwerwer', 'werwerwer', 'werwerwer', '', 345345, 14, 0, '0000-00-00'),
(4, 2, 'jorel', 'jorel', 'jorel', 'jorel', 'jorel', 'jorel', '0000-00-00', 'jorel', 'jorel', 'jorel', 'jorel', '', 123123123, 14, 0, '0000-00-00'),
(5, 2, 'pansit', 'pansit', 'pansit', 'pansit', 'pansit', 'pansit', '0000-00-00', 'pansit', 'pansit', 'pansit', 'pansit', '', 0, 14, 0, '0000-00-00'),
(6, 2, 'jason', 'jason', 'jason', 'jason', 'jason', 'jason', '0000-00-00', 'jason', 'jason', 'jason', 'jason', '', 1231, 14, 0, '0000-00-00'),
(7, 2, 'jesica', 'jesica', 'jesica', 'jesica', 'jesica@yahoo.com', 'jesica', '0000-00-00', 'jesica', 'jesica', 'jesica', 'jesica', '', 1282734234, 14, 0, '0000-00-00'),
(8, 2, 'ikaw', 'ikaw', 'ikaw', 'ikaw', 'ikaw@yahoo.com', 'ikaw', '2014-02-22', 'ikaw', 'ikaw', 'ikaw', 'ikaw', '', 2147483647, 0, 0, '0000-00-00'),
(9, 2, 'jorel', 'cruz', 'san agustin', 'oiasjdasdlkj', 'jorel@yahoo.com', 'kamote', '2013-02-20', 'kamote', 'sf', 'sdfsd', 'asfsaf', '', 2147483647, 14, 5, '0000-00-00'),
(10, 2, 'add', 'add', 'add', 'add', 'marcrigor09@gmail.com', 'add', '2013-02-21', 'add', 'add', 'add', 'add', '', 23123, 14, 2, '0000-00-00'),
(11, 0, 'emplo', 'emplo', 'emplo', 'emplo', 'emplo@yahoo.com', 'emplo', '2013-02-22', 'emplo', 'empl', 'emplo', 'emplo', '', 10823345, 14, 2, '2013-02-22'),
(12, 0, 'jorel', 'kim', 'hiasdk', 'asdasd', 'kim@kim.com', 'asdasd', '2013-02-20', 'asdasd', 'sfsdf', 'sdfsdf', 'sdsdf', '', 932323232, 14, 5, '2014-02-21'),
(13, 0, 'dfgkjdhfgksdhjfklh', 'sjkfdhsdjklfh', 'lskjdhfsljkdfh', 'sdkjfhsjlkdfh', 'poiwer@yahoo.com', 'woieruwer', '2014-02-25', 'qoweiruwiuer', 'eruityeoirty', 'werpuityeoriuty', 'woieruyweot', '', 2147483647, 14, 2, '2014-02-25'),
(14, 0, 'Jayven', 'Javier', 'Santos', '', 'jayven@yahoo.com', 'Quarterback', '2014-02-22', 'grin department', 'SAES', 'JSMJC', 'JRU', '', 12493824, 14, 5, '2014-02-22'),
(15, 0, 'Jayven', 'Javier', 'Santos', '', 'jayven@yahoo.com', 'Quarterback', '2014-02-22', 'grin department', 'SAES', 'JSMJC', 'JRU', '', 12493824, 14, 5, '2014-02-22'),
(16, 0, 'asda', 's', 'asd', 'asdasd', 'majosathleticdepartment@gmail.com', 'asd', '0231-12-31', 'sd', 'asdasd', 'd', 'd', '', 0, 14, 5, '0231-12-31');
-- --------------------------------------------------------
--
-- Table structure for table `tb_emp_leave`
--
CREATE TABLE IF NOT EXISTS `tb_emp_leave` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`emp_id` int(5) NOT NULL,
`casual_no` int(5) NOT NULL,
`emergency_no` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `tb_leave`
--
CREATE TABLE IF NOT EXISTS `tb_leave` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`email` varchar(100) NOT NULL,
`reason` varchar(200) NOT NULL,
`emp_name` varchar(100) NOT NULL,
`start_date` date NOT NULL,
`end_date` date NOT NULL,
`status` varchar(50) NOT NULL,
`Description` varchar(200) NOT NULL,
`contact_no` int(10) NOT NULL,
`file` varchar(99) NOT NULL,
`days_no` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=58 ;
--
-- Dumping data for table `tb_leave`
--
INSERT INTO `tb_leave` (`id`, `email`, `reason`, `emp_name`, `start_date`, `end_date`, `status`, `Description`, `contact_no`, `file`, `days_no`) VALUES
(56, 'poiwer@yahoo.com', 'Sick Leave/Maternity', 'dfgkjdhfgksdhjfklh sjkfdhsdjklfh', '2014-02-21', '2014-02-22', 'PENDING', 'asdadad', 0, 'jorel cruz resume.doc', 1),
(57, 'poiwer@yahoo.com', 'Sick Leave/Maternity', 'dfgkjdhfgksdhjfklh sjkfdhsdjklfh', '2014-02-21', '2014-02-28', 'PENDING', 'asdasd', 0, 'jorel cruz resume.doc', 7);
-- --------------------------------------------------------
--
-- Table structure for table `tb_order`
--
CREATE TABLE IF NOT EXISTS `tb_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL,
`customer_id` int(11) NOT NULL,
`product_price` int(11) NOT NULL,
`product_quantity` int(11) NOT NULL,
`total_price` int(11) NOT NULL,
`order_date` datetime NOT NULL,
`batchorder_id` int(11) DEFAULT NULL,
`active` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
--
-- Dumping data for table `tb_order`
--
INSERT INTO `tb_order` (`id`, `product_id`, `customer_id`, `product_price`, `product_quantity`, `total_price`, `order_date`, `batchorder_id`, `active`) VALUES
(6, 203, 10, 100, 1, 100, '2014-02-04 04:17:05', 984931, 3),
(15, 210, 8, 1600, 1, 1600, '2014-02-04 20:09:16', 311381, 1);
-- --------------------------------------------------------
--
-- Table structure for table `tb_payables`
--
CREATE TABLE IF NOT EXISTS `tb_payables` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`amount` int(11) NOT NULL,
`description` varchar(1000) NOT NULL,
`date_added` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `tb_payables`
--
INSERT INTO `tb_payables` (`id`, `amount`, `description`, `date_added`) VALUES
(1, 12312, 'asdasdsad', '2014-02-04 19:16:39'),
(2, 123, 'asdsd', '2014-02-04 19:16:43');
-- --------------------------------------------------------
--
-- Table structure for table `tb_products`
--
CREATE TABLE IF NOT EXISTS `tb_products` (
`product_id` int(5) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` varchar(1000) NOT NULL,
`quantity` int(5) NOT NULL,
`price` int(6) NOT NULL,
`image` varchar(100) NOT NULL,
PRIMARY KEY (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=217 ;
--
-- Dumping data for table `tb_products`
--
INSERT INTO `tb_products` (`product_id`, `name`, `description`, `quantity`, `price`, `image`) VALUES
(211, '2323', '2323', 3, 232323, 'sea town hornet.jpg'),
(212, '2323', '2323', 2, 232323, 'jru.png'),
(213, '2323', '2323', 2, 232323, 'sea town classic.jpg'),
(214, '2323', '2323', 2, 232323, 'sea town hornet.jpg'),
(215, '2323', '2323', 2, 232323, 'sea town vivid pink.jpg'),
(216, '2323', '2323', 2, 232323, 'sea town lucho libre.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `tb_user`
--
CREATE TABLE IF NOT EXISTS `tb_user` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`level` int(5) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`first_name` varchar(50) NOT NULL,
`middle_name` varchar(20) DEFAULT NULL,
`last_name` varchar(50) NOT NULL,
`contact_no` int(15) NOT NULL,
`address` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`gender` varchar(10) NOT NULL,
`civil_status` varchar(20) NOT NULL,
`religion` varchar(20) DEFAULT NULL,
`citizenship` varchar(30) NOT NULL,
`emergency_name` varchar(30) NOT NULL,
`emergency_no` varchar(30) NOT NULL,
`emergency_address` varchar(100) NOT NULL,
`relationship` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ;
--
-- Dumping data for table `tb_user`
--
INSERT INTO `tb_user` (`id`, `level`, `username`, `password`, `first_name`, `middle_name`, `last_name`, `contact_no`, `address`, `email`, `gender`, `civil_status`, `religion`, `citizenship`, `emergency_name`, `emergency_no`, `emergency_address`, `relationship`) VALUES
(1, 1, 'superadmin', 'superadmin', 'superadmin', NULL, 'superadmin', 12345678, '', 'superadmin@yahoo.com', '', '', '', '', '', '', '', ''),
(2, 2, 'employee', 'employee', 'employee', NULL, 'employee', 123234234, '', 'employee@yahoo.com', '', '', '', '', '', '', '', ''),
(4, 4, 'os_admin', 'os_admin', 'os_admin', NULL, 'os_admin', 123456789, '', 'os_admin@yahoo.com', '', '', '', '', '', '', '', ''),
(5, 5, 'as_admin', 'as_admin', 'as_admin', NULL, 'as_admin', 123456789, '', 'as_admin@yahoo.com', '', '', '', '', '', '', '', ''),
(6, 6, 'emp_admin', 'emp_admin', 'emp_admin', NULL, 'emp_admin', 123456789, '', 'hk@yahoo.com', '', '', '', '', '', '', '', ''),
(7, 2, 'jayven', 'jayven', 'jayven', NULL, 'jayven', 123123123, '', 'jasdasd@yahoo.com', '', '', '', '', '', '', '', ''),
(8, 3, 'marcpogi', 'marcpogi', 'marc', NULL, 'rigor2', 2147483647, '', 'marcrigor08@yahoo.com', '', '', '', '', '', '', '', ''),
(9, 3, 'jorel', 'cruz', 'jorel', NULL, 'cruz2', 2147483647, 'adasd', 'jore@yahoo.com', 'male', 'Widowed', 'ss', 'adasd', 'asdasd', 'ss', 'asd', 'as'),
(10, 3, 'kamote', '1234', 'asdad', NULL, 'asdad', 2147483647, '', 'asdasdads@yahoo.com', '', '', '', '', '', '', '', ''),
(11, 7, 'accounting', 'accounting', 'accounting', NULL, 'accounting', 123456, '', 'accounting@yahoo.com', '', '', '', '', '', '', '', ''),
(12, 2, 'ikaw', 'ikaw', 'ikaw', NULL, 'ikaw', 2147483647, '', 'ikaw@yahoo.com', '', '', '', '', '', '', '', ''),
(13, 2, 'jorelkimcruz', '123456', 'jorel', NULL, 'cruz', 2147483647, '', 'jorel@yahoo.com', '', '', '', '', '', '', '', ''),
(14, 2, 'add', 'add', 'add', NULL, 'add', 23123, '', 'marcrigor09@gmail.com', '', '', '', '', '', '', '', ''),
(15, 2, 'emplo', 'emplo', 'emplo', NULL, 'emplo', 10823345, '', 'emplo@yahoo.com', '', '', '', '', '', '', '', ''),
(16, 2, 'kim', 'kim', 'jorel', NULL, 'kim', 932323232, '', 'kim@kim.com', '', '', '', '', '', '', '', ''),
(17, 2, 'polpol', 'polpol', 'dfgkjdhfgksdhjfklh', NULL, 'sjkfdhsdjklfh', 2147483647, 'assdasd', 'poiwer@yahoo.com', 'female', '', 'assd', 'asdasd', 'asdasd', 'asd', 'asd', 'asd'),
(18, 3, 'marc', 'pogi', '', '', 'rigor', 13123, 'asdasd', 'asd@yahoo.com', 'male', 'Single', 'asd', 'asdas', 'asd', '', 'asd', 'ad'),
(19, 3, 'marc29', 'qwert', '', '', 'rigor', 12345, 'asdasd', 'marcrigor08@yahoo.com', 'male', 'Single', 'asdasd', 'asdasd', 'asd', '123', 'asd', 'ads'),
(20, 3, 'qwe', 'qwe', 'adasd', '', 'qwe', 0, 'd', 'marcrigor08@yahoo.com', 'male', 'Single', 'd', 'ada', 'asd', '23', 'sad', 'ds'),
(21, 3, 'ss', 'sss', 'asd', '', 'asd', 12, 'asdasd', 'majosathleticdepartment@gmail.com', 'female', 'Single', 'asd', '12312', 'asd', '123', 'ads', '123s'),
(22, 3, 'qwee', 'qweeee', 'fghfgh', '', 'hfghfgh', 23, 'asdasd', 'asd@yahoo.com', 'female', 'Widowed', 'adsad', 'asdas', 'asdasd', '2', 'asd', 'sad'),
(23, 3, 'asd', 'asd', 'asdasdasdas', '', 'asdasd', 0, 'asdasd', 'asd@yahoo.com', 'female', 'Married', 'asd', 'asd', 'asdasdasd', 'asd', '213', 'asd'),
(24, 3, 's', 'qwee', 'asda', '', 'asd', 0, 'asdasd', 'marcrigor08@yahoo.com', 'female', 'Single', 'asd', 'asds', 'asdasdas', 'ss', 'sad', 'asd'),
(25, 2, 'asdasd', 'asdasd', 'asda', 'asd', 's', 0, 'asdasd', 'majosathleticdepartment@gmail.com', 'female', 'Widowed', 'sda', 'sd', 'd', 'd', 'd', 'da');
/*!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 */;
|
Java
|
UTF-8
| 1,202
| 2.984375
| 3
|
[] |
no_license
|
package ch.fhnw.ds.networking.tcp;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;
public class Mailer {
static Scanner in;
static Writer out;
public static void main(String[] args) throws Exception {
Socket s = new Socket("lmailer.fhnw.ch", 25);
in = new Scanner(s.getInputStream());
out = new PrintWriter(s.getOutputStream(), true /* autoFlush */);
String hostName = InetAddress.getLocalHost().getHostName();
System.out.println(hostName);
receive();
send("HELO " + hostName);
receive();
send("MAIL FROM: <juerg.christener@fhnw.ch>");
receive();
send("RCPT TO: <dominik.gruntz@fhnw.ch>");
receive();
send("DATA");
receive();
send("To: dominik.gruntz@fhnw.ch");
send("Subject: Meeting");
send("Hallo Dominik, komm doch rasch in mein Buero.");
send(".");
receive();
s.close();
}
private static void receive() throws IOException {
if (in.hasNext()) {
String line = in.nextLine();
System.err.println(line);
}
}
public static void send(String s) throws IOException {
System.out.println(s);
out.write(s.replaceAll("\n", "\r\n"));
out.write("\r\n");
out.flush();
}
}
|
PHP
|
UTF-8
| 6,087
| 2.859375
| 3
|
[] |
no_license
|
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace son\fixture;
use son\cliente\ClienteAbstract;
use son\cliente\types\ClientePF;
use son\cliente\types\ClientePJ;
/**
* Description of Fixture
*
* @author alex.bertolla
*/
class Fixture {
private static $connDB;
private $stmt;
public function __construct(\PDO $conn) {
self::$connDB = $conn;
}
public function criarTabelaCliente() {
echo "## INICIO ##<br>";
echo "removendo tabela páginas";
self::$connDB->query('DROP TABLE IF EXISTS cliente;');
$query = 'CREATE TABLE cliente ('
. 'id int(11) NOT NULL AUTO_INCREMENT,'
. 'nome text,endereco text,'
. 'telefone text,'
. 'email text,'
. 'grauImportancia smallint(6)'
. ' DEFAULT NULL,PRIMARY KEY (`id`)'
. ')';
self::$connDB->query($query);
echo "-OK <br>";
}
public function persist(ClienteAbstract $cliente) {
if ($cliente->getId()) {
$this->alterar($cliente);
} else {
return $this->inserir($cliente);
}
return FALSE;
}
private function inserir(ClienteAbstract $cliente) {
echo "## PERSISTINDO CLIENTE ##<br>";
$query = 'INSERT INTO cliente (nome, endereco, telefone, email, grauImportancia) '
. ' VALUES (:nome, :endereco, :telefone, :email, :grauImportancia)';
$this->stmt = self::$connDB->prepare($query);
$this->stmt->bindParam('nome', $cliente->getNome());
$this->stmt->bindParam('endereco', $cliente->getEndereco());
$this->stmt->bindParam('telefone', $cliente->getTelefone());
$this->stmt->bindParam('email', $cliente->getEmail());
$this->stmt->bindParam('grauImportancia', $cliente->getGrauImportancia());
return $this->flush();
}
private function alterar(ClienteAbstract $cliente) {
echo "## PERSISTINDO CLIENTE ##<br>";
echo $query = 'UPDATE cliente SET nome=:nome, endereco=:endereco, telefone=:telefone, '
. ' email=:email, grauImportancia=:grauImportancia '
. ' WHERE id=:id';
$this->stmt = self::$connDB->prepare($query);
$this->stmt->bindParam('id', $cliente->getId());
$this->stmt->bindParam('nome', $cliente->getNome());
$this->stmt->bindParam('endereco', $cliente->getEndereco());
$this->stmt->bindParam('telefone', $cliente->getTelefone());
$this->stmt->bindParam('email', $cliente->getEmail());
$this->stmt->bindParam('grauImportancia', $cliente->getGrauImportancia());
return $this->flush();
}
public function excluirCliente($id) {
$query = 'DELETE FROM cliente WHERE id=:id';
$this->stmt = self::$connDB->prepare($query);
$this->stmt->bindParam('id', $id);
return $this->flush();
}
public function flush() {
echo "## FLUSH CLIENTE ##<br>";
return $this->stmt->execute();
}
public function listarClientes() {
$query = 'SELECT * FROM cliente ORDER BY nome';
$stmt = self::$connDB->prepare($query);
$stmt->execute();
return $stmt->fetchAll(\PDO::FETCH_OBJ);
}
public function listarClientesPorNome($nome) {
$nome = "%{$nome}%";
$query = "SELECT * FROM cliente "
. " WHERE nome LIKE ? "
. " ORDER BY nome";
$stmt = self::$connDB->prepare($query);
// $stmt->bindParam('nome', $nome);
$stmt->execute(array($nome));
return $stmt->fetchAll(\PDO::FETCH_OBJ);
}
public function buscarClientePorId($id) {
$query = 'SELECT * FROM cliente WHERE id=:id';
$stmt = self::$connDB->prepare($query);
$stmt->bindParam('id', $id);
$stmt->execute();
return $stmt->fetch(\PDO::FETCH_OBJ);
}
public function gerarListaClientes() {
echo "## CRIANDO LISTA DE CLIENTES ##<br>";
$listaCliente = [];
$cliente1 = new ClientePF("Alex", '123456', 'Rua x', '123458', 'alex@dominio.com');
$cliente1->setGrauImportancia(5);
$listaCliente[] = $cliente1;
$cliente2 = new ClientePF('Sabrina', '12345678', 'Av 1', '1234656', 'sabrina@dominio.com');
$cliente2->setGrauImportancia(5);
$listaCliente[] = $cliente2;
$cliente3 = new ClientePF('Maria', '8247224132', 'Rua z', '3216546', 'mariax@dominio.com');
$cliente3->setGrauImportancia(3);
$listaCliente[] = $cliente3;
$cliente4 = new ClientePF('Joana', '43248564', 'Rua a', '35346546', 'joanax@dominio.com');
$cliente4->setGrauImportancia(4);
$listaCliente[] = $cliente4;
$cliente5 = new ClientePF('Patricia', '14544354', 'av 2', '3565466', 'patriciax@dominio.com');
$cliente5->setGrauImportancia(2);
$listaCliente[] = $cliente5;
$cliente6 = new ClientePJ('empresa1', '45454124', 'av 10', '6356456', 'fabiox@dominio.com');
$cliente6->setGrauImportancia(5);
$listaCliente[] = $cliente6;
$cliente7 = new ClientePJ('empresa2', '245646', 'rua 15', '324655354', 'caralosx@dominio.com');
$cliente7->setGrauImportancia(4);
$listaCliente[] = $cliente7;
$cliente8 = new ClientePJ('empresa3', '546546', 'av 10', '2453321', 'pedrox@dominio.com');
$cliente8->setGrauImportancia(2);
$listaCliente[] = $cliente8;
$cliente9 = new ClientePJ('empresa4', '46543244', 'rua x', '46532126', 'wesleyx@dominio.com');
$cliente9->setGrauImportancia(3);
$listaCliente[] = $cliente9;
$cliente10 = new ClientePJ('empresa5', '543434', 'rua z', '52456465', 'fulanox@dominio.com');
$cliente10->setGrauImportancia(4);
$listaCliente[] = $cliente10;
$cliente11 = new ClientePF('pedro', '521313465', 'rua 10', '4565444654', 'pedro@dominio.com');
$cliente11->setGrauImportancia(1);
$listaCliente[] = $cliente11;
return $listaCliente;
}
}
|
C++
|
UTF-8
| 1,508
| 4
| 4
|
[] |
no_license
|
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
// <X 的节点 排在 >= x的节点之前
// 题解: 建立两个链表 一个前半段 <x 一个后半段 >=x
// 跟例子顺序无关
public:
ListNode* partition(ListNode* head, int x) {
ListNode* BeforeStart = NULL;
ListNode* BeforeEnd = NULL;
ListNode* AfterStart = NULL;
ListNode* AfterEnd = NULL;
while (head != NULL) {
ListNode* next = head -> next;
head -> next = NULL;
if (head -> val < x) {
if (BeforeStart == NULL) {
BeforeStart = head;
BeforeEnd = BeforeStart;
}
else {
BeforeEnd -> next = head;
BeforeEnd = head;
}
}
else {
if (AfterStart == NULL) {
AfterStart = head;
AfterEnd = AfterStart;
}
else {
AfterEnd -> next = head;
AfterEnd = head;
}
}
head = next;
}
// 如果beforestart为空直接返回带x的后半段
if (BeforeStart == NULL) {
return AfterStart;
}
BeforeEnd -> next = AfterStart;
return BeforeStart;
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.