branch_name
stringclasses 149
values | text
stringlengths 23
89.3M
| directory_id
stringlengths 40
40
| languages
listlengths 1
19
| num_files
int64 1
11.8k
| repo_language
stringclasses 38
values | repo_name
stringlengths 6
114
| revision_id
stringlengths 40
40
| snapshot_id
stringlengths 40
40
|
|---|---|---|---|---|---|---|---|---|
refs/heads/master
|
<repo_name>BlackMetalDev/Galaxy_invaders_game<file_sep>/README.md
Игра Galaxy invaders. Написана на Python с библиотекой Pygame. Запускать Galaxy.py.
<file_sep>/bullet.py
import pygame
from pygame.sprite import Sprite
class Bullet(Sprite):
"""Класс для управления пулями."""
def __init__(self, ai_settings, screen, ship):
"""Создает объект пули в текущей позиции корабля."""
super(Bullet, self).__init__()
self.screen = screen
# Загрузка изображения пули.
self.image = pygame.image.load('images/bullet.png')
# Звук выстрела.
pygame.mixer.music.load('sound/shot.wav')
pygame.mixer.music.play(0)
# Создает прямоугольник пули в (0, 0), затем задает ему корректную позицию
self.rect = self.image.get_rect()
self.rect.centerx = ship.rect.centerx
self.rect.top = ship.rect.top
# Позиция пули.
self.y = float(self.rect.y)
self.color = ai_settings.bullet_color
self.speed_factor = ai_settings.bullet_speed_factor
def update(self):
"""Обновление позиции пули."""
self.y -= self.speed_factor
self.rect.y = self.y
def draw_bullet(self):
"""Отрисовка пули."""
self.screen.blit(self.image, self.rect)
|
a21d3aa14da1f56ed8353fd0d706113d1e6d6004
|
[
"Markdown",
"Python"
] | 2
|
Markdown
|
BlackMetalDev/Galaxy_invaders_game
|
d380341eec0082c0ac9641068a059ed889feb44d
|
9ba71190819831ff857a595e0dbee494403d4772
|
refs/heads/master
|
<repo_name>j-sho/test_project<file_sep>/src/mixins/validation.js
export const isNameInput = {
computed: {
isNameShowError () {
return (this.user_input.name_input_active &&
(!this.user_input.name || !this.user_input.surname))
}
}
}
function isNameValid (name) {
return (/^[A-Za-z]+$/.test(name) && (name.length > 3))
}
function checkEmail (email) {
return /^(([^<>()[\]\\.,:\s@"]+(\.[^<>()[\]\\.,:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email)
}
export const isNameShowValidError = {
computed: {
isNameShowValidError () {
return (this.user_input.name_input_active && !this.isNameShowError &&
(!isNameValid(this.user_input.name) || !isNameValid(this.user_input.surname)))
}
}
}
export const isEntryOptions = {
computed: {
isEntryOptions () {
return this.user_input.entry_options.length > 0
}
}
}
export const isDomainValid = {
computed: {
isDomainValid () {
if (this.user_input.domain_name_active) {
return checkEmail(this.user_input.domain_name)
} else {
return true
}
}
}
}
export const showInstalationDetails = {
computed: {
showInstalationDetails () {
return this.user_input.installation === '2'
}
}
}
export const isErrors = {
computed: {
isErrors () {
return (!isNameValid(this.user_input.name) ||
!isNameValid(this.user_input.name) ||
!this.isEntryOptions || !this.user_input.name ||
!this.user_input.surname || !this.user_input.computer_quantity ||
!this.user_input.mobile_quantity || !this.user_input.instalation_date ||
!this.user_input.instalation_time || !this.isDomainValid)
}
}
}
export const isEmailValid = {
computed: {
isEmailValid () {
return checkEmail(this.user_email)
}
}
}
export const isNumberValid = {
computed: {
isNumberValid () {
return /^((8|\+7)[- ]?)?(\(?\d{3}\)?[- ]?)?[\d\- ]{10}$/.test(this.user_contact_mobile)
}
}
}
export const isContactErrors = {
computed: {
isErrors () {
return (!this.user_email || !this.isEmailValid || !this.isNumberValid)
}
}
}
<file_sep>/src/main.js
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import { store } from './store/store'
Vue.config.productionTip = false
const app = new Vue(Vue.util.extend({
router, store
}, App))
app.$mount('#app')
|
1780e77add5f8188c545f8023bfe5cf958acab7d
|
[
"JavaScript"
] | 2
|
JavaScript
|
j-sho/test_project
|
fa11c1e5e7d3b43ea61b7307ebd2d70f33c12cfa
|
09270c67dddf27f10a60d8bf21e82fea1c2b776a
|
refs/heads/master
|
<repo_name>geekydatamonkey/deptofcreativecaffeination.com<file_sep>/src/components/Bio.jsx
import React, { PropTypes } from 'react';
function Bio({ bio }) {
return (
<div className="bio">
<img src={bio.img} alt={bio.name} />
<div className="bio__titlecard">
<h3 className="bio__name">{bio.name}</h3>
<p className="bio__title">{bio.title}</p>
<p className="bio__status {bio.statusClasses}">
{bio.status}
</p>
<p><a href={bio.url} target="_blank">{bio.url}</a></p>
</div>
</div>
);
}
Bio.propTypes = {
bio: PropTypes.object.isRequired,
};
export default Bio;
<file_sep>/src/components/Input.jsx
import React, { PropTypes } from 'react';
const Input = ({ name, type, placeholder, value, handleChange, isValid }) => {
function getClassNames() {
const classNames = ['input-wrapper'];
if (!value.length) {
classNames.push('is-empty');
} else if (isValid) {
classNames.push('is-valid');
} else if (!isValid) {
classNames.push('is-invalid');
}
return classNames.join(' ');
}
return (
<div className={getClassNames()}>
<input
name={name}
type={type}
placeholder={placeholder}
value={value}
onChange={handleChange}
/>
</div>
);
};
Input.propTypes = {
name: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
value: PropTypes.string.isRequired,
handleChange: PropTypes.func.isRequired,
isValid: PropTypes.bool.isRequired,
placeholder: PropTypes.string,
};
export default Input;
<file_sep>/src/data.js
const siteData = {
name: 'The Department of Creative Caffeination',
description: 'A Web Design and Development Shop',
logo: require('./images/dept-of-cc-logo.png'),
projects: [
{
name: 'RxArtisans',
url: 'http://rxartisans.com',
},
{ name: 'ProgStar', url: 'http://progstar.org' },
{ name: 'MCAD Sustainable Design Blog', url: 'http://mcadsustainabledesign.com' },
{ name: 'Knitting Counter', url: 'http://knittingcounter.com' },
],
bios: [
{
name: '<NAME>',
title: 'Lead Developer',
status: 'lineOfCode.forEach(drinkLatte)',
statusClasses: 'code',
img: require('./images/james-headshot-island.jpg'),
url: 'http://james.mn',
},
{
name: '<NAME>',
title: 'Lead Designer',
status: 'Sipping Serifs and Espresso',
img: require('./images/emily-headshot-2016.jpg'),
url: 'http://emilyward.net',
},
],
contactForm: {
mailTo: '<EMAIL>',
subjectPrefix: '[CONTACT FORM]',
},
socialMedia: {
twitter: 'creativecaff',
email: '<EMAIL>',
},
};
export default siteData;
<file_sep>/README.md
# The Department of Creative Caffeination
Web Design and Development
<file_sep>/src/components/ProjectBlock.jsx
import React, { PropTypes } from 'react';
function ProjectBlock({ project }) {
return (
<li className="project-block">
<a href={project.url}>
{project.name}
</a>
</li>
);
}
ProjectBlock.propTypes = {
project: PropTypes.object.isRequired,
};
export default ProjectBlock;
<file_sep>/src/components/PageSection.jsx
import React, { PropTypes } from 'react';
function renderTitle(title) {
if (!title) return '';
return (
<h2 className="section-heading" >{title}</h2>
);
}
function PageSection({ title, children, className }) {
return (
<section className={`page-section ${className || ''}`} >
<div className="page-section__inner">
{ renderTitle(title) }
{ children }
</div>
</section>
);
}
PageSection.propTypes = {
title: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
};
export default PageSection;
<file_sep>/src/components/BioList.jsx
import React, { PropTypes } from 'react';
import uuid from 'node-uuid';
import Bio from './Bio';
function getId(bio) {
return bio._id || uuid.v4();
}
function BioList({ bios }) {
return (
<div className="bio-list">
{ bios.map(bio => <Bio key={ getId(bio) } bio={bio} />)}
</div>
);
}
BioList.propTypes = {
bios: PropTypes.array.isRequired,
};
export default BioList;
<file_sep>/src/main.js
import React from 'react';
import { render } from 'react-dom';
import WebFont from 'webfontloader';
import App from './App';
// Styles
import 'normalize.css';
import './styles/main.scss';
WebFont.load({
typekit: { id: 'gnf2mov' },
});
render(<App />, document.getElementById('root'));
<file_sep>/src/components/PageHeader.jsx
import React, { PropTypes } from 'react';
function PageHeader({ logoImage, alt }) {
return (
<header className="page-section section-header">
<h1>
<img
src={logoImage}
alt={alt}
/>
</h1>
</header>
);
}
// validation
PageHeader.propTypes = {
logoImage: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
};
export default PageHeader;
<file_sep>/src/pages/ThankYouPage.jsx
import React from 'react';
import Helmet from 'react-helmet';
import { Link } from 'react-router';
import DefaultPage from './DefaultPage.jsx';
import PageSection from '../components/PageSection';
import siteData from '../data';
const email = siteData.socialMedia.email;
const ThankYouPage = () => (
<DefaultPage>
<Helmet title="Thank You" />
<PageSection title="Thank You">
<p>Great!</p>
<p>We sent your message to <a href={`mailto:${email}`}>{email}</a>!</p>
<p>We'll be in touch soon.</p>
<p><Link to="/" className="btn">← Go Back to Homepage</Link></p>
</PageSection>
</DefaultPage>
);
export default ThankYouPage;
<file_sep>/src/components/ProjectGrid.jsx
import React, { PropTypes } from 'react';
import ProjectBlock from './ProjectBlock';
import uuid from 'node-uuid';
function renderProjects(projectList) {
return projectList.map(project => (
<ProjectBlock
key={ project._id || uuid.v4() }
project={project}
/>
));
}
function ProjectGrid({ projects }) {
return (
<ul className="project-grid">
{ renderProjects(projects) }
</ul>
);
}
ProjectGrid.propTypes = {
projects: PropTypes.array.isRequired,
};
export default ProjectGrid;
|
1e80a2cc41a90fbc2a492c125bcab8c6a46a05d0
|
[
"JavaScript",
"Markdown"
] | 11
|
JavaScript
|
geekydatamonkey/deptofcreativecaffeination.com
|
37826e5fa3d3ba4e3ff89b93f3a4f5a9708accde
|
fecb0351f01972bbe43b728064199cb867e866f0
|
refs/heads/master
|
<file_sep>## Borussia Dortmund Quiz
This quiz picks a random 7 questions from a bank of questions about the past and present of the football team in the Bundesliga, Borussia Dortmund.
I started with a free vector image and recreated my favorite jerseys from the team for the logo.
The trivia questions were created with the help of Google, the Borussia Dortmund subreddit, Wikipedia, and the Borussia Dortmund twitter account.
<file_sep>import React, {Component, useState} from 'react';
class Score extends Component{
render(){
return(
<div>
<h1 className='score'>You scored {this.props.text}/{this.props.total}</h1>
</div>
);
}
}
export default Score;<file_sep>const qBank = [
{
question:"Leeds, United Kingdom is the birthplace of what Borussen?",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "Erling Braut Haaland",
questionId: "000001"
},
{
question:'<NAME> was born in',
answers: ["Petra, Spain", "Braga, Portugal", "Torrent, Spain", "Madrid, Spain"],
correct: "Torrent, Spain",
questionId: "000002"
},
{
question:"With 127 goals, this player is 7th on Dortmund's all-time top 10 goalscorers",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "<NAME>",
questionId: "000003"
},
{
question: "<NAME> became the Bundesliga's youngest scorer at what age?",
answers: ["16 years & 238 days","17 years & 82 days","16 years & 334 days","17 years & 37 days"],
correct: "17 years & 82 days",
questionId: "000004"
},
{
question: "What year did the Westfalenstadion open?",
answers: ["1972","1978","1974","1975"],
correct: "1974",
questionId: "000005"
},
{
question: "Ewerthon scored the goal to give <NAME> the lead over Bremen after only being on for _____.",
answers: ["1 minute 4 seconds","49 seconds","1 minute 23 seconds","38 seconds"],
correct: "49 seconds",
questionId: "000006"
},
{
question: "Boruss<NAME>ortmund finished at the top of the table with ____ in the 11/12 season.",
answers: ["81 points","75 points","78 points","80 points"],
correct: "81 points",
questionId: "000007"
},
{
question: "Cruising to a 4-1 victory, beating which team in the final of the 1988-89 DFB-Pokal?",
answers: ["VfB Stuttgart", "FC Bayern", "<NAME>", "Bayer 04"],
correct: "<NAME>",
questionId: "000008"
},
{
question:"After how many years did <NAME> get their first win against Sch*lke?",
answers: ["18", "3", "7", "23"],
correct: "18",
questionId: "000009"
},
{
question:"With 10 goals this player is the top time scorer in the Revierderby?",
answers: ["<NAME>","<NAME>","<NAME>","<NAME>"],
correct: "<NAME>",
questionId: "000010"
},
{
question: "Which player is a noted Dragon Ball fan?",
answers: ["Hakimi", "Zaga", "Sancho", "Dahoud"],
correct: "Zaga",
questionId: "000011"
},
{
question: "This player is red-green colorblind?",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "<NAME>",
questionId: "000012"
},
{
question: "Which player was not apart of the 10/11 champion team",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "<NAME>",
questionId: "000013"
},
{
question: "Which player was not in the 94/95 champion team?",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "<NAME>",
questionId: "000014"
},
{
question: "<NAME> was born in",
answers: ["Wiesendangen, Switzerland", "Saint-Barthelemy, Switzerland", "Münsingen, Switzerland", "St. Gallen, Switzerland"],
correct: "Saint-Barthélemy, Switzerland",
questionId: "000015"
},
{
question: "<NAME> became the first ever manager to remain unbeaten for how many Bundesliga matches",
answers: ["10", "20", "15", "18"],
correct: "15",
questionId: "000016"
},
{
question: "What is the capacity of the Westfalenstadion?",
answers: ["81365", "81455", "81220", "81565"],
correct: "81365",
questionId: "000017"
},
{
question:"Borussia Dortmund returned to the Bundesliga in?",
answers: ["1973", "1975", "1976", "1978"],
correct: "1976",
questionId: "000018"
},
{
question:
"Which company has not been a supplier of Dortmund kits?",
answers: ["Adidas", "Nike", "Kappa", "Umbro"],
correct: "Umbro",
questionId: "000019"
},
{
question: "Błaszczykowski was plagued by a torn leg muscle in which season?",
answers: ["2008-09","2009-10","2010-11","2012-13"],
correct: "2008-09",
questionId: "000020"
},
{
question: "On 1 August 2016 Błaszczykowski joined Wolfsburg for?",
answers: ["€4 million ", "€8 million", "€5 million", "€12 million"],
correct: "€5 million",
questionId: "000021"
},
{
question: "<NAME> initially joined Borussia Dortmund for?",
answers: ["€3.5 million", "€350,000", "€700,000", "€5 million"],
correct: "€350,000",
questionId: "000022"
},
{
question: "<NAME> joined Chelsea in 2019 for a fee of?",
answers: ["€64 million","€50 million","€46 million","€75 million"],
correct: "€64 million",
questionId: "000023"
},
{
question:"When is <NAME>' birthday?",
answers: ["October 31", "July 6", "February 29", "May 31"],
correct: "May 31",
questionId: "000024"
},
{
question: "Which manager signed Guerreiro?",
answers: ["Tuchel", "Stöger", "Favre", "Bosz"],
correct: "Tuchel",
questionId: "000025"
},
{
question: "How fast did <NAME> score a hattrick on his debut?",
answers: ["45 minutes", "23 minutes", "36 minutes", "12 minutes"],
correct: "23 minutes",
questionId: "000026"
},
{
question: "How many appearances did <NAME> make for Borussia Dortmund?",
answers: ["115", "75", "200", "25"],
correct: "115",
questionId: "000027"
},
{
question: "Which manager led Dortmund to their title in 2002?",
answers: ["<NAME>", "<NAME>", "<NAME>", "<NAME>"],
correct: "<NAME>",
questionId: "000028"
},
{
question: "What is <NAME>mels middle name?",
answers: ["Jakob", "Mats", "Julian", "Martin"],
correct: "Julian",
questionId: '000029'
},
{
question: "How many goals did <NAME> score in the 2018-19 season?",
answers: ["10", "16", "14", "12"],
correct: "12",
questionId: "000030"
},
{
question: 'When did <NAME> make is BVB debut?',
answers: ["February 4, 2020","January 24, 2020","January 18, 2020","February 5, 2020"],
correct:"January 18, 2020",
questionId: "000031"
},
{
question:"Which year was the Revierderby born?",
answers: ["1925", "1909", "1927", "1918"],
corect: "1925",
questionId: "000032"
},
{
question: "When did <NAME> begin wearing black and yellow",
answers: ["1963","1909","1925","1913"],
correct: "1913",
questionId: "000033"
},
{
question:"In the 2012-13 season, how many goals did <NAME> score?",
answers: ["20", "24", "26", "17"],
correct: "24",
questionId: "000034"
},
{
question: "<NAME> was born in which German city?",
answers: ["Munich","Berlin","Frankfurt am Main","Leipzig"],
correct: "Frankfurt am Main",
questionId: "000035"
},
{
question: "Which team has <NAME> not played for?",
answers: ["Manchester United","Bayer Leverkusen","Bayern Munich","Juventus"],
correct: "Manchester United",
questionId: "000036"
},
{
question: "With which club did <NAME> begin his career?",
answers: ["Manchester City","Arsenal","Southampton","Watford"],
correct: "Watford",
questionId: "000037"
},
{
question: "Which Dortmunder was not in the 2014 WC German squad?",
answers: ["<NAME>","<NAME>","<NAME>","<NAME>"],
correct: "<NAME>",
questionId: "000038"
},
{
question: "In 2016-17 <NAME> was the Bundesliga leading scorer with how many goals?",
answers: ["29","31","32","27"],
correct: "31",
questionId: "000039"
},
{
question: "<NAME> won the 2016-17 DFB-Pokal with what score?",
answers: ["1-0","2-0","2-1","3-2"],
correct: "2-1",
questionId: "000040"
},
{
question: "<NAME> initial contract with BVB is set to end in what year?",
answers: ["2022","2023","2024","2025"],
correct: "2024",
questionId: "000041"
},
{
question: "How tall is <NAME>?",
answers: ["190cm","196 cm","198 cm","189 cm"],
correct: "196 cm",
questionId: "000042"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000043"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000044"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000045"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000046"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000047"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000048"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000049"
},
{
question: "",
answers: ["","","",""],
correct: "",
questionId: "000049"
},
];
export default (n = 1) =>
Promise.resolve(qBank.sort(() => 0.5 - Math.random()).slice(0, n));
|
e23832de7c6fb9c8932ae1f45581d64e22ef621d
|
[
"Markdown",
"JavaScript"
] | 3
|
Markdown
|
btsigsbee/quiz-app
|
cf77b13a1bdbb0591824de916c2f0bd1f1fdd3dd
|
d6fa0ca7c343d4e08cf7dd4e6b3a2aae1ae4fb3e
|
refs/heads/master
|
<repo_name>zohars/zoey-react-gallery<file_sep>/src/components/Search.js
import React, { Component } from 'react';
class Search extends Component {
constructor(props) {
super(props);
this.state = {value: ''}
this.filterUpdate = this.filterUpdate.bind(this);
}
// this gives a delay in other components of one step behind
// filterUpdate(e) {
// this.setState({value: e.target.value})
// this.props.filterUpdate(this.state.value)
// };
// this eliminates the delay
filterUpdate(e) {
var value = e.target.value;
this.setState({value: value});
this.props.filterUpdate(value);
};
render() {
console.log("Search - input value:", this.state.value)
return (
<form className="SearchForm" >
<input
className="SearchInput"
type="text"
value={this.state.value}
onChange={this.filterUpdate}
placeholder="Type here to filter..."
/>
</form>
);
}
};
export default Search;
<file_sep>/src/components/SingleImage.js
import React, { Component } from 'react';
class SingleImage extends Component {
render() {
// console.log("snglprops", this.props.test);
return (
// <li className={["SingleImage", this.props.testProps].join(' ')} style={this.props.backgroundImage}>
<li className="SingleImage" style={this.props.src} >
</li>
);
}
};
export default SingleImage;
<file_sep>/src/components/Gallery.js
import React, { Component } from 'react';
import Images from './Images';
class Gallery extends Component {
render() {
console.log('Gallery - input value:', this.props.filterText)
return (
<div className="Gallery">
<h1>Gallery</h1>
<Images
filterText={this.props.filterText}
/>
</div>
);
}
};
export default Gallery;
|
d882fdf1db6e82927cb73a8c7b035c0d201b31d9
|
[
"JavaScript"
] | 3
|
JavaScript
|
zohars/zoey-react-gallery
|
70100588736d26a9170271c65b296ed71a4c7971
|
557aa9a44fd3d95c38218cf823065fcf65e8573f
|
refs/heads/master
|
<repo_name>pklinken/alpha-message<file_sep>/AlphaMessage/MainWindow.xaml.cs
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace AlphaMessage
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window, INotifyPropertyChanged
{
/// <summary>
/// Constructed when a user opens an image, its properties and methods do all the actual interesting stuff and also
/// bind to many UI elements.
/// </summary>
public AlphaChannelDataEmbedder imageEmbedder;
/// <summary>
/// Used to remind the user to save his changes when exiting the app or closing an image.
/// </summary>
private bool changesMade = false;
private int payloadSize;
/// <summary>
/// The size of the data the user has entered/selected, updates dynamically as the user
/// enters text or selects a file.
/// </summary>
public int PayloadSize
{
get { return this.payloadSize; }
set
{
if(this.payloadSize != value)
{
this.payloadSize = value;
NotifyPropertyChanged("PayloadSize");
int availableSpace = imageEmbedder != null ? imageEmbedder.AvailableSpace : 0;
IsPayloadExceedSpace = value > availableSpace;
}
}
}
private bool isPayloadExceedSpace;
/// <summary>
/// True if <see cref="PayLoadSize"/> exceeds the available space in the loaded image.
/// Value updated by PayloadSize setter. Used by the UI to change text colour when payload
/// exceeds the available space.
/// </summary>
public bool IsPayloadExceedSpace
{
get { return this.isPayloadExceedSpace; }
set
{
if(this.isPayloadExceedSpace != value)
{
this.isPayloadExceedSpace = value;
NotifyPropertyChanged("IsPayloadExceedSpace");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
public MainWindow()
{
InitializeComponent();
}
private void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
/// <summary>
/// On receiving the Open command, presents the user with an OpenFileDialog and attempts to create an instance of
/// <see cref=" AlphaChannelDataEmbedder"/> and set up all the UI controls.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Open_Executed(object sender, ExecutedRoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Image files (*.png;*.jpg;*.jpeg)|*.png;*.jpg;*.jpeg|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() == true)
{
try
{
imageEmbedder = new AlphaChannelDataEmbedder(new Uri(openFileDialog.FileName));
}
catch (System.NotSupportedException ex)
{
MessageBox.Show(String.Format("Error opening image file: {0}", ex.Message), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
// TODO: Some filetypes seem to raise another exception which is currently not being caught
// TODO: This can also be done as a binding
imgMain.Stretch = Stretch.Uniform;
imgMain.Source = imageEmbedder.ImageSource;
// Set our window's DataContext to the AlphaChannelDataEmbedder instance so our XAML bindings work
wnd.DataContext = imageEmbedder;
changesMade = false;
// Reset some UI elements
tbBrowseFilename.Text = "";
tbPlainText.Text = "";
cbPassword.IsChecked = false;
pbPassword.Password = "";
pbValidation.Password = "";
// TODO: Also select a particular tab based on the file having embedded data or not.
}
}
/// <summary>
/// Attempts to embed user-entered plaintext or a file into the loaded image
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void EmbedButton_Click(object sender, RoutedEventArgs e)
{
// Check if an image is loaded (TODO: Could also disable the button using a binding)
if (imageEmbedder == null)
{
MessageBox.Show("Please open an image file.");
return;
}
// Check wether the user wants to embed plain text or a file
if ((bool)rbPlainText.IsChecked)
{
string plainText = tbPlainText.Text;
string password = <PASSWORD>;
// Some validation checks
if (plainText == "")
{
MessageBox.Show("Please enter some text to embed.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (plainText.Length > imageEmbedder.AvailableSpace)
{
MessageBox.Show("Message too large", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if ((bool)cbPassword.IsChecked && ValidatePasswords())
{
password = <PASSWORD>;
}
// Attempt to embed data, may still fail due to encryption overhead.
try
{
imageEmbedder.EmbedString(plainText, password);
changesMade = true;
}
catch (PayloadTooLargeException ex)
{
MessageBox.Show("Error embedding message: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
else if ((bool)rbFile.IsChecked)
{
string fileName = tbBrowseFilename.Text;
string password = <PASSWORD>;
// Some validation checks
if (fileName == "")
{
MessageBox.Show("Please select a file", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
// TODO: Catch exceptions here
FileStream saveFile = File.OpenRead(fileName);
if (saveFile.Length > imageEmbedder.AvailableSpace)
{
MessageBox.Show("File too large.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
saveFile.Close();
if ((bool)cbPassword.IsChecked && ValidatePasswords())
{
password = <PASSWORD>;
}
// Attempt to embed data, may still fail due to encryption overhead.
try
{
imageEmbedder.EmbedFile(fileName, password);
changesMade = true;
}
catch (PayloadTooLargeException ex)
{
MessageBox.Show("Error embedding file: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
}
/// <summary>
/// Checks if the password and password validation fields match and are not empty.
/// </summary>
/// <returns>True if passwords are valid and equal, false otherwise</returns>
private bool ValidatePasswords()
{
string pass1, pass2;
pass1 = <PASSWORD>;
pass2 = <PASSWORD>;
if (String.IsNullOrWhiteSpace(pass1))
{
MessageBox.Show("Cannot use empty password");
return false;
}
if (pass1 != (pass2 ?? ""))
{
MessageBox.Show("Passwords do not match");
return false;
}
return true;
}
private void SaveAs_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = (imageEmbedder != null);
}
/// <summary>
/// On receiving the SaveAs command, presents the user with a SaveFileDialog and attempt to save an image and its embedded data to a file.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SaveAs_Executed(object sender, ExecutedRoutedEventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
// TODO: Add support for other image types
// saveFileDialog.Filter = "Image files (*.png;*.jpg;*.jpeg)|*.png;*.jpg;*.jpeg|All files (*.*)|*.*";
saveFileDialog.Filter = "Image files (*.png)|*.png";
if (saveFileDialog.ShowDialog() == true)
{
try
{
imageEmbedder.SaveImageToFile(saveFileDialog.FileName);
changesMade = false;
}
catch (Exception ex)
{
MessageBox.Show("Error saving image: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
}
private void ExitCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
/// <summary>
/// On receiving the Exit command, checks if there are unsaved changes to show a confirmation dialog, otherwise just exits the application
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ExitCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{ // TODO: Check if any unsaved changes might be lost here
if (changesMade)
{
MessageBoxResult result = MessageBox.Show("Any changes you made will be lost, exit anyway?", "Exit application", MessageBoxButton.YesNoCancel);
if (result == MessageBoxResult.Yes)
Application.Current.Shutdown();
}
else
Application.Current.Shutdown();
}
/// <summary>
/// Opens an OpenFileDialog and on successful file selection updates the PayloadSize property
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BrowseButton_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Image files All files (*.*)|*.*";
if (openFileDialog.ShowDialog() == true)
{
tbBrowseFilename.Text = openFileDialog.FileName;
FileStream saveFile = File.OpenRead(tbBrowseFilename.Text);
PayloadSize = (int)saveFile.Length;
saveFile.Close();
}
}
/// <summary>
/// Opens a SaveFileDialog for the user to select a file, prompts the user for a password if necessary and
/// on success attempts to export the current image's embedded data to a file.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ExportButton_Click(object sender, RoutedEventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
string fileName;
// Suggest file extension based on data type and FileExtension property of loaded image.
if (imageEmbedder.DataType == AlphaChannelDataEmbedder.DataTypeEnum.BinaryData
|| imageEmbedder.DataType == AlphaChannelDataEmbedder.DataTypeEnum.BinaryDataEncrypted)
{
saveFileDialog.Filter = "All files (*.*)|*.*";
saveFileDialog.DefaultExt = imageEmbedder.FileExtension;
}
else
{
saveFileDialog.Filter = "Text files (*.txt)|*.txt";
saveFileDialog.DefaultExt = imageEmbedder.FileExtension;
}
if (saveFileDialog.ShowDialog() == true)
fileName = saveFileDialog.FileName;
else
return;
string password = <PASSWORD>;
if (imageEmbedder.DataEncrypted)
{ // Data password protected, prompt the user for the password
PasswordDialog passwordDialog = new PasswordDialog();
if (passwordDialog.ShowDialog() == true)
{
password = <PASSWORD>;
}
else
{
MessageBox.Show("Please enter a password to attempt data export", "Password required", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
}
// Attempt to export the data
try
{
imageEmbedder.ExportDataToFile(fileName, password);
}
catch (System.IO.IOException ex)
{
MessageBox.Show("Error exporting data: " + ex.Message, "IO Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
catch (System.ArgumentException ex)
{
MessageBox.Show("Error decrypting data: " + ex.Message, "Encryption error", MessageBoxButton.OK, MessageBoxImage.Error);
}
catch (InvalidCipherException ex)
{
MessageBox.Show("Error deciphering data: password incorrect", "Password error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
private void CloseCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = imgMain.Source != null ? true : false;
}
/// <summary>
/// On receiving the Close command, checks if there are unsaved changes to show a confirmation dialog, otherwise just removes all references to the image.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CloseCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
if (changesMade)
{
MessageBoxResult result = MessageBox.Show("Any changes you made will be lost, close anyway?", "Close image", MessageBoxButton.YesNoCancel);
if (result != MessageBoxResult.Yes)
return;
}
imgMain.Source = null;
wnd.DataContext = null;
imageEmbedder = null;
}
/// <summary>
/// Update the PayloadSize property when the user changes the contents of tbPlainText
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tbPlainText_TextChanged(object sender, TextChangedEventArgs e)
{
TextBox tb = sender as TextBox;
// TODO: This can probably be done by a binding.
PayloadSize = tb.Text.Length;
}
/// <summary>
/// When the user switches between plain-text or file content in the Embed tab, update the PayloadSize property
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rbContentType_Checked(object sender, RoutedEventArgs e)
{
// Check in place to avoid exception on window load
if (tbPlainText == null || tbSize == null || tbBrowseFilename == null)
return;
RadioButton rb = sender as RadioButton;
if (rb.Name == "rbPlainText" && tbPlainText.Text.Length > 0)
{
PayloadSize = tbPlainText.Text.Length;
}
else if (tbBrowseFilename.Text != "")
{
// TODO: Catch exceptions
FileStream saveFile = File.OpenRead(tbBrowseFilename.Text);
PayloadSize = (int)saveFile.Length;
saveFile.Close();
}
else
{
PayloadSize = 0;
}
}
}
/// <summary>
/// Custom commands used in the application
/// </summary>
public static class CustomCommands
{
public static readonly RoutedUICommand Exit = new RoutedUICommand(
"Exit", "Exit", typeof(CustomCommands), new InputGestureCollection()
{
new KeyGesture(Key.F4, ModifierKeys.Alt)
});
public static readonly RoutedUICommand Close = new RoutedUICommand(
"Close", "Close", typeof(CustomCommands), new InputGestureCollection()
{
new KeyGesture(Key.Q, ModifierKeys.Control)
});
}
/// <summary>
/// Converter that translates the datatype of an AlphaChannelDataEmbedder instance to description
/// </summary>
public class DataTypeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
return value;
switch ((AlphaChannelDataEmbedder.DataTypeEnum)value)
{
case AlphaChannelDataEmbedder.DataTypeEnum.PlainText:
return "Image contains plain text data";
case AlphaChannelDataEmbedder.DataTypeEnum.BinaryData:
return "Image contains binary data";
case AlphaChannelDataEmbedder.DataTypeEnum.PlainTextEncrypted:
return "Image contains encrypted plain text data";
case AlphaChannelDataEmbedder.DataTypeEnum.BinaryDataEncrypted:
return "Image contains encrypted binary data";
default:
return "Image contains no embedded data";
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
}
/// <summary>
/// Converter to translate the value of an ImageSource (null or not null) to a visibility property
/// </summary>
public class ImageSourceToVisibilityAttributeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value == null ? System.Windows.Visibility.Visible : System.Windows.Visibility.Hidden;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value;
}
}
}
<file_sep>/AlphaMessage/PasswordDialog.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace AlphaMessage
{
/// <summary>
/// Interaction logic for PasswordDialog.xaml
/// </summary>
public partial class PasswordDialog : Window
{
public string Password
{
get { return passwordBox.Password; }
}
public PasswordDialog()
{
InitializeComponent();
}
private void Window_ContentRendered(object sender, EventArgs e)
{
passwordBox.Focus();
}
// Check if the user gave a non-empty/whitespace password when closing the dialog
private void OkButton_Click(object sender, RoutedEventArgs e)
{
//this.DialogResult = passwordBox.Password != "" ? true : false;
this.DialogResult = String.IsNullOrWhiteSpace(passwordBox.Password) ? false : true;
}
}
}
<file_sep>/AlphaMessage/AlphaChannelDataEmbedder.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace AlphaMessage
{
/// <summary>
/// Provides functionality to embed and retrieve data into the alpha channel of an image file.
/// Constructor will set up all the properties as well as convert the image type to BGRA32 if
/// an alpha channel is not present.</summary>
/// <remarks>Currently only supports saving to BGRA32 PNG files and may misbehave when used with
/// filetypes other than PNG, testing pending.</remarks>
public class AlphaChannelDataEmbedder : INotifyPropertyChanged
{
/// <summary>
/// Defines the size of the header in <see cref="rawData"/></summary>
private const int HeaderSize = 8;
/// <summary>
/// Contains user-entered data as well as a header describing its contents.
/// Header format:
/// [0] AlphaChannelDataType enum
/// [1-4] Size of data after header
/// [5-7] File extension used when exporting binary data</summary>
private byte[] rawData;
/// <summary>
/// Returns true if the loaded image contains embedded data in its alpha channel.
/// </summary>
public bool HasEmbeddedData
{
get
{
return DataType == DataTypeEnum.BinaryData || DataType == DataTypeEnum.BinaryDataEncrypted
|| DataType == DataTypeEnum.PlainText || DataType == DataTypeEnum.PlainTextEncrypted;
}
}
/// <summary>
/// Returns true if the loaded image has embedded data that is encrypted
/// </summary>
public bool DataEncrypted
{
get { return ((DataTypeEnum)rawData[0] == DataTypeEnum.PlainTextEncrypted || (DataTypeEnum)rawData[0] == DataTypeEnum.BinaryDataEncrypted); }
}
/// <summary>
/// Returns a human-readable string describing the contents of embedded data, or an empty string if none is present.
/// </summary>
public string HumanReadableDescription
{
get
{
string description = "";
if (HasEmbeddedData)
{
description += "Data type: ";
switch (DataType)
{
case DataTypeEnum.BinaryDataEncrypted:
description += "binary\n";
break;
case DataTypeEnum.PlainTextEncrypted:
description += "plain text\n";
break;
case DataTypeEnum.BinaryData:
description += "binary\n";
break;
case DataTypeEnum.PlainText:
description += "plain text\n";
break;
}
description += "Encrypted: " + (this.DataEncrypted ? "yes\n" : "no\n");
description += "Size: " + DataSize + " bytes\n";
description += "File extension: " + FileExtension + "\n\n";
if (DataType == DataTypeEnum.PlainText)
{
description += "Contents: " + DataAsString() + "\n";
}
}
else
{
//description += "Image doesn't contain embedded data.";
}
return description;
}
}
/// <summary>
/// Returns the file extension of embedded binary data or .txt if the image contains plain text.
/// </summary>
public string FileExtension
{
get
{
if (DataType == DataTypeEnum.PlainText || DataType == DataTypeEnum.PlainTextEncrypted)
return ".txt";
else
{
char[] fileType = new char[4];
fileType[0] = '.';
fileType[1] = Convert.ToChar(rawData[5]);
fileType[2] = Convert.ToChar(rawData[6]);
fileType[3] = Convert.ToChar(rawData[7]);
return new String(fileType);
}
}
private set
{
rawData[5] = Convert.ToByte(value[0]);
rawData[6] = Convert.ToByte(value[1]);
rawData[7] = Convert.ToByte(value[2]);
}
}
/// <summary>
/// Returns the user-data size field from the header.
/// </summary>
public int DataSize
{
get
{
int size = rawData[4];
size |= rawData[3] << 8;
size |= rawData[2] << 16;
size |= rawData[1] << 24;
return size;
}
private set
{
rawData[1] = (byte)(value >> 24);
rawData[2] = (byte)((value >> 16) & 0xff);
rawData[3] = (byte)((value >> 8) & 0xff);
rawData[4] = (byte)(value & 0xff);
}
}
/// <summary>
/// Returns the type of data embedded in the loaded image as a <see cref="DataTypeEnum"/>
/// </summary>
public DataTypeEnum DataType
{
get { return (DataTypeEnum)rawData[0]; }
}
/// <summary>
/// Enumeration of all possible embedded data types.
/// </summary>
public enum DataTypeEnum
{
PlainText = 0x45, BinaryData = 0xc2,
PlainTextEncrypted = 0x46, BinaryDataEncrypted = 0xc3
};
/// <summary>
/// Available space for user-entered data in the current image.</summary>
public int AvailableSpace { get; private set; }
/// <summary>
/// The currently loaded image of an instance.
/// </summary>
public BitmapSource ImageSource { get; private set; }
/// <summary>
/// The height, width and stride of the currently loaded image.
/// </summary>
private int height, width, stride;
//private BitmapMetadata metadata;
/// <summary>
/// Loads an image from the provided Uri, converts the image to a type with an alpha channel
/// if necessary and sets up all the class properties.</summary>
/// <param name="fileName">The filename of the image to load.</param>
public AlphaChannelDataEmbedder(Uri fileName)
{
BitmapImage tempImage = new BitmapImage();
tempImage.BeginInit();
tempImage.UriSource = fileName;
tempImage.EndInit();
ImageSource = tempImage;
//BitmapDecoder bd = BitmapDecoder.Create(fileName, BitmapCreateOptions.None, BitmapCacheOption.Default);
//metadata = (BitmapMetadata) bd.Frames[0].Metadata;
// Set the height, width and stride for the image
height = ImageSource.PixelHeight;
width = ImageSource.PixelWidth;
stride = (width * ImageSource.Format.BitsPerPixel + 7) / 8;
// Allocate space for potential payload
// We store 1 bit per pixel in the alpha channel, but have to subtract the space
// required by the header.
int rawDataSize = (ImageSource.PixelHeight * ImageSource.PixelWidth / 8);
rawData = new byte[rawDataSize];
AvailableSpace = rawDataSize - HeaderSize;
// If necessary, convert the image to a type with an alpha channel
if (!HasAlphaChannel())
ConvertToBitmapWithAlphaChannel();
// Attempt to retrieve existing data from the alpha channel
RetrieveDataFromBitmap();
}
/// <summary>
/// Checks if the loaded image has an alpha channel.</summary>
/// <returns>True is image has an alpha channel, false otherwise.</returns>
private bool HasAlphaChannel()
{ // TODO: there are more filetypes with an alpha channel, notably 64/128 bit ones, ignoring those for now.
PixelFormat pf = ImageSource.Format;
return (pf == PixelFormats.Bgra32 || pf == PixelFormats.Pbgra32);
}
/// <summary>
/// Converts the current image to a type that has an alpha channel.</summary>
/// <remarks>Specifically, to a PNG RGBA32 image</remarks>
private void ConvertToBitmapWithAlphaChannel()
{
// Copy the raw pixels to an array
byte[] pixelArray = new byte[height * stride];
ImageSource.CopyPixels(pixelArray, stride, 0);
// Create a new Bitmap with an alpha channel from the raw pixels
BitmapSource convertedBitmap = BitmapSource.Create(width, height, ImageSource.DpiX, ImageSource.DpiY,
PixelFormats.Bgra32, ImageSource.Palette, pixelArray, stride);
// Set our image source to the new Bitmap
ImageSource = convertedBitmap;
}
/// <summary>
/// Copies all data present in the alpha channel to rawData[].
/// </summary>
private void RetrieveDataFromBitmap()
{
// Copy the raw pixels to an array
byte[] pixelArray = new byte[height * stride];
ImageSource.CopyPixels(pixelArray, stride, 0);
// Every 4th byte in pixelArray is an alpha channel and will (on a valid file)
// contain either 0xff or 0xfe, corresponding to a bit in a byte element of rawData[]
// The following algorithm retrieves this data.
int pixelArrayIndex = 3;
int dataIndex = 0;
int bitIndex = 0;
byte b = 0;
while (pixelArrayIndex < pixelArray.Length)
{
if (bitIndex == 8)
{
rawData[dataIndex++] = b;
bitIndex = 0;
b = 0;
}
b |= (byte)((pixelArray[pixelArrayIndex] == 0xff ? 0 : 1) << bitIndex);
pixelArrayIndex += 4;
bitIndex++;
}
}
/// <summary>
/// Embeds the contents of rawData[] in the alpha channel of the loaded image.
/// </summary>
private void EmbedDataInBitmap()
{
// Copy the raw pixels to an array
byte[] pixelArray = new byte[height * stride];
ImageSource.CopyPixels(pixelArray, stride, 0);
// pixelArray now contains all the pixels from our bitmap
// Every 4th byte in pixelArray is an alpha channel and will (on a valid file)
// contain either 0xff or 0xfe, corresponding to a bit in a byte element of rawData[]
// The following algorithm embeds rawData[] in this alpha channel.
int pixelArrayIndex = 3;
int dataIndex = 0;
int bitIndex = 0;
while (pixelArrayIndex < pixelArray.Length)
{
int bit = (byte)(rawData[dataIndex] & (1 << bitIndex));
pixelArray[pixelArrayIndex] = bit == 0 ? (byte)0xff : (byte)0xfe;
bitIndex++;
pixelArrayIndex += 4;
if (bitIndex == 8)
{
dataIndex++;
bitIndex = 0;
}
}
// pixelArray now has rawData[] embedded in its alpha channel, create a new BitmapSource
// using pixelArray
BitmapSource embeddedBitmap = BitmapSource.Create(width, height, ImageSource.DpiX, ImageSource.DpiY,
PixelFormats.Bgra32, ImageSource.Palette, pixelArray, stride);
ImageSource = embeddedBitmap;
}
/// <summary>
/// Store plaintext data in rawData[] and update its header and the instance properties
/// </summary>
/// <param name="plainText">The plaintext data to store</param>
/// <param name="password">An optional password to encrypt the plaintext</param>
/// <remarks>Actual embedding into the loaded image is not done until the user saves the image
/// <see cref="SaveImageToFile"/></remarks>
public void EmbedString(string plainText, string password = null)
{
// Move the plainText to a byte array
byte[] data = Encoding.UTF8.GetBytes(plainText);
// If a password parameter was given, use it to encrypt the data
if (password != null)
data = AESGCM.SimpleEncryptWithPassword(data, password);
// Encryption adds some overhead so check if the data will still fit
if (data.Length > AvailableSpace)
throw new PayloadTooLargeException("Message too large");
// All is well, store result and new header in rawData and update other properties
rawData[0] = password == null ? (byte)DataTypeEnum.PlainText : (byte)DataTypeEnum.PlainTextEncrypted;
DataSize = data.Length;
Array.Copy(data, 0, rawData, HeaderSize, data.Length);
/* for (int index = 0; index < data.Length; index++)
{
rawData[index + HeaderSize] = data[index];
} */
updateProperties();
}
/// <summary>
/// Store a file in rawData[] and update its header and the instance properties
/// </summary>
/// <param name="fileName">The name of the file to store</param>
/// <param name="password">An optional password to encrypt the file</param>
/// <remarks>Actual embedding into the loaded image is not done until the user saves the image
/// <see cref="SaveImageToFile"/></remarks>
public void EmbedFile(string fileName, string password = null)
{
byte[] data = File.ReadAllBytes(fileName);
// If a password parameter was given, use it to encrypt the data
if (password != null)
data = AESGCM.SimpleEncryptWithPassword(data, password);
// Encryption adds some overhead so check if the data will still fit
if (data.Length > AvailableSpace)
throw new PayloadTooLargeException("File too large");
// All is well, store result and new header in rawData and update other properties
rawData[0] = password == null ? (byte)DataTypeEnum.BinaryData : (byte)DataTypeEnum.BinaryDataEncrypted;
DataSize = data.Length;
FileExtension = fileName.Substring(fileName.Length - 3, 3);
Array.Copy(data, 0, rawData, HeaderSize, data.Length);
/* for (int index = 0; index < data.Length; index++)
{
rawData[index + HeaderSize] = data[index];
} */
updateProperties();
}
/// <summary>
/// Returns the data portion of rawData[] as a string.
/// </summary>
private string DataAsString()
{
char[] dataAsChar = new char[DataSize];
// FIXME: There is bound to be a .NET functions for this like Array.Copy/ConvertAll
for (int index = 0; index < dataAsChar.Length; index++)
{
dataAsChar[index] = Convert.ToChar(rawData[index + HeaderSize]);
}
return new string(dataAsChar);
}
/// <summary>
/// Save the loaded image to a file.
/// </summary>
/// <param name="fileName">The filename to which to save</param>
internal void SaveImageToFile(string fileName)
{
// Embed rawData[] into the alpha channel of loaded image
EmbedDataInBitmap();
using (FileStream fileStream = new FileStream(fileName, FileMode.Create))
{
PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(ImageSource));
//encoder.Frames[0].Metadata = metadata;
//InPlaceBitmapMetadataWriter metaWriter = encoder.Frames[0].CreateInPlaceBitmapMetadataWriter();
//encoder.Metadata = metadata;
encoder.Save(fileStream);
}
}
/// <summary>
/// Save data embedded in loaded image to a file
/// </summary>
/// <param name="fileName">The file to save data to</param>
/// <param name="password">Optional password</param>
/// <exception cref="InvalidCipherException"/>
internal void ExportDataToFile(string fileName, string password=null)
{
byte[] payLoad = new byte[DataSize];
Array.Copy(rawData, HeaderSize, payLoad, 0, DataSize);
// If encrypted, attempt to decrypt the data, raises an exception on failure
if (DataEncrypted)
{
byte[] decryptedData = AESGCM.SimpleDecryptWithPassword(payLoad, password);
if (decryptedData == null)
{ // our encryption method will return null on a bad password
throw new InvalidCipherException();
}
payLoad = decryptedData;
}
// Attempt to write payLoad to file
using (FileStream fileStream = new FileStream(fileName, FileMode.Create))
{
fileStream.Write(payLoad, 0, payLoad.Length);
}
}
/// <summary>
/// Updates the public properties so the UI bindings update.
/// </summary>
/// <remarks>It would be preferable to do this in the setters of the properties
/// but the way the design worked out this works OK.</remarks>
private void updateProperties()
{
OnPropertyChanged("DataType");
OnPropertyChanged("HumanReadableDescription");
OnPropertyChanged("HasEmbeddedData");
OnPropertyChanged("DataEncrypted");
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string name)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(name));
}
}
}
/// <summary>
/// Exception thrown when a payload turns out to be too large to be embedded.
/// Usually the UI logic would prevent the user from attempting to embed too large data,
/// but encryption adds overhead that can cause data to become too large which is when you
/// will see this exception.
/// </summary>
public class PayloadTooLargeException : Exception
{
public PayloadTooLargeException()
{
}
public PayloadTooLargeException(string message) : base(message)
{
}
public PayloadTooLargeException(string message, Exception inner) : base(message, inner)
{
}
}
/// <summary>
/// Exception raised when the user enters an invalid password when attempting to export data to a file
/// </summary>
public class InvalidCipherException : Exception
{
public InvalidCipherException() { }
public InvalidCipherException(string message) : base(message) { }
public InvalidCipherException(string message, Exception inner) : base(message, inner) { }
}
}
<file_sep>/README.md
# alpha-message
Embed and retrieve text and data from the alpha channel in PNG files.
|
f2e82c9979d909cc75f2dc65f88e4cee44afe6a2
|
[
"Markdown",
"C#"
] | 4
|
C#
|
pklinken/alpha-message
|
42479044169e74af555cdca9312e32d6e88d8f7b
|
59e1be6472c3c155df0c9c1746fb927eafe4ff05
|
refs/heads/master
|
<repo_name>bsmHolmes/CPSC-449<file_sep>/tree.java
//tree has 2 subclasses branch and leaf
abstract class tree {
public static byte[] get_best_tree_slow(int[][] MT_penalties, int[][] MT_too_near) {
byte[] MT_pairs = {1, 2, 3, 4, 5, 6, 7, 8}; ///array[machine # -1] = task #)
byte[] MT_sequence = {1, 1, 1, 1, 1, 1, 1, 1};
byte[] best_tree = {1, 2, 3, 4, 5, 6, 7, 8};
int best_cost = -1;
int current_cost;
while (true) {
MT_sequence = increment_sequence(MT_sequence, 0); //get next set of machine task pairs to try as a solution
MT_pairs = get_pairs(MT_sequence); //format pairs into array with array[machine # -1] = task #)
current_cost = get_cost(MT_pairs, MT_penalties, MT_too_near);
if (current_cost != -1 && current_cost < best_cost || best_cost == -1) {
best_cost = current_cost;
for (byte i=0; i<8; i++) {
best_tree[i] = MT_pairs[i];
}
}
if (MT_sequence[0] == 8 && MT_sequence[1] == 7 && MT_sequence[2] == 6 && MT_sequence[3] == 5 && MT_sequence[4] == 4 && MT_sequence[5] == 3 && MT_sequence[6] == 2 && MT_sequence[7] == 1) {
break;
}
}
return best_tree;
}
//get a possible tree
public static byte[] get_initial_tree(int[][] MT_penalties, int[][] MT_too_near) {
byte[] MT_pairs = {1, 2, 3, 4, 5, 6, 7, 8}; ///array[machine # -1] = task #)
byte[] MT_sequence = {1, 1, 1, 1, 1, 1, 1, 1};
while (get_cost(MT_pairs, MT_penalties, MT_too_near) == -1) { //-1 indicates a forbidden pairing
MT_sequence = increment_sequence(MT_sequence, 0); //get next set of machine task pairs to try as a solution
MT_pairs = get_pairs(MT_sequence); //format pairs into array with array[machine # -1] = task #)
}
return MT_pairs;
}
//finds next sequence array to be attempted as a solution (returns array where array[machine # -1] = task numbered from list 1 through (9-machine #))
//*********************should throw no_valid_assignments_exception if all possible pairings have been tried (not implemented, currently throws arrayIndexOutOfBoudns error)*********************
private static byte[] increment_sequence(byte[] MT_sequence, int array_position) { //WORKING as expected all cases tested
/*if (array_position == 7) {
throw no_valid_assignments_exception;
}*/
if (MT_sequence[array_position] == 8-array_position) {
MT_sequence[array_position] = 1;
MT_sequence = increment_sequence(MT_sequence, array_position + 1);
}
else {
MT_sequence[array_position] += 1;
}
return MT_sequence;
}
//takes the sequence array and gives back the paired task for each machine (returns array where array[machine # -1] = task #)
private static byte[] get_pairs(byte[] MT_sequence) {
byte[] MT_pairs = new byte[8];
byte[][] remaining_tasks = new byte[8][8];
remaining_tasks[0] = new byte[]{1, 2, 3, 4, 5, 6, 7, 8};
MT_pairs[0] = MT_sequence[0];
byte next_task_index = -1;
for (int i=1; i<8; i++) { //represents index of remaining tasks to work with
for (byte k=0; k<8; k++) { //next_task_index = remaining_tasks[i].indexOf(MT_pairs[i-1]);
if (remaining_tasks[i-1][k] == MT_pairs[i-1]) {
next_task_index = k; //index of task already paired
break;
}
}
// System.out.print(next_task_index);
for (int j=0; j<9-i; j++) { //index of remaining_tasks[i]
if (j < next_task_index) { //add the corresponding entry in the previous array
remaining_tasks[i][j] = remaining_tasks[i-1][j]; //place j term
}
if (j > next_task_index) { //add the entry previous to the corresponding one in the previous array
remaining_tasks[i][j-1] = remaining_tasks[i-1][j]; //place j-1 term
}
}
// System.out.print("\n");
// for (int j=0; j<8; j++) {System.out.print(remaining_tasks[i][j]);}
MT_pairs[i] = remaining_tasks[i][MT_sequence[i]-1];
}
// System.out.print("\nPairs:");
// for (int i=0; i<8; i++) {System.out.print(MT_pairs[i]);}
// System.out.print("\n");
return MT_pairs;
}
//returns total cost of current pairing given cost per machine for task and too near task list (each should hold value -1 to indicate forbidden)
private static int get_cost(byte[] MT_pairs, int[][] MT_penalties, int[][] MT_too_near) {
int cost = 0;
for (int i=0; i<8; i++) {
cost += MT_penalties[i][MT_pairs[i]-1];
if (MT_penalties[i][MT_pairs[i]-1] == -1) {
cost = -1;
break;
}
}
if (MT_too_near.length > 0) {
byte task1 = -1;
byte task2 = -1;
for (int i=0; i<MT_too_near.length; i++) { //iterate through the too_near array
if (cost == -1) {
break;
}
for (byte j=0; j<8; j++) { //find the machine corresponding to the first entry of the too_close array
if (MT_pairs[j] == MT_too_near[i][0]) {
task1 = j;
break;
}
}
for (byte j=0; j<8; j++) { //find the machine corresponding to the second entry of the too_close array
if (MT_pairs[j] == MT_too_near[i][1]) {
task2 = j;
break;
}
}
if (task1-task2 == 1 || task1-task2 == -1 || (task1 == 1 && task2 == 8)) {
cost += MT_too_near[i][2];
if (MT_too_near[i][2] == -1) {
cost = -1;
}
}
}
}
return cost;
}
int supertree_cost;
byte machine_task;
Boolean closed = false;
}
class branch extends tree {
int best_subtree_cost;
tree[] subtrees = new tree[8];
byte used_tasks; //tasks used in supertree or in this branch
}
class leaf extends tree {
int total_cost; //supertree cost + cost of machine 8's task
}
/*
used_tasks
should have 1 at positions #s where machines not in the subtree have that task #
should have 0 at positions #s where machines in the subtree have that task #
the total number of 1's gives the machine #
machine_task
should have a 1 at the task number -1 th position
number_ones(used_tasks), index_of_1(machine_task) + 1 = this node's Machine, Task pair
use trial and error to find an initial tree
use 7 branches and 1 leaf to form the tree
*/
<file_sep>/Driver.java
package cpsc449;
import java.io.File;
public class Driver {
private FileHandler inputFile = new FileHandler;
private Tree tree = new Tree; //Naming of "tree" class should be capitalized
private byte[] bestTree;
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("Usage: Driver filename"); //check for proper calling format, 2 arguments
System.exit(0);
}
inputFile.loadData(args[1]); //run file handler on input file, "inputFile" holds most data
// //should probably run forbidden check here, or in the file handler
tree.get_initial_tree(inputFile.getMP(), inputFile.getTNP()); //create initial tree, note TNP has a size mismatch between tree and file handler
bestTree = tree.get_best_tree_slow; //Temporary best tree finding algorithm
for (int i = 0; i < 8; i++)
System.out.println("Machine %d - Task %d", i, bestTree[i]); //print best machine task pairings from "bestTree"
}
}<file_sep>/ForbiddenCheck.java
//package cpsc449;
// Class that compares all pairs in fm to mp and replaces the value in mp to -1 if true
import java.io.File;
public class ForbiddenCheck{
public static void main(String[] args){
FileHandler getFiles = new FileHandler();
Pair getPairs;
// load the file to read from
String base = new File("").getAbsolutePath();
String filePath = base + "/inputs/myinput0.txt";
getFiles.loadData(filePath);
//int machine = getPairs.getInt();
//char task = getPairs.getSecondChar();
int[][] machinePenalties = getFiles.getMP();
Pair[] forbiddenMachines = getFiles.getFM();
int machine = forbiddenMachines.getInt();
/*for (int i = 0; i < forbiddenMachines.length; i++){
int machine = forbiddenMachines.getInt();
char task = forbiddenMachines.getSecondChar();
// comvert task from alphabetical to numerical
//String str = task;
//char[] ch = str.toCharArray();
/*for(char c : task){
int temp = (int)c;
int temp_integer = 96;
}
if(temp<=122 & temp>=97){
int tasknum = (temp-temp_integer);
}*/
//for (int j = 0; j<getFM.len)
System.out.println("Machine Penalties\n" + machinePenalties + forbiddenMachines);
//System.out.println(java.util.Arrays.toString(machinePenalties));
for(int[] i : machinePenalties){
System.out.println(i);
}
}
}<file_sep>/Pair.java
package cpsc449;
//a tuple class used for storing the machine/task pairs as well as too near task pairs
public class Pair{
//Strings are used here so that the x value can be either an int or a char
private String x;
private String y;
public Pair(String x, String y)
{
this.x = x;
this.y = y;
}
//print the tuple
public String toString()
{
return("(" + x + ", " + y + ")");
}
//only works if first in tuple is int
public int getInt()
{
return(Integer.parseInt(x));
}
//print the second symbol in the tuple
public char getSecondChar()
{
return(y.charAt(0));
}
//only useful if the first of the tuple is a char
public char getFirstChar()
{
return(x.charAt(0));
}
}
<file_sep>/Triple.java
package cpsc449;
// a Triple class used for storing too near
public class Triple {
private char x;
private char y;
private int z;
public Triple(char x, char y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
public char getFirstChar()
{
return(x);
}
public char getSecondChar()
{
return(y);
}
public int getInt()
{
return(z);
}
//print the triple
public String toString()
{
return("(" + x + ", " + y + ", " + z + ")");
}
}
|
3cc4ff5c2be988b5d1953eade1bafc73b9af3ea3
|
[
"Java"
] | 5
|
Java
|
bsmHolmes/CPSC-449
|
e2ebdba15a61bed88dac6dc746fcc912da6b1af5
|
1998a8bda44349b36334b2037d72dd921de1d35a
|
refs/heads/master
|
<repo_name>naveedakhtar28/ExtentReport<file_sep>/UnitTestProject2/Utilities.cs
using AventStack.ExtentReports;
using AventStack.ExtentReports.Reporter;
using NUnit.Framework;
using NUnit.Framework.Interfaces;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.IE;
using System;
using System.IO;
using System.Reflection;
using System.Threading;
namespace ExtentReportSelenium
{
public class Utilities
{
public IWebDriver driver;
protected ExtentReports _extent;
protected ExtentTest _test;
[OneTimeSetUp]
public void Setup()
{
var ExecutionBrowser = System.Environment.GetEnvironmentVariable("Browser");
var ExecutionEnvironment = System.Environment.GetEnvironmentVariable("Environment");
var ExecutionTime = System.Environment.GetEnvironmentVariable("BUILD_TIMESTAMP");
var ExecutionDate = System.Environment.GetEnvironmentVariable("BUILD_DATE");
switch (ExecutionBrowser)
{
case "Chrome":
ChromeOptions options = new ChromeOptions();
options.AddArguments("start-maximized");
options.AddArguments("--incognito");
driver = new ChromeDriver("C:/chromedriver_win32/", options);
break;
case "Firefox":
//System.Environment.SetEnvironmentVariable("webdriver.gecko.driver", "geckodriver.exe");
driver = new FirefoxDriver();
driver.Manage().Window.Maximize();
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMinutes(3);
break;
case "Internet Explorer":
driver = new InternetExplorerDriver("C:/IEDriverServer/");
break;
}
switch (ExecutionEnvironment)
{
case "Dev":
driver.Url = "https://www.cricbuzz.com/";
Thread.Sleep(10000);
break;
case "QA":
driver.Url = "http://www.espncricinfo.com/";
Thread.Sleep(10000);
break;
case "Prod":
driver.Url = "https://www.news18.com/cricketnext/?ref=topnav";
Thread.Sleep(10000);
break;
}
if (ExecutionTime != null)
{
var FilePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),@"Reports");
if (!Directory.Exists(FilePath + "/" + ExecutionDate))
{
Directory.CreateDirectory(FilePath + "/" + ExecutionDate);
}
var fileName = ExecutionTime + ".html";
var fileDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),@"Reports");
var htmlReporter = new ExtentHtmlReporter(fileDirectory + "/" + ExecutionDate + "/" + fileName);
_extent = new ExtentReports();
_extent.AttachReporter(htmlReporter);
}
}
[SetUp]
public void TestSetup()
{
_test = _extent.CreateTest(TestContext.CurrentContext.Test.Name);
}
[TearDown]
public void AfterTest()
{
var status = TestContext.CurrentContext.Result.Outcome.Status;
var stacktrace = string.IsNullOrEmpty(TestContext.CurrentContext.Result.StackTrace)
? ""
: string.Format("{0}", TestContext.CurrentContext.Result.StackTrace);
Status logstatus;
switch (status)
{
case TestStatus.Failed:
logstatus = Status.Fail;
break;
case TestStatus.Inconclusive:
logstatus = Status.Warning;
break;
case TestStatus.Skipped:
logstatus = Status.Skip;
break;
default:
logstatus = Status.Pass;
break;
}
var ExecutionTime = System.Environment.GetEnvironmentVariable("BUILD_TIMESTAMP");
var ExecutionDate = System.Environment.GetEnvironmentVariable("BUILD_DATE");
var fileDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Reports");
if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Passed)
{
var fileNameMethod = TestContext.CurrentContext.Test.Name.ToString();
var fileName = ExecutionTime + "_" + fileNameMethod + ".PNG";
Screenshot ss = ((ITakesScreenshot)driver).GetScreenshot();
ss.SaveAsFile(fileDirectory + "\\" + ExecutionDate + "\\" + fileName , ScreenshotImageFormat.Png);
_test.Fail("details").AddScreenCaptureFromPath(fileName);
}
_test.Log(logstatus, "Test ended with " + logstatus + stacktrace);
_extent.Flush();
}
[OneTimeTearDown]
public void OneTimeTeardown()
{
driver.Quit();
_extent.Flush();
}
}
}
<file_sep>/UnitTestProject2/SeleniumTests.cs
using NUnit.Framework;
using System.Threading;
namespace ExtentReportSelenium
{
public class SeleniumTest : Utilities
{
[Test]
public void TestMethod1()
{
Thread.Sleep(1000);
Assert.IsTrue(true);
}
[Test]
public void TestMethod2()
{
Thread.Sleep(2000);
Assert.IsTrue(true);
}
[Test]
public void TestMethod3()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod4()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod5()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod6()
{
Assert.IsTrue(false);
}
[Test]
public void TestMethod7()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod8()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod9()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod10()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod11()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod12()
{
Assert.IsTrue(false);
}
[Test]
public void TestMethod13()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod14()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod15()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod16()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod17()
{
Assert.IsTrue(true);
}
[Test]
public void TestMethod18()
{
Assert.IsTrue(false);
}
}
}
|
8113a9c4fbe0248935f91883bbe3875820adbf3f
|
[
"C#"
] | 2
|
C#
|
naveedakhtar28/ExtentReport
|
0db03c46318ea3a0ce7ff645c737898c28952f9d
|
55d554d78d815d9b212848414430c201a0ae363e
|
refs/heads/master
|
<file_sep>import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { GlobalService } from '../../global.service';
@Component({
selector: 'app-login',
templateUrl: './login.page.html',
styleUrls: ['./login.page.scss'],
})
export class LoginPage implements OnInit {
constructor(
private router: Router,
private global:GlobalService
) { }
ngOnInit() {
this.ocultarPart('part2')
this.ocultarPart('part3')
}
goOP(id){
this.verPart(id)
this.ocultarPart('part1')
}
retornar(id){
this.ocultarPart(id)
this.verPart('part1')
}
verPart(id){
document.getElementById(id).style.transition="0.5s"
document.getElementById(id).style.height='auto'
}
ocultarPart(id){
document.getElementById(id).style.transition="0.5s"
document.getElementById(id).style.height='0px'
}
iniciarSecion(){
localStorage.setItem('secion','true')
this.global.status_de_secion=true
this.ocultarPart('part2')
this.ocultarPart('part3')
this.verPart('part1')
this.router.navigate(['/inicio'])
}
}
<file_sep>import { Component, OnInit } from '@angular/core';
import { Efectos } from './Efectos';
import { Router ,NavigationExtras } from '@angular/router';
@Component({
selector: 'app-lavanderia',
templateUrl: './lavanderia.page.html',
styleUrls: ['./lavanderia.page.scss'],
})
export class LavanderiaPage implements OnInit {
imagenes=[
'../../../assets/iconos/shutterstock_422824102.jpg',
'../../../assets/iconos/700x420_lavanderia-autoservicio.jpg',
'../../../assets/iconos/20180626143642-lavanderia.jpeg',
'../../../assets/iconos/exe.jpg',
'../../../assets/iconos/flaswash.png'
]
servicios=[
{
servicio:'Lavado de ropa',
precio: 30,
visto: false,
elegido:false,
unidad: 'Kilo'
},
{
servicio:'Planchado',
precio: 5,
visto: false,
elegido:false,
unidad: 'Pieza'
},
{
servicio:'Ropa de ceda',
precio: 20,
visto: false,
elegido:false,
unidad: 'Pieza'
},
{
servicio:'Ropa de cama',
precio: 10,
visto: false,
elegido:false,
unidad: 'Pieza'
},
]
ofertas=[
{
titulo:'viernes 1x2',
info:'Todos los Lunes y/o Viernes, agenda tu servicio de las 8:00 a las 14:00 horas y pagas tan solo $22.00 x Kilo',
visto: false,
},
{
titulo:'jueves 1x2',
info:'Todos los Lunes y/o Viernes, agenda tu servicio de las 8:00 a las 14:00 horas y pagas tan solo $22.00 x Kilo',
visto: false,
}
]
efectos=new Efectos()
constructor(
private router:Router
) { }
ngOnInit() {
this.efectos.espavlecerTamaño(this.servicios.length,this.ofertas.length)
}
/* irASolicitud(){
this.router.navigate(['/solicitud'])
}*/
seleccionar(servicio){
if(servicio.elegido==false)
servicio.elegido=true
else
servicio.elegido=false
}
irASolicitud(){
let navigationExtras: NavigationExtras = {
queryParams: {
special: JSON.stringify(this.servicios)
}
};
this.router.navigate(['solicitud'], navigationExtras);
}
}
<file_sep>import { Component, OnInit } from '@angular/core';
import { Efectos } from './Efectos';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-solicitud',
templateUrl: './solicitud.page.html',
styleUrls: ['./solicitud.page.scss'],
})
export class SolicitudPage implements OnInit {
efectos=new Efectos();
servicios
constructor(private route: ActivatedRoute, private router: Router) {
this.route.queryParams.subscribe(params => {
this.servicios = JSON.parse(params.special);
console.log("data= ",this.servicios);
this.efectos.medir(this.servicios)
});
}
ngOnInit() {
}
}
<file_sep>
export class Efectos{
//iconos
iconCancelar='../../../assets/iconos/error.png'
iconMas='../../../assets/iconos/add-button-inside-black-circle.png'
iconMenos='../../../assets/iconos/minus-sign-inside-a-black-circle.png'
iconLavadors='../../../assets/iconos/washing-machine.png'
iconRopa='../../../assets/iconos/casual-t-shirt.png'
iconMoney='../../../assets/iconos/coin.png'
iconinstrucciones='../../../assets/iconos/strategy.png'
iconMoto='../../../assets/iconos/bike.png'
iconNota='../../../assets/iconos/invoice.png'
duda='../../../assets/imagenes/information.png'
actual=0
listaServicios=false
cantidadServicios
pedidos=0
todo=false
tipoDeEntrega
reparto
indicaciones=''
tipoEntrega(tipo){
this.tipoDeEntrega= tipo
}
constructor(){
}
medir(servicios:any){
this.cantidadServicios=servicios.length
servicios.forEach(element => {
if(element.elegido==true){
this.pedidos=this.pedidos+1
}
});
}
next(){
this.actual=this.actual+1
console.log("tipo ",this.tipoDeEntrega);
console.log("tipodd ",this.indicaciones);
switch(this.actual){
case 3: this.optenerTipoDetransporte()
break;
}
}
regresar(){
this.actual=this.actual-1
}
mostrarLista(){
console.log("bhh");
if(this.listaServicios==false)
this.listaServicios=true
else
this.listaServicios=false
}
addServicio(servicio){
servicio.elegido=true;
this.pedidos=this.pedidos+1
if(this.pedidos==this.cantidadServicios){
this.todo=true
}
}
removerServicio(servicio){
servicio.elegido=false
this.pedidos=this.pedidos-1
this.todo=false
}
mostrarReparto(id){
if(this.reparto==id){
this.reparto=''
}else
this.reparto=id
}
optenerTipoDetransporte(){
if(this.tipoDeEntrega=='tipo1'){
this.tipoDeEntrega='tipo1'
}
if(this.tipoDeEntrega=='tipo2'){
this.tipoDeEntrega='tipo2'
}
if(this.tipoDeEntrega=='tipo3'){
this.tipoDeEntrega='tipo3'
}
}
}<file_sep>import { Component, OnInit } from '@angular/core';
import { efectos } from './Efectos';
import { Router } from '@angular/router';
import { MenuController } from '@ionic/angular';
import { GlobalService} from '../../global.service';
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
@Component({
selector: 'app-inicio',
templateUrl: './inicio.page.html',
styleUrls: ['./inicio.page.scss'],
})
export class InicioPage implements OnInit {
efectos1=new efectos()
paginas=[
{
titulo:'Estado de pedido',
url:'/status',
icon: '../../../assets/iconos/bike.png'
}
,
{
titulo:'Guardados',
url:'/guardados',
icon: '../../../assets/iconos/bookmark-black-shape (1).png'
}
]
filtros=[
{
activo:false,
opcion:'opcion1'
},
{
activo:false,
opcion:'opcion2'
},
{
activo:false,
opcion:'opcion2'
}
]
lavandrias=[
{
id:1,
nombre:'lavandería 1',
imagene:'../../../assets/iconos/shutterstock_422824102.jpg',
precioporKilo:'40$'
},
{
id:2,
nombre:'lavandería 2',
imagene:'../../../assets/iconos/flaswash.png',
precioporKilo:'30$'
},
{
id:1,
nombre:'lavandería 3',
imagene:'../../../assets/iconos/700x420_lavanderia-autoservicio.jpg',
precioporKilo:'50$'
}
]
constructor(
private menu:MenuController,
private router:Router,
private global:GlobalService,
private notificacion:LocalNotifications,
) { }
ngOnInit() {
console.log("<ddvs fvf");
if(localStorage.getItem('secion')=='true'){
this.global.status_de_secion=true
}else{
this.global.status_de_secion=false
}
console.log("secion",this.global.status_de_secion);
document.getElementById('filtros').style.transition="0.5s"
this.efectos1.ocultarFiltros()
this.mensaje()
}
openFirst() {
this.menu.enable(true, 'first');
this.menu.open('first');
}
closeFirst(){
this.menu.enable(false, 'first');
this.menu.close('first');
}
cerraSecion(){
localStorage.setItem('secion','false')
this.global.status_de_secion=false
}
irALavanderia(){
this.router.navigate(['/lavanderia'])
}
/**--------------------notificaciones ------------------------------------------------------------------------------------------- */
mensaje(){
console.log('mensaje');
this.notificacion.schedule({
id: 1,
smallIcon: 'res://information',
text: 'mensaje',
icon: 'file://assets/iconos/flaswash.png',
});
}
}
<file_sep>import { MenuController } from '@ionic/angular';
import { Router } from '@angular/router';
import { OnInit } from '@angular/core';
export class efectos {
filActivo=false;
filtros=[
{
activo:false,
opcion:'opcion1'
},
{
activo:false,
opcion:'opcion2'
}
]
constructor(
){
}
recetearFiltros(){
this.filtros.forEach(element => {
element.activo=false;
});
}
ocultarFiltros(){
document.getElementById('filtros').style.marginTop="-100%"
//this.recetearFiltros()
this.filActivo=false
}
verfiltros(){
document.getElementById('filtros').style.marginTop="0"
this.filActivo=true
}
activaFiltro(filtro:any){
if(filtro.activo==false)
filtro.activo=true
else
filtro.activo=false
//console.log(this.filtros);
}
}<file_sep>import { Component, OnInit } from '@angular/core';
import { Efectos } from './Efectos';
import { Router } from '@angular/router';
@Component({
selector: 'app-status',
templateUrl: './status.page.html',
styleUrls: ['./status.page.scss'],
})
export class StatusPage implements OnInit {
efectos=new Efectos()
pedidos=[
{
id:1,
nombre:'<NAME>',
hora:'11:00 pm',
status: 'En lavanderia',
visto: false,
icon:this.efectos.enLavanderia,
servicios:[
'servicio 1',
'servicio 2',
'servicio 3',
'servicio 4',
'servicio 5'
]
},
{
id:2,
nombre:'<NAME>',
hora:'11:00 pm',
status: 'En entraga',
visto: false,
icon:this.efectos.moto1,
servicios:[
'servicio 1',
'servicio 2',
'servicio 3',
'servicio 4',
'servicio 5'
]
},
{
id:3,
nombre:'<NAME>',
hora:'11:00 pm',
status: 'En camino',
visto: false,
icon:this.efectos.moto0,
servicios:[
'servicio 1',
'servicio 2',
'servicio 3',
'servicio 4',
'servicio 5',
'servicio 6',
'servicio 7'
]
},
{
id:4,
nombre:'<NAME>',
hora:'11:00 pm',
status: 'A lavandería',
visto: false,
icon:this.efectos.moto2,
servicios:[
'servicio 1',
'servicio 2',
'servicio 3',
'servicio 4',
'servicio 5',
'servicio 6',
'servicio 7'
]
}
]
constructor(
private router:Router
) { }
ngOnInit() {
}
irAlavanderia(){
this.router.navigate(['/lavanderia'])
}
irAStatus(){
this.router.navigate(['/seguimiento'])
}
}
<file_sep>export class Efectos{
iconArrowDown='../../../assets/iconos/arrow-down-sign-to-navigate.png'
iconArrowUp='../../../assets/iconos/up-arrow.png'
enLavanderia='../../../assets/iconos/washing-machine2.png'
mapa='../../../assets/iconos/map.png'
tienda='../../../assets/iconos/store.png'
moto0='../../../assets/iconos/vespa4.png'
moto1='../../../assets/iconos/vespa3.png'
moto2='../../../assets/iconos/vespa2.png'
constructor(){
}
verInfo( pedido){
if(pedido.visto==false){
pedido.visto=true
this.mostrar(pedido.id)
}else{
pedido.visto=false
this.ocultar(pedido.id)
}
}
mostrar(id){
document.getElementById(id).style.transition='0.5s'
document.getElementById(id).style.height='400px'
}
ocultar(id){
document.getElementById(id).style.transition='0.5s'
document.getElementById(id).style.height='0px'
}
}
|
f224c5a314827e82fa4bf2e2135893a273afef20
|
[
"TypeScript"
] | 8
|
TypeScript
|
fabricio300/nuevoclienteFlash
|
aa8dbaa54abd7c25e3aaf0cd8589197d532cdb4f
|
09f46e7377dd3b3daa7a383fc7b2f5145a1925e7
|
refs/heads/master
|
<file_sep>class SessionsController < ApplicationController
def new
if current_user
# redirect to homepage if user is logged in
redirect_to user_path(current_user)
else
@user = User.new
end
end
def create
user = User.find_by email: params[:email]
if user && user.authenticate(params[:password])
# successful login
session[:user_id] = user.id
redirect_to user_path(user)
else
flash.notice = 'The email/password you\'ve entered is incorrect'
redirect_to welcome_path
end
end
def destroy
session[:user_id] = nil
redirect_to welcome_path
end
end
<file_sep>class UsersController < ApplicationController
before_action :authorize, except: :create
def index
@users = User.all.order(:fname)
@users_score = @users.map do |user|
user.score
end.reduce(:+)
@users_likes = @users.map do |user|
user.likes
end.reduce(:+)
end
def create
@user = User.new(user_params)
if @user.save
session[:user_id] = @user.id
redirect_to user_path(@user)
else
render "sessions/new"
end
end
def show
@user = User.find(params[:id])
if is_current_user?(@user)
redirect_to home_path
else
set_play_and_work_tasks
end
end
def home
@user = current_user
set_play_and_work_tasks
end
private
def user_params
params.require(:user).permit(
:fname,
:lname,
:email,
:password,
:password_confirmation
)
end
def set_play_and_work_tasks
@play_tasks = @user.tasks.where(category: "play").order(:completed, :description)
@work_tasks = @user.tasks.where(category: "work").order(:completed, :description)
end
end
<file_sep>class CreateTasks < ActiveRecord::Migration
def change
create_table :tasks do |t|
t.string :description
t.string :type
t.integer :points
t.boolean :completed, default: false
t.references :user
t.timestamps
end
end
end
<file_sep>class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
end
helper_method :current_user
def authorize
if !current_user
flash.notice = "Please log in first."
redirect_to welcome_path
end
end
helper_method :authorize
def is_current_user?(user)
current_user.id == user.id
end
helper_method :is_current_user?
end
<file_sep>class TagsController < ApplicationController
before_action :authorize
def index
clear_empty_tags
@tags = Tag.all
end
def show
@tag = Tag.find(params[:id])
end
def user_index
@user = User.find(params[:id])
@user_tags = @user.tasks.collect do |task|
task.tags
end.flatten
end
private
def clear_empty_tags
@tags = Tag.all
@tags.each do |tag|
tag.delete if tag.tasks.empty?
end
end
end
<file_sep># This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
anthony = User.find(1)
anthony.tasks.create(description: "Clean dishes", category: "work", points: -1)
anthony.tasks.create(description: "Wash hair", category: "work", points: -1)
anthony.tasks.create(description: "Do project", category: "work", points: -1)
anthony.tasks.create(description: "Buy groceries", category: "work", points: -1)
anthony.tasks.create(description: "Watch movie", category: "play", points: 1)
anthony.tasks.create(description: "Read book", category: "play", points: 1)
anthony.tasks.create(description: "Go drink", category: "play", points: 1)
anthony.tasks.create(description: "Shopping", category: "play", points: 1)
<file_sep># Work and Play App
## Link to App hosted on [Heroku](https://limitless-eyrie-7862.herokuapp.com/welcome)
## Link to Wireframe hosted on [Google Drive](https://drive.google.com/folderview?id=0B5c48vRzSDJWSEdOVXRmYTEydnc&usp=sharing)
## User Stories
#### Accounts
* As a user, I want to be able to easily create a new account.
* As a user, I want to be able to easily login and out of my account.
#### Personal User Functionality
* As a user, I want to create new tasks in seconds.
* As a user, I want to be able to mark off my tasks as complete with the click of a button.
* As a user, I want to be able to edit my task, and change them from "Work" to "Play" and vice-versa.
* As a user, I want to be able to delete my tasks without hassles. I don't want to encounter multiple prompts that ask me, "Are you sure?"
* As a user, I want to have an overview of my work-play balance that I can understand and analyze.
* As a user, I want to use tags for my tasks so that I can easily search for them.
* As a user, I want to be able to view all my tags.
* As a user, I want to be able to view all my tasks that belong to a particular tag.
#### User to User Functionality
* As a user, I want to be able to view all user's tags, as well as seeing all tasks that belong to that tag.
* As a user, I want to be able to view other user's tasks list and feel connected to them.
* As a user, I want to be able to "Like" other people's tasks, and motivate them.
* As a user, I want to have an overview of everyone's work-play balance.
## Models
A user can have many tasks (one-to-many relationship). A task can have many tags, and a tag can belong to many tasks (many-to-many relationship). A task can have many likes (one-to-many relationship).
#### Users
* first name
* last name
* email address
* password
* work-play score
#### Tasks
* description
* type of tasks (work or fun)
* points (how many positive or negative points does this task give)
#### Tags
* Content
#### Likes
## Technologies Used
Ruby on Rails
<file_sep>class TasksController < ApplicationController
before_action :authorize
def index
@play_tasks = Task.all.where(category: "play")
@work_tasks = Task.all.where(category: "work")
end
def create
@user = User.find(params[:user_id])
@task = @user.tasks.create(task_params)
# "play" = +1, "work" = -1
@task.points = @task.category == "play" ? 1 : -1
@task.save
redirect_to user_path(@user)
end
def edit
@task = Task.find(params[:id])
end
def update
@task = Task.find(params[:id])
if @task.update(task_params)
@task.points = @task.category == "play" ? 1 : -1
@task.save
flash.notice = "task updated"
redirect_to user_path(@task.user)
end
end
def complete
@task = Task.find(params[:id])
@task.completed = true
@task.save
flash.notice = "Task marked as completed"
redirect_to user_path(@task.user)
end
def destroy
@task = Task.find(params[:id])
@user = User.find(params[:user_id])
@task.destroy
flash.notice = "\'#{@task.description} \' deleted."
redirect_to user_path(@user)
end
def like
@task = Task.find(params[:id])
@task.liked_by current_user
redirect_to :back
end
private
def task_params
params.require(:task).permit(
:description,
:category,
:points,
:completed,
:tag_list
)
end
end
<file_sep>class User < ActiveRecord::Base
has_secure_password
validates :fname, :presence => { message: "first name is missing" }
validates :lname, :presence => { message: "last name is missing" }
validates :email, :presence => { message: "email is missing" },
:uniqueness => { message: "email is already used" }
validates :password, :length => { in: 6..20, message: "password has to be between 6 and 20 characters" },
:presence => { message: "password can't be blank" }
has_many :tasks
has_many :likes, through: :tasks
def score
score = 0
if tasks.size > 0
tasks.each do |task|
score += task.points.to_i
end
end
return score
end
def likes
total_likes = 0
tasks.each do |task|
total_likes += task.votes_for.size
end
return total_likes
end
end
|
640d7c9ec1823fa5216e4b54fc426d0068d0498f
|
[
"Markdown",
"Ruby"
] | 9
|
Ruby
|
newyork-anthonyng/Work_And_Play
|
ae198932884e2d669b968456eb641ddbf26c50a8
|
244c249bf0df00180d4d28ef313942454f4d9d52
|
refs/heads/master
|
<repo_name>nesciens/dutch-events-calendar<file_sep>/dutch-events-calendar.php
<?php
/*
Plugin Name: Dutch Events Calendar
Description: Alternative Dutch translation and Dutch localisation for Modern Tribe's The Events Calendar and The Events Calendar PRO, versions 3.0.3 and 3.0.5 respectively.
Version: 0.0.1
Author: <NAME>
*/
function nlec_init() {
load_plugin_textdomain( 'tribe-events-calendar', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
load_plugin_textdomain( 'tribe-events-calendar-pro', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
}
add_action( 'init', 'nlec_init', 8 );
if (false):
function nlec_add_domain( $translation, $text, $domain ) {
if ( $domain == 'tribe-events-calendar-pro' ) {
return '[' . $translation . ']';
} else {
return $translation;
}
}
add_filter( 'gettext', 'nlec_add_domain', 20, 3);
endif;
|
c3bd8ff4c6a7cc0c7f6f8beec327b433667556a9
|
[
"PHP"
] | 1
|
PHP
|
nesciens/dutch-events-calendar
|
23adb8659df675db806700988e1af77bb7d085bf
|
e3a4a87696eb918d0c2cbd48ee663f1c5f15918f
|
refs/heads/master
|
<file_sep>import Vue from 'vue'
import App from './App.vue'
import CountrySelector from 'vue-country-selector'
import 'vue-country-selector/dist/countryselector.css'
Vue.use(CountrySelector)
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')
|
ad9d8fd800880bfaae85b2c737f91c23cc9a9828
|
[
"JavaScript"
] | 1
|
JavaScript
|
BeerHope/multiple_lang_coutry_selector
|
f35d4e55bcb51fa914433bd5930d1cc4843157af
|
ef58565109a319297a664dd295279a06502c2322
|
refs/heads/master
|
<repo_name>ashfipathan/Soar<file_sep>/android/app/src/main/java/com/example/soar_company/soar/RideFilters.java
package com.example.soar_company.soar;
import com.google.android.gms.location.places.Place;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class RideFilters {
public static ArrayList<Ride> allRides;
public static ArrayList<Ride> newRides;
private JSONObject rawRides;
public RideFilters(JSONObject rawRides)
{
this.rawRides = rawRides;
allRides = new ArrayList<>();
newRides = new ArrayList<>();
try {
convertToRideObjects();
}catch (JSONException e)
{
}
}
private void convertToRideObjects() throws JSONException
{
JSONArray availiableRides = rawRides.getJSONArray("availableRides");
for (int i = 0; i < availiableRides.length();i++)
{
JSONObject rideInfo = availiableRides.getJSONObject(i);
String departureLocation = rideInfo.getString("departureLocation");
String[] dlInfo = departureLocation.split(";");
BasicPlace dlPlace = new BasicPlace(dlInfo[0],
Double.parseDouble(dlInfo[1]),Double.parseDouble(dlInfo[2]));
String arrivalLocation = rideInfo.getString("arrivalLocation");
String[] alInfo = arrivalLocation.split(";");
BasicPlace alPlace = new BasicPlace(alInfo[0],
Double.parseDouble(alInfo[1]),Double.parseDouble(alInfo[2]));
String seatsLeft = rideInfo.getString("seatsLeft");
String price = rideInfo.getString("price");
String seatsTotal = rideInfo.getString("seatsTotal");
String rideDetails = rideInfo.getString("rideDetails");
String ID = rideInfo.getString("id");
String departureTime = rideInfo.getString("departureTime");
User passengers[] = new User[10];
for(int j = 0; j < 10; j++)
{
passengers[j]= new User(rideInfo.getString("passengerID"+(j+1)));
}
Ride newRide = new Ride(ID, dlPlace, alPlace, Integer.parseInt(seatsLeft),
Integer.parseInt(seatsTotal), Double.parseDouble(price), passengers,
rideDetails, departureTime);
allRides.add(newRide);
}
newRides.addAll(allRides);
}
}
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/BasicPlace.java
package com.example.soar_company.soar;
import com.google.android.gms.maps.model.LatLng;
public class BasicPlace {
public String address;
public LatLng coordinates;
public BasicPlace(String address, double latitude,
double longitude)
{
this.address = address;
coordinates = new LatLng(latitude,longitude);
}
}
<file_sep>/change_account_settings.php
<?php
include "connect.php";
session_start();
$response = array();
$id = $_POST['userID'];
$email = $_POST['email'];
$oldEmail = $_POST['oldEmail'];
$phone = $_POST['phoneNumber'];
$password = $_POST['password'];
// Security measures in order to prevent SQL injections
$email = stripslashes(strip_tags($email));
$password = stripslashes(strip_tags($password));
$email = mysqli_real_escape_string($server, $email);
$password = mysqli_real_escape_string($server, $password);
$hash = md5(rand(0,1000));
$password = md5($password);
$sql1 = "UPDATE user_info
SET email = '$email',
phone_number = $phone,
password = <PASSWORD>'
WHERE id = $id;";
$sql2 = "SELECT * FROM user_info WHERE email = '$email'";
$emailCheck = mysqli_query($server, $sql2);
if ((mysqli_num_rows($emailCheck) == 0) || ($oldEmail == $email))
{
$result = mysqli_query($server, $sql1);
if ($result)
{
$response['success'] = 1;
$response['message'] = "Account settings changed successfully.";
echo json_encode($response);
}
else
{
$response['success'] = 0;
$response['message'] = "There was an error when updating account settings.";
echo json_encode($response);
}
}
else
{
$response['success'] = 0;
$response['message'] = "Email is already in use.";
echo json_encode($response);
}
// Wrap up and close connection
mysqli_close($server);
?>
<file_sep>/change_ride_info.php
<?php
include "connect.php";
session_start();
$id = $_POST['rideID'];
$departure_location = $_POST['departureLocation'];
$departure_time = $_POST['departureTime'];
$arrival_location = $_POST['arrivalLocation'];
$price = $_POST['price'];
$seats_left = $_POST['seatsLeft'];
if (/* there are no passengers */)
{
// Security measures in order to prevent SQL injections
$departure_location = stripslashes(strip_tags($departure_location));
$departure_time = stripslashes(strip_tags($departure_time));
$arrival_location = stripslashes(strip_tags($arrival_location));
$price = stripslashes(strip_tags($price));
$seats_left = stripslashes(strip_tags($seats_left));
$departure_location = mysqli_real_escape_string($server, $departure_location);
$departure_time = mysqli_real_escape_string($server, $departure_time);
$arrival_location = mysqli_real_escape_string($server, $arrival_location);
$price = mysqli_real_escape_string($server, $price);
$seats_left = mysqli_real_escape_string($server, $seats_left);
$sql = "UPDATE `ride_info`
SET 'departure_location' = $departure_location,
'departire_time' = $departure_time,
'arrival_location' = $arrival_location,
'price' = $price,
'seats_left' $seats_left'
WHERE 'id' = $id;";
mysqli_query($server, $sql);
// Wrap up and close connection
mysqli_close($server);
}
else
{
echo "There is a passenger! You cannot change this ride.";
}
?>
<file_sep>/insert_user.php
<?php
include "connect.php";
session_start();
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$response = array();
$likes = $_POST['likes'];
$dislikes = $_POST['dislikes'];
$rating = $_POST['rating'];
$first_name = $_POST['firstName'];
$last_name = $_POST['lastName'];
$email = $_POST['email'];
$password1 = $_POST['<PASSWORD>'];
$password2 = $_POST['<PASSWORD>2'];
$phone = $_POST['phoneNumber'];
$validDrivers = $_POST['validDriver'];
$checkEmail = "SELECT * FROM user_info WHERE email= '$email'";
$result = mysqli_query($server, $checkEmail);
if (mysqli_num_rows($result) == 0)
{
if ($password1 == $password2)
{
// Security measures in order to prevent SQL injections
$email = stripslashes(strip_tags($email));
$password = <PASSWORD>(strip_tags($password1));
$first_name = stripslashes(strip_tags($first_name));
$last_name = stripslashes(strip_tags($last_name));
$email = mysqli_real_escape_string($server, $email);
$password = mysqli_real_escape_string($server, $password);
$first_name = mysqli_real_escape_string($server, $first_name);
$last_name = mysqli_real_escape_string($server, $last_name);
// Generates a random 32 character hash
$hash = md5(rand(0,1000));
$password = md5($<PASSWORD>);
$sql = "INSERT INTO `user_info` (`id`, `likes`, `dislikes`, `rating`, `email`,
`password`, `first_name`, `last_name`, `valid_driver`, `phone_number`)
VALUES (NULL, '$likes', '$dislikes', '$rating', '$email', '$password',
'$first_name', '$last_name', '$validDrivers', '$phone');";
$success = mysqli_query($server, $sql);
// Success
if ($success)
{
$response["success"] = 1;
$response["message"] = "User has been successfully added.";
// echo JSON response
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "An error occured when creating user.";
// echo JSON response
echo json_encode($response);
}
// Wrap up and close connection
mysqli_close($server);
}
else
{
echo "Passwords do not match. Please try again!";
}
}
else
{
// E-mail in usage
$response["success"] = 0;
$response["message"] = "E-mail already in use.";
// echo JSON response
echo json_encode($response);
}
}
?>
<file_sep>/cancel_ride.php
<?php
session_start();
include "connect.php";
$id = $_POST['id'];
$response = array();
$sql1 = "SELECT * FROM ride_info WHERE ride_info.id = $id";
$sql2 = "UPDATE ride_info SET valid_booking = '0' WHERE ride_info.id = $id";
$result = mysqli_query($server, $sql2);
$rs = mysqli_fetch_array(mysqli_query($server, $sql1));
if ($result && ($rs['seats_left'] == 0))
{
$response["success"] = 1;
$response["message"] = "Successfully canceled ride";
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "Error when cancelling ride";
echo json_encode($response);
}
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/ForgotPasswordActivity.java
package com.example.soar_company.soar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class ForgotPasswordActivity extends AppCompatActivity {
private String email;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_forgot_password);
}
public void sendLinkClicked(View view)
{
EditText emailEditText = findViewById(R.id.emailEditText);
String email = emailEditText.getText().toString();
// MISSING: send link to email
}
}
<file_sep>/create_ride.php
<?php
include "connect.php";
session_start();
$response = array();
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$departure_location = $_POST['departureLocation'];
$time = date("m/d/Y H:i", strtotime($_POST['departureTime']));
$details = $_POST['details'];
$arrival_location = $_POST['arrivalLocation'];
$price = $_POST['price'];
$seats_left = $_POST['seatsLeft'];
$seats_total = $_POST['seatsTotal'];
$passenger_id1 = $_POST ['passengerID1'];
$passenger_id2 = $_POST ['passengerID2'];
$passenger_id3 = $_POST ['passengerID3'];
$passenger_id4 = $_POST ['passengerID4'];
$passenger_id5 = $_POST ['passengerID5'];
$passenger_id6 = $_POST ['passengerID6'];
$passenger_id7 = $_POST ['passengerID7'];
$passenger_id8 = $_POST ['passengerID8'];
$passenger_id9 = $_POST ['passengerID9'];
$passenger_id10 = $_POST ['passengerID10'];
$driver_id = $_POST['driverID'];
$sql = "INSERT INTO ride_info (id, departure_location, departure_time,
ride_details, arrival_location, price, seats_left, seats_total, passenger_1, passenger_2,
passenger_3, passenger_4, passenger_5, passenger_6, passenger_7, passenger_8,
passenger_9, passenger_10, driver, valid_booking) VALUES (NULL, '$departure_location', '$time',
'$details', '$arrival_location', '$price', '$seats_left', '$seats_total', $passenger_id1,
$passenger_id2, $passenger_id3, $passenger_id4, $passenger_id5,
$passenger_id6, $passenger_id7, $passenger_id8, $passenger_id9,
$passenger_id10, '$driver_id', '1')";
$result = mysqli_query($server, $sql);
// Checks if the ride was created successfuly
if ($result)
{
$response["success"] = 1;
$response["message"] = "Ride has been successfuly added.";
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "An error occured when trying to create a new ride";
echo json_encode($response);
}
}
else {
$response["success"] = 0;
$response["messsage"] = "There was an error when connecting to the server.
Please try again later!";
echo json_encode($response);
}
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/User.java
package com.example.soar_company.soar;
public class User {
public String ID;
public String firstName;
public String lastName;
public String email;
public String password;
public String phoneNumber;
public int likes;
public int dislikes;
public int rating;
public boolean validDriver;
public User(String ID, String firstName, String lastName, String email, String password,
String phoneNumber)
{
this.ID = ID;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.password = <PASSWORD>;
this.phoneNumber = phoneNumber;
}
public User(String firstName, String lastName, String email, String password)
{
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.password = <PASSWORD>;
}
public User(String email, String password)
{
this.email = email;
this.password = <PASSWORD>;
}
public User(String ID)
{
this.ID = ID;
}
}
<file_sep>/edit_ride.php
<?php
session_start();
include "connect.php";
$id = $_POST['id'];
$time = $_POST['time'];
$details = $_POST['details'];
$price = $_POST['price'];
$seatsLeft = $_POST['seatsLeft'];
$response = array();
$sql1 = "SELECT * FROM ride_info WHERE ride_info.id = $id";
$sql2 = "UPDATE ride_info SET departure_time = '$time', ride_details = '$details',
price = $price, seats_left = $seatsLeft WHERE id = $id;";
$result1 = mysqli_query($server, $sql1);
$row = mysqli_fetch_array($result1);
if ($row['seats_left'] == $row['seats_total'])
{
$result2 = mysqli_query($server, $sql2);
if ($result2)
{
$response["success"] = 1;
$response["message"] = "Ride has been updated.";
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "There was an error when updating the ride";
echo json_encode($response);
}
}
else
{
$response["success"] = 0;
$response["message"] = "Someone already accepted the ride!";
echo json_encode($response);
}
?>
<file_sep>/README.md
# Soar
Hello world
<file_sep>/createTables.php
<?php
include "connect.php";
$sql1 = "CREATE TABLE user_info (
id INT(16) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
likes INT(10),
dislikes INT(10),
rating INT(10),
email VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
valid_driver VARCHAR(1),
phone_number VARCHAR(10) NOT NULL
)";
/*
$sql1 = "CREATE TABLE driver_info (
id INT(16) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
likes INT(10) NOT NULL,
dislikes INT(10) NOT NULL,
rating INT(10) NOT NULL,
email VARCHAR(50) NOT NULL,
password VARCHAR(50) <PASSWORD>,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
valid_driver VARCHAR(1) NOT NULL,
phone_number VARCHAR(10) NOT NULL
)";
$sql2 = "CREATE TABLE rider_info (
id INT(16) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(50) NOT NULL,
password VARCHAR(<PASSWORD>,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
phone_number VARCHAR(10) NOT NULL
)";
*/
$sql2 = "CREATE TABLE ride_info (
id INT(16) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
departure_location VARCHAR(100) NOT NULL,
departure_time DATETIME NOT NULL,
ride_details VARCHAR(300),
arrival_location VARCHAR(100) NOT NULL,
price DECIMAL(3) NOT NULL,
seats_left INT(2) NOT NULL,
seats_total INT(2) NOT NULL,
passenger_1 INT(16) NULL,
passenger_2 INT(16) NULL,
passenger_3 INT(16) NULL,
passenger_4 INT(16) NULL,
passenger_5 INT(16) NULL,
passenger_6 INT(16) NULL,
passenger_7 INT(16) NULL,
passenger_8 INT(16) NULL,
passenger_9 INT(16) NULL,
passenger_10 INT(16) NULL,
driver INT(16) NOT NULL,
valid_booking VARCHAR(1)
)";
if (mysqli_query($server, $sql1))
{
echo "Table driver_info created successfully. </br>";
}
else
{
echo "Error when creating driver_info table: " . mysqli_error($server) . "</br>";
}
if (mysqli_query($server, $sql2))
{
echo "Table rider_info created successfully. </br>";
}
else
{
echo "Error when creating rider_info table: " . mysqli_error($server) . "</br>";
}
/*
if (mysqli_query($server, $sql3))
{
echo "Table ride_info created successfully. </br>";
}
else
{
echo "Error when creating ride_info table: " . mysqli_error($server) . "</br>";
} */
// Wrap up and close connection
mysqli_close($server);
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/DataBaseAccess.java
package com.example.soar_company.soar;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
/**
* Partially created by ProgrammingKnowledge on 1/5/2016.
*/
public class DataBaseAccess extends AsyncTask<String,Void,String> {
private Context context;
private boolean isSuccess;
private String type;
UserLocalStorage userLocalStorage;
DataBaseAccess (Context context) {
this.context = context;
isSuccess = false;
userLocalStorage = new UserLocalStorage(context);
}
@Override
protected String doInBackground(String... params) {
type = params[0];
try{
if(type.equals(MainActivity.SIGN_UP_TYPE)) {
String signUpUrl = "http://condemned-discrepan.000webhostapp.com/insert_user.php";
String email = params[1];
String firstName = params[2];
String lastName = params[3];
String phoneNumber = params[4];
String password = params[5];
String confirmPassword = params[6];
String validDriver = params[7];
// Include user entered information in postData
String postData = URLEncoder.encode("email","UTF-8")+"="+URLEncoder.encode(email,"UTF-8")+"&"
+URLEncoder.encode("firstName","UTF-8")+"="+URLEncoder.encode(firstName,"UTF-8")+"&"
+URLEncoder.encode("lastName","UTF-8")+"="+URLEncoder.encode(lastName,"UTF-8")+"&"
+URLEncoder.encode("phoneNumber","UTF-8")+"="+URLEncoder.encode(phoneNumber,"UTF-8")+"&"
+URLEncoder.encode("password1","UTF-8")+"="+URLEncoder.encode(password,"UTF-8")+"&"
+URLEncoder.encode("password2","UTF-8")+"="+URLEncoder.encode(confirmPassword,"UTF-8")+"&"
+URLEncoder.encode("validDriver","UTF-8")+"="+URLEncoder.encode(validDriver,"UTF-8")+"&"
+URLEncoder.encode("likes","UTF-8")+"="+URLEncoder.encode("0","UTF-8")+"&"
+URLEncoder.encode("dislikes","UTF-8")+"="+URLEncoder.encode("0","UTF-8")+"&"
+URLEncoder.encode("rating","UTF-8")+"="+URLEncoder.encode("0","UTF-8");
return getDBResponse(signUpUrl, postData);
}
else if(type.equals(MainActivity.LOGIN_TYPE))
{
String loginUrl = "http://condemned-discrepan.000webhostapp.com/sign_in.php";
String email = params[1];
String password = params[2];
// Include user entered information in postData
String postData = URLEncoder.encode("username","UTF-8")+"="+URLEncoder.encode(email,"UTF-8")+"&"
+URLEncoder.encode("password","UTF-8")+"="+URLEncoder.encode(password,"<PASSWORD>");
// Extract response information in a readable format
String result = getDBResponse(loginUrl,postData);
JSONObject jsonObject = new JSONObject(result);
String successIdentifier = jsonObject.getString("success");
// Check if login was successful based on the response from database
isSuccess = successIdentifier.equals("1");
if(isSuccess)
{
// Store current logged in user data
User user = new User(email,password);
userLocalStorage.setLoggedInUser(true);
userLocalStorage.storeUserData(user);
}
return result;
}
else if(type.equals(MainActivity.CREATE_RIDE_TYPE))
{
String createRideUrl = "http://condemned-discrepan.000webhostapp.com/create_ride.php";
String driver_id = params[1];
String time = params[2];
String seatsAvailiable = params[3];
String price = params[4];
String details = params[5];
String placeAL_ID = params[6];
String placeDL_ID = params[7];
// Include user entered information in postData
String postData = URLEncoder.encode("departureLocation","UTF-8")+"="+URLEncoder.encode(placeDL_ID,"UTF-8")+"&"
+URLEncoder.encode("departureTime","UTF-8")+"="+URLEncoder.encode(time,"UTF-8")+"&"
+URLEncoder.encode("details","UTF-8")+"="+URLEncoder.encode(details,"UTF-8")+"&"
+URLEncoder.encode("arrivalLocation","UTF-8")+"="+URLEncoder.encode(placeAL_ID,"UTF-8")+"&"
+URLEncoder.encode("price","UTF-8")+"="+URLEncoder.encode(price,"UTF-8")+"&"
+URLEncoder.encode("seatsTotal","UTF-8")+"="+URLEncoder.encode(seatsAvailiable,"UTF-8")+"&"
+URLEncoder.encode("seatsLeft","UTF-8")+"="+URLEncoder.encode(seatsAvailiable,"UTF-8")+"&"
+URLEncoder.encode("driverID","UTF-8")+"="+URLEncoder.encode(driver_id,"UTF-8")+"&"
+URLEncoder.encode("passenger_id1","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id2","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id3","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id4","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id5","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id6","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id7","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id8","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id9","UTF-8")+"="+URLEncoder.encode("e","UTF-8")+"&"
+URLEncoder.encode("passenger_id10","UTF-8")+"="+URLEncoder.encode("e","UTF-8");
// Extract response information in a readable format
String result = getDBResponse(createRideUrl,postData);
JSONObject jsonObject = new JSONObject(result);
String successIdentifier = jsonObject.getString("success");
// Check if login was successful based on the response from database
isSuccess = successIdentifier.equals("1");
return result;
}
else if(type.equals(MainActivity.GET_RIDES))
{
String getRidesUrl = "http://condemned-discrepan.000webhostapp.com/list_rides.php";
String time = params[1];
String seatsAvailiable = params[2];
// Include user entered information in postData
String postData = URLEncoder.encode("departureTime","UTF-8")+"="+URLEncoder.encode(time,"UTF-8")+"&"
+URLEncoder.encode("seatsLeft","UTF-8")+"="+URLEncoder.encode(seatsAvailiable,"UTF-8");
// Extract response information in a readable format
String result = getDBResponse(getRidesUrl,postData);
JSONObject jsonObject = new JSONObject(result);
String successIdentifier = jsonObject.getString("success");
// Check if login was successful based on the response from database
isSuccess = successIdentifier.equals("1");
if(isSuccess)
{
MainActivity.rideFilters = new RideFilters(jsonObject);
}
return result;
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
private String getDBResponse(String requiredUrl, String postData) throws IOException
{
URL url = new URL(requiredUrl);
HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
OutputStream outputStream = httpURLConnection.getOutputStream();
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream, "UTF-8"));
bufferedWriter.write(postData);
bufferedWriter.flush();
bufferedWriter.close();
outputStream.close();
InputStream inputStream = httpURLConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,"iso-8859-1"));
String result="";
String line="";
while((line = bufferedReader.readLine())!= null) {
result += line;
}
bufferedReader.close();
inputStream.close();
httpURLConnection.disconnect();
return result;
}
@Override
protected void onPreExecute() {
}
@Override
protected void onPostExecute(String result) {
// If the user tried logging in and was successful
if(type.equals(MainActivity.LOGIN_TYPE) && isSuccess)
{
context.startActivity(new Intent(context, InitialChoicesActivity.class));
}
isSuccess = false;
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
}
}<file_sep>/list_rides.php
<?php
session_start();
include "connect.php";
$response = array();
$sql = "SELECT * FROM ride_info WHERE valid_booking = 1";
$result = mysqli_query($server, $sql);
if (mysqli_num_rows($result) > 0)
{
$response['availableRides'] = array();
while ($row = mysqli_fetch_array($result))
{
$ride = array();
$ride['id'] = $row['id'];
$ride['departureLocation'] = $row['departure_location'];
$ride['departureTime'] = $row['departure_time'];
$ride['rideDetails'] = $row['ride_details'];
$ride['arrivalLocation'] = $row['arrival_location'];
$ride['price'] = $row['price'];
$ride['seatsLeft'] = $row['seats_left'];
$ride['seatsTotal'] = $row['seats_total'];
$ride['passengerID1'] = $row['passenger_1'];
$ride['passengerID2'] = $row['passenger_2'];
$ride['passengerID3'] = $row['passenger_3'];
$ride['passengerID4'] = $row['passenger_4'];
$ride['passengerID5'] = $row['passenger_5'];
$ride['passengerID6'] = $row['passenger_6'];
$ride['passengerID7'] = $row['passenger_7'];
$ride['passengerID8'] = $row['passenger_8'];
$ride['passengerID9'] = $row['passenger_9'];
$ride['passengerID10'] = $row['passenger_10'];
$ride['driverID'] = $row['driver'];
// Push single ride information into final response array
array_push($response['availableRides'], $ride);
}
$response['success'] = 1;
$response['message'] = "All available listings have been posted.";
echo json_encode($response);
}
else
{
$response['success'] = 0;
$response['message'] = "No Rides found";
echo json_encode($response);
}
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/CreateRideActivity.java
package com.example.soar_company.soar;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.util.Log;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TimePicker;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.ui.PlaceAutocomplete;
import com.google.android.gms.location.places.ui.PlaceSelectionListener;
import com.google.android.gms.location.places.ui.SupportPlaceAutocompleteFragment;
import java.sql.Time;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
public class CreateRideActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener, View.OnClickListener {
private SupportPlaceAutocompleteFragment autocompleteFragmentDL;
private SupportPlaceAutocompleteFragment autocompleteFragmentAL;
DatePickerDialog.OnDateSetListener date;
TimePickerDialog.OnTimeSetListener time;
EditText dateEditText;
EditText timeEditText;
Calendar myCalendar;
Place place_al;
Place place_dl;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_create_ride);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
// Log.v("HAHA",((TextView)findViewById(R.id.priceTextView)).getText().toString());
setUpComponents();
((EditText)findViewById(R.id.timeEditText)).setText("22:33:44");
}
private void setUpComponents()
{
setUpAutocompleteDL();
setUpAutocompleteAL();
setUpDatePicker();
setUpTimePicker();
}
private void setUpDatePicker()
{
myCalendar = Calendar.getInstance();
dateEditText = (EditText) findViewById(R.id.dateEditText);
date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
myCalendar.set(Calendar.YEAR, year);
myCalendar.set(Calendar.MONTH, monthOfYear);
myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
// Update Label
String myFormat = "MM/dd/yy";
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.CANADA);
dateEditText.setText(sdf.format(myCalendar.getTime()));
}
};
dateEditText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
new DatePickerDialog(CreateRideActivity.this, date, myCalendar
.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
}
private void setUpTimePicker()
{
myCalendar = Calendar.getInstance();
timeEditText = (EditText) findViewById(R.id.timeEditText);
time = new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
// TODO Auto-generated method stub
myCalendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
myCalendar.set(Calendar.MINUTE, minute);
// Update Label
String myFormat = "hh:mm";
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.CANADA);
timeEditText.setText(sdf.format(myCalendar.getTime()));
}
};
timeEditText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
new TimePickerDialog(CreateRideActivity.this, time, myCalendar
.get(Calendar.HOUR_OF_DAY), myCalendar.get(Calendar.MINUTE),
false).show();
}
});
}
private void setUpAutocompleteDL()
{
autocompleteFragmentDL = (SupportPlaceAutocompleteFragment)
getSupportFragmentManager().findFragmentById(R.id.place_autocomplete_fragment_dl);
AutocompleteFilter filter = new AutocompleteFilter.Builder()
.setCountry("CA")
.setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS)
.build();
autocompleteFragmentDL.setFilter(filter);
autocompleteFragmentDL.setHint("Departing Location");
autocompleteFragmentDL.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
Log.v("HAHA","gotemmm");
place_dl = place;
}
@Override
public void onError(Status status) {
}
});
}
private void setUpAutocompleteAL()
{
autocompleteFragmentAL = (SupportPlaceAutocompleteFragment)
getSupportFragmentManager().findFragmentById(R.id.place_autocomplete_fragment_al);
AutocompleteFilter filter = new AutocompleteFilter.Builder()
.setCountry("CA")
.setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS)
.build();
autocompleteFragmentAL.setFilter(filter);
autocompleteFragmentAL.setHint("Arriving Location");
autocompleteFragmentAL.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
Log.v("HAHA","gotemmm");
place_al = place;
}
@Override
public void onError(Status status) {
}
});
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.create_ride, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
public void createRideClicked(View view) {
Log.d("HAHA", "clicked");
EditText dateEditText = findViewById(R.id.dateEditText);
EditText timeEditText = findViewById(R.id.timeEditText);
EditText seatsAvailiableEditText = findViewById(R.id.seatsAvailiableEditText);
EditText priceEditText = findViewById(R.id.priceEditText);
EditText detailsEditText = findViewById(R.id.detailsEditText);
String oldDate = dateEditText.getText().toString();
String oldTime = timeEditText.getText().toString();
String newTime = oldDate + " " + oldTime;
String finalTimeFormatted = "";
try {
// *** note that it's "yyyy-MM-dd hh:mm:ss" not "yyyy-mm-dd hh:mm:ss"
SimpleDateFormat oldTimeFormat = new SimpleDateFormat("MM/dd/yy hh:mm:ss");
Date newTimeFormatted = oldTimeFormat.parse(newTime);
// *** same for the format String below
SimpleDateFormat newTimeFormat = new SimpleDateFormat("yy-MM-dd hh:mm:ss");
finalTimeFormatted = newTimeFormat.format(newTimeFormatted);
}catch (ParseException e)
{
}
String seatsAvailiable = seatsAvailiableEditText.getText().toString();
String price = priceEditText.getText().toString();
String details = detailsEditText.getText().toString();
String placeAL_ID = place_al.getAddress() + ";" + place_al.getLatLng().latitude + ";" + place_al.getLatLng().longitude;
String placeDL_ID = place_dl.getAddress() + ";" + place_dl.getLatLng().latitude + ";" + place_dl.getLatLng().longitude;
UserLocalStorage userLocalStorage = new UserLocalStorage(CreateRideActivity.this);
String driverID = userLocalStorage.getLoggedInUser().ID;
DataBaseAccess backgroundWorker = new DataBaseAccess(getApplicationContext());
// Check if the email and password exists in the database
backgroundWorker.execute(MainActivity.CREATE_RIDE_TYPE, driverID, finalTimeFormatted, seatsAvailiable, price,
details, placeAL_ID, placeDL_ID);
}
@Override
public void onClick(View v) {
Log.d("HAHA", "clickedeee");
}
}
<file_sep>/dbh.php.inc
CREATE TABLE driver_info (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
rating DECIMAL(2) NOT NULL,
email varchar(50) NOT NULL,
password varchar(50) NOT NULL,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
valid_license varchar(1) NOT NULL,
expiry_date varchar(4) NOT NULL,
phone_number int(10) NOT NULL
)
CREATE TABLE driver_info (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
rating DECIMAL(2) NOT NULL,
email varchar(50) NOT NULL,
password varchar(50) NOT NULL,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
phone_number int(10) NOT NULL
)
CREATE TABLE ride_info (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
departure_location varchar(100) NOT NULL,
departure_time varchar(16) NOT NULL,
arrival_location varchar(100) NOT NULL,
price_person DECIMAL(3) NOT NULL,
seats_left INT(2) NOT NULL,
passenger_1 INT(6) NOT NULL,
passenger_2 INT(6) NOT NULL,
passenger_3 INT(6) NOT NULL,
passenger_4 INT(6) NOT NULL,
passenger_5 INT(6) NOT NULL,
passenger_6 INT(6) NOT NULL,
passenger_7 INT(6) NOT NULL,
passenger_8 INT(6) NOT NULL,
passenger_9 INT(6) NOT NULL,
passenger_10 INT(6) NOT NULL,
)
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/MainActivity.java
package com.example.soar_company.soar;
import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
public static String TAG = "Debug Tag";
public static String LOGIN_TYPE = "login";
public static String SIGN_UP_TYPE = "sign up";
public static String CREATE_RIDE_TYPE = "create ride";
public static String GET_RIDES = "get ride";
public static UserLocalStorage userLocalStorage;
public static RideFilters rideFilters;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent startIntent = new Intent(getApplicationContext(), CreateRideActivity.class);
startActivity(startIntent);
}
public void logInClicked(View view)
{
EditText emailEditText = findViewById(R.id.emailEditText);
EditText passwordEditText = findViewById(R.id.passwordEditText);
String email = emailEditText.getText().toString();
String password = <PASSWORD>.<PASSWORD>().<PASSWORD>();
DataBaseAccess backgroundWorker = new DataBaseAccess(getApplicationContext());
// Check if the email and password exists in the database
backgroundWorker.execute(LOGIN_TYPE, email, password);
}
public void signUpClicked(View view)
{
Intent startIntent = new Intent(getApplicationContext(),SignUpActivity.class);
startActivity(startIntent);
}
public void forgotPasswordClicked(View view)
{
Intent startIntent = new Intent(getApplicationContext(),ForgotPasswordActivity.class);
startActivity(startIntent);
}
}
<file_sep>/login.php
<?php
// For Server
$server_user = "id8461624_soar_root";
$server_password = "<PASSWORD>";
$server_host = "localhost";
$database = "id8461624_soar1";
// For local testing
//$server_user = "root";
//$server_password = "";
//$server_host = "localhost";
//$database = "soar";
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/notes.txt
- save location info in db as name;latitude;longitude to avoid calling google request<file_sep>/add_passenger.php
<?php
include "connect.php";
session_start();
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$response = array();
$userID = $_POST['userID'];
$rideID = $_POST['rideID'];
$passengerNumber = $_POST['passengerNumber'];
$sql1 = "UPDATE ride_info SET passenger_$passengerNumber = $userID WHERE
id = $rideID ";
$result1 = mysqli_query($server, $sql1);
if ($result1)
{
$sql2 = "SELECT * FROM ride_info WHERE id = $rideID";
$result2 = mysqli_query($server, $sql2);
$rs = mysqli_fetch_array($result2);
$updateSeatsLeft = $rs['seats_left'] - 1;
$sql3 = "UPDATE ride_info SET seats_left = $updateSeatsLeft WHERE
id = $rideID";
$result3 = mysqli_query($server, $sql3);
if ($result3)
{
$response["success"] = 1;
$response["message"] = "user has been added to the ride!";
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "Error when adding user to ride.";
echo json_encode($response);
}
}
}
?>
<file_sep>/sign_in.php
<?php
session_start();
include "connect.php";
$response = array();
$username = $_POST['username'];
$password = $_POST['<PASSWORD>'];
$sql1 = "SELECT * FROM user_info WHERE email = \"$username\";";
$result = mysqli_query($server, $sql1);
if ($result)
{
$rs = mysqli_fetch_array($result);
$passwordDB = $rs['<PASSWORD>'];
if (md5($password) == $passwordDB)
{
$response["id"] = $rs["id"];
$response["likes"] = $rs["likes"];
$response["dislikes"] = $rs["dislikes"];
$response["rating"] = $rs["rating"];
$response["email"] = $rs["email"];
$response["firstName"] = $rs["first_name"];
$response["lastName"] = $rs["last_name"];
$response["validDriver"] = $rs["valid_driver"];
$response["phoneNumer"] = $rs["phone_number"];
$response["success"] = 1;
$response["message"] = "User login successful.";
echo json_encode($response);
}
else
{
$response["success"] = 0;
$response["message"] = "Passwords don't match.";
echo json_encode($response);
}
}
else
{
$response["success"] = 0;
$response["message"] = "User not found";
echo json_encode($response);
}
?>
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/Ride.java
package com.example.soar_company.soar;
import com.google.android.gms.location.places.Place;
import org.json.JSONObject;
public class Ride {
public BasicPlace departureLocation;
public BasicPlace arrivalLocation;
public int seatsLeft;
public int seatsTotal;
public double price;
public User[] passengers;
public String details;
public String ID;
public String departureTime;
public Ride(String ID, BasicPlace departureLocation, BasicPlace arrivalLocation,
int seatsLeft, int seatsTotal, double price, User[] passengers, String details,
String departureTime) {
this.departureLocation = departureLocation;
this.arrivalLocation = arrivalLocation;
this.seatsLeft = seatsLeft;
this.seatsTotal = seatsTotal;
this.price = price;
this.passengers = passengers;
this.details = details;
this.ID = ID;
this.departureTime = departureTime;
}
}
<file_sep>/android/app/src/main/java/com/example/soar_company/soar/InitialChoicesActivity.java
package com.example.soar_company.soar;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class InitialChoicesActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_initial_choices);
}
public void createARideClicked(View view)
{
Intent startIntent = new Intent(getApplicationContext(), CreateRideActivity.class);
startActivity(startIntent);
}
public void viewAllRidesClicked(View view)
{
Intent startIntent = new Intent(getApplicationContext(), RidesDisplayActivity.class);
startActivity(startIntent);
}
public void requestARideClicked(View view)
{
}
}
|
46e0621066bad70e13b3fd4d4c3dfa8a5d88449b
|
[
"SQL",
"Markdown",
"Java",
"Text",
"PHP"
] | 23
|
Java
|
ashfipathan/Soar
|
683424ebe500f143b0b07189de647623d88c964b
|
74310948e8380de0f59b9920aaf54a32de25de2d
|
refs/heads/master
|
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if( ! function_exists('die_r') ){
function die_r($value){
echo '<pre>';
print_r($value);
echo '</pre>';
die;
}
}
if( ! function_exists('make_hash') ){
function make_hash($pwd){
return sha1('$$@' . md5($pwd) . '$!');
}
}
if( ! function_exists('make_machine_name') ){
function make_machine_name($str){
$str = trim($str);
$str = strtolower($str);
$str = str_replace(' ', '-', $str);
return $str;
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Products extends MY_Controller {
function __construct(){
parent::__construct();
$this->load->model('model_products');
}
public function index($category = null, $product = null){
if(is_null($category)){
$this->data['title'] = 'Our categories';
$cat = $this->model_products->getCategories();
if($cat){
$this->data['content'] = $this->parser->parse('parser/categories', $cat, true);
}
} elseif( ! is_null($category) && is_null($product)){
$category = $this->security->xss_clean($category);
$prd = $this->model_products->getProducts($category);
if($prd){
$this->data['title'] = $prd['cat_name'] . ' Products';
$this->data['content'] = $this->parser->parse('parser/products', $prd, true);
}
} elseif( ! is_null($category) && ! is_null($product)){
$product = $this->security->xss_clean($product);
$item = $this->model_products->getItem($product);
if($item){
$this->data['title'] = $item['title'];
$this->data['content'] = $this->parser->parse('parser/item', $item, true);
}
}
$this->load->view('templates/main', $this->data);
}
public function search(){}
}
<file_sep><div class="cms-content-wrapper">
<h3>Menu managment - Edit site main nav</h3>
<?php if($this->session->flashdata('feedback') == true): ?>
<p class="flash-data"><?= $this->session->flashdata('feedback'); ?></p>
<?php endif; ?>
<br />
<input type="button" value="+ Add Menu Item"
onclick="window.location = '<?= site_url(); ?>cms/menu/addMenu/';" />
<ul style="color: black">
{menu}
<li>
{link}
<a style="color: green" href="<?= site_url(); ?>cms/menu/editMenu/{id}/">Edit</a>
<a style="color: blue" href="<?= site_url(); ?>cms/menu/deleteMenu/{id}/">Delete</a>
</li>
{/menu}
</ul>
</div><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_boot extends CI_Model{
public function getMenu(){
$menu = null;
$query = $this->db->get('menu');
if($query->num_rows() > 0){
$menu['menu'] = $query->result_array();
}
return $menu;
}
public function getContent($page){
$content = null;
$sql = "SELECT m.title menu_title,c.title,c.article FROM content c
JOIN menu m ON m.id = c.menu_id
WHERE m.machine_name = ?";
$query = $this->db->query($sql, array($page));
if($query->num_rows() > 0){
$content['content'] = $query->result_array();
}
return $content;
}
}
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Compu-Shop cms</title>
<link rel="stylesheet" type="text/css" href="<?= site_url('public/css/cms_style.css'); ?>" />
</head>
<body>
<div class="cms-wrapper">
<div class="cms-header">
<ul>
<li>CMS DASHBOARD!</li>
<li><a href="<?= site_url('cms/dashboard'); ?>/">Products Managment</a></li>
<li><a href="<?= site_url('cms/menu'); ?>/">Menu Managment</a></li>
<li><a href="<?= site_url('cms/content'); ?>/">Content Managment</a></li>
<li><a href="<?= site_url('cms/dashboard/orders'); ?>/">View orders</a></li>
<li><a href="<?= site_url(); ?>">Back to site</a></li>
</ul>
<hr>
</div>
<div class="cms-content">
<?php if(!empty($content)): ?>
<?= $content; ?>
<?php endif; ?>
</div>
<br /><br />
<div class="cms-footer">
Compu-Shop © <?= date("Y"); ?> CMS DASHBOARD
</div>
</div>
</body>
</html><file_sep><h3>Please sign in with your account:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'user/login/' ); ?>
<br /><label for="email">Email:</label>
<input class="form-control" type="text" name="email" value="<?= set_value('email'); ?>" /><br /><br />
<label for="password">Password:</label>
<input class="form-control" type="<PASSWORD>" name="password" /><br /><br />
<input type="submit" name="submit" class="btn btn-default" value="Sign in" />
<?= form_close(); ?><file_sep><?php
session_start();
if (!isset($_SESSION['id'])) $_SESSION['id'] = $this->post['id'];
if (!isset($_SESSION['title'])) $_SESSION['title'] = $this->post['title'];
if (!isset($_SESSION['description'])) $_SESSION['description'] = $this->post['description'];
if (!isset($_SESSION['price'])) $_SESSION['price'] = $this->post['price'];
if (!isset($_SESSION['image'])) $_SESSION['image'] = $this->post['image'];
if (!isset($_SESSION['visibility'])) $_SESSION['visibility'] = $this->post['visibility'];
if (!isset($_SESSION['categorie_id'])) $_SESSION['categorie_id'] = $this->post['categorie_id'];
$id = $_SESSION['id'];
$category_id = $_SESSION['categorie_id'];
?>
<script src="<?= site_url() ?>/ckeditor/ckeditor.js"></script>
<div class="cms-content-wrapper">
<br />
<h3>Edit Product:</h3>
<br />
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open_multipart( site_url() . 'cms/dashboard/editProduct/' . $id . '/1/' ); ?>
<?= $categories; ?><br /><br />
<label for="title">Title:</label><br />
<input size="78" type="text" name="title" value="<?= set_value('title', $_SESSION['title']); ?>" /><br /><br />
<label for="description">Description:</label><br />
<textarea rows="5" cols="40" name="description"><?= set_value('description', $_SESSION['description']); ?></textarea><br /><br />
<script>
// Replace the <textarea id="article"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'description' );
</script>
<label for="price">Price:</label><br />
<input type="text" name="price" value="<?= set_value('price', $_SESSION['price']); ?>" /><br /><br />
<label for="file_image">Product image:</label><br />
<input type="file" name="userfile" value="<?= set_value('userfile', $_SESSION['image']); ?>" /> <?= $_SESSION['image'] ?> <br /><br />
<?php $visibility = ($_SESSION['visibility'] == "1" ) ? 'checked' : ''; ?>
<input type="checkbox" name="visibility" <?= $visibility ?> value="<?= set_value('visibility', $_SESSION['visibility']); ?>" />
<label for="visibility">Visible on site</label> <br /><br />
<input type="submit" name="edit_submit" value="Save product" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/dashboard/'; " />
<?= form_close(); ?>
<p id="demo"></p>
</div>
<script>
var els = document.getElementsByName("category");
els[0].selectedIndex = <?= $category_id ?>;
</script>
<file_sep><?php
session_start(); session_unset();
if (!isset($_SESSION['id'])) $_SESSION['id'] = $this->post['id'];
if (!isset($_SESSION['title'])) $_SESSION['title'] = $this->post['title'];
if (!isset($_SESSION['link'])) $_SESSION['link'] = $this->post['link'];
//print_r($_SESSION); echo "<br />";
$id = $_SESSION['id'];
?>
<div class="cms-content-wrapper">
<h3>Edit menu:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'cms/menu/editMenu/' . $id . '/1/'); ?>
<label for="title">Title:</label><br />
<input size="35" type="text" name="title" value="<?= set_value('title',$_SESSION['title']); ?>" /><br /><br />
<label for="link">Link:</label><br />
<input size="35" type="text" name="link" value="<?= set_value('link',$_SESSION['link']); ?>" /><br /><br />
<input type="submit" name="submit" value="Save menu" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/menu/'; " />
<?= form_close(); ?>
</div><file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?= $title; ?></title>
<script> var CI_ROOT = "<?= site_url(); ?>"; </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="<?= site_url('public/js/cart.js'); ?>"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="<?= site_url('public/css/style.css'); ?>" type="text/css" />
</head>
<body>
<div class="site-wrapper">
<div class="header">
<h3>
<a href="<?= site_url(); ?>">
<img border="0" width="250" height="60" style="padding-left: 15px;" src="<?= site_url('public/images/compu-shop.png'); ?>" />
</a>
</h3>
<hr style="margin-bottom: 10px">
<div id="menu">
<ul>
<li><a href="<?= site_url(); ?>">Home</a></li>
<li><a href="<?= site_url('products'); ?>/">Products</a></li>
<?php if(!empty($menu)): ?>
<?= $menu; ?>
<?php endif; ?>
<?php if(isset($is_login) && $is_login == false): ?>
<li><a href="<?= site_url('user/login'); ?>/">Login</a></li>
<li><a href="<?= site_url('user/register'); ?>/">Register</a></li>
<?php else: ?>
<li>
Welcome
<a href="<?= site_url('user/edit'); ?>/">
<b><?= $this->session->userdata('name'); ?></b>
</a>
<?php if($is_admin == true): ?>
<a href="<?= site_url() . 'cms/dashboard/'; ?>">CMS Dashboard</a>
<?php endif; ?>
</li>
<li><a href="<?= site_url('user/logout'); ?>/">Logout</a></li>
<?php endif; ?>
<li id="cart-item">
<a href="<?= site_url('cart/checkout'); ?>/">
<img width="25" height="25" border="0" src="<?= site_url('public/images/sh-cart-icon.png') ?>" />
<?php if($this->cart->total_items() > 0): ?>
<span><?= $this->cart->total_items(); ?></span>
<?php endif; ?>
</a>
</li>
</ul>
</div>
</div>
<?php if(!empty($content)): ?>
<div class="page-content"><?= $content; ?></div>
<?php else: ?>
<br /><i>No content...</i>
<?php endif; ?>
<br /><br /><br />
<div class="footer">
<br />Compu-Shop © <?= date("Y"); ?> by <NAME>
</div>
</div>
</body>
</html><file_sep>
<script src="<?= site_url() ?>/ckeditor/ckeditor.js"></script>
<div class="cms-content-wrapper">
<h3>Add new content:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'cms/content/addContent/' ); ?>
<label for="link">Add new content for:</label><br />
<select name="menu_link">
<option value="">Choose the menu link...</option>
<?php foreach ($menu as $value)
echo "<option value=".$value["id"].">".$value["link"]."</option>"; ?>
</select><br /><br />
<label for="title">Title:</label><br />
<input size="78" type="text" name="title" value="<?= set_value('title'); ?>" /><br /><br />
<label for="article">Content:</label><br />
<textarea rows="25" cols="80" name="article"><?= set_value('article'); ?></textarea><br /><br />
<script>
// Replace the <textarea id="article"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'article' );
</script>
<input type="submit" name="submit" value="Save content" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/content/'; " />
<?= form_close(); ?>
</div>
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Menu extends MY_Controller {
public $post, $id;
function __construct(){
parent::__construct();
if( ! $this->data['is_admin']) {
redirect(site_url() . 'user/login/');
}
$this->load->library('form_validation');
$this->load->model('model_cms');
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function index(){
$menu = $this->model_cms->getMenu();
if($menu){
$this->data['content'] = $this->parser->parse('cms/menu', $menu, true);
}
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function addMenu(){
$this->post = $this->input->post(null, true);
$this->form_validation->set_rules('title', 'Title', 'trim|required|xss_clean');
$this->form_validation->set_rules('link', 'Link', 'trim|required|xss_clean');
if ($this->form_validation->run() == false){
$this->data['content'] = $this->load->view('cms/add_menu_form', null, true);
$this->load->view('cms/main', $this->data);
} else {
$this->model_cms->saveMenu($this->post);
redirect(site_url() . 'cms/menu/');
}
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function editMenu($id = null, $from_form = null){
$this->post = $this->input->post(null, true);
if (!$from_form) {
$id = $this->security->xss_clean($id);
$this->post = $this->model_cms->getItemById($id, "menu");
$this->id = $id;
}
$this->form_validation->set_rules('title', 'Title', 'trim|required|xss_clean');
$this->form_validation->set_rules('link', 'Link', 'trim|required|xss_clean');
if ($this->form_validation->run() == false){
$this->data['content'] = $this->load->view('cms/edit_menu_form', null, true);
$this->load->view('cms/main', $this->data);
} else {
$this->model_cms->updateMenu($this->post, $id);
redirect(site_url() . 'cms/menu/');
}
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function deleteMenu($id = null){
$this->post = $this->input->post(null, true);
$id = $this->security->xss_clean($id);
if($id){
if(isset($this->post['delete_submit'])){
$this->model_cms->deleteMenu($id);
redirect(site_url() . 'cms/menu/');
}
$this->data['id'] = $id;
$this->data['content'] = $this->load->view('cms/delete_menu_form', $this->data, true);
}
$this->load->view('cms/main', $this->data);
}
}
<file_sep>
$('.add-to-cart').on('click', function(){
var product_id = $(this).data('id');
$.ajax({
url: CI_ROOT + "cart/addToCart",
type: "GET",
dataType: "html",
data: { id: product_id },
success: function(data) {
location.reload();
}
});
});
$('.update-btn').on('click',function(){
var op = $(this).data('op');
var amount;
if(op == 'up'){
amount = parseInt($(this).prev().val());
amount++;
$(this).prev().val(amount);
} else {
amount = parseInt($(this).next().val());
amount--;
$(this).next().val(amount);
}
$('#checkout-form').submit();
});
<file_sep>
<div class="cms-content-wrapper">
<br />
<h3>Add new menu:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'cms/menu/addMenu/' ); ?>
<label for="title">Title:</label><br />
<input size="35" type="text" name="title" value="<?= set_value('title'); ?>" /><br /><br />
<label for="link">Link:</label><br />
<input size="35" type="text" name="link" value="<?= set_value('link'); ?>" /><br /><br />
<input type="submit" name="submit" value="Save menu" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/menu/'; " />
<?= form_close(); ?>
</div><file_sep>
<h3>Here you can sign up to our site:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'user/register/' ); ?>
<label for="name">Name:</label><br />
<input type="text" name="name" value="<?= set_value('name'); ?>" /><br /><br />
<label for="email">Email:</label><br />
<input type="text" name="email" value="<?= set_value('email'); ?>" /><br /><br />
<label for="password">Password:</label><br />
<input type="<PASSWORD>" name="password" /><br /><br />
<label for="re_password">Confirm Password:</label><br />
<input type="<PASSWORD>" name="re_password" /><br /><br />
<input type="submit" name="submit" value="Sign up" />
<?= form_close(); ?>
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Cart extends MY_Controller {
function __construct(){
parent::__construct();
$this->load->model('model_cart');
}
public function checkout(){
$this->data['content'] = $this->load->view('content/checkout', null, true);
$this->load->view('templates/main', $this->data);
}
public function addToCart(){
$id = $this->input->get('id', true);
if($id){
$this->model_cart->addToCart($id);
}
}
public function updateCart(){
$cart_details = $this->input->post(null, true);
$this->cart->update($cart_details);
redirect(site_url() . 'cart/checkout/');
}
public function order(){
if($this->data['is_login']){
$order = $this->cart->contents();
if(count($order) > 0){
$order = json_encode($order);
$this->model_cart->orderSave($order);
$this->data['title'] = 'Order confirmation';
$this->data['content'] = 'Thanks, your order has been saved!';
$this->load->view('templates/main', $this->data);
} else {
redirect( site_url() . 'products/');
}
} else {
$this->session->set_userdata('destination', 'cart/order/');
redirect( site_url() . 'user/login/');
}
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_cms extends CI_Model
{
public function deleteMenu($id)
{
$sql = "DELETE FROM menu WHERE id = ?";
$query = $this->db->query($sql, array($id));
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'Menu has been deleted!');
}
}
public function saveMenu($post)
{
$machine_name = make_machine_name($post['link']);
$sql = "INSERT INTO menu VALUES('',?,?,?)";
$query = $this->db->query($sql, array($post['title'], $post['link'], $machine_name));
if ($this->db->affected_rows() > 0) {
$this->session->set_flashdata('feedback', 'Menu saved!');
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
public function updateMenu($post, $id)
{
$machine_name = make_machine_name($post['link']);
// $sql = "UPDATE menu VALUES('',?,?,?) WHERE id = $id";
// $query = $this->db->query($sql, array($post['title'], $post['link'], $machine_name));
$this->db->where('id', $id);
$this->db->update('menu', array('title' => $post['title'], 'link' => $post['link'], 'machine_name' => $machine_name));
if ($this->db->affected_rows() > 0) {
$this->session->set_flashdata('feedback', 'Menu saved!');
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
public function getMenu()
{
$menu = null;
$query = $this->db->get('menu');
if ($query->num_rows() > 0) {
$menu['menu'] = $query->result_array();
}
return $menu;
}
public function getOrders()
{
$orders = array();
$sql = "SELECT u.name,o.data,o.order_date FROM orders o
INNER JOIN users u ON o.uid = u.id
ORDER BY o.order_date DESC";
$query = $this->db->query($sql);
if ($query->num_rows() > 0) {
foreach ($query->result_array() as $key => $row) {
if ($row['data']) {
$data = json_decode($row['data']);
$row['data'] = $data;
}
$orders[] = $row;
}
}
return $orders;
}
public function getProductsList()
{
$data = array();
$x = 0;
$query = $this->db->get('categories');
if ($query->num_rows() > 0) {
foreach ($query->result_array() as $row) {
$data['products'][$x] = $row;
$sql = "SELECT *,id AS prg_id FROM products WHERE categorie_id = {$row['id']}";
$items_query = $this->db->query($sql);
if ($items_query->num_rows() > 0) {
foreach ($items_query->result_array() as $sub_row) {
$data['products'][$x]['items'][] = $sub_row;
}
} else {
$data['products'][$x]['items'][] = array('title' => '');
}
$x++;
}
}
return $data;
}
public function getCategories($id = null)
{
$categories = null;
$sql = "SELECT * FROM categories";
if (!is_null($id)) {
$sql .= " ORDER BY CASE WHEN id = $id THEN 0 ELSE id END";
}
$query = $this->db->query($sql);
if ($query->num_rows() > 0) {
$categories['categories'] = $query->result_array();
if (is_null($id)) {
$default = array('id' => -1, 'name' => 'Choose category...');
array_unshift($categories['categories'], $default);
}
}
return $categories;
}
public function deleteProduct($id)
{
$sql = "DELETE FROM products WHERE id = ?";
$query = $this->db->query($sql, array($id));
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'Product has been deleted!');
}
}
public function insertProduct($product_details)
{
$sql = "INSERT INTO products VALUES('', ?, ?, ?, ?, ?, ?, ?)";
$machin_name = "mn-" . url_title($product_details['title']);
$product[] = $product_details['title'];
$product[] = $product_details['description'];
$product[] = $product_details['category'];
$product[] = $machin_name;
$product[] = $product_details['image'];
$product[] = $product_details['price'];
$product[] = $product_details['visibility'];
$this->db->query($sql, $product);
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'This product was saved!');
} else {
$this->session->set_flashdata('feedback', 'Error! This product was not saved!');
}
}
public function getItemById($id, $table)
{
$item = null;
$sql = "SELECT * FROM $table WHERE id = ?";
$query = $this->db->query($sql, array($id));
if ($query->num_rows() > 0) {
$item = $query->row_array();
}
return $item;
}
public function updateProduct($data, $id)
{
$data['machine_name'] = "mn-" . url_title($data['title']);
$data['categorie_id'] = $data['category'];
unset($data['category']);
$this->db->where('id', $id);
$this->db->update('products', $data);
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'The product was updated!');
} else {
$this->session->set_flashdata('feedback', 'Error! The product was not updated!');
}
}
////////////////////////////////////////Content//////////////////////////////////////////////////////////
public function updateContent($post, $id)
{
$this->db->where('id', $id);
$this->db->update('content', array('title' => $post['title'], 'article' => $post['article']));
if ($this->db->affected_rows() > 0) {
$this->session->set_flashdata('feedback', 'Content updated!');
}
}
///////////////////////////////////////////////////////////////
public function getContent()
{
$content = null;
$query = $this->db->get('content');
if ($query->num_rows() > 0) {
$content['content'] = $query->result_array();
}
return $content;
}
///////////////////////////////////////////////////////////////
public function insertContent($post)
{
$sql = "INSERT INTO content VALUES('', ?, ?, ?)";
$this->db->query($sql, array('title' => $post['title'], 'article' => $post['article'], 'menu_id' => $post['menu_link']));
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'New content was saved!');
} else {
$this->session->set_flashdata('feedback', 'Error! This content was not saved!');
}
}
///////////////////////////////////////////////////////////////
public function deleteContent($id)
{
$sql = "DELETE FROM content WHERE id = ?";
$query = $this->db->query($sql, array($id));
if ($this->db->affected_rows()) {
$this->session->set_flashdata('feedback', 'Content has been deleted!');
}
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User extends MY_Controller {
public $post;
function __construct(){
parent::__construct();
$this->load->library('form_validation');
$this->load->model('model_user');
}
public function login(){
if($this->data['is_login']) redirect();
$this->post = $this->input->post(null, true);
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean|callback_user_validate');
if ($this->form_validation->run() == false) {
$this->data['title'] = 'Login page';
$this->data['content'] = $this->load->view('templates/login', null, true);
$this->load->view('templates/main', $this->data);
} else {
$destination = $this->session->userdata('destination');
if($destination){
$this->session->unset_userdata('destination');
redirect( site_url() . $destination );
} else {
redirect();
}
}
}
public function register(){
if($this->data['is_login']) redirect();
$this->post = $this->input->post(null, true);
$this->form_validation->set_rules('name', 'Name', 'trim|required|min_length[2]|xss_clean');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|xss_clean|callback_email_exist');
$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]|matches[re_<PASSWORD>]|xss_clean');
$this->form_validation->set_rules('re_password', 'Confirm Password', 'trim|required|xss_clean');
if ($this->form_validation->run() == false) {
$this->data['title'] = 'Registration page';
$this->data['content'] = $this->load->view('templates/register', null, true);
$this->load->view('templates/main', $this->data);
} else {
$is_register = $this->model_user->user_save($this->post);
if($is_register){
redirect();
} else {
redirect('user/register/');
}
}
}
public function edit(){
echo 'Todo...';
}
public function logout(){
$user_data = array(
'uid' => '',
'name' => '',
'email' => '',
'admin' => ''
);
$this->session->unset_userdata($user_data);
redirect();
}
public function user_validate(){
$is_login = $this->model_user->user_validate($this->post['email'], $this->post['password']);
if($is_login){
return true;
}
$this->form_validation->set_message('user_validate', '* Email/Password are incorrect');
return false;
}
public function email_exist(){
if(!empty($this->post['email'])){
$is_exist = $this->model_user->email_exist($this->post['email']);
if( ! $is_exist ){
return true;
}
}
$this->form_validation->set_message('email_exist', '* Email is already exist');
return false;
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Page404 extends MY_Controller {
public function index(){
$this->data['title'] = 'Page 404';
$this->data['content'] = 'The page is not found...';
$this->load->view('templates/main', $this->data);
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Dashboard extends MY_Controller {
public $post, $id;
function __construct(){
parent::__construct();
if( ! $this->data['is_admin']) {
redirect(site_url() . 'user/login/');
}
$this->load->library('form_validation');
$this->load->model('model_cms');
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function index(){
$products_list = $this->model_cms->getProductsList();
if(!empty($products_list['products'])){
$this->data['content'] = $this->parser->parse('cms/all_products', $products_list, true);
}
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function orders(){
$orders['orders'] = $this->model_cms->getOrders();
if(count($orders) > 0){
$this->data['content'] = $this->load->view('cms/orders', $orders, true);
}
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function addProduct()
{
$this->post = $this->input->post(null, true);
$this->form_validation->set_rules('category', 'Category', 'callback_category_choose');
$this->form_validation->set_rules('title', 'Title', 'trim|required');
$this->form_validation->set_rules('description', 'Description', 'trim|required');
$this->form_validation->set_rules('price', 'Price', 'trim|required|numeric');
if ($this->form_validation->run() == FALSE)
{
$categories = $this->model_cms->getCategories();
if($categories)
{
$this->data['categories'] = $this->parser->parse('cms/categories_parser', $categories, true);
$this->data['content'] = $this->load->view('cms/addProduct_form', $this->data, true);
} else {
$this->data['content'] = 'No categories';
}
}
else {
if (isset($this->post['submit']))
{
$data_image = $this->do_upload();
$image_name = $data_image['file_name'];
$this->post['image'] = $image_name;
if (!isset($this->post['visibility'])) {
$this->post['visibility'] = '0';
}
//insert product to db
$this->model_cms->insertProduct($this->post);
redirect( site_url() . 'cms/dashboard/' );
}
}
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function deleteProduct($id){
$post = $this->input->post(null, true);
$this->data['id'] = $this->security->xss_clean($id);
if(isset($post['delete_submit'])){
$this->model_cms->deleteProduct($this->data['id']);
redirect( site_url() . 'cms/dashboard/' );
}
$this->data['content'] = $this->load->view('cms/delete_form', $this->data, true);
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function editProduct($id = null, $from_form = null){
$this->post = $this->input->post(null, true);
if (!$from_form) {
$id = $this->security->xss_clean($id);
$this->post = $this->model_cms->getItemById($id, "products");
$this->id = $id;
}
$this->form_validation->set_rules('category', 'Category', 'callback_category_choose');
$this->form_validation->set_rules('title', 'Title', 'trim|required');
$this->form_validation->set_rules('description', 'Description', 'trim|required');
$this->form_validation->set_rules('price', 'Price', 'trim|required|numeric');
if ($this->form_validation->run() == FALSE)
{
$categories = $this->model_cms->getCategories();
if($categories)
{
$this->data['categories'] = $this->parser->parse('cms/categories_parser', $categories, true);
$this->data['content'] = $this->load->view('cms/editProduct_form', $this->data, true);
} else {
$this->data['content'] = 'No categories';
}
} else {
if (isset($this->post['edit_submit']))
{
$data_image = $this->do_upload();
$image_name = $data_image['file_name'];
if ($image_name) $this->post['image'] = $image_name;
else $this->post['image'] = "no_image.png";
$this->post['visibility'] = (!isset($this->post['visibility'])) ? '0' : '1';
unset($this->post['edit_submit']);
//update product in db
$this->model_cms->updateProduct($this->post, $id);
redirect( site_url() . 'cms/dashboard/' );
}
}
$this->load->view('cms/main', $this->data);
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function do_upload() {
$config['upload_path'] = './public/images/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '20971520'; // 20 MB
$config['max_width'] = '5000';
$config['max_height'] = '5000';
$config['encrypt_name'] = true;
$this->load->library('upload', $config);
$this->upload->do_upload();
return $this->upload->data();
}
///////////////////////////////////////////////////////////////////////////////////////////////
public function category_choose($str){
if ($str == '-1')
{
$this->form_validation->set_message('category_choose', 'Choose the category!');
return FALSE;
}
else
{
return TRUE;
}
}
}
<file_sep><?php
session_start(); session_unset();
if (!isset($_SESSION['id'])) $_SESSION['id'] = $this->post['id'];
if (!isset($_SESSION['title'])) $_SESSION['title'] = $this->post['title'];
if (!isset($_SESSION['article'])) $_SESSION['article'] = $this->post['article'];
$id = $_SESSION['id'];
?>
<script src="<?= site_url() ?>/ckeditor/ckeditor.js"></script>
<div class="cms-content-wrapper">
<h3>Edit Content:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open( site_url() . 'cms/content/editContent/' . $id . '/1/'); ?>
<label for="title">Title:</label><br />
<input size="78" type="text" name="title" value="<?= set_value('title',$_SESSION['title']); ?>" /><br /><br />
<label for="article">Content:</label><br />
<textarea rows="25" cols="80" name="article"><?= set_value('article',$_SESSION['article']); ?></textarea><br /><br />
<script>
// Replace the <textarea id="article"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'article' );
</script>
<input type="submit" name="submit" value="Save content" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/content/'; " />
<?= form_close(); ?>
</div><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Boot extends MY_Controller {
function __construct(){
parent::__construct();
}
public function index($page = null){
$page = $this->security->xss_clean($page);
if($page){
$content = $this->model_boot->getContent($page);
if($content){
$this->data['title'] = $content['content'][0]['menu_title'];
$this->data['content'] = $this->parser->parse('parser/content', $content, true);
}
}
$this->load->view('templates/main', $this->data);
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_products extends CI_Model{
public function getCategories(){
$categories = null;
$query = $this->db->get('categories');
if($query->num_rows() > 0){
$categories['categories'] = $query->result_array();
}
return $categories;
}
public function getProducts($category){
$products = null;
$sql = "SELECT c.machine_name AS cat_machine,c.name,p.* FROM products p
JOIN categories c ON c.id = p.categorie_id
WHERE c.machine_name = ? AND p.visibility = 1";
$query = $this->db->query($sql, array($category));
if($query->num_rows() > 0){
$products['products'] = $query->result_array();
$products['cat_name'] = $products['products'][0]['name'];
}
return $products;
}
public function getItem($product){
$item = null;
$sql = "SELECT * FROM products WHERE machine_name = ?";
$query = $this->db->query($sql, array($product));
if($query->num_rows() > 0){
$item = $query->row_array();
}
return $item;
}
}
<file_sep>
<div class="order_wraper">
<br />
<table>
<th>Name</th>
<th>Date</th>
<th>Order</th>
<th>Total order</th>
<?php foreach($orders as $key => $row): ?>
<?php $total_order = 0; ?>
<tr>
<td><?= $row['name'] ?></td>
<td><?= $row['order_date'] ?></td>
<td>
<ul>
<?php foreach($row['data'] as $value): ?>
<li>
Name: <?= $value->name; ?>,
qty: <?= $value->qty ?>,
Price: <?= $value->price; ?>,
subtotal: <?= $value->subtotal; ?>
</li>
<?php $total_order += ($value->qty * $value->price); ?>
<?php endforeach; ?>
</ul>
</td>
<td><?= $total_order; ?></td>
</tr>
<?php endforeach; ?>
</table>
</div><file_sep>
<h2 style="text-align:center">Our {cat_name} products</h2>
<div class="all-boxes">
{products}
<div id="product-{id}" class="product-box">
<h3 style="font-size: 20px">{title}</h3>
<p><img width="150" height="150" border="0" src="<?= site_url(); ?>public/images/{image}" /></p>
<p style="overflow : hidden; height: 60px">{description}</p>
<a href="<?= site_url(); ?>products/{cat_machine}/{machine_name}/">Read more...</a>
<p>
Price on site: <b>{price} NIS</b>
<input type="button" data-id="{id}" class="add-to-cart" value="+ Add to cart" onclick="window.location = '<?= site_url(); ?>cms/cart/addToCart/'; "/>
</p>
</div>
{/products}
</div><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Products */
$route['products'] = "products";
$route['products/(:any)'] = "products/index/$1";
/* cart */
$route['cart/(:any)'] = "cart/$1";
/* User */
$route['user/(:any)'] = "user/$1";
/* CMS */
$route['cms/dashboard'] = "cms/dashboard";
$route['cms/dashboard/(:any)'] = "cms/dashboard/$1";
$route['cms/content'] = "cms/content";
$route['cms/content/(:any)'] = "cms/content/$1";
$route['cms/menu'] = "cms/menu";
$route['cms/menu/(:any)'] = "cms/menu/$1";
/* Any else will route to boot controller */
$route['(:any)'] = "boot/index/$1";
$route['default_controller'] = "home";
$route['404_override'] = 'page404';
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Content extends MY_Controller {
public $post;
function __construct(){
parent::__construct();
if( ! $this->data['is_admin']) {
redirect(site_url() . 'user/login/');
}
$this->load->library('form_validation');
$this->load->model('model_cms');
}
////////////////////////////////////////////////////////////////////
public function index(){
// echo 'all content';
$content = $this->model_cms->getContent();
if($content){
$this->data['content'] = $this->parser->parse('cms/content', $content, true);
}
$this->load->view('cms/main', $this->data);
}
////////////////////////////////////////////////////////////////////
public function addContent(){
$this->post = $this->input->post(null, true);
$this->form_validation->set_rules('menu_link', 'Link', 'trim|required|xss_clean');
$this->form_validation->set_rules('title', 'Title', 'trim|required|xss_clean');
$this->form_validation->set_rules('article', 'Content', 'trim|required|xss_clean');
if ($this->form_validation->run() == false){
$this->data['content'] = $this->load->view('cms/add_content_form', null, true);
$this->load->view('cms/main', $this->data);
} else {
$this->model_cms->insertContent($this->post);
redirect(site_url() . 'cms/content/');
}
}
////////////////////////////////////////////////////////////////////
public function editContent($id = null, $from_form = null){
$this->post = $this->input->post(null, true);
if (!$from_form) {
$id = $this->security->xss_clean($id);
$this->post = $this->model_cms->getItemById($id, "content");
}
$this->form_validation->set_rules('title', 'Title', 'trim|required|xss_clean');
$this->form_validation->set_rules('article', 'Content', 'trim|required|xss_clean');
if ($this->form_validation->run() == false){
$this->data['content'] = $this->load->view('cms/edit_content_form', null, true);
$this->load->view('cms/main', $this->data);
} else {
$this->model_cms->updateContent($this->post, $id);
redirect(site_url() . 'cms/content/');
}
}
////////////////////////////////////////////////////////////////////
public function deleteContent($id = null){
$this->post = $this->input->post(null, true);
$id = $this->security->xss_clean($id);
if($id){
if(isset($this->post['delete_submit'])){
$this->model_cms->deleteContent($id);
redirect(site_url() . 'cms/content/');
}
$this->data['id'] = $id;
$this->data['content'] = $this->load->view('cms/delete_content_form', $this->data, true);
}
$this->load->view('cms/main', $this->data);
}
}
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends CI_Controller {
public $data = array('title' => 'Compu-Shop');
function __construct(){
parent::__construct();
$this->data['is_login'] = ($this->session->userdata('uid') == true) ? true : false;
$this->data['is_admin'] = ($this->session->userdata('admin') == true) ? true : false;
$this->load->model('model_boot');
$menu = $this->model_boot->getMenu();
if($menu){
$this->data['menu'] = $this->parser->parse('parser/menu', $menu, true);
}
}
}
<file_sep>
<div id="product-{id}" class="item-box">
<h3>{title}</h3>
<p><img width="150" height="150" border="0" src="<?= site_url(); ?>public/images/{image}" /></p>
<p>{description} <br />
</p>
<p>
Price on site: <b>{price} NIS</b>
<input type="button" data-id="{id}" class="add-to-cart" value="+ Add to cart" />
<input type="button" class="checkout" value="Checkout"
onclick="window.location = '<?= site_url('cart/checkout'); ?>/'" />
</p>
<button onclick="goBack()">Back</button>
</div>
<script>
function goBack() {
window.history.back();
}
</script><file_sep><div class="cms-content-wrapper">
<?= form_open( site_url() . 'cms/dashboard/deleteProduct/' . $id . '/' ); ?>
<br />
<label class="warning" for="title">Are you sure you want to delete this product?</label><br /><br />
<input type="submit" name="delete_submit" value="Delete" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/dashboard/'; " />
<?= form_close(); ?>
</div><file_sep>
{menu}
<li><a href="<?= site_url(); ?>{machine_name}/">{link}</a></li>
{/menu}
<file_sep>-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 20, 2015 at 12:19 PM
-- Server version: 5.5.34
-- PHP Version: 5.4.22
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: `she_shop`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`machine_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`id`, `name`, `image`, `machine_name`) VALUES
(1, 'Evening dresses', 'ev-cat.jpg', 'evening-dresses'),
(2, 'Bags', 'bags-cat.jpg', 'bags'),
(3, 'Ballet shoes', 'nice-ballet-shoes.jpg', 'ballet-shoes');
-- --------------------------------------------------------
--
-- Table structure for table `content`
--
CREATE TABLE IF NOT EXISTS `content` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`article` text NOT NULL,
`menu_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `content`
--
INSERT INTO `content` (`id`, `title`, `article`, `menu_id`) VALUES
(1, 'About our company', 'Text demo for article to about page', 1),
(2, 'Company services online', 'Dami text for this services page', 2),
(3, 'About us in israel', 'About israel company article demo', 1);
-- --------------------------------------------------------
--
-- Table structure for table `menu`
--
CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`link` varchar(255) NOT NULL,
`machine_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `menu`
--
INSERT INTO `menu` (`id`, `title`, `link`, `machine_name`) VALUES
(1, 'About our company', 'About us', 'about'),
(2, 'Our company services', 'Services', 'services');
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE IF NOT EXISTS `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`data` text NOT NULL,
`uid` int(11) NOT NULL,
`order_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`id`, `data`, `uid`, `order_date`) VALUES
(1, '{"c<KEY>":{"rowid":"c4ca4238a0b923820dcc509a6f75849b","id":"1","qty":"2","price":"85.95","name":"Evening dresses 1","subtotal":171.9},"a87ff679a2f3e71d9181a67b7542122c":{"rowid":"a87ff679a2f3e71d9181a67b7542122c","id":"4","qty":"4","price":"23.99","name":"Evening dresses 2","subtotal":95.96},"1679091c5a880faf6fb5e6087eb1b2dc":{"rowid":"1679091c5a880faf6fb5e6087eb1b2dc","id":"6","qty":"1","price":"6.45","name":"bbd 666 shoes","subtotal":6.45}}', 1, '2015-01-20 13:18:42'),
(2, '{"c81e728d9d4c2f636f067f89cc14862c":{"rowid":"c81e728d9d4c2f636f067f89cc14862c","id":"2","qty":"3","price":"32.50","name":"Bags foo 1","subtotal":97.5},"e4da3b7fbbce2345d7772b0674a318d5":{"rowid":"e4da3b7fbbce2345d7772b0674a318d5","id":"5","qty":"1","price":"64.00","name":"Bags foo 2","subtotal":64},"a87ff679a2f3e71d9181a67b7542122c":{"rowid":"a87ff679a2f3e71d9181a67b7542122c","id":"4","qty":"2","price":"23.99","name":"Evening dresses 2","subtotal":47.98}}', 2, '2015-01-20 13:19:12');
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`categorie_id` int(11) NOT NULL,
`machine_name` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`price` decimal(10,2) NOT NULL,
`visibility` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`id`, `title`, `description`, `categorie_id`, `machine_name`, `image`, `price`, `visibility`) VALUES
(1, 'Evening dresses 1', 'Evening dresses text demo', 1, 'evening-dresses-1', 'img_2772_2.jpg', '85.95', 1),
(2, 'Bags foo 1', 'demo text desc for Bags foo 1', 2, 'bags-foo-1', '403285.jpg', '32.50', 1),
(3, 'Ballet shoes blerina', 'Ballet shoes blerina is the best ever', 3, 'ballet-shoes-blerina', 'Ballet-Shoes-ballet-35247561-1050-750.jpg', '12.00', 1),
(4, 'Evening dresses 2', 'Evening dresses 2 foo text for check', 1, 'evening-dresses-2', 'img_6479.jpg', '23.99', 1),
(5, 'Bags foo 2', 'demo text desc for Bags foo 2', 2, 'bags-foo-2', 'ladies-designer-bags-b.jpg', '64.00', 1),
(6, 'bbd 666 shoes', 'text demo for bbd 666 shoes', 3, 'bbd-666-shoes', 'Diane_449_Retouch.jpg', '6.45', 1);
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE IF NOT EXISTS `roles` (
`uid` int(11) NOT NULL COMMENT 'foreign key for user.id',
`role` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `roles`
--
INSERT INTO `roles` (`uid`, `role`) VALUES
(1, 1),
(2, 2),
(3, 2),
(4, 2),
(5, 2);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `password`) VALUES
(1, 'Admin', '<EMAIL>', '<PASSWORD>'),
(2, '<NAME>', '<EMAIL>', '<PASSWORD>'),
(3, 'Israel', '<EMAIL>', '<PASSWORD>876e89766abfa21fef1262f2f581740d'),
(4, 'hanan', '<EMAIL>', '<PASSWORD>'),
(5, '<NAME>', '<EMAIL>', '<PASSWORD>');
/*!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 */;
<file_sep>
{categories}
<div class="cat-box" id="categorie-{id}">
<a href="<?= site_url(); ?>products/{machine_name}/">
<h3>{name}</h3>
<img width="200" height="200" border="0" src="<?= site_url(); ?>public/images/{image}" />
</a>
</div>
{/categories}<file_sep>
<script src="<?= site_url() ?>/ckeditor/ckeditor.js"></script>
<div class="cms-content-wrapper">
<br />
<h3>Add new Product:</h3>
<div class="error-display"><?= validation_errors(); ?></div>
<?= form_open_multipart( site_url() . 'cms/dashboard/addProduct/' ); ?>
<?= $categories; ?><br /><br />
<label for="title">Title:</label><br />
<input size="78" type="text" name="title" value="<?= set_value('title'); ?>" /><br /><br />
<label for="description">Description:</label><br />
<textarea rows="5" cols="40" name="description"><?= set_value('description'); ?></textarea><br /><br />
<script>
// Replace the <textarea id="article"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'description' );
</script>
<label for="price">Price:</label><br />
<input type="text" name="price" value="<?= set_value('price'); ?>" /><br /><br />
<label for="file_image">Product image:</label><br />
<input type="file" name="userfile" /><br /><br />
<input type="checkbox" name="visibility" checked="checked" value="1" />
<label for="visibility">Visible on site</label>
<br /><br />
<input type="submit" name="submit" value="Save product" />
<input type="button" value="Back" onclick="window.location = '<?= site_url(); ?>cms/dashboard/'; " />
<?= form_close(); ?>
</div>
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_user extends CI_Model{
public function user_validate($email, $pwd){
$pwd = <PASSWORD>($pwd);
$sql = "SELECT * FROM users u
JOIN roles r ON u.id = r.uid
WHERE u.email = ? AND u.password = ? LIMIT 1";
$query = $this->db->query($sql, array($email, $pwd));
if($query->num_rows() > 0){
$user = $query->row_array();
$set_user['uid'] = $user['id'];
$set_user['name'] = $user['name'];
$set_user['email'] = $user['email'];
$set_user['role'] = $user['role'];
return $this->set_login($set_user);
}
return false;
}
public function user_save($post){
$pwd = <PASSWORD>($post['password']);
$sql = "INSERT INTO users VALUES('', ?, ?, ?)";
$this->db->query($sql, array($post['name'], $post['email'], $pwd));
if($this->db->affected_rows()){
$id = $this->db->insert_id();
$data = array( 'uid' => $id, 'role' => 2);
$this->db->insert('roles', $data);
$set_user['uid'] = $id;
$set_user['role'] = 2;
$set_user['name'] = $post['name'];
$set_user['email'] = $post['email'];
return $this->set_login($set_user);
}
return false;
}
public function email_exist($email){
$sql = "SELECT email FROM users WHERE email = ?";
$query = $this->db->query($sql, array($email));
if($query->num_rows() > 0){
return true;
}
return false;
}
private function set_login($user){
$user['admin'] = ($user['role'] == 1) ? true : false;
unset($user['role']);
$this->session->set_userdata($user);
return true;
}
}
<file_sep><?php session_start(); session_unset(); ?>
<div class="cms-content-wrapper">
<h2>Products Managment</h2>
<i>Here you can edit site content</i><br /><br />
<div class="cms-wallpaper">
<?php if($this->session->flashdata('feedback') == true): ?>
<p class="flash-data"><?= $this->session->flashdata('feedback'); ?></p>
<?php endif; ?>
<br />
<input type="button" value="+ Add new product"
onclick="window.location = '<?= site_url(); ?>cms/dashboard/addProduct/';" />
{products}
<h4 style="color: crimson">{name}</h4>
<ul>
{items}
<li style="color: black">
{title}
<a style="color: green" href="<?= site_url(); ?>cms/dashboard/editProduct/{prg_id}/"">Edit</a> |
<a style="color: blue" href="<?= site_url(); ?>cms/dashboard/deleteProduct/{prg_id}/">Delete</a>
</li>
{/items}
</ul>
{/products}
</div>
</div><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_cart extends CI_Model{
public function orderSave($order){
$uid = $this->session->userdata('uid');
$sql = "INSERT INTO orders VALUES('', '$order', '$uid', NOW())";
$query = $this->db->query($sql);
$this->cart->destroy();
}
public function addToCart($id){
$product = $this->getProductById($id);
if($product){
$data = array(
'id' => $id,
'qty' => 1,
'price' => $product['price'],
'name' => $product['title']
);
$this->cart->insert($data);
}
}
private function getProductById($id){
$product = null;
$sql = "SELECT * FROM products WHERE id = ?";
$query = $this->db->query($sql, array($id));
if($query->num_rows() > 0){
$product = $query->row_array();
}
return $product;
}
}
<file_sep><div class="cms-content-wrapper">
<h3>Content managment - Edit site content</h3>
<?php if($this->session->flashdata('feedback') == true): ?>
<p class="flash-data"><?= $this->session->flashdata('feedback'); ?></p>
<?php endif; ?>
<br />
<input type="button" value="+ Add new Content"
onclick="window.location = '<?= site_url(); ?>cms/content/addContent/';" />
<ul style="color: black">
{content}
<li>
{title}
<a style="color: green" href="<?= site_url(); ?>cms/content/editContent/{id}/">Edit</a>
<a style="color: blue" href="<?= site_url(); ?>cms/content/deleteContent/{id}/">Delete</a>
</li>
{/content}
</ul>
</div>
|
7cbd6bce2774bb438c1f5b58cc54a729c725417e
|
[
"JavaScript",
"SQL",
"PHP"
] | 37
|
PHP
|
Slava-Sanin/She-Shop
|
a8a7adac1b5e6937b76ac2718f3b6538a31aa852
|
c33782d4c67bfe0e1e435ff3689ad7a752480c7f
|
refs/heads/master
|
<repo_name>jingya221/ProgrammingAssignment2<file_sep>/cachematrix.R
## Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse of a matrix rather than compute it repeatedly (there are also alternatives to matrix inversion that we will not discuss here). Your assignment is to write a pair of functions that cache the inverse of a matrix.
## The first function, makeCacheMatrix creates a special "matrix", which is really a list containing a function to
## set the matrix
## get the matrix
## set the inverse of the matrix
## get the inverse of the matrix
makeCacheMatrix <- function(x = matrix()) {
inverse <- NULL
set <- function(y) {
x <<- y
inverse <<- NULL
}
get <- function() x
setinverse <- function(inverse) inverse <<- solve
getinverse <- function() inverse
list(set = set, get = get,
setinverse = setinverse,
getinverse = getinverse)
}
## This function computes the inverse of the special "matrix" returned by makeCacheMatrix above. If the inverse has already been calculated (and the matrix has not changed), then the cachesolve should retrieve the inverse from the cache.
cacheSolve <- function(x, ...) {
inverse <- x$getinverse()
if(!is.null(inverse)) {
message("getting cached data")
return(inverse)
}
data <- x$get()
inverse <- solve(data, ...)
x$setinverse(inverse)
inverse
}
|
0036f1044e1ba47b650662282107d27e8b291711
|
[
"R"
] | 1
|
R
|
jingya221/ProgrammingAssignment2
|
ecb56244ba9efdfb82950c2574cba2024210cc77
|
7310d40a07d2b892a14f36093bf169ebcd27e2f5
|
refs/heads/master
|
<file_sep>//入口文件编码
var express = require('express') //加载express模块
var path = require('path')
var mongoose = require('mongoose')
var _=require('underscore')
var bodyParser = require('body-parser')
var Movie = require('./models/movie')
var User = require('./models/user')
var cookieParser = require('cookie-parser')
var session = require('express-session')
var port = process.env.PORT || 3000 //设置端口 设置环境变量/process全局变量,获取外围参数
var app = express() //启动web服务器
mongoose.connect('mongodb://localhost/imooc')
app.set('views','./views/pages')//生产view engine的实例
app.set('view engine','jade') //设置默认的模板引擎jade
app.use(bodyParser.urlencoded({extended:true}))
app.use(cookieParser())
app.use(session({
secret:'imooc'
}))
app.use(express.static(path.join(__dirname,'public')))
app.locals.moment = require('moment')
app.listen(port)
console.log('bububang started on port '+ port)
//index page
app.get('/',function(req,res){
console.log('user in session')
Movie.fetch(function(err,movies){
if(err){
console.log(err)
}
res.render('index',{
title:'imooc首页' ,//首页传递变量
movies:movies
})
})
})//路由规则和回调方法(req/res)
// signup
app.post('/user/signup',function(req,res){
var _user= req.body.user
console.log(_user)
User.findOne({name:_user.name},function(err,user){
if(err){
console.log(err)
}
if(user){
console.log(user)
console.log('user has been signed up')
return res.redirect('/')
}
else{
var user = new User(_user)
user.save(function(err,user){
if(err){
console.log(err)
}
res.redirect('/admin/userlist')
console.log('a new user is created')
})
}
})
})
//signin page
app.post('/user/signin',function(req,res){
var _user = req.body.user
var name = _user.name
var password = <PASSWORD>
User.findOne({name:name},function(err,user){
if(err){
console.log(err)
}
if(!user){
console.log('user doesnot exit')
return res.redirect('/')
}
user.comparePassword(password,function(err,isMatch){
if(err){
console.log(err)
}
if(isMatch){
req.session.user = user //服务器与客户端会话状态
console.log('password is matched')
return res.redirect('/')
}
else{
console.log('password is not matched')
}
})
})
})
//userlist page
app.get('/admin/userlist',function(req,res){
User.fetch(function(err,users){
if(err){
console.log(err)
}
res.render('userlist',{
title:'用户列表页',
users:users
})
})
})
//detail page
app.get('/movie/:id',function(req,res){
var id = req.params.id
Movie.findById(id,function(err,movie){
res.render('detail',{
title:'imooc' + movie.title,
movie:movie
})
})
})
//admin page
app.get('/admin/movie',function(req,res){
res.render('admin',{
title:'后台录入页',
movie:{
title:'',
doctor:'',
country:'',
year:'',
poster:'',
flash:'',
summary:'',
language:''
}
})
})
// admin update movie
app.get('/admin/update/:id',function(req,res){
var id = req.params.id
if(id){
Movie.findById(id,function(err,movie){
res.render('admin',{
title:'imooc 后台更新页',
movie:movie
})
})
}
})
//admin post movie
app.post('/admin/movie/new',function(req,res){
var id = req.body.movie
var movieObj = req.body.movie
var _movie
if(id !== 'undefined'){
Movie.findById(id, function(err,movie){
if(err){
console.log(err)
}
_movie =_.extend(movie, movieObj)
_movie.save(function(err,movie){
if (err){
console.log(err)
}
res.redirect('/movie/' + movie._id)
})
})
}
else{
_movie = new Movie({
doctor:movieObj.doctor,
title:movieObj.title,
country:movieObj.country,
language:movieObj.language,
year:movieObj.year,
poster:movieObj.poster,
summary:movieObj.summary,
flash:movieObj.flash
})
_movie.save(function(err,movie){
if (err){
console.log(err)
}
res.redirect('/movie/' + movie._id)
})
}
})
//list page
app.get('/admin/list',function(req,res){
Movie.fetch(function(err,movies){
if(err){
console.log(err)
}
res.render('list',{
title:'列表页',
movies:movies
})
})
})
//list delete movie
app.delete('/admin/list',function(req,res){
var id=req.query.id
console.log(id)
if(id){
Movie.remove({_id:id},function(err,movie){
if(err){
console.log(err)
}
else{
res.json({success: 1})
}
})
}
})
|
f52af5feea126a63b0bb832c9a471fec32186b14
|
[
"JavaScript"
] | 1
|
JavaScript
|
bubuche/bububang
|
a6b3faf446b394da674ba0e25d1e6b98e120319d
|
d4050b7eaf48f6098cf08e2c43b2779e6821004f
|
refs/heads/master
|
<file_sep>from ev3dev.ev3 import *
import time
m1 = LargeMotor('outA')
m2 = LargeMotor('outD')
cs1 = ColorSensor('in1')
cs2 = ColorSensor('in2')
ts = TouchSensor()
nastawa = 0
integral = 0
last_error = 0
base_vel = -60
while not ts.is_pressed:
nastawa = cs1.reflected_light_intensity
while True:
cs1r = cs1.reflected_light_intensity
error = nastawa - cs1r
integral =0.5* integral + error
derivative = error - last_error
last_error = error
skret = int(0.8*error + 18*derivative)
time.sleep(0.1)
if ts.is_pressed:
m1.run_forever(speed_sp =base_vel - skret)
m2.run_forever(speed_sp =base_vel + skret)
if cs1r < 10:
m1.run_forever(speed_sp = -200)
m2.run_forever(speed_sp = 300)
if cs1r > 100:
m1.run_forever(speed_sp = 300)
m2.run_forever(speed_sp = -200)
elif not ts.is_pressed:
m1.stop()
m2.stop()
print("uch 1: " + str(skret)+ " light reflection: " + str( cs1r) + " " + str(error) + " " + str(integral) + " " + str(derivative) + str(skret))
<file_sep>from ev3dev.ev3 import *
from time import sleep
#class Robot:
light_left = ColorSensor('in2')
light_right = ColorSensor('in1')
touch_sensor = TouchSensor('in4')
ultrasonic = UltrasonicSensor('in3')
lcd = Screen()
right_engine = LargeMotor('outB')
left_engine = LargeMotor('outA')
medium_engine = MediumEngine('outC')
#parametry PD
Kp = 4.0
Kd = 0.15
base_speed = 60.0
mid_l = 260 #(white_left + black_right) // 2
mid_r = 260 #(white_right + black_right) // 2
error = 0
last_error = 0
error_l = 0
error_r = 0
error_P = 0.0
error_D = 0.0
#red & blue range
red_low = 100
red_high = 200
blue_low = 400
blue_high = 600
black_low = 220
black_high = 300
def hook(action):
dir = 0
if action is 'raise':
dir = 1
elif action is 'lower':
dir = -1
medium_engine.run_timed(time_sp = 200, speed_sp = dir*100)
def follow_the_line():
while not touch_sensor.is_pressed:
error_l = light_left.red - mid_l
error_r = light_right.red - mid_r
error = error_l - error_r
error_P = Kp * float(error)
error_D = Kd * (error - last_error)
left_engine.run_forever( speed_sp = -base_speed - error_P + error_D, stop_action = "coast")
right_engine.run_forever(speed_sp = -base_speed + error_P - error_D, stop_action = "coast")
last_error = error
def turn(direction, degree):
q = 10 # time factor
if direction is 'right':
dir = 1
else if direction is 'left':
dir = -1
else
# raise exception
left_engine.run_timed (time_sp = degree*q, speed_sp = -300*dir)
right_engine.run_timed(time_sp = degree*q, speed_sp = 300*dir)
def pick_block(side):
turn(side, 90)
while ultrasonic.distance_centimeters > 10
follow_the line()
hook('raise')
turn(side, 180)
while not light_left in range(black_low, black_high) and light_right in range(black_low, black_high):
follow_the line()
turn(side, 90)
def leave_block(side):
turn(side, 90)
while not (light_left.red in range(blue_low, blue_high) and light_right.red in range(blue_low, blue_high)):
follow_the line()
hook('lower')
turn(side, 180)
while not light_left in range(black_low, black_high) and light_right in range(black_low, black_high):
follow_the line()
turn(side, 90)
while True:
follow_the_line()
if light_left.red in range(red_low,red_high):
pick_block('left')
elif light_right.red in range(red_low,red_high):
pick_block('right')
else:
continue
if light_left.red in range(blue_low, blue_high):
give_block('left')
elif light_right.red in range(blue_low, blue_high):
give_block('right')
else:
continue
<file_sep>from ev3dev.ev3 import *
import time
m1 = LargeMotor('outA')
m2 = LargeMotor('outD')
cs1 = ColorSensor('in1')
cs2 = ColorSensor('in2')
ts = TouchSensor()
nastawa = 45
integral1 = 0
integral2 = 0
last_error1 = 0
last_error2 = 0
base_vel = -60
while True:
cs1rli = cs1.reflected_light_intensity
error1 =nastawa - cs1rli
integral1 =0.5* integral1 + error1
derivative1 = error1 - last_error1
last_error1 = error1
skret1 = int(0.8*error1 + 18*derivative1)
if ts.is_pressed:
m1.run_forever(speed_sp =base_vel - skret1)
m2.run_forever(speed_sp =base_vel + skret1)
if cs1rli < 10:
m1.run_forever(speed_sp = -200)
m2.run_forever(speed_sp = 300)
if cs1rli > 100:
m1.run_forever(speed_sp = 300)
m2.run_forever(speed_sp = -200)
elif not ts.is_pressed:
m1.stop()
m2.stop()
print("uch 1: " + str(skret1)+ " light reflection: " + str( cs1rli) + " " + str(error1) + " " + str(integral1) + " " + str(derivative1) + str(skret1))
<file_sep># ev3
projekty robot ev3
<file_sep>from ev3dev.ev3 import *
from time import sleep
light_left = ColorSensor('in2')
light_right = ColorSensor('in1')
touch_sensor = TouchSensor('in4')
lcd = Screen()
right_engine = LargeMotor('outB')
left_engine = LargeMotor('outA')
white_left = 0
white_right = 0
black_left = 0
black_right = 0
lcd.clear()
while not touch_sensor.is_pressed:
black_left = light_left.reflected_light_intensity
black_right = light_right.reflected_light_intensity
print("black left:"+str(black_left)+"\n"+"black right:"+str(black_right))
lcd.draw.text((48,13),"black left:"+str(black_left)+"\n"+"black right:"+str(black_right))
lcd.update()
while touch_sensor.is_pressed:
continue
lcd.clear()
while not touch_sensor.is_pressed:
white_left = light_left.reflected_light_intensity
white_right = light_right.reflected_light_intensity
print("white left:"+str(white_left)+"\nwhite right:"+str(white_right))
lcd.draw.text((48,13),"white left:"+str(white_left)+"\nwhite right:"+str(white_right))
lcd.update()
while touch_sensor.is_pressed:
continue
lcd.clear()
lcd.draw.text((48,13),"wcisnij przycisk aby wystartowac")
lcd.update()
while not touch_sensor.is_pressed:
continue
while touch_sensor.is_pressed:
continue
lcd.clear()
lcd.draw.text((48,13),"wcisnij przycisk aby zakonczyc dzialanie programu")
lcd.update()
Kp = 4.0
Kd = 1.0
predkosc_bazowa = 150.0
srodek_l = (white_left + black_right) // 2
srodek_r = (white_right + black_right) // 2
blad = 0
poprzedni_blad = 0
blad_l = 0
blad_r = 0
blad_prop = 0.0
blad_deri = 0.0
while not touch_senor.is_pressed:
blad_l = light_left.reflected_light_intensity - srodek_l
blad_r = light_right.reflected_light_intensity - srodek_r
blad = blad_l - blad_r
blad_prop = Kp * float(blad)
blad_deri = Kd * (blad - poprzedni_blad)
left_engine.run_timed(time_sp = 100, speed_sp = -predkosc_bazowa - blad_prop + blad_deri, stop_action = "coast")
right_engine.run_timed(time_sp = 100, speed_sp = -predkosc_bazowa + blad_prop - blad_deri, stop_action = "coast")
poprzedni_blad = blad
sleep(0.1)
lcd.clear()
print("to jest juz koniec")
lcd.draw.text((48,13),"koniec dzialania programu")
lcd.update()
|
e57350715f145acae514f7b9539f8f1b8178e399
|
[
"Markdown",
"Python"
] | 5
|
Python
|
falownik/ev3
|
6264a5da34148b03247ec29c448fabb5bd842a5e
|
b7b54edda2aaa1a5ba9d22fb2944025a7416ffb4
|
refs/heads/main
|
<repo_name>indreklasn/react-skeleton-loader-example-blog-posts<file_sep>/src/App.js
import React, { useState, useEffect } from "react";
import "./styles.css";
import BlogPost from "./BlogPost";
const blogPost = {
title: "Indrek Lasn Blog Post",
subTitle: "This is a subtitle for the skeleton loader",
body:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
};
export default function App() {
const [hasPosts, setPost] = useState(false);
useEffect(() => {
const timer = setTimeout(() => {
setPost(true);
}, 1000);
return () => clearTimeout(timer);
});
if (hasPosts) {
return (
<BlogPost
title={blogPost.title}
body={blogPost.body}
subTitle={blogPost.subTitle}
/>
);
}
return <BlogPost />;
}
<file_sep>/README.md
# react-skeleton-loader-example-blog-posts
Created with CodeSandbox
|
9ca2bd35718df5e79d4d72be19fe4a28432e8d7a
|
[
"JavaScript",
"Markdown"
] | 2
|
JavaScript
|
indreklasn/react-skeleton-loader-example-blog-posts
|
0531d49e59cd381cf81afbb00dab630bdc314b67
|
53320d0eee30901e3cd7e3c71270bd47619b99c7
|
refs/heads/master
|
<repo_name>jfcameron/flappy-dot<file_sep>/src/game.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/game.h>
#include <jfc/Text_Sheet.png.h>
#include <memory>
#include <chrono>
#include <random>
using namespace flappy;
using namespace gdk;
static size_t g_HighScore(0);
static size_t increment_pipeCounter(size_t& pipeCounter, size_t size)
{
if (pipeCounter++; pipeCounter >= size) pipeCounter = 0;
return pipeCounter;
}
game::game(graphics::context::context_shared_ptr_type pGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudio,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets)
: pInputContext(aInputContext)
, pGameScene(gdk::graphics::context::scene_shared_ptr_type(std::move(pGraphicsContext->make_scene())))
, pMainCamera(std::shared_ptr<gdk::camera>(std::move(pGraphicsContext->make_camera())))
, scenery(flappy::scenery(pGraphicsContext, pGraphicsContext->get_alpha_cutoff_shader(), pGameScene, aAssets))
, bird(flappy::bird(pGraphicsContext, pGameScene, pInputContext, aAudio, aAssets))
, m_screens(aScreens)
, m_EventBus(aEventBus)
, m_menu(std::make_shared<decltype(m_menu)::element_type>(gdk::menu(
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::UpArrow);},
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::DownArrow);},
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::LeftArrow);},
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::RightArrow);},
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::Enter);},
[&]() {return pInputContext->get_key_just_pressed(keyboard::Key::Escape);})))
, m_BirdObserver(std::make_shared<bird::state_machine_type::observer_type>(
[&](bird::state aOld, bird::state aNew)
{
if (aOld == bird::state::alive && aNew == bird::state::dead)
{
updateHighScore();
m_EventBus->propagate_player_died_event({ m_Score });
m_menu->push(m_game_over_pane);
m_Mode = decltype(m_Mode)::dead;
}
}))
{
bird.add_observer(m_BirdObserver);
pGameScene->add_camera(pMainCamera);
for (size_t i(0); i < 10; ++i) clouds.push_back(flappy::cloud(pGraphicsContext, pGameScene, aAssets));
for (size_t i(0); i < 1; ++i) cities.push_back(flappy::city(pGraphicsContext, pGameScene, aAssets));
for (size_t i(0); i < 30; ++i) pipes.push_back(flappy::pipe(pGraphicsContext, pGameScene, aAssets));
// text stuff
auto pTextTexture = aAssets->get_textmap();
text_map map = aAssets->get_textmap();
pScoreText = std::make_shared<dynamic_text_renderer>(dynamic_text_renderer(pGraphicsContext,
map,
text_renderer::alignment::upper_edge));
pScoreText->set_model_matrix({ 0, 0.5f, 0 }, {}, { 0.1f });
pScoreText->add_to_scene(pGameScene);
pHighScoreText = std::make_shared<dynamic_text_renderer>(dynamic_text_renderer(pGraphicsContext,
map,
text_renderer::alignment::upper_edge));
pHighScoreText->set_model_matrix({ 0, 0.25f, 0 }, {}, { 0.05f });
pHighScoreText->hide();
pHighScoreText->add_to_scene(pGameScene);
updateHighScore();
pRetryText = std::make_shared<static_text_renderer>(static_text_renderer(pGraphicsContext,
map,
text_renderer::alignment::upper_edge,
L"retry"));
pRetryText->set_model_matrix({ 0.2f, 0.1f, 0 }, {}, { 0.05f });
pRetryText->hide();
pRetryText->add_to_scene(pGameScene);
pQuitText = std::make_shared<static_text_renderer>(static_text_renderer(pGraphicsContext,
map,
text_renderer::alignment::upper_edge,
L"quit"));
pQuitText->set_model_matrix({ -0.2f, 0.1f, 0 }, {}, { 0.05f });
pQuitText->hide();
pQuitText->add_to_scene(pGameScene);
m_game_over_pane = pane::make_pane();
{
auto retry = m_game_over_pane->make_element();
auto quit = m_game_over_pane->make_element();
auto gainedFocus = [&](std::shared_ptr<static_text_renderer> p)
{
if (m_pCurrentText) m_pCurrentText->show();
m_pCurrentText = p;
};
retry->set_west_neighbour(quit);
retry->set_on_just_gained_focus([=]() {gainedFocus(pRetryText);});
retry->set_on_activated([this, aEventBus]()
{
aEventBus->propagate_player_wants_to_reset_event({this});
});
quit->set_east_neighbour(retry);
quit->set_on_just_gained_focus([=]() {gainedFocus(pQuitText);});
quit->set_on_activated([this, aEventBus]()
{
aEventBus->propagate_player_wants_to_quit_event({this});
});
}
m_game_over_pane->set_on_just_gained_top([&]()
{
pHighScoreText->show();
pRetryText->show();
pQuitText->show();
});
m_game_over_pane->set_on_just_lost_top([&]()
{
pHighScoreText->hide();
pRetryText->hide();
pQuitText->hide();
});
m_Random.seed(std::chrono::system_clock::now().time_since_epoch().count());
static const auto standard_horizontal_delay = 0.5f;
static const auto minimum_height = -0.85f;
static const auto maximum_height = -0.25f;
static const auto vertical_interval = 1.305f;
// the different pipe layouts
// Classic vertical bars, spaced at 2 intervals
m_PipeBehaviours[0] = [](decltype(pipes)& pipes, decltype(pipeCounter)& counter, decltype(pipeDelay)& delay, decltype(m_Random)& random)
{
auto raw_random = random() % 8;
auto random_element = raw_random / 7.f;
const auto vertical_range = (maximum_height - minimum_height);
auto height = minimum_height + (random_element * vertical_range);
if (raw_random != 0)
{
pipes[increment_pipeCounter(counter, pipes.size())].set_up({ 2,height },
0,
flappy::pipe::set_up_model::up_pipe);
}
if (raw_random != 7)
{
pipes[increment_pipeCounter(counter, pipes.size())].set_up({ 2,height + vertical_interval },
3.1415926536f,
flappy::pipe::set_up_model::down_pipe);
}
delay = standard_horizontal_delay * 2;
};
// Sinewave
/*m_PipeBehaviours[0] = [](decltype(pipes)& pipes, decltype(pipeCounter)& counter, decltype(pipeDelay)& delay, decltype(m_Random)& random)
{
//shouldnt be static should be a member variable. i think these pipe layouts shoudl be classes.
static float i = 0;
auto raw_random = ((1 + (float)std::sin(i+=0.1f)) / 2) * 7;// random() % 8;
std::cout << raw_random << "\n";
auto random_element = raw_random / 7.f;
const auto vertical_range = (maximum_height - minimum_height);// *random_element;
auto height = minimum_height + (random_element * vertical_range);
if (raw_random >= 0.5f)
{
pipes[increment_pipeCounter(counter, pipes.size())].set_up({ 2,height },
0,
flappy::pipe::set_up_model::up_pipe);
}
if (raw_random < 6.5f)
{
pipes[increment_pipeCounter(counter, pipes.size())].set_up({ 2,height + vertical_interval },
3.1415926536f,
flappy::pipe::set_up_model::down_pipe);
}
delay = standard_horizontal_delay * 1;
};*/
}
void flappy::game::updateHighScore()
{
if (m_Score > g_HighScore) g_HighScore = m_Score;
pHighScoreText->update_text(L"high score:\n" + std::to_wstring(g_HighScore));
}
void game::update(float deltaTime,
float aspectRatio,
std::pair<int, int> windowSize,
std::pair<float, float> vpUpperLeft,
std::pair<float, float> vpSize)
{
pMainCamera->set_orthographic_projection(2, 2, 0.01f, 10, aspectRatio);
pMainCamera->set_viewport(vpUpperLeft.first, vpUpperLeft.second, vpSize.first, vpSize.second);
pGameScene->draw(windowSize);
scenery.update(deltaTime);
for (auto& pipe : pipes) pipe.update(deltaTime, pInputContext);
for (auto& cloud : clouds) cloud.update(deltaTime);
for (auto& city : cities) city.update(deltaTime);
pScoreText->update_text(std::to_wstring(m_Score));
switch (m_Mode)
{
case decltype(m_Mode)::playing:
{
if ((m_ScoreIncrementer += deltaTime) > 0.8f)
{
m_Score++;
m_ScoreIncrementer = 0;
}
bird.update(deltaTime, pipes);
if (pipeDelay -= deltaTime; pipeDelay <= 0)
{
m_PipeBehaviours[m_Random() % m_PipeBehaviours.size()](
pipes,
pipeCounter,
pipeDelay,
m_Random);
}
} break;
case decltype(m_Mode)::dead:
{
if (++m_PrompCounter % BLINK_RATE == 0)
{
m_BlinkStatus = !m_BlinkStatus;
if (m_pCurrentText)
{
if (m_BlinkStatus) m_pCurrentText->show();
else m_pCurrentText->hide();
}
}
m_menu->update();
} break;
default: break;
}
}
<file_sep>/src/flappy_event_bus.cpp
#include <jfc/flappy_event_bus.h>
using namespace flappy;
void event_bus::add_player_wants_to_quit_observer(decltype(m_PlayerWantsToQuit)::observer_weak_ptr_type pObserver)
{
m_PlayerWantsToQuit.add_observer(pObserver);
}
void event_bus::propagate_player_wants_to_quit_event(decltype(m_PlayerWantsToQuit)::event_type e)
{
m_PlayerWantsToQuit.propagate_event(e);
}
void event_bus::add_player_wants_to_reset_observer(decltype(m_PlayerWantsToReset)::observer_weak_ptr_type pObserver)
{
m_PlayerWantsToReset.add_observer(pObserver);
}
void event_bus::propagate_player_wants_to_reset_event(decltype(m_PlayerWantsToReset)::event_type e)
{
m_PlayerWantsToReset.propagate_event(e);
}
void flappy::event_bus::add_player_count_changed_observer(decltype(m_PlayerCountChanged)::observer_weak_ptr_type pObserver)
{
m_PlayerCountChanged.add_observer(pObserver);
}
void flappy::event_bus::propagate_player_count_changed_event(decltype(m_PlayerCountChanged)::event_type e)
{
m_PlayerCountChanged.propagate_event(e);
}
void flappy::event_bus::add_screen_pushed_event_observer(decltype(m_ScreenPushed)::observer_weak_ptr_type pObserver)
{
m_ScreenPushed.add_observer(pObserver);
}
void flappy::event_bus::propagate_screen_pushed_event(decltype(m_ScreenPushed)::event_type e)
{
m_ScreenPushed.propagate_event(e);
}
void flappy::event_bus::add_screen_popped_event_observer(decltype(m_ScreenPopped)::observer_weak_ptr_type pObserver)
{
m_ScreenPopped.add_observer(pObserver);
}
void flappy::event_bus::propagate_screen_popped_event(decltype(m_ScreenPopped)::event_type e)
{
m_ScreenPopped.propagate_event(e);
}
void flappy::event_bus::add_player_died_event_observer(decltype(m_PlayerDied)::observer_weak_ptr_type pObserver)
{
m_PlayerDied.add_observer(pObserver);
}
void flappy::event_bus::propagate_player_died_event(decltype(m_PlayerDied)::event_type e)
{
m_PlayerDied.propagate_event(e);
}
<file_sep>/include/jfc/file_example_OOG_1MG.ogg.h
#ifndef FILE_EXAMPLE_OOG_1MG_OGG_H
#define FILE_EXAMPLE_OOG_1MG_OGG_H
static const unsigned char file_example_OOG_1MG_ogg[] = {
0x4f, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x83, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x2d,
0x14, 0x22, 0x01, 0x1e, 0x01, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x00,
0x00, 0x00, 0x00, 0x01, 0x44, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x77, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x4f, 0x67,
0x67, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x83, 0x5d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4f, 0x01, 0x34,
0x10, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc9, 0x03, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73,
0x2b, 0x00, 0x00, 0x00, 0x58, 0x69, 0x70, 0x68, 0x2e, 0x4f, 0x72, 0x67,
0x20, 0x6c, 0x69, 0x62, 0x56, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x20, 0x49,
0x20, 0x32, 0x30, 0x31, 0x32, 0x30, 0x32, 0x30, 0x33, 0x20, 0x28, 0x4f,
0x6d, 0x6e, 0x69, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x29, 0x00,
0x00, 0x00, 0x00, 0x01, 0x05, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x29,
0x42, 0x43, 0x56, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x31, 0x4c, 0x20,
0xc5, 0x80, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x10, 0x00, 0x00, 0x60, 0x24,
0x29, 0x0e, 0x93, 0x66, 0x49, 0x29, 0xa5, 0x94, 0xa1, 0x28, 0x79, 0x98,
0x94, 0x48, 0x49, 0x29, 0xa5, 0x94, 0xc5, 0x30, 0x89, 0x98, 0x94, 0x89,
0xc5, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18,
0x63, 0x8c, 0x20, 0x34, 0x64, 0x15, 0x00, 0x00, 0x04, 0x00, 0x80, 0x28,
0x09, 0x8e, 0xa3, 0xe6, 0x49, 0x6a, 0xce, 0x39, 0x67, 0x18, 0x27, 0x8e,
0x72, 0xa0, 0x39, 0x69, 0x4e, 0x38, 0xa7, 0x20, 0x07, 0x8a, 0x51, 0xe0,
0x39, 0x09, 0xc2, 0xf5, 0x26, 0x63, 0x6e, 0xa6, 0xb4, 0xa6, 0x6b, 0x6e,
0xce, 0x29, 0x25, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x40,
0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21, 0x85, 0x14, 0x62, 0x88, 0x21,
0x86, 0x18, 0x62, 0x88, 0x21, 0x87, 0x1c, 0x72, 0xc8, 0x21, 0xa7, 0x9c,
0x72, 0x0a, 0x2a, 0xa8, 0xa0, 0x82, 0x0a, 0x32, 0xc8, 0x20, 0x83, 0x4c,
0x32, 0xe9, 0xa4, 0x93, 0x4e, 0x3a, 0xe9, 0xa8, 0xa3, 0x8e, 0x3a, 0xea,
0x28, 0xb4, 0xd0, 0x42, 0x0b, 0x2d, 0xb4, 0xd2, 0x4a, 0x4c, 0x31, 0xd5,
0x56, 0x63, 0xae, 0xbd, 0x06, 0x5d, 0x7c, 0x73, 0xce, 0x39, 0xe7, 0x9c,
0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x09, 0x42, 0x43, 0x56, 0x01,
0x00, 0x20, 0x00, 0x00, 0x04, 0x42, 0x06, 0x19, 0x64, 0x10, 0x42, 0x08,
0x21, 0x85, 0x14, 0x52, 0x88, 0x29, 0xa6, 0x98, 0x72, 0x0a, 0x32, 0xc8,
0x80, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x00,
0x00, 0x47, 0x91, 0x14, 0x49, 0xb1, 0x14, 0xcb, 0xb1, 0x1c, 0xcd, 0xd1,
0x24, 0x4f, 0xf2, 0x2c, 0x51, 0x13, 0x35, 0xd1, 0x33, 0x45, 0x53, 0x54,
0x4d, 0x55, 0x55, 0x55, 0x55, 0x75, 0x5d, 0x57, 0x76, 0x65, 0xd7, 0x76,
0x75, 0xd7, 0x76, 0x7d, 0x59, 0x98, 0x85, 0x5b, 0xb8, 0x7d, 0x59, 0xb8,
0x85, 0x5b, 0xd8, 0x85, 0x5d, 0xf7, 0x85, 0x61, 0x18, 0x86, 0x61, 0x18,
0x86, 0x61, 0x18, 0x86, 0x61, 0xf8, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7,
0x7d, 0x20, 0x34, 0x64, 0x15, 0x00, 0x20, 0x01, 0x00, 0xa0, 0x23, 0x39,
0x96, 0xe3, 0x29, 0xa2, 0x22, 0x1a, 0xa2, 0xe2, 0x39, 0xa2, 0x03, 0x84,
0x86, 0xac, 0x02, 0x00, 0x64, 0x00, 0x00, 0x04, 0x00, 0x20, 0x09, 0x92,
0x22, 0x29, 0x92, 0xa3, 0x49, 0xa6, 0x66, 0x6a, 0xae, 0x69, 0x9b, 0xb6,
0x68, 0xab, 0xb6, 0x6d, 0xcb, 0xb2, 0x2c, 0xcb, 0xb2, 0x0c, 0x84, 0x86,
0xac, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa0, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a,
0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0x66, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x40,
0x68, 0xc8, 0x2a, 0x00, 0x40, 0x02, 0x00, 0x40, 0xc7, 0x71, 0x1c, 0xc7,
0x71, 0x24, 0x45, 0x52, 0x24, 0xc7, 0x72, 0x2c, 0x07, 0x08, 0x0d, 0x59,
0x05, 0x00, 0xc8, 0x00, 0x00, 0x08, 0x00, 0x40, 0x52, 0x2c, 0xc5, 0x72,
0x34, 0x47, 0x73, 0x34, 0xc7, 0x73, 0x3c, 0xc7, 0x73, 0x3c, 0x47, 0x74,
0x44, 0xc9, 0x94, 0x4c, 0xcd, 0xf4, 0x4c, 0x0f, 0x08, 0x0d, 0x59, 0x05,
0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x31,
0x1c, 0xc5, 0x71, 0x1c, 0xc9, 0xd1, 0x24, 0x4f, 0x52, 0x2d, 0xd3, 0x72,
0x35, 0x57, 0x73, 0x3d, 0xd7, 0x73, 0x4d, 0xd7, 0x75, 0x5d, 0x57, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x81, 0xd0, 0x90,
0x55, 0x00, 0x00, 0x04, 0x00, 0x00, 0x21, 0x9d, 0x66, 0x96, 0x6a, 0x80,
0x08, 0x33, 0x90, 0x61, 0x20, 0x34, 0x64, 0x15, 0x00, 0x80, 0x00, 0x00,
0x00, 0x18, 0xa1, 0x08, 0x43, 0x0c, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00,
0x04, 0x00, 0x00, 0x88, 0xa1, 0xe4, 0x20, 0x9a, 0xd0, 0x9a, 0xf3, 0xcd,
0x39, 0x0e, 0x9a, 0xe5, 0xa0, 0xa9, 0x14, 0x9b, 0xd3, 0xc1, 0x89, 0x54,
0x9b, 0x27, 0xb9, 0xa9, 0x98, 0x9b, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x6c,
0xce, 0x19, 0xe3, 0x9c, 0x73, 0xce, 0x29, 0xca, 0x99, 0xc5, 0xa0, 0x99,
0xd0, 0x9a, 0x73, 0xce, 0x49, 0x0c, 0x9a, 0xa5, 0xa0, 0x99, 0xd0, 0x9a,
0x73, 0xce, 0x79, 0x12, 0x9b, 0x07, 0xad, 0xa9, 0xd2, 0x9a, 0x73, 0xce,
0x19, 0xe7, 0x9c, 0x0e, 0xc6, 0x19, 0x61, 0x9c, 0x73, 0xce, 0x69, 0xd2,
0x9a, 0x07, 0xa9, 0xd9, 0x58, 0x9b, 0x73, 0xce, 0x59, 0xd0, 0x9a, 0xe6,
0xa8, 0xb9, 0x14, 0x9b, 0x73, 0xce, 0x89, 0x94, 0x9b, 0x27, 0xb5, 0xb9,
0x54, 0x9b, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c,
0x73, 0xce, 0xa9, 0x5e, 0x9c, 0xce, 0xc1, 0x39, 0xe1, 0x9c, 0x73, 0xce,
0x89, 0xda, 0x9b, 0x6b, 0xb9, 0x09, 0x5d, 0x9c, 0x73, 0xce, 0xf9, 0x64,
0x9c, 0xee, 0xcd, 0x09, 0xe1, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73,
0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x09, 0x42, 0x43, 0x56, 0x01, 0x00,
0x40, 0x00, 0x00, 0x04, 0x61, 0xd8, 0x18, 0xc6, 0x9d, 0x82, 0x20, 0x7d,
0x8e, 0x06, 0x62, 0x14, 0x21, 0xa6, 0x21, 0x93, 0x1e, 0x74, 0x8f, 0x0e,
0x93, 0xa0, 0x31, 0xc8, 0x29, 0xa4, 0x1e, 0x8d, 0x8e, 0x46, 0x4a, 0xa9,
0x83, 0x50, 0x52, 0x19, 0x27, 0xa5, 0x74, 0x82, 0xd0, 0x90, 0x55, 0x00,
0x00, 0x20, 0x00, 0x00, 0x84, 0x10, 0x52, 0x48, 0x21, 0x85, 0x14, 0x52,
0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21,
0xa7, 0x9c, 0x72, 0x0a, 0x2a, 0xa8, 0xa4, 0x92, 0x8a, 0x2a, 0xca, 0x28,
0xb3, 0xcc, 0x32, 0xcb, 0x2c, 0xb3, 0xcc, 0x32, 0xcb, 0xac, 0xc3, 0xce,
0x3a, 0xeb, 0xb0, 0xc3, 0x10, 0x43, 0x0c, 0x31, 0xb4, 0xd2, 0x4a, 0x2c,
0x35, 0xd5, 0x56, 0x63, 0x8d, 0xb5, 0xe6, 0x9e, 0x73, 0xae, 0x39, 0x48,
0x6b, 0xa5, 0xb5, 0xd6, 0x5a, 0x2b, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5,
0x20, 0x34, 0x64, 0x15, 0x00, 0x00, 0x02, 0x00, 0x40, 0x20, 0x64, 0x90,
0x41, 0x06, 0x19, 0x85, 0x14, 0x52, 0x48, 0x21, 0x86, 0x98, 0x72, 0xca,
0x29, 0xa7, 0xa0, 0x82, 0x0a, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x02,
0x00, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x24, 0xcf, 0x11, 0x1d, 0xd1, 0x11,
0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xcf, 0xf1,
0x1c, 0x51, 0x12, 0x25, 0x51, 0x12, 0x25, 0xd1, 0x32, 0x2d, 0x53, 0x33,
0x3d, 0x55, 0x54, 0x55, 0x57, 0x76, 0x6d, 0x59, 0x97, 0x75, 0xdb, 0xb7,
0x85, 0x5d, 0xd8, 0x75, 0xdf, 0xd7, 0x7d, 0xdf, 0xd7, 0x8d, 0x5f, 0x17,
0x86, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59,
0x96, 0x65, 0x59, 0x96, 0x65, 0x09, 0x42, 0x43, 0x56, 0x01, 0x00, 0x20,
0x00, 0x00, 0x00, 0x42, 0x08, 0x21, 0x84, 0x14, 0x52, 0x48, 0x21, 0x85,
0x94, 0x62, 0x8c, 0x31, 0xc7, 0x9c, 0x83, 0x4e, 0x42, 0x09, 0x81, 0xd0,
0x90, 0x55, 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47,
0x71, 0x14, 0xc7, 0x91, 0x1c, 0xc9, 0x91, 0x24, 0x4b, 0xb2, 0x24, 0x4d,
0xd2, 0x2c, 0xcd, 0xf2, 0x34, 0x4f, 0xf3, 0x34, 0xd1, 0x13, 0x45, 0x51,
0x34, 0x4d, 0x53, 0x15, 0x5d, 0xd1, 0x15, 0x75, 0xd3, 0x16, 0x65, 0x53,
0x36, 0x5d, 0xd3, 0x35, 0x65, 0xd3, 0x55, 0x65, 0xd5, 0x76, 0x65, 0xd9,
0xb6, 0x65, 0x5b, 0xb7, 0x7d, 0x59, 0xb6, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf,
0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xd7, 0x75, 0x20,
0x34, 0x64, 0x15, 0x00, 0x20, 0x01, 0x00, 0xa0, 0x23, 0x39, 0x92, 0x22,
0x29, 0x92, 0x22, 0x39, 0x8e, 0xe3, 0x48, 0x92, 0x04, 0x84, 0x86, 0xac,
0x02, 0x00, 0x64, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x28, 0x8e, 0xe2, 0x38,
0x8e, 0x23, 0x49, 0x92, 0x24, 0x59, 0x92, 0x26, 0x79, 0x96, 0x67, 0x89,
0x9a, 0xa9, 0x99, 0x9e, 0xe9, 0xa9, 0xa2, 0x0a, 0x84, 0x86, 0xac, 0x02,
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x68,
0x8a, 0xa7, 0x98, 0x8a, 0xa7, 0x88, 0x8a, 0xe7, 0x88, 0x8e, 0x28, 0x89,
0x96, 0x69, 0x89, 0x9a, 0xaa, 0xb9, 0xa2, 0x6c, 0xca, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0x40, 0x68, 0xc8,
0x2a, 0x00, 0x40, 0x02, 0x00, 0x40, 0x47, 0x72, 0x24, 0x47, 0x72, 0x24,
0x45, 0x52, 0x24, 0x45, 0x72, 0x24, 0x07, 0x08, 0x0d, 0x59, 0x05, 0x00,
0xc8, 0x00, 0x00, 0x08, 0x00, 0xc0, 0x31, 0x1c, 0x43, 0x52, 0x24, 0xc7,
0xb2, 0x2c, 0x4d, 0xf3, 0x34, 0x4f, 0xf3, 0x34, 0xd1, 0x13, 0x3d, 0xd1,
0x33, 0x3d, 0x55, 0x74, 0x45, 0x17, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00,
0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x0c, 0x4b,
0xb1, 0x1c, 0xcd, 0xd1, 0x24, 0x51, 0x52, 0x2d, 0xd5, 0x52, 0x35, 0xd5,
0x52, 0x2d, 0x55, 0x54, 0x3d, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0xd5, 0x34, 0x4d, 0xd3, 0x34, 0x81, 0xd0, 0x90, 0x95, 0x00,
0x00, 0x19, 0x00, 0x00, 0x23, 0x41, 0x06, 0x19, 0x84, 0x10, 0x8a, 0x72,
0x90, 0x42, 0x6e, 0x3d, 0x58, 0x08, 0x31, 0xe6, 0x24, 0x05, 0xa1, 0x39,
0x06, 0xa1, 0xc4, 0x18, 0x84, 0xa7, 0x10, 0x33, 0x0c, 0x39, 0x0d, 0x22,
0x74, 0x90, 0x41, 0x27, 0x3d, 0xb8, 0x92, 0x39, 0xc3, 0x0c, 0xf3, 0xe0,
0x52, 0x28, 0x15, 0x44, 0x4c, 0x83, 0x8d, 0x25, 0x37, 0x8e, 0x20, 0x0d,
0xc2, 0xa6, 0x5c, 0x49, 0xe5, 0x38, 0x08, 0x42, 0x43, 0x56, 0x04, 0x00,
0x51, 0x00, 0x00, 0x80, 0x31, 0xc8, 0x31, 0xc4, 0x18, 0x72, 0xce, 0x49,
0xc9, 0xa0, 0x44, 0xce, 0x31, 0x09, 0x9d, 0x94, 0xc8, 0x39, 0x27, 0xa5,
0x93, 0xd2, 0x49, 0x29, 0x2d, 0x96, 0x18, 0x33, 0x29, 0x25, 0xa6, 0x12,
0x63, 0xe3, 0x9c, 0xa3, 0xd2, 0x49, 0xc9, 0xa4, 0x94, 0x18, 0x4b, 0x8a,
0x9d, 0xa4, 0x12, 0x63, 0x89, 0xad, 0x00, 0x00, 0x80, 0x00, 0x07, 0x00,
0x80, 0x00, 0x0b, 0xa1, 0xd0, 0x90, 0x15, 0x01, 0x40, 0x14, 0x00, 0x00,
0x62, 0x0c, 0x52, 0x0a, 0x29, 0x85, 0x94, 0x52, 0xce, 0x29, 0xe6, 0x90,
0x52, 0xca, 0x31, 0xe5, 0x1c, 0x52, 0x4a, 0x39, 0xa7, 0x9c, 0x53, 0xce,
0x39, 0x08, 0x1d, 0x84, 0xca, 0x31, 0x06, 0x9d, 0x83, 0x10, 0x29, 0xa5,
0x1c, 0x53, 0xce, 0x29, 0xc7, 0x1c, 0x84, 0xcc, 0x41, 0xe5, 0x9c, 0x83,
0xd0, 0x41, 0x28, 0x00, 0x00, 0x20, 0xc0, 0x01, 0x00, 0x20, 0xc0, 0x42,
0x28, 0x34, 0x64, 0x45, 0x00, 0x10, 0x27, 0x00, 0xe0, 0x70, 0x24, 0xcf,
0x93, 0x34, 0x4b, 0x14, 0x25, 0x4b, 0x13, 0x45, 0xcf, 0x14, 0x65, 0xd7,
0x13, 0x4d, 0xd7, 0x95, 0x34, 0xcd, 0x34, 0x35, 0x51, 0x54, 0x55, 0xcb,
0x13, 0x55, 0xd5, 0x54, 0x55, 0xdb, 0x16, 0x4d, 0x55, 0xb6, 0x25, 0x4d,
0x13, 0x4d, 0x4d, 0xf4, 0x54, 0x55, 0x13, 0x45, 0x55, 0x15, 0x55, 0xd3,
0x96, 0x4d, 0x55, 0xb5, 0x6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d, 0x94, 0xd2, 0x62, 0x6a,
0x2d, 0xc6, 0xd6, 0x62, 0xad, 0xa1, 0x94, 0xd6, 0x4a, 0x2a, 0xb1, 0x95,
0x92, 0x5a, 0x6c, 0x31, 0xe6, 0xda, 0x5a, 0x8c, 0x39, 0x94, 0xd2, 0x62,
0x49, 0xa9, 0xc5, 0x92, 0x52, 0x8c, 0x2d, 0xc6, 0x9a, 0x5b, 0x6c, 0xb9,
0xa6, 0x96, 0x6a, 0x6c, 0x31, 0xe6, 0x9a, 0x52, 0x8b, 0xb5, 0xe6, 0xda,
0x73, 0x6c, 0x35, 0xf6, 0xd4, 0x5a, 0xac, 0x2d, 0xc6, 0x9a, 0x53, 0x4b,
0xb5, 0xd6, 0x5a, 0x73, 0x8f, 0xb9, 0xf5, 0x56, 0x00, 0x00, 0xc0, 0x80,
0x03, 0x00, 0x40, 0x80, 0x09, 0x65, 0xa0, 0xd0, 0x90, 0x95, 0x00, 0x40,
0x14, 0x00, 0x00, 0x41, 0x88, 0x52, 0xce, 0x49, 0x69, 0x10, 0x72, 0xcc,
0x39, 0x2a, 0x09, 0x42, 0xcc, 0x39, 0x27, 0xa9, 0x72, 0x4c, 0x42, 0x29,
0x29, 0x55, 0xcc, 0x41, 0x08, 0x25, 0xb5, 0xce, 0x39, 0x29, 0x29, 0xc5,
0xd6, 0x39, 0x08, 0x25, 0xa5, 0x16, 0x4b, 0x2a, 0x2d, 0xc5, 0x56, 0x6b,
0x29, 0x29, 0xb5, 0x16, 0x6b, 0x2d, 0x00, 0x00, 0xa0, 0xc0, 0x01, 0x00,
0x20, 0xc0, 0x06, 0x4d, 0x89, 0xc5, 0x01, 0x0a, 0x0d, 0x59, 0x09, 0x00,
0x44, 0x01, 0x00, 0x20, 0xc6, 0x20, 0xc4, 0x18, 0x84, 0x06, 0x19, 0xa5,
0x18, 0x83, 0xd0, 0x18, 0xa4, 0x14, 0x63, 0x10, 0x22, 0xa5, 0x18, 0x73,
0x4e, 0x4a, 0xa5, 0x14, 0x63, 0xce, 0x49, 0xc9, 0x18, 0x73, 0x0e, 0x42,
0x2a, 0x19, 0x63, 0xce, 0x41, 0x28, 0x29, 0x84, 0x50, 0x4a, 0x2a, 0x29,
0x85, 0x10, 0x4a, 0x49, 0x25, 0xa5, 0x02, 0x00, 0x00, 0x0a, 0x1c, 0x00,
0x00, 0x02, 0x6c, 0xd0, 0x94, 0x58, 0x1c, 0xa0, 0xd0, 0x90, 0x15, 0x01,
0x40, 0x14, 0x00, 0x00, 0x60, 0x0c, 0x62, 0x0c, 0x31, 0x86, 0x20, 0x74,
0x54, 0x32, 0x2a, 0x11, 0x84, 0x4c, 0x4a, 0x27, 0xa9, 0x81, 0x10, 0x5a,
0x0b, 0xad, 0x75, 0xd6, 0x52, 0x6b, 0xa5, 0xc5, 0xcc, 0x5a, 0x6a, 0xad,
0xb4, 0xd8, 0x40, 0x08, 0xad, 0x85, 0xd6, 0x32, 0x4b, 0x25, 0xc6, 0xd4,
0x5a, 0x66, 0xad, 0xc4, 0x98, 0x5a, 0x2b, 0x00, 0x00, 0xec, 0xc0, 0x01,
0x00, 0xec, 0xc0, 0x42, 0x28, 0x34, 0x64, 0x25, 0x00, 0x90, 0x07, 0x00,
0x40, 0x18, 0xa3, 0x14, 0x63, 0xce, 0x39, 0x67, 0x10, 0x62, 0xcc, 0x39,
0xe8, 0x1c, 0x34, 0x08, 0x31, 0xe6, 0x1c, 0x84, 0x0e, 0x2a, 0xc6, 0x9c,
0x83, 0x0e, 0x42, 0x08, 0x15, 0x63, 0xce, 0x41, 0x08, 0x21, 0x84, 0xcc,
0x39, 0x08, 0x21, 0x84, 0x10, 0x42, 0xe6, 0x1c, 0x84, 0x10, 0x42, 0x08,
0xa1, 0x83, 0x10, 0x42, 0x08, 0xa5, 0x94, 0xd2, 0x41, 0x08, 0x21, 0x84,
0x52, 0x4a, 0xe9, 0x20, 0x84, 0x10, 0x42, 0x29, 0xa5, 0x74, 0x10, 0x42,
0x08, 0xa1, 0x94, 0x52, 0x0a, 0x00, 0x00, 0x2a, 0x70, 0x00, 0x00, 0x08,
0xb0, 0x51, 0x64, 0x73, 0x82, 0x91, 0xa0, 0x42, 0x43, 0x56, 0x02, 0x00,
0x79, 0x00, 0x00, 0x80, 0x31, 0x4a, 0x39, 0x07, 0xa1, 0x94, 0x46, 0x29,
0xc6, 0x20, 0x94, 0x92, 0x52, 0xa3, 0x14, 0x63, 0x10, 0x4a, 0x49, 0xa9,
0x72, 0x0c, 0x42, 0x29, 0x29, 0xc5, 0x56, 0x39, 0x07, 0xa1, 0x94, 0x94,
0x5a, 0xec, 0x20, 0x94, 0xd2, 0x5a, 0x6c, 0x35, 0x76, 0x10, 0x4a, 0x69,
0x2d, 0xc6, 0x5a, 0x43, 0x4a, 0xad, 0xc5, 0x58, 0x6b, 0xae, 0x21, 0xa5,
0xd6, 0x62, 0xac, 0x35, 0xd7, 0xd4, 0x5a, 0x8c, 0xb5, 0xe6, 0x9a, 0x6b,
0x4a, 0x2d, 0xc6, 0x5a, 0x6b, 0xcd, 0xb9, 0x00, 0x00, 0xdc, 0x05, 0x07,
0x00, 0xb0, 0x03, 0x1b, 0x45, 0x36, 0x27, 0x18, 0x09, 0x2a, 0x34, 0x64,
0x25, 0x00, 0x90, 0x07, 0x00, 0x80, 0x20, 0xa4, 0x14, 0x63, 0x8c, 0x31,
0x86, 0x14, 0x62, 0x8a, 0x31, 0xe7, 0x9c, 0x43, 0x08, 0x29, 0xc5, 0x98,
0x73, 0xce, 0x29, 0xa6, 0x18, 0x73, 0xce, 0x39, 0xe7, 0x94, 0x62, 0x8c,
0x39, 0xe7, 0x9c, 0x73, 0x8c, 0x31, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xc6,
0x98, 0x73, 0xce, 0x39, 0xe7, 0x1c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73,
0x8e, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39,
0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x09, 0x00, 0x00,
0x2a, 0x70, 0x00, 0x00, 0x08, 0xb0, 0x51, 0x64, 0x73, 0x82, 0x91, 0xa0,
0x42, 0x43, 0x56, 0x02, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x11, 0x56, 0x62,
0x8c, 0x31, 0xc6, 0x18, 0x1b, 0x08, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31,
0x46, 0x12, 0x62, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x6c, 0x31, 0xc6, 0x18,
0x63, 0x8c, 0x31, 0xc6, 0x98, 0x62, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c,
0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6,
0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63,
0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31,
0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18,
0x5b, 0x6b, 0xad, 0xb5, 0xd6, 0x5a, 0x6b, 0xad, 0xb5, 0xd6, 0x5a, 0x6b,
0xad, 0xb5, 0xd6, 0x5a, 0x6b, 0xad, 0x00, 0x40, 0xbf, 0x0a, 0x07, 0x00,
0xff, 0x07, 0x1b, 0x56, 0x47, 0x38, 0x29, 0x1a, 0x0b, 0x2c, 0x34, 0x64,
0x25, 0x00, 0x10, 0x0e, 0x00, 0x00, 0x18, 0xc3, 0x98, 0x73, 0x8e, 0x39,
0x06, 0x1d, 0x84, 0x86, 0x29, 0xe8, 0xa4, 0x84, 0x0e, 0x42, 0x08, 0xa1,
0x43, 0x4a, 0x39, 0x28, 0x25, 0x84, 0x50, 0x4a, 0x29, 0x29, 0x73, 0x4e,
0x4a, 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 0x3a, 0xe7, 0x1c, 0x84,
0x10, 0x42, 0x08, 0xa1, 0x84, 0x52, 0x4a, 0xe7, 0x1c, 0x74, 0x10, 0x42,
0x08, 0x21, 0x94, 0x50, 0x42, 0xe9, 0x20, 0x84, 0x10, 0x42, 0x08, 0xa1,
0x84, 0x52, 0x4a, 0x29, 0x1d, 0x84, 0x10, 0x42, 0x28, 0xa1, 0x84, 0x52,
0x4a, 0x29, 0x25, 0x84, 0x10, 0x42, 0x09, 0xa5, 0x94, 0x52, 0x4a, 0x29,
0xa5, 0x84, 0x10, 0x42, 0x08, 0xa1, 0x84, 0x12, 0x4a, 0x29, 0xa5, 0x94,
0x10, 0x42, 0x08, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x12, 0x42,
0x08, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x42, 0x08, 0xa1,
0x94, 0x50, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x08, 0x21, 0x84, 0x52,
0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x09, 0x21, 0x84, 0x50, 0x4a, 0x29,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0x21, 0x84, 0x12, 0x4a, 0x29, 0xa5, 0x94,
0x52, 0x4a, 0x29, 0xa5, 0x00, 0x00, 0x80, 0x03, 0x07, 0x00, 0x80, 0x00,
0x23, 0xe8, 0x24, 0xa3, 0xca, 0x22, 0x6c, 0x34, 0xe1, 0xc2, 0x03, 0x50,
0x68, 0xc8, 0x4a, 0x00, 0x80, 0x0c, 0x00, 0x00, 0x71, 0xd8, 0x6a, 0xeb,
0x29, 0xd6, 0xc8, 0x20, 0xc5, 0x9c, 0x84, 0x96, 0x4b, 0x84, 0x90, 0x72,
0x10, 0x62, 0x2e, 0x11, 0x52, 0x8a, 0x39, 0x47, 0xb1, 0x65, 0x48, 0x19,
0xc5, 0x18, 0xd5, 0x94, 0x31, 0xa5, 0x14, 0x53, 0x52, 0x6b, 0xe8, 0x9c,
0x62, 0x8c, 0x51, 0x4f, 0x9d, 0x63, 0x4a, 0x31, 0xc3, 0xac, 0x94, 0x56,
0x4a, 0x28, 0x91, 0x82, 0xd2, 0x72, 0xac, 0xb5, 0x76, 0xcc, 0x01, 0x00,
0x00, 0x20, 0x08, 0x00, 0x30, 0x10, 0x21, 0x33, 0x81, 0x40, 0x01, 0x14,
0x18, 0xc8, 0x00, 0x80, 0x03, 0x84, 0x04, 0x29, 0x00, 0xa0, 0xb0, 0xc0,
0xd0, 0x31, 0x5c, 0x04, 0x04, 0xe4, 0x12, 0x32, 0x0a, 0x0c, 0x0a, 0xc7,
0x84, 0x73, 0xd2, 0x69, 0x03, 0x00, 0x10, 0x84, 0xc8, 0x0c, 0x91, 0x88,
0x58, 0x0c, 0x12, 0x13, 0xaa, 0x81, 0xa2, 0x62, 0x3a, 0x00, 0x58, 0x5c,
0x60, 0xc8, 0x07, 0x80, 0x0c, 0x8d, 0x8d, 0xb4, 0x8b, 0x0b, 0xe8, 0x32,
0xc0, 0x05, 0x5d, 0xdc, 0x75, 0x20, 0x84, 0x20, 0x04, 0x21, 0x88, 0xc5,
0x01, 0x14, 0x90, 0x80, 0x83, 0x13, 0x6e, 0x78, 0xe2, 0x0d, 0x4f, 0xb8,
0xc1, 0x09, 0x3a, 0x45, 0xa5, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x1e, 0x00, 0x00, 0x92, 0x0d, 0x20, 0x22, 0x22, 0x9a, 0x39,
0x8e, 0x0e, 0x8f, 0x0f, 0x90, 0x10, 0x91, 0x11, 0x92, 0x12, 0x93, 0x13,
0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x80, 0x0f, 0x00, 0x80,
0x24, 0x05, 0x88, 0x88, 0x88, 0x66, 0x8e, 0xa3, 0xc3, 0xe3, 0x03, 0x24,
0x44, 0x64, 0x84, 0xa4, 0xc4, 0xe4, 0x04, 0x25,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xc0, 0xfc, 0xcd, 0x2b, 0x73, 0x2b, 0xfc, 0xfb,
0x85, 0x75, 0x5e, 0x1c, 0x40, 0xee, 0xe7, 0x1e, 0xfa, 0x37, 0xd3, 0xeb,
0xd9, 0x2b, 0x99, 0x1e, 0x01, 0x4f, 0x3e, 0xc9, 0xf7, 0xf1, 0xbf, 0xe3,
0xda, 0x64, 0xff, 0xcb, 0xe3, 0x7d, 0x5e, 0x64, 0xdd, 0x56, 0x92, 0x3c,
0xc9, 0x19, 0xce, 0x45, 0x72, 0x5d, 0x30, 0x94, 0x60, 0x78, 0x60, 0x80,
0x7c, 0x29, 0x6d, 0xca, 0xe1, 0xab, 0xf3, 0xd0, 0x01, 0x6a, 0x71, 0xbd,
0xd1, 0xf3, 0x3f, 0xc7, 0x15, 0x50, 0x00, 0xe0, 0x4d, 0x00, 0x70, 0x01,
0x38, 0x1f, 0x0e, 0xb0, 0xb6, 0x1e, 0x2b, 0xdb, 0xaf, 0xbf, 0x8a, 0xcd,
0x39, 0x3f, 0xbe, 0x8a, 0x17, 0xdd, 0x0d, 0x00, 0x60, 0xb8, 0x47, 0xa6,
0x00, 0x0c, 0x07, 0x00
};
#endif /* FILE_EXAMPLE_OOG_1MG_OGG_H */
<file_sep>/src/options_screen.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/options_screen.h>
#include <sstream>
using namespace flappy;
options_screen::options_screen(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudioContext,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets)
: m_pMainScene(graphics::context::scene_shared_ptr_type(std::move(aGraphicsContext->make_scene())))
, m_pInput(aInputContext)
, m_pMainCamera(std::shared_ptr<gdk::camera>(std::move(aGraphicsContext->make_camera())))
, m_Screens(aScreens)
, m_menu(std::make_shared<decltype(m_menu)::element_type>(gdk::menu(
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::UpArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::DownArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::LeftArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::RightArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::Enter);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::Escape);})))
, m_pEventBus(aEventBus)
{
m_pMainScene->add_camera(m_pMainCamera);
//TODO: move this elsewhere. either assets or a new "Flappy::Controls" object or something.
m_pControls = gdk::controls::make(aInputContext, true, true, {0});
// select_binding_pane
{
std::set<std::string> binding_names{
"MenuUp",
"MenuDown",
"MenuLeft",
"MenuRight",
"Jump",
};
float h = 0.0f;
for (const auto& b : binding_names)
{
std::wstringstream ss;
ss << b.c_str();
std::wstring wstring = ss.str();
decltype(m_BindingNamesTexts)::value_type text(new static_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
gdk::text_renderer::alignment::center,
wstring));
text->set_model_matrix({ 0, h, 0 }, {}, { 0.05f });
text->add_to_scene(m_pMainScene);
text->hide();
h += 0.1f;
m_BindingNamesTexts.push_back(text);
}
select_binding_pane = pane::make_pane();
{
select_binding_pane->set_on_just_gained_top([&]()
{
std::cout << "select gained top\n";
for (auto& b : m_BindingNamesTexts) b->show();
});
select_binding_pane->set_on_just_lost_top([&]()
{
std::cout << "select lost top\n";
for (auto& b : m_BindingNamesTexts) b->hide();
});
}
}
// m_main_pane
{
const float horizontal = 0.f;
float height = 0.3f;
const float height_offset = 0.075f;
const auto text_alignment = gdk::text_renderer::alignment::center;
m_MusicText = decltype(m_MusicText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Music ON"));
m_MusicText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_MusicText->add_to_scene(m_pMainScene);
m_MusicText->hide();
height -= height_offset;
m_VolumeText = decltype(m_VolumeText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Volume 100p"));
m_VolumeText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_VolumeText->add_to_scene(m_pMainScene);
m_VolumeText->hide();
height -= height_offset * 3;
m_PlayerConfigSelect = decltype(m_PlayerConfigSelect)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Config Player 1"));
m_PlayerConfigSelect->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_PlayerConfigSelect->add_to_scene(m_pMainScene);
m_PlayerConfigSelect->hide();
height -= height_offset;
m_ActivateKeyboardText = decltype(m_ActivateKeyboardText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Keyboard ON"));
m_ActivateKeyboardText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_ActivateKeyboardText->add_to_scene(m_pMainScene);
m_ActivateKeyboardText->hide();
height -= height_offset;
m_ActivateMouseText = decltype(m_ActivateMouseText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Mouse ON"));
m_ActivateMouseText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_ActivateMouseText->add_to_scene(m_pMainScene);
m_ActivateMouseText->hide();
height -= height_offset;
m_SelectGamepadText = decltype(m_SelectGamepadText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Gamepad OFF"));
m_SelectGamepadText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_SelectGamepadText->add_to_scene(m_pMainScene);
m_SelectGamepadText->hide();
height -= height_offset;
m_ChangeBindingsText = decltype(m_ChangeBindingsText)(new dynamic_text_renderer(aGraphicsContext,
aAssets->get_textmap(),
text_alignment,
L"Change bindings"));
m_ChangeBindingsText->set_model_matrix({ horizontal, height, 0 }, {}, { 0.05f });
m_ChangeBindingsText->add_to_scene(m_pMainScene);
m_ChangeBindingsText->hide();
auto lostFocus = [=]()
{
show_current_text();
};
m_main_pane = pane::make_pane();
{
m_main_pane->set_on_just_gained_top([&]()
{
m_MusicText->show();
m_VolumeText->show();
m_PlayerConfigSelect->show();
m_ActivateKeyboardText->show();
m_ActivateMouseText->show();
m_SelectGamepadText->show();
m_ChangeBindingsText->show();
});
m_main_pane->set_on_just_lost_top([&]()
{
m_MusicText->hide();
m_VolumeText->hide();
m_PlayerConfigSelect->hide();
m_ActivateKeyboardText->hide();
m_ActivateMouseText->hide();
m_SelectGamepadText->hide();
m_ChangeBindingsText->hide();
});
auto pMusicButton = m_main_pane->make_element();
auto pVolumeButton = m_main_pane->make_element();
auto pPlayerConfigButton = m_main_pane->make_element();
auto pActivateKeyboardButton = m_main_pane->make_element();
auto pActivateMouseButton = m_main_pane->make_element();
auto pSelectGamepadButton = m_main_pane->make_element();
auto pChangeBindingsButton = m_main_pane->make_element();
pMusicButton->set_south_neighbour(pVolumeButton);
pMusicButton->set_on_just_lost_focus(lostFocus);
pMusicButton->set_on_just_gained_focus([=]()
{
set_current_text(m_MusicText);
});
pMusicButton->set_on_activated([=]()
{
//change this, obviously. it is just stub
static bool bState(true);
bState = !bState;
if (bState) m_MusicText->update_text(L"Music ON");
else m_MusicText->update_text(L"Music OFF");
});
pVolumeButton->set_north_neighbour(pMusicButton);
pVolumeButton->set_south_neighbour(pPlayerConfigButton);
pVolumeButton->set_on_just_lost_focus(lostFocus);
pVolumeButton->set_on_just_gained_focus([=]()
{
set_current_text(m_VolumeText);
});
pVolumeButton->set_while_focused([=]()
{
//change obviously, this is stub.
static int vol = 100.f;
const int vol_inc = 10.f;
if (m_pInput->get_key_just_pressed(keyboard::Key::LeftArrow)) vol -= vol_inc;
if (m_pInput->get_key_just_pressed(keyboard::Key::RightArrow)) vol += vol_inc;
vol = vol < 0 ? 0 : vol;
vol = vol > 100 ? 100 : vol;
m_VolumeText->update_text(L"Volume " + std::to_wstring(vol));
});
pPlayerConfigButton->set_north_neighbour(pVolumeButton);
pPlayerConfigButton->set_south_neighbour(pActivateKeyboardButton);
pPlayerConfigButton->set_on_just_lost_focus(lostFocus);
pPlayerConfigButton->set_on_just_gained_focus([=]()
{
set_current_text(m_PlayerConfigSelect);
});
pPlayerConfigButton->set_while_focused([=]()
{
//change obviously, this is stub.
static const int MAX_PLAYER = 3;
if (m_pInput->get_key_just_pressed(keyboard::Key::LeftArrow))
{
if (m_player_to_configure > 0) m_player_to_configure--;
}
if (m_pInput->get_key_just_pressed(keyboard::Key::RightArrow))
{
if (m_player_to_configure < MAX_PLAYER) m_player_to_configure++;
}
m_PlayerConfigSelect->update_text(L"Config Player " + std::to_wstring(1 + m_player_to_configure));
});
pPlayerConfigButton->set_on_activated([=]()
{
//m_Screens->push(m_GameScreen);
});
pActivateKeyboardButton->set_north_neighbour(pPlayerConfigButton);
pActivateKeyboardButton->set_south_neighbour(pActivateMouseButton);
pActivateKeyboardButton->set_on_just_lost_focus(lostFocus);
pActivateKeyboardButton->set_on_just_gained_focus([=]()
{
set_current_text(m_ActivateKeyboardText);
});
pActivateKeyboardButton->set_on_activated([=]()
{
//change obviously, this is stub.
static bool bKeyboardActive(true);
bKeyboardActive = !bKeyboardActive;
m_ActivateKeyboardText->update_text(L"Keyboard " + std::wstring(bKeyboardActive ? L"ON" : L"OFF"));
});
pActivateMouseButton->set_north_neighbour(pActivateKeyboardButton);
pActivateMouseButton->set_south_neighbour(pSelectGamepadButton);
pActivateMouseButton->set_on_just_lost_focus(lostFocus);
pActivateMouseButton->set_on_just_gained_focus([=]()
{
set_current_text(m_ActivateMouseText);
});
pActivateMouseButton->set_on_activated([=]()
{
//change obviously, this is stub.
static bool bMouseActive(true);
bMouseActive = !bMouseActive;
m_ActivateMouseText->update_text(L"Mouse " + std::wstring(bMouseActive ? L"ON" : L"OFF"));
});
pSelectGamepadButton->set_north_neighbour(pActivateMouseButton);
pSelectGamepadButton->set_south_neighbour(pChangeBindingsButton);
pSelectGamepadButton->set_on_just_lost_focus(lostFocus);
pSelectGamepadButton->set_on_just_gained_focus([=]()
{
set_current_text(m_SelectGamepadText);
});
pSelectGamepadButton->set_while_focused([=]()
{
//change obviously, this is stub.
static const short int MAX_GAMEPADS(4);
static short int gamepad_index(0);
if (m_pInput->get_key_just_pressed(keyboard::Key::LeftArrow))
if (gamepad_index > 0) gamepad_index--;
if (m_pInput->get_key_just_pressed(keyboard::Key::RightArrow))
if (gamepad_index < MAX_GAMEPADS) gamepad_index++;
m_SelectGamepadText->update_text(L"Gamepad " + std::wstring(gamepad_index == 0
? L"OFF"
: std::to_wstring(0 + gamepad_index)));
});
//pChangeBindingsButton
pChangeBindingsButton->set_north_neighbour(pSelectGamepadButton);
pChangeBindingsButton->set_on_just_lost_focus(lostFocus);
pChangeBindingsButton->set_on_just_gained_focus([=]()
{
set_current_text(m_ChangeBindingsText);
});
pChangeBindingsButton->set_while_focused([=]()
{
});
pChangeBindingsButton->set_on_activated([=]()
{
});
}
}
m_menu->push(m_main_pane);
}
void options_screen::update(float deltaTime, float aspectRatio, std::pair<int, int> windowSize)
{
flappy::screen::update(deltaTime, aspectRatio, windowSize);
m_menu->update();
m_pMainCamera->set_orthographic_projection(2, 2, 0.0075, 10, aspectRatio);
m_pMainScene->draw(windowSize);
//if (m_pConfig) m_pConfig->update();
if (m_pInput->get_key_just_pressed(keyboard::Key::Escape))
{
m_Screens->pop();
}
}
<file_sep>/include/jfc/assets.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_ASSETS_H
#define FLAPPY_ASSETS_H
#include <gdk/audio/context.h>
#include <gdk/graphics_context.h>
#include <gdk/text_map.h>
#include <gdk/controls.h>
#include <memory>
#include <array>
namespace flappy
{
using namespace gdk;
/// \brief loads all resources (sounds, textures), provides const getters to them
/// for use throughout the program.
class assets
{
public:
using shared_ptr = std::shared_ptr<flappy::assets>;
private:
/// \brief ptr to the graphics context used throughout flappy
graphics::context::context_shared_ptr_type m_pGraphics;
/// \brief ptr to the audio context used throughout flappy
audio::context::context_shared_ptr_type m_pAudio;
/// \brief coin sound effect
audio::context::sound_shared_ptr_type m_CoinSound;
/// \brief the texture containing the rasterized alphanumeric characters
std::shared_ptr<gdk::texture> m_TextTexture;
/// \brief text map used throughout the program
text_map m_TextMap;
/// \brief textures used for the background layer of the game/menu scenes
std::array<std::shared_ptr<texture>, 8> m_BGLayerTextures;
/// \brief texture sheet containing bird graphics etc.
std::shared_ptr<gdk::texture> m_SpriteSheet;
/// \brief bird flap sound effect
audio::context::sound_shared_ptr_type m_FlapSound;
public:
decltype(m_CoinSound) get_coin_sound() const;
decltype(m_TextMap) get_textmap() const;
decltype(m_BGLayerTextures) get_bglayertextures() const;
decltype(m_SpriteSheet) get_spritesheet() const;
decltype(m_FlapSound) get_flapsound() const;
assets(decltype(m_pGraphics) aGraphics,
decltype(m_pAudio) pAudio,
input::context::context_shared_ptr_type pInput);
};
}
#endif
<file_sep>/include/jfc/pipe.h
// © 2020 <NAME> - All Rights Reserved
#ifndef JFC_FLAPPY_PIPE_H
#define JFC_FLAPPY_PIPE_H
#include <gdk/graphics_context.h>
#include <gdk/scene.h>
#include <gdk/entity.h>
#include <gdk/model.h>
#include <gdk/input_context.h>
#include <jfc/assets.h>
#include <random>
#include <array>
namespace flappy
{
/// \brief the game's obstacles
class pipe final
{
public:
enum class set_up_model
{
up_pipe,
down_pipe
};
private:
//! instanced pseudo random number generator
std::default_random_engine m_Random;
//! position in the scene
std::shared_ptr<gdk::entity> m_Entity;
//! shader and uniform data
std::shared_ptr<gdk::material> m_Material;
//! model for the upwards pipe
std::shared_ptr<gdk::model> m_UpPipeModel;
//! model for the downwards pipe
std::shared_ptr<gdk::model> m_DownPipeModel;
gdk::Vector2<float> m_Position;
gdk::Vector2<float> m_Scale;
float m_Rotation = 0;
public:
decltype(m_Position) getPosition() const;
decltype(m_Scale) getScale() const;
decltype(m_Rotation) getRotation() const;
void update(const float delta, gdk::input::context::context_shared_ptr_type pInput);
bool check_collision(const gdk::graphics_mat4x4_type &aWorldPosition) const;
void set_up(const decltype(m_Position)& aPosition, const decltype(m_Rotation) aRotation, const set_up_model &aModel);
pipe(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aAssets);
~pipe() = default;
};
};
#endif
<file_sep>/include/jfc/bird.h
// © 2020 <NAME> - All Rights Reserved
#ifndef JFC_FLAPPY_BIRD_H
#define JFC_FLAPPY_BIRD_H
#include <gdk/graphics_context.h>
#include <gdk/audio/context.h>
#include <gdk/scene.h>
#include <gdk/entity.h>
#include <gdk/input_context.h>
#include <gdk/state_machine.h>
#include <jfc/pipe.h>
#include <jfc/assets.h>
#include <random>
#include <array>
namespace flappy
{
/// \brief the birdy player character
class bird final
{
public:
/// \brief fixed horizontal position occupied by the player
static constexpr float player_x = -0.25f;
/// \brief bird's possible states, managed by the state machine
enum class state
{
alive,
dead
};
/// \brief type used by the state machine
using state_machine_type = jfc::state_machine<state>;
private:
/// \brief wrapper for state. allows observers to see when state changes
state_machine_type m_state;
/// \brief ptr to input system
gdk::input::context::context_shared_ptr_type m_pInput;
/// \brief ptr to the graphics entity
std::shared_ptr<gdk::entity> m_Entity;
/// \brief material used to decorate the entity
std::shared_ptr<gdk::material> m_Material;
/// \brief emits the jump sound effect
std::shared_ptr<gdk::audio::emitter> m_JumpSFX;
//TODO: move to an animator2d class
float accumulator = 0;
int frameIndex = 0;
//
/// \brief speed of the bird, affected by gravity and jumping
float m_VerticalSpeed = 0;
/// \brief x,y position of the bird.
gdk::Vector2<float> m_Position;
gdk::graphics_mat4x4_type get_world_position();
public:
void add_observer(decltype(m_state)::observer_ptr p);
void update(float delta, std::vector<pipe> pipes);
bird(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
gdk::input::context::context_shared_ptr_type pInput,
gdk::audio::context::context_shared_ptr_type pAudio,
flappy::assets::shared_ptr aAssets);
};
}
#endif
<file_sep>/include/jfc/flappy_screen.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_SCREEN_H
#define FLAPPY_SCREEN_H
#include <gdk/screen.h>
#include <gdk/text_renderer.h>
#include <memory>
namespace flappy
{
/// \brief base screen type for this game
///
/// adds functionality for blinking the currently
/// focused menu item
///
/// TODO: consider moving this work to a flappy_menu, which wraps gdk::menu
/// since this does menu stuff and menus are not exclusive to screens
class screen : public gdk::screen
{
private:
static constexpr int BLINK_RATE = 26;
//! used to flash current selection
bool m_BlinkStatus = true;
//! Used to determine which text item should blink
std::shared_ptr<gdk::text_renderer> m_pCurrentText;
//! blink counter
int m_PrompCounter = 0;
protected:
//! sets the text to blink (current user selection)
void set_current_text(std::shared_ptr<gdk::text_renderer> aText);
//! shows the current text if it is not nullptr
void show_current_text();
public:
virtual void update(float delta,
float aspectRatio,
std::pair<int, int> windowSize) override;
virtual ~screen() = default;
};
}
#endif
<file_sep>/src/game_screen.cpp
#include <jfc/game_screen.h>
using namespace gdk;
game_screen::game_screen(graphics::context::context_shared_ptr_type pGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudio,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets)
: m_InputContext(aInputContext)
, m_Screens(aScreens)
, m_pGraphicsContext(pGraphicsContext)
, m_pAudio(aAudio)
, m_PlayerCountChangedObserver(std::make_shared< std::function<void(flappy::player_count_changed_event)>>(
[this, aAssets, aEventBus](flappy::player_count_changed_event e)
{
m_games.clear();
for (int i(0); i < e.count; ++i)
m_games.push_back(std::shared_ptr<flappy::game>(new flappy::game(m_pGraphicsContext,
m_InputContext,
m_pAudio,
m_Screens,
aEventBus,
aAssets)));
}))
, m_PlayerWantsToResetObserver(std::make_shared<std::function<void(flappy::player_wants_to_reset_event e)>>(
[this, aAssets, aEventBus](flappy::player_wants_to_reset_event e)
{
for (size_t i(0); i < m_games.size(); ++i)
{
if (m_games[i].get() == e.game)
{
m_games[i].reset(new flappy::game(m_pGraphicsContext,
m_InputContext,
m_pAudio,
m_Screens,
aEventBus,
aAssets));
}
}
}))
, m_PlayerWantsToQuitObserver(std::make_shared<std::function<void(flappy::player_wants_to_quit_event e)>>(
[this, aAssets, aEventBus](flappy::player_wants_to_quit_event e)
{
for (size_t i(0); i < m_games.size(); ++i)
{
if (m_games[i].get() == e.game)
{
m_games[i].reset(new flappy::game(m_pGraphicsContext,
m_InputContext,
m_pAudio,
m_Screens,
aEventBus,
aAssets));
}
}
//if top == this pop else no
m_Screens->pop();
}))
, m_pBlackBGScene(gdk::graphics::context::scene_shared_ptr_type(std::move(pGraphicsContext->make_scene())))
, m_pBlackBGCamera(std::shared_ptr<gdk::camera>(std::move(pGraphicsContext->make_camera())))
{
m_pBlackBGCamera->set_clear_color({});
m_pBlackBGScene->add_camera(m_pBlackBGCamera);
(*m_PlayerCountChangedObserver)({ 1 });
aEventBus->add_player_count_changed_observer(m_PlayerCountChangedObserver);
aEventBus->add_player_wants_to_reset_observer(m_PlayerWantsToResetObserver);
aEventBus->add_player_wants_to_quit_observer(m_PlayerWantsToQuitObserver);
}
void game_screen::update(float deltaTime, float aspectRatio, std::pair<int, int> windowSize)
{
flappy::screen::update(deltaTime, aspectRatio, windowSize);
struct screen_layout
{
std::pair<float, float> winsizeScale;
std::pair<float, float> topLeft;
std::pair<float, float> size;
};
static const std::vector<std::vector<screen_layout>> layouts({
// 1 player
{
{{1.0f,1.0f}, {0.0f,0.0f},{1.0f,1.0f}},
},
// 2 player
{
{{1.0f,0.5f}, {0.0f,0.0f},{1.0f,0.5f}},
{{1.0f,0.5f}, {0.0f,0.5f},{1.0f,0.5f}},
},
// 3 player
{
{{0.5f,0.5f}, {0.0f,0.0f},{0.5f,0.5f}},
{{0.5f,0.5f}, {0.5f,0.5f},{0.5f,0.5f}},
{{0.5f,0.5f}, {0.0f,0.5f},{0.5f,0.5f}},
},
// 4 player
{
{{0.5f,0.5f}, {0.0f,0.0f},{0.5f,0.5f}},
{{0.5f,0.5f}, {0.5f,0.0f},{0.5f,0.5f}},
{{0.5f,0.5f}, {0.0f,0.5f},{0.5f,0.5f}},
{{0.5f,0.5f}, {0.5f,0.5f},{0.5f,0.5f}},
},
});
m_pBlackBGScene->draw(windowSize);
std::pair<int, int> size = { 1, 1 };
auto zeroedPlayerCount = m_games.size() - 1;
for (decltype(m_games)::size_type i(0); i < m_games.size(); ++i)
{
auto ratio =
(layouts[zeroedPlayerCount][i].winsizeScale.first * static_cast<float>(windowSize.first))/
(layouts[zeroedPlayerCount][i].winsizeScale.second * static_cast<float>(windowSize.second));
m_games[i]->update(deltaTime,
ratio,
windowSize,
layouts[zeroedPlayerCount][i].topLeft,
layouts[zeroedPlayerCount][i].size);
}
}
<file_sep>/include/jfc/game_screen.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_GAME_SCREEN_H
#define FLAPPY_GAME_SCREEN_H
#include <gdk/screen.h>
#include <gdk/graphics_context.h>
#include <gdk/input_context.h>
#include <gdk/audio/context.h>
#include <gdk/scene.h>
#include <gdk/text_map.h>
#include <gdk/static_text_renderer.h>
#include <gdk/dynamic_text_renderer.h>
#include <jfc/game.h>
#include <jfc/Text_Sheet.png.h>
#include <jfc/Sprite_Sheet.png.h>
#include <jfc/Floor.png.h>
#include <jfc/background.h>
#include <jfc/cloud.h>
#include <jfc/bird.h>
#include <jfc/city.h>
#include <jfc/pipe.h>
#include <jfc/screen_stack.h>
#include <jfc/flappy_event_bus.h>
#include <jfc/assets.h>
#include <jfc/flappy_screen.h>
#include <array>
#include <memory>
#include <functional>
namespace gdk
{
/// \brief manages the game instances, splits the screen.
///
/// each concurrent player gets their own game instance and their own split
/// of the total screen
class game_screen final : public flappy::screen
{
/// \brief collection of games,
std::vector<std::shared_ptr<flappy::game>> m_games;
input::context::context_shared_ptr_type m_InputContext;
screen_stack_ptr_type m_Screens;
graphics::context::context_shared_ptr_type m_pGraphicsContext;
audio::context::context_shared_ptr_type m_pAudio;
/// \brief callback when the # of splitscreen players change
std::shared_ptr <std::function<void(flappy::player_count_changed_event)>> m_PlayerCountChangedObserver;
/// \brief watches for when a player wants to reset their game
std::shared_ptr <std::function<void(flappy::player_wants_to_reset_event)>> m_PlayerWantsToResetObserver;
/// \brief watches for when a player wants to quit their game
std::shared_ptr <std::function<void(flappy::player_wants_to_quit_event)>> m_PlayerWantsToQuitObserver;
/// \brief used to render a black screen behind the game instances
gdk::graphics::context::scene_shared_ptr_type m_pBlackBGScene;
/// \brief used to render a black screen behind the game instances
std::shared_ptr<gdk::camera> m_pBlackBGCamera;
public:
virtual void update(float delta, float aspectRatio, std::pair<int, int> windowSize) override;
game_screen(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudio,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets);
virtual ~game_screen() = default;
};
}
#endif
<file_sep>/src/background_music_player.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/background_music_player.h>
<file_sep>/CMakeLists.txt
# © 2020 <NAME> - All Rights Reserved
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(null)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/jfc-cmake/jfclib.cmake")
option(JFC_BUILD_DEMO "Build the demo" OFF)
option(JFC_BUILD_DOCS "Build documentation" OFF)
option(JFC_BUILD_TESTS "Build unit tests" OFF)
add_subdirectory(thirdparty)
jfc_project(executable
NAME "flappy"
VERSION 0.9
DESCRIPTION "yet another flappy bird clone"
C++_STANDARD 17
C_STANDARD 90
PUBLIC_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/include
${gdkaudio_INCLUDE_DIRECTORIES}
${gdkgraphics_INCLUDE_DIRECTORIES}
${gdkinput_INCLUDE_DIRECTORIES}
${gdktextrenderer_INCLUDE_DIRECTORIES}
${jfceventbus_INCLUDE_DIRECTORIES}
${simpleglfw_INCLUDE_DIRECTORIES}
PRIVATE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/src/include
LIBRARIES
${gdkaudio_LIBRARIES}
${gdkgraphics_LIBRARIES}
${gdkinput_LIBRARIES}
${gdktextrenderer_LIBRARIES}
${jfceventbus_LIBRARIES}
${simpleglfw_LIBRARIES}
SOURCE_LIST
${CMAKE_CURRENT_SOURCE_DIR}/src/assets.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/background.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/bird.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/city.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/city.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/cloud.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/flappy_screen.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/game.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/game_screen.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/main_menu_screen.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/menu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/options_screen.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pipe.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/background_music_player.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/control.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/flappy_event_bus.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/src/test_main.cpp
DEPENDENCIES
"gdkgraphics"
"gdkaudio"
"gdkinput"
"gdktextrenderer"
"jfceventbus"
"simpleglfw"
)
# Hides the console window when building for windows
#set_target_properties(flappy PROPERTIES
# LINK_FLAGS "/ENTRY:mainCRTStartup /SUBSYSTEM:WINDOWS")
if (JFC_BUILD_TESTS)
add_subdirectory(test)
endif()
if (JFC_BUILD_DOCS)
add_subdirectory(docs)
endif()
# TODO: TOOLS, etc
<file_sep>/include/gdk/menu.h
// © 2020 <NAME> - All Rights Reserved
#ifndef GDK_MENU_H
#define GDK_MENU_H
#include <functional>
#include <memory>
#include <stack>
#include <gdk/vector2.h>
namespace gdk
{
class element
{
public:
using neighbour_weakptr_type = std::weak_ptr<element>;
using on_focused_type = std::function<void()>;
using on_activated_type = std::function<void()>;
//using on_touch_hover_type
//^ if cursor is in box or whatever, sets current element to this
//using on_touch_pressed_type = std::function<void()>; //NOT USED YET. NEED TO IMPLEMENT TOUCH
//^ calls a dedicated callback, so user can have special depressed button graphic or whatever.
//using on_touch_released_type = std::function<void()>; // NEED TOUCH
//^ calls on_activated
public:
neighbour_weakptr_type m_north_neighbour;
neighbour_weakptr_type m_east_neighbour;
neighbour_weakptr_type m_south_neighbour;
neighbour_weakptr_type m_west_neighbour;
on_activated_type m_activated_functor = []() {};
on_focused_type m_just_gained_focus = []() {};
on_focused_type m_just_lost_focus = []() {};
on_focused_type m_while_focused = []() {};
public:
void set_on_activated(const decltype(m_activated_functor)& a);
void set_on_just_gained_focus(const decltype(m_just_gained_focus)& a);
void set_on_just_lost_focus(const decltype(m_just_lost_focus)& a);
void set_while_focused(const decltype(m_while_focused)& a);
void set_north_neighbour(neighbour_weakptr_type p);
decltype(m_north_neighbour) get_north_neighbour() const;
void set_south_neighbour(neighbour_weakptr_type p);
decltype(m_south_neighbour) get_south_neighbour() const;
void set_east_neighbour(neighbour_weakptr_type p);
decltype(m_east_neighbour) get_east_neighbour() const;
void set_west_neighbour(neighbour_weakptr_type p);
decltype(m_west_neighbour) get_west_neighbour() const;
};
class pane
{
public:
using pane_shared_ptr = std::shared_ptr<pane>;
using element_shared_ptr = std::shared_ptr<element>;
using element_collection_type = std::vector<element_shared_ptr>;
using on_update_type = std::function<void()>;
private:
element_collection_type m_elements;
element_shared_ptr m_current_element;
protected:
void set_current_element(decltype(m_current_element) e);
decltype(m_current_element) get_current_element() const;
public:
static pane::pane_shared_ptr make_pane();
virtual void set_on_update(on_update_type a) = 0;
virtual void set_on_just_gained_top(on_update_type a) = 0;
virtual void set_on_just_lost_top(on_update_type a) = 0;
element_shared_ptr make_element();
protected:
pane() = default;
public:
virtual ~pane() = default;
};
class menu;
class pane_impl : public pane
{
public:
using menu_ptr = menu *;
private:
menu_ptr m_menu = nullptr;
on_update_type m_on_update = []() {};
on_update_type m_on_just_gained_top = []() {};
on_update_type m_on_just_lost_top = []() {};
public:
virtual void set_on_update(on_update_type a) override;
virtual void set_on_just_gained_top(on_update_type a) override;
virtual void set_on_just_lost_top(on_update_type a) override;
void set_menu_ptr(decltype(m_menu) p);
void update(bool aUpInput,
bool aDownInput,
bool aLeftInput,
bool aRightInput,
bool aSelectInput,
bool aCancelInput);
void just_gained_top();
void just_lost_top();
~pane_impl() = default;
};
class menu
{
public:
using input_functor_type = std::function<bool()>;
using on_open_close_functor_type = std::function<void()>;
private:
std::stack<pane::pane_shared_ptr> m_stack;
input_functor_type m_UpInput;
input_functor_type m_DownInput;
input_functor_type m_LeftInput;
input_functor_type m_RightInput;
input_functor_type m_Select;
input_functor_type m_Cancel;
public:
/// \brief pushes a pane to the stack
void push(pane::pane_shared_ptr p);
/// \brief pops the stack
/// \remark if m_IsCloseable is false and the pop() call would empty the stack,
/// pop will have no effect.
void pop();
/// \brief call this in your game loop
void update();
/// \brief the provided functors tell the menu about the state of user input
/// the menu makes no assumptions about controls, so its up to the user to provide
/// these functors to adapt their input system to the menu system
menu(input_functor_type aUpInput,
input_functor_type aDownInput,
input_functor_type aLeftInput,
input_functor_type aRightInput,
input_functor_type aSelect,
input_functor_type aCancel); //TODO: Consider requiring a pane here, so never 0 stack.
};
}
#endif
<file_sep>/include/jfc/vgdeathsound.ogg.h
#ifndef VGDEATHSOUND_OGG_H
#define VGDEATHSOUND_OGG_H
static const unsigned char vgdeathsound_ogg[] = {
0x4f, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5e, 0x71, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x17,
0x95, 0x01, 0x01, 0x1e, 0x01, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x00,
0x00, 0x00, 0x00, 0x01, 0x44, 0xac, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0x00, 0xee, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0xb8, 0x01, 0x4f, 0x67,
0x67, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x5e, 0x71, 0x94, 0x50, 0x01, 0x00, 0x00, 0x00, 0x7e, 0xda, 0x67, 0x78,
0x11, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0x03, 0x76, 0x6f, 0x72, 0x62, 0x69,
0x73, 0x0d, 0x00, 0x00, 0x00, 0x4c, 0x61, 0x76, 0x66, 0x35, 0x38, 0x2e,
0x34, 0x32, 0x2e, 0x31, 0x30, 0x31, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x00,
0x00, 0x00, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x3d, 0x4c, 0x61,
0x76, 0x63, 0x35, 0x38, 0x2e, 0x38, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x20,
0x6c, 0x69, 0x62, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x01, 0x05, 0x76,
0x6f, 0x72, 0x62, 0x69, 0x73, 0x2b, 0x42, 0x43, 0x56, 0x01, 0x00, 0x08,
0x00, 0x00, 0x00, 0x31, 0x4c, 0x20, 0xc5, 0x80, 0xd0, 0x90, 0x55, 0x00,
0x00, 0x10, 0x00, 0x00, 0x60, 0x24, 0x29, 0x0e, 0x93, 0x66, 0x49, 0x29,
0xa5, 0x94, 0xa1, 0x28, 0x79, 0x98, 0x94, 0x48, 0x49, 0x29, 0xa5, 0x94,
0xc5, 0x30, 0x89, 0x98, 0x94, 0x89, 0xc5, 0x18, 0x63, 0x8c, 0x31, 0xc6,
0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x20, 0x34, 0x64, 0x15,
0x00, 0x00, 0x04, 0x00, 0x80, 0x28, 0x09, 0x8e, 0xa3, 0xe6, 0x49, 0x6a,
0xce, 0x39, 0x67, 0x18, 0x27, 0x8e, 0x72, 0xa0, 0x39, 0x69, 0x4e, 0x38,
0xa7, 0x20, 0x07, 0x8a, 0x51, 0xe0, 0x39, 0x09, 0xc2, 0xf5, 0x26, 0x63,
0x6e, 0xa6, 0xb4, 0xa6, 0x6b, 0x6e, 0xce, 0x29, 0x25, 0x08, 0x0d, 0x59,
0x05, 0x00, 0x00, 0x02, 0x00, 0x40, 0x48, 0x21, 0x85, 0x14, 0x52, 0x48,
0x21, 0x85, 0x14, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x87,
0x1c, 0x72, 0xc8, 0x21, 0xa7, 0x9c, 0x72, 0x0a, 0x2a, 0xa8, 0xa0, 0x82,
0x0a, 0x32, 0xc8, 0x20, 0x83, 0x4c, 0x32, 0xe9, 0xa4, 0x93, 0x4e, 0x3a,
0xe9, 0xa8, 0xa3, 0x8e, 0x3a, 0xea, 0x28, 0xb4, 0xd0, 0x42, 0x0b, 0x2d,
0xb4, 0xd2, 0x4a, 0x4c, 0x31, 0xd5, 0x56, 0x63, 0xae, 0xbd, 0x06, 0x5d,
0x7c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73,
0xce, 0x09, 0x42, 0x43, 0x56, 0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x42,
0x06, 0x19, 0x64, 0x10, 0x42, 0x08, 0x21, 0x85, 0x14, 0x52, 0x88, 0x29,
0xa6, 0x98, 0x72, 0x0a, 0x32, 0xc8, 0x80, 0xd0, 0x90, 0x55, 0x00, 0x00,
0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x91, 0x14, 0x49, 0xb1,
0x14, 0xcb, 0xb1, 0x1c, 0xcd, 0xd1, 0x24, 0x4f, 0xf2, 0x2c, 0x51, 0x13,
0x35, 0xd1, 0x33, 0x45, 0x53, 0x54, 0x4d, 0x55, 0x55, 0x55, 0x55, 0x75,
0x5d, 0x57, 0x76, 0x65, 0xd7, 0x76, 0x75, 0xd7, 0x76, 0x7d, 0x59, 0x98,
0x85, 0x5b, 0xb8, 0x7d, 0x59, 0xb8, 0x85, 0x5b, 0xd8, 0x85, 0x5d, 0xf7,
0x85, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86, 0x61, 0xf8,
0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x20, 0x34, 0x64, 0x15, 0x00,
0x20, 0x01, 0x00, 0xa0, 0x23, 0x39, 0x96, 0xe3, 0x29, 0xa2, 0x22, 0x1a,
0xa2, 0xe2, 0x39, 0xa2, 0x03, 0x84, 0x86, 0xac, 0x02, 0x00, 0x64, 0x00,
0x00, 0x04, 0x00, 0x20, 0x09, 0x92, 0x22, 0x29, 0x92, 0xa3, 0x49, 0xa6,
0x66, 0x6a, 0xae, 0x69, 0x9b, 0xb6, 0x68, 0xab, 0xb6, 0x6d, 0xcb, 0xb2,
0x2c, 0xcb, 0xb2, 0x0c, 0x84, 0x86, 0xac, 0x02, 0x00, 0x00, 0x01, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x69, 0x9a, 0xa6, 0x69, 0x9a,
0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a,
0xa6, 0x69, 0x9a, 0x66, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x40, 0x68, 0xc8, 0x2a, 0x00, 0x40, 0x02,
0x00, 0x40, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x24, 0x45, 0x52, 0x24, 0xc7,
0x72, 0x2c, 0x07, 0x08, 0x0d, 0x59, 0x05, 0x00, 0xc8, 0x00, 0x00, 0x08,
0x00, 0x40, 0x52, 0x2c, 0xc5, 0x72, 0x34, 0x47, 0x73, 0x34, 0xc7, 0x73,
0x3c, 0xc7, 0x73, 0x3c, 0x47, 0x74, 0x44, 0xc9, 0x94, 0x4c, 0xcd, 0xf4,
0x4c, 0x0f, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x31, 0x1c, 0xc5, 0x71, 0x1c, 0xc9, 0xd1,
0x24, 0x4f, 0x52, 0x2d, 0xd3, 0x72, 0x35, 0x57, 0x73, 0x3d, 0xd7, 0x73,
0x4d, 0xd7, 0x75, 0x5d, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x81, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x04, 0x00, 0x00,
0x21, 0x9d, 0x66, 0x96, 0x6a, 0x80, 0x08, 0x33, 0x90, 0x61, 0x20, 0x34,
0x64, 0x15, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0xa1, 0x08, 0x43, 0x0c,
0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x88, 0xa1, 0xe4,
0x20, 0x9a, 0xd0, 0x9a, 0xf3, 0xcd, 0x39, 0x0e, 0x9a, 0xe5, 0xa0, 0xa9,
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50, 0x52, 0x19, 0x27, 0xa5,
0x74, 0x82, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20, 0x00, 0x00, 0x84, 0x10,
0x52, 0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21, 0x85, 0x14, 0x52, 0x48,
0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0xa7, 0x9c, 0x72, 0x0a, 0x2a, 0xa8,
0xa4, 0x92, 0x8a, 0x2a, 0xca, 0x28, 0xb3, 0xcc, 0x32, 0xcb, 0x2c, 0xb3,
0xcc, 0x32, 0xcb, 0xac, 0xc3, 0xce, 0x3a, 0xeb, 0xb0, 0xc3, 0x10, 0x43,
0x0c, 0x31, 0xb4, 0xd2, 0x4a, 0x2c, 0x35, 0xd5, 0x56, 0x63, 0x8d, 0xb5,
0xe6, 0x9e, 0x73, 0xae, 0x39, 0x48, 0x6b, 0xa5, 0xb5, 0xd6, 0x5a, 0x2b,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x20, 0x34, 0x64, 0x15, 0x00, 0x00,
0x02, 0x00, 0x40, 0x20, 0x64, 0x90, 0x41, 0x06, 0x19, 0x85, 0x14, 0x52,
0x48, 0x21, 0x86, 0x98, 0x72, 0xca, 0x29, 0xa7, 0xa0, 0x82, 0x0a, 0x08,
0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0xf0,
0x24, 0xcf, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11,
0x1d, 0xd1, 0x11, 0x1d, 0xcf, 0xf1, 0x1c, 0x51, 0x12, 0x25, 0x51, 0x12,
0x25, 0xd1, 0x32, 0x2d, 0x53, 0x33, 0x3d, 0x55, 0x54, 0x55, 0x57, 0x76,
0x6d, 0x59, 0x97, 0x75, 0xdb, 0xb7, 0x85, 0x5d, 0xd8, 0x75, 0xdf, 0xd7,
0x7d, 0xdf, 0xd7, 0x8d, 0x5f, 0x17, 0x86, 0x65, 0x59, 0x96, 0x65, 0x59,
0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x09,
0x42, 0x43, 0x56, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x42, 0x08, 0x21,
0x84, 0x14, 0x52, 0x48, 0x21, 0x85, 0x94, 0x62, 0x8c, 0x31, 0xc7, 0x9c,
0x83, 0x4e, 0x42, 0x09, 0x81, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x71, 0x14, 0xc7, 0x91, 0x1c, 0xc9,
0x91, 0x24, 0x4b, 0xb2, 0x24, 0x4d, 0xd2, 0x2c, 0xcd, 0xf2, 0x34, 0x4f,
0xf3, 0x34, 0xd1, 0x13, 0x45, 0x51, 0x34, 0x4d, 0x53, 0x15, 0x5d, 0xd1,
0x15, 0x75, 0xd3, 0x16, 0x65, 0x53, 0x36, 0x5d, 0xd3, 0x35, 0x65, 0xd3,
0x55, 0x65, 0xd5, 0x76, 0x65, 0xd9, 0xb6, 0x65, 0x5b, 0xb7, 0x7d, 0x59,
0xb6, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf,
0xf7, 0x7d, 0xdf, 0xd7, 0x75, 0x20, 0x34, 0x64, 0x15, 0x00, 0x20, 0x01,
0x00, 0xa0, 0x23, 0x39, 0x92, 0x22, 0x29, 0x92, 0x22, 0x39, 0x8e, 0xe3,
0x48, 0x92, 0x04, 0x84, 0x86, 0xac, 0x02, 0x00, 0x64, 0x00, 0x00, 0x04,
0x00, 0xa0, 0x28, 0x8e, 0xe2, 0x38, 0x8e, 0x23, 0x49, 0x92, 0x24, 0x59,
0x92, 0x26, 0x79, 0x96, 0x67, 0x89, 0x9a, 0xa9, 0x99, 0x9e, 0xe9, 0xa9,
0xa2, 0x0a, 0x84, 0x86, 0xac, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0xa0, 0x68, 0x8a, 0xa7, 0x98, 0x8a, 0xa7, 0x88,
0x8a, 0xe7, 0x88, 0x8e, 0x28, 0x89, 0x96, 0x69, 0x89, 0x9a, 0xaa, 0xb9,
0xa2, 0x6c, 0xca, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba,
0xae, 0xeb, 0xba, 0x40, 0x68, 0xc8, 0x2a, 0x00, 0x40, 0x02, 0x00, 0x40,
0x47, 0x72, 0x24, 0x47, 0x72, 0x24, 0x45, 0x52, 0x24, 0x45, 0x72, 0x24,
0x07, 0x08, 0x0d, 0x59, 0x05, 0x00, 0xc8, 0x00, 0x00, 0x08, 0x00, 0xc0,
0x31, 0x1c, 0x43, 0x52, 0x24, 0xc7, 0xb2, 0x2c, 0x4d, 0xf3, 0x34, 0x4f,
0xf3, 0x34, 0xd1, 0x13, 0x3d, 0xd1, 0x33, 0x3d, 0x55, 0x74, 0x45, 0x17,
0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc0, 0x90, 0x0c, 0x4b, 0xb1, 0x1c, 0xcd, 0xd1, 0x24, 0x51,
0x52, 0x2d, 0xd5, 0x52, 0x35, 0xd5, 0x52, 0x2d, 0x55, 0x54, 0x3d, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x34, 0x4d, 0xd3,
0x34, 0x81, 0xd0, 0x90, 0x95, 0x00, 0x00, 0x19, 0x00, 0x00, 0xe8, 0xc5,
0x08, 0x21, 0x84, 0x10, 0x92, 0xa3, 0x96, 0x5a, 0x10, 0xbe, 0x57, 0xca,
0x39, 0x28, 0x35, 0xf7, 0x5e, 0x31, 0x66, 0x14, 0xc4, 0xde, 0x7b, 0xa5,
0x98, 0x41, 0x8e, 0x72, 0xf0, 0x99, 0x62, 0x4a, 0x39, 0x28, 0xb5, 0xa7,
0xce, 0x31, 0xa5, 0x88, 0x91, 0x5c, 0x5b, 0x2b, 0x91, 0x22, 0xc4, 0x61,
0x0e, 0x3a, 0x55, 0x4e, 0x29, 0xa8, 0x41, 0xe7, 0xd6, 0x49, 0x08, 0x2d,
0x07, 0x42, 0x43, 0x56, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x42, 0x88,
0x31, 0xc4, 0x18, 0x62, 0x8c, 0x41, 0xc8, 0x20, 0x44, 0x8c, 0x31, 0x08,
0x19, 0x84, 0x88, 0x31, 0x06, 0x21, 0x83, 0xd0, 0x41, 0x08, 0x25, 0x85,
0x94, 0x32, 0x08, 0x21, 0x95, 0x90, 0x52, 0xc4, 0x18, 0x83, 0xd0, 0x41,
0xc9, 0x20, 0x84, 0x94, 0x42, 0x49, 0x19, 0x94, 0x90, 0x52, 0x48, 0xa5,
0x00, 0x00, 0x80, 0x00, 0x07, 0x00, 0x80, 0x00, 0x0b, 0xa1, 0xd0, 0x90,
0x15, 0x01, 0x40, 0x9c, 0x00, 0x00, 0x82, 0x90, 0x73, 0x88, 0x31, 0x08,
0x15, 0x63, 0x10, 0x3a, 0x08, 0xa9, 0x74, 0x10, 0x52, 0xaa, 0x18, 0x83,
0x90, 0x39, 0x27, 0x25, 0x73, 0x0e, 0x4a, 0x28, 0x25, 0xa5, 0x10, 0x4a,
0x4a, 0x15, 0x63, 0x10, 0x32, 0xe7, 0x24, 0x64, 0xce, 0x49, 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x31, 0x06, 0x21, 0xc6,
0x9c, 0x33, 0x08, 0x29, 0xc5, 0x18, 0x84, 0xc6, 0x20, 0xa5, 0x18, 0x83,
0x10, 0x29, 0xc5, 0x98, 0x73, 0x10, 0x22, 0xa5, 0x18, 0x73, 0x0e, 0x42,
0xc6, 0x98, 0x73, 0x10, 0x4a, 0xc9, 0x18, 0x73, 0x0e, 0x42, 0x29, 0x1d,
0x84, 0x12, 0x4a, 0x49, 0xa9, 0x83, 0x10, 0x4a, 0x29, 0x29, 0x15, 0x00,
0x00, 0x50, 0xe0, 0x00, 0x00, 0x10, 0x60, 0x83, 0xa6, 0xc4, 0xe2, 0x00,
0x85, 0x86, 0xac, 0x04, 0x00, 0x42, 0x02, 0x00, 0x18, 0x84, 0x94, 0x62,
0xcc, 0x39, 0xe7, 0x20, 0x94, 0x92, 0x52, 0x84, 0x90, 0x52, 0x8c, 0x39,
0xe7, 0x1c, 0x84, 0x52, 0x52, 0x8a, 0x10, 0x52, 0x8a, 0x31, 0xe7, 0x9c,
0x83, 0x50, 0x4a, 0x4a, 0x95, 0x52, 0x4c, 0x31, 0xe6, 0x1c, 0x84, 0x52,
0x52, 0x6a, 0xa9, 0x52, 0x4a, 0x31, 0xc6, 0x9c, 0x83, 0x50, 0x4a, 0x4a,
0xa9, 0x65, 0x8c, 0x31, 0xe6, 0x1c, 0x84, 0x10, 0x4a, 0x49, 0xa9, 0xb5,
0x8c, 0x31, 0xc6, 0x9c, 0x83, 0x10, 0x42, 0x29, 0x29, 0xb5, 0xd6, 0x39,
0xe7, 0x1c, 0x74, 0x12, 0x4a, 0x49, 0xa5, 0xa5, 0xd8, 0x3a, 0xe7, 0x9c,
0x83, 0x10, 0x4a, 0x29, 0x25, 0xa5, 0xd6, 0x5a, 0xe7, 0x1c, 0x84, 0x10,
0x4a, 0x49, 0xa5, 0xa5, 0xd6, 0x62, 0xeb, 0x9c, 0x83, 0x10, 0x42, 0x29,
0x25, 0xa5, 0xd4, 0x5a, 0x8b, 0x21, 0x84, 0x52, 0x4a, 0x49, 0x25, 0xa5,
0x96, 0x62, 0x8b, 0x31, 0x84, 0x52, 0x4a, 0x29, 0x25, 0xa5, 0x94, 0x5a,
0x8b, 0x31, 0x96, 0x54, 0x52, 0x4a, 0xa9, 0xa5, 0xd6, 0x62, 0x8b, 0xb1,
0xc6, 0x52, 0x4a, 0x4a, 0x29, 0xa5, 0xd6, 0x5a, 0x8b, 0x31, 0xc6, 0x9a,
0x52, 0x6a, 0xa9, 0xb5, 0xd6, 0x62, 0x8c, 0xb1, 0xc6, 0x5a, 0x53, 0x4a,
0xa9, 0xb5, 0xd6, 0x5a, 0x8b, 0x31, 0xc6, 0x5a, 0x6b, 0x01, 0x00, 0x00,
0x07, 0x0e, 0x00, 0x00, 0x01, 0x46, 0xd0, 0x49, 0x46, 0x95, 0x45, 0xd8,
0x68, 0xc2, 0x85, 0x07, 0xa0, 0xd0, 0x90, 0x15, 0x01, 0x40, 0x14, 0x00,
0x00, 0x60, 0x0c, 0x62, 0x0c, 0x31, 0x86, 0x9c, 0x73, 0x10, 0x32, 0x08,
0x91, 0x73, 0x0c, 0x42, 0x07, 0x21, 0x72, 0xce, 0x49, 0xe9, 0xa4, 0x64,
0x52, 0x42, 0x69, 0x21, 0xa5, 0x4c, 0x4a, 0x48, 0x25, 0xa4, 0x16, 0x39,
0xe7, 0xa4, 0x74, 0x52, 0x32, 0x29, 0xa1, 0xa5, 0x50, 0x52, 0x26, 0x25,
0xa4, 0x54, 0x5a, 0x29, 0x00, 0x00, 0xec, 0xc0, 0x01, 0x00, 0xec, 0xc0,
0x42, 0x28, 0x34, 0x64, 0x25, 0x00, 0x90, 0x07, 0x00, 0x00, 0x21, 0xa4,
0x14, 0x63, 0x8c, 0x31, 0x86, 0x94, 0x52, 0x8a, 0x31, 0xc6, 0x1c, 0x43,
0x4a, 0x29, 0xc5, 0x18, 0x63, 0x8c, 0x29, 0xa5, 0x18, 0x63, 0x8c, 0x31,
0xe7, 0x94, 0x52, 0x8c, 0x31, 0xc6, 0x98, 0x73, 0x8c, 0x31, 0xc6, 0x1c,
0x73, 0xce, 0x39, 0xc6, 0x18, 0x63, 0xcc, 0x39, 0xe7, 0x1c, 0x63, 0xcc,
0x31, 0xe7, 0x9c, 0x73, 0x8e, 0x31, 0xc6, 0x9c, 0x73, 0xce, 0x39, 0xc7,
0x1c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x63, 0xce, 0x39, 0xe7, 0x9c, 0x73,
0xce, 0x09, 0x00, 0x00, 0x2a, 0x70, 0x00, 0x00, 0x08, 0xb0, 0x51, 0x64,
0x73, 0x82, 0x91, 0xa0, 0x42, 0x43, 0x56, 0x02, 0x00, 0xa9, 0x00, 0x00,
0x84, 0x31, 0x4a, 0x31, 0xe6, 0x1c, 0x84, 0x52, 0x1a, 0x85, 0x18, 0x73,
0xce, 0x39, 0x08, 0xa5, 0x34, 0x48, 0x31, 0xe6, 0x9c, 0x73, 0x10, 0x4a,
0xa9, 0x18, 0x73, 0xce, 0x39, 0x08, 0xa5, 0x94, 0x52, 0x31, 0xe6, 0x9c,
0x73, 0x10, 0x4a, 0x29, 0x25, 0x73, 0xce, 0x39, 0x08, 0x21, 0x94, 0x92,
0x52, 0xe6, 0x9c, 0x73, 0x10, 0x42, 0x28, 0x25, 0xa5, 0xce, 0x39, 0x08,
0x21, 0x84, 0x52, 0x4a, 0x4a, 0x9d, 0x73, 0x10, 0x42, 0x28, 0xa1, 0x94,
0x94, 0x42, 0x08, 0xa5, 0x94, 0x52, 0x52, 0x4a, 0xa9, 0x85, 0x10, 0x4a,
0x29, 0xa5, 0x94, 0x54, 0x5a, 0x2a, 0xa5, 0x94, 0x92, 0x52, 0x4a, 0xa9,
0xb5, 0x56, 0x4a, 0x29, 0x25, 0xa5, 0x94, 0x5a, 0x6a, 0xad, 0x00, 0x00,
0xf0, 0x04, 0x07, 0x00, 0xa0, 0x02, 0x1b, 0x56, 0x47, 0x38, 0x29, 0x1a,
0x0b, 0x2c, 0x34, 0x64, 0x25, 0x00, 0x90, 0x01, 0x00, 0xc0, 0x18, 0x83,
0x90, 0x41, 0x06, 0x21, 0x63, 0x10, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42,
0x08, 0x09, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x08, 0x30, 0xa1, 0x0c,
0x14, 0x1a, 0xb2, 0x12, 0x00, 0x48, 0x05, 0x00, 0x00, 0x0c, 0x52, 0x8a,
0x31, 0x07, 0xa5, 0xa4, 0x14, 0x29, 0xc5, 0x98, 0x73, 0x10, 0x4a, 0x49,
0x29, 0x52, 0x8a, 0x31, 0xe7, 0x20, 0x94, 0x92, 0x52, 0xc5, 0x98, 0x73,
0x10, 0x4a, 0x49, 0xa9, 0xb5, 0x8a, 0x31, 0xe7, 0x20, 0x94, 0x92, 0x52,
0x6b, 0x9d, 0x73, 0x10, 0x4a, 0x49, 0xa9, 0xb5, 0x18, 0x3b, 0xe7, 0x20,
0x94, 0x92, 0x52, 0x6b, 0x31, 0x86, 0x10, 0x4a, 0x49, 0xa9, 0xb5, 0x18,
0x63, 0x0c, 0x21, 0x94, 0x92, 0x52, 0x6b, 0x31, 0xd6, 0x5a, 0x4a, 0x49,
0xa9, 0xb5, 0x18, 0x6b, 0xcc, 0xb5, 0x94, 0x92, 0x52, 0x6b, 0x31, 0xd6,
0x5a, 0x6b, 0x4a, 0xad, 0xb5, 0x18, 0x6b, 0xad, 0x35, 0xe7, 0x94, 0x5a,
0x6b, 0x31, 0xd6, 0x5a, 0x73, 0xce, 0x05, 0x00, 0x20, 0x34, 0x38, 0x00,
0x80, 0x1d, 0xd8, 0xb0, 0x3a, 0xc2, 0x49, 0xd1, 0x58, 0x60, 0xa1, 0x21,
0x2b, 0x01, 0x80, 0x3c, 0x00, 0x00, 0x48, 0x29, 0xc6, 0x18, 0x63, 0x8c,
0x31, 0xa5, 0x14, 0x63, 0x8c, 0x31, 0xc6, 0x98, 0x52, 0x8a, 0x31, 0xc6,
0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xa6, 0x18, 0x63,
0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31,
0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xe6, 0x18,
0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0xcc, 0x39, 0xc6, 0x18, 0x63, 0x8c,
0x39, 0xe6, 0x1c, 0x63, 0x8c, 0x31, 0xc6, 0x9c, 0x73, 0x4e, 0x00, 0x00,
0x50, 0x81, 0x03, 0x00, 0x40, 0x80, 0x8d, 0x22, 0x9b, 0x13, 0x8c, 0x04,
0x15, 0x1a, 0xb2, 0x12, 0x00, 0x08, 0x07, 0x00, 0x00, 0x8c, 0x61, 0xcc,
0x39, 0xe7, 0x20, 0x94, 0x90, 0x4a, 0xa3, 0x94, 0x73, 0x10, 0x42, 0x28,
0x25, 0x95, 0x56, 0x1a, 0xa5, 0x9c, 0x83, 0x12, 0x42, 0x29, 0x29, 0xb5,
0x96, 0x39, 0x27, 0x25, 0xa5, 0x52, 0x52, 0x6a, 0x2d, 0xb6, 0xcc, 0x39,
0x29, 0x29, 0x95, 0x92, 0x52, 0x6b, 0x2d, 0x76, 0x12, 0x52, 0x6a, 0x2d,
0xa5, 0xd6, 0x62, 0xac, 0xb1, 0x83, 0x90, 0x52, 0x6b, 0xa9, 0xb5, 0x16,
0x63, 0x8d, 0x1d, 0x84, 0x52, 0x5a, 0x8a, 0x2d, 0xc6, 0x1a, 0x73, 0xed,
0x20, 0x94, 0x92, 0x5a, 0x6b, 0x31, 0xc6, 0x5a, 0x6b, 0x28, 0xa5, 0xa5,
0xd8, 0x62, 0xac, 0xb1, 0xd6, 0x9a, 0x43, 0x29, 0xa9, 0xb5, 0x16, 0x63,
0xad, 0x35, 0xe7, 0x5c, 0x52, 0x6a, 0x2d, 0xc6, 0x5a, 0x6b, 0xcd, 0xb5,
0xe7, 0x92, 0x52, 0x6b, 0x31, 0xc6, 0x5a, 0x6b, 0xad, 0xb9, 0xa7, 0xd6,
0x62, 0xac, 0xb1, 0xd6, 0x5c, 0x73, 0xef, 0x3d, 0xb5, 0x16, 0x63, 0x8d,
0xb5, 0xe6, 0x9c, 0x7b, 0xce, 0x05, 0x00, 0x98, 0x3c, 0x38, 0x00, 0x40,
0x25, 0xd8, 0x38, 0xc3, 0x4a, 0xd2, 0x59, 0xe1, 0x68, 0x70, 0xa1, 0x21,
0x2b, 0x01, 0x80, 0xdc, 0x00, 0x00, 0x46, 0x29, 0xc6, 0x9c, 0x73, 0x0e,
0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08, 0x95, 0x52, 0x8c, 0x39, 0xe7,
0x1c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x10, 0x2a, 0xa5, 0x18, 0x73,
0xce, 0x39, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08, 0x21, 0x64, 0x8c, 0x39,
0xe7, 0x1c, 0x74, 0x10, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0xc8, 0x18,
0x73, 0xce, 0x39, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0xd0,
0x39, 0xe7, 0x1c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x50, 0x42, 0x29,
0xa5, 0x73, 0xce, 0x39, 0x07, 0x21, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84,
0x50, 0x4a, 0xe7, 0x1c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x12, 0x4a,
0x28, 0xa5, 0x94, 0xce, 0x39, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08, 0xa5,
0x84, 0x52, 0x4a, 0x29, 0x21, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x12,
0x4a, 0x29, 0xa5, 0x94, 0x52, 0x3a, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84,
0x10, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x09, 0x21, 0x84, 0x10, 0x42,
0x08, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x12, 0x42, 0x08, 0x21,
0x84, 0x12, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0x25, 0x84, 0x10,
0x42, 0x08, 0xa1, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x08,
0x21, 0x84, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x10, 0x42, 0x28, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a,
0x29, 0x21, 0x84, 0x12, 0x4a, 0x28, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5,
0x94, 0x52, 0x42, 0x08, 0x25, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52,
0x4a, 0x29, 0xa5, 0x84, 0x10, 0x42, 0x28, 0xa5, 0x94, 0x52, 0x4a, 0x29,
0xa5, 0x94, 0x52, 0x4a, 0x09, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x00, 0x00, 0xd0, 0x81, 0x03, 0x00,
0x40, 0x80, 0x11, 0x95, 0x16, 0x62, 0xa7, 0x19, 0x57, 0x1e, 0x81, 0x23,
0x0a, 0x19, 0x26, 0xa0, 0x42, 0x43, 0x56, 0x02, 0x00, 0xe1, 0x00, 0x00,
0x00, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x6a, 0x24, 0xa5,
0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x23, 0x25, 0xa5, 0x94, 0x52,
0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a,
0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5,
0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52,
0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x00, 0xa8, 0xcb,
0x0c, 0x07, 0xc0, 0xe8, 0x09, 0x1b, 0x67, 0x58, 0x49, 0x3a, 0x2b, 0x1c,
0x0d, 0x2e, 0x34, 0x64, 0x25, 0x00, 0x90, 0x16, 0x00, 0x00, 0x18, 0xc3,
0x98, 0x63, 0x8e, 0x41, 0x27, 0xa1, 0x94, 0x94, 0x5a, 0x6b, 0x98, 0x82,
0x50, 0x42, 0xe8, 0xa4, 0xa4, 0xd2, 0x4a, 0x6c, 0xb1, 0x35, 0x4a, 0x41,
0x08, 0x21, 0x84, 0x52, 0x52, 0x4a, 0xad, 0xb5, 0xd6, 0x32, 0xe8, 0xa8,
0x94, 0x92, 0x4a, 0x4a, 0xad, 0xc5, 0x16, 0x63, 0x8c, 0x99, 0x83, 0x52,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x40, 0x5c, 0x30, 0x92, 0x90, 0x3a, 0xcb, 0xb0, 0xd2, 0x88, 0x1b,
0x4f, 0xc0, 0x10, 0x81, 0x14, 0x1a, 0xb2, 0x0a, 0x00, 0x88, 0x01, 0x00,
0x20, 0x8c, 0x41, 0x06, 0x21, 0x84, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x94,
0x62, 0x8a, 0x29, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c,
0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x04, 0x00, 0x00, 0x26, 0x38,
0x00, 0x00, 0x04, 0x58, 0xc1, 0xae, 0xcc, 0xd2, 0xaa, 0x8d, 0xe2, 0xa6,
0x4e, 0xf2, 0xa2, 0x0f, 0x02, 0x9f, 0xd0, 0x11, 0x9b, 0x91, 0x21, 0x97,
0x52, 0x31, 0x93, 0x13, 0x41, 0x8f, 0xd4, 0x50, 0x8b, 0x95, 0x60, 0x87,
0x56, 0x70, 0x83, 0x17, 0x80, 0x85, 0x86, 0xac, 0x04, 0x00, 0xc8, 0x00,
0x00, 0x10, 0x88, 0xb1, 0xe6, 0x5a, 0x73, 0x8e, 0x10, 0x94, 0xd6, 0x62,
0xed, 0xb9, 0x54, 0x4a, 0x39, 0x6a, 0xb1, 0xe7, 0x94, 0x21, 0x82, 0x9c,
0xb4, 0x9c, 0x4b, 0xc9, 0x0c, 0x41, 0x4e, 0x5a, 0x6b, 0x2d, 0x64, 0xc8,
0x28, 0x27, 0x31, 0xb6, 0x14, 0x32, 0x84, 0x14, 0xb4, 0xda, 0x5a, 0xe9,
0x94, 0x52, 0x8c, 0x62, 0xab, 0xb1, 0x74, 0x8c, 0x31, 0x49, 0xa9, 0xc5,
0x96, 0x4a, 0xe7, 0x20, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x03, 0x11,
0x32, 0x13, 0x08, 0x14, 0x40, 0x81, 0x81, 0x0c, 0x00, 0x38, 0x40, 0x48,
0x90, 0x02, 0x00, 0x0a, 0x0b, 0x0c, 0x1d, 0xc3, 0x45, 0x40, 0x40, 0x2e,
0x21, 0xa3, 0xc0, 0xa0, 0x70, 0x4c, 0x38, 0x27, 0x9d, 0x36, 0x00, 0x00,
0x41, 0x88, 0xcc, 0x10, 0x89, 0x88, 0xc5, 0x20, 0x31, 0xa1, 0x1a, 0x28,
0x2a, 0xa6, 0x03, 0x80, 0xc5, 0x05, 0x86, 0x7c, 0x00, 0xc8, 0xd0, 0xd8,
0x48, 0xbb, 0xb8, 0x80, 0x2e, 0x03, 0x5c, 0xd0, 0xc5, 0x5d, 0x07, 0x42,
0x08, 0x42, 0x10, 0x82, 0x58, 0x1c, 0x40, 0x01, 0x09, 0x38, 0x38, 0xe1,
0x86, 0x27, 0xde, 0xf0, 0x84, 0x1b, 0x9c, 0xa0, 0x53, 0x54, 0xea, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xe0, 0x01, 0x00, 0x20, 0xd9,
0x00, 0x22, 0xa2, 0x99, 0x99, 0xe3, 0xe8, 0xf0, 0xf8, 0x00, 0x09, 0x11,
0x19, 0x21, 0x29, 0x31, 0x39, 0x41, 0x49, 0x51, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20, 0x00, 0xf8, 0x00, 0x00, 0x48, 0x56, 0x80, 0x88, 0x68,
0x66, 0xe6, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4a,
0x4c, 0x4e, 0x50, 0x52, 0x54, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x80, 0x80, 0x4f, 0x67, 0x67, 0x53, 0x00, 0x00, 0xc0, 0xac,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x71, 0x94, 0x50, 0x02, 0x00,
0x00, 0x00, 0x11, 0x8c, 0xbd, 0x88, 0xc0, 0x65, 0x66, 0x62, 0x52, 0x51,
0x52, 0x51, 0x50, 0x62, 0x65, 0xff, 0xff, 0x46, 0xff, 0xff, 0x0b, 0xff,
0xff, 0x05, 0xff, 0xff, 0x12, 0xff, 0xff, 0x15, 0xff, 0xff, 0x2c, 0x4c,
0x5c, 0x63, 0x64, 0xff, 0xff, 0x40, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x3b,
0x4d, 0x4b, 0x4b, 0x4c, 0x4d, 0x4f, 0x4b, 0x5d, 0x65, 0x65, 0xff, 0xff,
0x2f, 0x4f, 0x4c, 0x4b, 0x4b, 0x50, 0x4d, 0x4e, 0x64, 0x60, 0x60, 0x50,
0x60, 0x60, 0x65, 0x60, 0x5e, 0x5d, 0x5a, 0x5f, 0x5e, 0x4c, 0x4d, 0x4b,
0x4e, 0x5f, 0x64, 0xff, 0xff, 0x2f, 0x49, 0x4e, 0x4c, 0x4a, 0x4d, 0x49,
0x4d, 0x64, 0x62, 0x62, 0x4f, 0x4a, 0x4d, 0x4e, 0x4d, 0x5c, 0x65, 0x61,
0x62, 0x4d, 0x4a, 0x4d, 0x4d, 0x50, 0x63, 0x67, 0xff, 0xff, 0x12, 0xff,
0xff, 0x02, 0xff, 0xff, 0x00, 0xff, 0xff, 0x37, 0x63, 0x65, 0x64, 0xff,
0xff, 0x2c, 0xff, 0xff, 0x04, 0xff, 0xff, 0x29, 0x4b, 0x46, 0x4d, 0x4a,
0x49, 0x4e, 0x4a, 0x60, 0x68, 0x61, 0xff, 0xff, 0x2d, 0xff, 0xff, 0x06,
0xff, 0xf1, 0xff, 0xff, 0x02, 0xff, 0xfe, 0xff, 0xff, 0x1a, 0xff, 0xf4,
0xff, 0xff, 0x36, 0x4e, 0x4c, 0x61, 0x63, 0x60, 0x4f, 0x51, 0x4e, 0x4f,
0x4c, 0x60, 0x64, 0x5e, 0xff, 0xff, 0x3c, 0xff, 0xff, 0x03, 0xff, 0xff,
0x08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, 0x4c, 0x64, 0x5f,
0xff, 0xff, 0x4e, 0xff, 0xff, 0x34, 0x4e, 0x4a, 0x4e, 0x4c, 0x4b, 0x4d,
0x4d, 0x62, 0x63, 0x5e, 0x4d, 0x49, 0x61, 0x58, 0x5d, 0x60, 0x61, 0x63,
0x4e, 0x4e, 0x4f, 0x4f, 0x4f, 0x4d, 0x62, 0x66, 0x5e, 0x64, 0x63, 0x5f,
0x62, 0x5c, 0x63, 0x67, 0x5e, 0x5f, 0x5f, 0x5d, 0x60, 0x5a, 0x50, 0x5f,
0x5e, 0xff, 0xff, 0x11, 0x62, 0x65, 0x64, 0x4a, 0x4c, 0x4e, 0x61, 0x63,
0x63, 0x66, 0x5d, 0x63, 0x66, 0x60, 0x67, 0x5d, 0xff, 0xff, 0x0e, 0xff,
0xfe, 0xff, 0xff, 0x39, 0x4e, 0x63, 0x62, 0x5c, 0x61, 0x62, 0x5b, 0x65,
0x5c, 0x65, 0x62, 0x5b, 0x47, 0x4e, 0x53, 0x4b, 0x4b, 0x49, 0x64, 0x61,
0x60, 0xff, 0xff, 0x50, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x19, 0xff, 0xff,
0x3a, 0x4b, 0x49, 0x4a, 0x4c, 0x61, 0x63, 0xff, 0xff, 0x40, 0xff, 0xff,
0x18, 0xff, 0xff, 0x02, 0xff, 0xff, 0x01, 0xff, 0xff, 0x1b, 0xff, 0xff,
0x37, 0xff, 0xff, 0x46, 0xff, 0xff, 0x40, 0xff, 0xff, 0x32, 0xff, 0xff,
0x2e, 0xff, 0xff, 0x21, 0xff, 0xff, 0x27, 0xff, 0xff, 0x34, 0xff, 0xee,
0x01, 0xac, 0x26, 0xff, 0x24, 0x15, 0x2b, 0xb4, 0x42, 0xdb, 0xea, 0xef,
0xfc, 0xde, 0x9f, 0xfb, 0x8b, 0xfd, 0xa9, 0x29, 0x79, 0x58, 0xa7, 0xe7,
0x51, 0x5c, 0xb1, 0xfd, 0xb6, 0xc4, 0xb8, 0xec,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0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e,
0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x4f, 0x67,
0x67, 0x53, 0x00, 0x04, 0x80, 0x23, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x5e, 0x71, 0x94, 0x50, 0x05, 0x00, 0x00, 0x00, 0x13, 0x62, 0x55, 0x20,
0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0e, 0x0e, 0x0e, 0x0e,
0x0e, 0x0e, 0x0e
};
#endif /* VGDEATHSOUND_OGG_H */
<file_sep>/src/assets.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/assets.h>
#include <jfc/Coins.ogg.h>
#include <jfc/Text_Sheet.png.h>
#include <jfc/Background_0.png.h>
#include <jfc/Background_1.png.h>
#include <jfc/Background_2.png.h>
#include <jfc/Background_3.png.h>
#include <jfc/Background_4.png.h>
#include <jfc/Background_5.png.h>
#include <jfc/Background_6.png.h>
#include <jfc/jump.ogg.h>
#include <jfc/Floor.png.h>
#include <jfc/Sprite_Sheet.png.h>
using namespace flappy;
using namespace gdk;
assets::assets(decltype(m_pGraphics) aGraphics,
decltype(m_pAudio) aAudio,
input::context::context_shared_ptr_type pInput)
: m_pGraphics(aGraphics)
, m_pAudio(aAudio)
, m_CoinSound(m_pAudio->make_sound(audio::sound::encoding_type::vorbis, std::vector<unsigned char>(
Coins_ogg, Coins_ogg + sizeof(Coins_ogg) / sizeof(Coins_ogg[0]))))
, m_TextTexture(std::shared_ptr<gdk::texture>(std::shared_ptr<texture>(std::move(m_pGraphics->make_texture(
{ Text_Sheet_png, Text_Sheet_png + sizeof Text_Sheet_png / sizeof Text_Sheet_png[0] })))))
, m_TextMap(m_TextTexture, { 8, 8 },
{
{'a', {0,0}},
{'b', {1,0}},
{'c', {2,0}},
{'d', {3,0}},
{'e', {4,0}},
{'f', {5,0}},
{'g', {6,0}},
{'h', {7,0}},
{'i', {0,1}},
{'j', {1,1}},
{'k', {2,1}},
{'l', {3,1}},
{'m', {4,1}},
{'n', {5,1}},
{'o', {6,1}},
{'p', {7,1}},
{'q', {0,2}},
{'r', {1,2}},
{'s', {2,2}},
{'t', {3,2}},
{'u', {4,2}},
{'v', {5,2}},
{'w', {6,2}},
{'x', {7,2}},
{'y', {0,3}},
{'z', {1,3}},
{'A', {0,0}},
{'B', {1,0}},
{'C', {2,0}},
{'D', {3,0}},
{'E', {4,0}},
{'F', {5,0}},
{'G', {6,0}},
{'H', {7,0}},
{'I', {0,1}},
{'J', {1,1}},
{'K', {2,1}},
{'L', {3,1}},
{'M', {4,1}},
{'N', {5,1}},
{'O', {6,1}},
{'P', {7,1}},
{'Q', {0,2}},
{'R', {1,2}},
{'S', {2,2}},
{'T', {3,2}},
{'U', {4,2}},
{'V', {5,2}},
{'W', {6,2}},
{'X', {7,2}},
{'Y', {0,3}},
{'Z', {1,3}},
{'0', {3,3}},
{'1', {4,3}},
{'2', {5,3}},
{'3', {6,3}},
{'4', {7,3}},
{'5', {0,4}},
{'6', {1,4}},
{'7', {2,4}},
{'8', {3,4}},
{'9', {4,4}},
{'!', {2,3}},
{'.', {5,4}},
{':', {6,4}},
{'?', {7,3}},
{' ', {7,6}},
{'/', {0,5}},
{'-', {1,5}},
})
, m_BGLayerTextures(decltype(m_BGLayerTextures){
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_0_png, Background_0_png + sizeof Background_0_png / sizeof Background_0_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_1_png, Background_1_png + sizeof Background_1_png / sizeof Background_1_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_2_png, Background_2_png + sizeof Background_2_png / sizeof Background_2_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_3_png, Background_3_png + sizeof Background_3_png / sizeof Background_3_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_4_png, Background_4_png + sizeof Background_4_png / sizeof Background_4_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_5_png, Background_5_png + sizeof Background_5_png / sizeof Background_5_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Background_6_png, Background_6_png + sizeof Background_6_png / sizeof Background_6_png[0] }))),
std::shared_ptr<texture>(std::move(m_pGraphics->make_texture({ Floor_png, Floor_png + sizeof Floor_png / sizeof Floor_png[0] })))
})
, m_SpriteSheet(std::shared_ptr<texture>(std::move(m_pGraphics->make_texture(
{ Sprite_Sheet_png, Sprite_Sheet_png + sizeof Sprite_Sheet_png / sizeof Sprite_Sheet_png[0] }))))
, m_FlapSound(m_pAudio->make_sound(audio::sound::encoding_type::vorbis, std::vector<unsigned char>(
jump_ogg, jump_ogg + sizeof(jump_ogg) / sizeof(jump_ogg[0]))))
{}
decltype(assets::m_FlapSound) assets::get_flapsound() const
{
return m_FlapSound;
}
decltype(assets::m_BGLayerTextures) assets::get_bglayertextures() const
{
return m_BGLayerTextures;
}
decltype(assets::m_CoinSound) assets::get_coin_sound() const
{
return m_CoinSound;
}
decltype(assets::m_TextMap) assets::get_textmap() const
{
return m_TextMap;
}
decltype(assets::m_SpriteSheet) assets::get_spritesheet() const
{
return m_SpriteSheet;
}
<file_sep>/src/bird.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/bird.h>
#include <jfc/Sprite_Sheet.png.h>
#include <jfc/jump.ogg.h>
using namespace gdk;
using namespace flappy;
/// \brief limit to the player's downward speed
static constexpr float player_gravity_speed_limit(-0.75f);
/// \brief limit to the player's downward acceleration
static constexpr float player_gravity_acceleration(0.155f);
/// \brief upward vertical speed assigned to the player when pressing the jump button
static constexpr float player_jump_speed(0.03f);
/// TODO Move to animator2d class
static const std::array<graphics_vector2_type, 4> FLAPPING_ANIMATION{
graphics_vector2_type(1, 0),
graphics_vector2_type(0, 0),
graphics_vector2_type(2, 0),
graphics_vector2_type(0, 0)
};
////
bird::bird(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
gdk::input::context::context_shared_ptr_type pInput,
gdk::audio::context::context_shared_ptr_type pAudio,
flappy::assets::shared_ptr aAssets)
: m_pInput(pInput)
, m_state(bird::state::alive)
{
m_Position.x = player_x;
m_Material = std::shared_ptr<material>(std::move(pContext->make_material(pContext->get_alpha_cutoff_shader())));
m_Material->setTexture("_Texture", aAssets->get_spritesheet());
m_Material->setVector2("_UVScale", { 0.25, 0.245 });
m_Material->setVector2("_UVOffset", { 0, 0 });
m_Entity = decltype(m_Entity)(std::move(pContext->make_entity(std::shared_ptr<model>(pContext->get_quad_model()), m_Material)));
pScene->add_entity(m_Entity);
m_JumpSFX = pAudio->make_emitter(aAssets->get_flapsound());
}
void bird::update(float delta, std::vector<pipe> pipes)
{
switch (m_state.get())
{
case state::alive:
{
// Animate
{
accumulator += delta;
if (accumulator > 0.25f)
{
accumulator = 0;
if (++frameIndex >= FLAPPING_ANIMATION.size()) frameIndex = 0;
m_Material->setVector2("_UVOffset", FLAPPING_ANIMATION[frameIndex]);
}
}
// Handle acceleration
{
if (m_VerticalSpeed > player_gravity_speed_limit)
m_VerticalSpeed -= delta * player_gravity_acceleration;
if (m_pInput->get_key_just_pressed(gdk::keyboard::Key::Space))
{
m_VerticalSpeed = player_jump_speed;
m_JumpSFX->play();
}
m_Position.y += m_VerticalSpeed;
}
// Handle collision
{
// check too high or too low
if (m_Position.y <= -0.5f || m_Position.y >= +0.7f) m_state.set(state::dead);
else
{
// check pipe collisions
auto wpos = get_world_position();
for (auto& pipe : pipes)
{
if (pipe.check_collision(wpos)) m_state.set(state::dead);
}
}
}
// apply translation to the graphics entity
m_Entity->set_model_matrix({ m_Position.x, m_Position.y, -0.01f },
{ {0, 0, -m_VerticalSpeed * 40} },
{ 0.2, 0.2, 0 });
} break;
case state::dead:
{
//TODO: some sort of death animation.
} break;
}
}
void bird::add_observer(decltype(m_state)::observer_ptr p)
{
m_state.add_observer(p);
}
gdk::graphics_mat4x4_type bird::get_world_position()
{
graphics_mat4x4_type tra;
tra.translate({ m_Position.x, m_Position.y, 0 });
graphics_mat4x4_type world = (tra);
return tra;
}
<file_sep>/include/jfc/options_screen.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_OPTIONS_SCREEN_H
#define FLAPPY_OPTIONS_SCREEN_H
#include <gdk/screen.h>
#include <jfc/assets.h>
#include <gdk/graphics_context.h>
#include <gdk/input_context.h>
#include <gdk/audio/context.h>
#include <gdk/menu.h>
#include <gdk/dynamic_text_renderer.h>
#include <gdk/static_text_renderer.h>
#include <jfc/screen_stack.h>
#include <jfc/background.h>
#include <jfc/glfw_window.h>
#include <jfc/flappy_screen.h>
#include <jfc/flappy_event_bus.h>
#include <gdk/configurator.h>
namespace flappy
{
/// \brief the options screen allows users to customize
/// controls, enable/disable music.
class options_screen final : public flappy::screen
{
gdk::graphics::context::scene_shared_ptr_type m_pMainScene;
input::context::context_shared_ptr_type m_pInput;
std::shared_ptr<gdk::camera> m_pMainCamera;
screen_stack_ptr_type m_Screens;
std::shared_ptr<menu> m_menu;
std::shared_ptr<flappy::event_bus> m_pEventBus;
//flappy::scenery scenery;
std::vector<std::shared_ptr<static_text_renderer>> m_BindingNamesTexts;
std::shared_ptr<gdk::configurator> m_pConfig;
//! TEMPORARY. Remove when config is working well
// and I have thought of a proper place to store all the player controls.
std::shared_ptr<gdk::controls> m_pControls;
/// \brief pane to select a binding name from. root of the config sub menu
pane::pane_shared_ptr select_binding_pane;
/// \brief text used to show state of music on/off option
std::shared_ptr<dynamic_text_renderer> m_MusicText;
/// \brief text used to show state of volume % option
std::shared_ptr<dynamic_text_renderer> m_VolumeText;
/// \brief player config selector
std::shared_ptr<dynamic_text_renderer> m_PlayerConfigSelect;
/// \brief indicates whether or not the current player's controls react to keyboard inputs
std::shared_ptr<dynamic_text_renderer> m_ActivateKeyboardText;
/// \brief indicates whether or not the current player's controls react to mouse inputs
std::shared_ptr<dynamic_text_renderer> m_ActivateMouseText;
/// \brief text that indicates which gamepad is selected for the current player
std::shared_ptr<dynamic_text_renderer> m_SelectGamepadText;
/// \brief text showing binding option
std::shared_ptr<dynamic_text_renderer> m_ChangeBindingsText;
/// \brief root pane of the options menu
pane::pane_shared_ptr m_main_pane;
/// \brief index of the player whose controls the user wants to configure
size_t m_player_to_configure = 0;
public:
virtual void update(float delta, float aspectRatio, std::pair<int, int> windowSize) override;
options_screen(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudioContext,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets);
virtual ~options_screen() = default;
};
}
#endif
<file_sep>/thirdparty/CMakeLists.txt
# © 2020 <NAME> - All Rights Reserved
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/gdk-audio")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/gdk-graphics")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/gdk-input")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/gdk-text-renderer")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/jfc-event-bus")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/simple-glfw")
<file_sep>/include/jfc/screen_stack.h
// © 2020 <NAME> - All Rights Reserved
#ifndef SCREEN_STACK_H
#define SCREEN_STACK_H
#include <stack>
#include <memory>
#include <gdk/screen.h>
namespace gdk
{
// TODO: replace "push" and "pop" functors with gained_top lost_top
class screen_stack
{
public:
using stack_type = std::stack<std::shared_ptr<gdk::screen>>;
using push_pop_functor_type = std::function<void(stack_type::value_type)>;
private:
//! internal stack type
stack_type m_Screens;
//! called when a screen is pushed to the stack
push_pop_functor_type m_PushFunctor;
//! called when a screen is popped from the stack
push_pop_functor_type m_PopFunctor;
public:
void push(std::shared_ptr<gdk::screen> s)
{
m_Screens.push(s);
m_PushFunctor(s);
}
//! pops the screen stack
/// \remark has no effect if the stack would completely empty
void pop()
{
if (m_Screens.size() > 1)
{
m_Screens.pop();
// TODO: This should be revisted this seems weird
if (!m_Screens.empty()) m_PopFunctor(m_Screens.top());
}
}
void update(float delta, float windowAspectRatio, std::pair<int, int> windowSize)
{
if (m_Screens.size()) m_Screens.top()->update(delta, windowAspectRatio, windowSize);
}
//! move semantics
screen_stack(screen_stack&&) = default;
//! move semantics
screen_stack &operator=(screen_stack&&) = default;
screen_stack(push_pop_functor_type aOnPushedFunctor, push_pop_functor_type aOnPoppedFunctor)
: m_PushFunctor(aOnPushedFunctor)
, m_PopFunctor(aOnPoppedFunctor)
{}
};
}
using screen_ptr_type = std::shared_ptr<gdk::screen>;
using screen_stack_type = gdk::screen_stack;
using screen_stack_ptr_type = std::shared_ptr<screen_stack_type>;
#endif
<file_sep>/include/jfc/flappy_event_bus.h
#ifndef JFC_FLAPPY_EVENT_BUS_H
#define JFC_FLAPPY_EVENT_BUS_H
#include <string>
#include <jfc/event_bus.h>
#include <gdk/screen_stack.h>
namespace flappy
{
class game;
struct screen_pushed_event
{
//TODO: remove this, just rely on the ptr
std::string name;
screen_ptr_type screen;
};
struct screen_popped_event
{
std::string name;
};
struct player_died_event
{
size_t score;
};
struct player_count_changed_event
{
int count;
};
struct player_wants_to_reset_event
{
/// \warn strictly for comparisons!
flappy::game *const game;
};
struct player_wants_to_quit_event
{
/// \warn strictly for comparisons!
flappy::game* const game;
};
/// \brief wrapper for all the event buses used in the program.
class event_bus final
{
public:
private:
/// \brief notifies observers that a screen has been pushed
jfc::event_bus<screen_pushed_event> m_ScreenPushed;
jfc::event_bus<screen_popped_event> m_ScreenPopped;
jfc::event_bus<player_count_changed_event> m_PlayerCountChanged;
jfc::event_bus<player_died_event> m_PlayerDied;
jfc::event_bus<player_wants_to_reset_event> m_PlayerWantsToReset;
jfc::event_bus<player_wants_to_quit_event> m_PlayerWantsToQuit;
public:
void add_player_wants_to_quit_observer(decltype(m_PlayerWantsToQuit)::observer_weak_ptr_type pObserver);
void propagate_player_wants_to_quit_event(decltype(m_PlayerWantsToQuit)::event_type e);
void add_player_wants_to_reset_observer(decltype(m_PlayerWantsToReset)::observer_weak_ptr_type pObserver);
void propagate_player_wants_to_reset_event(decltype(m_PlayerWantsToReset)::event_type e);
void add_player_count_changed_observer(decltype(m_PlayerCountChanged)::observer_weak_ptr_type pObserver);
void propagate_player_count_changed_event(decltype(m_PlayerCountChanged)::event_type e);
void add_screen_pushed_event_observer(decltype(m_ScreenPushed)::observer_weak_ptr_type pObserver);
void propagate_screen_pushed_event(decltype(m_ScreenPushed)::event_type e);
void add_screen_popped_event_observer(decltype(m_ScreenPopped)::observer_weak_ptr_type pObserver);
void propagate_screen_popped_event(decltype(m_ScreenPopped)::event_type e);
void add_player_died_event_observer(decltype(m_PlayerDied)::observer_weak_ptr_type pObserver);
void propagate_player_died_event(decltype(m_PlayerDied)::event_type e);
};
}
#endif
<file_sep>/include/jfc/Coins.ogg.h
#ifndef COINS_OGG_H
#define COINS_OGG_H
static const unsigned char Coins_ogg[] = {
0x4f, 0x67, 0x67, 0x53, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x27, 0xee, 0x2b, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70,
0x37, 0x9b, 0x01, 0x1e, 0x01, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x00,
0x00, 0x00, 0x00, 0x01, 0x44, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x77, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x4f, 0x67,
0x67, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0xee, 0x2b, 0x2f, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x30, 0x4e, 0xe4,
0x10, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc9, 0x03, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73,
0x0d, 0x00, 0x00, 0x00, 0x4c, 0x61, 0x76, 0x66, 0x35, 0x36, 0x2e, 0x32,
0x35, 0x2e, 0x31, 0x30, 0x31, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00,
0x00, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x3d, 0x4c, 0x61, 0x76,
0x63, 0x35, 0x36, 0x2e, 0x32, 0x38, 0x2e, 0x31, 0x30, 0x30, 0x20, 0x6c,
0x69, 0x62, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x01, 0x05, 0x76, 0x6f,
0x72, 0x62, 0x69, 0x73, 0x29, 0x42, 0x43, 0x56, 0x01, 0x00, 0x08, 0x00,
0x00, 0x00, 0x31, 0x4c, 0x20, 0xc5, 0x80, 0xd0, 0x90, 0x55, 0x00, 0x00,
0x10, 0x00, 0x00, 0x60, 0x24, 0x29, 0x0e, 0x93, 0x66, 0x49, 0x29, 0xa5,
0x94, 0xa1, 0x28, 0x79, 0x98, 0x94, 0x48, 0x49, 0x29, 0xa5, 0x94, 0xc5,
0x30, 0x89, 0x98, 0x94, 0x89, 0xc5, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18,
0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x20, 0x34, 0x64, 0x15, 0x00,
0x00, 0x04, 0x00, 0x80, 0x28, 0x09, 0x8e, 0xa3, 0xe6, 0x49, 0x6a, 0xce,
0x39, 0x67, 0x18, 0x27, 0x8e, 0x72, 0xa0, 0x39, 0x69, 0x4e, 0x38, 0xa7,
0x20, 0x07, 0x8a, 0x51, 0xe0, 0x39, 0x09, 0xc2, 0xf5, 0x26, 0x63, 0x6e,
0xa6, 0xb4, 0xa6, 0x6b, 0x6e, 0xce, 0x29, 0x25, 0x08, 0x0d, 0x59, 0x05,
0x00, 0x00, 0x02, 0x00, 0x40, 0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21,
0x85, 0x14, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x87, 0x1c,
0x72, 0xc8, 0x21, 0xa7, 0x9c, 0x72, 0x0a, 0x2a, 0xa8, 0xa0, 0x82, 0x0a,
0x32, 0xc8, 0x20, 0x83, 0x4c, 0x32, 0xe9, 0xa4, 0x93, 0x4e, 0x3a, 0xe9,
0xa8, 0xa3, 0x8e, 0x3a, 0xea, 0x28, 0xb4, 0xd0, 0x42, 0x0b, 0x2d, 0xb4,
0xd2, 0x4a, 0x4c, 0x31, 0xd5, 0x56, 0x63, 0xae, 0xbd, 0x06, 0x5d, 0x7c,
0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce,
0x09, 0x42, 0x43, 0x56, 0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x42, 0x06,
0x19, 0x64, 0x10, 0x42, 0x08, 0x21, 0x85, 0x14, 0x52, 0x88, 0x29, 0xa6,
0x98, 0x72, 0x0a, 0x32, 0xc8, 0x80, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x91, 0x14, 0x49, 0xb1, 0x14,
0xcb, 0xb1, 0x1c, 0xcd, 0xd1, 0x24, 0x4f, 0xf2, 0x2c, 0x51, 0x13, 0x35,
0xd1, 0x33, 0x45, 0x53, 0x54, 0x4d, 0x55, 0x55, 0x55, 0x55, 0x75, 0x5d,
0x57, 0x76, 0x65, 0xd7, 0x76, 0x75, 0xd7, 0x76, 0x7d, 0x59, 0x98, 0x85,
0x5b, 0xb8, 0x7d, 0x59, 0xb8, 0x85, 0x5b, 0xd8, 0x85, 0x5d, 0xf7, 0x85,
0x61, 0x18, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86, 0x61, 0xf8, 0x7d,
0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x20, 0x34, 0x64, 0x15, 0x00, 0x20,
0x01, 0x00, 0xa0, 0x23, 0x39, 0x96, 0xe3, 0x29, 0xa2, 0x22, 0x1a, 0xa2,
0xe2, 0x39, 0xa2, 0x03, 0x84, 0x86, 0xac, 0x02, 0x00, 0x64, 0x00, 0x00,
0x04, 0x00, 0x20, 0x09, 0x92, 0x22, 0x29, 0x92, 0xa3, 0x49, 0xa6, 0x66,
0x6a, 0xae, 0x69, 0x9b, 0xb6, 0x68, 0xab, 0xb6, 0x6d, 0xcb, 0xb2, 0x2c,
0xcb, 0xb2, 0x0c, 0x84, 0x86, 0xac, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6,
0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6, 0x69, 0x9a, 0xa6,
0x69, 0x9a, 0x66, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65,
0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65,
0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65,
0x59, 0x96, 0x65, 0x59, 0x40, 0x68, 0xc8, 0x2a, 0x00, 0x40, 0x02, 0x00,
0x40, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x24, 0x45, 0x52, 0x24, 0xc7, 0x72,
0x2c, 0x07, 0x08, 0x0d, 0x59, 0x05, 0x00, 0xc8, 0x00, 0x00, 0x08, 0x00,
0x40, 0x52, 0x2c, 0xc5, 0x72, 0x34, 0x47, 0x73, 0x34, 0xc7, 0x73, 0x3c,
0xc7, 0x73, 0x3c, 0x47, 0x74, 0x44, 0xc9, 0x94, 0x4c, 0xcd, 0xf4, 0x4c,
0x0f, 0x08, 0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x31, 0x1c, 0xc5, 0x71, 0x1c, 0xc9, 0xd1, 0x24,
0x4f, 0x52, 0x2d, 0xd3, 0x72, 0x35, 0x57, 0x73, 0x3d, 0xd7, 0x73, 0x4d,
0xd7, 0x75, 0x5d, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x81, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x04, 0x00, 0x00, 0x21,
0x9d, 0x66, 0x96, 0x6a, 0x80, 0x08, 0x33, 0x90, 0x61, 0x20, 0x34, 0x64,
0x15, 0x00, 0x80, 0x00, 0x00, 0x00, 0x18, 0xa1, 0x08, 0x43, 0x0c, 0x08,
0x0d, 0x59, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x88, 0xa1, 0xe4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, 0xa0, 0x31, 0xc8, 0x29, 0xa4, 0x1e,
0x8d, 0x8e, 0x46, 0x4a, 0xa9, 0x83, 0x50, 0x52, 0x19, 0x27, 0xa5, 0x74,
0x82, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20, 0x00, 0x00, 0x84, 0x10, 0x52,
0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21, 0x85, 0x14, 0x52, 0x48, 0x21,
0x86, 0x18, 0x62, 0x88, 0x21, 0xa7, 0x9c, 0x72, 0x0a, 0x2a, 0xa8, 0xa4,
0x92, 0x8a, 0x2a, 0xca, 0x28, 0xb3, 0xcc, 0x32, 0xcb, 0x2c, 0xb3, 0xcc,
0x32, 0xcb, 0xac, 0xc3, 0xce, 0x3a, 0xeb, 0xb0, 0xc3, 0x10, 0x43, 0x0c,
0x31, 0xb4, 0xd2, 0x4a, 0x2c, 0x35, 0xd5, 0x56, 0x63, 0x8d, 0xb5, 0xe6,
0x9e, 0x73, 0xae, 0x39, 0x48, 0x6b, 0xa5, 0xb5, 0xd6, 0x5a, 0x2b, 0xa5,
0x94, 0x52, 0x4a, 0x29, 0xa5, 0x20, 0x34, 0x64, 0x15, 0x00, 0x00, 0x02,
0x00, 0x40, 0x20, 0x64, 0x90, 0x41, 0x06, 0x19, 0x85, 0x14, 0x52, 0x48,
0x21, 0x86, 0x98, 0x72, 0xca, 0x29, 0xa7, 0xa0, 0x82, 0x0a, 0x08, 0x0d,
0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x24,
0xcf, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11, 0x1d, 0xd1, 0x11, 0x1d,
0xd1, 0x11, 0x1d, 0xcf, 0xf1, 0x1c, 0x51, 0x12, 0x25, 0x51, 0x12, 0x25,
0xd1, 0x32, 0x2d, 0x53, 0x33, 0x3d, 0x55, 0x54, 0x55, 0x57, 0x76, 0x6d,
0x59, 0x97, 0x75, 0xdb, 0xb7, 0x85, 0x5d, 0xd8, 0x75, 0xdf, 0xd7, 0x7d,
0xdf, 0xd7, 0x8d, 0x5f, 0x17, 0x86, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96,
0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x59, 0x96, 0x65, 0x09, 0x42,
0x43, 0x56, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x42, 0x08, 0x21, 0x84,
0x14, 0x52, 0x48, 0x21, 0x85, 0x94, 0x62, 0x8c, 0x31, 0xc7, 0x9c, 0x83,
0x4e, 0x42, 0x09, 0x81, 0xd0, 0x90, 0x55, 0x00, 0x00, 0x20, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x47, 0x71, 0x14, 0xc7, 0x91, 0x1c, 0xc9, 0x91,
0x24, 0x4b, 0xb2, 0x24, 0x4d, 0xd2, 0x2c, 0xcd, 0xf2, 0x34, 0x4f, 0xf3,
0x34, 0xd1, 0x13, 0x45, 0x51, 0x34, 0x4d, 0x53, 0x15, 0x5d, 0xd1, 0x15,
0x75, 0xd3, 0x16, 0x65, 0x53, 0x36, 0x5d, 0xd3, 0x35, 0x65, 0xd3, 0x55,
0x65, 0xd5, 0x76, 0x65, 0xd9, 0xb6, 0x65, 0x5b, 0xb7, 0x7d, 0x59, 0xb6,
0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7,
0x7d, 0xdf, 0xd7, 0x75, 0x20, 0x34, 0x64, 0x15, 0x00, 0x20, 0x01, 0x00,
0xa0, 0x23, 0x39, 0x92, 0x22, 0x29, 0x92, 0x22, 0x39, 0x8e, 0xe3, 0x48,
0x92, 0x04, 0x84, 0x86, 0xac, 0x02, 0x00, 0x64, 0x00, 0x00, 0x04, 0x00,
0xa0, 0x28, 0x8e, 0xe2, 0x38, 0x8e, 0x23, 0x49, 0x92, 0x24, 0x59, 0x92,
0x26, 0x79, 0x96, 0x67, 0x89, 0x9a, 0xa9, 0x99, 0x9e, 0xe9, 0xa9, 0xa2,
0x0a, 0x84, 0x86, 0xac, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0xa0, 0x68, 0x8a, 0xa7, 0x98, 0x8a, 0xa7, 0x88, 0x8a,
0xe7, 0x88, 0x8e, 0x28, 0x89, 0x96, 0x69, 0x89, 0x9a, 0xaa, 0xb9, 0xa2,
0x6c, 0xca, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae,
0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae,
0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae, 0xeb, 0xba, 0xae,
0xeb, 0xba, 0x40, 0x68, 0xc8, 0x2a, 0x00, 0x40, 0x02, 0x00, 0x40, 0x47,
0x72, 0x24, 0x47, 0x72, 0x24, 0x45, 0x52, 0x24, 0x45, 0x72, 0x24, 0x07,
0x08, 0x0d, 0x59, 0x05, 0x00, 0xc8, 0x00, 0x00, 0x08, 0x00, 0xc0, 0x31,
0x1c, 0x43, 0x52, 0x24, 0xc7, 0xb2, 0x2c, 0x4d, 0xf3, 0x34, 0x4f, 0xf3,
0x34, 0xd1, 0x13, 0x3d, 0xd1, 0x33, 0x3d, 0x55, 0x74, 0x45, 0x17, 0x08,
0x0d, 0x59, 0x05, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x90, 0x0c, 0x4b, 0xb1, 0x1c, 0xcd, 0xd1, 0x24, 0x51, 0x52,
0x2d, 0xd5, 0x52, 0x35, 0xd5, 0x52, 0x2d, 0x55, 0x54, 0x3d, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x34, 0x4d, 0xd3, 0x34,
0x81, 0xd0, 0x90, 0x95, 0x00, 0x00, 0x19, 0x00, 0x00, 0x23, 0x41, 0x06,
0x19, 0x84, 0x10, 0x8a, 0x72, 0x90, 0x42, 0x6e, 0x3d, 0x58, 0x08, 0x31,
0xe6, 0x24, 0x05, 0xa1, 0x39, 0x06, 0xa1, 0xc4, 0x18, 0x84, 0xa7, 0x10,
0x33, 0x0c, 0x39, 0x0d, 0x22, 0x74, 0x90, 0x41, 0x27, 0x3d, 0xb8, 0x92,
0x39, 0xc3, 0x0c, 0xf3, 0xe0, 0x52, 0x28, 0x15, 0x44, 0x4c, 0x83, 0x8d,
0x25, 0x37, 0x8e, 0x20, 0x0d, 0xc2, 0xa6, 0x5c, 0x49, 0xe5, 0x38, 0x08,
0x42, 0x43, 0x56, 0x04, 0x00, 0x51, 0x00, 0x00, 0x80, 0x31, 0xc8, 0x31,
0xc4, 0x18, 0x72, 0xce, 0x49, 0xc9, 0xa0, 0x44, 0xce, 0x31, 0x09, 0x9d,
0x94, 0xc8, 0x39, 0x27, 0xa5, 0x93, 0xd2, 0x49, 0x29, 0x2d, 0x96, 0x18,
0x33, 0x29, 0x25, 0xa6, 0x12, 0x63, 0xe3, 0x9c, 0xa3, 0xd2, 0x49, 0xc9,
0xa4, 0x94, 0x18, 0x4b, 0x8a, 0x9d, 0xa4, 0x12, 0x63, 0x89, 0xad, 0x00,
0x00, 0x80, 0x00, 0x07, 0x00, 0x80, 0x00, 0x0b, 0xa1, 0xd0, 0x90, 0x15,
0x01, 0x40, 0x14, 0x00, 0x00, 0x62, 0x0c, 0x52, 0x0a, 0x29, 0x85, 0x94,
0x52, 0xce, 0x29, 0xe6, 0x90, 0x52, 0xca, 0x31, 0xe5, 0x1c, 0x52, 0x4a,
0x39, 0xa7, 0x9c, 0x53, 0xce, 0x39, 0x08, 0x1d, 0x84, 0xca, 0x31, 0x06,
0x9d, 0x83, 0x10, 0x29, 0xa5, 0x1c, 0x53, 0xce, 0x29, 0xc7, 0x1c, 0x84,
0xcc, 0x41, 0xe5, 0x9c, 0x83, 0xd0, 0x41, 0x28, 0x00, 0x00, 0x20, 0xc0,
0x01, 0x00, 0x20, 0xc0, 0x42, 0x28, 0x34, 0x64, 0x45, 0x00, 0x10, 0x27,
0x00, 0xe0, 0x70, 0x24, 0xcf, 0x93, 0x34, 0x4b, 0x14, 0x25, 0x4b, 0x13,
0x45, 0xcf, 0x14, 0x65, 0xd7, 0x13, 0x4d, 0xd7, 0x95, 0x34, 0xcd, 0x34,
0x35, 0x51, 0x54, 0x55, 0xcb, 0x13, 0x55, 0xd5, 0x54, 0x55, 0xdb, 0x16,
0x4d, 0x55, 0xb6, 0x25, 0x4d, 0x13, 0x4d, 0x4d, 0xf4, 0x54, 0x55, 0x13,
0x45, 0x55, 0x15, 0x55, 0xd3, 0x96, 0x4d, 0x55, 0xb5, 0x6d, 0xcf, 0x34,
0x65, 0xd9, 0x54, 0x55, 0xdd, 0x16, 0x55, 0xd5, 0xb6, 0x65, 0xdb, 0x16,
0x7e, 0x57, 0x96, 0x75, 0xdf, 0x33, 0x4d, 0x59, 0x16, 0x55, 0xd5, 0xd6,
0x4d, 0x55, 0xb5, 0x75, 0xd7, 0x96, 0x7d, 0x5f, 0xd6, 0x6d, 0x5d, 0x98,
0x34, 0xcd, 0x34, 0x35, 0x51, 0x54, 0x55, 0x4d, 0x14, 0x55, 0xd5, 0x54,
0x55, 0xdb, 0x36, 0x55, 0xd7, 0xb6, 0x35, 0x51, 0x74, 0x55, 0x51, 0x55,
0x65, 0x59, 0x54, 0x55, 0x59, 0x76, 0x65, 0x59, 0xf7, 0x55, 0x57, 0xd6,
0x7d, 0x4b, 0x14, 0x55, 0xd5, 0x53, 0x4d, 0xd9, 0x15, 0x55, 0x55, 0xb6,
0x55, 0xd9, 0xf5, 0x6d, 0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40, 0x14, 0x00, 0x00, 0x41, 0x88, 0x52, 0xce,
0x49, 0x69, 0x10, 0x72, 0xcc, 0x39, 0x2a, 0x09, 0x42, 0xcc, 0x39, 0x27,
0xa9, 0x72, 0x4c, 0x42, 0x29, 0x29, 0x55, 0xcc, 0x41, 0x08, 0x25, 0xb5,
0xce, 0x39, 0x29, 0x29, 0xc5, 0xd6, 0x39, 0x08, 0x25, 0xa5, 0x16, 0x4b,
0x2a, 0x2d, 0xc5, 0x56, 0x6b, 0x29, 0x29, 0xb5, 0x16, 0x6b, 0x2d, 0x00,
0x00, 0xa0, 0xc0, 0x01, 0x00, 0x20, 0xc0, 0x06, 0x4d, 0x89, 0xc5, 0x01,
0x0a, 0x0d, 0x59, 0x09, 0x00, 0x44, 0x01, 0x00, 0x20, 0xc6, 0x20, 0xc4,
0x18, 0x84, 0x06, 0x19, 0xa5, 0x18, 0x83, 0xd0, 0x18, 0xa4, 0x14, 0x63,
0x10, 0x22, 0xa5, 0x18, 0x73, 0x4e, 0x4a, 0xa5, 0x14, 0x63, 0xce, 0x49,
0xc9, 0x18, 0x73, 0x0e, 0x42, 0x2a, 0x19, 0x63, 0xce, 0x41, 0x28, 0x29,
0x84, 0x50, 0x4a, 0x2a, 0x29, 0x85, 0x10, 0x4a, 0x49, 0x25, 0xa5, 0x02,
0x00, 0x00, 0x0a, 0x1c, 0x00, 0x00, 0x02, 0x6c, 0xd0, 0x94, 0x58, 0x1c,
0xa0, 0xd0, 0x90, 0x15, 0x01, 0x40, 0x14, 0x00, 0x00, 0x60, 0x0c, 0x62,
0x0c, 0x31, 0x86, 0x20, 0x74, 0x54, 0x32, 0x2a, 0x11, 0x84, 0x4c, 0x4a,
0x27, 0xa9, 0x81, 0x10, 0x5a, 0x0b, 0xad, 0x75, 0xd6, 0x52, 0x6b, 0xa5,
0xc5, 0xcc, 0x5a, 0x6a, 0xad, 0xb4, 0xd8, 0x40, 0x08, 0xad, 0x85, 0xd6,
0x32, 0x4b, 0x25, 0xc6, 0xd4, 0x5a, 0x66, 0xad, 0xc4, 0x98, 0x5a, 0x2b,
0x00, 0x00, 0xec, 0xc0, 0x01, 0x00, 0xec, 0xc0, 0x42, 0x28, 0x34, 0x64,
0x25, 0x00, 0x90, 0x07, 0x00, 0x40, 0x18, 0xa3, 0x14, 0x63, 0xce, 0x39,
0x67, 0x10, 0x62, 0xcc, 0x39, 0xe8, 0x1c, 0x34, 0x08, 0x31, 0xe6, 0x1c,
0x84, 0x0e, 0x2a, 0xc6, 0x9c, 0x83, 0x0e, 0x42, 0x08, 0x15, 0x63, 0xce,
0x41, 0x08, 0x21, 0x84, 0xcc, 0x39, 0x08, 0x21, 0x84, 0x10, 0x42, 0xe6,
0x1c, 0x84, 0x10, 0x42, 0x08, 0xa1, 0x83, 0x10, 0x42, 0x08, 0xa5, 0x94,
0xd2, 0x41, 0x08, 0x21, 0x84, 0x52, 0x4a, 0xe9, 0x20, 0x84, 0x10, 0x42,
0x29, 0xa5, 0x74, 0x10, 0x42, 0x08, 0xa1, 0x94, 0x52, 0x0a, 0x00, 0x00,
0x2a, 0x70, 0x00, 0x00, 0x08, 0xb0, 0x51, 0x64, 0x73, 0x82, 0x91, 0xa0,
0x42, 0x43, 0x56, 0x02, 0x00, 0x79, 0x00, 0x00, 0x80, 0x31, 0x4a, 0x39,
0x07, 0xa1, 0x94, 0x46, 0x29, 0xc6, 0x20, 0x94, 0x92, 0x52, 0xa3, 0x14,
0x63, 0x10, 0x4a, 0x49, 0xa9, 0x72, 0x0c, 0x42, 0x29, 0x29, 0xc5, 0x56,
0x39, 0x07, 0xa1, 0x94, 0x94, 0x5a, 0xec, 0x20, 0x94, 0xd2, 0x5a, 0x6c,
0x35, 0x76, 0x10, 0x4a, 0x69, 0x2d, 0xc6, 0x5a, 0x43, 0x4a, 0xad, 0xc5,
0x58, 0x6b, 0xae, 0x21, 0xa5, 0xd6, 0x62, 0xac, 0x35, 0xd7, 0xd4, 0x5a,
0x8c, 0xb5, 0xe6, 0x9a, 0x6b, 0x4a, 0x2d, 0xc6, 0x5a, 0x6b, 0xcd, 0xb9,
0x00, 0x00, 0xdc, 0x05, 0x07, 0x00, 0xb0, 0x03, 0x1b, 0x45, 0x36, 0x27,
0x18, 0x09, 0x2a, 0x34, 0x64, 0x25, 0x00, 0x90, 0x07, 0x00, 0x80, 0x20,
0xa4, 0x14, 0x63, 0x8c, 0x31, 0x86, 0x14, 0x62, 0x8a, 0x31, 0xe7, 0x9c,
0x43, 0x08, 0x29, 0xc5, 0x98, 0x73, 0xce, 0x29, 0xa6, 0x18, 0x73, 0xce,
0x39, 0xe7, 0x94, 0x62, 0x8c, 0x39, 0xe7, 0x9c, 0x73, 0x8c, 0x31, 0xe7,
0x9c, 0x73, 0xce, 0x39, 0xc6, 0x98, 0x73, 0xce, 0x39, 0xe7, 0x1c, 0x73,
0xce, 0x39, 0xe7, 0x9c, 0x73, 0x8e, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39,
0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c, 0x73, 0xce, 0x39, 0xe7, 0x9c,
0x73, 0xce, 0x09, 0x00, 0x00, 0x2a, 0x70, 0x00, 0x00, 0x08, 0xb0, 0x51,
0x64, 0x73, 0x82, 0x91, 0xa0, 0x42, 0x43, 0x56, 0x02, 0x00, 0xa9, 0x00,
0x00, 0x00, 0x11, 0x56, 0x62, 0x8c, 0x31, 0xc6, 0x18, 0x1b, 0x08, 0x31,
0xc6, 0x18, 0x63, 0x8c, 0x31, 0x46, 0x12, 0x62, 0x8c, 0x31, 0xc6, 0x18,
0x63, 0x6c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x98, 0x62, 0x8c,
0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6,
0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63, 0x8c, 0x31, 0xc6, 0x18, 0x63,
0x8c, 0x31, 0xc6, 0x18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, 0x18, 0x6b,
0x2d, 0x29, 0xb5, 0xd6, 0x62, 0x8c, 0xb5, 0xc6, 0x5a, 0x6b, 0x49, 0xa9,
0xb5, 0xd6, 0x62, 0x8b, 0x35, 0xd6, 0x5a, 0x0b, 0x00, 0xe0, 0x6e, 0x70,
0x00, 0x80, 0x48, 0xb0, 0x71, 0x86, 0x95, 0xa4, 0xb3, 0xc2, 0xd1, 0xe0,
0x42, 0x43, 0x56, 0x02, 0x00, 0x21, 0x01, 0x00, 0x04, 0x42, 0x8c, 0x39,
0xe7, 0x9c, 0x73, 0x10, 0x42, 0x08, 0x21, 0x52, 0x8a, 0x31, 0xe7, 0xa0,
0x83, 0x10, 0x42, 0x08, 0x21, 0x44, 0x4a, 0x31, 0xe6, 0x1c, 0x74, 0x10,
0x42, 0x08, 0x21, 0x84, 0x8c, 0x31, 0xe7, 0xa0, 0x83, 0x10, 0x42, 0x08,
0x21, 0x84, 0x90, 0x31, 0xe6, 0x1c, 0x74, 0x10, 0x42, 0x08, 0x21, 0x84,
0x10, 0x3a, 0xe7, 0x1c, 0x84, 0x10, 0x42, 0x08, 0xa1, 0x84, 0x52, 0x4a,
0xe7, 0x1c, 0x74, 0x10, 0x42, 0x08, 0x21, 0x94, 0x50, 0x42, 0xe9, 0x20,
0x84, 0x10, 0x42, 0x08, 0xa1, 0x84, 0x52, 0x4a, 0x29, 0x1d, 0x84, 0x10,
0x42, 0x28, 0xa1, 0x84, 0x52, 0x4a, 0x29, 0x25, 0x84, 0x10, 0x42, 0x09,
0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x84, 0x10, 0x42, 0x08, 0xa1, 0x84,
0x12, 0x4a, 0x29, 0xa5, 0x94, 0x10, 0x42, 0x08, 0xa5, 0x94, 0x52, 0x4a,
0x29, 0xa5, 0x94, 0x12, 0x42, 0x08, 0x21, 0x94, 0x52, 0x4a, 0x29, 0xa5,
0x94, 0x52, 0x42, 0x08, 0xa1, 0x94, 0x50, 0x4a, 0x29, 0xa5, 0x94, 0x52,
0x4a, 0x08, 0x21, 0x84, 0x52, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x09,
0x21, 0x84, 0x50, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0x21, 0x84,
0x12, 0x4a, 0x29, 0xa5, 0x94, 0x52, 0x4a, 0x29, 0xa5, 0x00, 0x00, 0x80,
0x03, 0x07, 0x00, 0x80, 0x00, 0x23, 0xe8, 0x24, 0xa3, 0xca, 0x22, 0x6c,
0x34, 0xe1, 0xc2, 0x03, 0x50, 0x68, 0xc8, 0x4a, 0x00, 0x80, 0x0c, 0x00,
0x00, 0x71, 0xd8, 0x6a, 0xeb, 0x29, 0xd6, 0xc8, 0x20, 0xc5, 0x9c, 0x84,
0x96, 0x4b, 0x84, 0x90, 0x72, 0x10, 0x62, 0x2e, 0x11, 0x52, 0x8a, 0x39,
0x47, 0xb1, 0x65, 0x48, 0x19, 0xc5, 0x18, 0xd5, 0x94, 0x31, 0xa5, 0x14,
0x53, 0x52, 0x6b, 0xe8, 0x9c, 0x62, 0x8c, 0x51, 0x4f, 0x9d, 0x63, 0x4a,
0x31, 0xc3, 0xac, 0x94, 0x56, 0x4a, 0x28, 0x91, 0x82, 0xd2, 0x72, 0xac,
0xb5, 0x76, 0xcc, 0x01, 0x00, 0x00, 0x20, 0x08, 0x00, 0x30, 0x10, 0x21,
0x33, 0x81, 0x40, 0x01, 0x14, 0x18, 0xc8, 0x00, 0x80, 0x03, 0x84, 0x04,
0x29, 0x00, 0xa0, 0xb0, 0xc0, 0xd0, 0x31, 0x5c, 0x04, 0x04, 0xe4, 0x12,
0x32, 0x0a, 0x0c, 0x0a, 0xc7, 0x84, 0x73, 0xd2, 0x69, 0x03, 0x00, 0x10,
0x84, 0xc8, 0x0c, 0x91, 0x88, 0x58, 0x0c, 0x12, 0x13, 0xaa, 0x81, 0xa2,
0x62, 0x3a, 0x00, 0x58, 0x5c, 0x60, 0xc8, 0x07, 0x80, 0x0c, 0x8d, 0x8d,
0xb4, 0x8b, 0x0b, 0xe8, 0x32, 0xc0, 0x05, 0x5d, 0xdc, 0x75, 0x20, 0x84,
0x20, 0x04, 0x21, 0x88, 0xc5, 0x01, 0x14, 0x90, 0x80, 0x83, 0x13, 0x6e,
0x78, 0xe2, 0x0d, 0x4f, 0xb8, 0xc1, 0x09, 0x3a, 0x45, 0xa5, 0x0e, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1e, 0x00, 0x00, 0x92, 0x0d,
0x20, 0x22, 0x22, 0x9a, 0x39, 0x8e, 0x0e, 0x8f, 0x0f, 0x90, 0x10, 0x91,
0x11, 0x92, 0x12, 0x93, 0x13, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
0x01, 0x80, 0x0f, 0x00, 0x80, 0x24, 0x05, 0x88, 0x88, 0x88, 0x66, 0x8e,
0xa3, 0xc3, 0xe3, 0x03, 0x24, 0x44, 0x64, 0x84, 0xa4, 0xc4, 0xe4, 0x04,
0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x08,
0x4f, 0x67, 0x67, 0x53, 0x00, 0x04, 0xb2, 0x4d, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x27, 0xee, 0x2b, 0x2f, 0x02, 0x00, 0x00, 0x00, 0x95, 0x9b,
0xdf, 0x49, 0x19, 0x37, 0x3e, 0xff, 0x1b, 0xff, 0x2b, 0xff, 0x0e, 0xd5,
0xcb, 0xd1, 0xd9, 0xce, 0xd0, 0xce, 0xd2, 0xcc, 0xce, 0xcc, 0xb1, 0xc6,
0xbc, 0xbe, 0xab, 0xba, 0x6c, 0x42, 0x0b, 0x65, 0xd0, 0x2b, 0xd0, 0x3d,
0x05, 0x93, 0xb1, 0x22, 0x3f, 0xcd, 0x1a, 0x74, 0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a5, 0x28, 0xda,
0xe9, 0xef, 0xc6, 0x30, 0x94, 0x22, 0x01, 0x80, 0x51, 0x01, 0x64, 0x78,
0xef, 0xf5, 0xd3, 0xa1, 0xd1, 0xfa, 0x23, 0x63, 0x29, 0x00, 0x00, 0x40,
0x50, 0x00, 0x00, 0x0f, 0xb7, 0x5e, 0xb9, 0x99, 0x05, 0x54, 0x1f, 0xdf,
0x6d, 0x8d, 0xc3, 0x84, 0x94, 0x12, 0x60, 0x7c, 0x9e, 0x10, 0x00, 0xa0,
0x2e, 0x3e, 0x38, 0x68, 0xd5, 0x75, 0x28, 0x00, 0xe0, 0x6b, 0x2a, 0x84,
0xd6, 0xef, 0x7f, 0xb8, 0xbe, 0xb1, 0x11, 0x65, 0x7c, 0x97, 0x6f, 0x94,
0xc7, 0xd7, 0x7d, 0x8e, 0x9b, 0x85, 0xcf, 0xba, 0x85, 0x06, 0x77, 0x4b,
0xa7, 0x2f, 0xb3, 0x57, 0xef, 0xa6, 0x40, 0x77, 0x16, 0xed, 0x75, 0x7f,
0xff, 0x8c, 0xc7, 0xa9, 0x00, 0xc0, 0x7f, 0x56, 0x51, 0x96, 0x65, 0x31,
0x01, 0x00, 0xec, 0x89, 0xe8, 0xbd, 0x77, 0x17, 0xfd, 0xfa, 0x7f, 0xbd,
0x1b, 0xc0, 0x00, 0x46, 0x00, 0x5e, 0x28, 0xd5, 0x15, 0x09, 0xfe, 0xc3,
0x88, 0xc2, 0x5f, 0xc0, 0x35, 0x28, 0x59, 0x34, 0xa3, 0xb4, 0xa3, 0xba,
0x8b, 0x05, 0x1e, 0x02, 0xfe, 0x5c, 0x01, 0x84, 0xf7, 0x00, 0xe0, 0xe7,
0x80, 0x1d, 0x12, 0x00, 0xd0, 0xff, 0x78, 0x09, 0xec, 0x09, 0x00, 0x6e,
0xbf, 0x44, 0x96, 0x00, 0x80, 0x8f, 0x77, 0x02, 0x00, 0x00, 0x29, 0xcb,
0xfe, 0x57, 0x02, 0x80, 0x79, 0x80, 0xbd, 0xf8, 0x04, 0x00, 0x03, 0x07,
0x00, 0xb4, 0x55, 0xf6, 0xf6, 0x2b, 0x73, 0x9f, 0x3c, 0x78, 0xfd, 0xf6,
0x95, 0x23, 0x8f, 0x5f, 0x6d, 0x1b, 0xb7, 0x73, 0xdf, 0x16, 0xbb, 0x86,
0xea, 0xa8, 0xcf, 0x2d, 0x30, 0x32, 0x4b, 0x2d, 0x75, 0x0e, 0x52, 0xc1,
0x39, 0x7f, 0xf6, 0x16, 0x40, 0xc1, 0x93, 0x55, 0x9b, 0x76, 0x5f, 0xad,
0xaf, 0x84, 0x69, 0xad, 0x26, 0x50, 0x58, 0x07, 0x00, 0xce, 0x91, 0x4b,
0xfb, 0x4c, 0x94, 0x54, 0x80, 0x73, 0x00, 0xac, 0x23, 0xdd, 0x9d, 0xaf,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd5, 0xd5, 0xe8, 0xdc, 0x6c, 0x19,
0x40, 0x02, 0x00, 0x00, 0x00, 0x80, 0x89, 0x50, 0x26, 0x95, 0x11, 0xd1,
0xd3, 0x26, 0xd3, 0xac, 0x02, 0xac, 0x04, 0x00, 0x00, 0x00, 0x40, 0x6c,
0xad, 0x29, 0x59, 0x7b, 0x15, 0x55, 0xd2, 0xbc, 0xad, 0x24, 0x60, 0x01,
0x00, 0x00, 0xd7, 0xd5, 0x43, 0x13, 0x05, 0x0a, 0x60, 0xf5, 0xc5, 0xae,
0xb4, 0xd8, 0xbf, 0x98, 0xfb, 0x1c, 0x93, 0x99, 0x67, 0x95, 0x2d, 0xe5,
0x87, 0x58, 0x02, 0x97, 0xcc, 0xfc, 0xe7, 0x00, 0x9d, 0xa6, 0x68, 0x07,
0x5f, 0xe0, 0x2d, 0xfc, 0x1d, 0x10, 0x63, 0x16, 0x15, 0xa0, 0x2e, 0x33,
0x54, 0xf2, 0x97, 0xea, 0x97, 0x00, 0x20, 0x16, 0x83, 0x78, 0x00, 0x00,
0x00, 0x00, 0xd7, 0xfb, 0x9b, 0x0b, 0x78, 0x16, 0xee, 0x61, 0x7f, 0x06,
0x00, 0x98, 0x41, 0xe6, 0x94, 0x78, 0x03, 0x00, 0x00, 0x30, 0x9e, 0x28,
0xed, 0x4f, 0x4e, 0xf0, 0x1f, 0x46, 0x6b, 0x1c, 0x3c, 0x86, 0x66, 0xc9,
0xf6, 0xcd, 0x57, 0x02, 0xce, 0x84, 0x1e, 0xa0, 0x02, 0x86, 0x0f, 0xa0,
0xdf, 0x00, 0x00, 0xfa, 0xc5, 0x03, 0x00, 0x00, 0x84, 0xd4, 0x6f, 0x00,
0x00, 0x03, 0xe0, 0xf6, 0x56, 0x05, 0x00, 0x10, 0xc2, 0x01, 0x00, 0xe6,
0x00, 0xf9, 0x50, 0x06, 0x00, 0x00, 0x47, 0x68, 0xe0, 0x01, 0x00, 0x00,
0x60, 0x75, 0x01, 0xa8, 0x07, 0xed, 0x51, 0x0b, 0x00, 0x00, 0x00, 0xf0,
0xc8, 0xa5, 0x30, 0x03, 0x7b, 0xc5, 0xcf, 0x46, 0x01, 0x00, 0x00, 0xd6,
0xa7, 0x00, 0x00, 0x5c, 0xee, 0x02, 0x00, 0x00, 0x00, 0xfc, 0xfd, 0x1c,
0x17, 0x14, 0x20, 0x00, 0x00, 0x00, 0xf0, 0x14, 0x00, 0x00, 0x05, 0xe0,
0x04, 0x43, 0x65, 0xcf, 0x0e, 0x80, 0x72, 0x18, 0x00, 0xb0, 0x00, 0x00,
0x00, 0x00, 0xd0, 0x20, 0xc2, 0x23, 0x00, 0x24, 0x4f, 0x0e, 0x16, 0x00,
0x00, 0x08, 0xc0, 0x3e, 0xd9, 0x43, 0x53, 0xa5, 0xe6, 0xb2, 0x09, 0x26,
0xb4, 0xba, 0xa2, 0xd8, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3b, 0x00, 0x00,
0xec, 0xb0, 0x73, 0x49, 0x00, 0xc0, 0x04, 0x00, 0x00, 0xf3, 0xf1, 0xba,
0x77, 0x01, 0x84, 0x10, 0x05, 0xbc, 0x05, 0x00, 0x00, 0x00, 0x10, 0x20,
0x39, 0xfe, 0x85, 0x02, 0x34, 0x00, 0x24, 0x2c, 0xd9, 0x39, 0x00, 0x00,
0x80, 0x58, 0xc8, 0x77, 0x3c, 0x00, 0xba, 0xb2, 0x6f, 0xa0, 0x3b, 0x63,
0x20, 0x08, 0x10, 0x00, 0xc0, 0x56, 0x00, 0x7e, 0x28, 0x6d, 0x0f, 0x5e,
0xf0, 0x1b, 0x46, 0xb4, 0x0b, 0x27, 0xd7, 0xd6, 0x69, 0x2e, 0xdb, 0xdd,
0x5f, 0x24, 0x4e, 0x84, 0x1e, 0xa0, 0x02, 0x24, 0x3d, 0x60, 0x5f, 0x00,
0x1a, 0xf4, 0x8b, 0x03, 0x00, 0x00, 0x08, 0xa9, 0xdf, 0x00, 0x00, 0x02,
0x7b, 0xab, 0x02, 0x00, 0x08, 0xcd, 0xaf, 0xab, 0x00, 0x80, 0x39, 0xe0,
0xec, 0xc5, 0x57, 0x00, 0x08, 0xe6, 0x00, 0x00, 0xc0, 0xfa, 0x56, 0x05,
0x58, 0x56, 0x39, 0x36, 0x2c, 0x38, 0x00, 0x00, 0x80, 0x7e, 0x68, 0x98,
0x87, 0x0b, 0x60, 0x31, 0x29, 0x00, 0x00, 0x40, 0x7f, 0x03, 0x00, 0x80,
0x79, 0x92, 0x84, 0x0f, 0x00, 0x14, 0x00, 0x00, 0x00, 0x4b, 0xdd, 0x94,
0x23, 0x01, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x21, 0xa1, 0x4c, 0xc4, 0x9f,
0xd8, 0x02, 0x8c, 0x84, 0xb3, 0xb0, 0x80, 0xa5, 0x00, 0x00, 0x80, 0xba,
0x17, 0x01, 0x1c, 0x40, 0x00, 0xcc, 0xf1, 0x47, 0x56, 0x45, 0x54, 0xac,
0x60, 0x1a, 0xcf, 0x0c, 0x8b, 0x07, 0x00, 0x30, 0x00, 0x00, 0x60, 0xc2,
0xa6, 0xba, 0x00, 0x00, 0x20, 0x81, 0xf0, 0xe7, 0x1e, 0xcf, 0x4b, 0x58,
0x25, 0xdf, 0x0a, 0xce, 0x0b, 0x09, 0x00, 0x00, 0x20, 0x00, 0x74, 0x76,
0x70, 0x4b, 0x01, 0x34, 0x2a, 0x9a, 0xa7, 0x01, 0x00, 0x00, 0x00, 0xf0,
0x0d, 0xc0, 0xc4, 0x42, 0xfe, 0x4d, 0x00, 0x6c, 0x80, 0x07, 0x00, 0x80,
0x61, 0xf0, 0x07, 0x0d, 0x00, 0x00, 0x7e, 0x18, 0xed, 0x4f, 0x52, 0xf0,
0x1f, 0x46, 0xd4, 0x38, 0xe4, 0x6b, 0xe8, 0x34, 0x27, 0xdb, 0x93, 0x5b,
0x02, 0xce, 0x84, 0x1e, 0x00, 0x20, 0x58, 0x02, 0xfb, 0x02, 0x00, 0xf4,
0x0b, 0x00, 0x00, 0x00, 0x21, 0xf5, 0x0f, 0x00, 0x7e, 0xff, 0x4f, 0x96,
0x00, 0x80, 0x67, 0xef, 0x04, 0x00, 0x00, 0xa1, 0xc9, 0x2a, 0x00, 0x60,
0x0e, 0x38, 0x0f, 0xe7, 0x09, 0x00, 0xc0, 0x07, 0xf3, 0x00, 0x00, 0xc0,
0x67, 0xeb, 0x00, 0x6c, 0xb3, 0xe1, 0x24, 0x00, 0x00, 0x00, 0xc0, 0x63,
0x95, 0xc0, 0x0c, 0xfc, 0x2f, 0xbc, 0x07, 0xc0, 0x01, 0x00, 0xac, 0x1f,
0x03, 0x00, 0x00, 0x00, 0x01, 0x08, 0xc6, 0x5f, 0x35, 0x00, 0x00, 0x00,
0x00, 0x00, 0x2c, 0xf6, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0xdc,
0x28, 0x8e, 0x04, 0x24, 0x03, 0x00, 0x00, 0x00, 0x80, 0x89, 0xd0, 0x0d,
0x5f, 0x00, 0x10, 0x8d, 0xe2, 0xb0, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00,
0x81, 0x00, 0x1f, 0x00, 0xc6, 0xbf, 0x05, 0x00, 0x80, 0x00, 0xdc, 0xcb,
0xa6, 0xb2, 0x22, 0xdd, 0x98, 0x90, 0xe2, 0xd1, 0x7e, 0xad, 0xc9, 0x05,
0x00, 0x00, 0xe0, 0x05, 0x00, 0xc0, 0xc0, 0xbc, 0x8b, 0x03, 0x00, 0x00,
0x20, 0xcd, 0xa7, 0xa7, 0x3f, 0x13, 0x40, 0xc0, 0x3e, 0xe0, 0x2d, 0x00,
0x8c, 0xa9, 0x01, 0x20, 0x4d, 0x36, 0x88, 0x12, 0x00, 0x00, 0x1e, 0x58,
0xc8, 0x77, 0x54, 0x00, 0x40, 0x8d, 0xc4, 0xa6, 0x09, 0x00, 0x00, 0x9e,
0x18, 0x1d, 0xdf, 0x9c, 0x80, 0x00, 0x87, 0xd1, 0xc6, 0xff, 0x29, 0x5e,
0x53, 0xa7, 0x8b, 0x6c, 0x2f, 0xbd, 0x22, 0x71, 0x22, 0xf4, 0x00, 0x06,
0x82, 0x0f, 0xb0, 0x2f, 0x00, 0x15, 0xf4, 0x8b, 0x0e, 0x00, 0x00, 0x10,
0x52, 0xbf, 0x01, 0x00, 0x48, 0x0f, 0x00, 0xf0, 0x7d, 0x55, 0x00, 0x00,
0xa1, 0xf9, 0x73, 0x15, 0x00, 0x30, 0x07, 0x9c, 0x87, 0xbb, 0x01, 0x00,
0xc0, 0x49, 0x0f, 0x5c, 0x00, 0x00, 0x00, 0x38, 0xb0, 0x66, 0x02, 0x1f,
0xa6, 0xea, 0xb7, 0xe2, 0x80, 0x00, 0x00, 0x58, 0x7f, 0x3b, 0x15, 0x36,
0x81, 0xad, 0x72, 0xd1, 0xc0, 0x01, 0x00, 0x00, 0xfd, 0x53, 0x01, 0x00,
0x72, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x64, 0x5e, 0x01, 0x04,
0x00, 0x00, 0x00, 0x4a, 0xc1, 0xa4, 0xec, 0x04, 0x1d,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x12, 0x00, 0x00, 0x80, 0x04, 0x00, 0xb4, 0xee,
0xe6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8e, 0x3c, 0x23, 0x01, 0x78,
0x00, 0x00, 0x00, 0x8c, 0xea, 0x11, 0x22, 0x01, 0x00, 0x00, 0x00, 0x48,
0x94, 0xcd, 0x33, 0x90, 0x80, 0x04, 0x00, 0x00, 0xc0, 0x7f, 0x17, 0x0e,
0x0e, 0x00, 0x00, 0x00, 0x54, 0x7b, 0x9f, 0xc1, 0x2e, 0xdb, 0xbe, 0xed,
0x9f, 0xde, 0x36, 0xc9, 0x1d, 0x00, 0x80, 0x2a, 0x00, 0x00, 0x5f, 0xff,
0xfa, 0x21, 0x00, 0x00, 0x00, 0xd8, 0xb7, 0xd7, 0xba, 0x47, 0x00, 0x31,
0x38, 0x2f, 0x7c, 0x25, 0x00, 0xf0, 0xea, 0x00, 0x20, 0x64, 0x31, 0x78,
0x03, 0x00, 0x00, 0x32, 0x0b, 0xc9, 0x53, 0x00, 0xb0, 0x01, 0x00, 0x04,
0x32, 0x9f, 0x51, 0x00, 0x6c, 0x80, 0x01, 0x10, 0x34, 0xf8, 0xb2, 0x06,
0x00, 0x00, 0x5e, 0x18, 0xed, 0x2f, 0x4e, 0xf0, 0x1f, 0xd6, 0xfb, 0x38,
0xc5, 0x35, 0x6a, 0x56, 0xb6, 0x0f, 0xb7, 0x10, 0x05, 0x42, 0x0f, 0xd0,
0x80, 0xe0, 0x0f, 0x60, 0x5f, 0x00, 0x80, 0x7e, 0xf1, 0x00, 0x00, 0x80,
0xc4, 0xbe, 0x00, 0x00, 0x59, 0x02, 0x00, 0x9e, 0xbd, 0x55, 0x00, 0x00,
0x84, 0xcc, 0x77, 0x02, 0x80, 0xdc, 0x43, 0x91, 0x00, 0x00, 0x3c, 0xa1,
0x81, 0x0b, 0x00, 0x00, 0x80, 0x7e, 0x48, 0xa0, 0x1e, 0x1c, 0x44, 0xb3,
0xe2, 0x00, 0x20, 0x00, 0x70, 0xb7, 0x12, 0xc8, 0x84, 0x03, 0x9d, 0x77,
0x0a, 0x00, 0x14, 0x00, 0xfa, 0xa7, 0x02, 0x00, 0xf4, 0x35, 0x00, 0x00,
0x00, 0x00, 0x40, 0x92, 0xb2, 0x5a, 0xe3, 0x01, 0x80, 0x04, 0x00, 0x00,
0xc0, 0xa8, 0x2f, 0x06, 0x12, 0x00, 0x05, 0x00, 0x00, 0x16, 0x64, 0xd7,
0x42, 0x02, 0x12, 0x00, 0x00, 0x00, 0x00, 0x14, 0x9c, 0xba, 0x01, 0x80,
0xf2, 0x23, 0x01, 0x00, 0x0a, 0x00, 0x00, 0xb4, 0xf7, 0x04, 0xbc, 0x95,
0x1b, 0xcb, 0x99, 0x92, 0x09, 0x21, 0x75, 0x6c, 0x76, 0x00, 0x00, 0x00,
0xbc, 0x00, 0x00, 0xcc, 0x9a, 0xad, 0x3b, 0x00, 0x00, 0x80, 0x24, 0x98,
0xee, 0xdf, 0x0f, 0xfb, 0xc7, 0x08, 0x0d, 0x00, 0xc1, 0x31, 0xfd, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xec, 0x5a, 0x0b, 0x98, 0x59, 0x92,
0x27, 0x00, 0x00, 0x64, 0x9a, 0x85, 0xfc, 0x75, 0x00, 0x00, 0x80, 0x0a,
0x69, 0x1c, 0x05, 0xc0, 0x6b, 0x00, 0x1e, 0x18, 0x6d, 0x4f, 0x4e, 0xf0,
0x1b, 0x36, 0xa6, 0xf4, 0x7f, 0x8a, 0x57, 0xd4, 0x09, 0x93, 0xed, 0x43,
0x57, 0x80, 0xa4, 0xf4, 0x0b, 0xd0, 0x00, 0x49, 0x0f, 0xd8, 0x17, 0x80,
0x0a, 0xfa, 0xc5, 0x01, 0x00, 0x00, 0x12, 0xfd, 0x06, 0x00, 0x90, 0xdb,
0x5b, 0x05, 0x00, 0x40, 0xc8, 0xbc, 0x94, 0x00, 0xa0, 0x9f, 0x00, 0x7b,
0xf1, 0x19, 0x00, 0xa4, 0x07, 0x1e, 0x00, 0x00, 0x00, 0xfa, 0xab, 0x32,
0xa0, 0x2e, 0x74, 0x82, 0x2d, 0x00, 0x0a, 0x00, 0x60, 0x7d, 0x5f, 0x90,
0x0e, 0xf3, 0xce, 0x61, 0x43, 0x00, 0x00, 0x00, 0xf8, 0x14, 0x00, 0x80,
0xde, 0x47, 0x8b, 0xc0, 0x01, 0x60, 0x00, 0x00, 0x00, 0x50, 0x6e, 0x1b,
0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x7e, 0x5a, 0x00,
0xda, 0x41, 0x9e, 0xf7, 0x04, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x8d, 0x03,
0x00, 0x0b, 0x00, 0x00, 0x00, 0x30, 0x8e, 0xa2, 0xf7, 0x51, 0xb2, 0x22,
0xab, 0x94, 0x96, 0xdd, 0xbf, 0x77, 0xe2, 0x0c, 0x00, 0xc0, 0xb0, 0x00,
0x80, 0x0c, 0x23, 0x9f, 0x9e, 0x02, 0x00, 0x00, 0x00, 0xa9, 0x3f, 0xbe,
0xfa, 0x22, 0x20, 0x01, 0x68, 0xca, 0xd7, 0xf0, 0xbb, 0x01, 0x00, 0x00,
0x00, 0x80, 0x99, 0x6e, 0x91, 0xab, 0xb5, 0x09, 0x00, 0x03, 0x22, 0xd8,
0x0d, 0x00, 0x60, 0x02, 0xe0, 0x32, 0x0b, 0xfd, 0xde, 0x01, 0x00, 0x00,
0x82, 0xdc, 0x03, 0xe7, 0x49, 0x1a, 0x00, 0x00, 0x1e, 0x08, 0x1d, 0x5f,
0x8a, 0xe0, 0x3f, 0x0c, 0x8b, 0x6f, 0x12, 0x17, 0x3a, 0x7f, 0xc8, 0xf6,
0xd1, 0xcb, 0x20, 0x09, 0x3d, 0x00, 0xc0, 0x20, 0x81, 0x7d, 0x01, 0x00,
0xfa, 0x05, 0x00, 0x00, 0x80, 0x90, 0xf6, 0x00, 0x00, 0xdf, 0x7f, 0x20,
0x4b, 0x00, 0xc0, 0xb5, 0x77, 0x32, 0x00, 0x80, 0x90, 0x89, 0x12, 0x00,
0xcc, 0x01, 0x3c, 0xbc, 0x06, 0x00, 0x00, 0x47, 0x68, 0xe0, 0x02, 0x00,
0x00, 0xc0, 0x8b, 0x35, 0x01, 0x06, 0x6c, 0xd8, 0x33, 0x01, 0x00, 0x00,
0x80, 0xbb, 0x2a, 0x05, 0x03, 0x5e, 0x15, 0xbe, 0x01, 0x00, 0x00, 0x40,
0xff, 0xde, 0x02, 0x00, 0x00, 0x00, 0x00, 0xb1, 0x2a, 0x2f, 0x0e, 0x00,
0x00, 0x00, 0x00, 0xb0, 0x72, 0x7c, 0x17, 0x03, 0x00, 0x00, 0x00, 0x00,
0x80, 0xec, 0xd7, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x05,
0xf8, 0x16, 0x20, 0x8b, 0xcb, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x37, 0xa9, 0x21, 0xfc, 0x04, 0x20, 0xab, 0xa3, 0x84, 0x02, 0x00, 0x00,
0x00, 0xb0, 0x3f, 0x86, 0x20, 0xad, 0x2a, 0xbd, 0xad, 0x22, 0x5f, 0x4f,
0x50, 0xba, 0x05, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x01, 0x00, 0xe0, 0xda,
0x9f, 0xd3, 0x4a, 0x00, 0x00, 0x04, 0x10, 0x3d, 0x73, 0xdf, 0xe7, 0x00,
0x9d, 0xbd, 0xc3, 0xdf, 0x01, 0x80, 0x6a, 0x0d, 0x00, 0x00, 0x80, 0xab,
0xd1, 0x22, 0x0c, 0x00, 0x40, 0x96, 0xa5, 0xe1, 0xc4, 0x00, 0x54, 0xaa,
0x00, 0x00, 0xfe, 0xf7, 0xec, 0x6f, 0x4e, 0xf0, 0x1f, 0x86, 0xc9, 0x37,
0xb1, 0x44, 0x9d, 0x7a, 0xb2, 0x7d, 0x79, 0x45, 0x40, 0x20, 0xf4, 0x00,
0x00, 0xc1, 0x07, 0xd8, 0x17, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x00, 0x24,
0x01, 0xf4, 0x1b, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xae, 0xad, 0x06, 0x20,
0x34, 0x57, 0x09, 0x00, 0xb2, 0xb8, 0xd9, 0x25, 0x90, 0x1e, 0x78, 0x00,
0x00, 0x00, 0x70, 0x56, 0x4d, 0xc0, 0x87, 0x49, 0x6e, 0x14, 0x07, 0x00,
0x00, 0xd0, 0x7f, 0x34, 0xc0, 0x04, 0x3b, 0xc5, 0x30, 0x01, 0x00, 0x00,
0xb0, 0xbe, 0x39, 0xe8, 0x2e, 0xfe, 0x43, 0xc7, 0x79, 0x01, 0x00, 0x00,
0x10, 0xfb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x20, 0x69, 0xbf, 0x09, 0x00,
0x00, 0x00, 0xac, 0x46, 0x99, 0x50, 0x09, 0x00, 0x00, 0x00, 0x80, 0x5a,
0xb6, 0xac, 0x10, 0x88, 0x06, 0x00, 0x00, 0x10, 0x5f, 0x71, 0x00, 0x20,
0x09, 0x00, 0x00, 0xce, 0xde, 0x45, 0x15, 0x69, 0x45, 0xbe, 0x93, 0x54,
0xce, 0x9a, 0x5d, 0xd2, 0x02, 0x00, 0x00, 0x90, 0x04, 0x00, 0xc0, 0x3c,
0xf5, 0xfd, 0x43, 0x01, 0x00, 0x80, 0xc4, 0x60, 0x7d, 0xe8, 0xf1, 0x44,
0x70, 0x20, 0x00, 0x00, 0x00, 0x01, 0x3a, 0x39, 0x56, 0xdb, 0x41, 0x00,
0x1f, 0x0b, 0x75, 0x00, 0x48, 0x31, 0xd3, 0x23, 0x01, 0x40, 0x00, 0x00,
0x99, 0x3c, 0xec, 0x5f, 0x03, 0x00, 0xc0, 0x19, 0xeb, 0xf2, 0xd7, 0x96,
0x00, 0x00, 0xbe, 0xe7, 0x6c, 0x2f, 0x55, 0xf0, 0xfb, 0xf4, 0xf0, 0xd3,
0x84, 0x3e, 0xe9, 0xd4, 0x22, 0xdb, 0x97, 0x5e, 0x41, 0x24, 0x09, 0x3d,
0x00, 0x80, 0xa4, 0x03, 0xec, 0x0b, 0x00, 0xd0, 0x2f, 0x00, 0x00, 0x00,
0x84, 0xd4, 0x3f, 0x00, 0xb8, 0xfd, 0x22, 0xe9, 0x01, 0x00, 0xae, 0xb9,
0x04, 0x10, 0x9a, 0x8f, 0x04, 0x00, 0xb9, 0xbd, 0xf8, 0x00, 0x80, 0x2c,
0xc1, 0x05, 0x00, 0x00, 0xc0, 0xfa, 0x4f, 0x19, 0xe0, 0x57, 0xed, 0xfc,
0x26, 0x00, 0x00, 0x00, 0x80, 0xf5, 0x3f, 0x3b, 0x60, 0x81, 0x87, 0x85,
0xf7, 0x01, 0x00, 0x00, 0x00, 0xfd, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x80,
0x64, 0x27, 0x8a, 0x05, 0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0xbf, 0x93,
0x00, 0x00, 0x00, 0xd0, 0xae, 0x78, 0x12, 0x00, 0x00, 0x00, 0x00, 0x60,
0x93, 0xa0, 0x17, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x88, 0x3d, 0x4c, 0x00,
0x80, 0x12, 0x00, 0x00, 0x21, 0x5e, 0xf0, 0x65, 0x1c, 0xe5, 0xec, 0xb2,
0x14, 0xf2, 0xc6, 0x9b, 0x25, 0x35, 0x00, 0x00, 0x8c, 0x01, 0x40, 0x10,
0xbc, 0xad, 0x71, 0x15, 0x00, 0x00, 0x00, 0x63, 0x9e, 0x39, 0xf4, 0x8f,
0x04, 0x45, 0xa8, 0x9f, 0x97, 0xfd, 0x1d, 0x00, 0xf8, 0x00, 0xd8, 0xda,
0xea, 0xad, 0x03, 0x77, 0x31, 0xbf, 0x0a, 0x70, 0x01, 0x00, 0x74, 0x25,
0xb1, 0x7d, 0x47, 0x02, 0x54, 0x01, 0x00, 0x00, 0x0b, 0xb6, 0xff, 0x45,
0x02, 0x00, 0x00, 0x00, 0x3e, 0xc7, 0x4c, 0x0f, 0x55, 0xf0, 0x19, 0x46,
0x3b, 0x7f, 0x89, 0x25, 0x69, 0x2a, 0xd9, 0x5e, 0x7a, 0x05, 0xb3, 0x90,
0x7e, 0x01, 0x2a, 0x20, 0xf8, 0x03, 0xd8, 0x17, 0x00, 0xa0, 0x5f, 0x3c,
0x00, 0x00, 0xe0, 0xed, 0x0b, 0x00, 0x20, 0x3d, 0x00, 0xc0, 0xd5, 0x7f,
0x09, 0x00, 0x20, 0x34, 0x1f, 0x01, 0x00, 0xe6, 0x00, 0x1e, 0x4e, 0x01,
0x00, 0xc0, 0x05, 0xf3, 0x00, 0x00, 0x60, 0x7d, 0x08, 0xa0, 0xee, 0xdb,
0x33, 0x31, 0x00, 0x10, 0x00, 0x00, 0x1e, 0xb9, 0x14, 0xac, 0x70, 0xaf,
0x73, 0x6e, 0x00, 0x00, 0x00, 0xc0, 0x27, 0x01, 0x00, 0xac, 0x53, 0x01,
0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x45, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf1, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xb3, 0xca,
0xa8, 0xac, 0xec, 0x01, 0xc4, 0x81, 0x46, 0x0b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xb8, 0x86, 0x5f, 0x80, 0x8e, 0x8f, 0x4d, 0x00, 0x00, 0x00,
0x00, 0x40, 0x0f, 0xff, 0x78, 0x7b, 0x52, 0x65, 0xbb, 0x9c, 0x52, 0xd0,
0xe8, 0x71, 0x87, 0x62, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x80, 0x30, 0x5f,
0xdf, 0x18, 0x24, 0x00, 0x00, 0x10, 0x00, 0x3b, 0xac, 0xf8, 0x42, 0x01,
0x15, 0x56, 0x00, 0xa6, 0x9b, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x40, 0x70,
0x33, 0xc8, 0x15, 0x88, 0x43, 0x03, 0xe0, 0xf4, 0x13, 0xf0, 0x23, 0xa0,
0x42, 0xd2, 0x00, 0x00, 0x7e, 0x97, 0xec, 0x6f, 0x4b, 0xf0, 0x1b, 0xb5,
0xf3, 0x87, 0x85, 0x66, 0x65, 0xfb, 0x78, 0x48, 0xbf, 0x00, 0x00, 0xc1,
0x0f, 0xd8, 0x17, 0x80, 0x06, 0xfd, 0xe2, 0x00, 0x00, 0x00, 0x6f, 0x5f,
0x00, 0x00, 0x6f, 0x8f, 0x4a, 0x00, 0x00, 0xa1, 0xd6, 0x01, 0x64, 0x71,
0x61, 0x07, 0x48, 0xe2, 0x00, 0x00, 0xc0, 0xfa, 0x67, 0x29, 0x50, 0xf3,
0x85, 0x5a, 0x00, 0x00, 0x00, 0x40, 0xff, 0x6a, 0xb0, 0xc0, 0x59, 0xe4,
0x82, 0x02, 0x14, 0x00, 0x00, 0xbf, 0x07, 0x00, 0xb0, 0x86, 0x52, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x3b, 0x9b, 0x06, 0x00, 0x00, 0x40,
0x2d, 0x2f, 0x37, 0x14, 0x00, 0x00, 0x00, 0xa9, 0xfd, 0xa4, 0x00, 0x00,
0x00, 0x00, 0xc0, 0xd9, 0x22, 0xce, 0xdf, 0x4b, 0xaa, 0xa4, 0xaf, 0x18,
0xa5, 0x7d, 0xf5, 0x97, 0x50, 0x05, 0x00, 0x00, 0x90, 0x14, 0x00, 0x24,
0x04, 0xe9, 0x74, 0x49, 0x0c, 0x00, 0x00, 0x08, 0xf8, 0xb7, 0xde, 0xef,
0x01, 0x38, 0x0f, 0x00, 0xe0, 0xbe, 0xaa, 0x9a, 0x01, 0x00, 0x00, 0x00,
0x53, 0x4b, 0xa8, 0x81, 0x54, 0x34, 0x07, 0x00, 0xc0, 0x5b, 0x01, 0x4a,
0xdb, 0x12, 0x00, 0x40, 0x02, 0x64, 0x89, 0x04, 0x00, 0xa8, 0xbd, 0x35,
0x00, 0xfe, 0x76, 0x2c, 0x4f, 0x4b, 0xf0, 0x1d, 0xa2, 0x8d, 0xbf, 0x42,
0x1f, 0x74, 0xba, 0xc8, 0xf6, 0x82, 0x09, 0xfa, 0x05, 0x00, 0x00, 0x40,
0x92, 0x04, 0xf6, 0x05, 0x00, 0x90, 0x7e, 0x01, 0x00, 0x24, 0xfa, 0x07,
0x00, 0xd7, 0x4f, 0x82, 0x01, 0xbf, 0x77, 0x0c, 0x00, 0x20, 0x34, 0x0a,
0x00, 0x90, 0xc5, 0xbd, 0x38, 0x07, 0x00, 0x49, 0x3c, 0x00, 0x00, 0x00,
0x80, 0xf6, 0xfa, 0x90, 0x1b, 0x3e, 0x07, 0xb8, 0x67, 0x2d, 0x40, 0x3e,
0x3b, 0x16, 0x8b, 0x00, 0x00, 0x00, 0xc0, 0xa3, 0x4b, 0x00, 0x00, 0xeb,
0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x61, 0x13, 0x00, 0x00, 0x00,
0xa8, 0xff, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x97, 0x4b, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x6f, 0x21, 0x00, 0x58, 0x09, 0x00, 0x00,
0xf0, 0x55, 0x01, 0x44, 0x01, 0xd2, 0xd2, 0x44, 0x02, 0x6b, 0xe3, 0xdc,
0xb5, 0xb4, 0x02, 0x00, 0x58, 0x06, 0x00, 0x8c, 0x10, 0xae, 0xd6, 0xaf,
0x6d, 0x80, 0x10, 0xfe, 0x9f, 0xf8, 0x30, 0x00, 0x00, 0x00, 0x48, 0xc0,
0x3e, 0x6c, 0xaf, 0x13, 0x03, 0x2e, 0xaf, 0x01, 0x88, 0x66, 0x6f, 0x9b,
0x9f, 0x03, 0x00, 0x8c, 0x03, 0x68, 0xee, 0xa2, 0xbb, 0x00, 0xc0, 0x0c,
0x21, 0x44, 0x00, 0xc0, 0x21, 0x00, 0xc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34, 0x00, 0x00, 0x1a, 0x0c, 0xbd, 0x03, 0x00, 0x00, 0x83, 0x0e,
0xe7, 0x54, 0x01, 0x1e, 0x16, 0x2c, 0x0f, 0x4b, 0xf0, 0x19, 0xac, 0x8d,
0xff, 0xf4, 0x4b, 0xd6, 0x24, 0xb6, 0x27, 0x80, 0x50, 0xbf, 0x80, 0x02,
0x00, 0x80, 0xa4, 0x03, 0xf4, 0x1b, 0x00, 0x40, 0xbf, 0x00, 0x00, 0x00,
0x78, 0xfd, 0x03, 0x80, 0xe7, 0x0e, 0xe9, 0x01, 0x00, 0x9e, 0xb9, 0x00,
0x10, 0x32, 0x0f, 0x00, 0x60, 0xf7, 0xe2, 0x01, 0x00, 0x42, 0xf1, 0x00,
0x00, 0x00, 0x00, 0xfa, 0x1d, 0x1f, 0xbf, 0x4c, 0xb1, 0x07, 0xf8, 0x50,
0x01, 0xfc, 0xaa, 0x0d, 0x8f, 0x02, 0x00, 0x00, 0x00, 0x7c, 0x54, 0x84,
0x1c, 0x1c, 0x17, 0x9e, 0x00, 0x00, 0x00, 0x80, 0xf5, 0x42, 0x02, 0x00,
0x00, 0x00, 0x00, 0x60, 0x76, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
0xe6, 0xbe, 0x00, 0x00, 0x00, 0x40, 0xd9, 0xc7, 0x23, 0x00, 0x00, 0x00,
0x00, 0x00, 0xd8, 0xfb, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xaf,
0xca, 0x01, 0x80, 0xbc, 0xca, 0x62, 0x29, 0x24, 0x6f, 0xc7, 0xbf, 0x77,
0x07, 0x00, 0x60, 0x18, 0x00, 0x30, 0xb0, 0xec, 0xa6, 0xab, 0x4a, 0x00,
0xb0, 0x01, 0x00, 0x8c, 0xcd, 0xd8, 0xeb, 0x37, 0x8c, 0x92, 0x72, 0x01,
0xa0, 0xa9, 0x85, 0x78, 0x01, 0xf7, 0x01, 0x98, 0x54, 0x35, 0x0e, 0xd8,
0xe6, 0xae, 0x01, 0x20, 0x7f, 0x12, 0xa0, 0x01, 0x00, 0x00, 0x10, 0xf9,
0x17, 0xde, 0x35, 0x6c, 0x0f, 0x55, 0xf0, 0x5d, 0xbf, 0x79, 0x36, 0xeb,
0x9a, 0x3d, 0x36, 0x2b, 0xdb, 0x81, 0x5c, 0x22, 0x5c, 0xbf, 0x00, 0x13,
0x00, 0x80, 0xa4, 0x0f, 0x60, 0x5f, 0x00, 0x80, 0x1d, 0x00, 0x00, 0xfa,
0xcf, 0x01, 0xf7, 0x0f, 0x00, 0xbc, 0x43, 0x12, 0xe0, 0xe7, 0x02, 0x40,
0xa8, 0x07, 0xd0, 0x0d, 0x20, 0x98, 0x35, 0x00, 0x00, 0x00, 0x42, 0x6b,
0xb6, 0x77, 0x7e, 0xdf, 0xcb, 0x30, 0x01, 0x3e, 0x2e, 0x02, 0xb5, 0x9f,
0x27, 0x4f, 0x22, 0xaa, 0x00, 0x00, 0x80, 0x3e, 0x35, 0x40, 0xe0, 0x8f,
0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xe2, 0xd9, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf6, 0x64, 0x6a, 0x01, 0x00, 0x00, 0x00, 0xea,
0x40, 0x0e, 0x00, 0x00, 0x00, 0xa8, 0x39, 0x2e, 0x00, 0x00, 0x00, 0xc0,
0x03, 0xf6, 0x05, 0x00, 0x00, 0x00, 0xd8, 0x25, 0x0b, 0x70, 0x00, 0x4d,
0x27, 0x61, 0x02, 0xfe, 0x75, 0xed, 0xad, 0xdc, 0x00, 0x00, 0x7c, 0x0d,
0x00, 0x29, 0x4d, 0x38, 0xcf, 0xad, 0x33, 0x03, 0x38, 0x20, 0x81, 0x6a,
0x57, 0x45, 0x07, 0x60, 0x4b, 0xc0, 0x06, 0x10, 0x00, 0x00, 0x00, 0xc0,
0xb7, 0x25, 0x00, 0x00, 0xde, 0x35, 0xbc, 0x5c, 0xa9, 0x5f, 0xeb, 0xca,
0xfd, 0x74, 0x3d, 0x7a, 0xff, 0xa0, 0x65, 0xdb, 0x77, 0xc0, 0x25, 0x61,
0xd8, 0x01, 0xb6, 0x09, 0xd0, 0xe3, 0x04, 0xe1, 0xfe, 0x00, 0xcc, 0x6f,
0xa6, 0x90, 0x05, 0x00, 0xfa, 0x36, 0x5e, 0x78, 0x03, 0x6e, 0xf5, 0x25,
0x01, 0xbe, 0x9f, 0x01, 0x20, 0xe9, 0x9c, 0x03, 0x24, 0xb1, 0x4d, 0x00,
0x00, 0x00, 0xc0, 0x59, 0x85, 0x2f, 0x67, 0xbf, 0xbb, 0x1f, 0xf3, 0xc0,
0xad, 0x82, 0x2e, 0x97, 0x98, 0xee, 0xac, 0x58, 0x02, 0x45, 0x01, 0x58,
0x02, 0x85, 0xf1, 0xb7, 0x33, 0x8e, 0x02, 0x00, 0x00, 0x80, 0x84, 0xab,
0xbd, 0xce, 0x5f, 0xdc, 0x46, 0xa5, 0x00, 0x00, 0xe0, 0x31, 0x6e, 0xfe,
0x7c, 0x11, 0x00, 0x00, 0x00, 0xce, 0x1e, 0xfa, 0x37, 0x0b, 0x00, 0x00,
0x00, 0xf8, 0xfe, 0xff, 0x0f, 0x9b, 0x25, 0x00, 0x00, 0x40, 0x7d, 0x71,
0x7f, 0x1b, 0x00, 0x51, 0xe1, 0x84, 0xcf, 0xea, 0xd3, 0xec, 0x2c, 0xd0,
0xd8, 0xfc, 0xf5, 0x57, 0x3a, 0x44, 0x11, 0x90, 0x04, 0x24, 0x41, 0x6d,
0x05, 0x75, 0x8e, 0x01, 0xe0, 0xfc, 0xba, 0x00, 0xfe, 0xba, 0x88, 0x87,
0x34, 0x00, 0x00, 0x80, 0xeb, 0x03, 0x80, 0x56, 0x94, 0x78, 0x01, 0x00,
0xdc, 0xc2, 0x2d, 0xe0, 0xd8, 0x1f, 0xba, 0x18, 0x01, 0x00
};
#endif /* COINS_OGG_H */
<file_sep>/include/jfc/icon.png.h
#ifndef ICON_PNG_H
#define ICON_PNG_H
static const unsigned char icon_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x91, 0x68, 0x36, 0x00, 0x00, 0x00,
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
0x00, 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc,
0x61, 0x05, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00,
0x0e, 0xc3, 0x00, 0x00, 0x0e, 0xc3, 0x01, 0xc7, 0x6f, 0xa8, 0x64, 0x00,
0x00, 0x00, 0x42, 0x49, 0x44, 0x41, 0x54, 0x38, 0x4f, 0x63, 0xf8, 0x7f,
0x92, 0x8f, 0x24, 0x44, 0x7f, 0x0d, 0x0c, 0x0c, 0x04, 0x8c, 0xc0, 0xa7,
0x01, 0xab, 0x66, 0x3a, 0x6b, 0x00, 0xaa, 0x20, 0x59, 0x03, 0x1e, 0x2e,
0x04, 0x61, 0x11, 0xc2, 0x8f, 0x88, 0xd5, 0x00, 0xb7, 0x8d, 0x32, 0x0d,
0x58, 0x1d, 0x0d, 0x41, 0x40, 0x29, 0x88, 0x2c, 0xba, 0x06, 0xfc, 0x00,
0x5d, 0x03, 0x31, 0x88, 0x44, 0x0d, 0x27, 0xf9, 0x00, 0x93, 0x25, 0xa2,
0xa8, 0xc7, 0x21, 0x58, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82
};
#endif /* ICON_PNG_H */
<file_sep>/src/flappy_screen.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/flappy_screen.h>
void flappy::screen::update(float delta,
float aspectRatio,
std::pair<int, int> windowSize)
{
if (++m_PrompCounter % BLINK_RATE == 0)
{
m_BlinkStatus = !m_BlinkStatus;
if (m_pCurrentText)
{
if (m_BlinkStatus) m_pCurrentText->show();
else m_pCurrentText->hide();
}
}
}
void flappy::screen::set_current_text(std::shared_ptr<gdk::text_renderer> aText)
{
m_pCurrentText = aText;
m_PrompCounter = BLINK_RATE / 2;
if (m_pCurrentText) m_pCurrentText->hide();
}
void flappy::screen::show_current_text()
{
if (m_pCurrentText) m_pCurrentText->show();
}<file_sep>/src/main_menu_screen.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/main_menu_screen.h>
#include <gdk/texture.h>
#include <gdk/text_map.h>
#include <jfc/Text_Sheet.png.h>
#include <sstream>
using namespace gdk;
audio::context::context_shared_ptr_type pAudioContext;
static inline std::wstring playerCountToText(int aCount)
{
std::wstringstream s;
s << aCount << L" Player";
if (aCount > 1) s << L"s";
return s.str();
}
main_menu_screen::main_menu_screen(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudioContext,
screen_stack_ptr_type aScreens,
screen_ptr_type aGameScreen,
screen_ptr_type aOptionsScreen,
std::shared_ptr<glfw_window> aGLFWWindow,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets)
: m_pInput(aInputContext)
, m_Screens(aScreens)
, m_GameScreen(aGameScreen)
, m_OptionsScreen(aOptionsScreen)
, m_pMainScene(graphics::context::scene_shared_ptr_type(std::move(aGraphicsContext->make_scene())))
, m_pMainCamera(std::shared_ptr<gdk::camera>(std::move(aGraphicsContext->make_camera())))
, scenery(flappy::scenery(aGraphicsContext, aGraphicsContext->get_alpha_cutoff_shader(), m_pMainScene, aAssets))
, m_menu(std::make_shared<decltype(m_menu)::element_type>(gdk::menu(
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::UpArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::DownArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::LeftArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::RightArrow);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::Enter);},
[&]() {return m_pInput->get_key_just_pressed(keyboard::Key::Escape);})))
, m_pEventBus(aEventBus)
{
pAudioContext = aAudioContext;
m_pMainScene->add_camera(m_pMainCamera);
auto map = aAssets->get_textmap();
m_TitleText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::upper_edge,
L"flappy dot"));
m_TitleText->set_model_matrix({ 0, 0.5f, 0 }, {}, { 0.1f });
m_TitleText->add_to_scene(m_pMainScene);
m_VersionText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::right_lower_corner,
L"code available at: github.com/jfcameron/gdk-graphics"
));
m_VersionText->add_to_scene(m_pMainScene);
m_PromptText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
L"space to start"
));
m_PromptText->set_model_matrix({ 0, 0.0f, 0 }, {}, { 0.075f });
m_PromptText->add_to_scene(m_pMainScene);
m_StartText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
L"start game"
));
m_StartText->set_model_matrix({ 0, 0.15f, 0 }, {}, { 0.05f });
m_StartText->add_to_scene(m_pMainScene);
m_StartText->hide();
m_PlayersCountText = std::make_shared<dynamic_text_renderer>(dynamic_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
playerCountToText(m_PlayerCount)
));
m_PlayersCountText->set_model_matrix({ 0, 0.05f, 0 }, {}, { 0.05f });
m_PlayersCountText->add_to_scene(m_pMainScene);
m_PlayersCountText->hide();
m_pOptionsText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
L"options"
));
m_pOptionsText->set_model_matrix({ 0, -0.05f, 0 }, {}, { 0.05f });
m_pOptionsText->add_to_scene(m_pMainScene);
m_pOptionsText->hide();
m_pCreditsText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
L"credits"
));
m_pCreditsText->set_model_matrix({ 0, -0.15f, 0 }, {}, { 0.05f });
m_pCreditsText->add_to_scene(m_pMainScene);
m_pCreditsText->hide();
m_pQuitText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::center,
L"quit"
));
m_pQuitText->set_model_matrix({ 0, -0.25f, 0 }, {}, { 0.05f });
m_pQuitText->add_to_scene(m_pMainScene);
m_pQuitText->hide();
m_pCreditsContextText = std::make_shared<static_text_renderer>(static_text_renderer(aGraphicsContext,
map,
text_renderer::alignment::left_upper_corner,
L"artwork\n\n"
L" ld: opengameart.org/users/ld"
L"\r\r"
L"Music\n\n"
" PlayOnLoop:\n opengameart.org/users/playonloop"
L"\r\r"
" ProjectsU012:\n freesound.org/people/ProjectsU012/"
L"\r\r"
L"code\n\n"
L" jfcameron:\n github.com/jfcameron/"
));
m_pCreditsContextText->add_to_scene(m_pMainScene);
m_pCreditsContextText->hide();
set_current_text(m_PromptText);
// Credits pane logic
auto credits_pane = pane::make_pane();
{
credits_pane->set_on_just_gained_top([=]()
{
m_pCreditsContextText->show();
});
credits_pane->set_on_just_lost_top([=]()
{
m_pCreditsContextText->hide();
});
}
// Main pane logic
auto main_pane = pane::make_pane();
{
main_pane->set_on_just_gained_top([&]()
{
m_StartText->show();
m_PlayersCountText->show();
m_pOptionsText->show();
m_pCreditsText->show();
m_pQuitText->show();
});
main_pane->set_on_just_lost_top([&]()
{
m_StartText->hide();
m_PlayersCountText->hide();
m_pOptionsText->hide();
m_pCreditsText->hide();
m_pQuitText->hide();
set_current_text(nullptr);
});
auto pStartButton = main_pane->make_element();
auto pPlayersButton = main_pane->make_element();
auto pOptionsButton = main_pane->make_element();
auto pCreditsButton = main_pane->make_element();
auto pQuitButton = main_pane->make_element();
auto lostFocus = [=]()
{
show_current_text();
};
pStartButton->set_south_neighbour(pPlayersButton);
pStartButton->set_on_just_lost_focus(lostFocus);
pStartButton->set_on_just_gained_focus([=]()
{
set_current_text(m_StartText);
});
pStartButton->set_on_activated([=]()
{
m_Screens->push(m_GameScreen);
});
pPlayersButton->set_north_neighbour(pStartButton);
pPlayersButton->set_south_neighbour(pOptionsButton);
pPlayersButton->set_on_just_lost_focus(lostFocus);
pPlayersButton->set_on_just_gained_focus([=]()
{
set_current_text(m_PlayersCountText);
});
pPlayersButton->set_on_activated([=]()
{
if (++m_PlayerCount > 4) m_PlayerCount = 1;
m_pEventBus->propagate_player_count_changed_event({ m_PlayerCount });
m_PlayersCountText->update_text(playerCountToText(m_PlayerCount));
});
pOptionsButton->set_north_neighbour(pPlayersButton);
pOptionsButton->set_south_neighbour(pCreditsButton);
pOptionsButton->set_on_just_lost_focus(lostFocus);
pOptionsButton->set_on_just_gained_focus([=]()
{
set_current_text(m_pOptionsText);
});
pOptionsButton->set_on_activated([=]()
{
m_Screens->push(m_OptionsScreen);
});
pCreditsButton->set_north_neighbour(pOptionsButton);
pCreditsButton->set_south_neighbour(pQuitButton);
pCreditsButton->set_on_just_lost_focus(lostFocus);
pCreditsButton->set_on_just_gained_focus([=]()
{
set_current_text(m_pCreditsText);
});
pCreditsButton->set_on_activated([=]()
{
m_menu->push(credits_pane);
});
pQuitButton->set_north_neighbour(pCreditsButton);
pQuitButton->set_on_just_lost_focus(lostFocus);
pQuitButton->set_on_just_gained_focus([=]()
{
set_current_text(m_pQuitText);
});
pQuitButton->set_on_activated([=]()
{
aGLFWWindow->close();
});
}
// Title pane logic
auto title_pane = pane::make_pane();
{
title_pane->set_on_just_lost_top([&]()
{
m_PromptText->hide();
});
title_pane->set_on_just_gained_top([&]()
{
set_current_text(m_PromptText);
});
auto pStartPrompt = title_pane->make_element();
pStartPrompt->set_on_activated([&, main_pane]()
{
m_menu->push(main_pane);
});
}
m_menu->push(title_pane);
}
void main_menu_screen::update(float delta, float aspectRatio, std::pair<int, int> windowSize)
{
flappy::screen::update(delta, aspectRatio, windowSize);
m_menu->update();
m_VersionText->set_model_matrix({ +0.5f * aspectRatio, -0.5, 0 }, {}, { 0.035 });
m_pCreditsContextText->set_model_matrix({ -0.5f * aspectRatio, 0.35f, 0 }, {}, { 0.04f });
m_pMainCamera->set_orthographic_projection(2, 2, 0.0075, 10, aspectRatio);
m_pMainScene->draw(windowSize);
scenery.update(delta);
}
<file_sep>/src/pipe.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/pipe.h>
#include <jfc/Sprite_Sheet.png.h>
#include <jfc/bird.h>
#include <chrono>
using namespace flappy;
using namespace gdk;
static const graphics_vector2_type PIPE_MOUTH_UP_GRAPHIC(0, 1);
static const graphics_vector2_type PIPE_MOUTH_DOWN_GRAPHIC(1, 1);
static const graphics_vector2_type PIPE_TRUNK_GRAPHIC(3, 0);
static std::shared_ptr<model> generatePipeModel(graphics_vector2_type aBottomTileCell,
graphics_vector2_type aMiddleTileCell,
graphics_vector2_type aTopTileCell,
gdk::graphics::context::context_shared_ptr_type pContext)
{
using vertex_attribute_type = float;
using vertex_attribute_array_type = std::vector<vertex_attribute_type>;
vertex_attribute_type size = 1;
decltype(size) hsize = size / 2.;
vertex_attribute_array_type posData({ //quads used to render the pieces of pipe (mouth and trunk)
size - hsize, size - hsize, 0.0f, // NOTE: This work should be abstracted away into a tiled mesh generator.
0.0f - hsize, size - hsize, 0.0f,
0.0f - hsize, 0.0f - hsize, 0.0f,
size - hsize, size - hsize, 0.0f,
0.0f - hsize, 0.0f - hsize, 0.0f,
size - hsize, 0.0f - hsize, 0.0f,
size - hsize, 2 * size - hsize, 0.0f,
0.0f - hsize, 2 * size - hsize, 0.0f,
0.0f - hsize, 1 * size - hsize, 0.0f,
size - hsize, 2 * size - hsize, 0.0f,
0.0f - hsize, 1 * size - hsize, 0.0f,
size - hsize, 1 * size - hsize, 0.0f,
size - hsize, 3 * size - hsize, 0.0f,
0.0f - hsize, 3 * size - hsize, 0.0f,
0.0f - hsize, 2 * size - hsize, 0.0f,
size - hsize, 3 * size - hsize, 0.0f,
0.0f - hsize, 2 * size - hsize, 0.0f,
size - hsize, 2 * size - hsize, 0.0f,
});
const float cellSize = 1.f / 4.f;
const float sampleBias = 0.001f; // This prevents seams from occasionally appearing when a
// fragment samples a texel from a neighbouring cell.
// This is only really an issue for extremely low pixel count games (such as this one)
aBottomTileCell *= cellSize;
aTopTileCell *= cellSize;
float bottom_xl = aBottomTileCell.x + sampleBias;
float bottom_yl = aBottomTileCell.y + sampleBias;
float bottom_xh = aBottomTileCell.x + cellSize - sampleBias;
float bottom_yh = aBottomTileCell.y + cellSize - sampleBias;
float middle_xl = aBottomTileCell.x + sampleBias;
float middle_yl = aBottomTileCell.y + sampleBias;
float middle_xh = aBottomTileCell.x + cellSize - sampleBias;
float middle_yh = aBottomTileCell.y + cellSize - sampleBias;
float top_xl = aTopTileCell.x + sampleBias;
float top_yl = aTopTileCell.y + sampleBias;
float top_xh = aTopTileCell.x + cellSize - sampleBias;
float top_yh = aTopTileCell.y + cellSize - sampleBias;
vertex_attribute_array_type uvData({ //Quad data: uvs
bottom_xh, bottom_yl,
bottom_xl, bottom_yl,
bottom_xl, bottom_yh,
bottom_xh, bottom_yl,
bottom_xl, bottom_yh,
bottom_xh, bottom_yh,
middle_xh, middle_yl,
middle_xl, middle_yl,
middle_xl, middle_yh,
middle_xh, middle_yl,
middle_xl, middle_yh,
middle_xh, middle_yh,
top_xh, top_yl,
top_xl, top_yl,
top_xl, top_yh,
top_xh, top_yl,
top_xl, top_yh,
top_xh, top_yh,
});
auto pModel = std::shared_ptr<model>(std::move(
pContext->make_model({ vertex_data_view::UsageHint::Static,
{
{
"a_Position",
{
&posData.front(),
posData.size(),
3
}
},
{
"a_UV",
{
&uvData.front(),
uvData.size(),
2
}
}
} })));
return pModel;
}
pipe::pipe(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aAssets)
: m_Position(-5.0, 0.0)
, m_Scale(0.25, 0.25)
{
auto pTexture = aAssets->get_spritesheet();
m_Material = std::shared_ptr<material>(std::move(pContext->make_material(pContext->get_alpha_cutoff_shader())));
m_Material->setTexture("_Texture", pTexture);
m_Material->setVector2("_UVScale", { 1, 1 });
m_Material->setVector2("_UVOffset", { 0, 0 });
m_UpPipeModel = generatePipeModel(PIPE_TRUNK_GRAPHIC, PIPE_TRUNK_GRAPHIC, PIPE_MOUTH_UP_GRAPHIC, pContext);
m_DownPipeModel = generatePipeModel(PIPE_MOUTH_DOWN_GRAPHIC, PIPE_TRUNK_GRAPHIC, PIPE_TRUNK_GRAPHIC, pContext);
m_Entity = pContext->make_entity(m_UpPipeModel, m_Material);
pScene->add_entity(m_Entity);
}
float total_time(0);
void pipe::update(const float delta, gdk::input::context::context_shared_ptr_type pInput)
{
total_time += delta;
m_Position.x -= delta * 0.65f;
m_Entity->set_model_matrix({ m_Position.x, m_Position.y, -0.435 }, { {0, 0, m_Rotation} }, { m_Scale.x, m_Scale.y, 1 });
}
decltype(pipe::m_Position) pipe::getPosition() const
{
return {m_Position.x, m_Position.y};
}
decltype(pipe::m_Scale) pipe::getScale() const
{
return m_Scale;
}
decltype(pipe::m_Rotation) pipe::getRotation() const
{
return m_Rotation;
}
void pipe::set_up(const decltype(m_Position)& aPosition,
const decltype(m_Rotation) aRotation,
const pipe::set_up_model &aModel)
{
m_Position = aPosition;
m_Rotation = aRotation;
m_Entity->set_model(aModel == pipe::set_up_model::up_pipe
? m_UpPipeModel
: m_DownPipeModel);
}
bool pipe::check_collision(const graphics_mat4x4_type &aWorldPosition) const
{
// bail early if collision is not possible
if (std::abs(m_Position.x) > 0.5f) return false;
// Building an inverse world matrix so the bird's world position can be mulled into the pipe's local space
// for scale & rotation friendly point vs box collision detection.
// NOTE: This should not be the pipe's responsibility. This should be performed by a separate system but
// this implementation is OK given how simple the game is.
graphics_mat4x4_type pipeWorld;
auto pos = getPosition();
auto sca = getScale();
auto rot = getRotation();
pipeWorld.translate({ pos.x, pos.y, 0 });
pipeWorld.scale({ sca.x, sca.y, 1 });
pipeWorld.rotate({ {0, 0, rot} });
pipeWorld.inverse();
graphics_mat4x4_type localBird = pipeWorld * aWorldPosition;
Vector2<float> localBirdPos(localBird.m[3][0], localBird.m[3][1]);
return
//Horizontal check
std::abs(localBirdPos.x) < 0.15
//Vertical checks
&& localBirdPos.y > -0.1
&& localBirdPos.y < 0.5;
}
<file_sep>/include/jfc/main_menu_screen.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_MAIN_MENU_SCREEN_H
#define FLAPPY_MAIN_MENU_SCREEN_H
#include <gdk/screen.h>
#include <jfc/assets.h>
#include <gdk/graphics_context.h>
#include <gdk/input_context.h>
#include <gdk/audio/context.h>
#include <gdk/menu.h>
#include <gdk/dynamic_text_renderer.h>
#include <gdk/static_text_renderer.h>
#include <jfc/screen_stack.h>
#include <jfc/background.h>
#include <jfc/glfw_window.h>
#include <jfc/flappy_screen.h>
#include <jfc/flappy_event_bus.h>
namespace gdk
{
/// \brief entrypoint for the game's GUI
//
// main_menu_screen is the root of the menu system.
class main_menu_screen final : public flappy::screen
{
gdk::graphics::context::scene_shared_ptr_type m_pMainScene;
input::context::context_shared_ptr_type m_pInput;
std::shared_ptr<gdk::camera> m_pMainCamera;
//! header at top of screen
std::shared_ptr<static_text_renderer> m_TitleText;
//! bottom right aligned text
std::shared_ptr<static_text_renderer> m_VersionText;
//! title pane text
std::shared_ptr<static_text_renderer> m_PromptText;
//! title pane, start button
std::shared_ptr<static_text_renderer> m_StartText;
//! title pane, players count button
std::shared_ptr<dynamic_text_renderer> m_PlayersCountText;
//! main pane, credits button
std::shared_ptr<static_text_renderer> m_pCreditsText;
//! main pane, options button
std::shared_ptr<static_text_renderer> m_pOptionsText;
//! main pane, quit button
std::shared_ptr<static_text_renderer> m_pQuitText;
//! credits pane, credits text
std::shared_ptr<static_text_renderer> m_pCreditsContextText;
screen_stack_ptr_type m_Screens;
screen_ptr_type m_GameScreen;
screen_ptr_type m_OptionsScreen;
flappy::scenery scenery;
//! number of splitscreen players selected
int m_PlayerCount = 1;
std::shared_ptr<menu> m_menu;
std::shared_ptr<flappy::event_bus> m_pEventBus;
public:
virtual void update(float delta, float aspectRatio, std::pair<int, int> windowSize) override;
main_menu_screen(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudioContext,
screen_stack_ptr_type aScreens,
screen_ptr_type aGameScreen,
screen_ptr_type aOptionsScreen,
std::shared_ptr<glfw_window> aGLFWWindow,
std::shared_ptr<flappy::event_bus> aEventBus,
flappy::assets::shared_ptr aAssets);
virtual ~main_menu_screen() = default;
};
}
#endif
<file_sep>/src/main.cpp
// © 2020 <NAME> - All Rights Reserved
#include <cstdlib>
#include <iostream>
#include <functional>
#include <stack>
#include <chrono>
#include <thread>
#include <gdk/graphics_context.h>
#include <gdk/input_context.h>
#include <gdk/audio/context.h>
#include <jfc/Coins.ogg.h>
#include <jfc/assets.h>
#include <jfc/background_music_player.h>
#include <jfc/event_bus.h>
#include <jfc/flappy_event_bus.h>
#include <jfc/game_screen.h>
#include <jfc/main_menu_screen.h>
#include <jfc/options_screen.h>
#include <jfc/glfw_window.h>
#include <jfc/icon.png.h>
#include <jfc/background.h>
#include <jfc/screen_stack.h>
#include <gdk/state_machine.h>
#include <GLFW/glfw3.h>
using namespace gdk;
static const struct {
unsigned int width;
unsigned int height;
unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
unsigned char pixel_data[16 * 16 * 4 + 1];
} icon_graphic = {
16, 16, 4,
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\336\200\067\377\336\200\067\377\336\200"
"\067\377\336\200\067\377\336\200\067\377\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\210\261i\377"
"\210\261i\377\210\261i\377\367\266C\377\367\266C\377\372\372\372\377\210"
"\261i\377\336\200\067\377\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\210\261i\377\372\372\372\377\372\372\372\377"
"\372\372\372\377\210\261i\377\367\266C\377\372\372\372\377\210\261i\377\336"
"\200\067\377\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\210\261i\377\372\372\372\377\327\345\315\377\372\372\372\377"
"\367\266C\377\367\266C\377\367\266C\377\367\266C\377\336\200\067\377\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\210\261i\377\210\261i\377\327\345\315\377\367\266C\377\367\266C\377"
"\367\266C\377\371:\034\377\371:\034\377\266^\035\377\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\266^\035\377\336\200\067"
"\377\336\200\067\377\336\200\067\377\367\266C\377\371:\034\377\371:\034\377\266"
"^\035\377\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C"
"\000\367\266C\000\367\266C\000\367\266C\000\266^\035\377\336\200\067\377\336\200\067"
"\377\336\200\067\377\266^\035\377\266^\035\377\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\266^\035\377\266^\035\377\266^\035\377\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000"
"\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266"
"C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367\266C\000\367"
"\266C\000\367\266C\000\367\266C\000",
};
int main(int argc, char** argv)
{
// Setting up libraries
auto window = std::shared_ptr<glfw_window>(new glfw_window("flappy dot"));
std::vector<std::byte> bytes;
bytes.push_back((std::byte)icon_graphic.pixel_data[0]);
window->setIcons({{
icon_graphic.width,
icon_graphic.height,
{
(std::byte *)icon_graphic.pixel_data,
(std::byte *)(icon_graphic.pixel_data + 16 * 16 * 4 + 1)
}
}});
auto pGraphicsContext = graphics::context::context_shared_ptr_type(std::move(
graphics::context::make(graphics::context::implementation::opengl_webgl1_gles2)));
auto pInputContext = input::context::context_shared_ptr_type(std::move(
input::context::make(window->getPointerToGLFWWindow())));
auto pAudioContext = audio::context::context_shared_ptr_type(std::move(
audio::context::make(audio::context::implementation::openal)));
auto pAssets = std::shared_ptr<flappy::assets>(new flappy::assets(pGraphicsContext,
pAudioContext, pInputContext));
// Setting up top level game abstractions
auto pEventBus = std::make_shared<flappy::event_bus>(flappy::event_bus());
screen_ptr_type pGameScreen;
screen_ptr_type pMainMenuScreen;
screen_ptr_type pOptionsScreen;
std::map<screen_ptr_type, std::string> screen_to_string;
std::shared_ptr<gdk::screen_stack> pScreens(new gdk::screen_stack(
[&](std::shared_ptr<gdk::screen> p)
{
pEventBus->propagate_screen_pushed_event({screen_to_string[p]});
},
[&](std::shared_ptr<gdk::screen> p)
{
pEventBus->propagate_screen_popped_event({ screen_to_string[p]});
}));
pGameScreen = decltype(pGameScreen)(new gdk::game_screen(pGraphicsContext,
pInputContext,
pAudioContext,
pScreens,
pEventBus,
pAssets));
pOptionsScreen = decltype(pMainMenuScreen)(new flappy::options_screen(pGraphicsContext,
pInputContext,
pAudioContext,
pScreens,
pEventBus,
pAssets));
pMainMenuScreen = decltype(pMainMenuScreen)(new gdk::main_menu_screen(pGraphicsContext,
pInputContext,
pAudioContext,
pScreens,
pGameScreen,
pOptionsScreen,
window,
pEventBus,
pAssets));
screen_to_string[pGameScreen] = "GameScreen"; //TODO: remove this map, just use ptr directly. no value to strings here
screen_to_string[pMainMenuScreen] = "MainMenu";
screen_to_string[pOptionsScreen] = "OptionsScreen";
flappy::background_music_player music(pEventBus, pAudioContext);
pScreens->push(pMainMenuScreen);
// play a start up noise
auto pEmitter = pAudioContext->make_emitter(pAssets->get_coin_sound());
pEmitter->play();
for (float deltaTime(0); !window->shouldClose();)
{
using namespace std::chrono;
steady_clock::time_point t1(steady_clock::now());
glfwPollEvents();
music.update();
pInputContext->update();
pAudioContext->update();
pScreens->update(deltaTime,
window->getAspectRatio(),
window->getWindowSize());
window->swapBuffer();
while (true)
{
steady_clock::time_point t2(steady_clock::now());
duration<double> time_span = duration_cast<duration<double>>(t2 - t1);
if (deltaTime = time_span.count(); deltaTime > 0.01666667) break;
}
}
return EXIT_SUCCESS;
}
<file_sep>/src/screen.cpp
#include <jfc/screen.h><file_sep>/src/event_bus.cpp
// © 2020 <NAME> - All Rights Reserved
#include <gdk/event_bus.h>
using namespace gdk;
void event_bus::propagate_event(event_type e)
{
for (size_t i(0); i < m_Observers.size(); ++i)
{
if (auto p = m_Observers[i].lock())
{
(*p)(e);
}
else
{
m_Observers.erase(m_Observers.begin() + i);
}
}
}
void event_bus::add_observer(observer_weak_ptr_type observer)
{
m_Observers.push_back(observer);
}
<file_sep>/README.md
## flappy-dot
Flappy bird clone.
Builds for linux and windows.
Uses various jfc- and gdk- libraries found on this github account. See the submodules in the `thirdparty` directory for a full list
<file_sep>/include/jfc/game.h
// © 2020 <NAME> - All Rights Reserved
#ifndef FLAPPY_GAME_H
#define FLAPPY_GAME_H
#include <gdk/input_context.h>
#include <gdk/intvector2.h>
#include <gdk/screen.h>
#include <gdk/graphics_context.h>
#include <gdk/input_context.h>
#include <gdk/audio/context.h>
#include <gdk/scene.h>
#include <gdk/text_map.h>
#include <gdk/static_text_renderer.h>
#include <gdk/dynamic_text_renderer.h>
#include <gdk/menu.h>
#include <jfc/flappy_event_bus.h>
#include <jfc/assets.h>
#include <jfc/game.h>
#include <jfc/Text_Sheet.png.h>
#include <jfc/Sprite_Sheet.png.h>
#include <jfc/Floor.png.h>
#include <jfc/background.h>
#include <jfc/cloud.h>
#include <jfc/bird.h>
#include <jfc/city.h>
#include <jfc/pipe.h>
#include <jfc/screen_stack.h>
#include <array>
#include <memory>
#include <functional>
namespace flappy
{
/// \brief logic for a single instance of the game
class game final
{
static constexpr int BLINK_RATE = 26;
//! used to flash current selection
bool m_BlinkStatus = true;
//! Used to determine which text item should blink
std::shared_ptr<gdk::text_renderer> m_pCurrentText;
//! blink counter
int m_PrompCounter = 0;
/// \brief controls highlevel game behaviour
enum class mode
{
/// \brief the game plays as usual
playing,
/// \brief death screen
dead,
/// \brief waits for user to confirm they are ready to start playing
start
} m_Mode = mode::playing;
//! instanced pseudo random number generator
std::default_random_engine m_Random;
//! ptr to the input abstraction
input::context::context_shared_ptr_type pInputContext;
//! graphics scene where gameplay takes place
gdk::graphics::context::scene_shared_ptr_type pGameScene;
//! graphics scene where GUI elements are rendered
gdk::graphics::context::scene_shared_ptr_type pGUIScene;
//! camera used to render both the game and gui scenes
std::shared_ptr<gdk::camera> pMainCamera;
//! controls the background effects behaviour
flappy::scenery scenery;
//! the player object
flappy::bird bird;
/// \brief looping cloud bg effect
std::vector<flappy::cloud> clouds;
/// \brief looping city bg effect
std::vector<flappy::city> cities;
/// \brief score display
std::shared_ptr<dynamic_text_renderer> pScoreText;
/// \brief highscore display
std::shared_ptr<dynamic_text_renderer> pHighScoreText;
/// \brief quit
std::shared_ptr<static_text_renderer> pQuitText;
/// \brief retry
std::shared_ptr<static_text_renderer> pRetryText;
/// \brief ptr to the screen stack
screen_stack_ptr_type m_screens;
/// \brief retry/quit menu
std::shared_ptr<menu> m_menu;
// Pipe control TODO: this stuff requires an overhaul. the game isnt fun yet.
size_t pipeCounter = 0;
float pipeDelay = 0;
std::vector<flappy::pipe> pipes;
std::array<std::function<void(decltype(pipes)&, decltype(pipeCounter)&, decltype(pipeDelay)&, decltype(m_Random)&)>, 1> m_PipeBehaviours;
size_t m_Score = 0;
float m_ScoreIncrementer = 0;
decltype(pane::make_pane()) m_game_over_pane;
/// \brief used to pass messages around the application
std::shared_ptr<flappy::event_bus> m_EventBus;
void updateHighScore();
/// \brief reacts to state changes in the player bird
std::shared_ptr<bird::state_machine_type::observer_type> m_BirdObserver;
public:
/// \brief resets state to a freshly constructed game
void reset();
/// \brief called by the gameloop
void update(float delta,
float aspectRatio,
std::pair<int, int> windowSize,
std::pair<float, float> vpUpperLeft,
std::pair<float, float> vpSize);
game(graphics::context::context_shared_ptr_type aGraphicsContext,
input::context::context_shared_ptr_type aInputContext,
audio::context::context_shared_ptr_type aAudio,
screen_stack_ptr_type aScreens,
std::shared_ptr<flappy::event_bus> a,
flappy::assets::shared_ptr aAssets);
};
}
#endif
<file_sep>/include/gdk/screen.h
// © 2020 <NAME> - All Rights Reserved
#ifndef GDK_SCREEN_H
#define GDK_SCREEN_H
#include <map>
namespace gdk
{
class screen
{
public:
virtual void update(float delta, float windowAspectRatio, std::pair<int, int> windowSize) = 0;
//! explicit delete copy semantics
screen(screen&) = delete;
//! explicit delete move semantics
screen(screen&&) = delete;
virtual ~screen() = default;
protected:
screen() = default;
};
}
#endif<file_sep>/include/gdk/screen_stack.h
// © 2020 <NAME> - All Rights Reserved
#ifndef SCREEN_STACK_H
#define SCREEN_STACK_H
#include <stack>
#include <memory>
#include <gdk/screen.h>
namespace gdk
{
// TOOD: instead of popped/pushed, swithc to gained_top, lost_top.
//TODO: replace "on pop" and "on push" with "on gained top" and "on lost top"
class screen_stack
{
public:
using stack_type = std::stack<std::shared_ptr<gdk::screen>>;
using push_pop_functor_type = std::function<void(stack_type::value_type)>;
private:
//! internal stack type
stack_type m_Screens;
//! called when a screen is pushed to the stack
push_pop_functor_type m_PushFunctor;
//! called when a screen is popped from the stack
push_pop_functor_type m_PopFunctor;
public:
void push(std::shared_ptr<gdk::screen> s)
{
m_Screens.push(s);
m_PushFunctor(s);
}
/// \brief pops the stack
/// \remark pop() has no effect if it would result in an empty stack
void pop()
{
if (m_Screens.size() > 1)
{
m_Screens.pop();
m_PopFunctor(m_Screens.top());
}
}
void update(float delta, float windowAspectRatio, std::pair<int, int> windowSize)
{
if (m_Screens.size()) m_Screens.top()->update(delta, windowAspectRatio, windowSize);
}
screen_stack(push_pop_functor_type aOnPushedFunctor, push_pop_functor_type aOnPoppedFunctor)
: m_PushFunctor(aOnPushedFunctor)
, m_PopFunctor(aOnPoppedFunctor)
{}
};
}
using screen_ptr_type = std::shared_ptr<gdk::screen>;
using screen_stack_type = gdk::screen_stack;
using screen_stack_ptr_type = std::shared_ptr<screen_stack_type>;
#endif
<file_sep>/src/background.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/background.h>
#include <gdk/material.h>
using namespace flappy;
using namespace gdk;
scenery::scenery(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::shader_program_shared_ptr_type pShader,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aAssets)
{
graphics_vector2_type scale(4, 1);
// Create materials
for (std::remove_const<decltype(scenery::size)>::type i(0); i < size; ++i)
{
m_ParallaxMaterials[i] = std::shared_ptr<material>(std::move(pContext->make_material(pShader)));
m_ParallaxMaterials[i]->setTexture("_Texture", aAssets->get_bglayertextures()[i]);
m_ParallaxMaterials[i]->setVector2("_UVScale", scale);
}
auto pQuadModel = std::shared_ptr<model>(pContext->get_quad_model());
int i(0); for (auto& a : m_ParallaxEntities)
{
a = std::shared_ptr<entity>(std::move(pContext->make_entity(pQuadModel, m_ParallaxMaterials[i])));
pScene->add_entity(a);
a->set_model_matrix(Vector3<float>{0, 0, -0.50f + (i++ * 0.01f)}, Quaternion<float>{ {0, 0, 0}}, { 4,1,1 });
}
}
void scenery::update(const float delta)
{
time += delta;
int i(0); for (auto &a : m_ParallaxMaterials)
a->setVector2("_UVOffset", { time * (0.0333f * i++) + 0.3f, 1 });
}
<file_sep>/src/cloud.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/cloud.h>
#include <jfc/Sprite_Sheet.png.h>
#include <chrono>
using namespace flappy;
using namespace gdk;
static const graphics_vector2_type CLOUD_GRAPHIC_1(3, 1);
static const graphics_vector2_type CLOUD_GRAPHIC_2(2, 1);
static float blar(0);
void cloud::randomizeGraphic()
{
m_Position.x = 2 + (0.25f * (m_Random() % 8));
graphics_vector2_type graphic;
switch (m_Random() % 2)
{
case 0: graphic = CLOUD_GRAPHIC_1; break;
case 1: graphic = CLOUD_GRAPHIC_2; break;
default: throw std::runtime_error("there are only two cloud graphics!");
}
const auto scale(0.25f + (0.05f * (m_Random() % 3)));
m_Scale = {scale};
m_Position.y = 0.2f + (0.1f * (m_Random() % 3));
m_Material->setVector2("_UVOffset", graphic);
m_Speed = 0.5f + (0.3f * (m_Random() % 4));
m_Position.z = -0.490f + (m_Speed* 0.001f);
}
cloud::cloud(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aAssets)
{
m_Material = std::shared_ptr<material>(std::move(pContext->make_material(pContext->get_alpha_cutoff_shader())));
auto pTexture = aAssets->get_spritesheet();
m_Material->setTexture("_Texture", pTexture);
m_Material->setVector2("_UVScale", { 0.25, 0.25 });
m_Entity = decltype(m_Entity)(std::move(pContext->make_entity(std::shared_ptr<model>(pContext->get_quad_model()), m_Material)));
pScene->add_entity(m_Entity);
m_Random.seed(std::chrono::system_clock::now().time_since_epoch().count());
randomizeGraphic();
}
static float total_time(0);
void cloud::update(const float delta)
{
total_time += delta * m_Speed;
m_Entity->set_model_matrix(m_Position, {}, {m_Scale.x, m_Scale.y, 1});
m_Position.x -= delta * m_Speed;
if (m_Position.x < -2)
{
randomizeGraphic();
}
}
<file_sep>/include/jfc/Sprite_Sheet.png.h
#ifndef SPRITE_SHEET_PNG_H
#define SPRITE_SHEET_PNG_H
static const unsigned char Sprite_Sheet_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40,
0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71, 0xde, 0x00, 0x00, 0x01,
0x85, 0x69, 0x43, 0x43, 0x50, 0x49, 0x43, 0x43, 0x20, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x00, 0x00, 0x28, 0x91, 0x7d, 0x91, 0x3d, 0x48,
0xc3, 0x40, 0x1c, 0xc5, 0x5f, 0x53, 0xa5, 0x2a, 0x15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x62, 0x4b, 0x47, 0x44, 0x00, 0xf7,
0x00, 0xb6, 0x00, 0x43, 0x2d, 0x51, 0xa5, 0xba, 0x00, 0x00, 0x00, 0x09,
0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc2, 0x00, 0x00, 0x0e, 0xc2,
0x01, 0x15, 0x28, 0x4a, 0x80, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d,
0x45, 0x07, 0xe4, 0x09, 0x15, 0x10, 0x23, 0x14, 0x93, 0x83, 0x36, 0x84,
0x00, 0x00, 0x03, 0x9f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xed, 0x58,
0x4d, 0x48, 0x1b, 0x41, 0x14, 0xfe, 0x36, 0x8d, 0x3d, 0x49, 0x2f, 0xd1,
0x43, 0x14, 0xa1, 0xfe, 0x40, 0x0b, 0xc5, 0xda, 0x96, 0xa0, 0xd0, 0xab,
0x05, 0x49, 0x2f, 0x4b, 0x2f, 0x1e, 0x3d, 0xe5, 0x60, 0x0a, 0x12, 0xf0,
0x50, 0x72, 0xe8, 0x21, 0x07, 0x0f, 0x39, 0x05, 0xc4, 0x43, 0x3c, 0x78,
0xea, 0x51, 0x90, 0xb2, 0x50, 0x0c, 0x4a, 0x73, 0x2d, 0x34, 0x04, 0x25,
0x48, 0x41, 0x0b, 0xc6, 0x43, 0xd1, 0x3d, 0x88, 0x17, 0xf1, 0x54, 0x29,
0xd3, 0x83, 0x9d, 0xed, 0xec, 0xb0, 0x3f, 0xb3, 0xbb, 0x23, 0xd9, 0x24,
0xf3, 0x41, 0xd8, 0x9d, 0xec, 0xbe, 0x9d, 0x79, 0xdf, 0xfb, 0xde, 0xcc,
0x9b, 0xd1, 0xd0, 0x23, 0x78, 0x3d, 0x9f, 0x21, 0x8f, 0xde, 0x3d, 0xc4,
0xc4, 0xb3, 0x71, 0xb4, 0x7f, 0x9c, 0x59, 0x57, 0x16, 0x67, 0xf5, 0x0b,
0x00, 0x40, 0xea, 0x7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d3, 0x21, 0x2e, 0xa9, 0x90,
0x10, 0x91, 0xb2, 0xcc, 0x08, 0xf2, 0xa9, 0x11, 0x3b, 0x02, 0x82, 0x4a,
0x5e, 0x66, 0xfa, 0xc4, 0x52, 0x01, 0xbd, 0x8e, 0x84, 0x5f, 0xe4, 0x82,
0x44, 0x51, 0xc4, 0x2e, 0x6e, 0xaa, 0x48, 0xdc, 0x87, 0x7c, 0xbb, 0x41,
0xfa, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
0x0a, 0x0a, 0x0a, 0x0a, 0xfd, 0x8b, 0xbf, 0x2c, 0xdb, 0x4f, 0x9e, 0xe1,
0x0e, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82
};
#endif /* SPRITE_SHEET_PNG_H */
<file_sep>/include/jfc/Background_1.png.h
#ifndef BACKGROUND_1_PNG_H
#define BACKGROUND_1_PNG_H
static const unsigned char Background_1_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20,
0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, 0xf4, 0x00, 0x00, 0x01,
0x85, 0x69, 0x43, 0x43, 0x50, 0x49, 0x43, 0x43, 0x20, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x00, 0x00, 0x28, 0x91, 0x7d, 0x91, 0x3d, 0x48,
0xc3, 0x40, 0x1c, 0xc5, 0x5f, 0x53, 0xa5, 0x2a, 0x15, 0x85, 0x56, 0x10,
0x71, 0x08, 0x52, 0x9d, 0x2c, 0x88, 0x8a, 0x38, 0x4a, 0x15, 0x8b, 0x60,
0xa1, 0xb4, 0x15, 0x5a, 0x75, 0x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, 0x00, 0x00, 0x0e, 0xc2, 0x00, 0x00, 0x0e, 0xc2,
0x01, 0x15, 0x28, 0x4a, 0x80, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d,
0x45, 0x07, 0xe4, 0x09, 0x15, 0x10, 0x22, 0x32, 0x58, 0x95, 0x82, 0x38,
0x00, 0x00, 0x00, 0x56, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xed, 0xd4,
0xb1, 0x09, 0x00, 0x20, 0x0c, 0x44, 0xd1, 0x53, 0x2c, 0x1d, 0xc4, 0x91,
0x1c, 0xd1, 0x91, 0x1c, 0xc4, 0x3e, 0x4e, 0xa0, 0x10, 0x2d, 0xb4, 0xf8,
0xa9, 0x0f, 0xee, 0x11, 0x42, 0x82, 0x99, 0xe9, 0xe5, 0x44, 0x3d, 0x1e,
0x00, 0x00, 0x00, 0x24, 0x49, 0x2a, 0x6d, 0xb8, 0x9f, 0x41, 0xaf, 0x39,
0x78, 0xf2, 0xab, 0x8e, 0x78, 0x52, 0xee, 0x45, 0xef, 0xb2, 0xe9, 0x66,
0x7d, 0xa7, 0x78, 0x8e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc0, 0x57, 0x80, 0x09, 0xed, 0x69, 0x15, 0x10, 0xb7, 0x3e,
0x91, 0x17, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
0x60, 0x82
};
#endif /* BACKGROUND_1_PNG_H */
<file_sep>/include/jfc/background_shader.h
// © 2019 <NAME> - All Rights Reserved
#ifndef JFC_FLAPPY_BACKGROUND_SHADER_H
#define JFC_FLAPPY_BACKGROUND_SHADER_H
#include <string>
const std::string BackgroundShaderVertexGLSL(R"V0G0N(
//Uniforms
uniform mat4 _MVP;
uniform mat4 _Model;
uniform mat4 _View;
uniform mat4 _Projection;
#if defined Emscripten
//VertIn
attribute highp vec3 a_Position;
attribute mediump vec2 a_UV;
//FragIn
varying mediump vec2 v_UV;
#elif defined Darwin || defined Windows || defined Linux
//VertIn
attribute vec3 a_Position;
attribute vec2 a_UV;
//FragIn
varying vec2 v_UV;
#endif
void main ()
{
gl_Position = _MVP * vec4(a_Position,1.0);
v_UV = a_UV;
}
)V0G0N");
const std::string BackgroundShaderFragmentGLSL(R"V0G0N(
#if defined Emscripten
precision mediump float;
#endif
//Uniforms
uniform sampler2D _Texture;
uniform vec2 _UVOffset;
uniform vec2 _UVScale;
#if defined Emscripten
//FragIn
varying lowp vec2 v_UV;
#elif defined Darwin || defined Windows || defined Linux
//FragIn
varying vec2 v_UV;
#endif
void main()
{
v_UV += _UVOffset;
v_UV *= _UVScale;
vec4 frag = texture2D(_Texture, v_UV);
if (frag[3] < 1.0) discard;
gl_FragColor = frag;
}
)V0G0N");
#endif
<file_sep>/include/jfc/Background_2.png.h
#ifndef BACKGROUND_2_PNG_H
#define BACKGROUND_2_PNG_H
static const unsigned char Background_2_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20,
0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, 0xf4, 0x00, 0x00, 0x01,
0x85, 0x69, 0x43, 0x43, 0x50, 0x49, 0x43, 0x43, 0x20, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x00, 0x00, 0x28, 0x91, 0x7d, 0x91, 0x3d, 0x48,
0xc3, 0x40, 0x1c, 0xc5, 0x5f, 0x53, 0xa5, 0x2a, 0x15, 0x85, 0x56, 0x10,
0x71, 0x08, 0x52, 0x9d, 0x2c, 0x88, 0x8a, 0x38, 0x4a, 0x15, 0x8b, 0x60,
0xa1, 0xb4, 0x15, 0x5a, 0x75, 0x30, 0xb9, 0xf4, 0x0b, 0x9a, 0x34, 0x24,
0x29, 0x2e, 0x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 0x15, 0x28, 0x4a, 0x80, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d,
0x45, 0x07, 0xe4, 0x09, 0x15, 0x10, 0x22, 0x31, 0xc1, 0x9c, 0xd3, 0x82,
0x00, 0x00, 0x00, 0x59, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0x63, 0xfc,
0xff, 0xff, 0x3f, 0xc3, 0x40, 0x02, 0x26, 0x86, 0x01, 0x06, 0xa3, 0x0e,
0x18, 0x75, 0xc0, 0xa8, 0x03, 0x46, 0x1d, 0x30, 0xea, 0x00, 0x16, 0x72,
0x35, 0xea, 0x7c, 0xdc, 0x06, 0xaf, 0x44, 0xae, 0xf0, 0x7b, 0x31, 0x92,
0xab, 0x86, 0x51, 0xfb, 0xc3, 0xd6, 0xff, 0xb8, 0x24, 0xf1, 0x19, 0x48,
0x09, 0x40, 0xb6, 0x8f, 0x51, 0xfb, 0xc3, 0xd6, 0xff, 0xa3, 0x89, 0x70,
0xd4, 0x01, 0xa3, 0x0e, 0x18, 0x75, 0xc0, 0xa8, 0x03, 0x46, 0x1d, 0x30,
0xea, 0x80, 0x51, 0x07, 0x8c, 0x68, 0x07, 0x00, 0x00, 0x3b, 0x71, 0x16,
0x09, 0x7c, 0x54, 0x63, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82
};
#endif /* BACKGROUND_2_PNG_H */
<file_sep>/src/control.cpp
// © 2020 <NAME> - All Rights Reserved
//#include <jfc/control.h>
//using namespace flappy;
<file_sep>/include/jfc/background.h
// © 2020 <NAME> - All Rights Reserved
#ifndef JFC_FLAPPY_BACKGROUND_H
#define JFC_FLAPPY_BACKGROUND_H
#include <jfc/assets.h>
#include <gdk/graphics_context.h>
#include <gdk/scene.h>
#include <gdk/entity.h>
#include <array>
namespace flappy
{
/// \brief controls parallax effect, clouds, etc.
class scenery final
{
public:
static constexpr size_t size = 8;
private:
std::array<std::shared_ptr<gdk::entity>, size> m_ParallaxEntities;
std::array<std::shared_ptr<gdk::material>, size> m_ParallaxMaterials;
float time = 0;
public:
void update(const float delta);
scenery(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::shader_program_shared_ptr_type pShader,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aAssets);
~scenery() = default;
};
};
#endif
<file_sep>/include/jfc/background_music_player.h
// © 2020 <NAME> - All Rights Reserved
#ifndef JFC_BACKGROUND_MUSIC_PLAYER_H
#define JFC_BACKGROUND_MUSIC_PLAYER_H
#include <jfc/flappy_event_bus.h>
#include <jfc/screen_stack.h>
#include <gdk/audio/context.h>
#include <jfc/POL_chubby_cat_short.ogg.h>
#include <jfc/Very_Short_Work.ogg.h>
namespace flappy
{
class background_music_player
{
public:
using screen_push_observer_type = jfc::event_bus<flappy::screen_pushed_event>::observer_shared_ptr_type;
using screen_popped_observer_type = jfc::event_bus<flappy::screen_popped_event>::observer_shared_ptr_type;
private:
std::map<std::string, gdk::audio::context::emitter_shared_ptr_type> m_ScreenNameToBGM;
screen_push_observer_type m_pScreenPushObserver;
screen_popped_observer_type m_pScreenPopObserver;
gdk::audio::context::emitter_shared_ptr_type m_pCurrentBGM;
void handle_track_change(std::string name)
{
if (auto s = m_ScreenNameToBGM.find(name); s != m_ScreenNameToBGM.end())
{
m_pCurrentBGM = m_ScreenNameToBGM[name];
for (auto p : m_ScreenNameToBGM)
{
if (p.second != m_pCurrentBGM) p.second->stop();
}
m_pCurrentBGM->play();
}
}
public:
background_music_player(std::shared_ptr<flappy::event_bus> pEventBus, gdk::audio::context::context_shared_ptr_type aAudioContext)
: m_pScreenPushObserver(std::make_shared<screen_push_observer_type::element_type>([&](
flappy::screen_pushed_event e)
{
handle_track_change(e.name);
}))
, m_pScreenPopObserver(std::make_shared<screen_popped_observer_type::element_type>([&](
flappy::screen_popped_event e)
{
handle_track_change(e.name);
}))
{
auto pSound = aAudioContext->make_sound(gdk::audio::sound::encoding_type::vorbis, std::vector<unsigned char>(
POL_chubby_cat_short_ogg, POL_chubby_cat_short_ogg + sizeof(POL_chubby_cat_short_ogg) / sizeof(POL_chubby_cat_short_ogg[0])));
m_ScreenNameToBGM["MainMenu"] = aAudioContext->make_emitter(pSound);
pSound = aAudioContext->make_sound(gdk::audio::sound::encoding_type::vorbis, std::vector<unsigned char>(
Very_Short_Work_ogg, Very_Short_Work_ogg + sizeof(Very_Short_Work_ogg) / sizeof(Very_Short_Work_ogg[0])));
m_ScreenNameToBGM["GameScreen"] = aAudioContext->make_emitter(pSound);
m_ScreenNameToBGM["GameScreen"]->set_pitch(1.f);
pEventBus->add_screen_pushed_event_observer(m_pScreenPushObserver);
pEventBus->add_screen_popped_event_observer(m_pScreenPopObserver);
}
void update()
{
if (!m_pCurrentBGM->isPlaying()) m_pCurrentBGM->play();
}
};
}
#endif
<file_sep>/src/city.cpp
// © 2020 <NAME> - All Rights Reserved
#include <jfc/city.h>
#include <jfc/Sprite_Sheet.png.h>
#include <chrono>
using namespace flappy;
using namespace gdk;
static const graphics_vector2_type CITY_GRAPHIC_1(0, 2);
static const graphics_vector2_type CITY_GRAPHIC_2(1, 2);
static float blar(0);
void city::randomizeGraphic()
{
m_Position.x = 1.5f + (0.25f * (m_Random() % 10));
graphics_vector2_type graphic;
switch (m_Random() % 2)
{
case 0: graphic = CITY_GRAPHIC_1; break;
case 1: graphic = CITY_GRAPHIC_2; break;
default: throw std::runtime_error("there are only two city graphics!");
}
const auto scale(0.1f + (0.025f * (m_Random() % 2)));
m_Material->setVector2("_UVOffset", graphic);
m_Speed = 0.2f;
m_Scale = { scale + (0.02f * m_Speed) };
m_Position.y = 0.0045f;
m_Position.z = -0.47f;
}
city::city(gdk::graphics::context::context_shared_ptr_type pContext,
gdk::graphics::context::scene_shared_ptr_type pScene,
flappy::assets::shared_ptr aassets)
{
m_Material = std::shared_ptr<material>(std::move(pContext->make_material(pContext->get_alpha_cutoff_shader())));
auto pTexture = aassets->get_spritesheet();
m_Material->setTexture("_Texture", pTexture);
m_Material->setVector2("_UVScale", { 0.25, 0.25 });
m_Entity = decltype(m_Entity)(std::move(pContext->make_entity(std::shared_ptr<model>(pContext->get_quad_model()), m_Material)));
pScene->add_entity(m_Entity);
m_Random.seed(std::chrono::system_clock::now().time_since_epoch().count());
randomizeGraphic();
}
static float total_time(0);
void city::update(const float delta)
{
total_time += delta * m_Speed;
m_Entity->set_model_matrix(m_Position, {}, {m_Scale.x, m_Scale.y, 1});
m_Position.x -= delta * m_Speed;
if (m_Position.x < -2)
{
randomizeGraphic();
}
}
<file_sep>/src/menu.cpp
// © 2020 <NAME> - All Rights Reserved
#include <gdk/menu.h>
using namespace gdk;
void element::set_on_activated(const on_activated_type& a)
{
m_activated_functor = a;
}
void element::set_on_just_gained_focus(const decltype(m_just_gained_focus)& a)
{
m_just_gained_focus = a;
}
void element::set_on_just_lost_focus(const decltype(m_just_lost_focus)& a)
{
m_just_lost_focus = a;
}
void element::set_while_focused(const decltype(m_while_focused)& a)
{
m_while_focused = a;
}
void element::set_north_neighbour(neighbour_weakptr_type p)
{
m_north_neighbour = p;
}
decltype(element::m_north_neighbour) element::get_north_neighbour() const
{
return m_north_neighbour;
}
void element::set_south_neighbour(neighbour_weakptr_type p)
{
m_south_neighbour = p;
}
decltype(element::m_south_neighbour) element::get_south_neighbour() const
{
return m_south_neighbour;
}
void element::set_east_neighbour(neighbour_weakptr_type p)
{
m_east_neighbour = p;
}
decltype(element::m_east_neighbour) element::get_east_neighbour() const
{
return m_east_neighbour;
}
void element::set_west_neighbour(neighbour_weakptr_type p)
{
m_west_neighbour = p;
}
decltype(element::m_west_neighbour) element::get_west_neighbour() const
{
return m_west_neighbour;
}
void pane_impl::set_on_update(on_update_type a)
{
m_on_update = a;
}
pane::element_shared_ptr pane::make_element()
{
auto p = std::make_shared<element_shared_ptr::element_type>(element());
if (!m_elements.size()) m_current_element = p;
m_elements.push_back(p);
return p;
}
void pane::set_current_element(decltype(m_current_element) e)
{
if (m_current_element) m_current_element->m_just_lost_focus();
m_current_element = e;
m_current_element->m_just_gained_focus();
}
decltype(pane::m_current_element) pane::get_current_element() const
{
return m_current_element;
}
void pane_impl::set_menu_ptr(decltype(pane_impl::m_menu) p)
{
m_menu = p;
}
void pane_impl::update(bool aUpInput,
bool aDownInput,
bool aLeftInput,
bool aRightInput,
bool aSelectInput,
bool aCancelInput)
{
m_on_update();
if (aCancelInput)
{
if (m_menu) m_menu->pop();
}
if (auto currentElement = get_current_element())
{
currentElement->m_while_focused();
if (aSelectInput)
{
currentElement->m_activated_functor();
}
if (static_cast<int>(aUpInput) + static_cast<int>(aDownInput) == 1)
{
if (aUpInput)
{
if (auto p = currentElement->get_north_neighbour().lock())
set_current_element(p);
}
else
{
if (auto p = currentElement->get_south_neighbour().lock())
set_current_element(p);
}
}
if (static_cast<int>(aLeftInput) + static_cast<int>(aRightInput) == 1)
{
if (aLeftInput)
{
if (auto p = currentElement->get_west_neighbour().lock())
set_current_element(p);
}
else
{
if (auto p = currentElement->get_east_neighbour().lock())
set_current_element(p);
}
}
}
}
pane::pane_shared_ptr pane::make_pane()
{
return pane::pane_shared_ptr(new pane_impl());
}
void pane_impl::set_on_just_gained_top(pane::on_update_type a)
{
m_on_just_gained_top = a;
}
void pane_impl::set_on_just_lost_top(pane::on_update_type a)
{
m_on_just_lost_top = a;
}
void pane_impl::just_gained_top()
{
m_on_just_gained_top();
if (auto p = get_current_element()) p->m_just_gained_focus();
}
void pane_impl::just_lost_top()
{
if (auto p = get_current_element()) p->m_just_lost_focus();
m_on_just_lost_top();
}
void menu::push(pane::pane_shared_ptr p)
{
auto pNewTop = std::static_pointer_cast<pane_impl>(p);
pNewTop->just_gained_top();
pNewTop->set_menu_ptr(this);
if (m_stack.size())
std::static_pointer_cast<pane_impl>(m_stack.top())->just_lost_top();
m_stack.push(p);
}
void menu::pop()
{
if (m_stack.size() > 1)
{
auto pOldTop = std::static_pointer_cast<pane_impl>(m_stack.top());
pOldTop->just_lost_top();
pOldTop->set_menu_ptr(nullptr);
m_stack.pop();
}
if (m_stack.size()) std::static_pointer_cast<pane_impl>(m_stack.top())->just_gained_top();
}
void menu::update()
{
if (m_stack.size())
{
std::static_pointer_cast<pane_impl>(m_stack.top())->
update(m_UpInput(),
m_DownInput(),
m_LeftInput(),
m_RightInput(),
m_Select(),
m_Cancel());
}
}
menu::menu(input_functor_type aUpInput,
input_functor_type aDownInput,
input_functor_type aLeftInput,
input_functor_type aRightInput,
input_functor_type aSelect,
input_functor_type aCancel)
: m_UpInput(aUpInput)
, m_DownInput(aDownInput)
, m_LeftInput(aLeftInput)
, m_RightInput(aRightInput)
, m_Select(aSelect)
, m_Cancel(aCancel)
{}
|
cdb700736048cb9bac6faeb630ef58cfa3c55005
|
[
"Markdown",
"C",
"CMake",
"C++"
] | 44
|
C++
|
jfcameron/flappy-dot
|
369ceedf0de7e183152ec5d06152bcc4417af8c7
|
67fece92f886c2ca507730625d113a07248cfaad
|
refs/heads/master
|
<file_sep>import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home/home'
import joinshop from '@/components/shop/joinshop'
import help from '@/components/help/help'
import navlist from '@/components/goods/navlist'
import list from '@/components/goods/list'
import nav from '@/components/goods/nav'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: home
},
{
path: '/home',
name: 'home',
component: home
},
{
path: '/shop',
name: 'joinshop',
component: joinshop
},
{
path: '/help',
name: 'help',
component: help
},
{
path: '/navlist/:nav/:uid/:num',
name: 'navlist',
component: navlist
}
]
})
|
27fc268a68de61cedd541a2906484de304f637af
|
[
"JavaScript"
] | 1
|
JavaScript
|
FYLMaster/Vue-Shopping-Project
|
2d46bf11fc2f0a6df9ca7e4fdd11f5098bc8e1c7
|
fde8ad2e6857cec46717f89d1f1f14b2ed3d15bf
|
refs/heads/master
|
<file_sep>//window.onload = function() {
// let englishWrods = {
// title: "hello word",
// }
//
// window.onclick = function () {
// for (let name in englishWrods) {
// let element = document.querySelector('.' + name);
// element.insertAdjacentHTML('afterbegin', englishWrods[name]);
// }
// }
//}
window.onload = function () {
let stats = document.querySelectorAll('.block-stat__greenline');
for (let i = 0; i < stats.length; i++) {
let percent = +stats[i].textContent;
if (percent > 5) {
stats[i].style.width = (percent + 3) + '%';
} else {
stats[i].style.width = (6 + percent) + '%';
}
}
}
|
c68d735a3797c07e661fff0cd819cb79cfd33619
|
[
"JavaScript"
] | 1
|
JavaScript
|
Evi-ava/Evi-ava.github.io
|
a347f1b6020ef0f1f843ddf1b6318575450eed26
|
0dc738ae3647e5bd2f2dae292b275060b93ccef7
|
refs/heads/master
|
<file_sep>import hashlib, base64, random, string
class MemberService():
@staticmethod
def geneAuthCode(member_info=None):
m = hashlib.md5()
str = "%s-%s-%s" % (member_info.id, member_info.salt, member_info.status)
m.update(str.encode('utf-8'))
return m.hexdigest()
@staticmethod
def get_code():
code = ""
for i in range(6):
ch = chr(random.randrange(ord('0'), ord('9') + 1))
code += ch
return code
@staticmethod
def balance(balance, salt):
m = hashlib.md5()
str = '%s-%s' % (base64.encodebytes(balance.encode('utf-8')), salt)
m.update(str.encode('utf-8'))
return m.hexdigest()
@staticmethod
def geneSalt(length=16):
keylist = [random.choice((string.ascii_letters + string.digits)) for i in range(length)]
return ("".join(keylist))
<file_sep>from application import app
from flask import request, jsonify, g
from common.models.member.member import Member
from common.libs.member.MemberService import MemberService
from common.libs.UrlManager import UrlManager
import re
from common.libs.Logserver import LogService
@app.before_request
def before_request():
ignore_urls = app.config['API_IGNORE_URLS']
path = request.path
pattern = re.compile('%s' % "|".join(ignore_urls))
if pattern.match(path):
return
if '/api' not in path:
return
member_info = check_login()
g.current_user = None
if member_info:
g.member_info = member_info
if not member_info:
resp = {
'code': -1, 'msg': '操作失败', 'data': {}
}
return jsonify(resp)
return
# 判断登录
def check_login():
auth_cookie = request.headers.get('Authorization')
if auth_cookie is None:
return False
auth_cookie = auth_cookie.split("#")
if len(auth_cookie) != 2:
return False
try:
member_info = Member.query.filter_by(id=auth_cookie[1]).first()
except Exception:
return False
if member_info is None:
return False
if member_info.status != 1:
return False
if auth_cookie[0] != MemberService.geneAuthCode(member_info):
return False
return member_info
<file_sep># coding: utf-8
from sqlalchemy import BigInteger, Column, DateTime, Index, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class TakeoutOrder(db.Model):
__tablename__ = 'takeout_order'
__table_args__ = (
db.Index('idx_member_id_status', 'order_member_id', 'status'),
)
id = db.Column(db.Integer, primary_key=True)
order_sn = db.Column(db.String(40, 'utf8mb4_0900_ai_ci'), nullable=False, unique=True,
server_default=db.FetchedValue())
order_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
receipt_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_price = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_sn = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
prepay_id = db.Column(db.String(128, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
note = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplaceid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplace = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
needtime = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
takeout_count = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
takeout_place = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
takeout_name = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
takeout_sex = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
takeout_weight_id = db.Column(db.Integer)
takeout_weight = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
comment_status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
pay_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
receipt_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
delivery_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
success_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
<file_sep>SQLALCHEMY_DATABASE_URI = 'mysql://root:Abc!@8851043@127.0.0.1/test'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ENCODING = "utf-8"
DEBUG = True
SQLALCHEMY_ECHO = True
RELEASW_VERSION =""
UPLOAD_FOLDER = '/path/to/the/uploads'
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from common.libs.UrlManager import UrlManager
from common.libs.member.Checklogin import Checklogin
from common.models.order.commonweal.commonweal_order import CommonwealOrder
from common.models.order.take.takeout_order import TakeoutOrder
from common.models.order.second.second_order import SecondOrder
from common.models.order.express.express_order import ExpressOrder
from common.models.order.help.help_order import HelpOrder
from common.models.order.express.express_Image import ExpressImage
from sqlalchemy import or_
@route_api.route("/order/search", methods=["GET", "POST"])
def search():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
input = req['input'] if 'input' in req else ''
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not input or len(input) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
data_image = []
if int(id) == 0:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0,
CommonwealOrder.commonweal_name.ilike(
"%{0}%".format(req['input']))
)
data_address = []
if Commonweal_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Commonweal_order_info:
for item in Commonweal_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 0,
ExpressImage.status == 1,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildCommonwealImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'id': item.id,
'type_id': item.commonweal_type_id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'Commonweal_title': item.commonweal_name,
'Commonweal_conment': item.commonweal_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
elif int(id) == 1:
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 0,
SecondOrder.second_name.ilike(
"%{0}%".format(req['input']))
)
data_address = []
if Second_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Second_order_info:
for item in Second_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildSecondImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'id': item.id,
'type_id': item.second_type_id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'Second_title': item.second_name,
'Second_conment': item.second_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
elif int(id) == 2:
Help_order_info = HelpOrder.query.filter(HelpOrder.status != 0,
HelpOrder.help_title.ilike(
"%{0}%".format(req['input']))
)
data_address = []
if Help_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Help_order_info:
for item in Help_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.status == 1,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildHelpImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.help_sex,
'id': item.id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'help_title': item.help_title,
'help_conment': item.help_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
elif int(id) == 3:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0,
or_(ExpressOrder.needplace.ilike(
"%{0}%".format(req['input'])),
ExpressOrder.express_place.ilike(
"%{0}%".format(req['input']))))
data_address = []
if Express_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Express_order_info:
for item in Express_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 3,
ExpressImage.status == 1,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.express_sex,
'id': item.id,
'pay_price': item.pay_price,
'note': item.note,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'needplace': item.needplace,
'Count': item.express_count,
'needtime': str(item.needtime),
'express_place': item.express_place,
'express_weight': item.express_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
elif int(id) == 4:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0,
or_(
TakeoutOrder.takeout_place.ilike(
"%{0}%".format(req['input'])),
TakeoutOrder.needplace.ilike(
"%{0}%".format(req['input']))
)
)
data_address = []
if Takeout_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Takeout_order_info:
for item in Takeout_order_info:
Takeout_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if Takeout_image_info:
for item1 in Takeout_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.takeout_sex,
'id': item.id,
'pay_price': item.pay_price,
'note': item.note,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'needplace': item.needplace,
'Count': item.takeout_count,
'needtime': str(item.needtime),
'Takeout_place': item.takeout_place,
'Takeout_weight': item.takeout_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/showPersonCommonweal", methods=["GET", "POST"])
def showPersonCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not ip or len(ip) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
data_image = []
Commonweal_order_info = CommonwealOrder()
if int(id) > -1:
if int(ip) == 0:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status == 1,
CommonwealOrder.order_member_id == member_info.id,
CommonwealOrder.commonweal_type_id == id)
elif int(ip) == 1:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 1,
CommonwealOrder.status != 0,
CommonwealOrder.order_member_id == member_info.id,
CommonwealOrder.commonweal_type_id == id)
else:
if int(ip) == 0:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status == 1,
CommonwealOrder.order_member_id == member_info.id,
)
elif int(ip) == 1:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 1,
CommonwealOrder.status != 0,
CommonwealOrder.order_member_id == member_info.id,
)
data_address = []
if Commonweal_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Commonweal_order_info:
for item in Commonweal_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 0,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildCommonwealImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'id': item.id,
'type_id': item.commonweal_type_id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'Commonweal_title': item.commonweal_name,
'Commonweal_conment': item.commonweal_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/showPersonSecond", methods=["GET", "POST"])
def showPersonSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not ip or len(ip) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
data_image = []
Second_order_info = SecondOrder()
if int(id) > -1:
if int(ip) == 0:
Second_order_info = SecondOrder.query.filter(SecondOrder.status == 1,
SecondOrder.order_member_id == member_info.id,
SecondOrder.second_type_id == id)
elif int(ip) == 1:
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 1,
SecondOrder.status != 0,
SecondOrder.order_member_id == member_info.id,
SecondOrder.second_type_id == id)
else:
if int(ip) == 0:
Second_order_info = SecondOrder.query.filter(SecondOrder.status == 1,
SecondOrder.order_member_id == member_info.id,
)
elif int(ip) == 1:
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 1,
SecondOrder.status != 0,
SecondOrder.order_member_id == member_info.id,
)
data_address = []
if Second_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Second_order_info:
for item in Second_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildSecondImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'id': item.id,
'type_id': item.second_type_id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'Second_title': item.second_name,
'Second_conment': item.second_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/showPersonHelp", methods=["GET", "POST"])
def showPersonHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not ip or len(ip) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
data_image = []
Help_order_info = HelpOrder()
if int(id) == 0:
if int(ip) == 0:
Help_order_info = HelpOrder.query.filter(HelpOrder.order_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Help_order_info = HelpOrder.query.filter(HelpOrder.status == ip,
HelpOrder.order_member_id == member_info.id,
)
elif int(ip) == 5:
Help_order_info = HelpOrder.query.filter(HelpOrder.status == 0,
HelpOrder.order_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
elif int(id) == 1:
if int(ip) == 0:
Help_order_info = HelpOrder.query.filter(HelpOrder.receipt_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Help_order_info = HelpOrder.query.filter(HelpOrder.status == int(ip) + 1,
HelpOrder.receipt_member_id == member_info.id,
)
elif int(ip) == 5:
Help_order_info = HelpOrder.query.filter(HelpOrder.status == 0,
HelpOrder.receipt_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
data_address = []
if Help_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Help_order_info:
for item in Help_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildHelpImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.help_sex,
'id': item.id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'help_title': item.help_title,
'help_conment': item.help_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/showPersonExpress", methods=["GET", "POST"])
def showPersonExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not ip or len(ip) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
data_image = []
Express_order_info = ExpressOrder()
if int(id) == 0:
if int(ip) == 0:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.order_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.status == ip,
ExpressOrder.order_member_id == member_info.id,
)
elif int(ip) == 5:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.status == 0,
ExpressOrder.order_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
elif int(id) == 1:
if int(ip) == 0:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.receipt_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.status == int(ip) + 1,
ExpressOrder.receipt_member_id == member_info.id,
)
elif int(ip) == 5:
Express_order_info = ExpressOrder.query.filter(ExpressOrder.status == 0,
ExpressOrder.receipt_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
data_address = []
if Express_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Express_order_info:
for item in Express_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 3,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.express_sex,
'id': item.id,
'pay_price': item.pay_price,
'note': item.note,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'needplace': item.needplace,
'Count': item.express_count,
'needtime': str(item.needtime),
'express_place': item.express_place,
'express_weight': item.express_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/showPersonTakeout", methods=["GET", "POST"])
def showPersonTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not ip or len(ip) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
data_image = []
Takeout_order_info = TakeoutOrder()
if int(id) == 0:
if int(ip) == 0:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.order_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status == ip,
TakeoutOrder.order_member_id == member_info.id,
)
elif int(ip) == 5:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status == 0,
TakeoutOrder.order_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
elif int(id) == 1:
if int(ip) == 0:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.receipt_member_id == member_info.id, )
elif int(ip) > 0 and int(ip) < 5:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status == int(ip) + 1,
TakeoutOrder.receipt_member_id == member_info.id,
)
elif int(ip) == 5:
Takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status == 0,
TakeoutOrder.receipt_member_id == member_info.id,
)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
else:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
data_address = []
if Takeout_order_info is None:
resp["data"] = data_address
return jsonify(resp)
if Takeout_order_info:
for item in Takeout_order_info:
Takeout_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if Takeout_image_info:
for item1 in Takeout_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.takeout_sex,
'id': item.id,
'pay_price': item.pay_price,
'note': item.note,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'needplace': item.needplace,
'Count': item.takeout_count,
'needtime': str(item.needtime),
'Takeout_place': item.takeout_place,
'Takeout_weight': item.takeout_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
<file_sep># coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class Type(db.Model):
__tablename__ = 'type'
id = db.Column(db.Integer, primary_key=True)
type_title = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
lagetypeid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
import time
from common.libs.UrlManager import UrlManager
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.second.second_order import SecondOrder
from common.models.order.express.express_Image import ExpressImage
from common.models.member.member import Member
from sqlalchemy import or_
@route_api.route("/order/sureSecond", methods=["GET", "POST"])
def sureSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = SecondOrder.query.filter(SecondOrder.status != 0, SecondOrder.id == id,
SecondOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
express_order_info.status = 4
express_order_info.success_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/recSecond", methods=["GET", "POST"])
def recSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = SecondOrder.query.filter(SecondOrder.status != 0, SecondOrder.id == id,
SecondOrder.receipt_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 3
express_order_info.delivery_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteSecond", methods=["GET", "POST"])
def deleteSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = SecondOrder.query.filter(SecondOrder.status != 0, SecondOrder.id == id,
SecondOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info.Balance = member_info.Balance + express_order_info.pay_price
db.session.add(member_info)
db.session.commit()
express_order_info.status = 0
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showPersonnalSecond", methods=["GET", "POST"])
def showPersonnalSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.id == id,
or_(SecondOrder.receipt_member_id == member_info.id,
SecondOrder.order_member_id == member_info.id)).first()
if Second_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.status == 1,
ExpressImage.type_id == 1,
ExpressImage.eporder_id == Second_order_info.id,
ExpressImage.eporder_sn == Second_order_info.order_sn).all()
if express_image_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
addres_info = MemberAddres.query.filter(MemberAddres.status == 1,
MemberAddres.id == Second_order_info.needplaceid).first()
if addres_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status != -1, Member.id == Second_order_info.receipt_member_id).first()
if Rmember_info is None and Second_order_info.status != 1 and Second_order_info.status != 0:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
data_image = []
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildSecondImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'omem': {
'name': addres_info.nickname,
'weChatNum': addres_info.weChatNum,
'oid': Second_order_info.order_member_id,
'mobile': addres_info.mobile
},
'sex': Second_order_info.second_sex,
'nid': Second_order_info.needplaceid,
'detail': addres_info.hide_address,
'order_sn': Second_order_info.order_sn,
'id': Second_order_info.id,
'mid': Second_order_info.order_member_id,
'rid': Second_order_info.receipt_member_id,
'pay_price': Second_order_info.pay_price,
'original_price': Second_order_info.original_price,
'note': Second_order_info.note,
'needplace': Second_order_info.needplace,
'needtime': str(Second_order_info.needtime),
'Second_title': Second_order_info.second_name,
'Second_conment': Second_order_info.second_conment,
'data_image': data_image,
'status': Second_order_info.status,
'go_type_id': Second_order_info.second_go_type,
'second_type_id': Second_order_info.second_type_id,
'time': {
'created_time': str(Second_order_info.created_time),
'receipt_time': str(Second_order_info.receipt_time),
'delivery_time': str(Second_order_info.delivery_time),
'success_time': str(Second_order_info.success_time)
}
}
if (Rmember_info):
tmp_data['rmem'] = {
'rid': Rmember_info.id,
'name': Rmember_info.nickname,
'weChatNum': Rmember_info.weChatNum,
'mobile': Rmember_info.mobile
}
resp["data"] = tmp_data
return jsonify(resp)
@route_api.route("/order/receiptSecond", methods=["GET", "POST"])
def receiptSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 0, SecondOrder.id == id).first()
if Second_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Second_order_info.status = 2
Second_order_info.receipt_member_id = member_info.id
Second_order_info.receipt_time = getCurrentDate()
Second_order_info.updated_time = getCurrentDate()
db.session.add(Second_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showSecond", methods=["GET", "POST"])
def showSecond():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
data_image = []
if id and len(id) > 0:
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 0, SecondOrder.id == id).first()
member_info = Member.query.filter(Member.status != -1, Member.id == Second_order_info.order_member_id).first()
if Second_order_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if member_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1,
ExpressImage.eporder_id == Second_order_info.id,
ExpressImage.eporder_sn == Second_order_info.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildSecondImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'nickname': member_info.nickname,
'avatar': member_info.avatar,
'mobile': member_info.mobile,
'weChatNum': member_info.weChatNum,
'order_sn': Second_order_info.order_sn,
'id': Second_order_info.id,
'pay_price': Second_order_info.pay_price,
'note': Second_order_info.note,
'second_go_type': Second_order_info.second_go_type,
'needplace': Second_order_info.needplace,
'needtime': str(Second_order_info.needtime),
'second_title': Second_order_info.second_name,
'second_conment': Second_order_info.second_conment,
'status': Second_order_info.status,
'data_image': data_image,
}
resp["data"] = tmp_data
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 0)
if ip and int(ip)-1 >-1:
Second_order_info = SecondOrder.query.filter(SecondOrder.status != 0,
SecondOrder.second_type_id == (int(ip) - 1))
data_address = []
if Second_order_info:
for item in Second_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 1,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildSecondImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.second_name,
'id': item.id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'second_title': item.second_name,
'second_conment': item.second_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/addSecondOrder", methods=["GET", "POST"])
def addSecondOrder():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
default_address = req['default_address'] if 'default_address' in req else ''
id = req['id'] if 'id' in req else ''
conment = req['conment'] if 'conment' in req else ''
default_addressid = req['default_addressid'] if 'default_addressid' in req else ''
yun_price = req['yun_price'] if 'yun_price' in req else ''
yuan_price = req['yuan_price'] if 'yuan_price' in req else ''
go_type_id = req['go_type_id'] if 'go_type_id' in req else ''
type_id = req['type_id'] if 'type_id' in req else ''
title = req['title'] if 'title' in req else ''
requirement = req['requirement'] if 'requirement' in req else ''
sex = req['sex'] if 'sex' in req else None
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not go_type_id or len(go_type_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not type_id or len(type_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not default_address or len(default_address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not default_addressid or len(default_addressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not yun_price or len(yun_price) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not yuan_price or len(yuan_price) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not conment or len(conment) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not title or len(title) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if not sex or len(sex) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.order_member_id == member_info.id,
SecondOrder.id == id,
SecondOrder.status == 1).first()
if id or len(id) > 1:
if Second_order_info == None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
else:
Second_order_info = SecondOrder()
order_id = str(int(time.time() * 1000)) + str(int(time.clock() * 1000000))
Second_order_info.order_member_id = member_info.id
Second_order_info.order_sn = order_id
Second_order_info.created_time = getCurrentDate()
resp['data'] = order_id
Second_order_info.pay_price = yun_price
Second_order_info.original_price = yuan_price
Second_order_info.needplace = default_address
Second_order_info.needplaceid = default_addressid
Second_order_info.needtime = getCurrentDate()
Second_order_info.second_type_id = type_id
Second_order_info.second_go_type = go_type_id
Second_order_info.note = requirement
Second_order_info.status = 1
Second_order_info.second_name = title
Second_order_info.second_conment = conment
Second_order_info.second_sex = sex
Second_order_info.updated_time = getCurrentDate()
db.session.add(Second_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteSecondImage", methods=["GET", "POST"])
def deleteSecondImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
Second_orderid = req['Second_orderid'] if 'Second_orderid' in req else ''
imagefile = req['imagefile'] if 'imagefile' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not imagefile or len(imagefile) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.id == Second_orderid,
SecondOrder.order_member_id == member_info.id,
SecondOrder.status == 1).first()
if Second_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not Second_orderid or len(Second_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
app_config = app.config['APP']
url = app_config['domain'] + app.config['UPLOAD']['order_second_url']
image_info_in = ExpressImage.query.filter(ExpressImage.eporder_id == Second_order_info.id,
ExpressImage.eporder_sn == Second_order_info.order_sn,
ExpressImage.type_id == 1,
ExpressImage.imageurl == imagefile.replace(url, ''),
ExpressImage.status == 1).first()
if image_info_in == None:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if image_info_in:
image_info_in.status = 0
image_info_in.updated_time = getCurrentDate()
db.session.add(image_info_in)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/addSecondOrderImage", methods=["GET", "POST"])
def addSecondOrderImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
file_target = request.files
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
Second_orderid = req['Second_orderid'] if 'Second_orderid' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not Second_orderid or len(Second_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Second_order_info = SecondOrder.query.filter(SecondOrder.order_sn == Second_orderid,
SecondOrder.order_member_id == member_info.id,
SecondOrder.status == 1).first()
if Second_order_info is None:
resp["code"] = -1
resp["msg"] = "上传失败"
return jsonify(resp)
config_upload = app.config['UPLOAD']
if upfile:
ret = UploadService.uploadImageFile(upfile, Second_orderid, config_upload['order_second_path'])
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
image_info = ExpressImage()
image_info.type_id = 1
image_info.eporder_id = Second_order_info.id
image_info.eporder_sn = Second_orderid
image_info.imageurl = resp['url']
image_info.updated_time = getCurrentDate()
image_info.created_time = getCurrentDate()
db.session.add(image_info)
db.session.commit()
return jsonify(resp)
<file_sep>;
var user_edit_ops = {
init: function () {
this.eventBind();
},
eventBind: function () {
$(".user_edit_wrap .save").click(function (){
var btn_target = $(this);
if (btn_target.hasClass("disabled")) {
common_ops.alert("正在处理,请不要重复提交");
return;
}
var nickname_target = $(".user_edit_wrap input[name=nickname]");
var email_target = $(".user_edit_wrap input[name=email]");
var nickname=nickname_target.val();
var email=email_target.val();
if (!nickname||nickname.length<2){
common_ops.tip("请输入符合规范的姓名",nickname_target);
return false;
}
if (!email||email.length<2){
common_ops.tip("请输入符合规范的电子邮箱",email_target);
return false;
}
var data={nickname:nickname,email:email};
btn_target.addClass("disable");
$.ajax({
url:common_ops.buildUrl("/user/edit"),
type:"POST",
data:data,
dataType:'json',
success:function (res) {
btn_target.removeClass("disabled");
var callback=null;
if(res.code==200){
callback=function () {
window.location.href=window.location.href;
};
}
common_ops.alert(res.msg,callback);
}
})
});
}
};
$(function () {
user_edit_ops.init()
});<file_sep>from web.controllers.api import route_api
from flask import request, jsonify, g
from application import app, db
import json
import requests
from common.models.member.member import Member
from common.models.member.oauth_member_bind import OauthMemberBind
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.MemberService import MemberService
from common.libs.member.Checklogin import Checklogin
from common.models.member.code import Code
@route_api.route("/member/login", methods=["GET", "POST"])
def login():
resp = {
'code': 200, 'msg': '操作成功', 'data': {}
}
req = request.values
code = req['code'] if 'code' in req else ''
cod = req['cod'] if 'cod' in req else ''
nickname = req['nickName'] if 'nickName' in req else ''
sex = req['gender'] if 'gender' in req else ''
avatar = req['avatarUrl'] if 'avatarUrl' in req else ''
app.logger.info(nickname)
if not code or len(code) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
url = 'https://api.weixin.qq.com/sns/jscode2session?appid={0}&secret={1}&js_code={2}&grant_type=authorization_code'.format(
app.config['APP_DATA']['appid'], app.config['APP_DATA']['appkey'], code)
r = requests.get(url)
res = json.loads(r.text)
openid = res['openid']
bind_info = OauthMemberBind.query.filter_by(openid=openid, type=1).first()
if not bind_info:
if cod == '1':
resp["code"] = -1
resp["msg"] = "需要先去登陆"
return jsonify(resp)
model_member = Member()
model_member.nickname = nickname
model_member.sex = sex
model_member.avatar = avatar
model_member.salt = MemberService.geneSalt()
model_member.Balance = 0
model_member.updated_time = model_member.created_time = getCurrentDate()
db.session.add(model_member)
db.session.commit()
model_bind = OauthMemberBind()
model_bind.member_id = model_member.id
model_bind.type = 1
model_bind.openid = openid
model_bind.extra = ''
model_bind.updated_time = model_bind.created_time = getCurrentDate()
db.session.add(model_bind)
db.session.commit()
bind_info = model_bind
member_info = Member.query.filter_by(id=bind_info.member_id).first()
taken = "%s#%s" % (MemberService.geneAuthCode(member_info), member_info.id)
resp["data"] = {'taken': taken, 'nickname': member_info.nickname, 'avatarUrl': member_info.avatar,
'balance': member_info.Balance, 'statu': member_info.status, 'name': member_info.name,
'mobile': member_info.mobile, 'weChatNum': member_info.weChatNum}
return jsonify(resp)
@route_api.route("/member/uploadsMessage", methods=["GET", "POST"])
def uploadsMessage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': ''}
file_target = request.files
req = request.values
comfirmCode = req['comfirmCode'] if 'comfirmCode' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
mobile = req['mobile'] if 'mobile' in req else ''
name = req['name'] if 'name' in req else ''
weChatNum = req['weChatNum'] if 'weChatNum' in req else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
app.logger.info(req)
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not comfirmCode or len(comfirmCode) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not mobile or len(mobile) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not name or len(name) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not weChatNum or len(weChatNum) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if upfile:
ret = UploadService.uploadByFile(upfile)
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "信息错误1"
return jsonify(resp)
code_info = Code.query.filter_by(mid=member_info.id).first()
if code_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
if comfirmCode != code_info.code:
resp["code"] = -1
resp["msg"] = "信息错误2"
return jsonify(resp)
if member_info.status == 0:
member_info.status = 1
member_info.name = name
member_info.mobile = mobile
member_info.weChatNum = weChatNum
member_info.schoolcode = resp['url']
db.session.add(member_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/member/getMobile", methods=["GET", "POST"])
def getMobile():
resp = {'state': 'SUCCESS', 'url': '', 'title': '', 'original': ''}
req = request.values
mobile = req['mobile'] if 'mobile' in req else ''
if mobile is None or len(mobile) < 11:
resp['state'] = 'Fail'
return jsonify(resp)
token = req['token'] if 'token' in req else ''
code = MemberService.get_code()
member = Checklogin.check_login(token)
if member is False:
resp['state'] = 'Fail'
return jsonify(resp)
url = 'http://utf8.api.smschinese.cn/?Uid={0}&Key={1}&smsMob={2}&smsText=验证码:{3}'.format(
app.config['APP_DATA']['mobilename'], app.config['APP_DATA']['mobilekey'], mobile, code)
r = requests.post(url)
if r.text != '1':
resp['state'] = 'Fail'
return jsonify(resp)
code_info = Code.query.filter_by(mid=member.id).first()
if code_info is None:
code_new = Code()
code_new.creattime = getCurrentDate()
code_new.mid = member.id
else:
code_new = code_info
code_new.code = code
code_new.updatetime = getCurrentDate()
db.session.add(code_new)
db.session.commit()
return jsonify(resp)
<file_sep># coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from flask_sqlalchemy import SQLAlchemy
from application import db
class Code(db.Model):
__tablename__ = 'code'
id = db.Column(db.Integer, primary_key=True)
mid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
code = db.Column(db.String(255), nullable=False)
updatetime = db.Column(db.DateTime, nullable=False)
creattime = db.Column(db.DateTime, nullable=False)
<file_sep># coding: utf-8
from sqlalchemy import BigInteger, Column, DateTime, Index, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class HelpOrder(db.Model):
__tablename__ = 'help_order'
__table_args__ = (
db.Index('idx_member_id_status', 'order_member_id', 'status'),
)
id = db.Column(db.Integer, primary_key=True)
order_sn = db.Column(db.String(40), nullable=False, unique=True, server_default=db.FetchedValue())
order_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
receipt_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_price = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_sn = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
prepay_id = db.Column(db.String(128), nullable=False, server_default=db.FetchedValue())
note = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
help_title = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
help_conment = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplaceid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplace = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
needtime = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
help_count = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
help_placeid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
help_place = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
help_code = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
help_sex = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
comment_status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
pay_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
receipt_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
delivery_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
success_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
<file_sep>from flask import Blueprint
route_api = Blueprint('api_pages', __name__)
from web.controllers.api.Member import *
from web.controllers.api.Address import *
from web.controllers.api.express import *
from web.controllers.api.Takeout import *
from web.controllers.api.Help import *
from web.controllers.api.Second import *
from web.controllers.api.commonweal import *
from web.controllers.api.Person import *
@route_api.route("/")
def index():
return "Nima api V1.0"
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
from common.libs.Helper import getCurrentDate
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.type import Type
from common.models.order.express.expressAddress import ExpressAddres
@route_api.route("/order/deleteAddress", methods=["GET", "POST"])
def deleteAddress():
resp = {'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
ID = request.values.get('id') if 'id' in request.values else ''
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
address_info = MemberAddres.query.filter(MemberAddres.member_id == member_info.id, MemberAddres.id == ID,
MemberAddres.status == 1).first()
if address_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
address_info.status = 0
address_info.updated_time = getCurrentDate()
db.session.add(address_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showType", methods=["GET", "POST"])
def showtype():
resp = {'code':200,'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
type1_info = Type.query.filter(Type.lagetypeid == 1, Type.status == 1)
type2_info = Type.query.filter(Type.lagetypeid == 2, Type.status == 1)
if type1_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
if type2_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
data_address = []
data_expressAddres = []
if type1_info:
for item in type1_info:
tmp_data = item.type_title
data_address.append(tmp_data)
if type2_info:
for item in type2_info:
tmp_data = item.type_title,
data_expressAddres.append(tmp_data)
resp["type_1"] = data_address
resp["type_2"] = data_expressAddres
return jsonify(resp)
@route_api.route("/order/showDefaultAddress", methods=["GET", "POST"])
def showAddress():
resp = {'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
address_info = MemberAddres.query.filter(MemberAddres.member_id == member_info.id, MemberAddres.status == 1)
expressAddres_info = ExpressAddres.query.filter(ExpressAddres.status == 1)
if address_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
if expressAddres_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
data_address = []
data_expressAddres = []
if address_info:
for item in address_info:
tmp_data = {
'nickname': item.nickname,
'id': item.id,
'mobile': item.mobile,
'weChatNum': item.weChatNum,
'region': [item.province_str, item.city_str, item.area_str],
'address': item.address,
'hide_address': item.hide_address,
'detail': item.city_str + item.area_str + item.address
}
data_address.append(tmp_data)
if expressAddres_info:
for item in expressAddres_info:
tmp_data = item.expressAddress,
data_expressAddres.append(tmp_data)
resp["data"] = data_address
resp["expressAddres"] = data_expressAddres
return jsonify(resp)
@route_api.route("/order/address", methods=["GET", "POST"])
def address():
resp = {'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': ''}
req = request.values
nickname = req['nickname'] if 'nickname' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
mobile = req['mobile'] if 'mobile' in req else ''
id = req['id'] if 'id' in req else ''
address = req['address'] if 'address' in req else ''
weChatNum = req['weChatNum'] if 'weChatNum' in req else ''
region = req['region'] if 'region' in req else None
region_info = region.split(',')
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not nickname or len(nickname) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not mobile or len(mobile) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not region_info or len(region_info) != 3:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not address or len(address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "信息错误1"
return jsonify(resp)
if id and len(id) > 0 and int(id) > -1:
address_info = MemberAddres.query.filter_by(id=id).first()
if address_info is None:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
if address_info.member_id != member_info.id:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
elif id and int(id) == -1:
address_info = MemberAddres()
address_info.created_time = getCurrentDate()
else:
resp["code"] = -1
resp["msg"] = "信息错误"
return jsonify(resp)
app.logger.info(region_info[1])
address_info.member_id = member_info.id
address_info.nickname = nickname
address_info.mobile = mobile
address_info.weChatNum = weChatNum
address_info.province_str = region_info[0]
address_info.city_str = region_info[1]
address_info.area_str = region_info[2]
address_info.status = 1
address_info.address = address
address_info.updated_time = getCurrentDate()
db.session.add(address_info)
db.session.commit()
return jsonify(resp)
<file_sep>;
var account_index_ops = {
init: function () {
this.eventBind();
},
eventBind: function () {
var that=this;
$(".wrap_search .search").click(function () {
$(".wrap_search ").submit();
});
$(".remove").click(function () {
that.ops("remove",$(this).attr("data"));
});
$(".recover").click(function () {
that.ops("recover",$(this).attr("data"));
});
},
ops:function (act, id) {
var callback={
'ok':function () {
$.ajax({
url:common_ops.buildUrl("/account/ops"),
type: "POST",
data:{act:act,id:id},
dataType:'json',
success:function (res) {
var callback=null;
if(res.code==200){
callback=function () {
window.location.href=window.location.href;
};
}
common_ops.alert(res.msg,callback);
}
});
},
'cancel':null
};
common_ops.confirm((act=="remove"? "确定删除?":"确定修复?"),callback)
}
}
$(function () {
account_index_ops.init();
});<file_sep>SERVER_PORT = 1223
DEBUG = False
SQLALCHEMY_ECHO = False
JSON_AS_ASCII = False
AUTH_COOKIE_NAME = "app_school"
PAGE_SIZE = 10
PAGE_DISPLAY = 10
APP = {
'domain': 'http://192.168.31.51:1223'
}
STATUS_MAPPING = {
"1": "正常",
"0": "已删除"
}
STATUS_MAPPING1 = {
'0': "未认证用户",
"1": "待认证",
"-1": "黑名单",
"100": "已认证"
}
UPLOAD = {
'ext': ['jpg', 'gif', 'bmp', 'jpeg', 'png'],
'prefix_path': '/web/static/upload/member/',
'order_express_path': '/web/static/upload/order/express/',
'order_takeout_path': '/web/static/upload/order/takeout/',
'order_Help_path': '/web/static/upload/order/help/',
'order_second_path': '/web/static/upload/order/second/',
'order_commonweal_path': '/web/static/upload/order/commonweal/',
'member_url': '/static/upload/member',
'order_express_url': '/static/upload/order/express/',
'order_takeout_url': '/static/upload/order/takeout/',
'order_help_url': '/static/upload/order/help/',
'order_second_url': '/static/upload/order/second/',
'order_commonweal_url': '/static/upload/order/commonweal/',
}
# 过路URL
IGNORE_URLS = [
"^/user/login",
]
API_IGNORE_URLS = [
"^/api/member/login"
]
IGNORE_CHECK_LOGIN_URLS = [
"^/static",
"/favicon.ico"
]
APP_DATA = {
'appid': 'wxab13618034248ef6',
'appkey': '<KEY>',
'mobilekey': '<KEY>',
'mobilename': '诗言龙城'
}
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
import time
from common.libs.UrlManager import UrlManager
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.commonweal.commonweal_order import CommonwealOrder
from common.models.order.express.express_Image import ExpressImage
from common.models.member.member import Member
from sqlalchemy import or_
@route_api.route("/order/sureCommonweal", methods=["GET", "POST"])
def sureCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0, CommonwealOrder.id == id,
CommonwealOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
express_order_info.status = 4
express_order_info.success_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/recCommonweal", methods=["GET", "POST"])
def recCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0, CommonwealOrder.id == id,
CommonwealOrder.receipt_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 3
express_order_info.delivery_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteCommonweal", methods=["GET", "POST"])
def deleteCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0, CommonwealOrder.id == id,
CommonwealOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info.Balance = member_info.Balance + express_order_info.pay_price
db.session.add(member_info)
db.session.commit()
express_order_info.status = 0
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showPersonnalCommonweal", methods=["GET", "POST"])
def showPersonnalCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.id == id,
or_(CommonwealOrder.receipt_member_id == member_info.id,
CommonwealOrder.order_member_id == member_info.id)).first()
if Commonweal_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.status == 1,
ExpressImage.type_id == 0,
ExpressImage.eporder_id == Commonweal_order_info.id,
ExpressImage.eporder_sn == Commonweal_order_info.order_sn).all()
if express_image_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
addres_info = MemberAddres.query.filter(MemberAddres.status == 1,
MemberAddres.id == Commonweal_order_info.needplaceid).first()
if addres_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status != -1,
Member.id == Commonweal_order_info.receipt_member_id).first()
if Rmember_info is None and Commonweal_order_info.status != 1 and Commonweal_order_info.status != 0:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
data_image = []
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildCommonwealImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'omem': {
'name': addres_info.nickname,
'weChatNum': addres_info.weChatNum,
'oid': Commonweal_order_info.order_member_id,
'mobile': addres_info.mobile
},
'nid': Commonweal_order_info.needplaceid,
'detail': addres_info.hide_address,
'order_sn': Commonweal_order_info.order_sn,
'id': Commonweal_order_info.id,
'mid': Commonweal_order_info.order_member_id,
'rid': Commonweal_order_info.receipt_member_id,
'type_id': Commonweal_order_info.commonweal_type_id,
'pay_price': Commonweal_order_info.pay_price,
'note': Commonweal_order_info.note,
'needplace': Commonweal_order_info.needplace,
'needtime': str(Commonweal_order_info.needtime),
'Commonweal_title': Commonweal_order_info.commonweal_name,
'Commonweal_conment': Commonweal_order_info.commonweal_conment,
'data_image': data_image,
'status': Commonweal_order_info.status,
'time': {
'created_time': str(Commonweal_order_info.created_time),
'receipt_time': str(Commonweal_order_info.receipt_time),
'delivery_time': str(Commonweal_order_info.delivery_time),
'success_time': str(Commonweal_order_info.success_time)
}
}
if (Rmember_info):
tmp_data['rmem'] = {
'rid': Rmember_info.id,
'name': Rmember_info.nickname,
'weChatNum': Rmember_info.weChatNum,
'mobile': Rmember_info.mobile
}
resp["data"] = tmp_data
return jsonify(resp)
@route_api.route("/order/receiptCommonweal", methods=["GET", "POST"])
def receiptCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0, CommonwealOrder.id == id).first()
if Commonweal_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Commonweal_order_info.status = 2
Commonweal_order_info.receipt_member_id = member_info.id
Commonweal_order_info.receipt_time = getCurrentDate()
Commonweal_order_info.updated_time = getCurrentDate()
db.session.add(Commonweal_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showCommonweal", methods=["GET", "POST"])
def showCommonweal():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
ip = req['ip'] if 'ip' in req else ''
data_image = []
if id and len(id) > 0:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0,
CommonwealOrder.id == id).first()
member_info = Member.query.filter(Member.status != -1,
Member.id == Commonweal_order_info.order_member_id).first()
if Commonweal_order_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if member_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 0,
ExpressImage.status == 1,
ExpressImage.eporder_id == Commonweal_order_info.id,
ExpressImage.eporder_sn == Commonweal_order_info.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildCommonwealImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'nickname': member_info.nickname,
'avatar': member_info.avatar,
'mobile': member_info.mobile,
'type_id': Commonweal_order_info.commonweal_type_id,
'weChatNum': member_info.weChatNum,
'order_sn': Commonweal_order_info.order_sn,
'id': Commonweal_order_info.id,
'note': Commonweal_order_info.note,
'needplace': Commonweal_order_info.needplace,
'needtime': str(Commonweal_order_info.needtime),
'Commonweal_title': Commonweal_order_info.commonweal_name,
'Commonweal_conment': Commonweal_order_info.commonweal_conment,
'status': Commonweal_order_info.status,
'data_image': data_image,
}
resp["data"] = tmp_data
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0)
if ip and int(ip)-1 > -1:
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.status != 0,
CommonwealOrder.commonweal_type_id == (int(ip) - 1))
data_address = []
if Commonweal_order_info:
for item in Commonweal_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 0,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildCommonwealImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'id': item.id,
'type_id': item.commonweal_type_id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'Commonweal_title': item.commonweal_name,
'Commonweal_conment': item.commonweal_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/addCommonwealOrder", methods=["GET", "POST"])
def addCommonwealOrder():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
default_address = req['default_address'] if 'default_address' in req else ''
id = req['id'] if 'id' in req else ''
conment = req['conment'] if 'conment' in req else ''
default_addressid = req['default_addressid'] if 'default_addressid' in req else ''
title = req['title'] if 'title' in req else ''
requirement = req['requirement'] if 'requirement' in req else ''
type_id = req['type_id'] if 'type_id' in req else ''
sex = req['sex'] if 'sex' in req else None
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not type_id or len(type_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not default_address or len(default_address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not default_addressid or len(default_addressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not conment or len(conment) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not title or len(title) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if not sex or len(sex) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.order_member_id == member_info.id,
CommonwealOrder.id == id,
CommonwealOrder.status == 1).first()
if id or len(id) > 1:
if Commonweal_order_info == None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
else:
Commonweal_order_info = CommonwealOrder()
order_id = str(int(time.time() * 1000)) + str(int(time.clock() * 1000000))
Commonweal_order_info.order_member_id = member_info.id
Commonweal_order_info.order_sn = order_id
Commonweal_order_info.created_time = getCurrentDate()
resp['data'] = order_id
Commonweal_order_info.pay_price = 0
Commonweal_order_info.needplace = default_address
Commonweal_order_info.needplaceid = default_addressid
Commonweal_order_info.needtime = getCurrentDate()
Commonweal_order_info.commonweal_type_id = type_id
Commonweal_order_info.note = requirement
Commonweal_order_info.status = 1
Commonweal_order_info.commonweal_name = title
Commonweal_order_info.commonweal_conment = conment
Commonweal_order_info.commonweal_sex = sex
Commonweal_order_info.updated_time = getCurrentDate()
db.session.add(Commonweal_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteCommonwealImage", methods=["GET", "POST"])
def deleteCommonwealImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
Commonweal_orderid = req['Commonweal_orderid'] if 'Commonweal_orderid' in req else ''
imagefile = req['imagefile'] if 'imagefile' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not imagefile or len(imagefile) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.id == Commonweal_orderid,
CommonwealOrder.order_member_id == member_info.id,
CommonwealOrder.status == 1).first()
if Commonweal_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not Commonweal_orderid or len(Commonweal_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
app_config = app.config['APP']
url = app_config['domain'] + app.config['UPLOAD']['order_commonweal_url']
image_info_in = ExpressImage.query.filter(ExpressImage.eporder_id == Commonweal_order_info.id,
ExpressImage.eporder_sn == Commonweal_order_info.order_sn,
ExpressImage.type_id == 0,
ExpressImage.imageurl == imagefile.replace(url, ''),
ExpressImage.status == 1
).first()
if image_info_in == None:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if image_info_in:
image_info_in.status = 0
image_info_in.updated_time = getCurrentDate()
db.session.add(image_info_in)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/addCommonwealOrderImage", methods=["GET", "POST"])
def addCommonwealOrderImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
file_target = request.files
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
Commonweal_orderid = req['Commonweal_orderid'] if 'Commonweal_orderid' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not Commonweal_orderid or len(Commonweal_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Commonweal_order_info = CommonwealOrder.query.filter(CommonwealOrder.order_sn == Commonweal_orderid,
CommonwealOrder.order_member_id == member_info.id,
CommonwealOrder.status == 1).first()
if Commonweal_order_info is None:
resp["code"] = -1
resp["msg"] = "上传失败"
return jsonify(resp)
config_upload = app.config['UPLOAD']
if upfile:
ret = UploadService.uploadImageFile(upfile, Commonweal_orderid, config_upload['order_commonweal_path'])
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
image_info = ExpressImage()
image_info.type_id = 0
image_info.eporder_id = Commonweal_order_info.id
image_info.eporder_sn = Commonweal_orderid
image_info.imageurl = resp['url']
image_info.updated_time = getCurrentDate()
image_info.created_time = getCurrentDate()
db.session.add(image_info)
db.session.commit()
return jsonify(resp)
<file_sep># coding: utf-8
from sqlalchemy import BigInteger, Column, DateTime, Index, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class ExpressOrder(db.Model):
__tablename__ = 'express_order'
__table_args__ = (
db.Index('idx_member_id_status', 'order_member_id', 'status'),
)
id = db.Column(db.Integer, primary_key=True)
order_sn = db.Column(db.String(40), nullable=False, unique=True, server_default=db.FetchedValue())
order_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
receipt_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_price = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_sn = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
prepay_id = db.Column(db.String(128), nullable=False, server_default=db.FetchedValue())
note = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplaceid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplace = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
needtime = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
express_count = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
express_placeid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
express_place = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
express_code = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
express_sex = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
express_weight_id = db.Column(db.Integer)
express_weight = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
comment_status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
pay_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
receipt_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
delivery_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
success_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
<file_sep>##启动
* export ops_config=local|production python && python manager.py runserver<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
import time
from common.libs.UrlManager import UrlManager
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.help.help_order import HelpOrder
from common.models.order.express.express_Image import ExpressImage
from common.models.member.member import Member
from sqlalchemy import or_
@route_api.route("/order/sureHelp", methods=["GET", "POST"])
def sureHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = HelpOrder.query.filter(HelpOrder.status != 0, HelpOrder.id == id,
HelpOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status == 100,
Member.id == express_order_info.receipt_member_id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if Rmember_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info.Balance = Rmember_info.Balance + express_order_info.pay_price
express_order_info.status = 4
express_order_info.success_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
db.session.add(Rmember_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/recHelp", methods=["GET", "POST"])
def recHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = HelpOrder.query.filter(HelpOrder.status != 0, HelpOrder.id == id,
HelpOrder.receipt_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 3
express_order_info.delivery_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteHelp", methods=["GET", "POST"])
def deleteHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = HelpOrder.query.filter(HelpOrder.status != 0, HelpOrder.id == id,
HelpOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info.Balance = member_info.Balance + express_order_info.pay_price
db.session.add(member_info)
db.session.commit()
express_order_info.status = 0
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showPersonnalHelp", methods=["GET", "POST"])
def showPersonnalHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.id == id,
or_(HelpOrder.receipt_member_id == member_info.id,
HelpOrder.order_member_id == member_info.id)).first()
if Help_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.status == 1,
ExpressImage.type_id == 2,
ExpressImage.eporder_id == Help_order_info.id,
ExpressImage.eporder_sn == Help_order_info.order_sn).all()
if express_image_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
addres_info = MemberAddres.query.filter(MemberAddres.status == 1,
MemberAddres.id == Help_order_info.needplaceid).first()
if addres_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status != -1, Member.id == Help_order_info.receipt_member_id).first()
if Rmember_info is None and Help_order_info.status != 1 and Help_order_info.status != 0:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
data_image = []
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildHelpImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'omem': {
'name': addres_info.nickname,
'weChatNum': addres_info.weChatNum,
'oid': Help_order_info.order_member_id,
'mobile': addres_info.mobile
},
'sex': Help_order_info.help_sex,
'nid': Help_order_info.needplaceid,
'detail': addres_info.hide_address,
'order_sn': Help_order_info.order_sn,
'id': Help_order_info.id,
'mid': Help_order_info.order_member_id,
'rid': Help_order_info.receipt_member_id,
'pay_price': Help_order_info.pay_price,
'note': Help_order_info.note,
'needplace': Help_order_info.needplace,
'needtime': str(Help_order_info.needtime),
'Help_title': Help_order_info.help_title,
'Help_conment': Help_order_info.help_conment,
'data_image': data_image,
'status': Help_order_info.status,
'time': {
'created_time': str(Help_order_info.created_time),
'receipt_time': str(Help_order_info.receipt_time),
'delivery_time': str(Help_order_info.delivery_time),
'success_time': str(Help_order_info.success_time)
}
}
if (Rmember_info):
tmp_data['rmem'] = {
'rid': Rmember_info.id,
'name': Rmember_info.nickname,
'weChatNum': Rmember_info.weChatNum,
'mobile': Rmember_info.mobile
}
resp["data"] = tmp_data
return jsonify(resp)
@route_api.route("/order/receiptHelp", methods=["GET", "POST"])
def receiptHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.status != 0, HelpOrder.id == id).first()
if Help_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Help_order_info.status = 2
Help_order_info.receipt_member_id = member_info.id
Help_order_info.receipt_time = getCurrentDate()
Help_order_info.updated_time = getCurrentDate()
db.session.add(Help_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showHelp", methods=["GET", "POST"])
def showHelp():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
data_image = []
if id and len(id) > 0:
Help_order_info = HelpOrder.query.filter(HelpOrder.status != 0, HelpOrder.id == id).first()
member_info = Member.query.filter(Member.status != -1, Member.id == Help_order_info.order_member_id).first()
if Help_order_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if member_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.status == 1,
ExpressImage.eporder_id == Help_order_info.id,
ExpressImage.eporder_sn == Help_order_info.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildHelpImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'nickname': member_info.nickname,
'avatar': member_info.avatar,
'order_sn': Help_order_info.order_sn,
'id': Help_order_info.id,
'pay_price': Help_order_info.pay_price,
'note': Help_order_info.note,
'needplace': Help_order_info.needplace,
'needtime': str(Help_order_info.needtime),
'help_title': Help_order_info.help_title,
'help_conment': Help_order_info.help_conment,
'status': Help_order_info.status,
'sex': Help_order_info.help_sex,
'data_image': data_image,
}
resp["data"] = tmp_data
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.status != 0)
data_address = []
if Help_order_info:
for item in Help_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildHelpImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.help_sex,
'id': item.id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'needtime': str(item.needtime),
'help_title': item.help_title,
'help_conment': item.help_conment,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/addHelpOrder", methods=["GET", "POST"])
def addHelpOrder():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
default_address = req['default_address'] if 'default_address' in req else ''
id = req['id'] if 'id' in req else ''
conment = req['conment'] if 'conment' in req else ''
default_addressid = req['default_addressid'] if 'default_addressid' in req else ''
data = req['data'] if 'data' in req else ''
order_time = req['order_time'] if 'order_time' in req else ''
yun_price = req['yun_price'] if 'yun_price' in req else ''
expressCount = req['expressCount'] if 'expressCount' in req else ''
title = req['title'] if 'title' in req else ''
requirement = req['requirement'] if 'requirement' in req else ''
sex = req['sex'] if 'sex' in req else None
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not default_address or len(default_address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not default_addressid or len(default_addressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not data or len(data) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not order_time or len(order_time) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整3"
return jsonify(resp)
if not conment or len(conment) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not expressCount or len(expressCount) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
if not title or len(title) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if not sex or len(sex) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.order_member_id == member_info.id,
HelpOrder.id == id,
HelpOrder.status == 1).first()
if id or len(id) > 1:
if Help_order_info == None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
else:
if not yun_price or len(yun_price) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
Help_order_info = HelpOrder()
order_id = str(int(time.time() * 1000)) + str(int(time.clock() * 1000000))
Help_order_info.order_member_id = member_info.id
Help_order_info.order_sn = order_id
Help_order_info.pay_price = yun_price
Help_order_info.created_time = getCurrentDate()
resp['data'] = order_id
Help_order_info.needplace = default_address
Help_order_info.needplaceid = default_addressid
Help_order_info.needtime = data + " " + order_time
Help_order_info.help_count = expressCount
Help_order_info.note = requirement
Help_order_info.status = 1
Help_order_info.help_title = title
Help_order_info.help_conment = conment
Help_order_info.help_sex = sex
Help_order_info.updated_time = getCurrentDate()
db.session.add(Help_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteHelpImage", methods=["GET", "POST"])
def deleteHelpImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
Help_orderid = req['Help_orderid'] if 'Help_orderid' in req else ''
imagefile = req['imagefile'] if 'imagefile' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not imagefile or len(imagefile) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.id == Help_orderid,
HelpOrder.order_member_id == member_info.id,
HelpOrder.status == 1).first()
if Help_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not Help_orderid or len(Help_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
app_config = app.config['APP']
url = app_config['domain'] + app.config['UPLOAD']['order_help_url']
image_info_in = ExpressImage.query.filter(ExpressImage.eporder_id == Help_order_info.id,
ExpressImage.eporder_sn == Help_order_info.order_sn,
ExpressImage.type_id == 2,
ExpressImage.imageurl == imagefile.replace(url, ''),
ExpressImage.status == 1
).first()
if image_info_in == None:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if image_info_in:
image_info_in.status = 0
image_info_in.updated_time = getCurrentDate()
db.session.add(image_info_in)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/addHelpOrderImage", methods=["GET", "POST"])
def addHelpOrderImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
file_target = request.files
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
Help_orderid = req['Help_orderid'] if 'Help_orderid' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not Help_orderid or len(Help_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
Help_order_info = HelpOrder.query.filter(HelpOrder.order_sn == Help_orderid,
HelpOrder.order_member_id == member_info.id,
HelpOrder.status == 1).first()
if Help_order_info is None:
resp["code"] = -1
resp["msg"] = "上传失败"
return jsonify(resp)
config_upload = app.config['UPLOAD']
if upfile:
ret = UploadService.uploadImageFile(upfile, Help_orderid, config_upload['order_Help_path'])
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
image_info = ExpressImage()
image_info.type_id = 2
image_info.eporder_id = Help_order_info.id
image_info.eporder_sn = Help_orderid
image_info.imageurl = resp['url']
image_info.updated_time = getCurrentDate()
image_info.created_time = getCurrentDate()
db.session.add(image_info)
db.session.commit()
return jsonify(resp)
<file_sep># coding: utf-8
from sqlalchemy import BigInteger, Column, DateTime, Float, Index, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class SecondOrder(db.Model):
__tablename__ = 'second_order'
__table_args__ = (
db.Index('idx_member_id_status', 'order_member_id', 'status'),
)
id = db.Column(db.Integer, primary_key=True)
order_sn = db.Column(db.String(40, 'utf8mb4_0900_ai_ci'), nullable=False, unique=True,
server_default=db.FetchedValue())
order_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
receipt_member_id = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
original_price = db.Column(db.Float(10), nullable=False, server_default=db.FetchedValue())
pay_price = db.Column(db.BigInteger, nullable=False, server_default=db.FetchedValue())
pay_sn = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
prepay_id = db.Column(db.String(128, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
note = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplaceid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
needplace = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
needtime = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
second_count = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
second_conment = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
second_name = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
second_sex = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
second_type_id = db.Column(db.Integer)
second_go_type = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, server_default=db.FetchedValue())
comment_status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
pay_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
receipt_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
delivery_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
success_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
<file_sep>;
var account_set = {
init: function () {
this.eventBind();
},
eventBind: function () {
$(".wrap_account_set .save").click(function (){
var btn_target = $(this);
if (btn_target.hasClass("disabled")) {
common_ops.alert("正在处理,请不要重复提交");
return;
}
var nickname_target = $(".wrap_account_set input[name=nickname]");
var nickname=nickname_target.val();
var email_target = $(".wrap_account_set input[name=email]");
var email=email_target.val();
var mobile_target = $(".wrap_account_set input[name=mobile]");
var mobile=mobile_target.val();
var login_name_target = $(".wrap_account_set input[name=login_name]");
var login_name=login_name_target.val();
var login_pwd_target = $(".wrap_account_set input[name=login_pwd]");
var login_pwd=login_pwd_target.val();
if (!nickname||nickname.length<2){
common_ops.tip("请输入符合规范的昵称",nickname_target);
return false;
}
if (!mobile||mobile.length<2){
common_ops.tip("请输入符合规范的手机号码",mobile_target);
return false;
}
if (!email||email.length<2){
common_ops.tip("请输入符合规范的电子邮箱",email_target);
return false;
}
if (!login_name||login_name.length<2){
common_ops.tip("请输入符合规范的登录名",login_name_target);
return false;
}
if (!login_pwd||login_pwd.length<6){
common_ops.tip("请输入长度不少6的密码",login_pwd_target);
return false;
}
var data={
nickname:nickname,
email:email,
mobile:mobile,
login_name:login_name,
login_pwd:<PASSWORD>,
id:$(".wrap_account_set input[name=id]").val()
};
btn_target.addClass("disable");
$.ajax({
url:common_ops.buildUrl("/account/set"),
type:"POST",
data:data,
dataType:'json',
success:function (res) {
btn_target.removeClass("disabled");
var callback=null;
if(res.code==200){
callback=function () {
window.location.href=window.location.href;
};
}
common_ops.alert(res.msg,callback);
}
});
});
}
};
$(function () {
account_set.init();
});<file_sep># coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class Member(db.Model):
__tablename__ = 'member'
id = db.Column(db.Integer, primary_key=True)
nickname = db.Column(db.String(100), nullable=False, server_default=db.FetchedValue())
mobile = db.Column(db.String(11), nullable=False, server_default=db.FetchedValue())
sex = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
avatar = db.Column(db.String(200), nullable=False, server_default=db.FetchedValue())
salt = db.Column(db.String(32), nullable=False, server_default=db.FetchedValue())
reg_ip = db.Column(db.String(100), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
Balance = db.Column(db.Integer, nullable=False)
verif = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
_identity = db.Column(' identity', db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False,
server_default=db.FetchedValue())
name = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
schoolcode = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
weChatNum = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
import time
from common.libs.UrlManager import UrlManager
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.take.takeout_order import TakeoutOrder
from common.models.order.express.express_Image import ExpressImage
from common.models.member.member import Member
from sqlalchemy import or_
@route_api.route("/order/sureTakeout", methods=["GET", "POST"])
def sureTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0, TakeoutOrder.id == id,
TakeoutOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status == 100,
Member.id == express_order_info.receipt_member_id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if Rmember_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info.Balance = Rmember_info.Balance + express_order_info.pay_price
express_order_info.status = 4
express_order_info.success_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
db.session.add(Rmember_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/recTakeout", methods=["GET", "POST"])
def recTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0, TakeoutOrder.id == id,
TakeoutOrder.receipt_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 3
express_order_info.delivery_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteTakeout", methods=["GET", "POST"])
def deleteTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0, TakeoutOrder.id == id,
TakeoutOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info.Balance = member_info.Balance + express_order_info.pay_price
db.session.add(member_info)
db.session.commit()
express_order_info.status = 0
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showPersonnalTakeout", methods=["GET", "POST"])
def showPersonnalTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.id == id,
or_(TakeoutOrder.receipt_member_id == member_info.id,
TakeoutOrder.order_member_id == member_info.id)).first()
if takeout_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.status == 1,
ExpressImage.type_id == 4,
ExpressImage.eporder_id == takeout_order_info.id,
ExpressImage.eporder_sn == takeout_order_info.order_sn).all()
if express_image_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
addres_info = MemberAddres.query.filter(MemberAddres.status == 1,
MemberAddres.id == takeout_order_info.needplaceid).first()
if addres_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status != -1, Member.id == takeout_order_info.receipt_member_id).first()
if Rmember_info is None and takeout_order_info.status != 1 and takeout_order_info.status != 0:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
data_image = []
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildTakeoutImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'omem': {
'name': addres_info.nickname,
'weChatNum': addres_info.weChatNum,
'oid': takeout_order_info.order_member_id,
'mobile': addres_info.mobile
},
'sex': takeout_order_info.takeout_sex,
'nid': takeout_order_info.needplaceid,
'detail': addres_info.hide_address,
'order_sn': takeout_order_info.order_sn,
'id': takeout_order_info.id,
'mid': takeout_order_info.order_member_id,
'rid': takeout_order_info.receipt_member_id,
'pay_price': takeout_order_info.pay_price,
'note': takeout_order_info.note,
'needplace': takeout_order_info.needplace,
'Count': takeout_order_info.takeout_count,
'needtime': str(takeout_order_info.needtime),
'takeout_place': takeout_order_info.takeout_place,
'takeout_weight': takeout_order_info.takeout_weight,
'data_image': data_image,
'name': takeout_order_info.takeout_name,
'status': takeout_order_info.status,
'weight_id': takeout_order_info.takeout_weight_id,
'time': {
'created_time': str(takeout_order_info.created_time),
'receipt_time': str(takeout_order_info.receipt_time),
'delivery_time': str(takeout_order_info.delivery_time),
'success_time': str(takeout_order_info.success_time)
}
}
if (Rmember_info):
tmp_data['rmem'] = {
'rid': Rmember_info.id,
'name': Rmember_info.nickname,
'weChatNum': Rmember_info.weChatNum,
'mobile': Rmember_info.mobile
}
resp["data"] = tmp_data
return jsonify(resp)
@route_api.route("/order/receiptTakeout", methods=["GET", "POST"])
def receiptTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0, TakeoutOrder.id == id).first()
if takeout_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
takeout_order_info.status = 2
takeout_order_info.receipt_member_id = member_info.id
takeout_order_info.receipt_time = getCurrentDate()
takeout_order_info.updated_time = getCurrentDate()
db.session.add(takeout_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showTakeout", methods=["GET", "POST"])
def showTakeout():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
if id and len(id) > 0:
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0, TakeoutOrder.id == id).first()
if takeout_order_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
tmp_data = {
'order_sn': takeout_order_info.order_sn,
'id': takeout_order_info.id,
'pay_price': takeout_order_info.pay_price,
'note': takeout_order_info.note,
'needplace': takeout_order_info.needplace,
'Count': takeout_order_info.takeout_count,
'needtime': str(takeout_order_info.needtime),
'takeout_place': takeout_order_info.takeout_place,
'takeout_name': takeout_order_info.takeout_name,
'takeout_weight': takeout_order_info.takeout_weight,
'status': takeout_order_info.status,
'sex': takeout_order_info.takeout_sex,
}
resp["data"] = tmp_data
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.status != 0)
data_address = []
data_image = []
if takeout_order_info:
for item in takeout_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.type_id == 4,
ExpressImage.status == 1, ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.takeout_sex,
'id': item.id,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'pay_price': item.pay_price,
'note': item.note,
'needplace': item.needplace,
'Count': item.takeout_count,
'needtime': str(item.needtime),
'takeout_place': item.takeout_place,
'takeout_weight': item.takeout_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/addTakeoutOrder", methods=["GET", "POST"])
def addTakeoutOrder():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
default_address = req['default_address'] if 'default_address' in req else ''
id = req['id'] if 'id' in req else ''
takeout_name = req['takeout_name'] if 'takeout_name' in req else ''
default_addressid = req['default_addressid'] if 'default_addressid' in req else ''
data = req['data'] if 'data' in req else ''
order_time = req['order_time'] if 'order_time' in req else ''
yun_price = req['yun_price'] if 'yun_price' in req else ''
expressCount = req['expressCount'] if 'expressCount' in req else ''
takeoutplace = req['takeoutplace'] if 'takeoutplace' in req else ''
weight_id = req['weight_id'] if 'weight_id' in req else ''
requirement = req['requirement'] if 'requirement' in req else ''
weight = req['weight'] if 'weight' in req else ''
weight_id = req['weight_id'] if 'weight_id' in req else ''
sex = req['sex'] if 'sex' in req else None
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not default_address or len(default_address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not weight_id or len(weight_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not default_addressid or len(default_addressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not data or len(data) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
if not order_time or len(order_time) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整3"
return jsonify(resp)
if not takeout_name or len(takeout_name) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整4"
return jsonify(resp)
if not expressCount or len(expressCount) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
if not takeoutplace or len(takeoutplace) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if not weight or len(weight) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整7"
return jsonify(resp)
if not sex or len(sex) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.order_member_id == member_info.id,
TakeoutOrder.id == id,
TakeoutOrder.status == 1).first()
if id or len(id) > 1:
if takeout_order_info == None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
else:
if not yun_price or len(yun_price) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
takeout_order_info = TakeoutOrder()
order_id = str(int(time.time() * 1000)) + str(int(time.clock() * 1000000))
takeout_order_info.order_member_id = member_info.id
takeout_order_info.order_sn = order_id
takeout_order_info.pay_price = yun_price
takeout_order_info.created_time = getCurrentDate()
resp['data'] = order_id
takeout_order_info.needplace = default_address
takeout_order_info.needplaceid = default_addressid
takeout_order_info.needtime = data + " " + order_time
takeout_order_info.takeout_count = expressCount
takeout_order_info.note = requirement
takeout_order_info.status = 1
takeout_order_info.takeout_place = takeoutplace
takeout_order_info.takeout_name = takeout_name
takeout_order_info.takeout_weight = weight
takeout_order_info.takeout_weight_id = weight_id
takeout_order_info.takeout_sex = sex
takeout_order_info.updated_time = getCurrentDate()
db.session.add(takeout_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteTakeoutImage", methods=["GET", "POST"])
def deleteTakeoutImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
takeout_orderid = req['takeout_orderid'] if 'takeout_orderid' in req else ''
imagefile = req['imagefile'] if 'imagefile' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not imagefile or len(imagefile) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.id == takeout_orderid,
TakeoutOrder.order_member_id == member_info.id,
TakeoutOrder.status == 1).first()
if takeout_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整4"
return jsonify(resp)
if not takeout_orderid or len(takeout_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整5"
return jsonify(resp)
app_config = app.config['APP']
url = app_config['domain'] + app.config['UPLOAD']['order_takeout_url']
image_info_in = ExpressImage.query.filter(ExpressImage.eporder_id == takeout_order_info.id,
ExpressImage.eporder_sn == takeout_order_info.order_sn,
ExpressImage.type_id == 4,
ExpressImage.imageurl == imagefile.replace(url, ''),
ExpressImage.status == 1
).first()
if image_info_in == None:
resp["code"] = -1
resp["msg"] = "信息不完整6"
return jsonify(resp)
if image_info_in:
image_info_in.status = 0
image_info_in.updated_time = getCurrentDate()
db.session.add(image_info_in)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/addTakeoutOrderImage", methods=["GET", "POST"])
def addTakeoutOrderImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
file_target = request.files
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
takeout_orderid = req['takeout_orderid'] if 'takeout_orderid' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not takeout_orderid or len(takeout_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
takeout_order_info = TakeoutOrder.query.filter(TakeoutOrder.order_sn == takeout_orderid,
TakeoutOrder.order_member_id == member_info.id,
TakeoutOrder.status == 1).first()
if takeout_order_info is None:
resp["code"] = -1
resp["msg"] = "上传失败"
return jsonify(resp)
config_upload = app.config['UPLOAD']
if upfile:
ret = UploadService.uploadImageFile(upfile, takeout_orderid, config_upload['order_takeout_path'])
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
image_info = ExpressImage()
image_info.type_id = 4
image_info.eporder_id = takeout_order_info.id
image_info.eporder_sn = takeout_orderid
image_info.imageurl = resp['url']
image_info.updated_time = getCurrentDate()
image_info.created_time = getCurrentDate()
db.session.add(image_info)
db.session.commit()
return jsonify(resp)
<file_sep>from web.controllers.api import route_api
from flask import request, jsonify
from application import app, db
import time
from common.libs.UrlManager import UrlManager
from common.libs.Helper import getCurrentDate
from common.libs.UploadService import UploadService
from common.libs.member.Checklogin import Checklogin
from common.models.order.express.address import MemberAddres
from common.models.order.express.express_order import ExpressOrder
from common.models.order.express.express_Image import ExpressImage
from common.models.member.member import Member
from sqlalchemy import or_
@route_api.route("/order/sureExpress", methods=["GET", "POST"])
def sureExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0, ExpressOrder.id == id,
ExpressOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status == 100,
Member.id == express_order_info.receipt_member_id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if Rmember_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info.Balance = Rmember_info.Balance + express_order_info.pay_price
express_order_info.status = 4
express_order_info.success_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
db.session.add(Rmember_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/recExpress", methods=["GET", "POST"])
def recExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0, ExpressOrder.id == id,
ExpressOrder.receipt_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 3
express_order_info.delivery_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteExpress", methods=["GET", "POST"])
def deleteExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0, ExpressOrder.id == id,
ExpressOrder.order_member_id == member_info.id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info.Balance = member_info.Balance + express_order_info.pay_price
db.session.add(member_info)
db.session.commit()
express_order_info.status = 0
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showPersonnalExpress", methods=["GET", "POST"])
def showPersonnalExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.id == id,
or_(ExpressOrder.receipt_member_id == member_info.id,
ExpressOrder.order_member_id == member_info.id)).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_image_info = ExpressImage.query.filter(ExpressImage.status == 1,
ExpressImage.type_id == 3,
ExpressImage.eporder_id == express_order_info.id,
ExpressImage.eporder_sn == express_order_info.order_sn).all()
if express_image_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
addres_info = MemberAddres.query.filter(MemberAddres.status == 1,
MemberAddres.id == express_order_info.needplaceid).first()
if addres_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
Rmember_info = Member.query.filter(Member.status != -1, Member.id == express_order_info.receipt_member_id).first()
if Rmember_info is None and express_order_info.status != 1 and express_order_info.status != 0:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
data_image = []
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'omem': {
'name': addres_info.nickname,
'weChatNum': addres_info.weChatNum,
'oid': express_order_info.order_member_id,
'mobile': addres_info.mobile
},
'sex': express_order_info.express_sex,
'nid': express_order_info.needplaceid,
'detail': addres_info.hide_address,
'order_sn': express_order_info.order_sn,
'id': express_order_info.id,
'mid': express_order_info.order_member_id,
'rid': express_order_info.receipt_member_id,
'pay_price': express_order_info.pay_price,
'note': express_order_info.note,
'needplace': express_order_info.needplace,
'Count': express_order_info.express_count,
'needtime': str(express_order_info.needtime),
'express_place': express_order_info.express_place,
'express_placeid': express_order_info.express_placeid,
'express_weight': express_order_info.express_weight,
'data_image': data_image,
'status': express_order_info.status,
'weight_id': express_order_info.express_weight_id,
'time': {
'created_time': str(express_order_info.created_time),
'receipt_time': str(express_order_info.receipt_time),
'delivery_time': str(express_order_info.delivery_time),
'success_time': str(express_order_info.success_time)
}
}
if (Rmember_info):
tmp_data['rmem'] = {
'rid': Rmember_info.id,
'name': Rmember_info.nickname,
'weChatNum': Rmember_info.weChatNum,
'mobile': Rmember_info.mobile
}
resp["data"] = tmp_data
return jsonify(resp)
@route_api.route("/order/receiptExpress", methods=["GET", "POST"])
def receiptExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not id or len(id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0, ExpressOrder.id == id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
express_order_info.status = 2
express_order_info.receipt_member_id = member_info.id
express_order_info.receipt_time = getCurrentDate()
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/showExpress", methods=["GET", "POST"])
def showExpress():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
id = req['id'] if 'id' in req else ''
if id and len(id) > 0:
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0, ExpressOrder.id == id).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
tmp_data = {
'order_sn': express_order_info.order_sn,
'id': express_order_info.id,
'pay_price': express_order_info.pay_price,
'note': express_order_info.note,
'needplace': express_order_info.needplace,
'Count': express_order_info.express_count,
'needtime': str(express_order_info.needtime),
'express_place': express_order_info.express_place,
'express_weight': express_order_info.express_weight,
'status': express_order_info.status,
'sex': express_order_info.express_sex,
}
resp["data"] = tmp_data
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.status != 0)
data_address = []
data_image = []
if express_order_info:
for item in express_order_info:
express_image_info = ExpressImage.query.filter(ExpressImage.type_id == 2,
ExpressImage.status == 1,
ExpressImage.type_id == 3,
ExpressImage.eporder_id == item.id,
ExpressImage.eporder_sn == item.order_sn)
if express_image_info:
for item1 in express_image_info:
tmp_image_data = UrlManager.buildImageUrl(item1.imageurl)
data_image.append(tmp_image_data)
tmp_data = {
'order_sn': item.order_sn,
'sex': item.express_sex,
'id': item.id,
'pay_price': item.pay_price,
'note': item.note,
'mid': item.order_member_id,
'rid': item.receipt_member_id,
'needplace': item.needplace,
'Count': item.express_count,
'needtime': str(item.needtime),
'express_place': item.express_place,
'express_weight': item.express_weight,
'data_image': data_image,
'status': item.status
}
data_address.append(tmp_data)
resp["data"] = data_address
return jsonify(resp)
@route_api.route("/order/addexpressOrder", methods=["GET", "POST"])
def addexpressOrder():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
default_address = req['default_address'] if 'default_address' in req else ''
id = req['id'] if 'id' in req else ''
default_addressid = req['default_addressid'] if 'default_addressid' in req else ''
data = req['data'] if 'data' in req else ''
order_time = req['order_time'] if 'order_time' in req else ''
yun_price = req['yun_price'] if 'yun_price' in req else ''
expressCount = req['expressCount'] if 'expressCount' in req else ''
expressid = req['expressid'] if 'expressid' in req else ''
express_id = req['express_id'] if 'express_id' in req else ''
requirement = req['requirement'] if 'requirement' in req else ''
weight = req['weight'] if 'weight' in req else ''
weight_id = req['weight_id'] if 'weight_id' in req else ''
sex = req['sex'] if 'sex' in req else None
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not default_address or len(default_address) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not weight_id or len(weight_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not default_addressid or len(default_addressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not data or len(data) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not order_time or len(order_time) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not expressCount or len(expressCount) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not expressid or len(expressid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not express_id or len(express_id) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not weight or len(weight) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
if not sex or len(sex) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.order_member_id == member_info.id,
ExpressOrder.id == id,
ExpressOrder.status == 1).first()
if id or len(id) > 1:
if express_order_info == None:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
else:
if not yun_price or len(yun_price) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
express_order_info = ExpressOrder()
order_id = str(int(time.time() * 1000)) + str(int(time.clock() * 1000000))
express_order_info.order_member_id = member_info.id
express_order_info.order_sn = order_id
express_order_info.pay_price = yun_price
express_order_info.created_time = getCurrentDate()
resp['data'] = order_id
express_order_info.needplace = default_address
express_order_info.needplaceid = default_addressid
express_order_info.needtime = data + " " + order_time
express_order_info.express_count = expressCount
express_order_info.note = requirement
express_order_info.status = 1
express_order_info.express_place = expressid
express_order_info.express_placeid = express_id
express_order_info.express_weight = weight
express_order_info.express_weight_id = weight_id
express_order_info.express_sex = sex
express_order_info.updated_time = getCurrentDate()
db.session.add(express_order_info)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/deleteImage", methods=["GET", "POST"])
def deleteImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
express_orderid = req['express_orderid'] if 'express_orderid' in req else ''
imagefile = req['imagefile'] if 'imagefile' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not imagefile or len(imagefile) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
express_order_info = ExpressOrder.query.filter(ExpressOrder.id == express_orderid,
ExpressOrder.order_member_id == member_info.id,
ExpressOrder.status == 1).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "信息不完整1"
return jsonify(resp)
if not express_orderid or len(express_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整2"
return jsonify(resp)
app_config = app.config['APP']
url = app_config['domain'] + app.config['UPLOAD']['order_express_url']
image_info_in = ExpressImage.query.filter(ExpressImage.eporder_id == express_order_info.id,
ExpressImage.type_id==3,
ExpressImage.eporder_sn == express_order_info.order_sn,
ExpressImage.imageurl == imagefile.replace(url, ''),
ExpressImage.status == 1
).first()
app.logger.info(imagefile.replace(url, ''))
if image_info_in == None:
resp["code"] = -1
resp["msg"] = "信息不完整3"
return jsonify(resp)
if image_info_in:
image_info_in.status = 0
image_info_in.updated_time = getCurrentDate()
db.session.add(image_info_in)
db.session.commit()
return jsonify(resp)
@route_api.route("/order/addexpressOrderImage", methods=["GET", "POST"])
def addexpressOrderImage():
resp = {'code': 200, 'state': 'SUCCESS', 'url': '', 'title': '', 'original': '', 'msg': '', 'data': []}
file_target = request.files
req = request.values
Codeq = request.headers.get('Authorization') if 'Authorization' in request.headers else ''
upfile = file_target['upfile'] if 'upfile' in file_target else None
express_orderid = req['express_orderid'] if 'express_orderid' in req else ''
if not Codeq or len(Codeq) < 1:
resp["code"] = -1
resp["msg"] = "需要code"
return jsonify(resp)
if not express_orderid or len(express_orderid) < 1:
resp["code"] = -1
resp["msg"] = "信息不完整"
return jsonify(resp)
member_info = Checklogin.check_login(Codeq)
if member_info == False:
resp["code"] = -1
resp["msg"] = "你未注册"
return jsonify(resp)
config_upload = app.config['UPLOAD']
express_order_info = ExpressOrder.query.filter(ExpressOrder.order_sn == express_orderid,
ExpressOrder.order_member_id == member_info.id,
ExpressOrder.status == 1).first()
if express_order_info is None:
resp["code"] = -1
resp["msg"] = "上传失败"
return jsonify(resp)
if upfile:
ret = UploadService.uploadImageFile(upfile, express_orderid, config_upload['order_express_path'])
if ret['code'] != '200':
resp['state'] = '上传失败-1'
resp['msg'] = ret['msg']
return jsonify(resp)
resp['url'] = ret['data']['file_key']
image_info = ExpressImage()
image_info.type_id = 3
image_info.eporder_id = express_order_info.id
image_info.eporder_sn = express_orderid
image_info.imageurl = resp['url']
image_info.updated_time = getCurrentDate()
image_info.created_time = getCurrentDate()
db.session.add(image_info)
db.session.commit()
return jsonify(resp)
<file_sep># coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db
class ExpressImage(db.Model):
__tablename__ = 'express_Image'
id = db.Column(db.Integer, primary_key=True)
type_id = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
eporder_id = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
eporder_sn = db.Column(db.String(40), nullable=False, server_default=db.FetchedValue())
imagename = db.Column(db.String(255), nullable=False, server_default=db.FetchedValue())
status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
imageurl = db.Column(db.String(255, 'utf8_general_ci'), nullable=False, server_default=db.FetchedValue())
updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
<file_sep>;
var user_login_ops = {
init: function () {
this.eventBind();
},
eventBind: function () {
$(".login_wrap .do_login").click(function () {
var btn_target=$(this);
if (btn_target.hasClass("disabled")) {
common_ops.alert("正在处理,请不要重复提交");
return;
}
var login_name = $(".login_wrap input[name=login_name]").val();
var login_pwd = $(".login_wrap input[name=login_pwd]").val();
if (login_name == undefined ||login_name.length<1){
common_ops.alert("请输入正确的登陆用户名和密码~~~~~~");
return;
}
if (login_pwd == undefined ||login_pwd.length<1){
common_ops.alert("请输入正确的登陆用户名和密码~~~~~~");
return;
}
btn_target.addClass("disabled");
$.ajax({
url:common_ops.buildUrl("/user/login"),
type:"POST",
data:{'login_name':login_name,'login_pwd':<PASSWORD>},
dataType:'json',
success:function (res) {
btn_target.removeClass("disabled");
var callback=null;
if(res.code==200){
callback=function () {
window.location.href=common_ops.buildUrl("/");
}
}
common_ops.alert(res.msg,callback);
}
});
});
}
};
$(function () {
user_login_ops.init();
});<file_sep>from common.libs.member.MemberService import MemberService
from common.models.member.member import Member
class Checklogin():
@staticmethod
def check_login(auth_cookie):
if auth_cookie is None:
return False
auth_cookie = auth_cookie.split("#")
if len(auth_cookie) != 2:
return False
try:
member_info = Member.query.filter_by(id=auth_cookie[1]).first()
except Exception:
return False
if member_info is None:
return False
if member_info.status == -1:
return False
if auth_cookie[0] != MemberService.geneAuthCode(member_info):
return False
return member_info
|
42c3767ef9b54529dc6d6b34deafdaffbafebeff
|
[
"JavaScript",
"Python",
"Markdown"
] | 27
|
Python
|
shiyanlongcheng/order
|
f32726652a1b9cfd17a3c161d399d08f0fdeef1c
|
1a3cbd78374f0127c496dbe8afd288412f13468b
|
refs/heads/master
|
<repo_name>schoettkr/file-metadata-microservice<file_sep>/helpers/file-size.js
module.exports = (req, res) => {
if (!req.files || !req.files[0]) {
return "Error: No File found";
}
return {
name: req.files[0].originalname || 'No file name' ,
size: req.files[0].size || 0
};
}
<file_sep>/tests/file-size.js
const chai = require('chai');
const assert = chai.assert;
const fileSize = require('../helpers/file-size');
const passingTestfile = {
files: [{
originalname: '<NAME> Testfile',
size: 128
}]
}
const failingTestfile = {
files: [{
name: '<NAME> Testfile',
height: 128
}]
}
describe('file-size Helper function', () => {
it('Should return the original name of a file', () => {
assert.equal('Name of Testfile', fileSize(passingTestfile).name);
});
it('Should return the size of a file', () => {
assert.equal(128, fileSize(passingTestfile).size);
});
it('Should return a string stating that no file was found if the argument passed doesnt meet the required format', () => {
assert.equal('Error: No File found', fileSize({}));
});
it('Should return a string stating that no file name was found if the argument doesnt hold a originalname property', () => {
assert.equal('No file name', fileSize(failingTestfile).name);
});
it('Should return a filesize of 0 if theres no size property', () => {
assert.equal(0, fileSize(failingTestfile).size);
});
});
<file_sep>/controllers/file-upload.js
const fileSize = require('../helpers/file-size');
module.exports = function(req, res) {
const info = fileSize(req, res);
if (typeof info === "Object") {
res.render('size', {
message: `The file "${info.name}" consists of ${info.size} bytes`
});
} else {
res.render('size', {
message: `${info}`
});
}
// res.send(info);
};
<file_sep>/routes/file-upload.js
const express = require('express');
const router = express.Router();
const fileUpload = require('../controllers/file-upload.js')
router.post('/filesize', fileUpload);
router.get('*', (req, res) => {
res.render('index');
});
module.exports = router;
|
46d32f0dc84f07d79e8fd25671f7560ad7a3b8cc
|
[
"JavaScript"
] | 4
|
JavaScript
|
schoettkr/file-metadata-microservice
|
f33faa21680d8fb7a2f0b48d9b69ea1045d91b4a
|
b23aef8c9eab4d1591e4224293aa69e35d7c73c4
|
refs/heads/master
|
<file_sep># %%
import streamlit as st
import pandas as pd
import altair as alt
@st.cache
def get_data() -> pd.DataFrame:
"""
Gets data from the GitHub repository of the Protezione Civile
Keeps only date, region and total of cases
"""
data = pd.read_csv(
"https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv"
)
# Remove the time and just focus on the date
data["data"] = pd.to_datetime(
pd.to_datetime(data["data"]).apply(lambda x: x.date())
)
return data
def formatter(name: str) -> str:
return " ".join(name.capitalize().split("_"))
data = get_data()
st.sidebar.markdown("# Possibili visualizzazioni")
st.sidebar.markdown(
"Scegli se preferisci visualizzare il dato totale o il relativo cambiamento rispetto al giorno precedente:"
)
choice = st.sidebar.radio(
label="Possibili visualizzazioni", options=["totale", "giorno per giorno"]
)
st.title("COVID-19 in Italia")
is_log = st.checkbox(label="Scala logaritmica", value=False)
scale = alt.Scale(type="symlog") if is_log else alt.Scale(type="linear")
st.markdown("Che dato vorresti visualizzare?")
features = [
"ricoverati_con_sintomi",
"terapia_intensiva",
"totale_ospedalizzati",
"isolamento_domiciliare",
"totale_attualmente_positivi",
"nuovi_attualmente_positivi",
"dimessi_guariti",
"deceduti",
"totale_casi",
"tamponi",
]
feature = st.selectbox(
label="Scegli...", options=features, format_func=formatter, index=8
)
# %%
# TOTAL NUMBERS
if choice == "totale":
st.markdown("## Dato totale")
st.markdown("### Trend in tutta Italia")
general = data.groupby("data", as_index=False).sum()
st.altair_chart(
alt.Chart(general)
.mark_line(point=True)
.encode(
x=alt.X("data:T", title="Mese e giorno"),
y=alt.Y(f"{feature}:Q", title=formatter(feature), scale=scale),
tooltip=[
alt.Tooltip(f"{feature}", title=formatter(feature)),
alt.Tooltip("data", title="Data", type="temporal"),
],
)
.properties(width=500, height=1000)
.interactive()
)
# %%
st.markdown("### Divisione per regione")
region_options = data["denominazione_regione"].unique().tolist()
regions = st.multiselect(
label="Regioni",
options=region_options,
default=["Lombardia", "Veneto", "<NAME>", "Trento"],
)
# %%
final_all = data.groupby(["data", "denominazione_regione"], as_index=False).sum()
final = final_all[final_all["denominazione_regione"].isin(regions)]
# %%
st.altair_chart(
alt.Chart(final)
.mark_line(point=True)
.encode(
x=alt.X("data:T", title="Mese e giorno"),
y=alt.Y(f"{feature}:Q", title=formatter(feature), scale=scale),
color="denominazione_regione:N",
tooltip=[
alt.Tooltip("denominazione_regione", title="Regione"),
alt.Tooltip(f"{feature}", title=formatter(feature)),
alt.Tooltip("data", title="Data", type="temporal"),
],
)
.properties(width=500, height=1000)
.interactive()
)
else:
st.markdown("## Variazione giorno-per-giorno")
st.markdown("### Trend in tutta Italia")
general = data.groupby("data", as_index=False).sum()
general[f"{feature}"] = general[f"{feature}"].diff()
general = general.dropna()
st.altair_chart(
alt.Chart(general)
.mark_line(point=True)
.encode(
x=alt.X("data:T", title="Mese e giorno"),
y=alt.Y(f"{feature}:Q", title=formatter(feature), scale=scale),
tooltip=[
alt.Tooltip(f"{feature}", title=formatter(feature)),
alt.Tooltip("data", title="Data", type="temporal"),
],
)
.properties(width=500, height=1000)
.interactive()
)
# %%
st.markdown("### Divisione per regione")
region_options = data["denominazione_regione"].unique().tolist()
regions = st.multiselect(
label="Selectable regions",
options=region_options,
default=["Lombardia", "Veneto", "<NAME>", "Trento"],
)
# %%
final_all = data.groupby(["data", "denominazione_regione"], as_index=False).sum()
final_all = final_all[final_all["denominazione_regione"].isin(regions)]
final = []
for _, region in final_all.groupby("denominazione_regione"):
region = region.sort_values("data")
region["change"] = region[f"{feature}"].diff()
final.append(region.dropna())
final = pd.concat(final).reset_index(drop=True)
# %%
st.altair_chart(
alt.Chart(final)
.mark_line(point=True)
.encode(
x=alt.X("data:T", title="Mese e giorno"),
y=alt.Y("change:Q", title=formatter(feature), scale=scale),
color="denominazione_regione:N",
tooltip=[
alt.Tooltip("denominazione_regione", title="Region"),
alt.Tooltip("change", title=f"{formatter(feature)} giorno-per-giorno"),
alt.Tooltip(f"{feature}", title=f"{formatter(feature)} totale"),
alt.Tooltip("data", title="Data", type="temporal"),
],
)
.properties(width=500, height=1000)
.interactive()
)
<file_sep># COVID-19 in Italy
Quick streamlit dashboard to visualise the impact of COVID-19 in Italy
## Demo
Check out this [link](http://covid19italy.herokuapp.com/), it is quite a bit slow as it's hosted on Heroku's free tier
## Install and run
- Clone the repository
- `pip install -f requirements.txt`
- `streamlit run app.py`
<file_sep>altair==3.2.0
streamlit==0.48.1
pandas==1.0.0
|
1a27c562908aa47bdfa159fa7c0bca56a9d63fa5
|
[
"Markdown",
"Python",
"Text"
] | 3
|
Python
|
KnowYourNME1/covid19-italy
|
e1c5848008f543223aaf0c2301bbd8f068b434a2
|
7a3067b2603ede7d70a518b274fab7bb6c7ccee7
|
refs/heads/main
|
<repo_name>Omgandhi18/HarryPotterGameinPython<file_sep>/Harrypottergame.py
import random
import pyttsx3
from os import system
def screen_clear():
_=system('cls')
engine=pyttsx3.init('sapi5')
voices=engine.getProperty('voices')
engine.setProperty('voice',voices[1].id)
wizard="""
__ __ _ __ ___ _
\ \ / / | | \ \ / (_) | |
\ \ /\ / /__| | ___ ___ _ __ ___ ___ \ \ /\ / / _ ______ _ _ __ __| |
\ \/ \/ / _ \ |/ __/ _ \| '_ ` _ \ / _ \ \ \/ \/ / | |_ / _` | '__/ _` |
\ /\ / __/ | (_| (_) | | | | | | __/ \ /\ / | |/ / (_| | | | (_| |
\/ \/ \___|_|\___\___/|_| |_| |_|\___| \/ \/ |_/___\__,_|_| \__,_
"""
witch="""
__ __ _ __ ___ _ _
\ \ / / | | \ \ / (_) | | |
\ \ /\ / /__| | ___ ___ _ __ ___ ___ \ \ /\ / / _| |_ ___| |__
\ \/ \/ / _ \ |/ __/ _ \| '_ ` _ \ / _ \ \ \/ \/ / | | __/ __| '_ \
\ /\ / __/ | (_| (_) | | | | | | __/ \ /\ / | | || (__| | | |
\/ \/ \___|_|\___\___/|_| |_| |_|\___| \/ \/ |_|\__\___|_| |_|
"""
logo="""
__ __ ____ _____ ____ ____ ___ _____ ____ ____ __ __ ______ ____ ____ ___ ___ ___
| |__| || || | / || \ | \ | || | / || | || | / | / || | | / _]
| | | | | | |__/ || o || D )| \ | __| | | | __|| | || | | __|| o || _ _ | / [_
| | | | | | | __|| || / | D | | |_ | | | | || _ ||_| |_| | | || || \_/ || _]
| ` ' | | | | / || _ || \ | | | _] | | | |_ || | | | | | |_ || _ || | || [_
\ / | | | || | || . \| | | | | | | || | | | | | || | || | || |
\_/\_/ |____||_____||__|__||__|\_||_____| |__| |____||___,_||__|__| |__| |___,_||__|__||___|___||_____|
"""
user_win="""
____ ____ ______ __ __ ____ __ ____ ______ .__ __.
\ \ / / / __ \ | | | | \ \ / \ / / / __ \ | \ | |
\ \/ / | | | | | | | | \ \/ \/ / | | | | | \| |
\_ _/ | | | | | | | | \ / | | | | | . ` |
| | | `--' | | `--' | \ /\ / | `--' | | |\ |
|__| \______/ \______/ \__/ \__/ \______/ |__| \__|
"""
draw="""
_______ .______ ___ ____ __ ____
| \ | _ \ / \ \ \ / \ / /
| .--. || |_) | / ^ \ \ \/ \/ /
| | | || / / /_\ \ \ /
| '--' || |\ \----./ _____ \ \ /\ /
|_______/ | _| `._____/__/ \__\ \__/ \__/
"""
enemy_win="""
_______ .__ __. _______ .___ ___. ____ ____ ____ __ ____ ______ .__ __.
| ____|| \ | | | ____|| \/ | \ \ / / \ \ / \ / / / __ \ | \ | |
| |__ | \| | | |__ | \ / | \ \/ / \ \/ \/ / | | | | | \| |
| __| | . ` | | __| | |\/| | \_ _/ \ / | | | | | . ` |
| |____ | |\ | | |____ | | | | | | \ /\ / | `--' | | |\ |
|_______||__| \__| |_______||__| |__| |__| \__/ \__/ \______/ |__| \__|
"""
comp_spells_easy=["Bat-Bogey Hex","Incarcerous","Confringo","Bombarda","Expulso"
,"Petrificus Totalus","Levicorpus","Rictusempra","Sectumsempra","Stupefy","Enneverate","Episkey","Liberacorpus","Rennervate",
"Expelliarmus","Impedimenta","Langlock","Protego"]
comp_spells_hard=["Bat-Bogey Hex","Incarcerous","Confringo","Bombarda","Expulso"
,"Petrificus Totalus","Levicorpus","Rictusempra","Sectumsempra","Stupefy","Enneverate","Episkey","Liberacorpus","Rennervate",
"Expelliarmus","Impedimenta","Langlock","Protego","Imperio","Crucio","Avada-Kedavara"]
attack_spells=["Bat-Bogey Hex","Incarcerous","Confringo","Bombarda","Expulso"
,"Petrificus Totalus","Levicorpus","Rictusempra","Sectumsempra","Stupefy"
]
healing_spells=["Enneverate","Episkey","Liberacorpus","Rennervate"]
defense_spells=["Expelliarmus","Impedimenta","Langlock","Protego"]
unforgivable_curses=["Imperio","Crucio","Avada-Kedavara"]
user_health=100
comp_health=100
comp_spell=""
should_continue=True
def speak(audio):
engine.say(audio)
engine.runAndWait()
def exit_game():
global should_continue
should_continue=False
def game(name):
global comp_health
global user_health
global difficulty
damage=random.randint(1, 20)
health=random.randint(1,20)
if difficulty=="easy":
comp_spell=random.choice(comp_spells_easy)
else:
comp_spell=random.choice(comp_spells_hard)
user_spell=input("\n\nChoose a spell to fight your enemy: ").lower()
if user_spell>="0" and user_spell<="9":
print(f"\n\n{name} attacked with {attack_spells[int(user_spell)-1]}")
speak("Damage Dealt to Enemy")
comp_health-=damage
#print(comp_health)
elif user_spell>="a" and user_spell<="d":
print(f"\n\n{name} healed themselves with {user_spell}")
speak("Health Healed")
user_health+=health
#print(user_health)
if user_spell>="e"and user_spell<="h" and comp_spell in attack_spells:
print(f"\n\nEnemy attacked with {comp_spell} which {name} defended with {user_spell}")
print(f"0 Damage done to you")
speak("0 Damage Done to you")
if comp_spell in attack_spells:
print(f"\n\nEnemy attacked with {comp_spell}")
speak("Damage dealt to You")
user_health-=damage
#print(user_health)
elif comp_spell in healing_spells:
print(f"\n\nEnemy healed themselves with {comp_spell}")
speak("Damage healed by enemy")
comp_health+=health
#print(comp_health)
if comp_spell in defense_spells and user_spell>="0" and user_spell<="9":
print(f"\n\n{name} attacked with {attack_spells[int(user_spell)-1]} which the enemy defended with {comp_spell}")
print(f"\n\n0 Damage done to enemy")
speak("0 damage done to enemy")
if comp_spell=="Imperio":
user_health-=30
print(f"\n\nEnemy attacked you with the {comp_spell} Unforgivable Curse.")
speak("High Damage dealt to you")
elif comp_spell=="Crucio":
user_health-=50
print(f"\n\nEnemy attacked you with the {comp_spell} Unforgivable Curse.")
speak("High Damage dealt to you")
elif comp_spell=="Avada-Kedavara":
user_health-=80
print(f"\n\nEnemy attacked you with the {comp_spell} Unforgivable Curse.")
speak("High Damage dealt to you")
#print(comp_spell)
win(name)
def win(name):
global comp_health
global user_health
if comp_health<=0 and user_health<=0:
print(draw)
speak("Battle Draw")
comp_health=0
user_health=0
exit_game()
elif comp_health<=0 and user_health!=0:
print(user_win)
speak("You Win!!")
comp_health=0
exit_game()
elif comp_health!=0 and user_health<=0:
print(enemy_win)
speak("Enemy won!!!")
user_health=0
exit_game()
print(logo)
name=input("Enter Your Name: ")
choice=input("\n\nAre you a witch or a wizard? ").lower()
difficulty=input("Please choose a difficulty. Type 'easy' for easy difficulty and 'hard' for hard difficulty: ").lower()
if difficulty=="easy":
print("You have chosen easy difficulty, Enemy won't be able to use Unforgivable Curses.")
else:
print("You have chosen hard difficulty, Enemy will be able to use Unforgivable Curses.")
if choice=="wizard":
print(wizard)
speak("Welcome Wizard. Let's Fight....")
elif choice=="witch":
print(witch)
print(man)
speak("Welcome Witch. Let's Fight.....")
else:
print("Wrong Choice!!!")
print("Below are the instructions to play the game:")
print("\n\nEnter any key from 1 to 10 for Attack spells ")
print(attack_spells)
print("\n\nPress any key from A,B,C,D to heal yourself.")
print(healing_spells)
print("\n\nPress any key from E,F,G,H to protect/shield yourself. ")
print(defense_spells)
print("\n\nEach key contains a different spell. So don't be afraid to press different keys. ")
ch=input("\n\nReady to Play? Press 'y' to Play the game.")
screen_clear()
print(logo)
while should_continue:
game(name)
print(f"Final Health of {name}: {user_health}")
print(f"Final Health of Enemy: {comp_health}")
|
75219ab81f88dac7004cd137447d5b4a7fd460d4
|
[
"Python"
] | 1
|
Python
|
Omgandhi18/HarryPotterGameinPython
|
65b45b4dd83dee8e6b8bda1bb357ac25484918a2
|
2bfbf84dda6faee08fd26eaefbbb07b6343fc4e1
|
refs/heads/master
|
<file_sep>'use strict';
import './scss/main.scss';
import { module } from 'angular';
import { list, say } from 'cowsay-browser';
const cowsayApp = module('cowsayApp', []);
cowsayApp.controller('CowsayController', ['$log', CowsayController]);
function CowsayController($log) {
$log.debug('CowsayController');
this.title = 'Moo York!!';
this.history = [];
list((err, cowfiles) => {
this.cowfiles = cowfiles;
this.current = this.cowfiles[0];
});
this.update = (input) => {
$log.debug('cowsayCtrl.update()');
return say({ text: input || 'mooo', f: this.current });
};
this.speak = (input) => {
$log.debug('cowsayCtrl.speak()');
this.spoken = this.update(input);
this.history.push(this.spoken);
};
this.undo = () => {
$log.debug('cowsayCtrl.undo()');
this.history.pop();
this.spoken = this.history[this.history.length - 1] || '';
};
};
|
19d57cb043d8fd5c92bf994bd4166360d90f932e
|
[
"JavaScript"
] | 1
|
JavaScript
|
warlordlizard/42-component-frameworks
|
ea7c3f8a22d2d38c0f359f45a79e551a4eaedc6f
|
ca20b103e87b29ca94b3f1078c902ee1607ca4ab
|
refs/heads/master
|
<repo_name>vwagner21/Alloy-Debugger-Tool<file_sep>/debugger_randomizer.py
import sys, re
import numpy as np
def WordIndices(line, word):
indexArr = []
counter = 0
for i in line:
if i == word:
indexArr.append(line.index(i))
counter += 1
return indexArr
def randomize_Word(filepath, word, replace):
new_filepath = "randWordReplace_"+word+"_to_"+replace+".als" # name this something based on the number x
# create a new file with only one fact
new = open(new_filepath, 'w')
# open the file and read through it line by line
numWord = 0
with open(filepath, 'r') as file_object:
line = file_object.readline()
while line:
tempLine = line.split()
if word in tempLine:
numWord += 1
line = file_object.readline()
if numWord == 0:
print("Given file does not contain: "+word)
return
randLine = np.random.randint(1, numWord+1)
counter = 0
replacedLine = ""
file_object.seek(0)
line = file_object.readline()
while line:
tempLine = line.split()
if word in tempLine:
counter += 1
if counter != randLine:
new.write(line)
line = file_object.readline()
continue
# There may be multiple instances of word in a given line
indices = WordIndices(tempLine, word)
randIndex = indices[np.random.randint(len(indices))]
tempLine[randIndex] = replace
replacedLine = ' '.join(tempLine)
replacedLine += '\n'
print(line+"\twas replaced with\t" + replacedLine)
new.write(replacedLine)
line = file_object.readline()
continue
# copy every line to new file
new.write(line)
line = file_object.readline()
return
# and->or, all -> some, in -> =,
if __name__ == '__main__':
if sys.argv[1] is None:
print("Usage: /path/to/als/file")
exit()
if sys.argv[2] is None:
print("Usage: TO_REPLACE")
exit()
if sys.argv[3] is None:
print("Usage: REPLACEMENT")
exit()
# get filepath to open original uspec .als file
filepath = sys.argv[1]
randomize_Word(filepath, sys.argv[2], sys.argv[3])
<file_sep>/README.md
# Alloy Debugger Tool
<file_sep>/debugger_skeleton.py
import sys, re
import time
import shlex, subprocess
import argparse
def create_graph(alloyOut, filename):
# Create graph for current file
filename = "graph_"+filename
filename_GraphOut = filename+"_GRAPH"
fgraph = open(filename, 'w')
fgraph.write(alloyOut)
p = subprocess.Popen(["python", "checkmate/util/release-generate-graphs.py",
"-i", filename, "-c",
"checkmate_simple","-o", filename_GraphOut], stdout=subprocess.PIPE)
def create_image():
p = subprocess.Popen(["python", "checkmate/util/release-generate-images.py",
"-i", "graphs/", "-o",
"imgs/"], stdout=subprocess.PIPE)
def create_file_flip(filepath, x):
"""
Parse text at given filepath
Parameters
----------
filepath : str
Filepath for file_object to be parsed
x : int
Number of axioms in file
Returns
-------
new_filepath : str
Name of created file
"""
new_filepath = "factToPred_"+str(x)+".als" # name this something based on the number x
factName = "" # Used for out.txt
# create a new file with only one fact
new = open(new_filepath, 'w')
# open the file and read through it line by line
with open(filepath, 'r') as file_object:
counter = 0
line = file_object.readline()
while line:
if "fact" in line:
counter += 1
currentLine = line.split()
unnamedFact = True
factInd = currentLine.index('fact')
if currentLine[factInd+1] != '{':
unnamedFact = False
if counter == x:
# Replace module
if unnamedFact:
replaceStr = "pred PRED" + str(counter)
factName = replaceStr
new.write(line.replace("fact",replaceStr))
else:
new.write(line.replace("fact","pred"))
factName = currentLine[factInd+1]
line = file_object.readline()
continue
# copy every line to new file
new.write(line)
line = file_object.readline()
return new_filepath, factName
def create_file_pair(filepath, x, y):
new_filepath = "factPairs_"+str(x)+str(y)+".als" # name this something based on the number x
# create a new file with a pair of facts
new = open(new_filepath, 'w')
# open the file and read through it line by line
with open(filepath, 'r') as file_object:
counter = 0
line = file_object.readline()
while line:
if "fact" in line:
currentLine = line.split()
unnamedFact = True
factInd = currentLine.index('fact')
if currentLine[factInd+1] != '{':
unnamedFact = False
if counter != x and counter != y:
# Replace module
if unnamedFact:
replaceStr = "pred PRED" + str(counter)
counter += 1
new.write(line.replace("fact",replaceStr))
else:
new.write(line.replace("fact","pred"))
counter += 1
line = file_object.readline()
continue
counter += 1
# copy every line to new file
new.write(line)
line = file_object.readline()
return new_filepath
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Alloy Debugging Program')
parser.add_argument('-i',
metavar='InFile',
type=str,
help='The input alloy file',
required=True)
parser.add_argument('-t',
metavar='testAlloy',
type=str,
help='The alloy test instance name',
required=True)
parser.add_argument('-o',
metavar='OutFile',
type=str,
help='Where to output the file',
required=True)
parser.add_argument('-g', action='store_true', help='Enable graph output')
parser.add_argument('-p', action='store_true', help='Enable fact pairing')
args = parser.parse_args()
banner = "################################\n"
banner+= "# BEGINNING #\n"
banner+= "# DEBUGGER Program #\n"
banner+= "################################\n"
print(banner)
if args.t == None or args.o == None or args.i == None:
print("Missing args")
# get filepath to open original uspec .als file
filepath = args.i
test = args.t
fout = open(args.o, 'w') # this should be a path to an output file -- can be anything
# open the file
with open(filepath, 'r') as file_object:
# count number of instances of "fact"
allFacts = re.findall('fact', file_object.read())
n = len(allFacts)
factName = ""
if args.p:
for x in range(n+1):
for y in range(n+1):
y += 1
new_filepath = create_file_pair(filepath, x, y)
test_time_start = time.time()
p = subprocess.Popen(["java", "-cp", "org.alloytools.alloy-5.1.0/org.alloytools.alloy.dist/target/org.alloytools.alloy.dist.jar", # TODO: this should be a path to Alloy
"edu.mit.csail.sdg.alloy4whole.MainClass", "-n", "1",
"-f", new_filepath, test], stdout=subprocess.PIPE) # TODO: probably will need to run this script from same folder as original .als so that it can locate checkmate.als
out, _ = p.communicate()
if args.g:
filename = str(x)+str(y)
create_graph(out, filename)
test_time_elapsed = time.time() - test_time_start
# record results in output file
fout.write(test + ": ")
if "---INSTANCE---" in out:
fout.write(test + ", Observable, ")
else:
fout.write(test + ", Unobservable, ")
fout.write(str(test_time_elapsed) + " sec\n")
else:
# create a file for each instance
for x in range(n+1):
new_filepath, factName = create_file_flip(filepath, x)
if x == 0:
factName = "ORIGINAL FILE"
# run each file as it is created
test_time_start = time.time()
p = subprocess.Popen(["java", "-cp", "org.alloytools.alloy-5.1.0/org.alloytools.alloy.dist/target/org.alloytools.alloy.dist.jar", # TODO: this should be a path to Alloy
"edu.mit.csail.sdg.alloy4whole.MainClass", "-n", "1",
"-f", new_filepath, test], stdout=subprocess.PIPE) # TODO: probably will need to run this script from same folder as original .als so that it can locate checkmate.als
out, _ = p.communicate()
if args.g:
# Create graph for current file
filename = "graph_"+str(x)
fgraph = open(filename, 'w')
fgraph.write(out)
counter = 0
test_time_elapsed = time.time() - test_time_start
# record results in output file
fout.write(test + ": ")
if "---INSTANCE---" in out:
fout.write("(fact->pred): "+ factName + ", Instance Observable[Look here for potential bug], ")
else:
fout.write("(fact->pred): "+ factName + ", Instance Unobservable, ")
fout.write(str(test_time_elapsed) + " sec\n")
if args.g:
create_image()
fout.close()
|
73a89534822615ad1e99b0469719d2ea9e465ec7
|
[
"Markdown",
"Python"
] | 3
|
Python
|
vwagner21/Alloy-Debugger-Tool
|
d6ccbc5e897f983d517f8f4f97d3e59f63d8ab80
|
1597e813048c0813e64c01e98bf53dc885c1542a
|
refs/heads/master
|
<file_sep>---
title:"Shiny Application and Reproducible Pitch Project"
author: "suvi"
date: "May 13, 2018"
output: ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## *Itroduction*
1.This project is part of developing data products course.
2.The r presentation is generated using Rstudio.
3.The Shiny application pitched by this presentation is at
http://127.0.0.1:5084/
4. Code is available at https://github.com/sujv/Developing-Data-Product-course-project
## *What is the purpose of the Shiny app?*
The cars dataset is used to predict the distance of the car from the speed of car.
## *How The Prediction Works:*
Here we are predicting distance travelled by car from speed of the car .
We are using *Linear regression* for the prediction.
```{r cars, echo=FALSE}
summary(cars)
model<-lm(dist~speed,data=cars)
pred<-predict(model,data=cars)
pred
```
## *Give It a Try:*
The Shiny application pitched by this presentation is at
http://127.0.0.1:5084/
Code is available at https://github.com/sujv/Developing-Data-Product-course-project
<file_sep># Developing-Data-Product-course-project
The ui.R and server.R files are part of a Shiny app hosted at http://127.0.0.1:5084/
The app is a requirement of the coursera.org's [https://www.coursera.org/learn/data-products](Developing Data Products) course project.
<file_sep>#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
model<-lm(dist~speed,data=cars)
modelpred<-reactive({
speedInput<-input$SliderSpeed
predict(model,newdata=data.frame(speed=speedInput))
})
output$Plot1<-renderPlot({
speedInput<-input$SliderSpeed
# plot with the specified number of Sepallength
plot(cars$speed,cars$dist,xlab="speed of car",ylab="distance traveled by car",
bty="n",pch=16,xlim = c(1,30),ylim = c(1,150))
if(input$Showmodel){
abline(model,col="red",lw=2)
points(speedInput,modelpred(),col="blue",pch=16,cex=2)
}
})
})
|
1d33df16542cd220ba66f981241359d3aea1856a
|
[
"Markdown",
"R",
"RMarkdown"
] | 3
|
RMarkdown
|
sujv/Developing-Data-Product-course-project
|
bbf42cd60b150e2a566238cbee03d94e015e6618
|
7b5dd46f9866224ec918fb1bf87c99077af2bf02
|
refs/heads/master
|
<file_sep># Gatsby Starter Create Theme
This Gatsby starter helps you scaffold a [Gatsby theme ](https://www.gatsbyjs.org/docs/themes) connected to an example project.
This starter is inspired by [gatsby-starter-theme-workspace](https://github.com/gatsbyjs/gatsby-starter-theme-workspace), which uses [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces) to connect your theme to an example project. Instead of Yarn workspaces, this starter uses [Lerna](https://github.com/lerna/lerna) handle the coupling of your theme and example project.
## Quick Start
```bash
# connect the theme and the example site
npm run connect
# spin up the example site
cd example
npm run develop
```
If you encounter any issues with the connection between the theme and the example site:
```
npm run disconnect
npm run connect
```
This will break and re-establish the link between the theme and the example site.
## Project Structure
```text
.
├── README.md
├── gatsby-theme-minimal
│ ├── README.md
│ ├── gatsby-config.js
│ ├── index.js
│ └── package.json
├── example
│ ├── README.md
│ ├── gatsby-config.js
│ ├── package.json
│ └── src
├── package.json
└── lerna.json
```
### `gatsby-theme-basic`
This directory is home to a basic, flavorless Gatsby theme. But your big ideas are far from basic, so you'll want to rename this to `gatsby-theme-{something-better}`.
**IMPORTANT**: When you change the name of the theme directory, be sure to also change the theme name referenced in:
- `lerna.json`
- `example/package.json`
### `example`
This is an example site which uses your theme. What you see here should reflect what any user sees when they install your theme from npm.
<file_sep>module.exports = {
plugins: [
{
resolve: "gatsby-theme-basic",
options: {}
}
]
}
<file_sep># Gatsby Theme Basic - Example
This example site uses [gatsby-theme-basic](../gatsby-theme-basic/README.md).
**IMPORTANT**
When you change the name of `gatsby-theme-basic`, be sure to also update the theme's name in this example's `package.json`.
<file_sep># A Flavorless, Empty Theme
## Using the Theme
To create a new (minimal) Gatsby project which uses this theme:
```bash
mkdir my-website
cd my-website
npm init
touch gatsby-config.js
# install gatsby-theme-basic and its dependencies
npm install gatsby react react-dom gatsby-theme-basic
```
Next, add `gatsby-theme-basic` to the site's `gatsby-config.js`:
```js
module.exports = {
plugins: [
{
resolve: "gatsby-theme-basic",
options: {}
}
]
};
```
Now start the development server:
```bash
npm run develop
```
## Publishing Your Theme
After developing your theme, you may want to share it with the rest of the Gatsby community. To do so, please refer to the [Gatsby docs](https://www.gatsbyjs.org/contributing/submit-to-plugin-library/#publishing-a-plugin-to-the-library).
|
1d9ecff783fa6fdd4407da931f64487dc8c6405c
|
[
"Markdown",
"JavaScript"
] | 4
|
Markdown
|
NWRichmond/gatsby-starter-create-theme
|
831b4980cee3fcb526f2e606e0371f0ed99b1a8e
|
8cabb5c91bb69662f5f1019e61f1dafee5eed396
|
refs/heads/master
|
<repo_name>amitkr2410/IMParton<file_sep>/ReadMe.txt
IMParton v1.0
-- IMParton = I'm Parton
1. Description
This package gives parton distribution functions (PDFs) of the proton
starting from low Q^2 ~ 0.07 GeV^2, which are based on the analysis to
deep inelastic scattering data applying DGLAP equations with nonlinear
corrections. Refs. <NAME>, <NAME>, Chinese Physics C Vol. 41,
No. 5 (2017) 053103 [arXiv:1609.01831v4]; <NAME> et al, Int. J.
Mod. Phys. E 23 (2014) 1450057 [arXiv:1306.1872v2]; <NAME> et al,
Eur. Phys. J. Plus 131 (2016) 6 [arXiv:1404.0759v2].
2. Usage
The library consists of a C++ class named IMParton (read ./IMParton.h
and ./IMParton.cpp for details). IMParton has a method
IMParton::getPDF(Iparton, X, Q2), which is suggested to be called
in users' programs. Iparton set as -4, -3, -2, -1, 0, 1, 2, 3, 4
corresponds to getting cbar, sbar, dbar, ubar, gluon, u, d, s, c
quark/gluon number density distributions respectively.
The other important method of IMParton is setDataSet(int).
setDataSet(1) corresponds to use the data set A, and setDataSet(2)
corresponds to use the data set B.
We also provide methods getXUV(X, Q2), getXDV(X, Q2), getXUSea(X, Q2),
getXDSea(X, Q2), getXSSea(X, Q2), getXCSea(X, Q2) and getXGluon(X, Q2)
to get the up valence quark, down valence quark, up sea quark,
down sea quark, strange sea quark, charm sea quark and gluon distribution
functions respectively. It should be noted that the returned values
are the distributions multiplied by x, for these methods.
(up valence quark = x(u - ubar)
down valence quark = x(d - dbar)
up sea quark = x*2*ubar
down sea quark = x*2*dbar
strange sea quark = x*2*sbar
charm sea quark = x*2*cbar)
./test.cpp gives an example to get up and down valence quark distributions
at low Q^2, and sbar, gluon, dbar/ubar distributions at high Q^2.
./test.cpp can be modified as users' wants.
To run the example,
>git clone https://github.com/lukeronger/IMParton.git
>cd IMParton
>cmake .
>make
>./testIMParton
(a makefile is also provided. alternative compiling: make -f _makefile)
3. Method
We provide two data sets of PDFs obtained from the global analysis to
experimental data. Set A is from the three valence quarks non-perturbative
input, and set B is from the non-perturbative input of three valence quarks
adding flavor-asymmetric sea quarks components. This package contains two
table grids, which are ./grid_1_1_SetA.dat and ./grid_1_1_SetB.dat.
The table grids are generated in the kinematic range of 10^-6 < x < 1
and 0.125 < Q^2 < 2.68435e+08 (GeV^2). The number of the grid points is 32
for the variable Q^2 and 61 for the variable x. For PDF values in small x
region (x<10^-4), we use function form A*x^B to do interpolation. In large
x region (x>0.5), we use function form A*(1-x)^B to do the interpolation.
In middle x region (10^-4<x<0.5), we use quadratic interpolation. The PDF
values outside of the grid range are given using extrapolation method.
The sophisticated extrapolation method is expected to be effective.
4. Questions
If you have detailed questions concerning these distributions,
or if you find problems/bugs using this package, direct inquires to
<EMAIL> (<EMAIL>), <EMAIL>,
or <EMAIL>.
<file_sep>/IMParton.cpp
#include<iostream>
#include<fstream>
#include<string>
extern "C"{
#include<math.h>
}
#include "IMParton.h"
using namespace std;
//a method used to choose a data set
void IMParton::setDataSet(int dataset)
{
if(dataset==1)
{
grid = gridA;
cout<<" Using data set A."<<endl;
}
else if(dataset==2)
{
grid = gridB;
cout<<" Using data set B."<<endl;
}
else
{
cout<<"!!->Unknown data set."<<endl;
cout<<"!!->Data set should be 1 or 2"<<endl;
}
}
//return the parton distributions of different kinds at x and Q^2
double IMParton::getPDF(int Iparton, double x, double Q2) const
{
if(Iparton==-4 || Iparton==4)return getXCSea(x,Q2)/2.0/x;
else if(Iparton==-3 || Iparton==3)return getXSSea(x,Q2)/2.0/x;
else if(Iparton==-2)return getXDSea(x,Q2)/2.0/x;
else if(Iparton==2)return getXDSea(x,Q2)/2.0/x+getXDV(x,Q2)/x;
else if(Iparton==-1)return getXUSea(x,Q2)/2.0/x;
else if(Iparton==1)return getXUSea(x,Q2)/2.0/x+getXUV(x,Q2)/x;
else if(Iparton==0)return getXGluon(x,Q2)/x;
else
{
cout<<"!!->Unknown Iparton type."<<" (Iparton = "<<Iparton<<"?)"<<endl;
cout<<"!!->Iparton should be one of these: [-4,-3, ... 3, 4]"<<endl;
return 0;
}
}
//the constructor and initialization
IMParton::IMParton(unsigned int Z_temp, unsigned int A_temp)
:Z(Z_temp),A(A_temp) //Z and A are parameters for a nuclei
{
cout<<" IMParton version - 1.0"<<endl;
char filename[50];
ifstream datain;
double x, Q2;
unsigned int i, j;
xMax=61;
Q2Max=32;
flavorMax=7;
lnxstep=log(10)/((xMax-1)/6);
lnQ2step=log(2.0);
gridA = new double[Q2Max*xMax*flavorMax];
gridB = new double[Q2Max*xMax*flavorMax];
//read grid data for interpolation
//reading data set A
sprintf(filename,"grid_%d_%d_SetA.dat",1,1);
cout<<" Loading "<<filename<<endl;
datain.open(filename);
if(!datain.good())cout<<"!!->Error while opening "<<filename<<"!\n!!->grid data file not exist?"<<endl;
else
for(i=0;i<Q2Max;i++)
{
for(j=0;j<xMax;j++)
{
datain>>Q2>>x>>(*(gridA+(xMax*i+j)*7))>>(*(gridA+(xMax*i+j)*7+1))>>(*(gridA+(xMax*i+j)*7+2))>>(*(gridA+(xMax*i+j)*7+3))>>(*(gridA+(xMax*i+j)*7+4))>>(*(gridA+(xMax*i+j)*7+5))>>(*(gridA+(xMax*i+j)*7+6));
}
}
datain.close();
//reading data set B
sprintf(filename,"grid_%d_%d_SetB.dat",1,1);
cout<<" Loading "<<filename<<endl;
datain.open(filename);
if(!datain.good())cout<<"!!->Error while opening "<<filename<<"!\n!!->grid data file not exist?"<<endl;
else
for(i=0;i<Q2Max;i++)
{
for(j=0;j<xMax;j++)
{
datain>>Q2>>x>>(*(gridB+(xMax*i+j)*7+0))>>(*(gridB+(xMax*i+j)*7+1))>>(*(gridB+(xMax*i+j)*7+2))>>(*(gridB+(xMax*i+j)*7+3))>>(*(gridB+(xMax*i+j)*7+4))>>(*(gridB+(xMax*i+j)*7+5))>>(*(gridB+(xMax*i+j)*7+6));
}
}
datain.close();
//the default is set B
grid = gridB;
}
//the deconstructor
IMParton::~IMParton(void)
{
delete[] gridA;
delete[] gridB;
}
//a method which returns xuv
double IMParton::getXUV(double x, double Q2) const
{
if(Z==0)return getPDFType(2,x,Q2);
else return getPDFType(1,x,Q2);
}
//a method which returns xdv
double IMParton::getXDV(double x, double Q2) const
{
if(Z==0)return getPDFType(1,x,Q2);
else return getPDFType(2,x,Q2);
}
//a method which returns xusea
double IMParton::getXUSea(double x, double Q2) const
{
if(Z==0)return getPDFType(4,x,Q2);
else return getPDFType(3,x,Q2);
}
//a method which returns xdsea
double IMParton::getXDSea(double x, double Q2) const
{
if(Z==0)return getPDFType(3,x,Q2);
else return getPDFType(4,x,Q2);
}
//a method which returns xssea
double IMParton::getXSSea(double x, double Q2) const
{
return getPDFType(5,x,Q2);
}
//a method which returns xcsea
double IMParton::getXCSea(double x, double Q2) const
{
return getPDFType(6,x,Q2);
}
//a method which returns xgluon
double IMParton::getXGluon(double x, double Q2) const
{
return getPDFType(0,x,Q2);
}
//a method which returns different types of distributions
double IMParton::getPDFType(int Iparton, double x, double Q2) const
{
if(Iparton<0 || Iparton>6)
{
cout<<"!!->Wrong Iparton input for getPDFType(int Iparton, double x, double Q2)."<<endl;
return 0;
}
else
{
double lnx, lnQ2;
int i=(int)(lnx=log(x*1e6)/lnxstep);
int j=(int)(lnQ2=log(Q2*8)/lnQ2step);
double g0[3], g1[3], g2[3], g[3]={0};
if(i<0)i=0;
if(i>(int)(xMax-3))i=xMax-3;
if(j<0)j=0;
if(j>29)j=29;
//avoid log(1-x) calculation in below algorithm
if(x>0.9999)return 0.0;
//if x>0.5, we use A(1-x)^B to do the interpolation
else if(x>0.5 && Iparton!=6)
{
double vln1_x[2]={log(1-exp(log(1e-6)+i*lnxstep)),log(1-exp(log(1e-6)+(i+1)*lnxstep))};
g0[0]=log(grid[(xMax*j+i)*7+Iparton]);
g0[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
j++;
g1[0]=log(grid[(xMax*j+i)*7+Iparton]);
g1[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
j++;
g2[0]=log(grid[(xMax*j+i)*7+Iparton]);
g2[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
g[0]=exp(fitLinear(log(1-x),vln1_x,g0));
g[1]=exp(fitLinear(log(1-x),vln1_x,g1));
g[2]=exp(fitLinear(log(1-x),vln1_x,g2));
}
//if x<1e-5, we use A*x^B to do the interpolation
//for valance quark, B>0; for gluon and sea quark, B<0
else if(x<1e-4)
{
double vlnx[2]={(double)i,(double)(i+1)};
g0[0]=log(grid[(xMax*j+i)*7+Iparton]);
g0[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
j++;
g1[0]=log(grid[(xMax*j+i)*7+Iparton]);
g1[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
j++;
g2[0]=log(grid[(xMax*j+i)*7+Iparton]);
g2[1]=log(grid[(xMax*j+i+1)*7+Iparton]);
g[0]=exp(fitLinear(lnx,vlnx,g0));
g[1]=exp(fitLinear(lnx,vlnx,g1));
g[2]=exp(fitLinear(lnx,vlnx,g2));
}
//we use quadratic interpolation method for other situations
else
{
double vlnx[3]={(double)i,(double)(i+1),(double)(i+2)};
g0[0]=grid[(xMax*j+i)*7+Iparton];
g0[1]=grid[(xMax*j+i+1)*7+Iparton];
g0[2]=grid[(xMax*j+i+2)*7+Iparton];
j++;
g1[0]=grid[(xMax*j+i)*7+Iparton];
g1[1]=grid[(xMax*j+i+1)*7+Iparton];
g1[2]=grid[(xMax*j+i+2)*7+Iparton];
j++;
g2[0]=grid[(xMax*j+i)*7+Iparton];
g2[1]=grid[(xMax*j+i+1)*7+Iparton];
g2[2]=grid[(xMax*j+i+2)*7+Iparton];
g[0]=fitQuadratic(lnx,vlnx,g0);
g[1]=fitQuadratic(lnx,vlnx,g1);
g[2]=fitQuadratic(lnx,vlnx,g2);
}
//if Q2>1, we do the interpolation to the variable ln(Q^2)
if(Q2>1)
{
double vlnQ2[3]={(double)(j-2),(double)(j-1),(double)j};
return fitQuadratic(lnQ2,vlnQ2,g);
}
//if Q2<1, we do the interpolation to the variable Q^2
else
{
double vQ2[3]={0.125*pow(2,j-2),0.125*pow(2,j-1),0.125*pow(2,j)};
return fitQuadratic(Q2,vQ2,g);
}
}
}
//linear interpolation method
double IMParton::fitQuadratic(double x, double* px, double* pf) const
{
double f01=(pf[1]-pf[0])/(px[1]-px[0]);
double f12=(pf[2]-pf[1])/(px[2]-px[1]);
double f012=(f12-f01)/(px[2]-px[0]);
return pf[0]+f01*(x-px[0])+f012*(x-px[0])*(x-px[1]);
}
//quadratic interpolation method
double IMParton::fitLinear(double x, double* px, double* pf) const
{
double f01=(pf[1]-pf[0])/(px[1]-px[0]);
return pf[0]+f01*(x-px[0]);
}
<file_sep>/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.9)
project(test)
set(SOURCES test.cpp IMParton.cpp)
add_library(IMParton SHARED IMParton.cpp)
add_executable(testIMParton ${SOURCES})
<file_sep>/IMParton.h
#ifndef IMPARTON_H_
#define IMPARTON_H_
class IMParton
//this class is for users
{
public:
IMParton(unsigned int Z_temp=1, unsigned int A_temp=1); //constructor function, the first parameter is Z, the other is A for a nuclei
virtual void setDataSet(int); //Choose a data set, 1 is for set A and 2 is for set B
virtual double getPDF(int, double x, double Q2) const; //user function to get parton distribution functions, see ReadMe.txt for details
virtual double getXUV(double x, double Q2) const; //return x(u -ubaar)
virtual double getXDV(double x, double Q2) const; //return x(d - dbar)
virtual double getXUSea(double x, double Q2) const; //return 2x*ubar
virtual double getXDSea(double x, double Q2) const; //return 2x*dbar
virtual double getXSSea(double x, double Q2) const; //return 2x*sbar
virtual double getXCSea(double x, double Q2) const; //return 2x*cbar
virtual double getXGluon(double x, double Q2) const; //return x*gluon
virtual ~IMParton(void); //deconstructor function
private:
unsigned int xMax; //grid points number for variable x
unsigned int Q2Max; //grid points number for variable Q^2
unsigned int flavorMax; //flavor number in the grid data
double lnxstep; //step length of ln(x) for the grid data
double lnQ2step; //step length of ln(Q^2) for the grid data
unsigned int Z; //atomic number for a nuclei
unsigned int A; //mass number for a nuclei
double * grid; //grid data array
double * gridA; //data array storing data set A
double * gridB; //data array storing data set B
double fitLinear(double x, double* px, double* pf) const; //linear interpolation function
double fitQuadratic(double x, double* px, double* pf) const; //quadratic interpolation function
double getPDFType(int, double x, double Q2) const;
};
#endif
<file_sep>/test.cpp
#include<iostream>
#include<fstream>
extern "C"{
#include<math.h>
#include<time.h>
#include<unistd.h>
#include<sys/time.h>
}
#include "IMParton.h"
using namespace std;
IMParton proton(1,1); // Z=1 and A=1, which is proton.
IMParton neutron(0,1); // Z=0 and A=1, which is neutron.
int main()
{
//using data set B
proton.setDataSet(2); //1 for data set A and 2 data set B
neutron.setDataSet(2); //1 for data set A and 2 data set B
struct timeval tstart,tend;
gettimeofday(&tstart,NULL); //get the starting time
double lnxstep=(log(1)-log(0.1))/100; //step length of log(x) for output data
ofstream outdata1("proton_Q2_0.5_xuv.txt"); //output file for xuv of proton at Q^2 = 0.5 GeV^2
ofstream outdata2("neutron_Q2_0.5_xdv.txt"); //output file for xdv of neutron at Q^2 = 0.5 GeV^2
ofstream outdata3("proton_Q2_2.5_xsbar.txt"); //output file for xsbar at Q^2 = 2.5 GeV^2
ofstream outdata4("proton_Q2_10_xgluon.txt"); //output file for xgluon at Q^2 = 10 GeV^2
ofstream outdata5("proton_Q2_54_dbar_over_ubar.txt"); //output file for dbar/ubar at Q^2 = 54 GeV^2
//get the parton distribution functions
for(int i=0;i<400;i++)
{
double x = exp(log(1e-4)+i*lnxstep);
outdata1<<x<<" "<<x*(proton.getPDF(1,x,0.5)-proton.getPDF(-1,x,0.5))<<endl;
outdata2<<x<<" "<<x*(neutron.getPDF(2,x,0.5)-neutron.getPDF(-2,x,0.5))<<endl;
outdata3<<x<<" "<<x*proton.getPDF(-3,x,2.5)<<endl;
outdata4<<x<<" "<<x*proton.getPDF(0,x,10)<<endl;
outdata5<<x<<" "<<(proton.getPDF(-2,x,54)/proton.getPDF(-1,x,54))<<endl;
}
gettimeofday(&tend,NULL); //get the ending time
double timeuse=1000000*(tend.tv_sec-tstart.tv_sec)+(tend.tv_usec-tstart.tv_usec);
//display the total program running time
cout<<" Runtime : "<<(timeuse/1000.0)<<" ms."<<endl;
}
|
2871ad1dc3721c5ca2c58d546ffe4ababea5c8a0
|
[
"CMake",
"Text",
"C++"
] | 5
|
Text
|
amitkr2410/IMParton
|
4477d7e2d59df820c0d83f24d9beee6ef7ce57d7
|
ad460bf8a179beaac5970bbd3148e2446832aace
|
refs/heads/master
|
<repo_name>utaal/shiftregisters-py<file_sep>/shiftregisters/shifter.py
import time
class ShiftRegisters:
def __init__(self, **kwargs):
'''
Initialise the ShiftRegisters.
Parameters
----------
All parameters are keyword parameters.
set_output
should be a function that takes a pin number and a level (False/True)
and sets the pin to the level
ser : int
should be the pin connected to SER
srclk : int
should be the pin connected to SRCLK
rclk : int
should be the pin connected to RCLK
srclk_delay : float
... in ms
num_registers : int, optional
... (default: 1)
initial : set, optional
if provided, set pins in set to high, all other pins to low
'''
self.set_output = kwargs.get('set_output')
if self.set_output is None:
raise ValueError('set_output function is missing')
self.ser_pin = kwargs.get('ser')
if self.ser_pin is None:
raise ValueError('ser pin number is missing')
self.srclk_pin = kwargs.get('srclk')
if self.srclk_pin is None:
raise ValueError('srclk pin number is missing')
self.rclk_pin = kwargs.get('rclk')
if self.rclk_pin is None:
raise ValueError('rclk pin number is missing')
self.srclk_delay = kwargs.get('srclk_delay')
if self.srclk_delay is None:
raise ValueError('srclk_delay is missing')
self.num_registers = kwargs.get('num_registers', 1)
initial = kwargs.get('initial')
if initial is not None:
self.set_all(initial)
def set_all(self, pins):
pins = set(pins)
self.set_output(self.rclk_pin, False)
for pin in range(self.num_registers * 8 - 1, -1, -1):
self.set_output(self.srclk_pin, False)
if pin in pins:
self.set_output(self.ser_pin, True)
else:
self.set_output(self.ser_pin, False)
self.set_output(self.srclk_pin, True)
time.sleep(float(self.srclk_delay) / 1000)
self.set_output(self.rclk_pin, True)
<file_sep>/README.md
# Shift register support for GPIO-like hardware interfaces
Pins should have been initialised as "output".
```python
sr = ShiftRegisters(
set_output = lambda pin, lvl: GPIO.output(pin, GPIO.HIGH if lvl else GPIO.LOW),
ser = 17,
srclk = 27,
rclk = 22,
srclk_delay = 5)
sr.set_all({3, 5, 6})
```
<file_sep>/setup.py
from distutils.core import setup
setup(
name = 'shiftregisters',
packages = ['shiftregisters'],
version = '0.1',
description = 'Drive shift registers with GPIO-like hardware interfaces',
author = '<NAME>',
author_email = '<EMAIL>',
url = 'https://github.com/utaal/shiftregisters-py',
download_url = 'https://github.com/utaal/shiftregisters-py/archive/0.1.tar.gz',
keywords = ['gpio', 'hardware'],
classifiers = [],
)
|
67069bd0238831d4084d3c2850c2cc84b571a03a
|
[
"Markdown",
"Python"
] | 3
|
Python
|
utaal/shiftregisters-py
|
a7e7cd8c01316e42b7d4b673e9a154efd43bdecb
|
b2f902d6b71b076c7990b2fb1d836f3a595ab53b
|
refs/heads/master
|
<repo_name>djatipradana/jstore<file_sep>/src/main/java/jstore/JStore.java
package jstore;
import java.util.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
/**
* Write a description of class JStore here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class JStore {
// instance variables - replace the example below with your own
/**
* Constructor for objects of class JStore
*/
public JStore() {
// initialise instance variables
}
public static void main(String[] args)
{
SpringApplication.run(JStore.class, args);
Location location1 = new Location("Jawa Barat", "Depok", "Kota Belimbing");
try {
DatabaseSupplier.addSupplier(new Supplier("Tak","<EMAIL>", "0853243532", new Location("Jawa Barat", "Depok", "Kota Belimbing")));
//DatabaseSupplier.addSupplier(new Supplier("Tik","<EMAIL>", "0854354351", location1));
//DatabaseSupplier.addSupplier(new Supplier("Tuk","<EMAIL>", "0854353123", location1));
//DatabaseSupplier.addSupplier(new Supplier("Tak","<EMAIL>", "0853243532", location1));
} catch (SupplierAlreadyExistsException err){
System.out.println("==Supplier Already Exists===");
System.out.println(err.getExMessage());
System.out.println();
}
//DEMO
/*try {
DatabaseCustomer.addCustomer(new Customer("Djati","<EMAIL>","djati10","1234", 2019, 9, 10));
}catch (CustomerAlreadyExistsException err){
System.out.println("===Customer Already Exists===");
System.out.println(err.getExMessage());
System.out.println();
}*/
try {
DatabaseItem.addItem(new Item("Handphone", 2000, ItemCategory.Electronics, ItemStatus.New, DatabaseSupplier.getSupplier(1)));
DatabaseItem.addItem(new Item("Meja", 3000, ItemCategory.Furniture,ItemStatus.New, DatabaseSupplier.getSupplier(1)));
DatabaseItem.addItem(new Item("Televisi", 4000, ItemCategory.Electronics, ItemStatus.New, DatabaseSupplier.getSupplier(1)));
//DatabaseItem.addItem(new Item("Gemma", 1000, ItemCategory.Furniture, ItemStatus.New, DatabaseSupplier.getSupplier(1)));
} catch (ItemAlreadyExistsException err){
System.out.println("===Item Already Exists===");
System.out.println(err.getExMessage());
System.out.println();
}
}
}<file_sep>/src/main/java/jstore/Item.java
package jstore;
/**
* Kelas ini memodelkan informasi dari item secara detail seperti informasi
* mengenai item itu sendiri dan data terkait dengan supplier pada kelas Supplier
* Kelas ini memiliki variabel supplier yang mengacu pada kelas Supplier
*
* @author Djati
* @version 2019.02.28
*/
public class Item
{
// instance variables - replace the example below with your own
private int id;
private String name;
//private int stock;
private int price;
private ItemCategory category;
private ItemStatus status;
private Supplier supplier;
/**
* Constructor for objects of class Item
*/
public Item(String name, int price,ItemCategory category, ItemStatus status, Supplier supplier)
{
this.id=DatabaseItem.getLastItemID()+1;
this.name=name;
//this.stock=stock;
this.price=price;
this.category=category;
this.status=status;
this.supplier=supplier;
// initialise instance variables
}
/**
* Method untuk mendapatkan id item
* @return id item
*/
public int getId()
{
return id;
}
/**
* Method untuk mendapatkan nama item
* @return nama item
*/
public String getName()
{
return name;
}
/**
* Method untuk mendapatkan jumlah stok item
* @return jumlah stok item
*/
/* public int getStock()
{
return stock;
}*/
/**
* Method untuk mendapatkan harga item
* @return harga item
*/
public int getPrice()
{
return price;
}
/**
* Method untuk mendapatkan kategori dari item
* @return kategori dari item
*/
public ItemCategory getCategory()
{
return category;
}
public ItemStatus getStatus()
{
return status;
}
/**
* Method untuk mendapatkan supplier dari suatu item
* @return supplier dari suatu item
*/
public Supplier getSupplier()
{
return supplier;
}
/**
* Method untuk mengubah id item
* @param id id item
*/
public void setId(int id)
{
this.id=id;
}
/**
* Method untuk mengubah nama item
* @param name nama item
*/
public void setName(String name)
{
this.name=name;
}
/**
* Method untuk jumlah stok dari suatu item
* @param stock jumlah stok dari suatu item
*/
/*public void setStock(int stock)
{
this.stock=stock;
}*/
/**
* Method untuk mengubah harga item
* @param price harga item
*/
public void setPrice(int price)
{
this.price=price;
}
/**
* Method untuk mengubah kategori dari suatu item
* @param category kategori dari suatu item
*/
public void setCategory(ItemCategory category)
{
this.category=category;
}
public void setStatus(ItemStatus status)
{
this.status=status;
}
/**
* Method untuk mengubah supplier dari suatu item
* @param supplier supplier dari suatu item
*/
public void setSupplier(Supplier supplier)
{
this.supplier=supplier;
}
/**
* Method untuk mencetak nama dari suatu item
*/
public String toString()
{
return "\nId: "+id+", Name: "+name+ ", Price: " +price+ ", Category: "+category+", Status: "+status+", Supplier: "+supplier.getName();
/*
return "======ITEM=======\nId: "+id+"\nName: "+name+"\nCategory: "+category+"\nStatus: "+status+"\nSupplier: "+supplier.getName();
*/
}
}
<file_sep>/src/main/java/jstore/controller/InvoiceController.java
package jstore.controller;
import jstore.*;
import org.springframework.web.bind.annotation.*;
import javax.xml.crypto.Data;
import java.util.ArrayList;
import java.util.Calendar;
@RestController
public class InvoiceController {
@RequestMapping(value = "/invoicecustomer/{id_customer}", method = RequestMethod.GET)
public ArrayList<Invoice> invoiceCust(@PathVariable int id_customer) {
ArrayList<Invoice> invoice = null;
try {
invoice = DatabaseInvoice.getActiveOrder(DatabaseCustomer.getCustomer(id_customer));
return invoice;
} catch (CustomerDoesntHaveActiveException e) {
System.out.println(e.getExMessage());
}
return null;
}
@RequestMapping(value = "/invoices", method = RequestMethod.GET)
public ArrayList<Invoice> invoiceList() {
return DatabaseInvoice.getInvoiceDatabase();
}
@RequestMapping(value = "/invoice/{id_invoice}", method = RequestMethod.GET)
public Invoice getInvoice(@PathVariable int id_invoice) {
Invoice invoice = DatabaseInvoice.getInvoice(id_invoice);
return invoice;
}
@RequestMapping(value = "/createinvoicepaid", method = RequestMethod.POST)
public Invoice createInvoicePaid(@RequestParam(value="listItem") ArrayList<Integer> listItem,
@RequestParam(value="customerID") int customerID
){
try {
boolean tmp = DatabaseInvoice.addInvoice(new Sell_Paid(listItem, DatabaseCustomer.getCustomer(customerID)));
if (tmp == true) {
return DatabaseInvoice.getInvoice(DatabaseInvoice.getLastInvoiceID());
}
} catch (InvoiceAlreadyExistsException e) {
System.out.println(e.getExMessage());
}
return null;
}
@RequestMapping(value = "/createinvoiceunpaid", method = RequestMethod.POST)
public Invoice createInvoiceUnpaid(@RequestParam(value="listItem") ArrayList<Integer> listItem,
@RequestParam(value="customerID") int customerID
)
{
try {
boolean tmp = DatabaseInvoice.addInvoice(new Sell_Unpaid(listItem, DatabaseCustomer.getCustomer(customerID)));
if (tmp == true) {
return DatabaseInvoice.getInvoice(DatabaseInvoice.getLastInvoiceID());
}
} catch (InvoiceAlreadyExistsException e) {
System.out.println(e.getExMessage());
}
return null;
}
@RequestMapping(value = "/createinvoiceinstallment", method = RequestMethod.POST)
public Invoice createInvoiceInstallment(@RequestParam(value="listItem") ArrayList<Integer> listItem,
@RequestParam(value="installmentPeriod") int installmentPeriod,
@RequestParam(value="customerID") int customerID
)
{
try {
boolean tmp = DatabaseInvoice.addInvoice(new Sell_Installment(listItem, installmentPeriod, DatabaseCustomer.getCustomer(customerID)));
if (tmp == true) {
return DatabaseInvoice.getInvoice(DatabaseInvoice.getLastInvoiceID());
}
} catch (InvoiceAlreadyExistsException e) {
System.out.println(e.getExMessage());
}
return null;
}
@RequestMapping(value = "/canceltransaction", method = RequestMethod.POST)
public Invoice cancelTransaction(@RequestParam(value="invoiceID") int invoiceID)
{
Transaction.cancelTransaction(DatabaseInvoice.getInvoice(invoiceID));
return DatabaseInvoice.getInvoice(invoiceID);
}
@RequestMapping(value = "/finishtransaction", method = RequestMethod.POST)
public Invoice finishTransaction(@RequestParam(value="invoiceID") int invoiceID)
{
Transaction.finishTransaction(DatabaseInvoice.getInvoice(invoiceID));
return DatabaseInvoice.getInvoice(invoiceID);
}
}<file_sep>/src/main/java/jstore/Invoice.java
package jstore;
import java.util.Calendar;
import java.util.ArrayList;
/**
* Kelas ini memodelkan informasi dari suatu invoice seperti informasi mengenai
* invoice itu sendiri dan data terkait item pada kelas Item
* Kelas ini memiliki variabel item yang mengacu pada kelas Item
*
* @author Djati
* @version 2019.02.28
*/
public abstract class Invoice
{
// instance variables - replace the example below with your own
private int id;
//private Item item;
private Calendar date;
protected int totalPrice;
//private int totalItem;
private boolean isActive;
private Customer customer;
private ArrayList<Integer> item = new ArrayList<Integer>();
/**
* Constructor for objects of class Invoice
*/
public Invoice(ArrayList<Integer> item)
{
this.id=DatabaseInvoice.getLastInvoiceID()+1;
this.date = Calendar.getInstance();
this.item = item;
}
public Customer getCustomer()
{
return customer;
}
public boolean getIsActive()
{
return isActive;
}
/**
* Method untuk mendapatkan id invoice
* @return id invoice
*/
public int getId()
{
return id;
}
/**
* Method untuk mendapatkan item pada invoice
* @return informasi mengenai item pada invoice
*/
public ArrayList<Integer> getItem()
{
return item;
}
/**
* Method untuk mendapatkan tanggal invoice
* @return tanggal invoice
*/
public Calendar getDate()
{
return date;
}
/**
* Method untuk mendapatkan total price dari invoice
* @return total price dari invoice
*/
public int getTotalPrice()
{
return this.totalPrice;
}
public abstract InvoiceStatus getInvoiceStatus();
public abstract InvoiceType getInvoiceType();
public void setIsActive(boolean isActive)
{
this.isActive=isActive;
}
/**
* Method untuk mengubah id invoice
* @param id id invoice
*/
public void setId(int id)
{
this.id=id;
}
/**
* Method untuk mengubah item pada invoice
* @param item item pada invoice
*/
public void setItem(ArrayList<Integer> item)
{
this.item=item;
}
/**
* Method untuk mengubah tanggal invoice
* @param date tanggal invoice
*/
public void setDate(Calendar date)
{
this.date=date;
}
/**
* Method untuk mengubah total price dari invoice
* @param totalPrice total price dari invoice
*/
public void setTotalPrice (int totalPrice)
{
for(Integer invoice : item)
{
this.totalPrice=this.totalPrice+DatabaseItem.getItemFromID(invoice).getPrice();
}
}
public void setInvoiceStatus(InvoiceStatus status)
{
//
}
/**
* Method untuk mencetak total price dari invoice
*/
public abstract String toString();
}
<file_sep>/src/main/java/jstore/InvoiceAlreadyExistsException.java
package jstore;
import java.lang.*;
import java.io.*;
public class InvoiceAlreadyExistsException extends Exception {
private Invoice invoice_error;
public InvoiceAlreadyExistsException(Invoice invoice_input){
super("Invoice ID :");
invoice_error=invoice_input;
}
public String getExMessage(){
return super.getMessage() + invoice_error.getItem() + " already ordered by " + invoice_error.getCustomer().getUsername();
}
}
<file_sep>/src/main/java/jstore/DatabaseItem.java
package jstore;
import java.util.ArrayList;
/**
* Kelas ini memodelkan informasi dari database item yang berisi daftar item
* dan data terkait dengan item pada kelas Item
* Kelas ini memiliki variabel item yang mengacu pada kelas Item
*
* @author Djati
* @version 2019.02.28
*/
public class DatabaseItem{
private static ArrayList<Item> ITEM_DATABASE = new ArrayList<Item>();
private static int LAST_ITEM_ID=0;
public DatabaseItem()
{
}
/**
* Method untuk memastikan ada item baru yang ditambahkan
* @param item informasi mengenai item itu sendiri yang mengacu pada kelas Item
* @return nilai true
*/
public static ArrayList<Item> getItemDatabase()
{
return ITEM_DATABASE;
}
public static int getLastItemID()
{
return LAST_ITEM_ID;
}
public static boolean addItem(Item item)
throws ItemAlreadyExistsException{
for (Item itemDB : ITEM_DATABASE ) {
if(((itemDB.getName() == item.getName()) && (itemDB.getCategory() == item.getCategory()) &&
(itemDB.getSupplier() == item.getSupplier()))){
throw new ItemAlreadyExistsException(item);
// return false;
}
}
ITEM_DATABASE.add(item);
LAST_ITEM_ID = item.getId();
return true;
}
public static Item getItemFromID(int id)
{
for (Item itemDB : ITEM_DATABASE){
if (itemDB.getId() == id)
{
return itemDB;
}
}
return null;
}
public static ArrayList<Item> getItemFromSupplier(Supplier supplier)
{
ArrayList<Item> itemDB = new ArrayList<Item>();
for (Item item : ITEM_DATABASE){
if (item.getSupplier() == supplier ){
itemDB.add(item);
}
}
if (itemDB != null){
return itemDB;
}
return null;
}
public static ArrayList<Item> getItemFromCategory(ItemCategory category)
{
ArrayList<Item> itemDB = new ArrayList<Item>();
for (Item item : ITEM_DATABASE){
if (item.getCategory() == category ){
itemDB.add(item);
}
}
if (itemDB != null){
return itemDB;
}
return null;
}
public static ArrayList<Item> getItemFromStatus(ItemStatus status)
{
ArrayList<Item> itemDB = new ArrayList<Item>();
for (Item item : ITEM_DATABASE){
if (item.getStatus() == status ){
itemDB.add(item);
}
}
if (itemDB != null){
return itemDB;
}
return null;
}
public static boolean removeItem(int id)
throws ItemNotFoundException{
for(Item item : ITEM_DATABASE){
if(item.getId() == id){
ITEM_DATABASE.remove(item);
return true;
}
}
throw new ItemNotFoundException(id);
//return false;
}
}
|
b7ca994fd25cc467d96b1e06929788dd6e315d06
|
[
"Java"
] | 6
|
Java
|
djatipradana/jstore
|
3845311453dc688e8de96d9ad5dcdf633aed4f41
|
f4fe9344ebacca728e8ad014ff67e7c559ac6b81
|
refs/heads/master
|
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
if(isset($_POST['Nombres']) && isset($_POST['Apellido_1']) && isset($_POST['Apellido_2']) && isset($_POST['Correo']) && isset($_POST['Telefono']) && isset($_POST['Movil']) && isset($_POST['Curp']) && isset($_POST['Calle']) && isset($_POST['Colonia']) && isset($_POST['Num_Ext']) && isset($_POST['Num_Int']) && isset($_POST['Municipio']) )
{
require_once("../../../mvc/modelo/administracion/clase_insersiones_administracion.php");
$llamado = new insersiones_administracion();
$llamado->RegistrarDirectivo(
htmlspecialchars($_POST['Nombres'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Apellido_1'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Apellido_2'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Correo'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Telefono'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Movil'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Curp'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Calle'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Colonia'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Num_Ext'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Num_Int'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Municipio'], ENT_QUOTES, 'UTF-8')
);
}
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<div class="col-lg-2">
</div>
<br>
<h2>Registro de nuevo usuario</h2>
<br>
<?php include("../formulario_nuevo_usuario.php"); ?>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
require_once('clase_conexion.php');
require_once('yo/clase_querys_consultas.php');
function cargarUsuarios()
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultaTabla("Matricula,Nombre,Apellido,Telefono,Correo", "usuarios");
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td>".$fila['Apellido']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "</tr>";
}
}
function cargarCliente()
{
$consultas = new querys_consultas();
$filas = $consultas->Consulta_INNERJOIN_1('Matricula,Nombre,Apellido,Telefono,Correo,Alias', 'clientes', 'planes','Id', 'Id_plan');
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td>".$fila['Apellido']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Alias']."</td>";
echo "</tr>";
}
}
function cargarEntradas_Salidas()
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultarTablaDistinct('Fecha','entrada');
foreach ($filas as $fila)
{
echo "<tr>";
echo '<td> <a href="detalles.php?Fecha='.$fila['Fecha'].'">
<button type="submit" style="color: black; inline-size: 190px; text-align-last: center; block-size: 30px">
'.$fila['Fecha'].'
</button></a></td>';
echo "</tr>";
}
}
function cargarDetalles($fecha)
{
$consultas = new querys_consultas();
//$filas = $consultas->cargarDetalles($fecha);
$filas = $consultas->Consulta_INNERJOIN_2_WHERE('entrada.hora_entrada, salida.Hora_Salida, clientes.Nombre, clientes.Matricula'
,'entrada','clientes','salida','clientes.Matricula','entrada.Matricula_Cliente', 'salida.Id_entrada','entrada.Id','='
,'entrada.Fecha','2019-02-19');
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td>".$fila['hora_entrada']."</td>";
echo "<td>".$fila['Hora_Salida']."</td>";
echo "</tr>";
}
}
function cargarHoy()
{
/*$consultas = new querys_consultas();
$filas = $consultas->pre_cargarHoy();
foreach ($filas as $fila)
{
echo "paso: ".$fila['Id'];
$filass = $consultas->cargarHoy($fila['Id']);
if($filass != null)
foreach ($filass as $fil)
{
echo "<tr>";
echo "<td>".$fil['Id']."</td>";
echo "<td>".$fil['Nombre']."</td>";
//echo '<td> <a href="#"><button type="submit" style="color: black; inline-size: 190px; text-align-last: center; block-size: 30px">Registrar Salida</button></a></td>';
echo "</tr>";
}
}*/
}
?>
<file_sep><?php
session_start();
if($_SESSION)
{
if ($_SESSION['Rol'] == 'RE')
{
echo"<script> alert('no tienes los permisos necesarios'); window.location.href=\"../RE/index.php\"</script>";
}
}
else
{
echo"<script> alert('no estas logeado'); window.location.href=\"../../index.php\"</script>";
}
?><file_sep><?php
//clase para la conexion
class conexion
{
//funcion que regrsa el estado de la conexion
public function get_conexion()
{
//usuario de host para la conexion
$user="root";
//contraseña para la conexion con el host
$pass="";
//direccion del host
$host="localhost";
//nombre de la base de datos
$db="sistema_nava";
//se establece la conexion
$conexion = new PDO("mysql:host=$host; dbname=$db;",$user, $pass);
return $conexion;
}
}
?>
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
if(isset($_POST['Nombre']) && isset($_POST['Clave']) && isset($_POST['Creditos']) && isset($_POST['CreditosM']) && isset($_POST['Matricula_Coordinador']))
{
require_once("../../../mvc/modelo/administracion/clase_insersiones_administracion.php");
$llamado = new insersiones_administracion();
$llamado->RegistrarCarrera(
htmlspecialchars($_POST['Nombre'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Clave'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Creditos'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['CreditosM'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Matricula_Coordinador'], ENT_QUOTES, 'UTF-8')
);
}
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Registro de nueva carrera</h2>
<br>
<form action="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/nuevo.php" ?>" method="POST" autocomplete="OFF">
<div class="form-group">
<label for="inputCarrera" class="col-lg-1 control-label">Nombre Carrera: </label>
<div class="col-lg-4">
<input type="text" class="form-control" id="Nombre" name="Nombre" placeholder="Nombre" required>
</div>
<label for="inputClave" class="col-lg-1 control-label">Clave de la carrera:</label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Clave" name="Clave" placeholder="Clave" required>
</div>
<label for="inputCreditos" class="col-lg-1 control-label">Creditos: </label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Creditos" name="Creditos" placeholder="Creditos" required>
</div>
</div>
<hr><hr><hr>
<div class="form-group">
<label for="inputCreditosM" class="col-lg-2 control-label">Creditos minimos para realizar el servicio social:</label>
<div class="col-lg-1">
<input type="text" class="form-control" id="CreditosM" name="CreditosM" placeholder="Creditos" required>
</div>
</div>
<hr><hr><hr>
<div class="form-group">
<label for="inputCoordinador" class="col-lg-2 control-label">Coordinador designado:</label>
<div class="col-lg-4">
<select class="form-control" name= "Matricula_Coordinador">
<option value="1">Matricula - Nombre completo</option>
<?php $llamado->ConsultarCoordinador(); ?>
</select>
</div>
</div>
<hr><hr><hr><hr>
<div class="form-group">
<div class="col-lg-2">
<button type="submit" class="btn btn-primary btn-lg btn-block">Registrar</button>
</div>
<div class="col-lg-2">
<a href="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual'] ?>"><button type="button" class="btn btn-primary btn-lg btn-block">Cancelar</button></a>
</div>
</div>
</form>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep>
<form action="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/nuevo.php" ?>" method="POST" autocomplete="OFF">
<div class="form-group">
<label for="inputNombres" class="col-lg-1 control-label">Nombre(s): </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Nombres" name="Nombres" placeholder="Nombres" required>
</div>
<label for="inputApelido_1" class="col-lg-1 control-label">Apellido 1:</label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Apellido_1" name="Apellido_1" placeholder="Apellido 1" required>
</div>
<label for="inputApelido_2" class="col-lg-1 control-label">Apellido 2:</label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Apellido_2" name="Apellido_2" placeholder="Apellido 2" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCorreo" class="col-lg-1 control-label">Correo: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Correo" name="Correo" placeholder="Correo" required>
</div>
<label for="inputTelefono" class="col-lg-1 control-label">Telefono: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Telefono" name="Telefono" placeholder="Telefono" required>
</div>
<label for="inputMovil" class="col-lg-1 control-label">Movil: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Movil" name="Movil" placeholder="Movil" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCurp" class="col-lg-1 control-label">CURP: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Curp" name="Curp" placeholder="Curp" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCalle" class="col-lg-1 control-label">Calle: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Calle" name="Calle" placeholder="Calle" required>
</div>
<label for="inputColonia" class="col-lg-1 control-label">Colonia: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Colonia" name="Colonia" placeholder="Colonia" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputNum_Ext" class="col-lg-1 control-label">Numero Exterior: </label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Num_Ext" name="Num_Ext" placeholder="ej. 100" required>
</div>
<label for="inputNum_Int" class="col-lg-1 control-label">Numero Interior: </label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Num_Int" name="Num_Int" placeholder="ej. 2" required>
</div>
<label for="inputMunicipio" class="col-lg-1 control-label">Municipio: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Municipio" name="Municipio" placeholder="Municipio" required>
</div>
</div>
<hr><hr><hr><hr>
<div class="form-group">
<div class="col-lg-2">
<button type="submit" class="btn btn-primary btn-lg btn-block">Registrar</button>
</div>
<div class="col-lg-2">
<a href="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual'] ?>"><button type="button" class="btn btn-primary btn-lg btn-block">Cancelar</button></a>
</div>
</div>
</form>
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Lista de carreras</h2>
<p>
<hr>
<table style="width:100%" class="table">
<tr>
<th style="text-align-last: center">Clave</th>
<th>Nombre</th>
<th>Creditos</th>
<th>Creditos para iniciar servicios social</th>
<th>Coordinador designado</th>
</tr>
<tr>
<?php $llamado->ConsultarCarreras(); ?>
</tr>
</table>
</p>
</div>
<div class="form-group">
<div class="col-lg-2">
<a href="http://localhost/sistema_nava/pages/AD/carreras/"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>
</div>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
class redireccion
{
public function acceso_usuario($Usuario, $Password)
{
require_once('controlador/acceso_usuario.php');
$llamado = new acceso_usuario();
$llamado->personal($_POST['Usuario'],$_POST['Password']);
}
}
<file_sep><?php
class acceso_usuario
{
public function personal($Clv_Usuario, $Password)
{
require_once('clase_conexion.php');
require_once('clase_querys_consultas.php');
session_start();
$_SESSION['Ruta_web'] = "http://localhost/sistema_nava/";
$llamado = new querys_consultas();
$filas = $llamado->ConsultaTabla_WHERE_2_AND("Clv_Usuario, Rol",'usuario','Clv_Usuario',$Clv_Usuario,'Password',$Password);
if (count($filas) == 0)
{
Alumno($Clv_Usuario, $Password);
}
else
{
foreach ($filas as $fila)
{
$Rol = $fila['Rol'];
$Clv_Usuario = $fila['Clv_Usuario'];
SELF::$Rol($Clv_Usuario);
}
}
}
public function Administrador($Clv_Usuario)
{
require_once('clase_conexion.php');
require_once('clase_querys_consultas.php');
$llamado = new querys_consultas();
$filas = $llamado->ConsultaTabla_WHERE('Matricula, Nombres','administrador','Clv_Usuario', $Clv_Usuario);
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "Administrador";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/AD/");
}
public function ControlEscolar($Clv_Usuario)
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultaTabla('Nombres, Matricula','control_escolar');
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "ControlEscolar";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/CE/");
}
public function Coordinador($Clv_Usuario)
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultaTabla('Nombres, Matricula','coordinador');
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "Coordinador";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/CO/");
}
public function Directivo($Clv_Usuario)
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultaTabla('Nombres, Matricula','directivo');
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "Directivo";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/DI/");
}
public function Maestro($Clv_Usuario)
{
$consultas = new querys_consultas();
$filas = $consultas->ConsultaTabla('Nombres, Matricula','maestro');
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "Maestro";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/MA/");
}
public function Alumno($Matricula_Usuario, $Password)
{
$consulta = new querys_consultas();
$filas = $consulta->ConsultaTabla_WHERE_2_AND('Nombres, Matricula','alumno','Matricula',$Matricula_Usuario,'Password',$Password);
if (count($filas) == 0)
{
echo "<script> alert('No se encontro usuario.'); window.location.href='".$_SESSION['Ruta_web']."'; </script>";
}
else
{
foreach ($filas as $fila)
{
$_SESSION['Matricula'] = $fila['Matricula'];
$_SESSION['Nombre'] = $fila['Nombres'];
$_SESSION['Rol'] = "Alumno";
$_SESSION['ultimoAcceso']=time();
}
header("Location: pages/AL/");
}
}
}<file_sep><?php
class querys_consultas
{
public function ConsultaTabla($DatosAConsultar, $NombreTabla)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT $DatosAConsultar FROM $NombreTabla";
$statement = $conexion->prepare($sql);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
public function ConsultaTabla_WHERE($DatosAConsultar, $NombreTabla, $Campo_1, $Variable_Campo_1)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT $DatosAConsultar FROM $NombreTabla WHERE $Campo_1 = :Campo_1 ";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo_1', $Variable_Campo_1);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
public function ConsultaTabla_WHERE_2_AND($DatosAConsultar, $NombreTabla, $Campo_1, $Variable_Campo_1,$Campo_2, $Variable_Campo_2)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT $DatosAConsultar FROM $NombreTabla WHERE $Campo_1 = :Campo_1 AND $Campo_2 = :Campo_2";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo_1',$Variable_Campo_1);
$statement->bindParam(':Campo_2',$Variable_Campo_2);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
public function Consulta_INNERJOIN_1($DatosAConsultar, $NombreTabla_1, $NombreTabla_2, $DatoEmpatado_1, $DatoEmpatado_2)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT $DatosAConsultar FROM $NombreTabla_1
INNER JOIN $NombreTabla_2 ON $NombreTabla_2.$DatoEmpatado_1 = $NombreTabla_1.$DatoEmpatado_2";
$statement = $conexion->prepare($sql);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
public function Consulta_INNERJOIN_2_WHERE(
$DatoAFiltrar, $NombreTabla_1, $NombreTabla_2, $NombreTabla_3,
$DatoEmpatado_1, $DatoEmpatado_2, $DatoEmpatado_3, $DatoEmpatado_4,
$Condicion, $CampoAComparar, $ValorComparar)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT $DatoAFiltrar
FROM $NombreTabla_1
INNER JOIN $NombreTabla_2 ON $DatoEmpatado_1 = $DatoEmpatado_2
INNER JOIN $NombreTabla_3 ON $DatoEmpatado_3 = $DatoEmpatado_4
WHERE $CampoAComparar = :Campo_1";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo_1', $ValorComparar);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
public function ConsultarTablaDistinct($DatosAConsultar, $NombreTabla)
{
$rows = null;
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "SELECT DISTINCT $DatosAConsultar FROM $NombreTabla";
$statement = $conexion->prepare($sql);
$statement->execute();
while($result = $statement->fetch())
{
$rows[]=$result;
}
return $rows;
}
}
?><file_sep><?php
require_once('verificar.php');
$_SESSION['Pagina_Actual'] = 'inicio';
$Ruta_Imagenes = $_SESSION['Ruta_web'].'images/icons/';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>sistema nava</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/style.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/main.css">
<script src="<?php echo $_SESSION['Ruta_web'];?>js/jquery.min.js"></script>
<script src="<?php echo $_SESSION['Ruta_web'];?>js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Logo</a>
</div>
<?php
include('menu.php');
?>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-6 text-left">
<br>
<h2>Bienvenido <?php echo $_SESSION['Nombre']; ?></h2>
<p>
<hr>
<table class="table">
<tr>
<th><img src="<?php echo $Ruta_Imagenes."calendario.jpg" ?>" width="130" height="120"></th>
<th><img src="<?php echo $Ruta_Imagenes."entrada-salida.jpg" ?>" width="180" height="120"></th>
<th><img src="<?php echo $Ruta_Imagenes."aviso.png" ?>" width="120" height="120"></th>
</tr>
<tr>
<th>Generar evento</th>
<th>Registros entrada / salida</th>
<th>Generar Aviso</th>
</tr>
</table>
</p>
</div>
</div>
</div>
<?php
include("../../footer.php");
?>
</body>
</html>
<file_sep>-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2019 at 12:05 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sistema_nava`
--
-- --------------------------------------------------------
--
-- Table structure for table `actividad`
--
CREATE TABLE `actividad` (
`Id` int(99) NOT NULL,
`Titulo` varchar(120) NOT NULL,
`Caracteristicas` text NOT NULL,
`Archivo_Muestra` varchar(120) NOT NULL,
`Fecha_Vencimiento` date NOT NULL,
`Matricula_Maestro` int(9) NOT NULL,
`Clv_Asignatura` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `actividad_alumno`
--
CREATE TABLE `actividad_alumno` (
`Id_Actividad` int(99) NOT NULL,
`Matricula_Alumno` int(99) NOT NULL,
`Archivo_Enviado` varchar(250) NOT NULL,
`Calificacion` int(3) NOT NULL,
`Fecha_Evaluado` date NOT NULL,
`Fecha_Subido` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `administrador`
--
CREATE TABLE `administrador` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `administrador`
--
INSERT INTO `administrador` (`Matricula`, `Nombres`, `Apellido_1`, `Apellido_2`, `Correo`, `Telefono`, `Movil`, `CURP`, `Calle`, `Numero_Exterior`, `Numero_Interior`, `Colonia`, `Municipio`, `Clv_Usuario`) VALUES
(115, '<NAME>', 'nava', 'huitron', '<EMAIL>', '1234567890', '1234567890', 'NAHK970831HGRVTV08', '<NAME>', '100', '100', '<NAME>ñas', 'San Luis Potosi', 'knavahuitron');
-- --------------------------------------------------------
--
-- Table structure for table `alumno`
--
CREATE TABLE `alumno` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Password` varchar(120) NOT NULL,
`Turno` varchar(10) NOT NULL,
`Clv_Carrera` varchar(6) NOT NULL,
`Semestre` varchar(10) NOT NULL,
`Status` varchar(20) NOT NULL,
`Fecha_Registro` date NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `alumno`
--
INSERT INTO `alumno` (`Matricula`, `Nombres`, `Apellido_1`, `Apellido_2`, `Correo`, `Telefono`, `Movil`, `CURP`, `Password`, `Turno`, `Clv_Carrera`, `Semestre`, `Status`, `Fecha_Registro`, `Calle`, `Numero_Interior`, `Numero_Exterior`, `Colonia`, `Municipio`) VALUES
(4, 'kevin', 'nava', 'huitron', 'kevin@', '123', '321', 'nahl', '<PASSWORD>', 'Matutino', 'ISSC', '1', 'Activo', '2019-03-12', 'calle 1', '20', '10', 'colonia 1', 'slp'),
(5, 'jonathan', 'vargas', 'armendariz', 'jon@', '123', '123', 'VAJJ', 'jvargasarmendariz', 'Vespertino', 'ISSC', '1', 'Activo', '2019-03-12', 'CALLE 2', '40', '20', 'colonia 2', 'slp'),
(7, 'lkjl', 'kj', 'lkj', 'lj', 'lkj', 'lkj', 'lkj', 'lkjlkj', 'Matutino', 'emp', '1', 'Activo', '2019-03-19', 'jh', 'kjh', 'jkh', 'jh', 'k');
-- --------------------------------------------------------
--
-- Table structure for table `alumno_beca`
--
CREATE TABLE `alumno_beca` (
`Matricula_Alumno` int(9) NOT NULL,
`Clv_Beca` varchar(20) NOT NULL,
`Fecha_Inicio` date NOT NULL,
`Fecha_Fin` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `alumno_grupo`
--
CREATE TABLE `alumno_grupo` (
`Id` int(11) NOT NULL,
`Matricula_Alumno` int(9) NOT NULL,
`Clv_Grupo` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `asignatura`
--
CREATE TABLE `asignatura` (
`Clave` varchar(15) NOT NULL,
`Nombre` varchar(120) NOT NULL,
`Clv_Carrera` varchar(15) NOT NULL,
`Creditos` int(3) NOT NULL,
`Semestre` varchar(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `asignatura`
--
INSERT INTO `asignatura` (`Clave`, `Nombre`, `Clv_Carrera`, `Creditos`, `Semestre`) VALUES
('mat', 'mate', 'ISSC', 10, '1'),
('mat2', 'mate 2', 'ISSC', 2, '2'),
('qwe', 'adadsa', 'emp', 13, '2');
-- --------------------------------------------------------
--
-- Table structure for table `asignatura_alumno`
--
CREATE TABLE `asignatura_alumno` (
`Id` int(99) NOT NULL,
`Clv_Asignatura` varchar(15) NOT NULL,
`Matricula_Alumno` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `aviso`
--
CREATE TABLE `aviso` (
`Folio` int(11) NOT NULL,
`Titulo` varchar(256) NOT NULL,
`Descripcion` text NOT NULL,
`Fecha_Publicacion` date NOT NULL,
`Status` tinyint(1) NOT NULL,
`Matricula_Administrador` int(30) NOT NULL,
`Archivo` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `beca`
--
CREATE TABLE `beca` (
`Clave` varchar(30) NOT NULL,
`TIpo_Beca` varchar(60) NOT NULL,
`Institucion` varchar(120) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `calendario`
--
CREATE TABLE `calendario` (
`Folio` int(99) NOT NULL,
`Titulo` varchar(256) NOT NULL,
`Descripcion` text NOT NULL,
`Fecha_Inicio` date NOT NULL,
`Fecha_Fin` date NOT NULL,
`Creado` date NOT NULL,
`Status` tinyint(1) NOT NULL,
`Matricula_Administrador` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `calificacion_final`
--
CREATE TABLE `calificacion_final` (
`Folio` int(99) NOT NULL,
`Calificacion` float NOT NULL,
`Fecha` date NOT NULL,
`Asistencia` int(3) NOT NULL,
`Clv_Asignatura_Alumno` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `carrera`
--
CREATE TABLE `carrera` (
`Clave` varchar(15) NOT NULL,
`Nombre` varchar(120) NOT NULL,
`Matricula_Coordinador` int(9) NOT NULL,
`Creditos` int(3) NOT NULL,
`Creditos_Minimos_Servicio_Social` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `carrera`
--
INSERT INTO `carrera` (`Clave`, `Nombre`, `Matricula_Coordinador`, `Creditos`, `Creditos_Minimos_Servicio_Social`) VALUES
('123', 'carrea', 1, 123, 23),
('a', 'a', 1, 1, 1),
('b', 'b', 1, 1, 1),
('c', 'c', 1, 1, 1),
('car', 'carerrin', 1, 34, 34),
('d', 'b', 1, 1, 1),
('e', 'b', 1, 1, 1),
('emp', 'empresas', 1, 450, 200),
('f', 'b', 1, 1, 1),
('g', 'b', 1, 1, 1),
('h', 'b', 1, 1, 1),
('i', 'b', 1, 1, 1),
('ISSC', 'Ingenieria en software y sistemas computacionales', 1, 470, 100),
('j', 'c', 1, 1, 1),
('k', 'b', 1, 1, 1),
('l', 'b', 1, 1, 1),
('m', 'b', 1, 1, 1),
('n', 'b', 1, 1, 1),
('o', 'b', 1, 1, 1),
('p', 'b', 1, 1, 1),
('q', 'b', 1, 1, 1),
('r', 'b', 1, 1, 1),
('s', 'b', 1, 1, 1),
('t', 'b', 1, 1, 1),
('z', 'b', 1, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `control_escolar`
--
CREATE TABLE `control_escolar` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `coordinador`
--
CREATE TABLE `coordinador` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(10) NOT NULL,
`Numero_Interior` varchar(6) NOT NULL,
`Colonia` varchar(10) NOT NULL,
`Municipio` varchar(20) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `coordinador`
--
INSERT INTO `coordinador` (`Matricula`, `Nombres`, `Apellido_1`, `Apellido_2`, `Correo`, `Telefono`, `Movil`, `CURP`, `Calle`, `Numero_Exterior`, `Numero_Interior`, `Colonia`, `Municipio`, `Clv_Usuario`) VALUES
(1, 'coordinador', '2', '2', 'coordi@', '456', '654', 'coo', 'calle 2', '2', '2', 'colonia 2', 'slp', 'c22');
-- --------------------------------------------------------
--
-- Table structure for table `directivo`
--
CREATE TABLE `directivo` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `directivo`
--
INSERT INTO `directivo` (`Matricula`, `Nombres`, `Apellido_1`, `Apellido_2`, `Correo`, `Telefono`, `Movil`, `CURP`, `Calle`, `Numero_Exterior`, `Numero_Interior`, `Colonia`, `Municipio`, `Clv_Usuario`) VALUES
(9, 'directivo', 'directivo', 'directivo', 'kjlk', 'jkl', 'jl', 'kj', 'lkj', 'lkj', 'lkj', 'lkj', 'lk', 'ddirectivodirectivo'),
(18, 'directivo', 'directivo', 'directivo', 'jkh', 'kjhj', 'kh', 'kjh', 'kjh', 'kjh', 'kj', 'kjh', 'hkj', 'ddirectivodirectivo38');
-- --------------------------------------------------------
--
-- Table structure for table `entrada_alumno`
--
CREATE TABLE `entrada_alumno` (
`Id` int(11) NOT NULL,
`Fecha` date NOT NULL,
`Hora` time NOT NULL,
`Matricula_Alumno` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `entrada_personal`
--
CREATE TABLE `entrada_personal` (
`Id` int(99) NOT NULL,
`Fecha` date NOT NULL,
`Hora` time NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `entrega_periodo`
--
CREATE TABLE `entrega_periodo` (
`Id_Maestro_Grupo_Asignatura` int(99) NOT NULL,
`Fecha_Inicio` date NOT NULL,
`Fecha_Fin` int(11) NOT NULL,
`TIpo_Parcial` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `grupo`
--
CREATE TABLE `grupo` (
`Clv_Grupo` varchar(15) NOT NULL,
`Semestre` varchar(2) NOT NULL,
`Clv_Carrera` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `libreria`
--
CREATE TABLE `libreria` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `libro`
--
CREATE TABLE `libro` (
`Folio` int(99) NOT NULL,
`Titulo` varchar(120) NOT NULL,
`Autor` varchar(250) NOT NULL,
`Editorial` varchar(130) NOT NULL,
`Disponibilidad_FIsico` int(9) NOT NULL,
`Imagen_Url` varchar(250) NOT NULL,
`Libro_Url` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `libro_alumno`
--
CREATE TABLE `libro_alumno` (
`Id` int(99) NOT NULL,
`Folio_Libro` int(9) NOT NULL,
`Matricula_Alumno` int(99) NOT NULL,
`Fecha_Salida` date NOT NULL,
`Hora_Salida` time NOT NULL,
`Fecha_Devolucion` date NOT NULL,
`Hora_Devolucion` time NOT NULL,
`Status` tinyint(1) NOT NULL,
`Matricula_Libreria` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `libro_personal`
--
CREATE TABLE `libro_personal` (
`Id` int(9) NOT NULL,
`Folio_Libro` int(9) NOT NULL,
`Clv_Personal` varchar(30) NOT NULL,
`Fecha_Salida` date NOT NULL,
`Hora_Salida` time NOT NULL,
`Fecha_Devolucion` date NOT NULL,
`Hora_Devolucion` time NOT NULL,
`Status` tinyint(1) NOT NULL,
`Matricula_Libreria` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `maestro`
--
CREATE TABLE `maestro` (
`Matricula` int(9) NOT NULL,
`Nombres` varchar(30) NOT NULL,
`Apellido_1` varchar(20) NOT NULL,
`Apellido_2` varchar(20) NOT NULL,
`Correo` varchar(60) NOT NULL,
`Telefono` varchar(12) NOT NULL,
`Movil` varchar(12) NOT NULL,
`CURP` varchar(18) NOT NULL,
`Calle` varchar(120) NOT NULL,
`Numero_Exterior` varchar(5) NOT NULL,
`Numero_Interior` varchar(5) NOT NULL,
`Colonia` varchar(60) NOT NULL,
`Municipio` varchar(60) NOT NULL,
`Clv_Usuario` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `maestro_asignatura`
--
CREATE TABLE `maestro_asignatura` (
`Id` int(11) NOT NULL,
`Clv_Asignatura` varchar(15) NOT NULL,
`Matricula_Maestro` int(9) NOT NULL,
`Fecha_Inicio` date NOT NULL,
`Fecha_Fin` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `maestro_grupo_asignatura`
--
CREATE TABLE `maestro_grupo_asignatura` (
`Id` int(11) NOT NULL,
`Matricula_Maestro` int(9) NOT NULL,
`Clv_Grupo` varchar(15) NOT NULL,
`Clv_Asignatura` varchar(15) NOT NULL,
`Fecha_Inicio` date NOT NULL,
`Fecha_Fin` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `parcial_1`
--
CREATE TABLE `parcial_1` (
`Folio` int(99) NOT NULL,
`Calificacion` float NOT NULL,
`Fecha` date NOT NULL,
`Asistencia` int(3) NOT NULL,
`Clv_Asignatura_Alumno` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `parcial_2`
--
CREATE TABLE `parcial_2` (
`Folio` int(99) NOT NULL,
`Calificacion` float NOT NULL,
`Fecha` date NOT NULL,
`Asistencia` int(3) NOT NULL,
`Clv_Asignatura_Alumno` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `parcial_3`
--
CREATE TABLE `parcial_3` (
`Folio` int(99) NOT NULL,
`Calificacion` float NOT NULL,
`Fecha` date NOT NULL,
`Asistencia` int(3) NOT NULL,
`Clv_Asignatura_Alumno` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `salida_alumno`
--
CREATE TABLE `salida_alumno` (
`Id` int(11) NOT NULL,
`Fecha` date NOT NULL,
`Hora` time NOT NULL,
`Id_Entrada` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `salida_personal`
--
CREATE TABLE `salida_personal` (
`Id` int(99) NOT NULL,
`Fecha` date NOT NULL,
`Hora` time NOT NULL,
`Id_Entrada` int(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `usuario`
--
CREATE TABLE `usuario` (
`Clv_Usuario` varchar(30) NOT NULL,
`Password` varchar(120) NOT NULL,
`Rol` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `usuario`
--
INSERT INTO `usuario` (`Clv_Usuario`, `Password`, `Rol`) VALUES
('c22', 'c22', 'Coordinador'),
('ddirectivodirectivo', '<PASSWORD>ivo', 'Directivo'),
('ddirectivodirectivo38', 'ddirectivodirectivo38', 'Directivo'),
('knavahuitron', 'knavahuitron', 'Administrador');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `actividad`
--
ALTER TABLE `actividad`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Maestro` (`Matricula_Maestro`),
ADD KEY `Clv_Asignatura` (`Clv_Asignatura`);
--
-- Indexes for table `actividad_alumno`
--
ALTER TABLE `actividad_alumno`
ADD KEY `Id_Actividad` (`Id_Actividad`),
ADD KEY `Matricula_Alumno` (`Matricula_Alumno`);
--
-- Indexes for table `administrador`
--
ALTER TABLE `administrador`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `alumno`
--
ALTER TABLE `alumno`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Carrera` (`Clv_Carrera`);
--
-- Indexes for table `alumno_beca`
--
ALTER TABLE `alumno_beca`
ADD KEY `Clv_Beca` (`Clv_Beca`),
ADD KEY `Clv_Alumno` (`Matricula_Alumno`);
--
-- Indexes for table `alumno_grupo`
--
ALTER TABLE `alumno_grupo`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Alumno` (`Matricula_Alumno`),
ADD KEY `Clv_Grupo` (`Clv_Grupo`);
--
-- Indexes for table `asignatura`
--
ALTER TABLE `asignatura`
ADD PRIMARY KEY (`Clave`),
ADD KEY `Clv_Carrera` (`Clv_Carrera`);
--
-- Indexes for table `asignatura_alumno`
--
ALTER TABLE `asignatura_alumno`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Alumno` (`Matricula_Alumno`),
ADD KEY `Clv_Asignatura` (`Clv_Asignatura`);
--
-- Indexes for table `aviso`
--
ALTER TABLE `aviso`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Administrador` (`Matricula_Administrador`);
--
-- Indexes for table `beca`
--
ALTER TABLE `beca`
ADD PRIMARY KEY (`Clave`);
--
-- Indexes for table `calendario`
--
ALTER TABLE `calendario`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Administrador` (`Matricula_Administrador`);
--
-- Indexes for table `calificacion_final`
--
ALTER TABLE `calificacion_final`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Asignatura_Alumno` (`Clv_Asignatura_Alumno`);
--
-- Indexes for table `carrera`
--
ALTER TABLE `carrera`
ADD PRIMARY KEY (`Clave`),
ADD KEY `Clv_Coordinador` (`Matricula_Coordinador`);
--
-- Indexes for table `control_escolar`
--
ALTER TABLE `control_escolar`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `coordinador`
--
ALTER TABLE `coordinador`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `directivo`
--
ALTER TABLE `directivo`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `entrada_alumno`
--
ALTER TABLE `entrada_alumno`
ADD PRIMARY KEY (`Id`),
ADD KEY `Matricula_Alumno` (`Matricula_Alumno`);
--
-- Indexes for table `entrada_personal`
--
ALTER TABLE `entrada_personal`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `entrega_periodo`
--
ALTER TABLE `entrega_periodo`
ADD KEY `Clv_Maestro_Grupo` (`Id_Maestro_Grupo_Asignatura`);
--
-- Indexes for table `grupo`
--
ALTER TABLE `grupo`
ADD PRIMARY KEY (`Clv_Grupo`),
ADD KEY `Clv_Carrera` (`Clv_Carrera`);
--
-- Indexes for table `libreria`
--
ALTER TABLE `libreria`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `libro`
--
ALTER TABLE `libro`
ADD PRIMARY KEY (`Folio`);
--
-- Indexes for table `libro_alumno`
--
ALTER TABLE `libro_alumno`
ADD PRIMARY KEY (`Id`),
ADD KEY `Folio_Libro` (`Folio_Libro`),
ADD KEY `Matricula_Alumno` (`Matricula_Alumno`),
ADD KEY `Matricula_Libreria` (`Matricula_Libreria`);
--
-- Indexes for table `libro_personal`
--
ALTER TABLE `libro_personal`
ADD PRIMARY KEY (`Id`),
ADD KEY `Matricula_Libreria` (`Matricula_Libreria`),
ADD KEY `Folio_Libro` (`Folio_Libro`),
ADD KEY `Clv_Personal` (`Clv_Personal`);
--
-- Indexes for table `maestro`
--
ALTER TABLE `maestro`
ADD PRIMARY KEY (`Matricula`),
ADD KEY `Clv_Usuario` (`Clv_Usuario`);
--
-- Indexes for table `maestro_asignatura`
--
ALTER TABLE `maestro_asignatura`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Asignatura` (`Clv_Asignatura`),
ADD KEY `Clv_Maestro` (`Matricula_Maestro`);
--
-- Indexes for table `maestro_grupo_asignatura`
--
ALTER TABLE `maestro_grupo_asignatura`
ADD PRIMARY KEY (`Id`),
ADD KEY `Clv_Maestro` (`Matricula_Maestro`),
ADD KEY `Clv_Grupo` (`Clv_Grupo`),
ADD KEY `Clv_Asignatura` (`Clv_Asignatura`);
--
-- Indexes for table `parcial_1`
--
ALTER TABLE `parcial_1`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Asignatura_Alumno` (`Clv_Asignatura_Alumno`);
--
-- Indexes for table `parcial_2`
--
ALTER TABLE `parcial_2`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Asignatura_Alumno` (`Clv_Asignatura_Alumno`);
--
-- Indexes for table `parcial_3`
--
ALTER TABLE `parcial_3`
ADD PRIMARY KEY (`Folio`),
ADD KEY `Clv_Asignatura_Alumno` (`Clv_Asignatura_Alumno`);
--
-- Indexes for table `salida_alumno`
--
ALTER TABLE `salida_alumno`
ADD PRIMARY KEY (`Id`),
ADD KEY `Id_Entrada` (`Id_Entrada`);
--
-- Indexes for table `salida_personal`
--
ALTER TABLE `salida_personal`
ADD PRIMARY KEY (`Id`),
ADD KEY `Id_Entrada` (`Id_Entrada`);
--
-- Indexes for table `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`Clv_Usuario`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `actividad`
--
ALTER TABLE `actividad`
MODIFY `Id` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `actividad_alumno`
--
ALTER TABLE `actividad_alumno`
MODIFY `Id_Actividad` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `administrador`
--
ALTER TABLE `administrador`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=116;
--
-- AUTO_INCREMENT for table `alumno`
--
ALTER TABLE `alumno`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `alumno_grupo`
--
ALTER TABLE `alumno_grupo`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `aviso`
--
ALTER TABLE `aviso`
MODIFY `Folio` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `calendario`
--
ALTER TABLE `calendario`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `calificacion_final`
--
ALTER TABLE `calificacion_final`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `control_escolar`
--
ALTER TABLE `control_escolar`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `coordinador`
--
ALTER TABLE `coordinador`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `directivo`
--
ALTER TABLE `directivo`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `entrada_alumno`
--
ALTER TABLE `entrada_alumno`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `entrada_personal`
--
ALTER TABLE `entrada_personal`
MODIFY `Id` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `libreria`
--
ALTER TABLE `libreria`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `libro`
--
ALTER TABLE `libro`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `libro_alumno`
--
ALTER TABLE `libro_alumno`
MODIFY `Id` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `libro_personal`
--
ALTER TABLE `libro_personal`
MODIFY `Id` int(9) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `maestro`
--
ALTER TABLE `maestro`
MODIFY `Matricula` int(9) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `maestro_asignatura`
--
ALTER TABLE `maestro_asignatura`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `maestro_grupo_asignatura`
--
ALTER TABLE `maestro_grupo_asignatura`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `parcial_1`
--
ALTER TABLE `parcial_1`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `parcial_2`
--
ALTER TABLE `parcial_2`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `parcial_3`
--
ALTER TABLE `parcial_3`
MODIFY `Folio` int(99) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `salida_alumno`
--
ALTER TABLE `salida_alumno`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `salida_personal`
--
ALTER TABLE `salida_personal`
MODIFY `Id` int(99) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `actividad`
--
ALTER TABLE `actividad`
ADD CONSTRAINT `actividad_ibfk_1` FOREIGN KEY (`Clv_Asignatura`) REFERENCES `asignatura` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `actividad_ibfk_2` FOREIGN KEY (`Matricula_Maestro`) REFERENCES `maestro` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `actividad_alumno`
--
ALTER TABLE `actividad_alumno`
ADD CONSTRAINT `actividad_alumno_ibfk_1` FOREIGN KEY (`Id_Actividad`) REFERENCES `actividad` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `actividad_alumno_ibfk_2` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `administrador`
--
ALTER TABLE `administrador`
ADD CONSTRAINT `administrador_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `alumno`
--
ALTER TABLE `alumno`
ADD CONSTRAINT `alumno_ibfk_1` FOREIGN KEY (`Clv_Carrera`) REFERENCES `carrera` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `alumno_beca`
--
ALTER TABLE `alumno_beca`
ADD CONSTRAINT `alumno_beca_ibfk_1` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `alumno_beca_ibfk_2` FOREIGN KEY (`Clv_Beca`) REFERENCES `beca` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `alumno_grupo`
--
ALTER TABLE `alumno_grupo`
ADD CONSTRAINT `alumno_grupo_ibfk_1` FOREIGN KEY (`Clv_Grupo`) REFERENCES `grupo` (`Clv_Grupo`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `alumno_grupo_ibfk_2` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `asignatura`
--
ALTER TABLE `asignatura`
ADD CONSTRAINT `asignatura_ibfk_1` FOREIGN KEY (`Clv_Carrera`) REFERENCES `carrera` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `asignatura_alumno`
--
ALTER TABLE `asignatura_alumno`
ADD CONSTRAINT `asignatura_alumno_ibfk_1` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `asignatura_alumno_ibfk_2` FOREIGN KEY (`Clv_Asignatura`) REFERENCES `asignatura` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `aviso`
--
ALTER TABLE `aviso`
ADD CONSTRAINT `aviso_ibfk_1` FOREIGN KEY (`Matricula_Administrador`) REFERENCES `administrador` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `calendario`
--
ALTER TABLE `calendario`
ADD CONSTRAINT `calendario_ibfk_1` FOREIGN KEY (`Matricula_Administrador`) REFERENCES `administrador` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `calificacion_final`
--
ALTER TABLE `calificacion_final`
ADD CONSTRAINT `calificacion_final_ibfk_1` FOREIGN KEY (`Clv_Asignatura_Alumno`) REFERENCES `asignatura_alumno` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `carrera`
--
ALTER TABLE `carrera`
ADD CONSTRAINT `carrera_ibfk_1` FOREIGN KEY (`Matricula_Coordinador`) REFERENCES `coordinador` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `control_escolar`
--
ALTER TABLE `control_escolar`
ADD CONSTRAINT `control_escolar_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `coordinador`
--
ALTER TABLE `coordinador`
ADD CONSTRAINT `coordinador_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `directivo`
--
ALTER TABLE `directivo`
ADD CONSTRAINT `directivo_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `entrada_alumno`
--
ALTER TABLE `entrada_alumno`
ADD CONSTRAINT `entrada_alumno_ibfk_1` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `entrada_personal`
--
ALTER TABLE `entrada_personal`
ADD CONSTRAINT `entrada_personal_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `entrega_periodo`
--
ALTER TABLE `entrega_periodo`
ADD CONSTRAINT `entrega_periodo_ibfk_2` FOREIGN KEY (`Id_Maestro_Grupo_Asignatura`) REFERENCES `maestro_grupo_asignatura` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `grupo`
--
ALTER TABLE `grupo`
ADD CONSTRAINT `grupo_ibfk_1` FOREIGN KEY (`Clv_Carrera`) REFERENCES `carrera` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `libreria`
--
ALTER TABLE `libreria`
ADD CONSTRAINT `libreria_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `libro_alumno`
--
ALTER TABLE `libro_alumno`
ADD CONSTRAINT `libro_alumno_ibfk_1` FOREIGN KEY (`Matricula_Alumno`) REFERENCES `alumno` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `libro_alumno_ibfk_2` FOREIGN KEY (`Folio_Libro`) REFERENCES `libro` (`Folio`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `libro_alumno_ibfk_3` FOREIGN KEY (`Matricula_Libreria`) REFERENCES `libreria` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `libro_personal`
--
ALTER TABLE `libro_personal`
ADD CONSTRAINT `libro_personal_ibfk_1` FOREIGN KEY (`Folio_Libro`) REFERENCES `libro` (`Folio`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `libro_personal_ibfk_2` FOREIGN KEY (`Clv_Personal`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `libro_personal_ibfk_3` FOREIGN KEY (`Matricula_Libreria`) REFERENCES `libreria` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `maestro`
--
ALTER TABLE `maestro`
ADD CONSTRAINT `maestro_ibfk_1` FOREIGN KEY (`Clv_Usuario`) REFERENCES `usuario` (`Clv_Usuario`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `maestro_grupo_asignatura`
--
ALTER TABLE `maestro_grupo_asignatura`
ADD CONSTRAINT `maestro_grupo_asignatura_ibfk_1` FOREIGN KEY (`Clv_Grupo`) REFERENCES `grupo` (`Clv_Grupo`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `maestro_grupo_asignatura_ibfk_3` FOREIGN KEY (`Clv_Asignatura`) REFERENCES `asignatura` (`Clave`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `maestro_grupo_asignatura_ibfk_4` FOREIGN KEY (`Matricula_Maestro`) REFERENCES `maestro` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `parcial_1`
--
ALTER TABLE `parcial_1`
ADD CONSTRAINT `parcial_1_ibfk_1` FOREIGN KEY (`Clv_Asignatura_Alumno`) REFERENCES `asignatura_alumno` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `parcial_2`
--
ALTER TABLE `parcial_2`
ADD CONSTRAINT `parcial_2_ibfk_1` FOREIGN KEY (`Clv_Asignatura_Alumno`) REFERENCES `asignatura_alumno` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `parcial_3`
--
ALTER TABLE `parcial_3`
ADD CONSTRAINT `parcial_3_ibfk_1` FOREIGN KEY (`Clv_Asignatura_Alumno`) REFERENCES `asignatura_alumno` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `salida_alumno`
--
ALTER TABLE `salida_alumno`
ADD CONSTRAINT `salida_alumno_ibfk_1` FOREIGN KEY (`Id_Entrada`) REFERENCES `entrada_alumno` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `salida_personal`
--
ALTER TABLE `salida_personal`
ADD CONSTRAINT `salida_personal_ibfk_1` FOREIGN KEY (`Id_Entrada`) REFERENCES `entrada_personal` (`Id`) 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 */;
<file_sep><?php
require_once('verificar.php');
require_once('../../php/cargar_registros.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("../head.html"); ?>
<style>
.table,,td {border: 1px solid black;}
</style>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Logo</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.php">Inicio</a></li>
<li><a href="clientes.php">Clientes</a></li>
<li><a href="entradas-salidas.php">Entradas/Salidas</a></li>
<li class="active"><a href="#">Nuevo Usuario</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../../php/cerrar.php"><span class="glyphicon glyphicon-log-in"></span>Cerrar sesion</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Registro de nuevo usuarios</h2>
<br>
<h3>Nuevo usuarios no es un cliente es un recepcionista</h3>
<br><br>
<form action="../../php/insertar.php" method="POST">
<div class="form-group">
<label for="inputNombre" class="col-lg-1 control-label">Nombre: </label>
<div class="col-lg-4">
<input type="text" class="form-control" id="Nombre" name="Nombre" placeholder="Nombre">
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputApellido" class="col-lg-1 control-label">Apellido(s): </label>
<div class="col-lg-4">
<input type="text" class="form-control" id="Apellidos" name="Apellido" placeholder="Apellido">
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputTelefono" class="col-lg-1 control-label">Telefono: </label>
<div class="col-lg-4">
<input type="text" class="form-control" id="Telefono" name="Telefono" placeholder="Telefono">
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCorreo" class="col-lg-1 control-label">Correo: </label>
<div class="col-lg-4">
<input type="text" class="form-control" id="Correo" name="Correo" placeholder="Correo">
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCorreo" class="col-lg-1 control-label"></label>
<div class="col-lg-4">
<button type="submit" class="btn btn-primary btn-lg btn-block">Registrar</button>
</div>
</div>
</form>
<hr><hr><hr>
<h3>Usuarios registrados</h3>
<hr>
<table style="width:100%" class="table">
<tr>
<th>Matricula</th>
<th>Nombre</th>
<th>Apellido(s)</th>
<th>Telefono</th>
<th>Correo</th>
</tr>
<?php cargarUsuarios();?>
</table>
<hr><hr><hr><hr>
</div>
</div>
</div>
<?php include("../footer.html"); ?>
</body>
</html>
<file_sep><?php
class querys_insersiones
{
public function InsertarTablaUnica_1_Campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1)
VALUES (:Campo1)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_2_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2)
VALUES (:Campo1, :Campo2)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_3_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2, $Campo3)
VALUES (:Campo1, :Campo2, :Campo3)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_4_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2, $Campo3, $Campo4)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_5_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2, $Campo3, $Campo4,$Campo5)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_6_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2, $Campo3, $Campo4, $Campo5, $Campo6)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_7_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_8_campos($NombreTabla, $Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_9_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8, $Campo9)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_10_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL, $Campo10 = NULL, $ValorCampo10 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8, $Campo9, $Campo10)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9, :Campo10)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->bindParam(':Campo10', $ValorCampo10);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_11_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL, $Campo10 = NULL, $ValorCampo10 = NULL, $Campo11 = NULL, $ValorCampo11 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8, $Campo9, $Campo10, $Campo11)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9, :Campo10, :Campo11)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->bindParam(':Campo10', $ValorCampo10);
$statement->bindParam(':Campo11', $ValorCampo11);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_12_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL, $Campo10 = NULL, $ValorCampo10 = NULL, $Campo11 = NULL, $ValorCampo11 = NULL,
$Campo12 = NULL, $ValorCampo12 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2, $Campo3, $Campo4, $Campo5, $Campo6, $Campo7, $Campo8, $Campo9, $Campo10, $Campo11, $Campo12)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9, :Campo10, :Campo11, :Campo12)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->bindParam(':Campo10', $ValorCampo10);
$statement->bindParam(':Campo11', $ValorCampo11);
$statement->bindParam(':Campo12', $ValorCampo12);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_13_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL, $Campo10 = NULL, $ValorCampo10 = NULL, $Campo11 = NULL, $ValorCampo11 = NULL,
$Campo12 = NULL, $ValorCampo12 = NULL, $Campo13 = NULL, $ValorCampo13 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8, $Campo9, $Campo10, $Campo11, $Campo12, $Campo13)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9, :Campo10, :Campo11, :Campo12, :Campo13)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->bindParam(':Campo10', $ValorCampo10);
$statement->bindParam(':Campo11', $ValorCampo11);
$statement->bindParam(':Campo12', $ValorCampo12);
$statement->bindParam(':Campo13', $ValorCampo13);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function InsertarTablaUnica_18_campos($NombreTabla,$Campo1 = NULL, $ValorCampo1 = NULL, $Campo2 = NULL, $ValorCampo2 = NULL,
$Campo3 = NULL, $ValorCampo3 = NULL, $Campo4 = NULL, $ValorCampo4 = NULL, $Campo5 = NULL, $ValorCampo5 = NULL,
$Campo6 = NULL, $ValorCampo6 = NULL, $Campo7 = NULL, $ValorCampo7 = NULL, $Campo8 = NULL, $ValorCampo8 = NULL,
$Campo9 = NULL, $ValorCampo9 = NULL, $Campo10 = NULL, $ValorCampo10 = NULL, $Campo11 = NULL, $ValorCampo11 = NULL,
$Campo12 = NULL, $ValorCampo12 = NULL, $Campo13 = NULL, $ValorCampo13 = NULL, $Campo14 = NULL, $ValorCampo14 = NULL,
$Campo15 = NULL, $ValorCampo15 = NULL, $Campo16 = NULL, $ValorCampo16 = NULL, $Campo17 = NULL, $ValorCampo17 = NULL,
$Campo18 = NULL, $ValorCampo18 = NULL)
{
$modelo = new conexion();
$conexion = $modelo->get_conexion();
$sql = "INSERT INTO $NombreTabla ($Campo1, $Campo2,$Campo3, $Campo4,$Campo5, $Campo6,$Campo7, $Campo8, $Campo9, $Campo10, $Campo11, $Campo12, $Campo13, $Campo14, $Campo15, $Campo16, $Campo17, $Campo18)
VALUES (:Campo1, :Campo2, :Campo3, :Campo4, :Campo5, :Campo6, :Campo7, :Campo8, :Campo9, :Campo10, :Campo11, :Campo12, :Campo13, :Campo14, :Campo15, :Campo16, :Campo17, :Campo18)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Campo1', $ValorCampo1);
$statement->bindParam(':Campo2', $ValorCampo2);
$statement->bindParam(':Campo3', $ValorCampo3);
$statement->bindParam(':Campo4', $ValorCampo4);
$statement->bindParam(':Campo5', $ValorCampo5);
$statement->bindParam(':Campo6', $ValorCampo6);
$statement->bindParam(':Campo7', $ValorCampo7);
$statement->bindParam(':Campo8', $ValorCampo8);
$statement->bindParam(':Campo9', $ValorCampo9);
$statement->bindParam(':Campo10', $ValorCampo10);
$statement->bindParam(':Campo11', $ValorCampo11);
$statement->bindParam(':Campo12', $ValorCampo12);
$statement->bindParam(':Campo13', $ValorCampo13);
$statement->bindParam(':Campo14', $ValorCampo14);
$statement->bindParam(':Campo15', $ValorCampo15);
$statement->bindParam(':Campo16', $ValorCampo16);
$statement->bindParam(':Campo17', $ValorCampo17);
$statement->bindParam(':Campo18', $ValorCampo18);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function insertCliente($Nombre, $Apellido, $Telefono, $Correo, $plan)
{
//se llama la clase de la conexion
$modelo = new conexion();
//la conexion sera igual a lo que regrese la funcion
$conexion = $modelo->get_conexion();
//se estipula el query
$status = 'Activo';
$Password = $Nombre[0].$Apellido;
$sql = "INSERT INTO clientes (Nombre, Apellido, Telefono, Correo, Status, Password, Id_plan)
VALUES (:Nombre, :Apellido, :Telefono, :Correo, :Status, :Password, :Id_plan )";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Nombre', $Nombre);
$statement->bindParam(':Apellido', $Apellido);
$statement->bindParam(':Telefono', $Telefono);
$statement->bindParam(':Correo', $Correo);
$statement->bindParam(':Status', $status);
$statement->bindParam(':Password', $Password);
$statement->bindParam(':Id_plan', $plan);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
public function insertEntrada($fecha, $hora, $Matricula, $MatUsuario)
{
//se llama la clase de la conexion
$modelo = new conexion();
//la conexion sera igual a lo que regrese la funcion
$conexion = $modelo->get_conexion();
//se estipula el query
$sql = "INSERT INTO entrada (Fecha, hora_entrada, Matricula_Cliente, Matricula_usuario)
VALUES (:Fecha, :hora_entrada, :Matricula_Cliente, :Matricula_usuario)";
$statement = $conexion->prepare($sql);
$statement->bindParam(':Fecha', $fecha);
$statement->bindParam(':hora_entrada', $hora);
$statement->bindParam(':Matricula_Cliente', $Matricula);
$statement->bindParam(':Matricula_usuario', $MatUsuario);
$statement->execute();
if(!$statement)
{
return "error al insertar";
}
else
{
return "registro echo";
}
}
}
?><file_sep>function validPerfil() {
var nombre = $('#nombre').val();
var apellido = $('#apellidos').val();
var correo = $('#correo').val();
var telefono = $('#telefono').val();
var lvlEstudio = $('#nivelEstudio').val();
var password = $('#pass').val();
var confPass = $('#confPass').val();
var expr = /^[A-Za-z áéíóú \s]*$/;
var expr2 = /^[0-9]*$/;
var expr3 = /^[A-Za-z\s0-9]*$/;
if (!expr.test(nombre)) {
$('#nombre')[0].setCustomValidity("Solo se admiten letras");
} else {
$('#nombre')[0].setCustomValidity('');
}
if (!expr.test(apellido)) {
$('#apellidos')[0].setCustomValidity("Solo se admiten letras");
} else {
$('#apellidos')[0].setCustomValidity('');
}
if (!expr2.test(telefono)) {
$('#telefono')[0].setCustomValidity("Solo se admiten numeros");
} else {
$('#telefono')[0].setCustomValidity('');
}
if (!expr3.test(password)) {
$('#pass')[0].setCustomValidity("No se admiten caracteres especiales");
} else {
$('#pass')[0].setCustomValidity('');
}
if (password != confPass) {
$('#confPass')[0].setCustomValidity('Las contraseñas no coinciden');
} else {
$('#confPass')[0].setCustomValidity('');
}
}
//Funcion para la validacion del edit
function validarCalModal() {
var expr = /^\d+(?:\.\d{0,1})*$/; //expresion numeros decimales.
var expr2 = /^[0-9]*$/; //expresion para porcentajes
var p1 = $("#p1").val();
var ap1 = $("#ap1").val();
var p2 = $("#p2").val();
var ap2 = $("#ap2").val();
var co = $("#co").val();
//Validacion parcial 1
if (!expr.test(p1) || p1 > 10) {
if (p1 != "") {
$("#p1")[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#p1")[0].setCustomValidity("");
}
} else {
$("#p1")[0].setCustomValidity("");
}
//Validacion asistencia parcial 1
if (!expr2.test(ap1) || ap1 > 100) {
if (ap1 != "") {
$("#ap1")[0].setCustomValidity("Solo se aceptan numero de 0-100");
} else {
$("#ap1")[0].setCustomValidity("");
}
} else {
$("#ap1")[0].setCustomValidity("");
}
//Validacion parcial 2
if (!expr.test(p2) || p2 > 10) {
if (p2 != "") {
$("#p2")[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#p2")[0].setCustomValidity("");
}
} else {
$("#p2")[0].setCustomValidity("");
}
//Validacion asistencia parcial 2
if (!expr2.test(ap2) || ap2 > 100) {
if (ap2 != "") {
$("#ap2")[0].setCustomValidity("Solo se aceptan numero de 0-100");
} else {
$("#ap2")[0].setCustomValidity("");
}
} else {
$("#ap2")[0].setCustomValidity("");
}
//Validacion ordinario
if (!expr.test(co) || co > 10) {
if (co != "") {
$("#co")[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#co")[0].setCustomValidity("");
}
} else {
$("#co")[0].setCustomValidity("");
}
} //end function validarCalModal
//Funcion para el promedio editModal
function promedioModal() {
var p1 = $("#p1").val();
var p2 = $("#p2").val();
var pp;
var expr = /^\d+(?:\.\d{0,1})*$/;
if (!expr.test(p1) || !expr.test(p2)) {
$("#pp").val("");
} else {
pp = ((parseFloat(p1) + parseFloat(p2)) / 2).toFixed(1);
$("#pp").val(pp);
}
var ap1 = $("#ap1").val();
var ap2 = $("#ap2").val();
var pp = $("#pp").val();
var co = $("#co").val();
var aco, cf, acf;
if (!expr.test(pp) || !expr.test(co)) {
$("#cf").val("");
$("#aco").val("");
$("#acf").val("");
} else {
cf = ((parseFloat(pp) + parseFloat(co)) / 2).toFixed(1);
aco = ((parseInt(ap1) + parseInt(ap2)) / 2).toFixed(0);
$("#cf").val(cf);
$("#aco").val(aco);
acf = ((parseInt(ap1) + parseInt(ap2) + parseInt(aco)) / 3).toFixed(0);
$("#acf").val(acf);
}
}
function validarCal(id) {
var expr = /^\d+(?:\.\d{0,1})*$/; //expresion numeros decimales.
var expr2 = /^[0-9]*$/; //expresion para porcentajes
var p1 = $("#p1" + id).val();
var ap1 = $("#ap1" + id).val();
var p2 = $("#p2" + id).val();
var ap2 = $("#ap2" + id).val();
var co = $("#co" + id).val();
//Validacion Parcial 1 y Asistencia 1 (required)
if (p1 != "" || ap1 != "") {
$("#p1" + id).attr('required', 'required');
$("#ap1" + id).attr('required', 'required');
} else {
$("#p1" + id).removeAttr('required');
$("#ap1" + id).removeAttr('required');
}
//Validacion Parcial 2 y Asistencia 2 (required)
if (p2 != "" || ap2 != "") {
$("#p2" + id).attr('required', 'required');
$("#ap2" + id).attr('required', 'required');
} else {
$("#p2" + id).removeAttr('required');
$("#ap2" + id).removeAttr('required');
}
//Validacion parcial 1
if (!expr.test(p1) || p1 > 10) {
if (p1 != "") {
$("#p1" + id)[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#p1" + id)[0].setCustomValidity("");
}
} else {
$("#p1" + id)[0].setCustomValidity("");
}
//Validacion asistencia parcial 1
if (!expr2.test(ap1) || ap1 > 100) {
if (ap1 != "") {
$("#ap1" + id)[0].setCustomValidity("Solo se aceptan numero de 0-100");
} else {
$("#ap1" + id)[0].setCustomValidity("");
}
} else {
$("#ap1" + id)[0].setCustomValidity("");
}
//Validacion parcial 2
if (!expr.test(p2) || p2 > 10) {
if (p2 != "") {
$("#p2" + id)[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#p2" + id)[0].setCustomValidity("");
}
} else {
$("#p2" + id)[0].setCustomValidity("");
}
//Validacion asistencia parcial 2
if (!expr2.test(ap2) || ap2 > 100) {
if (ap2 != "") {
$("#ap2" + id)[0].setCustomValidity("Solo se aceptan numero de 0-100");
} else {
$("#ap2" + id)[0].setCustomValidity("");
}
} else {
$("#ap2" + id)[0].setCustomValidity("");
}
//Validacion ordinario
if (!expr.test(co) || co > 10) {
if (co != "") {
$("#co" + id)[0].setCustomValidity("Solo se aceptan numero de 0-10");
} else {
$("#co" + id)[0].setCustomValidity("");
}
} else {
$("#co" + id)[0].setCustomValidity("");
}
} //end function validarCal
//Funcion para calcular promedio de (captura_cal)
function Promedio(id) {
var p1 = $("#p1" + id).val();
var p2 = $("#p2" + id).val();
var pp;
var expr = /^\d+(?:\.\d{0,1})*$/;
if (!expr.test(p1) || !expr.test(p2)) {
$("#pp" + id).val("");
} else {
pp = ((parseFloat(p1) + parseFloat(p2)) / 2).toFixed(1);
$("#pp" + id).val(pp);
}
var ap1 = $("#ap1" + id).val();
var ap2 = $("#ap2" + id).val();
var pp = $("#pp" + id).val();
var co = $("#co" + id).val();
var aco, cf, acf;
if (!expr.test(pp) || !expr.test(co)) {
$("#cf" + id).val("");
$("#aco" + id).val("");
$("#acf" + id).val("");
} else {
cf = ((parseFloat(pp) + parseFloat(co)) / 2).toFixed(1);
aco = ((parseInt(ap1) + parseInt(ap2)) / 2).toFixed(0);
$("#cf" + id).val(cf);
$("#aco" + id).val(aco);
acf = ((parseInt(ap1) + parseInt(ap2) + parseInt(aco)) / 3).toFixed(0);
$("#acf" + id).val(acf);
}
} //end function Promedio
//Funcion para confirmacion de datos.
function redireccion() {
if (!confirm("\u00BFEsta seguro que los datos son correctos?")) {
return false;
}
}
//Funcion de Tooltip
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip();
});
//Funcion modal fecha captura
$(document).ready(function() {
$('#myModal').modal();
});
$(document).ready(function() {
$('#perfiles').click(function() {
$('#perfil').modal();
})
});
//Funcion modal editar calificaciones
function modal(name, p1, ap1, p2, ap2, pp, co, aco, cf, acf, ma) {
$('#nombre').val(name);
$('#p1').val(p1);
$('#ap1').val(ap1);
$('#p2').val(p2);
$('#ap2').val(ap2);
$('#pp').val(pp);
$('#co').val(co);
$('#aco').val(aco);
$('#cf').val(cf);
$('#acf').val(acf);
$('#matricula').val(ma);
}
/*function editPerfil(nombre, apellidos, correo, telefono, nivelEstudios){
$('#nombre').val(nombre);
$('#apellidos').val(apellidos);
$('#correo').val(correo);
$('#telefono').val(telefono);
$('#nivelEstudio').val(nivelEstudios);
}*/
$('#btn-edit-perfil').click(function(){
$('#editPerfil').modal()
});
$(document).ready(function(){
$('#btn-change-pass').click(function(){
$('#confirm').on('shown.bs.collapse', function(){
$('#pass').removeAttr('readonly');
$('#confPass').removeAttr('readonly');
});
$('#confirm').on('hidden.bs.collapse', function(){
$('#pass').attr('readonly','readonly');
$('#confPass').attr('readonly','readonly');
});
});
});
//Funcion para bloqueo de celdas
$(document).ready(function() {
$('.cal input[type="numeric"]').each(function() {
if ($(this).val().length == 0) {
$(this).removeAttr('readonly');
} else {
//console.log("no esta vacio");
$(this).attr('readonly', 'readonly');
}
});
});
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2><?php if(!isset($_GET['Clave'])){echo "Lista de Carreras";}else{echo "Lista alumnos de la carrera ".$_GET['Clave']."";}?></h2>
<p>
<hr>
<table style="width:100%" class="table">
<tr>
<th><?php if(!isset($_GET['Clave'])){echo "Clave";}else{ echo "Matricula";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "Nombre";}else{ echo "Nombre completo";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Correo";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Telefono";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Turno";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Semestre";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Status";}?></th>
</tr>
<tr>
<?php if(!isset($_GET['Clave'])){$llamado->ConsultarCarreras_link_alumnado();}else{$llamado->ConsultarAlumnos($_GET['Clave']);}?>
</tr>
</table>
</p>
</div>
<div class="form-group">
<div class="col-lg-2">
<?php if(!isset($_GET['Clave']))
{
echo '<a href="'.$_SESSION['Ruta_web'].'pages/AD/alumnado/"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>';
}
else
{
echo '<a href="'.$_SESSION['Ruta_web'].'pages/AD/alumnado/gestion.php"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>';
}
?>
</div>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
session_start();
if($_SESSION)
{
if ($_SESSION['Rol'] == 'ControlEscolar')
{
echo "<script> alert('Credenciales no validas.'); window.location.href='".$_SESSION['Ruta_web']."pages/CE/'; </script>";
}
else if ($_SESSION['Rol'] == 'Alumno')
{
echo "<script> alert('Credenciales no validas.'); window.location.href='".$_SESSION['Ruta_web']."pages/AL/'; </script>";
}
else if ($_SESSION['Rol'] == 'Coordinador')
{
echo "<script> alert('Credenciales no validas.'); window.location.href='".$_SESSION['Ruta_web']."pages/CO/'; </script>";
}
else if ($_SESSION['Rol'] == 'Directivo')
{
echo "<script> alert('Credenciales no validas.'); window.location.href='".$_SESSION['Ruta_web']."pages/DI/'; </script>";
}
else if ($_SESSION['Rol'] == 'Maestro')
{
echo "<script> alert('Credenciales no validas.'); window.location.href='".$_SESSION['Ruta_web']."pages/MA/'; </script>";
}
}
else
{
echo "<script> alert('No estas logeado.'); window.location.href='".$_SESSION['Ruta_web']."pages/CE/'; </script>";
}
?><file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
if(isset($_POST['Nombres']) && isset($_POST['Apellido_1']) && isset($_POST['Apellido_2']) && isset($_POST['Correo']) && isset($_POST['Telefono']) && isset($_POST['Movil']) && isset($_POST['Curp']) && isset($_POST['Calle']) && isset($_POST['Colonia']) && isset($_POST['Num_Ext']) && isset($_POST['Num_Int']) && isset($_POST['Municipio']) )
{
require_once("../../../mvc/modelo/administracion/clase_insersiones_administracion.php");
$llamado = new insersiones_administracion();
$llamado->RegistrarAlumno(
htmlspecialchars($_POST['Nombres'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Apellido_1'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Apellido_2'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Correo'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Telefono'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Movil'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Curp'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Calle'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Colonia'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Num_Ext'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Num_Int'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Municipio'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Carrera'], ENT_QUOTES, 'UTF-8'),
htmlspecialchars($_POST['Turno'], ENT_QUOTES, 'UTF-8')
);
}
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Registro de nuevo alumno</h2>
<br>
<form action="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/nuevo.php" ?>" method="POST" autocomplete="OFF">
<div class="form-group">
<label for="inputNombres" class="col-lg-1 control-label">Nombre(s): </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Nombres" name="Nombres" placeholder="Nombres" required>
</div>
<label for="inputApelido_1" class="col-lg-1 control-label">Apellido 1:</label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Apellido_1" name="Apellido_1" placeholder="Apellido 1" required>
</div>
<label for="inputApelido_2" class="col-lg-1 control-label">Apellido 2:</label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Apellido_2" name="Apellido_2" placeholder="Apellido 2" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCorreo" class="col-lg-1 control-label">Correo: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Correo" name="Correo" placeholder="Correo" required>
</div>
<label for="inputTelefono" class="col-lg-1 control-label">Telefono: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Telefono" name="Telefono" placeholder="Telefono" required>
</div>
<label for="inputMovil" class="col-lg-1 control-label">Movil: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Movil" name="Movil" placeholder="Movil" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCurp" class="col-lg-1 control-label">CURP: </label>
<div class="col-lg-2">
<input type="text" class="form-control" id="Curp" name="Curp" placeholder="Curp" required>
</div>
<label for="inputTurno" class="col-lg-1 control-label">Turno:</label>
<div class="col-lg-2">
<select class="form-control" name= "Turno">
<option value="Matutino">Matutino</option>
<option value="Vespertino">Vespertino</option>
<option value="Mixto">Mixto</option>
</select>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCarrera" class="col-lg-1 control-label">Carrera:</label>
<div class="col-lg-5">
<select class="form-control" name= "Carrera">
<option value="1">Clave - Nombre Carrera</option>
<?php $llamado->ConsultarCarrera(); ?>
</select>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputCalle" class="col-lg-1 control-label">Calle: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Calle" name="Calle" placeholder="Calle" required>
</div>
<label for="inputColonia" class="col-lg-1 control-label">Colonia: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Colonia" name="Colonia" placeholder="Colonia" required>
</div>
</div>
<hr><hr>
<div class="form-group">
<label for="inputNum_Ext" class="col-lg-1 control-label">Numero Exterior: </label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Num_Ext" name="Num_Ext" placeholder="ej. 100" required>
</div>
<label for="inputNum_Int" class="col-lg-1 control-label">Numero Interior: </label>
<div class="col-lg-1">
<input type="text" class="form-control" id="Num_Int" name="Num_Int" placeholder="ej. 2" required>
</div>
<label for="inputMunicipio" class="col-lg-1 control-label">Municipio: </label>
<div class="col-lg-3">
<input type="text" class="form-control" id="Municipio" name="Municipio" placeholder="Municipio" required>
</div>
</div>
<hr><hr><hr><hr>
<div class="form-group">
<div class="col-lg-2">
<button type="submit" class="btn btn-primary btn-lg btn-block">Registrar</button>
</div>
<div class="col-lg-2">
<a href="<?php echo $_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual'] ?>"><button type="button" class="btn btn-primary btn-lg btn-block">Cancelar</button></a>
</div>
</div>
</form>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
class consultas_administracion
{
public function ConsultarAdministrador() //funcion para consultar a todos los administradores
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'administrador');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td</td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></1td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Movil']."</td>";
echo "<td>".$fila['CURP']."</td>";
echo "<td>".$fila['Calle']."</td>";
echo "<td>".$fila['Numero_Exterior']."</td>";
echo "<td>".$fila['Numero_Interior']."</td>";
echo "<td>".$fila['Colonia']."</td>";
echo "<td>".$fila['Municipio']."</td>";
echo "<td>".$fila['Clv_Usuario']."</td>";
echo "</tr>";
}
}
}
public function ConsultarCoordinadores() //funcion para consultar a todos los coordinadores
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'coordinador');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td</td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></1td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Movil']."</td>";
echo "<td>".$fila['CURP']."</td>";
echo "<td>".$fila['Calle']."</td>";
echo "<td>".$fila['Numero_Exterior']."</td>";
echo "<td>".$fila['Numero_Interior']."</td>";
echo "<td>".$fila['Colonia']."</td>";
echo "<td>".$fila['Municipio']."</td>";
echo "<td>".$fila['Clv_Usuario']."</td>";
echo "</tr>";
}
}
}
public function ConsultarDocente() //funcion para consultar a todos los docentes
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'maestro');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td</td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></1td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Movil']."</td>";
echo "<td>".$fila['CURP']."</td>";
echo "<td>".$fila['Calle']."</td>";
echo "<td>".$fila['Numero_Exterior']."</td>";
echo "<td>".$fila['Numero_Interior']."</td>";
echo "<td>".$fila['Colonia']."</td>";
echo "<td>".$fila['Municipio']."</td>";
echo "<td>".$fila['Clv_Usuario']."</td>";
echo "</tr>";
}
}
}
public function ConsultarDirectivo() //funcion para consultar a todos los directivos
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'directivo');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td</td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></1td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Movil']."</td>";
echo "<td>".$fila['CURP']."</td>";
echo "<td>".$fila['Calle']."</td>";
echo "<td>".$fila['Numero_Exterior']."</td>";
echo "<td>".$fila['Numero_Interior']."</td>";
echo "<td>".$fila['Colonia']."</td>";
echo "<td>".$fila['Municipio']."</td>";
echo "<td>".$fila['Clv_Usuario']."</td>";
echo "</tr>";
}
}
}
public function ConsultarBiblioteca() //funcion para consultar a todo el personal de biblioteca
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'libreria');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td</td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></1td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Movil']."</td>";
echo "<td>".$fila['CURP']."</td>";
echo "<td>".$fila['Calle']."</td>";
echo "<td>".$fila['Numero_Exterior']."</td>";
echo "<td>".$fila['Numero_Interior']."</td>";
echo "<td>".$fila['Colonia']."</td>";
echo "<td>".$fila['Municipio']."</td>";
echo "<td>".$fila['Clv_Usuario']."</td>";
echo "</tr>";
}
}
}
public function ConsultarCoordinador() //funcion para mostrar los coordinadores en la interfaz de nueva carrera
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('Matricula, Nombres, Apellido_1, Apellido_2', 'coordinador');
if (count($filas) == 0)
{
echo '<option value=""></option>';
}
else
{
foreach ($filas as $fila)
{
$Matricula = $fila["Matricula"];
echo '<option value= "'.$Matricula.'">'.$Matricula." - ".$fila["Nombres"]." ".$fila["Apellido_1"]." ".$fila["Apellido_2"].'</option>';
}
}
}
public function ConsultarCarreras() //funcion para mostrar todas las carreras
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'carrera');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Clave']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td>".$fila['Creditos']."</td>";
echo "<td>".$fila['Creditos_Minimos_Servicio_Social']."</td>";
echo "<td>".SELF::ConsultarCoordinadorDesignado($fila['Matricula_Coordinador'])."</td>";
echo "</tr>";
}
}
}
public function ConsultarCoordinadorDesignado($Matricula) //funcion para mostrar que coordinador esta designado en que carrera
{
$querys = new querys_consultas();
$filas = $querys->ConsultaTabla_WHERE('Matricula, Nombres, Apellido_1, Apellido_2', 'coordinador','Matricula',$Matricula);
$Datos = "";
foreach ($filas as $fila)
{
$Datos = $fila['Matricula']." - ".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2'];
}
return $Datos;
}
public function ConsultarCarrera()
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('Clave, Nombre', 'carrera');
if (count($filas) == 0)
{
echo '<option value=""></option>';
}
else
{
foreach ($filas as $fila)
{
$Clave = $fila["Clave"];
echo '<option value= "'.$Clave.'">'.$Clave." - ".$fila["Nombre"].'</option>';
}
}
}
public function ConsultarCarreras_link()
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('Clave, Nombre', 'carrera');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Clave']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td><a href='http://localhost/sistema_nava/pages/AD/asignaturas/gestion.php?Clave=".$fila['Clave']."'><button type='button' class='btn btn-primary btn-lg btn-block'>Gestionar</button></a></td>";
echo "</tr>";
}
}
}
public function ConsultarAsignaturas($Clv_Carrera)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla_WHERE('Clave, Nombre, Creditos, Semestre','asignatura','Clv_Carrera',$Clv_Carrera);
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Clave']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td>".$fila['Creditos']."</td>";
echo "<td>".$fila['Semestre']."</td>";
echo "</tr>";
}
}
}
public function ConsultarCarreras_link_alumnado()
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('Clave, Nombre', 'carrera');
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Clave']."</td>";
echo "<td>".$fila['Nombre']."</td>";
echo "<td><a href='http://localhost/sistema_nava/pages/AD/alumnado/gestion.php?Clave=".$fila['Clave']."'><button type='button' class='btn btn-primary btn-lg btn-block'>Gestionar</button></a></td>";
echo "</tr>";
}
}
}
public function ConsultarAlumnos($Clv_Carrera)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
//$filas = $query->ConsultaTabla('Clave, N', 'Asignatura');
$filas = $query->ConsultaTabla_WHERE('Matricula, Nombres, Apellido_1, Apellido_2, Correo, Telefono, Turno, Semestre, Status','alumno','Clv_Carrera',$Clv_Carrera);
if (count($filas) == 0)
{
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
}
else
{
foreach ($filas as $fila)
{
echo "<tr>";
echo "<td>".$fila['Matricula']."</td>";
echo "<td>".$fila['Nombres']." ".$fila['Apellido_1']." ".$fila['Apellido_2']."</td>";
echo "<td>".$fila['Correo']."</td>";
echo "<td>".$fila['Telefono']."</td>";
echo "<td>".$fila['Turno']."</td>";
echo "<td>".$fila['Semestre']."</td>";
echo "<td>".$fila['Status']."</td>";
echo "</tr>";
}
}
}
public function UsuarioDisponible($Clv_Usuario, $Rol)
{
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla_WHERE('Clv_Usuario','usuario','Clv_Usuario',$Clv_Usuario);
if(count($filas) >= 1)
{
$Clv_Usuario = $Clv_Usuario.random_int(2,100);
}
return $Clv_Usuario;
}
public function ValidaRegistroUsuario($Clv_Usuario,$Rol)
{
$query = new querys_consultas();
$filas = $query->ConsultaTabla_WHERE('Clv_Usuario','usuario','Clv_Usuario',$Clv_Usuario);
if(count($filas) == 0)
{
echo "<script> alert('No se pudo completar el registro, intentelo de nuevo.'); window.location.href='".$_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/nuevo.php'; </script>";
}
else
{
echo "<script> alert('El registro se logro de forma exitosa.'); window.location.href='".$_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/gestion.php'; </script>";
}
}
public function ValidaRegistroAlumno($Matricula)
{
$query = new querys_consultas();
$filas = $query->ConsultaTabla_WHERE('Matricula','alumno','Matricula',$Matricula);
if(count($filas) == 0)
{
echo "<script> alert('No se pudo completar el registro, intentelo de nuevo.'); window.location.href='".$_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/nuevo.php'; </script>";
}
else
{
echo "<script> alert('El registro se logro de forma exitosa.'); window.location.href='".$_SESSION['Ruta_web']."pages/AD/".$_SESSION['Pagina_Actual']."/gestion.php'; </script>";
}
}
public function ConsultarCarrerasP() //funcion para mostrar todas las carreras con paginacion
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_consultas.php");
$query = new querys_consultas();
$filas = $query->ConsultaTabla('*', 'carrera');
$_SESSION['Carreras'] = array();
$i=0;
if (count($filas) == 0)
{
}
else
{
foreach ($filas as $fila)
{
$_SESSION['Carreras'][$i][0] = $fila['Clave'];
$_SESSION['Carreras'][$i][1] = $fila['Nombre'];
$_SESSION['Carreras'][$i][2] = $fila['Creditos'];
$_SESSION['Carreras'][$i][3] = $fila['Creditos_Minimos_Servicio_Social'];
$_SESSION['Carreras'][$i][4] = SELF::ConsultarCoordinadorDesignado($fila['Matricula_Coordinador']);
$i++;
}
}
}
public function ConsultarCarrerasPagina($Pagina) //funcion para mostrar todas las carreras con paginacion
{
if($Pagina == 1)
{
for ($i=$Pagina; $i < ($Pagina + 10) ; $i++)
{
echo "<tr>";
echo "<td>".$_SESSION['Carreras'][$i][0]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][1]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][2]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][3]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][4]."</td>";
echo "</tr>";
}
}else
{
for ($i=($Pagina + 10); $i < ($Pagina + 20) ; $i++)
{
echo "<tr>";
echo "<td>".$_SESSION['Carreras'][$i][0]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][1]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][2]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][3]."</td>";
echo "<td>".$_SESSION['Carreras'][$i][4]."</td>";
echo "</tr>";
}
}
}
}<file_sep><?php
require_once('verificar.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("../head.html"); ?>
<style>
.table,,td {border: 1px solid black;}
</style>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Logo</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Inicio</a></li>
<li><a href="clientes.php">Clientes</a></li>
<li><a href="entradas-salidas.php">Entradas/Salidas</a></li>
<li><a href="registro.php">Nuevo Usuario</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../../php/cerrar.php"><span class="glyphicon glyphicon-log-in"></span>Cerrar sesion</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Lista de clientes dentro del Gimnasio, hoy <?php echo date("d-m-Y"); echo $_SESSION['Nombre']; echo " hola";?></h2>
<p>
<hr>
<table style="width:100%" class="table">
<tr>
<th>Matricula:</th>
<th>Nombre</th>
<th>Hora entrada</th>
<th>Hora salida</th>
<th>Marco entrada</th>
<th>Marco salida</th>
</tr>
<tr>
</tr>
</table>
</p>
</div>
</div>
</div>
<?php include("../footer.html"); ?>
asds
</body>
</html>
<file_sep><?php
require_once('../verificar.php');
$_SESSION['Pagina_Actual'] = 'direccion';
include("../../../head.php");
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-6 text-left">
<hr>
<table class="table">
<tr>
<th><a href="<?php echo $_SESSION['Ruta_web']."pages/AD/direccion/nuevo.php" ?>"><img src="<?php echo "$Ruta_Imagenes./calendario.jpg" ?>" width="130" height="120"></a></th>
<th><a href="<?php echo $_SESSION['Ruta_web']."pages/AD/direccion/gestion.php" ?>"><img src="<?php echo "$Ruta_Imagenes./entrada-salida.jpg" ?>" width="180" height="120"></a></th>
</tr>
<tr>
<th>Crear nuevo directivo</th>
<th>Gestionar usuarios</th>
</tr>
</table>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
include("../../index.php");
if(isset($_POST['Nombres']) && isset($_POST['Apellido_1'])
&& isset($_POST['Apellido_2']) && isset($_POST['Correo'])
&& isset($_POST['Telefono']) && isset($_POST['Movil'])
&& isset($_POST['Curp']) && isset($_POST['Calle'])
&& isset($_POST['Colonia']) && isset($_POST['Num_Ext'])
&& isset($_POST['Num_Int']) && isset($_POST['Municipio']) )
{
RegistrarAlumno($_POST['Nombres'],$_POST['Apellido_1'],$_POST['Apellido_2']
,$_POST['Correo'],$_POST['Telefono'],$_POST['Movil'],$_POST['Curp']
,$_POST['Calle'],$_POST['Colonia'],$_POST['Num_Ext'],$_POST['Num_Int'],$_POST['Municipio'],$_POST['Carrera'],$_POST['Turno']);
}
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Exportar lista alumnos</h2>
<br>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
class insersiones_administracion
{
public function RegistrarAdministrador($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
require('../../../mvc/modelo/administracion/clase_consultas_administracion.php');
$Clv_Usuario = SELF::UsuarioDisponible($Nombres[0].$Apellido_1.$Apellido_2, "administrador");
$query = new querys_insersiones();
$query->InsertarTablaUnica_3_campos("usuario","Clv_Usuario",$Clv_Usuario,"Password",$Clv_Usuario,"Rol","Administrador");
$query->InsertarTablaUnica_13_campos("administrador",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Calle",$Calle,
"Numero_Exterior",$Num_Ext,
"Numero_Interior",$Num_Int,
"Colonia",$Colonia,
"Municipio",$Municipio,
"Clv_Usuario",$Clv_Usuario
);
SELF::ValidaRegistroUsuario($Clv_Usuario, "administrador");
}
public function RegistrarCoordinador($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
require('../../../mvc/modelo/administracion/clase_consultas_administracion.php');
$Clv_Usuario = SELF::UsuarioDisponible($Nombres[0].$Apellido_1.$Apellido_2, "coordinador");
$query = new querys_insersiones();
$query->InsertarTablaUnica_3_campos("usuario","Clv_Usuario",$Clv_Usuario,"Password",$Clv_Usuario,"Rol","Coordinador");
$query->InsertarTablaUnica_13_campos("coordinador",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Calle",$Calle,
"Numero_Exterior",$Num_Ext,
"Numero_Interior",$Num_Int,
"Colonia",$Colonia,
"Municipio",$Municipio,
"Clv_Usuario",$Clv_Usuario
);
SELF::ValidaRegistroUsuario($Clv_Usuario, "coordinador");
}
public function RegistrarDocente($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
require('../../../mvc/modelo/administracion/clase_consultas_administracion.php');
$Clv_Usuario = SELF::UsuarioDisponible($Nombres[0].$Apellido_1.$Apellido_2, "maestro");
$query = new querys_insersiones();
$query->InsertarTablaUnica_3_campos("usuario","Clv_Usuario",$Clv_Usuario,"Password",$Clv_Usuario,"Rol","Maestro");
$query->InsertarTablaUnica_13_campos("maestro",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Calle",$Calle,
"Numero_Exterior",$Num_Ext,
"Numero_Interior",$Num_Int,
"Colonia",$Colonia,
"Municipio",$Municipio,
"Clv_Usuario",$Clv_Usuario
);
SELF::ValidaRegistroUsuario($Clv_Usuario, "maestro");
}
public function RegistrarDirectivo($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
require('../../../mvc/modelo/administracion/clase_consultas_administracion.php');
$Clv_Usuario = SELF::UsuarioDisponible($Nombres[0].$Apellido_1.$Apellido_2, "directivo");
$query = new querys_insersiones();
$query->InsertarTablaUnica_3_campos("usuario","Clv_Usuario",$Clv_Usuario,"Password",$Clv_Usuario,"Rol","Directivo");
$query->InsertarTablaUnica_13_campos("directivo",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Calle",$Calle,
"Numero_Exterior",$Num_Ext,
"Numero_Interior",$Num_Int,
"Colonia",$Colonia,
"Municipio",$Municipio,
"Clv_Usuario",$Clv_Usuario
);
SELF::ValidaRegistroUsuario($Clv_Usuario, "directivo");
}
public function RegistrarBiblioteca($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
require('../../../mvc/modelo/administracion/clase_consultas_administracion.php');
$Clv_Usuario = SELF::UsuarioDisponible($Nombres[0].$Apellido_1.$Apellido_2, "libreria");
$query = new querys_insersiones();
$query->InsertarTablaUnica_3_campos("usuario","Clv_Usuario",$Clv_Usuario,"Password",$<PASSWORD>,"Rol","Biblioteca");
$query->InsertarTablaUnica_13_campos("libreria",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Calle",$Calle,
"Numero_Exterior",$Num_Ext,
"Numero_Interior",$Num_Int,
"Colonia",$Colonia,
"Municipio",$Municipio,
"Clv_Usuario",$Clv_Usuario
);
SELF::ValidaRegistroUsuario($Clv_Usuario, "libreria");
}
public function RegistrarCarrera($Nombre,$Clave,$Creditos,$CreditosM,$Matricula_Coordinador)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
$query = new querys_insersiones();
$query->InsertarTablaUnica_5_campos("carrera",
"Clave",$Clave,
"Nombre",$Nombre,
"Matricula_Coordinador",$Matricula_Coordinador,
"Creditos",$Creditos,
"Creditos_Minimos_Servicio_Social",$CreditosM
);
echo"<script> alert('se ha regisrado una nueva carrera'); window.location.href=\"http://localhost/sistema_nava/pages/AD/carreras/gestion.php\"</script>";
}
public function RegistrarAsignatura($Nombre,$Clave,$Creditos,$Semestre,$Carrera)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
$query = new querys_insersiones();
$query->InsertarTablaUnica_5_campos("asignatura",
"Clave",$Clave,
"Nombre",$Nombre,
"Clv_Carrera",$Carrera,
"Creditos",$Creditos,
"Semestre",$Semestre
);
echo"<script> alert('se ha regisrado una nueva asignatura'); window.location.href=\"http://localhost/sistema_nava/pages/AD/asignaturas/gestion.php\"</script>";
}
public function RegistrarAlumno($Nombres,$Apellido_1,$Apellido_2,$Correo,$Telefono,$Movil,$Curp,$Calle,$Colonia,$Num_Ext,$Num_Int,$Municipio,$Carrera,$Turno)
{
require('../../../mvc/controlador/clase_conexion.php');
require("../../../mvc/controlador/clase_querys_insersiones.php");
$query = new querys_insersiones();
$query->InsertarTablaUnica_18_campos("alumno",
"Nombres",$Nombres,
"Apellido_1",$Apellido_1,
"Apellido_2",$Apellido_2,
"Correo",$Correo,
"Telefono",$Telefono,
"Movil",$Movil,
"CURP",$Curp,
"Password",$Nombres[0].$Apellido_1.$Apellido_2,
"Turno",$Turno,
"Clv_Carrera",$Carrera,
"Semestre",'1',
"Status",'Activo',
"Fecha_Registro",date("Y-m-d"),
"Calle",$Calle,
"Numero_Interior",$Num_Int,
"Numero_Exterior",$Num_Ext,
"Colonia",$Colonia,
"Municipio",$Municipio
);
SELF::ValidaRegistroAlumno(LAST_INSERT_ID());
//echo"<script> alert('se ha registrado un nuevo alumno'); window.location.href=\"http://localhost/sistema_nava/pages/AD/alumnado/gestion.php\"</script>";
}
public function UsuarioDisponible($Clv_Usuario, $Rol)
{
$retornar = '';
$llamado = new consultas_administracion();
$retornar = $llamado->UsuarioDisponible($Clv_Usuario, $Rol);
return $retornar;
}
public function ValidaRegistroUsuario($Clv_Usuario, $Rol)
{
$llamado = new consultas_administracion();
$llamado->ValidaRegistroUsuario($Clv_Usuario, $Rol);
}
public function ValidaRegistroAlumno($Matricula)
{
$llamado = new consultas_administracion();
$llamado->ValidaRegistroAlumno($Matricula);
}
}<file_sep><?php
class querys_updates
{
}
?><file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2>Lista de administradores</h2>
<p>
<hr>
<table style="width:100%" class="table">
<tr>
<th style="text-align-last: center">Matricula</th>
<th>Nombre Completo</th>
<th>Correo</th>
<th>Telefono</th>
<th>Movil</th>
<th>CURP</th>
<th>Calle</th>
<th>Num. Exterior</th>
<th>Num. Interior</th>
<th>Colonia</th>
<th>Municipio</th>
<th>Clave de Usuario</th>
</tr>
<tr>
<?php $llamado->ConsultarAdministrador(); ?>
</tr>
</table>
</p>
</div>
<div class="form-group">
<div class="col-lg-2">
<a href="http://localhost/sistema_nava/pages/AD/administracion/"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>
</div>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
<file_sep><?php
$Ruta_Imagenes = $_SESSION['Ruta_web'].'images/icons/';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>sistema nava</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/style.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['Ruta_web'];?>css/main.css">
<script src="<?php echo $_SESSION['Ruta_web'];?>js/jquery.min.js"></script>
<script src="<?php echo $_SESSION['Ruta_web'];?>js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Logo</a>
</div>
<?php
include('../menu.php');
?>
</div>
</nav>
<file_sep><?php
require_once('../verificar.php');
include("../../../head.php");
require_once("../../../mvc/modelo/administracion/clase_consultas_administracion.php");
$llamado = new consultas_administracion();
?>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-12 text-left">
<br>
<h2><?php if(!isset($_GET['Clave'])){echo "Lista de Carreras";}else{echo "Lista asginaturas de la carrera ".$_GET['Clave']."";}?></h2>
<p>
<hr>
<table style="width:100%" class="table">
<tr>
<th>Clave</th>
<th>Nombre</th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Creditos";}?></th>
<th><?php if(!isset($_GET['Clave'])){echo "";}else{ echo "Semestre";}?></th>
</tr>
<tr>
<?php if(!isset($_GET['Clave'])){$llamado->ConsultarCarreras_link();}else{ $llamado->ConsultarAsignaturas($_GET['Clave']);}?>
</tr>
</table>
</p>
</div>
<div class="form-group">
<div class="col-lg-2">
<?php if(!isset($_GET['Clave']))
{
echo '<a href="'.$_SESSION['Ruta_web'].'pages/AD/asignaturas/"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>';
}
else
{
echo '<a href="'.$_SESSION['Ruta_web'].'pages/AD/asignaturas/gestion.php"><button type="button" class="btn btn-primary btn-lg btn-block">Regresar</button></a>';
}
?>
</div>
</div>
</div>
</div>
<?php include("../../../footer.php"); ?>
</body>
</html>
|
bb89f67ad3258c4bc81ba32a1385d703517bc03f
|
[
"JavaScript",
"SQL",
"PHP"
] | 27
|
PHP
|
knavaH/sistema_nava
|
93f2c9816d93e1b93712bb4da417d7b4f2590543
|
5c4b84686ed0e4eee786f0fc801bf24e208d433a
|
refs/heads/master
|
<repo_name>marcinburo/merchant-api-client-csharp<file_sep>/FlubitMerchantApiClient/Exception/UnauthorizedException.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlubitMerchantApiClient.Exception
{
public class UnauthorizedException : System.Exception
{
public UnauthorizedException(string message, int errorCode) : base(message)
{
ErrorCode = errorCode;
}
public int ErrorCode { get; protected set; }
}
}
<file_sep>/FlubitMerchantApiClientTest/UnitTest1.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FlubitMerchantApiClient;
using FlubitMerchantApiClient.Exception;
using System.Xml;
namespace FlubitMerchantApiClientTest
{
[TestClass]
public class UnitTest1
{
protected XmlDocument CreateXmlDocument(string xml)
{
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
return doc;
}
[TestMethod]
public void TestMethod1()
{
Client client = new Client("3852-7829-6555", "ujgdkrmngi8c00ssgk04ss0ssc08k0cg40w8cgo0", "api.sandbox.weflubit.com");
try
{
XmlDocument result = client.GetAccountStatus();
var s = result.OuterXml;
int.Parse(result.GetElementsByTagName("active_products").Item(0).InnerText);
}
catch (Exception)
{
Assert.Fail();
}
try
{
XmlDocument result = client.GetProductsFeed("1234");
}
catch (BadMethodCallException e)
{
Assert.IsTrue(e.ErrorCode == 404);
}
catch (Exception e)
{
Assert.Fail();
}
string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><products><product sku=\"123456SKU\"><title>iPhone 5 Hybrid Rubberised Back Cover Case</title><identifiers>" +
"<identifier type=\"ASIN\">B008OSEQ64</identifier></identifiers></product></products>";
string feedId = null;
try
{
XmlDocument result = client.CreateProducts(CreateXmlDocument(xml));
}
catch (Exception)
{
Assert.Fail();
}
try
{
XmlDocument result = client.GetOrders(DateTime.Now.AddYears(-1), "awaiting_dispatch");
}
catch (Exception)
{
Assert.Fail();
}
}
}
}
<file_sep>/FlubitMerchantApiClient/Exception/BadMethodCallException.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlubitMerchantApiClient.Exception
{
public class BadMethodCallException : System.Exception
{
public BadMethodCallException(string message, int errorCode)
: base(message)
{
ErrorCode = errorCode;
}
public int ErrorCode { get; protected set; }
}
}
<file_sep>/README.md
Merchant API Client
==========================
Flubit Merchant API C# client library.
<file_sep>/FlubitMerchantApiClient/Client/Client.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.Xml;
using FlubitMerchantApiClient.Exception;
namespace FlubitMerchantApiClient
{
public class Client : ClientInterface
{
private string _apiSecret;
private string _apiKey;
private string _domain;
public Client(string apiKey, string apiSecret, string domain = "api.weflubit.com")
{
this._apiKey = apiKey;
this._apiSecret = apiSecret;
this._domain = domain;
}
protected string ToDFTString(DateTime dateTime)
{
return dateTime.ToUniversalTime().ToString("u").Replace(" ", "T");
}
protected string GetAuthHeader()
{
string created = ToDFTString(DateTime.Now);
RandomNumberGenerator rng = new RNGCryptoServiceProvider();
byte[] tokenData = new byte[32];
rng.GetBytes(tokenData);
string nonce = Convert.ToBase64String(tokenData);
SHA1 sha1 = SHA1.Create();
string signature = Convert.ToBase64String(sha1.ComputeHash(tokenData.Concat(System.Text.UTF8Encoding.UTF8.GetBytes(created + _apiSecret)).ToArray()));
return string.Format("key=\"{0}\", signature=\"{1}\", nonce=\"{2}\", created=\"{3}\"", _apiKey, signature, nonce, created);
}
protected XmlDocument HandleRequest(HttpWebRequest request)
{
request.KeepAlive = false;
request.Headers["auth-token"] = GetAuthHeader();
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
var responseValue = string.Empty;
var responseStream = response.GetResponseStream();
if (responseStream != null)
{
XmlDocument doc = new XmlDocument();
doc.Load(responseStream);
return doc;
}
}
catch (WebException e)
{
response = (HttpWebResponse)e.Response;
}
if (response != null)
{
var responseStream = response.GetResponseStream();
if (responseStream != null)
{
XmlDocument doc = new XmlDocument();
doc.Load(responseStream);
var error = doc.GetElementsByTagName("error").Item(0);
string message = error.Attributes["message"].Value;
if (response.StatusCode == HttpStatusCode.Unauthorized)
{
int code = int.Parse(error.Attributes["code"].Value);
throw new UnauthorizedException(message, code);
}
else
throw new BadMethodCallException(message, (int)response.StatusCode);
}
}
return null;
}
protected XmlDocument GetRequest(string uri, Dictionary<string, string> parameters)
{
var request = (HttpWebRequest)WebRequest.Create(string.Format("http://{0}/1/{1}{2}", _domain, uri, BuildQueryParams(parameters)));
request.Method = "GET";
request.ContentType = "application/atom+xml";
return HandleRequest(request);
}
protected XmlDocument PostRequest(string uri, XmlDocument xml, Dictionary<string, string> parameters)
{
var request = (HttpWebRequest)WebRequest.Create(string.Format("http://{0}/1/{1}{2}", _domain, uri, BuildQueryParams(parameters)));
request.Method = "POST";
request.Accept = "application/xml";
if (xml != null)
{
Stream stream;
try
{
stream = request.GetRequestStream();
xml.Save(stream);
stream.Flush();
}
catch(Exception e){}
finally
{
if (stream != null)
stream.Close();
}
}
return HandleRequest(request);
}
protected string BuildQueryParams(Dictionary<string, string> parameters)
{
if (parameters != null && parameters.Any())
{
StringBuilder builder = new StringBuilder();
builder.Append("?");
builder.Append(parameters.First().Key);
builder.Append("=");
builder.Append(parameters.First().Value);
foreach(var param in parameters.Skip(1))
{
builder.Append("&");
builder.Append(param.Key);
builder.Append("=");
builder.Append(param.Value);
}
return builder.ToString();
}
return "";
}
protected XmlDocument GenerateCancelOrderPayload(string reason)
{
return CreateXmlDocument(string.Format("<?xml version=\"1.0\" encoding=\"UTF-8\"?><cancel><reason>{0}</reason></cancel>", reason));
}
protected XmlDocument GenerateDispatchOrderPayload(DateTime dateTime, Dictionary<string, string> parameters)
{
var courier = parameters.ContainsKey("courier") ? parameters["courier"] : "";
var consignmentNumber = parameters.ContainsKey("consignment_number") ? parameters["consignment_number"] : "";
var trackingUrl = parameters.ContainsKey("tracking_url") ? parameters["tracking_url"] : "";
return CreateXmlDocument(string.Format("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
@"<dispatch>
<dispatched_at>{0}</dispatched_at>
<courier>{1}</courier>
<consignment_number>{2}</consignment_number>
<tracking_url>{3}</tracking_url>
</dispatch>", ToDFTString(dateTime), courier, consignmentNumber, trackingUrl));
}
protected Dictionary<string, string> CreateDictionary(string key, string value)
{
Dictionary<string, string> dic = new Dictionary<string,string>();
dic.Add(key, value);
return dic;
}
protected XmlDocument CreateXmlDocument(string xml)
{
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
return doc;
}
public XmlDocument GetAccountStatus()
{
return GetRequest("account/status.xml", null);
}
public XmlDocument DispatchOrderByFlubitId(string id, DateTime dateTime, Dictionary<string, string> parameters)
{
var xml = GenerateDispatchOrderPayload(dateTime, parameters);
return PostRequest("orders/dispatch.xml", xml, CreateDictionary("flubit_order_id", id));
}
public XmlDocument DispatchOrderByMerchantOrderId(string id, DateTime dateTime, Dictionary<string, string> parameters)
{
var xml = GenerateDispatchOrderPayload(dateTime, parameters);
return PostRequest("orders/dispatch.xml", xml, CreateDictionary("merchant_order_id", id));
}
public XmlDocument CancelOrderByFlubitId(string id, string reason)
{
var xml = GenerateCancelOrderPayload(reason);
return PostRequest("orders/cancel.xml", xml, CreateDictionary("flubit_order_id", id));
}
public XmlDocument CancelOrderByMerchantOrderId(string id, string reason)
{
var xml = GenerateCancelOrderPayload(reason);
return PostRequest("orders/cancel.xml", xml, CreateDictionary("merchant_order_id", id));
}
public XmlDocument RefundOrderByFlubitId(string id)
{
return PostRequest("orders/refund.xml", null, CreateDictionary("flubit_order_id", id));
}
public XmlDocument RefundOrderByMerchantOrderId(string id)
{
return PostRequest("orders/refund.xml", null, CreateDictionary("merchant_order_id", id));
}
public XmlDocument GetOrders(DateTime from, string status)
{
var dic = CreateDictionary("from", ToDFTString(from));
dic.Add("status", status);
return GetRequest("orders/filter.xml", dic);
}
public XmlDocument GetProductsFeed(string feedID)
{
return GetRequest(string.Format("products/feed/{0}.xml", feedID), null);
}
public XmlDocument CreateProducts(XmlDocument productXml)
{
return PostRequest("products/feed.xml", productXml, CreateDictionary("type", "create"));
}
public XmlDocument UpdateProducts(XmlDocument productXml)
{
return PostRequest("products/feed.xml", productXml, null);
}
public XmlDocument GetProducts(bool isActive, string sku, int limit, int page)
{
var dic = CreateDictionary("is_active", isActive ? "1" : "0");
dic.Add("sku", sku);
dic.Add("limit", limit.ToString());
dic.Add("page", page.ToString());
return GetRequest("products/filter.xml", dic);
}
}
}
|
647b85e86821a9d462f19508f523b7b9852e18ad
|
[
"Markdown",
"C#"
] | 5
|
C#
|
marcinburo/merchant-api-client-csharp
|
77fb39cc2de3e3f8f3e8d58bd8009389959a5466
|
a19be671b384830d09c240e45b195e7c523ddf2b
|
refs/heads/master
|
<file_sep># Giphy-API
Type in an animal you'd like to see and it will generate 10 giphy images with their rating!<file_sep>var giphyButtons = ["panda", "cat", "owl"];
function displayButtons() {
console.log("looping")
$("#buttons").empty();
for (var i = 0; i < giphyButtons.length; i++) {
var newButton = $("<button>");
newButton.text(giphyButtons[i]);
newButton.attr("data-animal", giphyButtons[i])
newButton.addClass("buttons");
$("#buttons").append(newButton);
}
}
displayButtons()
$(document).on("click", ".buttons", function () {
var animal = $(this).attr("data-animal");
var queryURL = "https://api.giphy.com/v1/gifs/search?q=" + animal + "&api_key=dc6zaTOxFJmzC&limit=10";
$.ajax({
url: queryURL,
method: "GET"
})
.then(function (response) {
console.log(response)
$("#giphy-images").empty();
for (var i = 0; i < response.data.length; i++) {
var giphyContainer = $("<div>");
var newImage = $("<img>");
newImage.attr("src", response.data[i].images.original_still.url);
newImage.attr("data-animated", response.data[i].images.original.url);
newImage.attr("data-still", response.data[i].images.original_still.url);
newImage.attr("gif-state", 'still');
giphyContainer.append(newImage);
var newRating = $("<p>");
newRating.text("Rating: " + response.data[i].rating);
giphyContainer.append(newRating);
$("#giphy-images").append(giphyContainer);
}
})
})
$("#add-animal-form").on("submit", function (event) {
event.preventDefault();
var inputAnimal = $("#input").val();
giphyButtons.push(inputAnimal)
displayButtons()
console.log(inputAnimal)
})
$("#giphy-images").on("click", "img", function () {
var state = $(this).attr("gif-state");
if (state == "still") {
$(this).attr("src", $(this).attr("data-animated"));
$(this).attr("gif-state", "animate");
} else {
$(this).attr("src", $(this).attr("data-still"));
$(this).attr("gif-state", "still");
};
});
|
4825954f06d1f39620d4a9802ca27bac8e901af6
|
[
"Markdown",
"JavaScript"
] | 2
|
Markdown
|
felsuna/Giphy-API
|
3ba5c2539638437241a6fbf7e4d6408e71045158
|
269681e73ac8f72848661faaefb83eed1a700053
|
refs/heads/master
|
<file_sep>#' install.packages & library
#'
#' mom_gamma function will calculate mom estimate for the shape parameter "k" and the scale parameter "theta" by using given sample.
#'
#' @param package is package names.
#' @return package & library
#' @examples #' pack(package=c('sp','plyr'))
#' @export
pack=function (package, character.only = T, quietly = F, lib.loc = NULL,
warn.conflicts = T)
{
if (!character.only) {
package <- as.character(substitute(package))
}
for(i in 1:length(package)){
loaded <- paste0("package:", package[i]) %in% search()
if (!loaded) {
if (!quietly) {
packageStartupMessage(gettextf("Loading required package: %s",
package[i]), domain = NA)
}
value <- tryCatch(library(package[i], lib.loc = lib.loc,
character.only = T, logical.return = T, warn.conflicts = warn.conflicts,
quietly = quietly), error = function(e) e)
if (inherits(value, "error")) {
if (!quietly) {
msg <- conditionMessage(value)
cat("Failed with error: ", sQuote(msg), "\n",
file = stderr(), sep = "")
.Internal(printDeferredWarnins())
}
return(invisible(FALSE))
}
if (!value) {
install.packages(package)
value <- tryCatch(library(package, lib.loc = lib.loc,
character.only = T, logical.return = T, warn.conflicts = warn.conflicts,
quietly = quietly), error = function(e) e)
return(invisible(FALSE))
}
}
else value <- TRUE
invisible(value)
}
}
|
3e3e29d52ac15dbfc51d1cc7022606b672d6ed15
|
[
"R"
] | 1
|
R
|
qkdrk777777/kma
|
b0bf534cfd78792f1d5e572047c57622294108ad
|
bbf93c67ee3c0b4478de8134c42495e16e0df123
|
refs/heads/master
|
<file_sep>using System;
using SFML.Window;
namespace FreeScape.Engine.Input.Config.Action
{
public class SfmlActionResolver
{
public Keyboard.Key GetKeyboardKey(string action)
{
return Enum.Parse<Keyboard.Key>(action);
}
public Mouse.Button GetMouseButton(string action)
{
return Enum.Parse<Mouse.Button>(action);
}
public Mouse.Wheel GetMouseWheel(string action)
{
return Enum.Parse<Mouse.Wheel>(action);
}
public string GetAction(Keyboard.Key key)
{
return key.ToString();
}
public string GetAction(Mouse.Button button)
{
return button.ToString();
}
public string GetAction(Mouse.Wheel wheel)
{
return wheel.ToString();
}
}
}<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public class TiledObject
{
public int Gid { get; set; }
public string Name { get; set; }
public float Rotation { get; set; }
public string Type { get; set; }
public bool Visible { get; set; }
public float Height { get; set; }
public float Width { get; set; }
public float X { get; set; }
public float Y { get; set; }
}
}
<file_sep>using System;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Scenes;
using FreeScape.Engine.Settings;
using FreeScape.Engine.Sfx;
using FreeScape.Layers.MainMenu;
namespace FreeScape.Scenes
{
public class MainMenuScene : LayeredScene
{
private readonly LayerProvider _layerProvider;
private readonly SoundProvider _sounds;
private readonly DisplayManager _displayManager;
public MainMenuScene(ActionProvider actionProvider, LayerProvider layerProvider, SoundProvider sounds, DisplayManager displayManager, SoundSettings sound)
{
actionProvider.SwitchActionMap("MainMenu");
_displayManager = displayManager;
_layerProvider = layerProvider;
_sounds = sounds;
actionProvider.SubscribeOnPressed(x =>
{
if (x == "VolUp")
{
sound.MusicVolume++;
Console.WriteLine($"Volume set to: {sound.MusicVolume}");
}
});
}
public override void Init()
{
Active = true;
Layers.Add(_layerProvider.Provide<MainMenuHome>());
Layers.Add(_layerProvider.Provide<MainMenuOptions>());
Layers.Add(_layerProvider.Provide<MainMenuBackground>());
_sounds.PlayMusic("intro");
}
public override void Dispose()
{
}
}
}<file_sep>using System.Text.Json;
using AsperandLabs.UnitStrap.Core.Abstracts;
using AsperandLabs.UnitStrap.Core.Extenstions;
using FreeScape.Engine.Core;
using FreeScape.Engine.Input;
using FreeScape.Engine.Physics;
using Microsoft.Extensions.DependencyInjection;
using FreeScape.Engine.Render;
using FreeScape.Engine.Sfx;
namespace FreeScape.Engine
{
public class EngineUnitStrapper : BaseUnitStrapper<GameInfo>
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services, GameInfo info)
{
services.AddSingleton<Game>();
services.AddSingleton(info);
services.AddUnit<RenderUnitStrapper>();
services.AddUnit<CoreUnitStrapper>();
services.AddUnit<InputUnitStrapper>();
services.AddUnit<PhysicsUnitStrapper>();
services.AddUnit<SoundUnitStrapper>();
services.AddSingleton(new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
});
return services;
}
}
}<file_sep>namespace FreeScape.Engine.Input.Config.Action
{
public class MappedAction
{
public string Action { get; set; }
public string Button { get; set; }
public string Device { get; set; }
public bool OnPressed { get; set; }
public bool OnReleased { get; set; }
}
}<file_sep>using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace FreeScape.Engine.Tests
{
public static class CollectionAsserts
{
public static void AssertInBounds(IEnumerable<double> source, double average, double maximumDelta)
{
var min = source.Min();
var max = source.Max();
Assert.Greater(min, average - maximumDelta, $"Found a value ({min}) which was lower than the permitted lower bound of ${average - maximumDelta}");
Assert.Less(max, average + maximumDelta, $"Found a value ({max}) which was higher than the permitted upper bound of ${average + maximumDelta}");
}
public static void AverageIsEqual(IEnumerable<double> source, double expectedValue, double maximumDelta = 0)
{
Assert.AreEqual(expectedValue, source.Average(), maximumDelta);
}
}
}<file_sep>using System.Collections.Generic;
using FreeScape.Engine.Core;
using NUnit.Framework;
namespace FreeScape.Engine.Tests.ProviderTests
{
public class FrameTimeTests
{
private const int NUMER_OF_RUNS = 20;
private const double ACCEPTABLE_ACCURACY = 0.1;
private const double MAXIMUM_DELTA = 0.4;
private FrameTimeProvider _frameTime;
[SetUp]
public void Setup()
{
_frameTime = new FrameTimeProvider();
}
[Test]
public void AccuratelyMeasures1Millisecond()
{
var times = new List<double>();
for (var i = 0; i < NUMER_OF_RUNS; i++)
{
_frameTime.Tick();
AccurateWaiter.WaitMs(1);
_frameTime.Tick();
times.Add(_frameTime.DeltaTimeMilliSeconds);
}
CollectionAsserts.AverageIsEqual(times, 1, ACCEPTABLE_ACCURACY);
CollectionAsserts.AssertInBounds(times, 1, MAXIMUM_DELTA);
}
[Test]
public void AccuratelyMeasures1Second()
{
var times = new List<double>();
for (var i = 0; i < NUMER_OF_RUNS; i++)
{
_frameTime.Tick();
AccurateWaiter.WaitMs(1000);
_frameTime.Tick();
times.Add(_frameTime.DeltaTimeSeconds);
}
CollectionAsserts.AverageIsEqual(times, 1, ACCEPTABLE_ACCURACY);
CollectionAsserts.AssertInBounds(times, 1, MAXIMUM_DELTA);
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeScape.Engine.Physics.Collisions.Colliders
{
public enum ColliderType
{
Solid,
Trigger,
Damage,
Empty
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace FreeScape.Engine.Core
{
public class FrameTimeProvider
{
private const double MS_PER_SECOND = 1000;
private long _lastTicks;
private readonly Stopwatch _stopwatch;
private readonly Queue<double> _lastMss;
public FrameTimeProvider()
{
_stopwatch = Stopwatch.StartNew();
_lastMss = new Queue<double>();
}
internal void Tick()
{
_lastMss.Enqueue(DeltaTimeMilliSeconds);
if (_lastMss.Count > 1000)
{
Console.WriteLine($"Last 1000 frames statistics. Average: {_lastMss.Average():F}ms; Min: {_lastMss.Min():F}ms; Max: {_lastMss.Max():F}ms");
_lastMss.Clear();
}
_lastTicks = _stopwatch.ElapsedTicks;
_stopwatch.Restart();
}
public double DeltaTimeSeconds => DeltaTimeMilliSeconds/MS_PER_SECOND;
public double DeltaTimeMilliSeconds => (_lastTicks / (float)Stopwatch.Frequency) * 1000;
}
}<file_sep>using System.Numerics;
using FreeScape.Engine.Core.GameObjects;
namespace FreeScape.Engine.Physics.Movement
{
public interface IMovable : IGameObject
{
float Speed { get; }
HeadingVector HeadingVector { get; }
new Vector2 Position { get; set; }
}
}
<file_sep>using System.IO;
using System.Reflection;
using AsperandLabs.UnitStrap.Core.Extenstions;
using FreeScape.Engine;
using FreeScape.Engine.Settings;
using FreeScape.GameObjects;
using FreeScape.GameObjects.Player;
using FreeScape.Layers;
using FreeScape.Layers.MainMenu;
using FreeScape.Scenes;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape
{
public class Bootstrapper
{
public static IServiceCollection Bootstrap(IServiceCollection services)
{
var config = new GameInfo
{
Name = "FreeScape",
AssetDirectory =
$"{Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)}{Path.DirectorySeparatorChar}Assets"
};
var sound = new SoundSettings
{
SfxVolume = 100.0f,
MusicVolume = 0.0f
};
var graphics = new GraphicsSettings
{
ScreenHeight = 1080,
ScreenWidth = 1920,
VSyncEnabled = false,
RefreshRate = int.MaxValue
};
services.AddUnitStrapper();
services.AddUnit<EngineUnitStrapper, GameInfo>(config);
services.AddSingleton(sound);
services.AddSingleton(graphics);
services.AddTransient<MainMenuScene>();
services.AddTransient<TestScene>();
services.AddTransient<Player>();
services.AddTransient<PlayerUI>();
services.AddTransient<TestTileMap>();
services.AddTransient<EntityLayer>();
services.AddTransient<MainMenuOptions>();
services.AddTransient<MainMenuHome>();
services.AddTransient<PlayerUI>();
services.AddTransient<PauseMenu>();
services.AddTransient<MainMenuBackground>();
return services;
}
}
}<file_sep>using AsperandLabs.UnitStrap.Core.Abstracts;
using FreeScape.Engine.Render.Animations;
using FreeScape.Engine.Render.Animations.AnimationTypes;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Textures;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Render
{
public class RenderUnitStrapper : BaseUnitStrapper
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services)
{
services.AddSingleton<AnimationProvider>();
services.AddTransient<CyclicAnimation>();
services.AddTransient<OneShotAnimation>();
services.AddSingleton<LayerProvider>();
services.AddSingleton<TextureProvider>();
services.AddSingleton<MapProvider>();
return services;
}
}
}<file_sep>using System.Numerics;
using FreeScape.Engine.Physics.Collisions.Colliders;
namespace FreeScape.Engine.Physics
{
public class ColliderProvider
{
public ColliderProvider()
{
}
public CircleCollider CreateCircleCollider(Vector2 position, Vector2 center, float radius)
{
CircleCollider collider = new CircleCollider(position, center, radius);
return collider;
}
public RectangleCollider CreateRectangleCollider(Vector2 size, Vector2 position)
{
RectangleCollider collider = new RectangleCollider(size, position);
return collider;
}
}
}
<file_sep>using System.Numerics;
using FreeScape.Engine.Render;
namespace FreeScape.Engine.Core.GameObjects
{
public interface IGameObject : IRenderable, ITickable
{
Vector2 Size { get; }
Vector2 Position { get; }
Vector2 Scale { get; }
public abstract void Init();
}
}<file_sep>using SFML.Graphics;
namespace FreeScape.Engine.Core.GameObjects.UI
{
public interface IButton : IUIObject
{
Texture ButtonTexture { get; set; }
void OnClick();
}
}<file_sep>using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Settings;
using SFML.Audio;
namespace FreeScape.Engine.Sfx
{
public class SoundProvider : IDisposable
{
private readonly GameInfo _info;
private readonly SoundSettings _settings;
private readonly Dictionary<string, SoundInfo> _soundDescriptors;
private readonly Dictionary<string, PreloadedSound> _preloadSounds;
private Music _currentTrack;
public SoundProvider(GameInfo info, SoundSettings settings)
{
_info = info;
_settings = settings;
_soundDescriptors = new Dictionary<string, SoundInfo>();
_preloadSounds = new Dictionary<string, PreloadedSound>();
_settings.Subscribe(SetSettings);
foreach (var file in Directory.EnumerateFiles(info.SoundDirectory).Where(x => x.EndsWith(".json", StringComparison.CurrentCultureIgnoreCase)))
{
var name = file.Split(Path.DirectorySeparatorChar).Last().Split('.').First();
var descriptor = GetDescriptor(file, name);
if(descriptor.Preload)
PreloadSound(descriptor, name);
_soundDescriptors.Add(name, descriptor);
}
}
public void PlaySound(string name)
{
if (_preloadSounds.TryGetValue(name, out var sound))
{
sound.Sound.Volume = _settings.SfxVolume;
sound.Sound.Play();
}
}
public void PlayMusic(string name)
{
if (_soundDescriptors.TryGetValue(name, out var soundInfo))
{
_currentTrack?.Stop();
_currentTrack?.Dispose();
_currentTrack = new Music(soundInfo.FilePath);
_currentTrack.Volume = _settings.MusicVolume;
_currentTrack.Loop = soundInfo.IsLooped;
_currentTrack.Play();
}
}
public void PauseMusic()
{
_currentTrack?.Pause();
}
public void PlayMusic()
{
_currentTrack?.Play();
}
private SoundInfo GetDescriptor(string path, string name)
{
var text = File.ReadAllText(path);
var descriptor = JsonSerializer.Deserialize<SoundInfo>(text);
descriptor.FilePath = $"{_info.SoundDirectory}{Path.DirectorySeparatorChar}{name}{descriptor.Extension}";
return descriptor;
}
private void PreloadSound(SoundInfo info, string name)
{
var sound = new PreloadedSound(info);
_preloadSounds.Add(name, sound);
}
private void SetSettings()
{
if(_currentTrack != null)
_currentTrack.Volume = _settings.MusicVolume;
}
public void Dispose()
{
_currentTrack?.Stop();
_currentTrack?.Dispose();
}
}
}<file_sep>using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace FreeScape.Engine.Tests
{
public class AccurateWaiter
{
public static void WaitMs(int ms)
{
var timer = Stopwatch.StartNew();
while (true)
{
if (timer.ElapsedMilliseconds == ms)
break;
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Render;
using FreeScape.Engine.Render.Scenes;
using FreeScape.Engine.Settings;
using SFML.Graphics;
using SFML.Window;
namespace FreeScape.Engine.Core.Managers
{
public class DisplayManager
{
private readonly GameInfo _info;
private readonly GraphicsSettings _graphicsSettings;
private readonly GameManager _gameManager;
private readonly FrameTimeProvider _frameTime;
private RenderWindow _renderTarget;
private readonly List<Perspective> _perspectives;
private bool _hasFocus = true;
public Perspective CurrentPerspective { get; private set; }
public DisplayManager(GameInfo info, GraphicsSettings graphicsSettings, GameManager gameManager, FrameTimeProvider frameTime)
{
_frameTime = frameTime;
_info = info;
_graphicsSettings = graphicsSettings;
_gameManager = gameManager;
_perspectives = new List<Perspective>();
_graphicsSettings.Subscribe(SetSettings);
Reset();
}
public void Render(IScene scene)
{
_renderTarget.Clear();
_renderTarget.DispatchEvents();
foreach (var view in _perspectives)
{
CurrentPerspective = view;
view.Tick();
_renderTarget.View = view.WorldView;
scene.RenderWorld(_renderTarget);
_renderTarget.View = view.ScreenView;
scene.RenderScreen(_renderTarget);
_renderTarget.Display();
}
}
public void Reset()
{
_renderTarget?.Close();
var videoMode = new VideoMode(_graphicsSettings.ScreenWidth, _graphicsSettings.ScreenHeight);
_renderTarget = new RenderWindow(videoMode, _info.Name);
var view = new Perspective("main", new Vector2(0.0f, 0.0f), _graphicsSettings.ScreenSize, 3.0f, _frameTime);
_perspectives.Add(view);
if(_graphicsSettings.VSyncEnabled)
_renderTarget.SetVerticalSyncEnabled(true);
else
_renderTarget.SetFramerateLimit(_graphicsSettings.RefreshRate);
_renderTarget.SetActive(false);
_renderTarget.Closed += (sender, args) => _gameManager.Stop();
_renderTarget.LostFocus += (sender, args) => _hasFocus = false;
_renderTarget.GainedFocus += (sender, args) => _hasFocus = true;
}
private void SetSettings()
{
_renderTarget.Size = _graphicsSettings.ScreenSize;
if(_graphicsSettings.VSyncEnabled)
_renderTarget.SetVerticalSyncEnabled(true);
else
_renderTarget.SetFramerateLimit(_graphicsSettings.RefreshRate);
foreach (var p in _perspectives)
{
p.WorldView.Size = _renderTarget.Size / p.WorldScaling;
p.ScreenView.Size = _renderTarget.Size / p.ScreenScaling;
}
}
public void Track(Func<Perspective, bool> selector, IGameObject target)
{
_perspectives.FirstOrDefault(selector)?.Track(target);
}
internal void RegisterOnPressed(EventHandler<KeyEventArgs> handle)
{
_renderTarget.KeyPressed += handle;
}
internal void RegisterOnReleased(EventHandler<KeyEventArgs> handle)
{
_renderTarget.KeyReleased += handle;
}
internal void RegisterOnPressed(EventHandler<MouseButtonEventArgs> handle)
{
_renderTarget.MouseButtonPressed += handle;
}
internal void RegisterOnReleased(EventHandler<MouseButtonEventArgs> handle)
{
_renderTarget.MouseButtonReleased += handle;
}
internal Vector2 GetMouseWindowPosition()
{
return Mouse.GetPosition(_renderTarget);
}
internal bool IsFocused()
{
return _hasFocus;
}
internal Vector2 GetMouseWorldPosition()
{
var mousePos = GetMouseWindowPosition();
return _renderTarget.MapPixelToCoords(mousePos);
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
namespace FreeScape.Engine.Physics.Collisions.Colliders
{
public class CircleCollider : ICollider
{
public float Size { get; }
public Vector2 Position { get; set; }
public Vector2 Center { get; }
public float Radius { get; }
private List<Vector2> _vertices;
public Vector2[] Vertices => _vertices.ToArray();
public ColliderType ColliderType { get; set; } = ColliderType.Empty;
public CircleCollider(Vector2 position, Vector2 center, float radius)
{
Position = position;
Center = center;
Radius = radius;
_vertices = new List<Vector2>();
var totalPoints = (int)radius * 3;
var degreeIncrements = 360 / totalPoints;
for (int i = 0; i < 360; i += degreeIncrements)
{
_vertices.Add(new Vector2((float)(radius * Math.Sin(i)), (float)(radius * Math.Cos(i))));
}
}
public bool Collides(Vector2 point)
{
var distance = Math.Sqrt(Math.Pow(point.X - Center.X, 2) + Math.Pow(point.Y - Center.Y, 2));
return distance < Radius;
}
public Vector2[] GetVerticesRelativeToPosition()
{
return _vertices.Select(x => x + Center).ToArray();
}
}
}<file_sep>namespace FreeScape.Engine.Render
{
public enum RenderMode
{
None,
Screen,
World
}
}<file_sep>using System.Numerics;
namespace FreeScape.Engine.Physics.Movement
{
public class HeadingVector
{
public Vector2 Vector { get; private set; }
public Direction Direction { get; private set; }
private Direction _lastDirection;
public HeadingVector()
{
Direction = Direction.None;
_lastDirection = Direction.None;
}
public Direction GetLastDirection()
{
var direction = CollapseDirection();
if (direction != Direction.None)
_lastDirection = direction;
return _lastDirection;
}
internal void UpdateHeadingVector(Vector2 newHeading)
{
Vector = newHeading;
Direction = GetDirectionFromHeading(Vector);
}
private Direction CollapseDirection()
{
if (Direction.HasFlag(Direction.Left)) return Direction.Left;
if (Direction.HasFlag(Direction.Right)) return Direction.Right;
if (Direction.HasFlag(Direction.Up)) return Direction.Up;
if (Direction.HasFlag(Direction.Down)) return Direction.Down;
return Direction.None;
}
private Direction GetDirectionFromHeading(Vector2 heading) => heading switch
{
{ X: > 0, Y: > 0 } => Direction.Down & Direction.Right,
{ X: < 0, Y: > 0 } => Direction.Down & Direction.Left,
{ X: > 0, Y: < 0 } => Direction.Up & Direction.Right,
{ X: < 0, Y: < 0 } => Direction.Up & Direction.Left,
{ X: 0, Y: < 0 } => Direction.Up,
{ X: 0, Y: > 0 } => Direction.Down,
{ X: > 0, Y: 0 } => Direction.Right,
{ X: < 0, Y: 0 } => Direction.Left,
_ => Direction.None
};
}
}<file_sep>using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Render.Layers.LayerTypes;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Render.Layers
{
public class LayerProvider
{
private readonly ServiceScopeProvider _provider;
public LayerProvider(ServiceScopeProvider scope)
{
_provider = scope;
}
public T Provide<T>() where T : ILayer
{
var layer = _provider.CurrentScope.ServiceProvider.GetService<T>();
layer.Init();
return layer;
}
}
}<file_sep>using System.Collections.Generic;
using System.Numerics;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
using FreeScape.Engine.Render.Tiled;
using SFML.Graphics;
namespace FreeScape.Engine.Core.GameObjects.Entities
{
public class MapGameObject : IGameObject, ICollidable
{
public readonly TiledTile _tileInfo;
public Vector2 Scale { get; set; } = Vector2.One;
public Vector2 Size { get; set; }
public Vector2 Position { get; set; }
public float Rotation { get; set; }
public Sprite Sprite { get; }
public List<ICollider> Colliders { get; set; }
public MapGameObject(Vector2 position, Vector2 size, Vector2 scale, float rotation, TiledTile tileInfo, Sprite sprite)
{
_tileInfo = tileInfo;
Size = size;
Scale = scale;
Position = position;
Rotation = rotation;
Sprite = sprite;
Sprite.Position = new Vector2(Position.X, Position.Y);
Colliders = new List<ICollider>();
}
public void CollisionEnter(ICollidable collidable)
{
//if(collidable is IMovable player)
//Console.WriteLine("object test " + player.Position);
}
public void Render(RenderTarget target)
{
var scale = Size / (new Vector2(Sprite.TextureRect.Width, Sprite.TextureRect.Height));
Sprite.Scale = scale;
Sprite.Rotation = Rotation;
target.Draw(Sprite);
}
public void Tick() { }
public void Init() { }
}
}<file_sep>using System.Collections.Generic;
using FreeScape.Engine.Physics.Collisions.Colliders;
namespace FreeScape.Engine.Physics.Collisions
{
public interface ICollidable
{
public List<ICollider> Colliders { get; }
public void CollisionEnter(ICollidable collidable);
}
}<file_sep>using AsperandLabs.UnitStrap.Core.Abstracts;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Sfx
{
public class SoundUnitStrapper : BaseUnitStrapper
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services)
{
services.AddSingleton<SoundProvider>();
return services;
}
}
}<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledTileSet
{
public string Image { get; set; }
public int FirstGid { get; set; }
public int Columns { get; set; }
public int ImageHeight { get; set; }
public int ImageWidth { get; set; }
public int Margin { get; set; }
public string Name { get; set; }
public int Spacing { get; set; }
public int TileCount { get; set; }
public string TiledVersion { get; set; }
public int TileHeight { get; set; }
public int TileWidth { get; set; }
public string Type { get; set; }
public List<TiledTile> Tiles { get; set; }
}
}<file_sep>using System.Text.Json.Serialization;
namespace FreeScape.Engine.Render.Tiled
{
public enum TiledMapOrientation
{
[JsonPropertyName("othogonal")]
Othogonal,
[JsonPropertyName("isometric")]
Isometric,
[JsonPropertyName("staggered")]
Staggered,
[JsonPropertyName("hexagonal")]
Hexagonal
}
}<file_sep>using FreeScape.Engine.Physics.Movement;
namespace FreeScape.Engine.Input.Controllers
{
public interface IController
{
HeadingVector HeadingVector { get; }
void Tick();
}
}<file_sep>using System;
using System.Numerics;
using FreeScape.Engine.Core;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Core.GameObjects.Entities;
using FreeScape.Engine.Core.Utilities;
using SFML.Graphics;
namespace FreeScape.Engine.Render
{
public class Perspective : ITickable
{
private readonly FrameTimeProvider _frameTime;
private readonly Vector2 _screenSize;
private IGameObject _target;
public Vector2? TargetPosition => _target?.Position;
private float? _trackSharpness;
public Perspective(string name, Vector2 center, Vector2 size, float scale, FrameTimeProvider frameTime)
{
_frameTime = frameTime;
_screenSize = size;
Name = name;
WorldView = new View(center, size/scale);
ScreenView = new View(Vector2.Zero, size/scale);
}
public string Name { get; }
public View WorldView { get; }
public View ScreenView { get; }
public float WorldScaling => _screenSize.X / WorldView.Size.X;
public float ScreenScaling => _screenSize.X / ScreenView.Size.X;
public Vector2 WorldCorner => (WorldView.Center - WorldView.Size / 2)*WorldScaling;
public void SetCenter(Vector2 position)
{
WorldView.Center = position;
}
public void Track(IGameObject go, float sharpness = 0.002f)
{
_target = go;
_trackSharpness = sharpness;
}
public void Track(Vector2 position, float sharpness)
{
_target = new EmptyGameObject(position);
_trackSharpness = sharpness;
}
public void Tick()
{
if (_target != null)
{
var blend = 1 - Math.Pow(1f - (float)_trackSharpness, _frameTime.DeltaTimeMilliSeconds);
WorldView.Center = WorldView.Center.Lerp(_target.Position, (float)blend, 0.1f);
}
}
}
}<file_sep>using AsperandLabs.UnitStrap.Core.Abstracts;
using FreeScape.Engine.Input.Config.Action;
using FreeScape.Engine.Input.Controllers;
using FreeScape.Engine.Physics.Movement;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Input
{
public class InputUnitStrapper : BaseUnitStrapper
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services)
{
services.AddSingleton<SfmlActionResolver>();
services.AddSingleton<Movement>();
services.AddScoped<ActionProvider>();
services.AddScoped<KeyboardController>();
services.AddScoped<UserInputController>();
return services;
}
}
}<file_sep># FreeScape
Master: [](https://github.com/Davisjames0901/FreeScape/actions/workflows/dotnet.yml)
<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public class TiledAnimationFrame
{
public float Duration { get; set; }
public int TileId { get; set; }
}
}
<file_sep>using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using FreeScape.Engine.Core.GameObjects.Entities;
using FreeScape.Engine.Physics;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Layers.LayerTypes
{
public abstract class TileMapLayer : ILayer
{
private readonly TextureProvider _textureProvider;
private readonly MapProvider _mapProvider;
private readonly CollisionEngine _collisionEngine;
private Movement _movement;
private List<RectangleShape> _colliderDebugShapes;
public List<Tile> Tiles;
public Sprite TiledMapSprite;
public abstract TiledMap Map { get; }
public abstract int ZIndex { get; }
public RenderMode RenderMode => RenderMode.World;
public TileMapLayer(TextureProvider textureProvider, MapProvider mapProvider, Movement movement, CollisionEngine collisionEngine)
{
_movement = movement;
_textureProvider = textureProvider;
_mapProvider = mapProvider;
_collisionEngine = collisionEngine;
_colliderDebugShapes = new List<RectangleShape>();
Tiles = new List<Tile>();
}
public virtual void Render(RenderTarget target)
{
if(TiledMapSprite is not null)
{
target.Draw(TiledMapSprite);
}
else
foreach (var tile in Tiles.OrderBy(x => x.Position.Y))
{
RenderTile(target, tile);
}
}
public void Init()
{
// foreach (var i in tileSet.Tiles)
// {
// var tile = new Tile(pos, tileSize, i.Value, tileSet.Sheet);
// Tiles.Add(tile);
// pos += increment;
// }
LoadTileLayer();
}
private void LoadTileLayer()
{
var mapTileLayer = Map.Layers.First(x => x.Type == "tilelayer");
foreach (var chunk in Map.Layers.Where(x => x.Type == "tilelayer").SelectMany(x => x.Chunks))
{
var i = 0;
foreach(var num in chunk.Data)
{
var tileSetTile = _mapProvider.GetTile(num);
if (tileSetTile == null)
continue;
var tilePosition = new Vector2((float)(chunk.X + i % chunk.Width) * Map.TileWidth, (float)(chunk.Y + i / chunk.Height) * Map.TileHeight);
var tileSize = new Vector2(Map.TileWidth, Map.TileHeight);
var sprite = _textureProvider.GetSprite($"tiled:{tileSetTile.Id}");
var tile = new Tile(tilePosition, tileSize, sprite);
if (tileSetTile.Properties.Any(x => x.Name == "HasCollider" && x.Value))
{
foreach (var tileObject in tileSetTile.ObjectGroup.Objects)
{
switch (tileObject.Type)
{
case "rectangle":
var rectCollider = new RectangleCollider(new Vector2(tileObject.Width, tileObject.Height), tilePosition + new Vector2(tileObject.X, tileObject.Y));
rectCollider.ColliderType = ColliderType.Solid;
tile.Colliders.Add(rectCollider);
break;
case "circle":
break;
}
}
if(tileSetTile.ObjectGroup.Objects.Count > 0)
_collisionEngine.RegisterStaticCollidable(tile);
}
Tiles.Add(tile);
i++;
}
}
}
private void RenderTile(RenderTarget target, Tile tile)
{
tile.Render(target);
}
public abstract void Tick();
}
}<file_sep>using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Physics.Movement;
namespace FreeScape.Engine.Input.Controllers
{
public class KeyboardController : IController
{
public readonly ActionProvider ActionProvider;
public HeadingVector HeadingVector { get; }
public KeyboardController(ActionProvider actionProvider)
{
ActionProvider = actionProvider;
HeadingVector = new HeadingVector();
}
public void Tick()
{
var up = ActionProvider.IsActionActivated("MoveUp");
var down = ActionProvider.IsActionActivated("MoveDown");
var left = ActionProvider.IsActionActivated("MoveLeft");
var right = ActionProvider.IsActionActivated("MoveRight");
HeadingVector.UpdateHeadingVector(Maths.GetHeadingVectorFromMovement(up, down, left, right));
}
}
}<file_sep>using System;
using System.Numerics;
namespace FreeScape.Engine.Core.GameObjects.UI
{
[Obsolete("We should be using the normal texture providing and do the other functions in code. Maybe look into the animation provider for wiggle")]
public class ButtonInfo
{
public Vector2 Position;
public Vector2 Size;
public string ButtonTexture;
public System.Action OnClickAction;
public bool Wigglable = false;
}
}
<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledTile
{
public uint Id { get; set; }
public List<TiledProperty> Properties { get; set; }
public TiledObjectGroup ObjectGroup { get; set; }
public string Type { get; set; }
public string Image { get; set; }
public float ImageWidth { get; set; }
public float ImageHeight { get; set; }
public List<TiledAnimationFrame> Animation { get; set; }
}
}<file_sep>using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Render.Scenes;
namespace FreeScape.Engine
{
public class Game
{
private readonly SceneManager _sceneManager;
private readonly GameManager _gameManager;
private readonly CollisionEngine _collisionEngine;
public Game(SceneManager sceneManager, GameManager controller, CollisionEngine collisionEngine)
{
_sceneManager = sceneManager;
_gameManager = controller;
_collisionEngine = collisionEngine;
}
public void Start<T>() where T : IScene
{
_sceneManager.SetScene<T>();
_gameManager.Start(_sceneManager.Tick, _sceneManager.Render, _collisionEngine.CheckCollisions);
}
}
}<file_sep>using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Core.Utilities
{
public class ServiceScopeProvider
{
public IServiceScope CurrentScope { get; set; }
}
}<file_sep>using System;
using System.Numerics;
namespace FreeScape.Engine.Core.Utilities
{
public static class Maths
{
/// <summary>
/// Preforms interpolation between two numbers based on the given weighting
/// </summary>
/// <param name="a">The source</param>
/// <param name="b">The target</param>
/// <param name="amount">A value between 0 and 1 that indicates the weighting of b</param>
/// <returns>The interpolated value</returns>
public static float Lerp(float a, float b, float amount)
{
return a + (b - a) * amount;
}
/// <summary>
/// Preforms linear interpolation between two vectors based on the given weighting
/// </summary>
/// <param name="a">The source vector</param>
/// <param name="b">The target vector</param>
/// <param name="amount">A value between 0 and 1 that indicates the weighting of vector b</param>
/// <param name="maxEpsilon">The minimum distance, stops the interpolation</param>
/// <returns>The interpolated vector</returns>
public static Vector2 Lerp(this Vector2 a, Vector2 b, float amount, float maxEpsilon = 0.1f)
{
if (a.NearEquals(b, maxEpsilon))
return b;
return Vector2.Lerp(a, b, amount);
}
/// <summary>
/// Checks to see if vector A is close to vector B
/// </summary>
/// <param name="a">Vector A</param>
/// <param name="b">Vector B</param>
/// <param name="maxEpsilon">The minimum distance</param>
/// <returns></returns>
public static bool NearEquals(this Vector2 a, Vector2 b, float maxEpsilon = 0.1f)
{
var diff = Vector2.Abs(a - b);
return diff.Length() <= maxEpsilon;
}
/// <summary>
/// Creates a heading unit vector given an angle in degrees
/// </summary>
/// <param name="degrees">The desired angle in degrees</param>
/// <returns>Heading vector</returns>
public static Vector2 GetHeadingVectorFromDegrees(float degrees)
{
var radian = degrees * Math.PI / 180;
return new Vector2((float)Math.Cos(radian), (float)Math.Sin(radian));
}
/// <summary>
/// Creates a heading unit vector given cardinal directions
/// </summary>
/// <param name="up"></param>
/// <param name="down"></param>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns>Heading vector</returns>
public static Vector2 GetHeadingVectorFromMovement(bool up, bool down, bool left, bool right)
{
var vec = new Vector2(GetXMovement(left, right), GetYMovement(up, down));
//Detects a diagonal so we have to divide by two so speed isnt doubled
if (vec.X != 0 && vec.Y != 0)
return vec * 0.70710677f;
return vec;
}
private static int GetXMovement(bool left, bool right)
{
if (left == right)
return 0;
if (left)
return -1;
return 1;
}
private static int GetYMovement(bool up, bool down)
{
if (up == down)
return 0;
if (up)
return -1;
return 1;
}
/// <summary>
/// Converts a heading vector into the amount of distance that should have been covered given a speed and amount of time
/// </summary>
/// <param name="headingVector">Direction</param>
/// <param name="speed">Speed</param>
/// <param name="deltaTime">Time passed in ms</param>
/// <returns>Distance covered</returns>
public static Vector2 GetDistance(Vector2 headingVector, float speed, float deltaTime)
{
return headingVector * speed * deltaTime;
}
/// <summary>
/// Floors the components of a vector2
/// </summary>
/// <param name="v"></param>
/// <returns>The floored vector</returns>
public static Vector2 Floor(Vector2 v) => new Vector2((float)Math.Floor(v.X), (float)Math.Floor(v.Y));
/// <summary>
/// Ceilings the components of a vector2
/// </summary>
/// <param name="v"></param>
/// <returns>The cielinged vector</returns>
public static Vector2 Ceiling(Vector2 v) => new Vector2((float)Math.Ceiling(v.X), (float)Math.Ceiling(v.Y));
/// <summary>
/// Reverses the components of a vector2
/// </summary>
/// <param name="v"></param>
/// <returns>The reversed vector</returns>
public static Vector2 Reverse(this Vector2 v) => new Vector2(v.Y, v.X);
/// <summary>
/// Compares if the matching components of vector A are greater than vector B
/// </summary>
/// <param name="a">Left side of comparison</param>
/// <param name="b">Right side of comparison</param>
/// <returns></returns>
public static bool IsGreaterThan(this Vector2 a, Vector2 b) => a.X > b.X && a.Y > b.Y;
/// <summary>
/// Compares if the matching components of vector A are greater than or equal to vector B
/// </summary>
/// <param name="a">Left side of comparison</param>
/// <param name="b">Right side of comparison</param>
/// <returns></returns>
public static bool IsGreaterThanOrEquals(this Vector2 a, Vector2 b) => a.X >= b.X && a.Y >= b.Y;
/// <summary>
/// Compares if the matching components of vector A are less than vector B
/// </summary>
/// <param name="a">Left side of comparison</param>
/// <param name="b">Right side of comparison</param>
/// <returns></returns>
public static bool IsLessThan(this Vector2 a, Vector2 b) => IsGreaterThan(b, a);
/// <summary>
/// Compares if the matching components of vector A are less than or equal to vector B
/// </summary>
/// <param name="a">Left side of comparison</param>
/// <param name="b">Right side of comparison</param>
/// <returns></returns>
public static bool IsLessThanOrEquals(this Vector2 a, Vector2 b) => IsGreaterThanOrEquals(b, a);
}
}
<file_sep>using System.Collections.Generic;
using System.Numerics;
namespace FreeScape.Engine.Physics.Collisions
{
public struct GJKCollisionInfo
{
public bool collided;
public Vector2[] simplex;
}
public struct Edge
{
public Vector2 normal;
public int index;
public double distance;
}
public struct GJKEPACollisonInfo
{
public Edge closest;
public GJKCollisionInfo info;
public Vector2 GetPenetrationVector()
{
return closest.normal * (float)closest.distance;
}
}
public static class GJKCollision
{
static uint IndexOfFurthestPoint(Vector2[] vertices, Vector2 d)
{
uint index = 0;
float maxProduct = Vector2.Dot(d, vertices[index]);
for (uint i = 1; i < vertices.Length; i++)
{
float product = Vector2.Dot(d, vertices[i]); // may be negative
if (product > maxProduct)
{
maxProduct = product;
index = i;
}
}
return index;
}
public static Vector2 Support(Vector2[] vertices1, // first shape
Vector2[] vertices2, // second shape
Vector2 d)// direction
{
// get furthest point of first body along an arbitrary direction
uint i = IndexOfFurthestPoint(vertices1, d);
// get furthest point of second body along the opposite direction
// note that this time direction is negated
uint j = IndexOfFurthestPoint(vertices2, -d);
// return the Minkowski sum of two points to see if bodies 'overlap'
// note that the second point-vector is negated, a + (-b) = c
return Vector2.Add(vertices1[i], -vertices2[j]);
}
static Vector2 AveragePoint(Vector2[] vertices)
{
Vector2 avg = Vector2.Zero;
for (uint i = 0; i < vertices.Length; i++)
{
avg.X += vertices[i].X;
avg.Y += vertices[i].Y;
}
avg.X /= vertices.Length;
avg.Y /= vertices.Length;
return avg;
}
static Vector2 TripleProduct(Vector2 a, Vector2 b, Vector2 c)
{
Vector2 r;
float ac = a.X * c.X + a.Y * c.Y; // perform a.dot(c)
float bc = b.X * c.X + b.Y * c.Y; // perform b.dot(c)
// perform b * a.dot(c) - a * b.dot(c)
r.X = b.X * ac - a.X * bc;
r.Y = b.Y * ac - a.Y * bc;
return r;
}
public static bool GJKCheckCollision(Vector2[] vertices1, Vector2[] vertices2, out int iter_count)
{
iter_count = 0;
uint index = 0; // index of current vertex of simplex
Vector2 a, b, c, direction, ao, ab, ac, abperp, acperp;
Vector2[] simplex = new Vector2[3];
Vector2 position1 = AveragePoint(vertices1); // not a CoG but
Vector2 position2 = AveragePoint(vertices2); // it's ok for GJK )
// initial direction from the center of 1st body to the center of 2nd body
direction = Vector2.Subtract(position1, position2);
// if initial direction is zero – set it to any arbitrary axis (we choose X)
if ((direction.X == 0) && (direction.Y == 0)) direction.X = 1.0f;
// set the first support as initial point of the new simplex
a = simplex[0] = Support(vertices1, vertices2, direction);
if (Vector2.Dot(a, direction) <= 0)
return false; // no collision
direction = Vector2.Negate(a); // The next search direction is always towards the origin, so the next search direction is negate(a)
while (true)
{
iter_count++;
a = simplex[++index] = Support(vertices1, vertices2, direction);
if (Vector2.Dot(a, direction) <= 0)
return false; // no collision
ao = Vector2.Negate(a); // from point A to Origin is just negative A
// simplex has 2 points (a line segment, not a triangle yet)
if (index < 2)
{
b = simplex[0];
ab = Vector2.Subtract(b, a); // from point A to B
direction = TripleProduct(ab, ao, ab); // normal to AB towards Origin
if (direction.LengthSquared() == 0)
direction = new Vector2(ab.Y, -ab.X);
continue; // skip to next iteration
}
b = simplex[1];
c = simplex[0];
ab = Vector2.Subtract(b, a); // from point A to B
ac = Vector2.Subtract(c, a); // from point A to C
acperp = TripleProduct(ab, ac, ac);
if (Vector2.Dot(acperp, ao) >= 0)
{
direction = acperp; // new direction is normal to AC towards Origin
}
else
{
abperp = TripleProduct(ac, ab, ab);
if (Vector2.Dot(abperp, ao) < 0)
return true; // collision
simplex[0] = simplex[1]; // swap first element (point C)
direction = abperp; // new direction is normal to AB towards Origin
}
simplex[1] = simplex[2]; // swap element in the middle (point B)
--index;
}
}
public static GJKCollisionInfo GJKCollisionCheckWithInfo(Vector2[] vertices1, Vector2[] vertices2, out int iter_count)
{
GJKCollisionInfo Result = new GJKCollisionInfo();
iter_count = 0;
uint index = 0; // index of current vertex of simplex
Vector2 a, b, c, d, ao, ab, ac, abperp, acperp;
Vector2[] simplex = new Vector2[3];
Vector2 position1 = AveragePoint(vertices1); // not a CoG but
Vector2 position2 = AveragePoint(vertices2); // it's ok for GJK )
// initial direction from the center of 1st body to the center of 2nd body
d = Vector2.Subtract(position1, position2);
// if initial direction is zero – set it to any arbitrary axis (we choose X)
if ((d.X == 0) && (d.Y == 0)) d.X = 1.0f;
// set the first support as initial point of the new simplex
a = simplex[0] = Support(vertices1, vertices2, d);
if (Vector2.Dot(a, d) <= 0)
{
Result.collided = false;
Result.simplex = simplex;
return Result; // no collision
}
d = Vector2.Negate(a); // The next search direction is always towards the origin, so the next search direction is negate(a)
while (true)
{
iter_count++;
a = simplex[++index] = Support(vertices1, vertices2, d);
if (Vector2.Dot(a, d) <= 0)
{
Result.collided = false;
Result.simplex = simplex;
break;
}
ao = Vector2.Negate(a); // from point A to Origin is just negative A
// simplex has 2 points (a line segment, not a triangle yet)
if (index < 2)
{
b = simplex[0];
ab = Vector2.Subtract(b, a); // from point A to B
d = TripleProduct(ab, ao, ab); // normal to AB towards Origin
if (d.LengthSquared() == 0)
d = new Vector2(ab.Y, -ab.X);
continue; // skip to next iteration
}
b = simplex[1];
c = simplex[0];
ab = Vector2.Subtract(b, a); // from point A to B
ac = Vector2.Subtract(c, a); // from point A to C
acperp = TripleProduct(ab, ac, ac);
if (Vector2.Dot(acperp, ao) >= 0)
{
d = acperp; // new direction is normal to AC towards Origin
}
else
{
abperp = TripleProduct(ac, ab, ab);
if (Vector2.Dot(abperp, ao) < 0)
{
Result.collided = true;
Result.simplex = simplex;
break;
}
simplex[0] = simplex[1]; // swap first element (point C)
d = abperp; // new direction is normal to AB towards Origin
}
simplex[1] = simplex[2]; // swap element in the middle (point B)
--index;
}
return Result;
}
static Edge FindClosestEdge(List<Vector2> s)
{
Edge closest = new Edge();
// prime the distance of the edge to the max
closest.distance = double.MaxValue;
// s is the passed in simplex
for (int i = 0; i < s.Count; i++)
{
// compute the next points index
int j = i + 1 == s.Count ? 0 : i + 1;
// get the current point and the next one
Vector2 a = s[i];
Vector2 b = s[j];
// create the edge vector
Vector2 e = b - (a); // or a.to(b);
// get the vector from the origin to a
Vector2 oa = a; // or a - ORIGIN
// get the vector from the edge towards the origin
Vector2 n = TripleProduct(e, oa, e);
// normalize the vector
n = Vector2.Normalize(n);
// calculate the distance from the origin to the edge
double d = Vector2.Dot(n, a); // could use b or a here
// check the distance against the other distances
if (d < closest.distance)
{
// if this edge is closer then use it
closest.distance = d;
closest.normal = n;
closest.index = j;
}
}
// return the closest edge we found
return closest;
}
public static GJKEPACollisonInfo GJKEPACollisionCheckWithInfo(Vector2[] vertices1, Vector2[] vertices2, out int iter_count)
{
GJKEPACollisonInfo Result = new GJKEPACollisonInfo();
const double TOLERANCE = double.Epsilon;
const int MaxIterations = 100;
GJKCollisionInfo info = GJKCollisionCheckWithInfo(vertices1, vertices2, out iter_count);
List<Vector2> simplex = new List<Vector2>(info.simplex);
// loop to find the collision information
Edge e = new Edge();
Vector2 p = new Vector2();
if (info.collided)
{
for (int i = 0; i < MaxIterations; i++)
{
// obtain the feature (edge for 2D) closest to the
// origin on the Minkowski Difference
e = FindClosestEdge(simplex);
// obtain a new support point in the direction of the edge normal
p = Support(vertices1, vertices2, e.normal);
// check the distance from the origin to the edge against the
// distance p is along e.normal
double d = Vector2.Dot(p, e.normal);
if (d - e.distance < TOLERANCE)
{
// the tolerance should be something positive close to zero (ex. 0.00001)
// if the difference is less than the tolerance then we can
// assume that we cannot expand the simplex any further and
// we have our solution
Result.closest.normal = -1 * e.normal;
Result.closest.distance = d;
Result.closest.index = e.index;
break;
}
else
{
// we haven't reached the edge of the Minkowski Difference
// so continue expanding by adding the new point to the simplex
// in between the points that made the closest edge
simplex.Insert(e.index, p);
}
}
}
Result.closest.normal = -1 * e.normal;
Result.closest.distance = Vector2.Dot(p, e.normal);
Result.closest.index = e.index;
Result.info.simplex = simplex.ToArray();
Result.info = info;
return Result;
}
}
}
<file_sep>using System.Numerics;
using FreeScape.Engine.Core;
using FreeScape.Engine.Core.GameObjects.UI;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Layers.LayerTypes;
using FreeScape.Scenes;
namespace FreeScape.Layers.MainMenu
{
public class MainMenuHome : UILayer
{
private readonly ActionProvider _actionProvider;
private readonly SceneManager _sceneManager;
private readonly UIObjectProvider _uIObjectProvider;
private readonly GameManager _gameManager;
public MainMenuHome(ActionProvider actionProvider, GameManager gameManager,
SceneManager sceneManager, UIObjectProvider uIObjectProvider)
{
_actionProvider = actionProvider;
_sceneManager = sceneManager;
_uIObjectProvider = uIObjectProvider;
_gameManager = gameManager;
}
public override int ZIndex => 999;
public override void Init()
{
GenerateButtons();
_actionProvider.SubscribeOnPressed(a =>
{
if (a == "LeftClick")
MouseClick();
});
}
private void GenerateButtons()
{
ButtonInfo playButtonInfo = new ButtonInfo();
playButtonInfo.Position = new Vector2(0, -100);
playButtonInfo.Size = new Vector2(100, 34);
playButtonInfo.OnClickAction = () => { _sceneManager.SetScene<TestScene>(); };
playButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Play";
playButtonInfo.Wigglable = true;
ButtonInfo settingsButtonInfo = new ButtonInfo();
settingsButtonInfo.Position = new Vector2(0, -50);
settingsButtonInfo.Size = new Vector2(100, 34);
settingsButtonInfo.OnClickAction = () => { /*Yeah I need to fix this*/ };
settingsButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Settings";
settingsButtonInfo.Wigglable = true;
ButtonInfo quitButtonInfo = new ButtonInfo();
quitButtonInfo.Position = new Vector2(0, 0);
quitButtonInfo.Size = new Vector2(100, 34);
quitButtonInfo.OnClickAction = () => { _gameManager.Stop(); };
quitButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Quit";
quitButtonInfo.Wigglable = true;
ButtonInfo backButtonInfo = new ButtonInfo();
backButtonInfo.Position = new Vector2(500, 150);
backButtonInfo.Size = new Vector2(100, 34);
backButtonInfo.OnClickAction = () => { /*Need to figure out a new way to do this too*/ };
backButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Back";
backButtonInfo.Wigglable = true;
UIObjects.Add(_uIObjectProvider.CreateButton(backButtonInfo));
UIObjects.Add(_uIObjectProvider.CreateButton(playButtonInfo));
UIObjects.Add(_uIObjectProvider.CreateButton(settingsButtonInfo));
UIObjects.Add(_uIObjectProvider.CreateButton(quitButtonInfo));
}
private void MouseClick()
{
foreach (var uiObject in UIObjects)
{
if (uiObject.Hovered && uiObject is IButton button)
{
button.OnClick();
break;
}
}
}
}
}
<file_sep>using FreeScape.Engine.Sfx;
using SFML.Audio;
namespace FreeScape.Engine.Core.GameObjects
{
public class PreloadedSound
{
public PreloadedSound(SoundInfo info)
{
Buffer = new SoundBuffer(info.FilePath);
Sound = new Sound(Buffer);
SoundInfo = info;
}
public SoundBuffer Buffer { get; }
public Sound Sound { get; }
public SoundInfo SoundInfo { get; }
}
}<file_sep>using System;
using System.Collections.Generic;
using FreeScape.Engine.Physics.Movement;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Animations.AnimationTypes
{
public class DirectionAnimation: ISwitchedGroupAnimation<Direction>
{
private Dictionary<Direction, IAnimation> _animations;
private (IAnimation animation, Direction direction) _currentAnimation;
private Func<Direction> _selectDirection;
public Sprite CurrentSprite => _currentAnimation.animation.CurrentSprite;
public void Advance()
{
foreach (var animation in _animations.Values)
{
animation.Advance();
}
var collapsedDirection = _selectDirection();
if (collapsedDirection == Direction.None || _currentAnimation.direction == collapsedDirection)
return;
_currentAnimation = (_animations[collapsedDirection], collapsedDirection);
}
public void Reset()
{
_currentAnimation = (_animations[Direction.Down], Direction.Down);
foreach (var item in _animations)
{
item.Value.Reset();
}
}
void ISwitchedGroupAnimation<Direction>.LoadAnimations(List<(IAnimation animation, Direction groupingKey)> animations, Func<Direction> selector)
{
_animations = new();
_selectDirection = selector;
foreach (var animation in animations)
{
_animations.Add(animation.groupingKey, animation.animation);
}
Reset();
}
}
}<file_sep>using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using FreeScape.Engine.Core.Utilities;
namespace FreeScape.Engine.Physics.Collisions.Colliders
{
public class RectangleCollider : ICollider
{
public Vector2 Size { get; }
public Vector2 Position { get; set; }
private List<Vector2> _vertices;
public Vector2[] Vertices => _vertices.ToArray();
public ColliderType ColliderType { get; set; } = ColliderType.Empty;
public RectangleCollider(Vector2 size, Vector2 position)
{
Size = size;
Position = position;
_vertices = new List<Vector2>();
_vertices.Add(Vector2.Zero);
_vertices.Add(new Vector2(Size.X, 0));
_vertices.Add(Size);
_vertices.Add(new Vector2(0, Size.Y));
}
public bool Collides(Vector2 point)
{
return (Maths.Floor(point).IsGreaterThanOrEquals(Maths.Floor(Position))) && (Maths.Ceiling(point).IsLessThanOrEquals(Maths.Ceiling(Position + Size)));
}
public Vector2[] GetVerticesRelativeToPosition()
{
return _vertices.Select(x => x + Position).ToArray();
}
}
}<file_sep>using System.Collections.Generic;
using System.Numerics;
namespace FreeScape.Engine.Physics.Collisions.Colliders
{
public interface ICollider
{
public Vector2 Position { get; set; }
public Vector2[] Vertices { get; }
public bool Collides(Vector2 point);
public ColliderType ColliderType { get; set; }
Vector2[] GetVerticesRelativeToPosition();
}
}<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledChunk
{
public List<uint> Data { get; set; }
public int Height { get; set; }
public int Width { get; set; }
public int X { get; set; }
public int Y { get; set; }
}
}<file_sep>using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Physics.Collisions;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Core
{
public class GameObjectProvider
{
private readonly ServiceScopeProvider _provider;
private readonly CollisionEngine _collisionEngine;
public GameObjectProvider(ServiceScopeProvider scope, CollisionEngine collisionEngine)
{
_collisionEngine = collisionEngine;
_provider = scope;
}
public T Provide<T>() where T : IGameObject
{
var gameObject = _provider.CurrentScope.ServiceProvider.GetService<T>();
if(gameObject is ICollidable collidable)
{
_collisionEngine.RegisterGameObjectCollidable(collidable);
}
return gameObject;
}
}
}<file_sep>using System.Numerics;
namespace FreeScape.Engine.Settings
{
public class GraphicsSettings : BaseSetting
{
private uint _screenWidth;
public uint ScreenWidth
{
get => _screenWidth;
set
{
_screenWidth = value;
Changed();
}
}
private uint _screenHeight;
public uint ScreenHeight
{
get => _screenHeight;
set
{
_screenHeight = value;
Changed();
}
}
private bool _vSyncEnabled;
private uint _refreshRate;
public bool VSyncEnabled
{
get => _vSyncEnabled;
set
{
_vSyncEnabled = value;
Changed();
}
}
public uint RefreshRate
{
get => _refreshRate;
set
{
_refreshRate = value;
Changed();
}
}
public Vector2 ScreenSize => new(ScreenWidth, ScreenHeight);
public override void Dispose()
{
}
}
}<file_sep>using System;
using FreeScape.Engine.Core.Utilities;
namespace FreeScape.Engine.Core.Managers
{
public class GameManager
{
private bool _isRunning;
private Action _tick;
private Action _render;
private Action _collisions;
private readonly FrameTimeProvider _frameTime;
public GameManager(FrameTimeProvider frameTime)
{
_frameTime = frameTime;
}
public void Start(Action tick, Action render, Action collisions)
{
_tick = tick;
_render = render;
_collisions = collisions;
_isRunning = true;
if (OperatingSystem.IsLinux())
Platform.XInitThreads();
while (_isRunning)
{
_render();
_tick();
_collisions();
_frameTime.Tick();
}
}
public void Stop()
{
_isRunning = false;
}
}
}<file_sep>using System.IO;
namespace FreeScape.Engine
{
public class GameInfo
{
public string Name { get; init; }
public string AssetDirectory { get; init; }
public string TextureDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}Textures";
public string SettingsDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}Settings";
public string TileSetDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}Textures{Path.DirectorySeparatorChar}TileSets";
public string MapDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}Maps";
public string ActionMapDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}ActionMaps";
public string SoundDirectory => $"{AssetDirectory}{Path.DirectorySeparatorChar}Sounds";
}
}<file_sep>using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Layers.LayerTypes;
namespace FreeScape.Layers.MainMenu
{
public class MainMenuOptions : UILayer
{
public override int ZIndex { get; }
public override void Init()
{
}
public void Render()
{
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Numerics;
using FreeScape.Engine.Input.Controllers;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Animations.AnimationTypes;
using SFML.Graphics;
namespace FreeScape.Engine.Core.GameObjects.Entities
{
public abstract class BaseEntity : IMovable, ICollidable
{
public abstract Vector2 Size { get; }
public abstract Vector2 Scale { get; }
public abstract float Speed { get; }
public HeadingVector HeadingVector { get; set; }
public List<ICollider> Colliders { get; }
public Vector2 Position { get; set; }
public IController Controller { get; set; }
protected IAnimation CurrentAnimation { get; private set; }
private List<(Func<bool> selector, IAnimation animation)> _animations;
private List<(Func<bool> selector, IAnimation animation)> _actionAnimations;
private bool _isActioning;
public BaseEntity()
{
Colliders = new List<ICollider>();
}
public virtual void Init()
{
HeadingVector = Controller.HeadingVector;
_animations = new();
_animations.AddRange(RegisterMovementAnimations());
_actionAnimations = new();
_actionAnimations.AddRange(RegisterActionAnimations());
}
public virtual void Tick()
{
Controller.Tick();
foreach(var collider in Colliders)
{
collider.Position = Position - Size / 2 * Scale;
}
}
public virtual void Render(RenderTarget target)
{
SetCurrentAnimation();
var sprite = CurrentAnimation.CurrentSprite;
if (sprite == null)
return;
sprite.Position = Position - new Vector2(sprite.TextureRect.Width / 2, sprite.TextureRect.Height / 2) * Scale;
sprite.Scale = Scale;
target.Draw(sprite);
}
private void SetCurrentAnimation()
{
CurrentAnimation?.Advance();
if (CurrentAnimation?.CurrentSprite == null)
_isActioning = false;
if (_isActioning)
return;
foreach (var animation in _actionAnimations)
{
if (animation.selector())
{
_isActioning = true;
CurrentAnimation = animation.animation;
CurrentAnimation.Reset();
return;
}
}
foreach (var animation in _animations)
{
if (animation.selector())
{
CurrentAnimation = animation.animation;
return;
}
}
}
public abstract IEnumerable<(Func<bool>, IAnimation)> RegisterMovementAnimations();
public abstract IEnumerable<(Func<bool>, IAnimation)> RegisterActionAnimations();
public abstract void CollisionEnter(ICollidable collidable);
}
}<file_sep>using FreeScape.Engine.Physics;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Layers.LayerTypes;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
namespace FreeScape.Layers
{
public class TestTileMap : TileMapLayer
{
private readonly MapProvider _mapProvider;
public TestTileMap(CollisionEngine collisionEngine, MapProvider mapProvider, Movement movement, TextureProvider textureProvider) : base(textureProvider, mapProvider, movement, collisionEngine)
{
_mapProvider = mapProvider;
}
public override TiledMap Map => _mapProvider.GetMap("TiledTestMap");
public override int ZIndex => 0;
public override void Tick()
{
}
}
}<file_sep>using FreeScape.Scenes;
using System.Numerics;
using FreeScape.Engine.Core;
using FreeScape.Engine.Core.GameObjects.UI;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Layers.LayerTypes;
using FreeScape.Engine.Sfx;
using SFML.Graphics;
namespace FreeScape.Layers
{
public class PauseMenu : UILayer
{
private readonly ActionProvider _actionProvider;
private readonly DisplayManager _displayManager;
private readonly SceneManager _sceneManager;
private readonly UIObjectProvider _uIObjectProvider;
private readonly SoundProvider _soundProvider;
public bool IsPaused { get; private set; }
public override int ZIndex => int.MaxValue;
public PauseMenu(ActionProvider actionProvider, DisplayManager displayManager,
SceneManager sceneManager, UIObjectProvider uIObjectProvider, SoundProvider soundProvider)
{
_actionProvider = actionProvider;
_displayManager = displayManager;
_sceneManager = sceneManager;
_uIObjectProvider = uIObjectProvider;
_soundProvider = soundProvider;
}
public override void Init()
{
GenerateButtons();
_actionProvider.SubscribeOnPressed(a =>
{
if (a == "LeftClick")
MouseClick();
if (a == "Pause")
{
if (!IsPaused)
{
_actionProvider.SwitchActionMap("MainMenu");
_soundProvider.PauseMusic();
IsPaused = true;
}
else
{
_actionProvider.SwitchActionMap("Player");
_soundProvider.PlayMusic();
IsPaused = false;
}
}
});
}
private void GenerateButtons()
{
ButtonInfo playButtonInfo = new ButtonInfo();
playButtonInfo.Position = new Vector2(0, -100);
playButtonInfo.Size = new Vector2(100, 34);
playButtonInfo.OnClickAction = () =>
{
_actionProvider.SwitchActionMap("Player");
_soundProvider.PlayMusic();
IsPaused = false;
};
playButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Play";
playButtonInfo.Wigglable = true;
ButtonInfo settingsButtonInfo = new ButtonInfo();
settingsButtonInfo.Position = new Vector2(0, -50);
settingsButtonInfo.Size = new Vector2(100, 34);
settingsButtonInfo.OnClickAction = () => { };
settingsButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Settings";
settingsButtonInfo.Wigglable = true;
ButtonInfo quitButtonInfo = new ButtonInfo();
quitButtonInfo.Position = new Vector2(0, 0);
quitButtonInfo.Size = new Vector2(100, 34);
quitButtonInfo.OnClickAction = () => { _sceneManager.SetScene<MainMenuScene>(); };
quitButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Quit";
quitButtonInfo.Wigglable = true;
var playButton = _uIObjectProvider.CreateButton(playButtonInfo);
var settingsButton = _uIObjectProvider.CreateButton(settingsButtonInfo);
var quitButton = _uIObjectProvider.CreateButton(quitButtonInfo);
UIObjects.Add(playButton);
UIObjects.Add(settingsButton);
UIObjects.Add(quitButton);
}
public override void Render(RenderTarget target)
{
if (!IsPaused)
return;
foreach (var item in UIObjects)
{
item.Render(target);
}
}
public void MouseClick()
{
if (!IsPaused)
return;
foreach (var uiObject in UIObjects)
{
if (uiObject.Hovered && uiObject is IButton button)
{
button.OnClick();
break;
}
}
}
}
}
<file_sep>using SFML.Graphics;
namespace FreeScape.Engine.Render
{
public interface IRenderable
{
void Render(RenderTarget target);
}
}<file_sep>namespace FreeScape.Engine.Core.GameObjects.UI
{
public interface IUIObject : IGameObject
{
bool Hovered { get; set; }
void OnHover();
void OnHoverEnd();
}
}
<file_sep>namespace FreeScape.Engine.Render.Layers.LayerTypes
{
public interface ILayer :IRenderable
{
RenderMode RenderMode { get; }
int ZIndex { get; }
void Tick();
void Init();
}
}<file_sep>using System.Numerics;
using NUnit.Framework;
namespace FreeScape.Engine.Tests
{
public static class VectorAsserts
{
public static void AreEqual(Vector2 expected, Vector2 actual, double maximumDelta = 0)
{
Assert.AreEqual(expected.X, actual.X, maximumDelta, $"Expected {expected} +/-{maximumDelta}\nbut was: {actual}");
Assert.AreEqual(expected.Y, actual.Y, maximumDelta, $"Expected {expected} +/-{maximumDelta}\nbut was: {actual}");
}
}
}<file_sep>using AsperandLabs.UnitStrap.Core.Abstracts;
using FreeScape.Engine.Physics.Collisions;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Physics
{
public class PhysicsUnitStrapper : BaseUnitStrapper
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services)
{
services.AddSingleton<ColliderProvider>();
services.AddSingleton<CollisionEngine>();
return services;
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using FreeScape.Engine.Settings;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Textures
{
public class TextureProvider
{
private readonly GameInfo _info;
private readonly Dictionary<string, List<TextureInfo>> _textureDescriptors;
private readonly Dictionary<string, Texture> _textureCache;
private readonly Dictionary<string, Func<Sprite>> _spriteSelectors;
public TextureProvider(GameInfo info)
{
_info = info;
_textureDescriptors = new Dictionary<string, List<TextureInfo>>();
_spriteSelectors = new Dictionary<string, Func<Sprite>>();
_textureCache = new Dictionary<string, Texture>();
foreach (var file in Directory.EnumerateFiles(info.TextureDirectory).Where(x => x.EndsWith(".json", StringComparison.CurrentCultureIgnoreCase)))
{
var name = file.Split(Path.DirectorySeparatorChar).Last().Split('.').First();
_textureDescriptors.Add(name, GetDescriptors(file));
}
}
private List<TextureInfo> GetDescriptors(string path)
{
var text = File.ReadAllText(path);
var descriptor = JsonSerializer.Deserialize<List<TextureInfo>>(text);
descriptor?.ForEach(x=> x.File = path);
return descriptor;
}
internal void CreateAndAddTexture(string gtl, TextureInfo descriptor)
{
var path = $"{_info.TextureDirectory}{Path.DirectorySeparatorChar}{descriptor.File}";
if (!File.Exists(path))
return;
if(!_textureCache.ContainsKey(path))
_textureCache.Add(path, new Texture(path));
Console.WriteLine($"Gtl: {gtl}, {descriptor.File}");
_spriteSelectors.Add(gtl, () => new Sprite(_textureCache[path], descriptor.Location));
}
//We should try to get rid of this and use the texture descriptors for loading instead
public Texture GetTextureByFile(string filePath, string gtl)
{
var path = $"{_info.TextureDirectory}/{filePath}.png";
if (!File.Exists(path))
return null;
return new Texture(path);
}
public Sprite GetSprite(string gtl)
{
var tokens = gtl.Split(':');
return GetSprite(tokens[0], tokens[1]);
}
public Sprite GetSprite(string sheetName, string textureName)
{
var gtl = $"{sheetName}:{textureName}";
if (!_spriteSelectors.ContainsKey(gtl))
{
if (!_textureDescriptors.ContainsKey(sheetName))
return null;
var sheet = _textureDescriptors[sheetName];
var texture = sheet.FirstOrDefault(x => x.Name == textureName);
if (texture == null)
return null;
CreateAndAddTexture(gtl, texture);
}
return _spriteSelectors[gtl]();
}
}
}<file_sep>using System.Collections.Generic;
using System.Numerics;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Render;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Layers.LayerTypes;
using FreeScape.Engine.Render.Textures;
using SFML.Graphics;
namespace FreeScape.Layers.MainMenu
{
public class MainMenuBackground : ILayer
{
private readonly DisplayManager _displayManager;
private readonly Queue<Vector2> _backgroundTrack;
private readonly Sprite _background;
private Vector2 _currentBackgroundTarget;
public RenderMode RenderMode => RenderMode.World;
public int ZIndex => 0;
public MainMenuBackground(TextureProvider textureProvider, DisplayManager displayManager)
{
_displayManager = displayManager;
var backgroundTexture = textureProvider.GetTextureByFile("UI/MenuBackground", "MenuBackground");
_background = new Sprite(backgroundTexture);
_background.Position = new Vector2(0, 0);
_backgroundTrack = new Queue<Vector2>();
_backgroundTrack.Enqueue(new Vector2(750, 1300));
_backgroundTrack.Enqueue(new Vector2(950, 1500));
_backgroundTrack.Enqueue(new Vector2(1150, 1300));
_backgroundTrack.Enqueue(new Vector2(950, 1100));
}
public void Init()
{
_currentBackgroundTarget = _backgroundTrack.Dequeue();
_backgroundTrack.Enqueue(_currentBackgroundTarget);
if(_displayManager.CurrentPerspective != null)
SetNextTarget(_displayManager.CurrentPerspective);
}
public void Render(RenderTarget target)
{
target.Draw(_background);
}
public void Tick()
{
var perspective = _displayManager.CurrentPerspective;
if (perspective.TargetPosition == null)
{
perspective.WorldView.Center = _currentBackgroundTarget;
SetNextTarget(perspective);
}
if (perspective.WorldView.Center.NearEquals(_currentBackgroundTarget, 20f))
SetNextTarget(perspective);
}
private void SetNextTarget(Perspective perspective)
{
_currentBackgroundTarget = _backgroundTrack.Dequeue();
_backgroundTrack.Enqueue(_currentBackgroundTarget);
perspective.Track(_currentBackgroundTarget, 0.0009f);
}
}
}<file_sep>using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Scenes;
using FreeScape.Engine.Sfx;
using FreeScape.Layers;
namespace FreeScape.Scenes
{
public class TestScene : LayeredScene
{
private readonly LayerProvider _layerProvider;
private readonly SoundProvider _sounds;
private PauseMenu _pauseMenu;
public TestScene(ActionProvider actionProvider, LayerProvider layerProvider, SoundProvider sounds)
{
_layerProvider = layerProvider;
_sounds = sounds;
actionProvider.SwitchActionMap("Player");
}
public override void Init()
{
var map = _layerProvider.Provide<TestTileMap>();
var entityLayer = _layerProvider.Provide<EntityLayer>();
var playerUI = _layerProvider.Provide<PlayerUI>();
_pauseMenu = _layerProvider.Provide<PauseMenu>();
Layers.Add(map);
Layers.Add(entityLayer);
Layers.Add(playerUI);
Layers.Add(_pauseMenu);
_sounds.PlayMusic("smooth");
}
public override void Tick()
{
if (_pauseMenu.IsPaused)
{
_pauseMenu.Tick();
return;
}
foreach (var layer in Layers)
{
layer.Tick();
}
}
public override void Dispose()
{
}
}
}<file_sep>using System;
namespace FreeScape.Engine.Physics.Movement
{
[Flags]
public enum Direction
{
Up = 1,
Down = 2,
Left = 4,
Right = 8,
None = 16
}
}<file_sep>using SFML.Graphics;
namespace FreeScape.Engine.Render.Animations.AnimationTypes
{
public interface IAnimation
{
/// <summary>
/// The current frame of the animation
/// </summary>
/// <returns></returns>
Sprite CurrentSprite { get; }
/// <summary>
/// Advance the state machine by the time past
/// </summary>
void Advance();
/// <summary>
/// Reset the animation
/// </summary>
void Reset();
}
}<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public enum TiledMapStaggerIndex
{
Odd,
Even
}
}<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public enum TiledMapStaggerAxis
{
X,
Y
}
}<file_sep>using AsperandLabs.UnitStrap.Core.Abstracts;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Core.Utilities;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Core
{
public class CoreUnitStrapper : BaseUnitStrapper
{
public override string Namespace => GetType().Assembly.ToString();
protected override IServiceCollection RegisterInternalDependencies(IServiceCollection services)
{
services.AddSingleton<SceneManager>();
services.AddSingleton<DisplayManager>();
services.AddSingleton<GameManager>();
services.AddSingleton<GameObjectProvider>();
services.AddSingleton<UIObjectProvider>();
services.AddSingleton<FrameTimeProvider>();
services.AddSingleton<ServiceScopeProvider>();
return services;
}
}
}<file_sep>using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Core.GameObjects.Entities;
using FreeScape.Engine.Physics;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Layers.LayerTypes
{
public abstract class GameObjectLayer : ILayer
{
private readonly MapProvider _mapProvider;
private readonly Movement _movement;
private readonly CollisionEngine _collisionEngine;
private readonly TextureProvider _textureProvider;
protected readonly List<IGameObject> GameObjects;
public RenderMode RenderMode => RenderMode.World;
protected abstract TiledMap Map { get; }
public abstract int ZIndex { get; }
public GameObjectLayer(Movement movement, MapProvider mapProvider, CollisionEngine collisionEngine, TextureProvider textureProvider)
{
_collisionEngine = collisionEngine;
_textureProvider = textureProvider;
_mapProvider = mapProvider;
_movement = movement;
GameObjects = new List<IGameObject>();
}
public virtual void Init()
{
LoadObjectLayer();
}
public void LoadObjectLayer()
{
foreach (var mapGameObject in Map.Layers.Where(x => x.Type == "objectgroup" && x.Name == "TerrainObjects").First().Objects)
{
var tileSetTile = _mapProvider.GetTile((uint)mapGameObject.Gid);
if (tileSetTile == null)
{
continue;
}
var objectPosition = new Vector2((float)mapGameObject.X, (float)mapGameObject.Y - (float)mapGameObject.Height);
var objectSize = new Vector2((float)mapGameObject.Width, (float)mapGameObject.Height);
var objectRotation = 0; // (float)mapGameObject.Rotation;
var scale = objectSize / (new Vector2(Map.TileWidth, Map.TileHeight));
var sprite = _textureProvider.GetSprite($"tiled:{mapGameObject.Gid}");
var gameObject = new MapGameObject(objectPosition, objectSize, scale, objectRotation, tileSetTile, sprite);
if (tileSetTile.Properties != null && tileSetTile.Properties.Any(x => x.Name == "HasCollider" && x.Value))
{
foreach (var tileObject in tileSetTile.ObjectGroup.Objects)
{
switch (tileObject.Type)
{
case "rectangle":
RectangleCollider rectCollider = new RectangleCollider((new Vector2(tileObject.Width, tileObject.Height) * scale), objectPosition + (new Vector2(tileObject.X, tileObject.Y) * scale));
rectCollider.ColliderType = ColliderType.Solid;
gameObject.Colliders.Add(rectCollider);
break;
case "circle":
break;
default:
break;
}
}
if(tileSetTile.ObjectGroup.Objects.Count > 0)
_collisionEngine.RegisterStaticCollidable(gameObject);
}
GameObjects.Add(gameObject);
}
}
public void Render(RenderTarget target)
{
foreach (var gameObject in GameObjects.OrderBy(x => x.Position.Y + x.Size.Y))
{
gameObject.Render(target);
}
}
public virtual void Tick()
{
foreach(IGameObject gameObject in GameObjects)
{
gameObject.Tick();
if(gameObject is IMovable movable)
{
_movement.BasicMove(movable);
}
}
}
}
}
<file_sep>using SFML.Graphics;
namespace FreeScape.Engine.Render.Animations
{
public class AnimationFrame
{
public Sprite Sprite { get; init; }
public double Duration { get; init; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Numerics;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input.Config.Action;
using FreeScape.Engine.Settings;
using SFML.Window;
namespace FreeScape.Engine.Input
{
public class ActionProvider
{
private readonly ActionMaps _actionMap;
private readonly SfmlActionResolver _actionResolver;
private readonly DisplayManager _displayManager;
private readonly List<Action<string>> _actionPressedSubscribers;
private readonly List<Action<string>> _actionReleasedSubscribers;
public ActionProvider(GameInfo info, SfmlActionResolver actionResolver, DisplayManager displayManager)
{
_actionResolver = actionResolver;
_displayManager = displayManager;
_actionPressedSubscribers = new List<Action<string>>();
_actionReleasedSubscribers = new List<Action<string>>();
_actionMap = new ActionMaps(info.ActionMapDirectory);
displayManager.RegisterOnPressed(OnKeyPressed);
displayManager.RegisterOnReleased(OnKeyReleased);
displayManager.RegisterOnPressed(OnMousePressed);
displayManager.RegisterOnReleased(OnMouseReleased);
}
public void SwitchActionMap(string map)
{
_actionMap.SwitchActionMap(map);
}
public bool IsActionActivated(string action)
{
if (!_displayManager.IsFocused())
return false;
var mappedAction = _actionMap.GetMappedAction(action);
return ConvertActionAndCheckIfActioned(mappedAction);
}
public void SubscribeOnPressed(Action<string> callback)
{
_actionPressedSubscribers.Add(callback);
}
public void SubscribeOnReleased(Action<string> callback)
{
_actionReleasedSubscribers.Add(callback);
}
public Vector2 GetMouseCoords()
{
return _displayManager.GetMouseWindowPosition();
}
public Vector2 GetMouseWorldCoods()
{
return _displayManager.GetMouseWorldPosition();
}
private bool ConvertActionAndCheckIfActioned(MappedAction action)
{
switch (action?.Device)
{
case "mouse":
return CheckMouseAction(action);
case "keyboard":
return CheckKeyboardAction(action);
case null:
return false;
default:
throw new Exception(
$"Unknown device type in Action: {action.Action}, Device: {action.Device}");
}
}
private bool CheckMouseAction(MappedAction action)
{
var button = _actionResolver.GetMouseButton(action.Button);
return Mouse.IsButtonPressed(button);
}
private bool CheckKeyboardAction(MappedAction action)
{
var key = _actionResolver.GetKeyboardKey(action.Button);
return Keyboard.IsKeyPressed(key);
}
private void Notify(List<Action<string>> subscribers, MappedAction action)
{
if (!_displayManager.IsFocused())
return;
foreach (var subscriber in subscribers)
subscriber(action.Action);
}
private void OnKeyPressed(object sender, KeyEventArgs args)
{
var actionName = _actionResolver.GetAction(args.Code);
var action = _actionMap.GetMappedPressedAction(actionName);
if(action == null)
return;
Notify(_actionPressedSubscribers, action);
}
private void OnKeyReleased(object sender, KeyEventArgs args)
{
var actionName = _actionResolver.GetAction(args.Code);
var action = _actionMap.GetMappedReleasedAction(actionName);
if(action == null)
return;
Notify(_actionReleasedSubscribers, action);
}
private void OnMousePressed(object sender, MouseButtonEventArgs args)
{
var actionName = _actionResolver.GetAction(args.Button);
var action = _actionMap.GetMappedPressedAction(actionName);
if(action == null)
return;
Notify(_actionPressedSubscribers, action);
}
private void OnMouseReleased(object sender, MouseButtonEventArgs args)
{
var actionName = _actionResolver.GetAction(args.Button);
var action = _actionMap.GetMappedReleasedAction(actionName);
if(action == null)
return;
Notify(_actionReleasedSubscribers, action);
}
}
}<file_sep>using System.Runtime.InteropServices;
namespace FreeScape.Engine.Core.Utilities
{
internal static class Platform
{
[DllImport("X11")]
internal static extern int XInitThreads();
}
}<file_sep>using System.Text.Json.Serialization;
namespace FreeScape.Engine.Render.Tiled
{
public enum TiledMapRenderOrder
{
[JsonPropertyName("right-down")]
RightDown,
[JsonPropertyName("right-up")]
RightUp,
[JsonPropertyName("left-down")]
LeftDown,
[JsonPropertyName("left-up")]
LeftUp
}
}<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public class TiledMapObject
{
public bool Ellipse { get; set; }
public int GId { get; set; }
public double Height { get; set; }
public double Width { get; set; }
public int Id { get; set; }
public string Name { get; set; }
public bool Point { get; set; }
public string Type { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double Rotation { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
namespace FreeScape.Engine.Render.Animations.AnimationTypes
{
/// <summary>
/// This is an interface that defines how the frames are loaded for the animation. in this case it is a group of animations that can be switched between
/// </summary>
public interface ISwitchedGroupAnimation<T> : IAnimation
{
/// <summary>
/// Loads the animations with the given grouping and passes a selector to determine the animation to display at any given tick
/// </summary>
/// <param name="animations"></param>
/// <param name="selector">A func that determines the animation to display</param>
internal void LoadAnimations(List<(IAnimation animation, T groupingKey)> animations, Func<T> selector);
}
}<file_sep>using System.Collections.Generic;
using System.Linq;
using FreeScape.Engine.Render.Layers;
using FreeScape.Engine.Render.Layers.LayerTypes;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Scenes
{
public abstract class LayeredScene : IScene
{
public LayeredScene()
{
Layers = new List<ILayer>();
}
public List<ILayer> Layers { get; }
public bool Active { get; set; }
public virtual void RenderWorld(RenderTarget target)
{
foreach (var layer in Layers.Where(x=> x.RenderMode == RenderMode.World).OrderBy(x => x.ZIndex))
{
layer.Render(target);
}
}
public virtual void RenderScreen(RenderTarget target)
{
foreach (var layer in Layers.Where(x=> x.RenderMode == RenderMode.Screen).OrderBy(x => x.ZIndex))
{
layer.Render(target);
}
}
public virtual void Tick()
{
foreach (var layer in Layers)
{
if(layer is GameObjectLayer gameObjectLayer)
{
gameObjectLayer.Tick();
}
layer.Tick();
}
}
public abstract void Init();
public abstract void Dispose();
}
}<file_sep>using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
namespace FreeScape.Engine.Input.Config.Action
{
public class ActionMaps
{
private readonly Dictionary<string, List<MappedAction>> _actionMaps;
private Dictionary<string, MappedAction> _currentActionMap;
private Dictionary<string, MappedAction> _currentButtonPressedMap;
private Dictionary<string, MappedAction> _currentButtonReleasedMap;
private readonly string _mapDir;
public ActionMaps(string mapDir)
{
_mapDir = mapDir;
var actionMaps = new Dictionary<string, List<MappedAction>>();
foreach (var file in Directory.EnumerateFiles(mapDir).Where(x => x.EndsWith(".json", StringComparison.CurrentCultureIgnoreCase)))
{
var name = file.Split(Path.DirectorySeparatorChar).Last().Split('.').First();
actionMaps.Add(name, GetActionMap(file));
}
_actionMaps = actionMaps;
}
private List<MappedAction> GetActionMap(string path)
{
var text = File.ReadAllText(path);
var descriptor = JsonSerializer.Deserialize<List<MappedAction>>(text);
return descriptor;
}
public void SwitchActionMap(string actionMap)
{
if (!_actionMaps.ContainsKey(actionMap))
throw new Exception($"Could not find {actionMap}.json in {_mapDir}");
_currentActionMap = _actionMaps[actionMap].ToDictionary(x => x.Action, x => x);
_currentButtonPressedMap = _actionMaps[actionMap].Where(x=>x.OnPressed).ToDictionary(x => x.Button, x => x);
_currentButtonReleasedMap = _actionMaps[actionMap].Where(x=>x.OnReleased).ToDictionary(x => x.Button, x => x);
}
public MappedAction GetMappedPressedAction(string action)
{
return GetMappedAction(_currentButtonPressedMap, action);
}
public MappedAction GetMappedReleasedAction(string action)
{
return GetMappedAction(_currentButtonReleasedMap, action);
}
public MappedAction GetMappedAction(string action)
{
return GetMappedAction(_currentActionMap, action);
}
private MappedAction GetMappedAction(Dictionary<string, MappedAction> dict, string action)
{
if (dict == null)
return null;
return !dict.ContainsKey(action) ? null : dict[action];
}
}
}<file_sep>using System;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Scenes
{
public interface IScene :IDisposable
{
bool Active { get; set; }
void Tick();
void Init();
void RenderScreen(RenderTarget target);
void RenderWorld(RenderTarget target);
}
}<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledMap
{
public string BackgroundColor { get; set; }
public int CompressionLevel { get; set; }
public int Height { get; set; }
public int HexSideLenght { get; set; }
public bool Infinite { get; set; }
public List<TiledMapLayer> Layers { get; set; }
public int NextLayerId { get; set; }
public int NextObjectId { get; set; }
//public MapOrientation Orientation { get; set; }
public List<TiledProperty> Properties { get; set; }
public string RenderOrder { get; set; }
public TiledMapStaggerAxis StaggerAxis { get; set; }
public TiledMapStaggerIndex StaggerIndex { get; set; }
public string TiledVersion { get; set; }
public int TileHeight { get; set; }
public List<TiledTileSet> TileSets { get; set; }
public int TileWidth { get; set; }
public string Type { get; set; }
public string Version { get; set; }
public int Width { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using FreeScape.Engine.Physics;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Animations.AnimationTypes;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Render.Animations
{
public class AnimationProvider
{
private readonly IServiceProvider _serviceProvider;
private readonly TextureProvider _textureProvider;
private readonly Dictionary<string, List<TiledAnimationFrame>> _animations;
public AnimationProvider(IServiceProvider serviceProvider, TextureProvider textureProvider)
{
_serviceProvider = serviceProvider;
_textureProvider = textureProvider;
_animations = new();
}
public void CreateAndAddAnimation(List<TiledAnimationFrame> frames, int gid, string name)
{
foreach (var frame in frames)
{
frame.TileId += gid;
}
Console.WriteLine($"Name: {name}, Frames: {string.Join(' ', frames.Select(x=> x.TileId))}");
_animations.Add(name, frames);
}
public T GetAnimation<T>(string name) where T : IAnimation, ISingleAnimation
{
var animation = _serviceProvider.GetService<T>();
if (animation == null)
throw new Exception($"There is no IAnimation impl registered for type {typeof(T)}");
if (!_animations.ContainsKey(name))
throw new Exception($"There is no animation with the name {name}");
var animationInfo = _animations[name];
var frames = new List<AnimationFrame>();
foreach (var frameInfo in animationInfo)
{
var sprite = _textureProvider.GetSprite($"tiled:{frameInfo.TileId}");
frames.Add(new AnimationFrame
{
Sprite = sprite,
Duration = frameInfo.Duration
});
}
animation.LoadFrames(frames);
return animation;
}
/// <summary>
/// Gets a group of ISingleAnimations for each movement direction and returns as an IAnimation
/// </summary>
/// <param name="animationName">Base animation name, variations will be applied to this like :up, :down etc...</param>
/// <param name="movable">This is so we can capture direction information</param>
/// <typeparam name="T">The style of animation you want to have for all the directions</typeparam>
/// <returns>Aggregate animation</returns>
public IAnimation GetDirectionAnimation<T>(string animationName, IMovable movable) where T : ISingleAnimation
{
var animation = new DirectionAnimation() as ISwitchedGroupAnimation<Direction>;
List<(IAnimation animation, Direction direction)> animations = new();
animations.Add((GetAnimation<T>(animationName + ":up"), Direction.Up));
animations.Add((GetAnimation<T>(animationName + ":down"), Direction.Down));
animations.Add((GetAnimation<T>(animationName + ":left"), Direction.Left));
animations.Add((GetAnimation<T>(animationName + ":right"), Direction.Right));
//The selector func should capture allocate the IMovable here
animation.LoadAnimations(animations, () => movable.HeadingVector.GetLastDirection());
return animation;
}
}
}
<file_sep>using FreeScape;
using FreeScape.Engine;
using FreeScape.Scenes;
using Microsoft.Extensions.DependencyInjection;
var collection = Bootstrapper.Bootstrap(new ServiceCollection());
using var provider = collection.BuildServiceProvider();
var game = provider.GetRequiredService<Game>();
game.Start<MainMenuScene>();<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledMapLayer
{
public List<TiledChunk> Chunks { get; set; }
public string Compression { get; set; }
public List<uint> Data { get; set; }
public string DrawOrder { get; set; }
public string Encoding { get; set; }
public int Height { get; set; }
public int Id { get; set; }
public string Image { get; set; }
public List<TiledMapLayer> Layers { get; set; }
public string Name { get; set; }
public List<TiledObject> Objects { get; set; }
public double OffsetX { get; set; }
public double OffsetY { get; set; }
public double Opacity { get; set; }
public double ParallaxX { get; set; }
public List<TiledProperty> Properties { get; set; }
public int StartX { get; set; }
public int StartY { get; set; }
public string TintColor { get; set; }
public string TransparentColor { get; set; }
public string Type { get; set; }
public bool Visible { get; set; }
public int Width { get; set; }
public int X { get; set; }
public int Y { get; set; }
}
}<file_sep>using System;
using System.Numerics;
using FreeScape.Engine.Input;
using SFML.Graphics;
namespace FreeScape.Engine.Core.GameObjects.UI
{
public class Button : IButton
{
public Vector2 Position { get; set; }
public Vector2 Scale => Vector2.One;
public Vector2 Size { get; }
public Texture ButtonTexture { get; set; }
public Action OnClickAction { get; }
public bool Hovered { get; set; }
private float _wiggleSpeed = 1f;
private double _wiggleDuration;
private const float _maxWiggleAngle = 3f;
private readonly ActionProvider _actionProvider;
private readonly FrameTimeProvider _frameTimeProvider;
private readonly Color _defaultColor = Color.White;
private readonly Color _hoverColor = Color.Green;
private readonly Sprite _buttonSprite;
private readonly bool _wigglable;
public Button(ButtonInfo info, Texture defaultTexture, ActionProvider actionProvider, FrameTimeProvider frameTimeProvider)
{
_actionProvider = actionProvider;
_frameTimeProvider = frameTimeProvider;
OnClickAction = info.OnClickAction;
Size = info.Size;
Position = info.Position;
ButtonTexture = defaultTexture;
defaultTexture.Smooth = true;
_buttonSprite = new Sprite(defaultTexture);
_buttonSprite.Scale = Size / new Vector2(600, 200);
_buttonSprite.Position = Position;
_buttonSprite.Origin = new Vector2(300, 100);
_wigglable = info.Wigglable;
}
public void Init() { }
public void Render(RenderTarget target)
{
if (Hovered)
{
_buttonSprite.Color = _hoverColor;
}
else
{
_buttonSprite.Color = _defaultColor;
}
target.Draw(_buttonSprite);
}
public void OnHover()
{
Hovered = true;
if(_wigglable)
StartWiggle();
}
public void OnHoverEnd()
{
Hovered = false;
}
private void StartWiggle()
{
_wiggleDuration = 100;
_wiggleSpeed = 1.5f;
}
private void Wiggle()
{
_wiggleDuration -= _frameTimeProvider.DeltaTimeMilliSeconds;
if (_wiggleDuration <= 0)
{
_buttonSprite.Rotation = 0;
return;
}
_buttonSprite.Rotation = _buttonSprite.Rotation + _wiggleSpeed;
if (Math.Abs(_buttonSprite.Rotation) > _maxWiggleAngle)
_wiggleSpeed = -_wiggleSpeed;
}
public void Tick()
{
var mouseCoords = _actionProvider.GetMouseWorldCoods();
var hovering = mouseCoords.X > Position.X - Size.X / 2 && mouseCoords.Y > Position.Y - Size.Y / 2 && mouseCoords.X < Position.X + Size.X / 2 && mouseCoords.Y < Position.Y + Size.Y / 2;
if (!Hovered && hovering)
{
OnHover();
}
else if(!hovering)
{
OnHoverEnd();
}
Wiggle();
_buttonSprite.Position = Position;
}
public void OnClick()
{
OnClickAction();
Hovered = false;
}
}
}<file_sep>namespace FreeScape.Engine.Sfx
{
public class SoundInfo
{
public bool Preload { get; set; }
public string Extension { get; set; }
public string SoundType { get; set; }
public string FilePath { get; set; }
public bool IsLooped { get; set; }
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace FreeScape.Engine.Settings
{
public abstract class BaseSetting: IDisposable
{
[JsonIgnore]
private List<System.Action> _onChangedSubscribers;
[JsonIgnore]
internal string FilePath { get; set; }
protected BaseSetting()
{
_onChangedSubscribers = new List<System.Action>();
}
public void Subscribe(System.Action action)
{
_onChangedSubscribers.Add(action);
}
protected void Changed()
{
foreach (var a in _onChangedSubscribers)
a();
}
public abstract void Dispose();
}
}<file_sep>namespace FreeScape.Engine.Render.Tiled
{
public class TiledProperty
{
public string Name { get; set; }
public string Type { get; set; }
public bool Value { get; set; }
}
}<file_sep>using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using FreeScape.Engine.Core;
using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
namespace FreeScape.Engine.Physics.Movement
{
public class Movement
{
private readonly FrameTimeProvider _frameTime;
private readonly List<ICollider> _colliders;
public Movement(FrameTimeProvider frameTime)
{
_frameTime = frameTime;
_colliders = new List<ICollider>();
}
public void BasicMove(IMovable movable)
{
if (movable.HeadingVector.Vector == Vector2.Zero)
return;
var deltaTime = (float) _frameTime.DeltaTimeMilliSeconds;
var distance = Maths.GetDistance(movable.HeadingVector.Vector, movable.Speed, deltaTime);
movable.Position += distance;
}
public Vector2 CheckCollision(IMovable sourceMovable, ICollider collider, Vector2 desiredPosition)
{
var collidedX = false;
var collidedY = false;
var source = collider.Vertices;
foreach (var target in _colliders)
{
if (collidedX && collidedY)
return sourceMovable.Position;
var targetShape = target.GetVerticesRelativeToPosition();
if (!collidedX)
{
var onlyX = new Vector2(desiredPosition.X, sourceMovable.Position.Y);
var desiredPositionVerts = source.Select(x => x + onlyX).ToArray();
collidedX = GJKCollision.GJKCheckCollision(desiredPositionVerts, targetShape, out _);
}
if (!collidedY)
{
var onlyY = new Vector2(sourceMovable.Position.X, desiredPosition.Y);
var desiredPositionVerts = source.Select(x => x + onlyY).ToArray();
collidedY = GJKCollision.GJKCheckCollision(desiredPositionVerts, targetShape, out _);
}
}
if (collidedX)
{
return new Vector2(sourceMovable.Position.X, desiredPosition.Y);
}
if (collidedY)
{
return new Vector2(desiredPosition.X, sourceMovable.Position.Y);
}
return desiredPosition;
}
public void RegisterCollider(ICollider collider)
{
_colliders.Add(collider);
}
}
}<file_sep>using System;
using System.Numerics;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Render.Scenes;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Core.Managers
{
public class SceneManager
{
private readonly IServiceProvider _serviceProvider;
private readonly DisplayManager _display;
private readonly ServiceScopeProvider _provider;
public IScene CurrentScene { get; private set; }
public SceneManager(IServiceProvider serviceProvider, DisplayManager display, ServiceScopeProvider provider)
{
_serviceProvider = serviceProvider;
_display = display;
_provider = provider;
}
public void Render()
{
_display.Render(CurrentScene);
}
public void Tick()
{
CurrentScene.Tick();
}
public void SetPerspectiveTarget(string perspectiveName, IGameObject target)
{
_display.Track(x => x.Name == perspectiveName, target);
}
public void SetPerspectiveCenter(Vector2 position)
{
_display.CurrentPerspective?.SetCenter(position);
}
public void SetScene<T>() where T : IScene
{
_provider.CurrentScope?.Dispose();
CurrentScene?.Dispose();
_provider.CurrentScope = _serviceProvider.CreateScope();
CurrentScene = _provider.CurrentScope.ServiceProvider.GetService<T>();
CurrentScene.Init();
}
}
}<file_sep>using System.Numerics;
using FreeScape.Engine.Core.Utilities;
using NUnit.Framework;
namespace FreeScape.Engine.Tests.UtilitiesTests
{
public class MathTests
{
public const double ACCEPTABLE_ACCURACY = 0.000001;
[Test]
public void HeadingFromAngleIsUnitVector()
{
var vec = Maths.GetHeadingVectorFromDegrees(45);
var normal = Vector2.Normalize(vec);
VectorAsserts.AreEqual(normal, vec, ACCEPTABLE_ACCURACY);
}
[Test]
public void HeadingVectorFromAngleIsAccurate()
{
var vec = Maths.GetHeadingVectorFromDegrees(0);
VectorAsserts.AreEqual(Vector2.UnitX, vec, ACCEPTABLE_ACCURACY);
}
[Test]
public void HeadingForDirectionIsUnit()
{
var vec = Maths.GetHeadingVectorFromMovement(true, false, false, true);
var normal = Vector2.Normalize(vec);
VectorAsserts.AreEqual(normal, vec, ACCEPTABLE_ACCURACY);
}
[Test]
public void NearEqualsIsTrue()
{
var a = new Vector2(1, 0);
var b = Vector2.Zero;
//<1, 0> is exactly 1 away from <0, 0> so this should be true
Assert.IsTrue(Maths.NearEquals(a, b, 1.0f));
}
}
}<file_sep>using System.Collections.Generic;
using FreeScape.Engine.Core.GameObjects.UI;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Layers.LayerTypes
{
public abstract class UILayer : ILayer
{
protected List<IUIObject> UIObjects;
public abstract int ZIndex { get; }
public RenderMode RenderMode => RenderMode.Screen;
public UILayer()
{
UIObjects = new List<IUIObject>();
}
public abstract void Init();
public virtual void Render(RenderTarget target)
{
foreach(var UIObject in UIObjects)
{
UIObject.Render(target);
}
}
public virtual void Tick()
{
foreach (var UIObject in UIObjects)
{
UIObject.Tick();
}
}
}
}
<file_sep>using FreeScape.Engine.Render.Layers;
using FreeScape.Scenes;
using System.Numerics;
using FreeScape.Engine.Core;
using FreeScape.Engine.Core.GameObjects.UI;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Layers.LayerTypes;
namespace FreeScape.Layers
{
public class PlayerUI : UILayer
{
private readonly GameObjectProvider _gameObjectProvider;
private readonly DisplayManager _displayManager;
private readonly SceneManager _sceneManager;
private readonly UIObjectProvider _uIObjectProvider;
private readonly ActionProvider _actionProvider;
Button HomeButton;
public PlayerUI(ActionProvider actionProvider, GameObjectProvider gameObjectProvider, DisplayManager displayManager, SceneManager sceneManager, UIObjectProvider uIObjectProvider)
{
_actionProvider = actionProvider;
_sceneManager = sceneManager;
_gameObjectProvider = gameObjectProvider;
_displayManager = displayManager;
_uIObjectProvider = uIObjectProvider;
ZIndex = 9999;
actionProvider.SubscribeOnPressed(a =>
{
if (a == "LeftClick")
MouseClick();
});
}
public override void Init()
{
CreateUIButtons();
}
public void MouseClick()
{
var mouseCoords = _actionProvider.GetMouseWorldCoods();
foreach (var uIObject in UIObjects)
{
if (uIObject.Hovered && uIObject is IButton button)
{
button.OnClick();
break;
}
}
}
public override int ZIndex { get; }
public override void Tick()
{
var view = _displayManager.CurrentPerspective.ScreenView;
HomeButton.Position = view.Center - (view.Size / 2) * 0.9f;
base.Tick();
}
private void CreateUIButtons()
{
var homeButtonInfo = new ButtonInfo();
homeButtonInfo.Position = new Vector2(0, 0);
homeButtonInfo.Size = new Vector2(50, 25);
homeButtonInfo.OnClickAction = () => { _sceneManager.SetScene<MainMenuScene>(); };
homeButtonInfo.ButtonTexture = "UI/Buttons/MainMenu/Menu";
HomeButton = _uIObjectProvider.CreateButton(homeButtonInfo);
UIObjects.Add(HomeButton);
}
}
}
<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Animations.AnimationTypes
{
/// <summary>
/// This is an interface that defines how the frames are loaded for the animation.
/// </summary>
public interface ISingleAnimation : IAnimation
{
/// <summary>
/// Load in the frames for the animation
/// </summary>
/// <param name="frames"></param>
internal void LoadFrames(List<AnimationFrame> frames);
}
}<file_sep>using System.Collections.Generic;
namespace FreeScape.Engine.Render.Tiled
{
public class TiledObjectGroup
{
public string DrawOrder { get; set; }
public string Name { get; set; }
public List<TiledObject> Objects { get; set; }
public int Opacity { get; set; }
public string Type { get; set; }
public bool Visible { get; set; }
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text.Json;
using FreeScape.Engine.Render.Animations;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
using FreeScape.Engine.Settings;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Layers
{
public class MapProvider
{
private readonly JsonSerializerOptions _options;
private readonly Dictionary<string, TiledMap> _maps;
private readonly Dictionary<uint, TiledTile> _tiles;
private readonly AnimationProvider _animationProvider;
private readonly TextureProvider _textureProvider;
public string CurrentMapName { get; set; }
public MapProvider(GameInfo gameInfo, JsonSerializerOptions options, AnimationProvider animationProvider, TextureProvider textureProvider)
{
_options = options;
_animationProvider = animationProvider;
_textureProvider = textureProvider;
_maps = new Dictionary<string, TiledMap>();
_tiles = new Dictionary<uint, TiledTile>();
foreach (var file in Directory.EnumerateFiles(gameInfo.MapDirectory)
.Where(x => x.EndsWith(".json", StringComparison.CurrentCultureIgnoreCase)))
{
var name = file.Split(Path.DirectorySeparatorChar).Last().Split('.').First();
_maps.Add(name, ReadMapFile(file));
}
}
private void ProcessAndAddTiles(TiledTileSet tileSet)
{
foreach(var tile in tileSet.Tiles)
{
TextureInfo textureInfo;
var correctedId = tile.Id + (uint)tileSet.FirstGid;
if (tileSet.Image != null)
textureInfo = GetTextureInfoFromTileSet(tile, tileSet, correctedId);
else
textureInfo = GetTextureInfo(tile, correctedId);
if (tile.Animation is not null)
_animationProvider.CreateAndAddAnimation(tile.Animation, tileSet.FirstGid, tile.Type);
tile.Id = correctedId;
_textureProvider.CreateAndAddTexture($"tiled:{textureInfo.Name}", textureInfo);
_tiles.Add(correctedId, tile);
}
}
public TiledTile GetTile(uint gid)
{
if (_tiles.TryGetValue(gid, out var tile))
return tile;
throw new Exception($"Tile does not exist with GID {gid}");
}
public TiledMap GetMap(string mapName)
{
if (_maps.ContainsKey(mapName))
{
CurrentMapName = mapName;
return _maps[mapName];
}
return null;
}
private TextureInfo GetTextureInfoFromTileSet(TiledTile tile, TiledTileSet tileSet, uint correctedId)
{
var tileSize = new Vector2(tileSet.TileWidth, tileSet.TileWidth);
var tileLocation = new Vector2(tile.Id % tileSet.Columns, (int)Math.Floor((float)tile.Id / tileSet.Columns)) * tileSize;
var textureLocation = new IntRect(tileLocation, new Vector2(tileSet.TileWidth, tileSet.TileHeight));
return new TextureInfo
{
File = $"TileSets{Path.DirectorySeparatorChar}{tileSet.Image}",
X = textureLocation.Left,
Y = textureLocation.Top,
Height = textureLocation.Height,
Width = textureLocation.Width,
Name = correctedId.ToString(),
Smooth = false
};
}
private TextureInfo GetTextureInfo(TiledTile tile, uint correctedId)
{
return new TextureInfo
{
File = tile.Image,
Height = (int)tile.ImageHeight,
Width = (int)tile.ImageWidth,
X = 0,
Y = 0,
Name = correctedId.ToString(),
Smooth = true
};
}
private TiledMap ReadMapFile(string path)
{
var text = File.ReadAllText(path);
var map = JsonSerializer.Deserialize<TiledMap>(text, _options);
foreach (var tileSet in map.TileSets)
{
ProcessAndAddTiles(tileSet);
}
return map;
}
}
}<file_sep>using FreeScape.Engine.Physics.Movement;
namespace FreeScape.Engine.Input.Controllers
{
public class UserInputController : IController
{
private readonly KeyboardController _keyboardController;
public UserInputController(KeyboardController keyboardController)
{
_keyboardController = keyboardController;
}
public ActionProvider CurrentActionProvider => _keyboardController.ActionProvider;
public HeadingVector HeadingVector => _keyboardController.HeadingVector;
public void Tick()
{
_keyboardController.Tick();
//HeadingVector = _keyboardMovement.HeadingVector;
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.Numerics;
using FreeScape.Engine.Core.GameObjects.Entities;
using FreeScape.Engine.Input.Controllers;
using FreeScape.Engine.Physics;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Collisions.Colliders;
using FreeScape.Engine.Render.Animations;
using FreeScape.Engine.Render.Animations.AnimationTypes;
namespace FreeScape.GameObjects.Player
{
public class Player : BaseEntity
{
private readonly AnimationProvider _animationProvider;
private readonly UserInputController _input;
public override Vector2 Size => new (4.0f, 4.0f);
public override Vector2 Scale => new (2.0f, 2.0f);
public override float Speed => _speed;
private float _speed;
public Player(UserInputController controller, AnimationProvider animationProvider)
{
_animationProvider = animationProvider;
_input = controller;
Controller = controller;
}
public override void Init()
{
base.Init();
_speed = 0.1f;
Position = new Vector2(300, 500);
var bodyCollider = new CircleCollider(Position, Position / Size * Scale, Size.X * Scale.X);
bodyCollider.ColliderType = ColliderType.Solid;
Colliders.Add(bodyCollider);
}
public override IEnumerable<(Func<bool>, IAnimation)> RegisterMovementAnimations()
{
yield return (() => HeadingVector.Vector == Vector2.Zero, _animationProvider.GetDirectionAnimation<CyclicAnimation>("idle", this));
yield return (() => HeadingVector.Vector != Vector2.Zero, _animationProvider.GetDirectionAnimation<CyclicAnimation>("walk", this));
}
public override IEnumerable<(Func<bool>, IAnimation)> RegisterActionAnimations()
{
yield return (() => _input.CurrentActionProvider.IsActionActivated("LeftClick"),
_animationProvider.GetDirectionAnimation<OneShotAnimation>("attack", this));
}
public override void CollisionEnter(ICollidable collidable)
{
}
}
}<file_sep>using FreeScape.Engine.Core.GameObjects.UI;
using FreeScape.Engine.Core.Utilities;
using FreeScape.Engine.Input;
using FreeScape.Engine.Render.Textures;
using Microsoft.Extensions.DependencyInjection;
namespace FreeScape.Engine.Core
{
public class UIObjectProvider
{
private readonly ServiceScopeProvider _provider;
public UIObjectProvider(ServiceScopeProvider scope)
{
_provider = scope;
}
public T Provide<T>() where T : IUIObject
{
return _provider.CurrentScope.ServiceProvider.GetService<T>();
}
public Button CreateButton(ButtonInfo info)
{
var texture = _provider.CurrentScope.ServiceProvider.GetService<TextureProvider>();
var actionProvider = _provider.CurrentScope.ServiceProvider.GetService<ActionProvider>();
var frameTime = _provider.CurrentScope.ServiceProvider.GetService<FrameTimeProvider>();
return new Button(info, texture.GetTextureByFile(info.ButtonTexture, $"{info.ButtonTexture}:default"), actionProvider, frameTime);
}
}
}<file_sep>using FreeScape.Engine.Physics.Movement;
namespace FreeScape.Engine.Input.Controllers
{
public class GamePadController : IController
{
public GamePadController()
{
HeadingVector = new HeadingVector();
}
public HeadingVector HeadingVector { get; }
public void Tick()
{
}
}
}<file_sep>using FreeScape.Engine.Core;
using FreeScape.Engine.Core.GameObjects.UI;
using FreeScape.Engine.Core.Managers;
using FreeScape.Engine.Input;
using FreeScape.Engine.Physics;
using FreeScape.Engine.Render.Layers;
using FreeScape.GameObjects;
using FreeScape.Engine.Physics.Collisions;
using FreeScape.Engine.Physics.Movement;
using FreeScape.Engine.Render.Layers.LayerTypes;
using FreeScape.Engine.Render.Textures;
using FreeScape.Engine.Render.Tiled;
using FreeScape.GameObjects.Player;
namespace FreeScape.Layers
{
public class EntityLayer : GameObjectLayer
{
private readonly GameObjectProvider _gameObjectProvider;
private readonly DisplayManager _displayManager;
private readonly ActionProvider _actionProvider;
private readonly MapProvider _mapProvider;
public override int ZIndex => 999;
protected override TiledMap Map => _mapProvider.GetMap("TiledTestMap");
public EntityLayer(CollisionEngine collisionEngine, ActionProvider actionProvider, GameObjectProvider gameObjectProvider,
DisplayManager displayManager, Movement movement, MapProvider mapProvider, TextureProvider textureProvider):base(movement, mapProvider, collisionEngine, textureProvider)
{
_actionProvider = actionProvider;
_gameObjectProvider = gameObjectProvider;
_displayManager = displayManager;
_mapProvider = mapProvider;
actionProvider.SubscribeOnPressed(a =>
{
if (a == "LeftClick")
MouseClick();
});
}
public override void Init()
{
var player = _gameObjectProvider.Provide<Player>();
GameObjects.Add(player);
foreach(var gameObject in GameObjects)
{
gameObject.Init();
}
_displayManager.Track(x => x.Name == "main", player);
base.Init();
}
public void MouseClick()
{
var mouseCoords = _actionProvider.GetMouseWorldCoods();
foreach (var gameObject in GameObjects)
{
if(gameObject is IUIObject uIObject)
if (uIObject.Hovered && uIObject is IButton button)
{
button.OnClick();
break;
}
}
}
}
}
<file_sep>namespace FreeScape.Engine.Settings
{
public class SoundSettings: BaseSetting
{
private float _sfxVolume;
private float _musicVolume;
public float SfxVolume
{
get => _sfxVolume;
set
{
_sfxVolume = value;
Changed();
}
}
public float MusicVolume
{
get => _musicVolume;
set
{
_musicVolume = value;
Changed();
}
}
public override void Dispose()
{
}
}
}<file_sep>using SFML.Graphics;
namespace FreeScape.Engine.Render.Textures
{
public class TextureInfo
{
public int X { get; set; }
public int Y { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public string Name { get; set; }
public string File { get; set; }
public bool Smooth { get; set; }
public IntRect Location => new IntRect(X, Y, Width, Height);
public override string ToString()
{
return $"[Texture]: {Name}, file: {File}, location: {Location}";
}
}
}<file_sep>using System.Collections.Generic;
using FreeScape.Engine.Core;
using SFML.Graphics;
namespace FreeScape.Engine.Render.Animations.AnimationTypes
{
public class CyclicAnimation : ISingleAnimation
{
private readonly FrameTimeProvider _timeProvider;
private readonly Queue<AnimationFrame> _animationQueue;
private List<AnimationFrame> _animationCache;
private double _frameTimeRemaining;
private AnimationFrame _currentFrame;
public Sprite CurrentSprite => _currentFrame?.Sprite;
public CyclicAnimation(FrameTimeProvider timeProvider)
{
_timeProvider = timeProvider;
_animationCache = new();
_animationQueue = new();
}
public void Advance()
{
if (_frameTimeRemaining > 0)
_frameTimeRemaining -= _timeProvider.DeltaTimeMilliSeconds;
else if (_animationQueue.TryDequeue(out var newFrame))
{
_animationQueue.Enqueue(_currentFrame);
_currentFrame = newFrame;
_frameTimeRemaining = newFrame.Duration;
}
}
public void Reset()
{
_animationQueue.Clear();
foreach (var frame in _animationCache)
{
_animationQueue.Enqueue(frame);
}
_currentFrame = _animationQueue.Dequeue();
}
void ISingleAnimation.LoadFrames(List<AnimationFrame> frames)
{
_animationCache = frames;
Reset();
}
}
}<file_sep>using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FreeScape.Engine.Core.GameObjects;
using FreeScape.Engine.Core.GameObjects.Entities;
namespace FreeScape.Engine.Physics.Collisions
{
public class CollisionEngine
{
public List<ICollidable> StaticCollidables;
public List<ICollidable> GameObjectCollidables;
public CollisionEngine()
{
StaticCollidables = new List<ICollidable>();
GameObjectCollidables = new List<ICollidable>();
}
public void RegisterStaticCollidable(ICollidable collidable)
{
StaticCollidables.Add(collidable);
}
public void RegisterGameObjectCollidable(ICollidable collidable)
{
GameObjectCollidables.Add(collidable);
}
public void CheckCollisions()
{
if (GameObjectCollidables.Count + StaticCollidables.Count > 1)
{
foreach (var firstCollidable in GameObjectCollidables)
{
if (firstCollidable is not IGameObject movableCollidable) continue;
foreach (var collider in firstCollidable.Colliders)
{
var firstVertices = collider.Vertices.Select(x => x + movableCollidable.Position).ToArray();
for (var i = 1; i < GameObjectCollidables.Count; i++)
{
var secondCollidable = GameObjectCollidables.ElementAt(i);
if (secondCollidable is not IGameObject secondMovableCollidable) continue;
foreach (var secondCollider in secondCollidable.Colliders)
{
var secondVertices = secondCollider.Vertices.Select(x => x + secondMovableCollidable.Position).ToArray();
if (GJKCollision.GJKCheckCollision(firstVertices, secondVertices, out var test))
{
firstCollidable.CollisionEnter(secondCollidable);
secondCollidable.CollisionEnter(firstCollidable);
}
}
}
foreach (var staticCollidable in StaticCollidables)
{
foreach (var staticCollider in staticCollidable.Colliders)
{
var secondVertices = staticCollider.GetVerticesRelativeToPosition();
if(staticCollidable is Tile mgo)
{
}
if (GJKCollision.GJKCheckCollision(firstVertices, secondVertices, out var test))
{
firstCollidable.CollisionEnter(staticCollidable);
staticCollidable.CollisionEnter(firstCollidable);
}
}
}
}
}
}
}
}
}
<file_sep>using System.Numerics;
using SFML.Graphics;
namespace FreeScape.Engine.Core.GameObjects.Entities
{
public class EmptyGameObject : IGameObject
{
public Vector2 Size { get; set; }
public Vector2 Position { get; set; }
public Vector2 Scale { get; set; } = Vector2.Zero;
public EmptyGameObject(Vector2 position)
{
Position = position;
}
public void Render(RenderTarget target)
{
}
public void Tick()
{
}
public void Init()
{
}
}
}
|
d2c8ce3161ca1ff4602a6364902c00b7a7002bf9
|
[
"Markdown",
"C#"
] | 103
|
C#
|
Davisjames0901/FreeScape
|
1977464a8754a4c7578f970c4ba9b3ade6a6dfc2
|
54539c5a34fcf80b5f00d336893017fb7f96cd40
|
refs/heads/master
|
<file_sep>get '/' do
@events = Event.all
erb :index
end
get '/events/:id/show' do |id|
@event = Event.find(id)
erb :event_show
end
get '/events/new' do
erb :new_form
end
post '/events/create' do
p params.inspect
myevent = Event.create(title: params[:title], date:params[:date], organizer_email:params[:email], organizer_name:params[:name])
if !myevent.errors.messages.empty?
@msg = myevent.errors.messages
erb :new_form
else
@msg = "your event was succesfully added"
redirect "/?msg=#{@msg}"
end
end
<file_sep>class Event < ActiveRecord::Base
include ActiveModel::Validations
validates :title, :presence => {:message => "title cannot be blank"}, :uniqueness => {:message => "title has already been taken"}
validates :date, :presence => {:message => "must choose valid date"}, format:{with:/\d{4}-[01]\d+-[0123]\d+/, message: "date must be MM/DD/YYYY format"}
validates :organizer_email, format: {with: /.+@.+\..{2,3}/,message: "must be x@x.x format" }
validates :organizer_name, :presence => {:message => "name cannot be blank"}
validate :date_validator
def date_validator
errors.add(:date_past, "cant be in the past") if date < Date.today
end
end
|
9e138573e0a4c6d558f8c9b9aa4ac74741043ebd
|
[
"Ruby"
] | 2
|
Ruby
|
Ale1/validations
|
aeac9310a1efdfe777c52de7fc51591dc4e29fa0
|
70d576ef3d1649c7b8aeb1dbd09672c5f402bf27
|
refs/heads/main
|
<repo_name>vyborll/todo-app<file_sep>/src/types/Todos.ts
export type TodoContextState = {
todos: Todo[];
createTodo: ({ title, completed }: { title: string; completed: boolean }) => void;
deleteTodo: (id: number) => void;
completeTodo: (id: number) => void;
};
export interface Todo {
title: string;
completed: boolean;
}
|
5a097324338805510cab5d492c23d3a6abc2800f
|
[
"TypeScript"
] | 1
|
TypeScript
|
vyborll/todo-app
|
fb00462967c0b1571b191392abaaa83d735caf55
|
d4b09b6a9ddc67c9ba5386d57aa7a6057d143548
|
refs/heads/master
|
<file_sep>using System;
using System.Collections.Generic;
using System.Text;
namespace FindColor.Common
{
public class Settings
{
public string Color { get; set; }
public string Sound { get; set; }
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
namespace FindColor
{
public partial class FindColor : Form
{
public FindColor()
{
InitializeComponent();
//
LoadResources();
//
tmrGetColor.Interval = 100;
tmrFindingColor.Interval = 5000;
tmrGetColor.Tick += new EventHandler(tmrGetColor_Tick);
tmrFindingColor.Tick += new EventHandler(tmrFindingColor_Tick);
//
btnColorDialog.Click += new EventHandler(btnColorDialog_Click);
btnGetColor.Click += new EventHandler(btnGetColor_Click);
btnFindingColor.Click += new EventHandler(btnFindingColor_Click);
btnSelectSound.Click += new EventHandler(btnSelectSound_Click);
btnPlaySound.Click += new EventHandler(btnPlaySound_Click);
//
btnColorDialog.KeyDown += new KeyEventHandler(action_KeyDown);
btnGetColor.KeyDown += new KeyEventHandler(action_KeyDown);
btnFindingColor.KeyDown += new KeyEventHandler(action_KeyDown);
txtHexColor.KeyDown += new KeyEventHandler(action_KeyDown);
btnSelectSound.KeyDown += new KeyEventHandler(action_KeyDown);
btnPlaySound.KeyDown += new KeyEventHandler(action_KeyDown);
//
lblHelp.ForeColor = Color.Red;
lblHelp.Text = "";
}
//This is a replacement for Cursor.Position in WinForms
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern bool SetCursorPos(int x, int y);
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
public const int MOUSEEVENTF_LEFTDOWN = 0x02;
public const int MOUSEEVENTF_LEFTUP = 0x04;
Common.IniFile IniSetting = new Common.IniFile("Settings.ini");
Common.Settings Setting = new Common.Settings();
//Play Sound
bool checkPlaySound = true;
System.Media.SoundPlayer SoundPlayer = new System.Media.SoundPlayer();
WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer();
private void btnColorDialog_Click(object sender, EventArgs e)
{
ShowColorDialog();
}
private void btnGetColor_Click(object sender, EventArgs e)
{
if (tmrGetColor.Enabled)
StopGetColor();
else
StartGetColor();
}
private void btnFindingColor_Click(object sender, EventArgs e)
{
if (tmrFindingColor.Enabled)
StopFindingColor();
else
StartFindingColor();
}
private void btnSelectSound_Click(object sender, EventArgs e)
{
SelectSound();
}
private void btnPlaySound_Click(object sender, EventArgs e)
{
if (checkPlaySound)
StartPlaySound(Setting.Sound);
else
StopPlaySound();
}
private void action_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F4)
{
ShowColorDialog();
}
else if (e.KeyCode == Keys.F5)
{
StopFindingColor();
if (tmrGetColor.Enabled)
StopGetColor();
else
StartGetColor();
}
if (e.KeyCode == Keys.F6)
{
SelectSound();
StopPlaySound();
}
if (e.KeyCode == Keys.F7)
{
if (checkPlaySound)
StartPlaySound(Setting.Sound);
else
StopPlaySound();
}
else if (e.KeyCode == Keys.F8)
{
StopGetColor();
if (tmrFindingColor.Enabled)
StopFindingColor();
else
StartFindingColor();
}
}
private void ShowColorDialog()
{
var colorDialog = new ColorDialog();
if (colorDialog.ShowDialog() == DialogResult.OK)
{
var color = colorDialog.Color;
txtHexColor.Text = Common.Images.RGBToHex(color);
imgHexColor.BackColor = color;
IniSetting.Write("Color", txtHexColor.Text);
SetDefaultSetting();
}
}
private void StartGetColor()
{
tmrGetColor.Start();
tmrGetColor.Enabled = true;
lblHelp.Text = "Press F5 to select Color!";
}
private void StopGetColor()
{
tmrGetColor.Stop();
tmrGetColor.Enabled = false;
lblHelp.Text = "";
IniSetting.Write("Color", txtHexColor.Text);
SetDefaultSetting();
}
private void tmrGetColor_Tick(object sender, EventArgs e)
{
List<Point> result = new List<Point>();
var bmp = new Bitmap(1, 1);
using (Graphics g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(System.Windows.Forms.Cursor.Position, new Point(0, 0), new Size(1, 1));
}
var pixel = bmp.GetPixel(0, 0);
imgHexColor.BackColor = pixel;
txtHexColor.Text = Common.Images.RGBToHex(pixel);
//var p = new Point();
//p.X = (this.Width / 2) - (label1.Width / 2);
//p.Y = label1.Top;
//label1.Location = p;
//MessageBox.Show(Timer.ToString());
}
private void StartFindingColor()
{
StopPlaySound();
if (string.IsNullOrEmpty(txtHexColor.Text))
{
lblHelp.Text = "Set Hex color first, please!";
txtHexColor.Focus();
return;
}
lblHelp.Text = "Finding...";
txtHexColor.Enabled = false;
btnColorDialog.Enabled = false;
btnGetColor.Enabled = false;
btnSelectSound.Enabled = false;
btnPlaySound.Enabled = false;
tmrFindingColor.Start();
tmrFindingColor.Enabled = true;
WindowState = FormWindowState.Minimized;
}
private void StopFindingColor()
{
lblHelp.Text = "";
txtHexColor.Enabled = true;
btnColorDialog.Enabled = true;
btnGetColor.Enabled = true;
btnSelectSound.Enabled = true;
btnPlaySound.Enabled = true;
tmrFindingColor.Stop();
tmrFindingColor.Enabled = false;
StopPlaySound();
}
private void tmrFindingColor_Tick(object sender, EventArgs e)
{
//Point[] points = FindColor(HexToRGB("#2D2D30"));
Point[] points = Common.Images.FindColor(txtHexColor.Text.Trim('#'));
if (points.Length > 0)
{
StartPlaySound(Setting.Sound);
//SetCursorPos(points[0].X, points[0].Y);
//mouse_event(MOUSEEVENTF_LEFTDOWN, points[0].X, points[0].Y, 0, 0);
//foreach (var i in points)
//{
// SetCursorPos(i.X, i.Y);
// mouse_event(MOUSEEVENTF_LEFTDOWN, i.X, i.Y, 0, 0);
//}
}
}
private void SelectSound()
{
OpenFileDialog openFileDialog = new OpenFileDialog();
//openFileDialog.InitialDirectory = "c:\\";
openFileDialog.Filter = "audio files (*.wav;*.mp3)|*.wav;*.mp3";
openFileDialog.FilterIndex = 2;
openFileDialog.RestoreDirectory = false;
StopPlaySound();
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
try
{
string file = openFileDialog.FileName;
IniSetting.Write("Sound", file);
lblSound.Text = file;
SetDefaultSetting();
}
catch (Exception ex)
{
lblHelp.Text = ex.Message;
}
}
}
private void StartPlaySound(string SoundSource)
{
checkPlaySound = false;
if (System.IO.File.Exists(SoundSource))
{
var ext = System.IO.Path.GetExtension(SoundSource).ToLower();
if (ext == ".wav")
{
SoundPlayer.SoundLocation = SoundSource;
SoundPlayer.Play();
}
else if (ext == ".mp3")
{
wplayer.URL = SoundSource;
wplayer.controls.play();
}
}
else
{
SoundPlayer.Stream = Properties.Resources.AlertSound;
SoundPlayer.Play();
}
}
private void StopPlaySound()
{
checkPlaySound = true;
SoundPlayer.Stop();
wplayer.controls.stop();
}
private void LoadResources()
{
//
this.StartPosition = FormStartPosition.CenterScreen;
//btnColorDialog
btnColorDialog.BackColor = Color.DodgerBlue;
btnColorDialog.FlatAppearance.BorderSize = 0;
btnColorDialog.FlatStyle = FlatStyle.Flat;
btnColorDialog.ForeColor = Color.White;
btnColorDialog.UseVisualStyleBackColor = false;
//btnGetColor
btnGetColor.BackColor = Color.DodgerBlue;
btnGetColor.FlatAppearance.BorderSize = 0;
btnGetColor.FlatStyle = FlatStyle.Flat;
btnGetColor.ForeColor = Color.White;
btnGetColor.UseVisualStyleBackColor = false;
//btnFindingColor
btnFindingColor.BackColor = Color.DodgerBlue;
btnFindingColor.FlatAppearance.BorderSize = 0;
btnFindingColor.FlatStyle = FlatStyle.Flat;
btnFindingColor.ForeColor = Color.White;
btnFindingColor.UseVisualStyleBackColor = false;
//btnSelectSound
btnSelectSound.BackColor = Color.DodgerBlue;
btnSelectSound.FlatAppearance.BorderSize = 0;
btnSelectSound.FlatStyle = FlatStyle.Flat;
btnSelectSound.ForeColor = Color.White;
btnSelectSound.UseVisualStyleBackColor = false;
//btnPlaySound
btnPlaySound.BackColor = Color.DodgerBlue;
btnPlaySound.FlatAppearance.BorderSize = 0;
btnPlaySound.FlatStyle = FlatStyle.Flat;
btnPlaySound.ForeColor = Color.White;
btnPlaySound.UseVisualStyleBackColor = false;
//
if (System.IO.File.Exists(IniSetting.Path))
{
if (!System.IO.File.Exists(IniSetting.Read("Sound")))
IniSetting.Write("Sound", "AlertSound.wav");
SetDefaultSetting();
}
else
{
var st = new Common.Settings()
{
Color = "000000",
Sound = "AlertSound.wav"
};
IniSetting.Write("Color", st.Color);
IniSetting.Write("Sound", st.Sound);
SetDefaultSetting();
}
//MessageBox.Show("Not Settings File!");
}
private void SetDefaultSetting()
{
Setting.Color = IniSetting.Read("Color");
Setting.Sound = IniSetting.Read("Sound");
//
txtHexColor.Text = Setting.Color;
lblSound.Text = Setting.Sound;
imgHexColor.BackColor = Common.Images.HexToRGB(Setting.Color);
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
namespace FindColor.Common
{
public class Images
{
public static string RGBToHex(Color color)
{
string hex = color.R.ToString("X2") + color.G.ToString("X2") + color.B.ToString("X2");
//string hex = string.Format("0x{0:8x}", color);
return hex;
}
public static Color HexToRGB(string ColorHex = "#FFFFFF00")
{
int r, g, b;
int num = (int)long.Parse(ColorHex, System.Globalization.NumberStyles.HexNumber);
r = (num & 0xFF0000) >> 16;
g = (num & 0xFF00) >> 8;
b = num & 0xFF;
return Color.FromArgb(r,g,b);
}
public static Bitmap GetScreenShot()
{
Bitmap result = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
{
using (Graphics gfx = Graphics.FromImage(result))
{
gfx.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
}
}
return result;
}
public static ImageCodecInfo GetEncoder(ImageFormat format)
{
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageDecoders();
foreach (ImageCodecInfo codec in codecs)
{
if (codec.FormatID == format.Guid)
{
return codec;
}
}
return null;
}
public static Point[] FindColor(string HexColor)
{
List<Point> result = new List<Point>();
using (Bitmap bmp = GetScreenShot())
{
////Image i = (Image)bmp;
//var jpgEncoder = GetEncoder(ImageFormat.Bmp);
//// Create an Encoder object based on the GUID
//// for the Quality parameter category.
//var myEncoder = System.Drawing.Imaging.Encoder.Quality;
//var myEncoderParameters = new EncoderParameters(1);
//var myEncoderParameter = new EncoderParameter(myEncoder, 50L);
//myEncoderParameters.Param[0] = myEncoderParameter;
//bmp.Save("test.jpg", jpgEncoder, myEncoderParameters);
for (int x = 0; x < bmp.Width; x++)
{
for (int y = 0; y < bmp.Height; y++)
{
if (HexColor == RGBToHex(bmp.GetPixel(x, y)))
result.Add(new Point(x, y));
}
}
}
return result.ToArray();
}
//private static Point[] FindColor(Color color)
//{
// int searchValue = color.ToArgb();
// List<Point> result = new List<Point>();
// var s = new List<string>();
// using (Bitmap bmp = GetScreenShot())
// {
// //Image i = (Image)bmp;
// var jpgEncoder = GetEncoder(ImageFormat.Bmp);
// // Create an Encoder object based on the GUID
// // for the Quality parameter category.
// var myEncoder = System.Drawing.Imaging.Encoder.Quality;
// var myEncoderParameters = new EncoderParameters(1);
// var myEncoderParameter = new EncoderParameter(myEncoder, 50L);
// myEncoderParameters.Param[0] = myEncoderParameter;
// bmp.Save("test.jpg", jpgEncoder, myEncoderParameters);
// for (int x = 0; x < bmp.Width; x++)
// {
// for (int y = 0; y < bmp.Height; y++)
// {
// var tmp = RGBToHex(bmp.GetPixel(x, y));
// s.Add(tmp);
// if (searchValue.Equals(bmp.GetPixel(x, y).ToArgb()))
// result.Add(new Point(x, y));
// }
// }
// }
// return result.ToArray();
//}
public static Image GrayScale(Image Img)
{
var imageStream = new System.IO.MemoryStream();
using (Bitmap bmp = new Bitmap(Img))
{
int rgb;
Color c;
for (int y = 0; y < bmp.Height; y++)
for (int x = 0; x < bmp.Width; x++)
{
c = bmp.GetPixel(x, y);
rgb = (int)((c.R + c.G + c.B) / 3);
bmp.SetPixel(x, y, Color.FromArgb(rgb, rgb, rgb));
}
bmp.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
return Image.FromStream(imageStream);
}
}
}
<file_sep>[FindColor]
Color=1B81E5
Sound=E:\Musics\Khanh Vu_Khoc Lam Gi.mp3
|
91a57aa14504d57baaf9a978e472fde7325d129e
|
[
"C#",
"INI"
] | 4
|
C#
|
tuanmjnh/FindColor
|
ee141dba33ef6b65aaec969a1a818cae8e2a8b32
|
673006733e071669678bf0af9d8ee2ea99ff15e4
|
refs/heads/master
|
<repo_name>settiana/quiz-3-im-laravel-juni-2020<file_sep>/app/Models/ArtikelModel.php
<?php
namespace App\Models;
use Illuminate\Support\Facades\DB;
class ArtikelModel
{
public static function get_all()
{
$artikels = DB::table('artikels')
->orderBy('id', 'desc')
->get();
return $artikels;
}
public static function get($artikel_id)
{
$Artikel = DB::table('artikels')
->where('id', $artikel_id)
->first();
return $Artikel;
}
public static function save($data)
{
$new_artikel = DB::table('artikels')->insert($data);
return $new_artikel;
}
public static function update($id, $data)
{
$artikel = DB::table('artikels')
->where('id', $id)
->update($data);
return $artikel;
}
public static function destroy($id)
{
$deleted = DB::table('artikels')
->where('id', $id)
->delete();
return $deleted;
}
}
<file_sep>/app/Http/Controllers/ArtikelController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\ArtikelModel;
class ArtikelController extends Controller
{
public function show_erd()
{
return view('artikel.erd');
}
public function index()
{
$artikels = ArtikelModel::get_all();
return view('artikel.index', compact('artikels'));
}
public function create()
{
return view('artikel.form');
}
public function store(Request $request)
{
$data = $request->all();
unset($data['_token']);
$data['slug'] = $this->get_slug($data['judul']);
$data['created_at'] =new \DateTime('now');
$artikel = ArtikelModel::save($data);
if ($artikel) {
return redirect('/artikel');
}
}
public function show($artikel_id)
{
$artikel = ArtikelModel::get($artikel_id);
return view('artikel.show', compact('artikel'));
}
public function edit($artikel_id)
{
$artikel = ArtikelModel::get($artikel_id);
return view('artikel.edit', compact('artikel'));
}
public function update($artikel_id, Request $request)
{
$data = $request->all();
unset($data['_method']);
unset($data['_token']);
$data['slug'] = $this->get_slug($data['judul']);
$data['updated_at'] =new \DateTime('now');
$artikel = ArtikelModel::update($artikel_id, $data);
if ($artikel) {
return redirect('/artikel');
}
}
public function destroy($artikel_id)
{
$artikel = ArtikelModel::destroy($artikel_id);
return redirect('/artikel');
}
private function get_slug($str)
{
return preg_replace("/[^A-Za-z0-9]/", '-', strtolower($str));
}
}
|
f77e8381c1845a6ac94bd8225e786e8a0277ce99
|
[
"PHP"
] | 2
|
PHP
|
settiana/quiz-3-im-laravel-juni-2020
|
55dc128654e8a9ebd9ce5e92f419855ae971bc17
|
7c5471c918f83abeced47d27316215ec4ca0234c
|
refs/heads/master
|
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class Comprobante : Form
{
private int numeroVoucher;
public Comprobante(int numVou)
{
InitializeComponent();
this.numeroVoucher = numVou;
}
private void label14_Click(object sender, EventArgs e)
{
}
private void label11_Click(object sender, EventArgs e)
{
}
private void Comprobante_Load(object sender, EventArgs e)
{
using (SqlConnection conexion = this.generarConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.ObtenerDatosDeCompra", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numeroVoucher",SqlDbType.Int).Value = this.numeroVoucher;
comando.Parameters.Add("@origen",SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comando.Parameters.Add("@destino",SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comando.Parameters.Add("@servicio",SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comando.Parameters.Add("@fechaSalida",SqlDbType.DateTime).Direction = ParameterDirection.Output;
comando.Parameters.Add("@fechaLlegada",SqlDbType.DateTime).Direction = ParameterDirection.Output;
comando.Parameters.Add("@patente",SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comando.Parameters.Add("@cantidadPasajes",SqlDbType.Int,18).Direction = ParameterDirection.Output;
comando.Parameters.Add("@kilosEncomiendas",SqlDbType.Decimal,20).Direction = ParameterDirection.Output;
comando.Parameters.Add("@total",SqlDbType.Decimal).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
textOrigen.Text = comando.Parameters["@origen"].Value.ToString();
textDestino.Text = comando.Parameters["@destino"].Value.ToString();
textServicio.Text = comando.Parameters["@servicio"].Value.ToString();
textFechaSal.Text = Convert.ToDateTime(comando.Parameters["@fechaSalida"].Value).ToString();
textFechaLlegada.Text = Convert.ToDateTime(comando.Parameters["@fechaLlegada"].Value).ToString();
textPatente.Text = comando.Parameters["@patente"].Value.ToString();
textCantidadPasj.Text = comando.Parameters["@cantidadPasajes"].Value.ToString();
textKilos.Text = Convert.ToDecimal(comando.Parameters["@kilosEncomiendas"].Value).ToString();
textTotal.Text = Convert.ToDecimal(comando.Parameters["@total"].Value).ToString();
textNumVoucher.Text = this.numeroVoucher.ToString();
}
}
}
private SqlConnection generarConexion()
{
String stringDeConexion = "";
String linea;
String ruta = Application.StartupPath+@"\FRBABUS.txt";
StreamReader archivo = new StreamReader(ruta,Encoding.ASCII);
while ((linea = archivo.ReadLine()) != null)
{
String[] renglon = linea.Split(':');
String primerPalabra = renglon[0];
if (primerPalabra.Equals("conexion"))
stringDeConexion = renglon[1];
}
archivo.Close();
return new SqlConnection(stringDeConexion);
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class AgregarPasaje : Form1
{
private int codigoViaje {get;set;}
private int numeroVoucher;
private bool discapacidad;
private bool jubilado;
private String query;
public AgregarPasaje(int codigoViajeHeredado,int nroVoucherCompra,String tipo)
{
InitializeComponent();
this.codigoViaje = codigoViajeHeredado;
this.numeroVoucher = nroVoucherCompra;
if(tipo.Equals("Por tutor"))
this.query = "LOS_VIAJEROS_DEL_ANONIMATO.InsertarPasajeTutor";
else
this.query = "LOS_VIAJEROS_DEL_ANONIMATO.InsertarPasaje";
}
private void AgregarPasaje_Load(object sender, EventArgs e)
{}
// Insertar pasajero
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
InsertarCliente insercion = new InsertarCliente();
(insercion).ShowDialog();
textBoxDNI.Text = insercion.DNI_Cliente_Agregado.ToString();
textBoxApellido.Text = insercion.Apellido_Cliente_Agregado;
textBoxNombre.Text = insercion.Nombre_Cliente_Agregado;
this.discapacidad = insercion.discapacidad;
//this.jubilado = insercion.jubilado;
this.Show();
}
private void buttonEspecificarB_Click(object sender, EventArgs e)
{
this.Hide();
MostrarButacasDisponibles insercionB = new MostrarButacasDisponibles(this.codigoViaje);
DialogResult dr = insercionB.ShowDialog();
if (dr == DialogResult.OK)
{
textBoxNumeroB.Text = insercionB.numeroBElegido.ToString();
textBoxPisoB.Text = insercionB.pisoElegido.ToString();
textBoxUbiB.Text = insercionB.ubicacionElegida.ToString();
}
this.Show();
}
public void validarCampos()
{
Boolean hayError = false;
String errorMensaje = "";
if (textBoxDNI.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar DNI;";
}
if (textBoxApellido.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar apellido;";
}
if (textBoxNombre.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar nombre;";
}
if (textBoxPisoB.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar piso de butaca;";
}
if (textBoxNumeroB.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar numero de butaca;";
}
if (textBoxUbiB.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar ubicación de butaca;";
}
if (this.discapacidad)
{
if (this.HayOtroPasajeroConDiscapacidad())
{
hayError = true;
errorMensaje += "Ya hay un pasajero con alguna discapacidad en esta compra;";
}
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private int obtenerCodigoButaca(int numero, int codViaje)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerCodigoButaca", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@numeroButaca", SqlDbType.Int).Value = numero;
comando.Parameters.Add("@codigoButaca", SqlDbType.Int).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return Convert.ToInt32(comando.Parameters["@codigoButaca"].Value);
}
}
}
private void buttonConfirmar_Click(object sender, EventArgs e)
{
try
{
this.validarCampos();
using (SqlConnection conexion = this.obtenerConexion())
{
using(SqlCommand comand = new SqlCommand(this.query,conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comand.Parameters.Add("@numeroVoucher",SqlDbType.Int).Value = this.numeroVoucher;
comand.Parameters.Add("@DNI_pasajero",SqlDbType.Int).Value = Convert.ToInt32(textBoxDNI.Text);
comand.Parameters.Add("@codigoButaca", SqlDbType.Int).Value = this.obtenerCodigoButaca(Convert.ToInt32(textBoxNumeroB.Text), this.codigoViaje);
comand.ExecuteNonQuery();
}
}
if (this.discapacidad)
{
this.Hide();
DialogoInsertarTutor dialogo = new DialogoInsertarTutor(this.numeroVoucher, this.codigoViaje, Convert.ToInt32(textBoxDNI.Text));
DialogResult dr = dialogo.ShowDialog();
}
this.Close();
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private Boolean HayOtroPasajeroConDiscapacidad()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.CantidadDiscapacitados", conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@numeroVoucher",SqlDbType.Int).Value = this.numeroVoucher;
comand.Parameters.Add("@cantidadDiscapacitados", SqlDbType.Int).Direction = ParameterDirection.Output;
comand.ExecuteNonQuery();
int cantidadPasajerosConDiscapacidad = Convert.ToInt32(comand.Parameters["@cantidadDiscapacitados"].Value);
return cantidadPasajerosConDiscapacidad >= 1;
}
}
}
// Cancelar
private void button3_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Micro
{
public partial class CalendarioCompra : Form1
{
private String fechaSalida;
public CalendarioCompra()
{
InitializeComponent();
monthCalendar1.TodayDate = this.getFechaActual();
monthCalendar1.SelectionStart = this.getFechaActual();
monthCalendar1.SelectionEnd = this.getFechaActual();
fechaSalida = this.getFechaActual().ToShortDateString();
}
private void button1_Click(object sender, EventArgs e)
{
throw new FechaElegidaExeption(fechaSalida);
}
private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
{
fechaSalida = monthCalendar1.SelectionEnd.ToShortDateString();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ListadoMicro2 : Form1
{
public DateTime fechaDesde;
public DateTime fechaHasta;
public int KGDesde = 0;
public int KGHasta = 0;
public ListadoMicro2()
{
InitializeComponent();
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
numericKGDesde.Value = 0;
numericKGHasta.Value = 0;
textFecDesde.Text = "";
textFecHasta.Text = "";
}
private void validarParametros()
{
Boolean hayError = false;
String mensajeError = "";
if (numericKGDesde.Value > numericKGHasta.Value)
{
hayError = true;
mensajeError += "El campo kilos desde debe ser mayor o igual a kilos desde;";
}
if (fechaDesde != DateTime.MinValue)
{
if (fechaHasta == DateTime.MinValue )
{
hayError = true;
mensajeError += "Debe elegirse un periodo acotado de tiempo;";
}
}
if (fechaDesde > fechaHasta)
{
hayError = true;
mensajeError += "La fecha de inicio debe ser mayor a la fecha de fin del periodo libre;";
}
if (fechaHasta != DateTime.MinValue)
{
if (fechaDesde == DateTime.MinValue)
{
hayError = true;
mensajeError += "Debe elegirse un periodo acotado de tiempo;";
}
}
if (hayError)
throw new ParametrosIncorrectosException(mensajeError);
}
private void buttonFecDesde_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textFecDesde.Text = ex.Message;
fechaDesde = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
private void buttonFecHasta_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textFecHasta.Text = ex.Message;
fechaHasta = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
this.Close();
}
catch(ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void numericKGDesde_ValueChanged(object sender, EventArgs e)
{
this.KGDesde = Convert.ToInt32(numericKGDesde.Value);
}
private void numericKGHasta_ValueChanged(object sender, EventArgs e)
{
this.KGHasta = Convert.ToInt32(numericKGHasta.Value);
}
private void buttonFinal_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
String fechaStDesde = this.fechaDesde.ToString("yyyyMMdd");
String fechaStHasta = this.fechaHasta.ToString("yyyyMMdd");
if(this.fechaDesde == DateTime.MinValue)
fechaStDesde = "20120101";
if(this.fechaHasta == DateTime.MinValue)
fechaStHasta = "20120101";
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.AplicarFiltros2("+
"'"+fechaStDesde+"',"+
"'"+fechaStHasta+"',"+
KGDesde.ToString()+","+
KGHasta.ToString()+")";
comando.Connection = conexion;
comando.CommandText = query;
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable filtrados = new DataTable();
adapter.Fill(filtrados);
dataGridView1.DataSource = filtrados;
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void ListadoMicro2_Load(object sender, EventArgs e)
{
this.fechaDesde = DateTime.MinValue;
this.fechaHasta = DateTime.MinValue;
dataGridView1.ReadOnly = true;
dataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Top_Destinos
{
public partial class TopDestinosMicrosVacios : Form1
{
public TopDestinosMicrosVacios(string unAño, int unSemestre)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
DataTable tabla = new DataTable();
int mesFinal;
int mesInicial;
if (unSemestre == 1)
{
mesInicial = 1;
mesFinal = 6;
}
else
{
mesInicial = 7;
mesFinal = 12;
}
cargarATablaParaDataGripView("USE GD1C2013 select * from LOS_VIAJEROS_DEL_ANONIMATO.FTOP5MicrosVaciosDestinos('" + unAño + "'," + mesInicial + "," + mesFinal + ")", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
dataGridView1.Columns[1].HeaderText = "Promedio de butacas vacias";
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class EleccionDePasaje : Form1
{
DateTime fechaSalida;
public EleccionDePasaje()
{
InitializeComponent();
DataGridViewButtonColumn botonesComprar = this.crearBotones("Comprar", "Comprar");
dataGridView1.Columns.Add(botonesComprar);
dataGridView1.Columns[0].Visible = false;
textBoxFecha.Text = "No seleccionado";
fechaSalida = DateTime.MinValue;
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
using( SqlCommand cmdParaLlenarComboBox = new SqlCommand("USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN",conexion) )
{
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboOrigen.DisplayMember = "NombreCiudad";
comboOrigen.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboDestino.DisplayMember = "NombreCiudad";
comboDestino.DataSource = ciudadesDestino;
}
}
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
comboOrigen.SelectedIndex = 0;
comboDestino.SelectedIndex = 0;
textBoxFecha.Text = "No seleccionado";
fechaSalida = DateTime.MinValue;
dataGridView1.Columns[0].Visible = false;
dataGridView1.DataSource = null;
}
private void buttonFecha_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textBoxFecha.Text = ex.Message;
fechaSalida = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
// Validar que los parametros sean correctos.
public void validarParametros()
{
Boolean hayError = false;
String errorMensaje = "";
if (comboOrigen.Text.Equals(comboDestino.Text) && !comboDestino.Text.Equals("No seleccionado"))
{
hayError = true;
errorMensaje += "Origen y destino son la misma ciudad;";
}
if( comboDestino.SelectedIndex == 0 ||
comboOrigen.SelectedIndex == 0 ||
textBoxFecha.Text.Equals("No seleccionado"))
{
hayError = true;
errorMensaje += "Debe especificar todos los parametros de busqueda;";
}
if( fechaSalida < this.getFechaActual() && fechaSalida != DateTime.MinValue )
{
hayError = true;
errorMensaje += "La fecha debe ser mayor al día de hoy;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private void buttonBuscar_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
String fechaFormateada = fechaSalida.Date.ToString("yyyyMMdd");
String ConsultaDeBusqueda = "SELECT * " +
"FROM LOS_VIAJEROS_DEL_ANONIMATO.F_TraerViajesParaComprar ( '" +
comboOrigen.Text + "','" +
comboDestino.Text + "','" +
fechaFormateada + "')";
dataGridView1.Columns[0].Visible = true;
dataGridView1.ReadOnly = true;
DataTable viajesCoincidentes = new DataTable();
using(SqlConnection conexion = this.obtenerConexion())
{
using(SqlCommand cmd = new SqlCommand(ConsultaDeBusqueda, conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(viajesCoincidentes);
}
}
dataGridView1.DataSource = viajesCoincidentes;
dataGridView1.Columns[0].ReadOnly = false;
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message,"Aceptar")).ShowDialog();
this.Show();
}
}
private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
this.Hide();
int codigoViajeSeleccionado = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells["CodigoViaje"].Value);
(new EspecificarCompra(codigoViajeSeleccionado)).ShowDialog();
this.Show();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Recorrido
{
public partial class ModifFormularioRecorrido : Form1
{
private Boolean Habilitacion;
private Boolean HabilitacionOriginal;
public ModifFormularioRecorrido(String origen,String destino,String Servicio)
{
InitializeComponent();
comboBox1.Text = origen;
comboBox1.Enabled = false;
comboBox2.Text = destino;
comboBox2.Enabled = false;
comboBox3.Text = Servicio;
comboBox3.Enabled = false;
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerDatosDeRecorrido",conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@Origen", SqlDbType.NVarChar).Value = origen;
comando.Parameters.Add("@Destino", SqlDbType.NVarChar).Value = destino;
comando.Parameters.Add("@Servicio", SqlDbType.NVarChar).Value = Servicio;
comando.Parameters.Add("@Habilitacion", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.Parameters.Add("@PrecioBase_KG", SqlDbType.Decimal).Direction = ParameterDirection.Output;
comando.Parameters.Add("@PrecioBase", SqlDbType.Decimal).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
numericUpDown1.Value = Convert.ToDecimal(comando.Parameters["@PrecioBase"].Value);
numericUpDown2.Value = Convert.ToDecimal(comando.Parameters["@PrecioBase_KG"].Value);
Habilitacion = Convert.ToBoolean(comando.Parameters["@Habilitacion"].Value);
HabilitacionOriginal = Habilitacion;
if (Habilitacion)
Habilitado.Checked = true;
else
Deshabilitado.Checked = true;
}
}
}
// Previsualizar recorrido
private void button2_Click(object sender, EventArgs e)
{
try
{
this.sePuedeModificarUnRecorrido();
this.Hide();
new VisualizarRecorrido("Previsualizar",
comboBox1.Text.ToString(),
comboBox2.Text.ToString(),
comboBox3.Text.ToString(),
numericUpDown1.Value,
numericUpDown2.Value,
Habilitacion).ShowDialog();
this.Show();
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
// Validaciones
private void sePuedeModificarUnRecorrido()
{
String errorMensaje = "";
bool hayError = false;
// Los precios no son cero
if (numericUpDown1.Value <= 0)
{
hayError = true;
errorMensaje += "Error en el precio base para pasaje;";
}
if (numericUpDown2.Value <= 0)
{
hayError = true;
errorMensaje += "Error en el precio base por Kg.;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
// Modificar en la base de datos un recorrido
private void button3_Click(object sender, EventArgs e)
{
try
{
this.sePuedeModificarUnRecorrido();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ModificarRecorrido", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@origen", SqlDbType.NVarChar).Value = comboBox1.Text;
cmd.Parameters.Add("@destino", SqlDbType.NVarChar).Value = comboBox2.Text;
cmd.Parameters.Add("@servicio", SqlDbType.NVarChar).Value = comboBox3.Text;
cmd.Parameters.Add("@basePasaje", SqlDbType.Decimal).Value = numericUpDown1.Value;
cmd.Parameters.Add("@baseKG", SqlDbType.Decimal).Value = numericUpDown2.Value;
if (Habilitacion)
cmd.Parameters.Add("@habilitacion", SqlDbType.Bit).Value = 1;
else
cmd.Parameters.Add("@habilitacion", SqlDbType.Bit).Value = 0;
cmd.ExecuteNonQuery();
this.Hide();
new VisualizarRecorrido("Recorrido Modificado",
comboBox1.Text.ToString(),
comboBox2.Text.ToString(),
comboBox3.Text.ToString(),
numericUpDown1.Value,
numericUpDown2.Value,
Habilitacion).ShowDialog();
this.Show();
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void Habilitado_CheckedChanged(object sender, EventArgs e)
{
Habilitacion = true;
}
private void Deshabilitado_CheckedChanged(object sender, EventArgs e)
{
Habilitacion = false;
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using FrbaBus.Abm_Rol;
using FrbaBus.Abm_Recorrido;
using FrbaBus.GenerarViaje;
using FrbaBus.Registrar_LLegada_Micro;
using FrbaBus.Listado_Estadistico;
using FrbaBus.Consulta_Puntos_Adquiridos;
using FrbaBus.Canje_de_Ptos;
using FrbaBus.Compra_de_Pasajes;
using FrbaBus.Cancelar_Viaje;
using FrbaBus.Abm_Micro;
namespace FrbaBus.Login
{
public partial class Pantalla_Inicial : Form1
{
public Pantalla_Inicial()
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
//cargar comboBox de cliente (por defecto)
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol r join LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad rf on (r.Codigo_Rol = rf.Codigo_Rol) join LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad f on ( rf.Codigo_Funcionalidad = f.Codigo_Funcionalidad) WHERE r.Nombre_Rol = 'Cliente'", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Nombre_Funcionalidad";
comboBox1.DataSource = tablaDeNombres;
button3.Hide();
label3.Hide();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
private void button2_Click(object sender, EventArgs e)
{
(new Login()).Show();
}
public Pantalla_Inicial(string unUsuario)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
//cargar comboBox de un usuario determinado
conexion.Open();
SqlCommand cmd = new SqlCommand("SELECT DISTINCT(Nombre_Funcionalidad) FROM LOS_VIAJEROS_DEL_ANONIMATO.Login_Usuario l join LOS_VIAJEROS_DEL_ANONIMATO.Usuario_Rol ur on (l.DNI_Usuario = ur.DNI) join LOS_VIAJEROS_DEL_ANONIMATO.Rol r on (ur.Codigo_Rol = r.Codigo_Rol) join LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad rf on (r.Codigo_Rol = rf.Codigo_Rol) join LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad f on ( rf.Codigo_Funcionalidad = f.Codigo_Funcionalidad) WHERE Username='" + unUsuario + "'", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Nombre_Funcionalidad";
comboBox1.DataSource = tablaDeNombres;
button2.Hide();
button3.Show();
label3.Show();
label3.Text = "Hola, " + unUsuario;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
private void button1_Click(object sender, EventArgs e)
{
string funcionalidad = comboBox1.Text;
if (String.Equals(funcionalidad, "ABM Rol"))
{
(new ABM_Rol()).Show();
}
if (String.Equals(funcionalidad, "ABM Recorrido"))
{
(new ABM_Recorrido()).Show();
}
if (String.Equals(funcionalidad, "ABM Micro"))
{
(new ABMMicroInicio()).Show();
}
if (String.Equals(funcionalidad, "Generacion de viaje"))
{
(new Generar_Viaje()).Show();
}
if (String.Equals(funcionalidad, "Registro de llegada a destino"))
{
(new BuscarViajeSinRegistrar()).Show();
}
if (String.Equals(funcionalidad, "Listado estadistico"))
{
(new ListadoEstadistico()).Show();
}
if (String.Equals(funcionalidad, "Consulta de puntos de pasajero frecuente"))
{
(new ConsultaPuntos()).Show();
}
if (String.Equals(funcionalidad, "Canje de puntos de pasajero frecuente"))
{
(new CanjePuntos()).Show();
}
if (String.Equals(funcionalidad, "Compra de pasaje/encomienda"))
{
(new EleccionDePasaje()).Show();
}
if (String.Equals(funcionalidad, "Devolucion/cancelacion de pasaje y/o encomienda"))
{
(new CancelarPasajeEncomienda()).Show();
}
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Consulta_Puntos_Adquiridos
{
public partial class ConsultaPuntos : Form1
{
public ConsultaPuntos()
{
InitializeComponent();
textBox2.Enabled = false;
}
private void button1_Click(object sender, EventArgs e)
{
string dni = textBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
if (!(Convert.ToInt64(textBox1.Text) > 0))
{
throw new Exception("DNI invalido;");
}
conexion.Open();
DataTable puntos = new DataTable();
DataTable puntosCanjeados = new DataTable();
DateTime fechaMenosUnAño = (getFechaActual().AddYears(-1));
/*
SqlCommand borrarPuntosVencidos = new SqlCommand("USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + dni + "and Fecha < '" + fechaMenosUnAño + "'", conexion);
borrarPuntosVencidos.ExecuteNonQuery();
*/
cargarATablaParaDataGripView("USE GD1C2013 SELECT Puntos, Fecha, CodigoCompra FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + dni + " and CodigoCanje is NULL and Fecha > '" + fechaMenosUnAño + "' order by 2", ref puntos, conexion);
dataGridView1.Columns.Clear();
dataGridView1.DataSource = puntos;
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT SUM(Puntos) FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + dni + "and CodigoCanje is NULL and Fecha > '" + fechaMenosUnAño +"'", conexion);
string totalPuntos = cmd.ExecuteScalar().ToString();
textBox2.Text = totalPuntos;
cargarATablaParaDataGripView("USE GD1C2013 select p.Puntos, p.Fecha as FechaObtencion, c.Fecha as FechaCanje, pr.DetalleProducto from LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF p join LOS_VIAJEROS_DEL_ANONIMATO.CANJE c on (p.CodigoCanje = c.CodigoCanje) join LOS_VIAJEROS_DEL_ANONIMATO.PREMIO pr on (c.CodigoProducto = pr.CodigoProducto) where p.DNI_Usuario = " + dni + " and p.Fecha > '" + fechaMenosUnAño +"' order by 3", ref puntosCanjeados, conexion);
dataGridView2.Columns.Clear();
dataGridView2.DataSource = puntosCanjeados;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
<file_sep>TP_GESTION_1C2013
=================
TP de Gestion de datos - "FRBA BUS"
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Rol
{
public partial class AltaRol : Form1
{
string nombreRol;
string funcionalidad;
public AltaRol()
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
//cargar comboBox
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Nombre_Funcionalidad";
comboBox1.DataSource = tablaDeNombres;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//agregar rol
protected virtual void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
nombreRol = textBox1.Text;
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT COUNT(*) FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int cantidadDeFilas = (int)cmd.ExecuteScalar();
if (cantidadDeFilas != 0)
{
(new Dialogo("Ya existe el rol", "Aceptar")).ShowDialog();
}
else
{
cmd.CommandText = "USE GD1C2013 INSERT INTO LOS_VIAJEROS_DEL_ANONIMATO.Rol VALUES ('" + nombreRol + "', 1)";
cmd.ExecuteNonQuery();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
foreach (String nombreFunc in listBox1.Items)
{
SqlCommand codFunc = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad WHERE Funcionalidad.Nombre_Funcionalidad = '" + nombreFunc + "'", conexion);
int codigoFuncionalidad = (int)codFunc.ExecuteScalar();
cmd.CommandText = "USE GD1C2013 INSERT INTO LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad VALUES (" + codigoRol + "," + codigoFuncionalidad + ")";
cmd.ExecuteNonQuery();
}
int filasAfectadasTotales = 1 + listBox1.Items.Count;
new Dialogo(nombreRol + " agregado \n" + filasAfectadasTotales + " filas afectadas", "Aceptar").ShowDialog();
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton agregar
private void button2_Click(object sender, EventArgs e)
{
funcionalidad = comboBox1.Text;
if (listBox1.Items.Contains(funcionalidad))
{
(new Dialogo("Ya existe la funcionalidad", "Aceptar")).ShowDialog();
}
else
{
listBox1.Items.Add(funcionalidad);
comboBox1.Text = "";
}
}
//boton borrar
private void button3_Click(object sender, EventArgs e)
{
funcionalidad = listBox1.Text;
if (listBox1.Items.Contains(funcionalidad))
{
listBox1.Items.Remove(funcionalidad);
comboBox1.Text = "";
}
else
{
(new Dialogo("No existe la funcionalidad", "Aceptar")).ShowDialog();
}
}
private void button4_Click(object sender, EventArgs e)
{
textBox1.Text = "";
comboBox1.Text = "";
listBox1.Items.Clear();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FrbaBus.Abm_Recorrido
{
class ParametrosIncorrectosException : System.Exception
{
public ParametrosIncorrectosException(String mensaje) : base(mensaje) {}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class AgregarButaca : Form1
{
public AgregarButaca(string unaPatente)
{
InitializeComponent();
textBox1.Text = unaPatente;
textBox1.Enabled = false;
comboBox1.Items.Add("Pasillo");
comboBox1.Items.Add("Ventanilla");
comboBox1.Text="No seleccionado";
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT DISTINCT(Piso) FROM LOS_VIAJEROS_DEL_ANONIMATO.F_PisosBucatasDe ('" + unaPatente + "')", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox2.DisplayMember = "Piso";
comboBox2.DataSource = tablaDeNombres;
}
}
private void button1_Click(object sender, EventArgs e)
{
comboBox1.Text = "No seleccionado";
comboBox2.Text = "0";
}
private void button2_Click(object sender, EventArgs e)
{
try
{
if (String.Equals(comboBox1.Text, "No seleccionado") || String.Equals(comboBox2.Text, "0"))
{
throw new Exception("Debe completar todos los campos");
}
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPInsertarButaca", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Patente", SqlDbType.NVarChar).Value = textBox1.Text;
cmd.Parameters.Add("@Ubicacion", SqlDbType.NVarChar).Value = comboBox1.Text;
cmd.Parameters.Add("@Piso", SqlDbType.NVarChar).Value = comboBox2.Text;
cmd.ExecuteNonQuery();
(new Dialogo("Butaca agregada;Piso: " + comboBox2.Text + " ubicacion: " + comboBox1.Text + " para la patente: " + textBox1.Text, "Aceptar")).ShowDialog();
}
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FrbaBus.Cancelar_Viaje
{
class FechaElegidaExeption : Exception
{
public FechaElegidaExeption(String mensaje) : base(mensaje) {}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class BajaFueraDeServicio : Form1
{
private DateTime fechaInicio;
private DateTime fechaFin;
public BajaFueraDeServicio()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void BajaFueraDeServicio_Load(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_PatentesTodas() ORDER BY RN ASC", conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable patentes = new DataTable();
adapter.Fill(patentes);
comboPatentes.DisplayMember = "Patente";
comboPatentes.DataSource = patentes;
}
}
}
private void buttonFecIni_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textFecInicio.Text = ex.Message;
fechaInicio = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
private void buttonFecFin_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textFecFin.Text = ex.Message;
fechaFin = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
comboPatentes.SelectedIndex = 0;
textFecFin.Text = "";
textFecInicio.Text = "";
}
private void validarDatos()
{
Boolean hayError = false;
String mensajeError = "";
if (comboPatentes.SelectedIndex == 0)
{
hayError = true;
mensajeError += "No se seleccionó ninguna patente;";
}
if (textFecInicio.Text.Equals(""))
{
hayError = true;
mensajeError += "No se seleccionó fecha de inicio;";
}
if (textFecFin.Text.Equals(""))
{
hayError = true;
mensajeError += "No se seleccionó fecha de fin;";
}
if (fechaInicio < this.getFechaActual())
{
hayError = true;
mensajeError += "La fecha de inicio debe ser igual o posterior a hoy;";
}
if (fechaInicio > fechaFin)
{
hayError = true;
mensajeError += "La fecha de inicio debe ser anterior a la fecha de fin;";
}
if (hayError)
throw new ParametrosIncorrectosException(mensajeError);
}
private void buttonAceptar_Click(object sender, EventArgs e)
{
try
{
this.validarDatos();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_DarDeBajaPorMantenimiento", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = comboPatentes.Text;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = fechaInicio;
comando.Parameters.Add("@FechaFin", SqlDbType.DateTime).Value = fechaFin;
comando.ExecuteNonQuery();
this.comprobarViajes();
this.Close();
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void comprobarViajes()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_TieneViajesProgramados", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = comboPatentes.Text;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = fechaInicio;
comando.Parameters.Add("@FechaFin", SqlDbType.DateTime).Value = fechaFin;
comando.Parameters.Add("@tieneViajes", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
Boolean tieneViajes = Convert.ToBoolean(comando.Parameters["@tieneViajes"].Value);
if (tieneViajes)
{
this.Hide();
(new DialogoMicroFSTieneViajes("PorModificacion", comboPatentes.Text, fechaInicio, fechaFin)).ShowDialog();
}
this.Close();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class InsertarCliente : Form1
{
private DateTime fechaNacimiento = DateTime.MinValue;
private Boolean registrarNuevo = false;
public Boolean discapacidad = false;
public int DNI_Cliente_Agregado;
public String Apellido_Cliente_Agregado;
public String Nombre_Cliente_Agregado;
public InsertarCliente()
{
InitializeComponent();
}
private void ObtenerCliente()
{
using (SqlConnection conexion2 = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_Obtener_Usuario", conexion2))
{
conexion2.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@DNI",SqlDbType.Int).Value = numericDNI.Value.ToString();
comand.Parameters.Add("@Nombre",SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Apellido", SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Direccion", SqlDbType.NVarChar,255).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Telefono", SqlDbType.Int).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Mail", SqlDbType.NVarChar, 255).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Fecha_Nac", SqlDbType.DateTime).Direction = ParameterDirection.Output;
comand.Parameters.Add("@Sexo", SqlDbType.VarChar,9).Direction = ParameterDirection.Output;
comand.Parameters.Add("@discapacidad", SqlDbType.Bit).Direction = ParameterDirection.Output;
comand.ExecuteNonQuery();
textBoxApellido.Text = comand.Parameters["@Apellido"].Value.ToString();
textBoxNombre.Text = comand.Parameters["@Nombre"].Value.ToString();
textBoxDireccion.Text = comand.Parameters["@Direccion"].Value.ToString();
numericTelefono.Value = Convert.ToInt32(comand.Parameters["@Telefono"].Value);
textBoxMail.Text = comand.Parameters["@Mail"].Value.ToString();
textBoxFechaNac.Text = Convert.ToDateTime(comand.Parameters["@Fecha_Nac"].Value.ToString()).ToShortDateString();
String masculino = comand.Parameters["@Sexo"].Value.ToString();
if (masculino.Equals("Masculino"))
radioMasculino.Checked = true;
else
radioBFemenino.Checked = true;
checkDiscapacidad.Checked = Convert.ToBoolean(comand.Parameters["@discapacidad"].Value);
}
}
}
private Boolean ExisteElUsuario()
{
Boolean existe = false;
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand command = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_Existe_Usuario", conexion))
{
conexion.Open();
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@DNI", SqlDbType.NVarChar).Value = numericDNI.Value;
command.Parameters.Add("@existe", SqlDbType.Bit).Direction = ParameterDirection.Output;
command.ExecuteNonQuery();
existe = Convert.ToBoolean(command.Parameters["@existe"].Value);
}
}
return existe;
}
//Elegir fecha de nacimiento
private void buttonFechaNac_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textBoxFechaNac.Text = ex.Message;
fechaNacimiento = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
public void validarDatos()
{
Boolean hayError = false;
String errorMensaje = "";
if(textBoxApellido.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar apellido;";
}
if (textBoxNombre.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar nombre;";
}
if (textBoxDireccion.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar dirección;";
}
if (numericTelefono.Value == 0)
{
hayError = true;
errorMensaje += "Falta completar telefono;";
}
if (textBoxMail.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar mail;";
}
if (textBoxFechaNac.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar fecha de nacimiento;";
}
else
{
if (Convert.ToDateTime(textBoxFechaNac.Text) >= this.getFechaActual())
{
hayError = true;
errorMensaje += "La fecha de nacimiento no puede ser posterior a la fecha del sistema;";
}
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
// Boton listo
/* El usuario ingresa el DNI y se comprueba si es
* un usuario del sistema
*/
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
textBoxApellido.Enabled = true;
textBoxNombre.Enabled = true;
textBoxDireccion.Enabled = true;
numericTelefono.Enabled = true;
textBoxMail.Enabled = true;
buttonFechaNac.Enabled = true;
radioBFemenino.Enabled = true;
radioMasculino.Enabled = true;
checkDiscapacidad.Enabled = true;
buttonTerminado.Enabled = true;
if (this.ExisteElUsuario())
this.ObtenerCliente();
else
{
this.Hide();
DialogResult dr = (new DialogoInsertarCliente()).ShowDialog();
if(dr == DialogResult.Cancel)
this.Show();
if(dr == DialogResult.OK)
{
this.Show();
this.Focus();
registrarNuevo = true;
textBoxApellido.Text = "";
textBoxNombre.Text = "";
textBoxDireccion.Text = "";
numericTelefono.Value = 0;
textBoxMail.Text = "";
textBoxFechaNac.Text = "";
radioBFemenino.Checked = false;
radioMasculino.Checked = false;
checkDiscapacidad.Checked = false;
buttonTerminado.Enabled = true;
}
}
button1.Enabled = true;
}
private void buttonTerminado_Click(object sender, EventArgs e)
{
try
{
this.validarDatos();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
conexion.Open();
comando.Connection = conexion;
comando.Parameters.Add("@DNI",SqlDbType.Int).Value = numericDNI.Value;
comando.Parameters.Add("@Nombre",SqlDbType.NVarChar,255).Value = textBoxNombre.Text;
comando.Parameters.Add("@Apellido",SqlDbType.NVarChar,255).Value = textBoxApellido.Text;
comando.Parameters.Add("@Direccion", SqlDbType.NVarChar, 255).Value = textBoxDireccion.Text ;
comando.Parameters.Add("@Telefono",SqlDbType.Int).Value = numericTelefono.Value;
comando.Parameters.Add("@Mail",SqlDbType.NVarChar,255).Value = textBoxMail.Text;
comando.Parameters.Add("@Fecha_nac", SqlDbType.DateTime).Value = Convert.ToDateTime(textBoxFechaNac.Text);
if(radioMasculino.Checked == true)
comando.Parameters.Add("@Sexo",SqlDbType.VarChar,9).Value = "Masculino";
if(radioBFemenino.Checked == true)
comando.Parameters.Add("@Sexo", SqlDbType.VarChar, 9).Value = "Femenino";
if (checkDiscapacidad.Checked == true)
comando.Parameters.Add("@discapacidad", SqlDbType.Bit).Value = 1;
else
comando.Parameters.Add("@discapacidad", SqlDbType.Bit).Value = 0;
comando.CommandType = CommandType.StoredProcedure;
if (registrarNuevo)
this.terminarRegistrando(comando);
else
this.terminarActualizando(comando);
this.discapacidad = checkDiscapacidad.Checked;
this.DNI_Cliente_Agregado = Convert.ToInt32(numericDNI.Value);
this.Apellido_Cliente_Agregado = textBoxApellido.Text;
this.Nombre_Cliente_Agregado = textBoxNombre.Text;
}
}
this.Close();
}
catch(ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message,"Aceptar")).ShowDialog();
this.Show();
this.Focus();
}
}
private void terminarActualizando(SqlCommand command)
{
command.CommandText = "LOS_VIAJEROS_DEL_ANONIMATO.SP_Actualizar_Cliente";
command.ExecuteNonQuery();
}
private void terminarRegistrando(SqlCommand command)
{
command.CommandText = "LOS_VIAJEROS_DEL_ANONIMATO.SP_Insertar_Cliente";
command.ExecuteNonQuery();
}
private void numericDNI_ValueChanged(object sender, EventArgs e)
{
textBoxApellido.Text = "";
textBoxNombre.Text = "";
textBoxDireccion.Text = "";
numericTelefono.Value = 0;
textBoxMail.Text = "";
textBoxFechaNac.Text = "";
radioBFemenino.Checked = false;
radioMasculino.Checked = false;
checkDiscapacidad.Checked = false;
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Recorrido
{
public partial class VisualizarRecorrido : Form1
{
public VisualizarRecorrido( String Leyenda,
String Origen,
String Destino,
String Servicio,
decimal basePasaje,
decimal baseXKg)
{
InitializeComponent();
label1.Text = Leyenda;
listBox1.Height = listBox1.ItemHeight * 6;
listBox1.Items.Add("Origen\t");
listBox1.Items.Add("Destino\t");
listBox1.Items.Add("Servicio\t");
listBox1.Items.Add("Base pasaje\t");
listBox1.Items.Add("Base por kilo\t");
listBox1.Items.Add(Origen);
listBox1.Items.Add(Destino);
listBox1.Items.Add(Servicio);
listBox1.Items.Add(basePasaje);
listBox1.Items.Add(baseXKg);
listBox1.MultiColumn = true;
}
public VisualizarRecorrido(String Leyenda,
String Origen,
String Destino,
String Servicio,
decimal basePasaje,
decimal baseXKg,
Boolean habilitado
)
{
InitializeComponent();
label1.Text = Leyenda;
listBox1.Height = listBox1.ItemHeight * 7;
listBox1.Items.Add("Origen\t");
listBox1.Items.Add("Destino\t");
listBox1.Items.Add("Servicio\t");
listBox1.Items.Add("Base pasaje\t");
listBox1.Items.Add("Base por kilo\t");
listBox1.Items.Add("Habilitación\t");
listBox1.Items.Add(Origen);
listBox1.Items.Add(Destino);
listBox1.Items.Add(Servicio);
listBox1.Items.Add(basePasaje);
listBox1.Items.Add(baseXKg);
if(habilitado)
listBox1.Items.Add("Habilitado");
else
listBox1.Items.Add("Deshabilitado");
listBox1.MultiColumn = true;
}
public VisualizarRecorrido(String Leyenda,
String Origen,
String Destino,
String Servicio) // Para bajas
{
InitializeComponent();
label1.Text = Leyenda;
listBox1.Height = listBox1.ItemHeight * 4;
listBox1.Items.Add("Origen\t");
listBox1.Items.Add("Destino\t");
listBox1.Items.Add("Servicio\t");
listBox1.Items.Add(Origen);
listBox1.Items.Add(Destino);
listBox1.Items.Add(Servicio);
listBox1.MultiColumn = true;
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Top_Micros
{
public partial class TopMicrosMayorPeriodoBaja : Form1
{
public TopMicrosMayorPeriodoBaja(string unAño, int unSemestre)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 select TOP 5 Patente, LOS_VIAJEROS_DEL_ANONIMATO.FcalcularDiasBajaMicro(Patente," + unAño + "," + unSemestre + ") AS cantidadDias from LOS_VIAJEROS_DEL_ANONIMATO.PeridoFueraDeServicio where LOS_VIAJEROS_DEL_ANONIMATO.FcalcularDiasBajaMicro(Patente," + unAño + "," + unSemestre + ")!=0 group by Patente order by cantidadDias desc", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
dataGridView1.Columns[1].HeaderText = "Cantidad de dias en baja";
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Rol
{
public partial class ModifRol : Form1
{
string nombreRol;
string nombreFunc;
public ModifRol()
{
InitializeComponent();
comboBox2.Enabled = false;
comboBox3.Enabled = false;
using (SqlConnection conexion = this.obtenerConexion())
{
//cargar comboBox rol
try
{
conexion.Open();
SqlCommand rol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(rol);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Nombre_Rol";
comboBox1.DataSource = tablaDeNombres;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
public ModifRol(String nombreRolAModificar)
{
InitializeComponent();
comboBox1.Text = nombreRolAModificar;
comboBox1.Enabled = false;
comboBox2.Enabled = false;
comboBox3.Enabled = false;
textBox2.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
}
public ModifRol(String nombreRolAModificar, String nombreFuncionalidadAModificar)
{
InitializeComponent();
comboBox1.Text = nombreRolAModificar;
comboBox1.Enabled = false;
textBox1.Enabled = false;
button1.Enabled = false;
button5.Enabled = false;
comboBox2.Text = nombreFuncionalidadAModificar;
comboBox2.Enabled = false;
using (SqlConnection conexion = this.obtenerConexion())
{
//cargar comboBox3 todas las funcionalidades
try
{
conexion.Open();
SqlCommand funcs = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(funcs);
DataTable tablaDeFuncionalidades = new DataTable();
adapter.Fill(tablaDeFuncionalidades);
comboBox3.DisplayMember = "Nombre_Funcionalidad";
comboBox3.DataSource = tablaDeFuncionalidades;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
private void button5_Click(object sender, EventArgs e)
{
comboBox2.Enabled = true;
comboBox3.Enabled = true;
nombreRol = comboBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
// new Dialogo(codigoRol + "asd", "Aceptar").ShowDialog();
SqlCommand funcRol = new SqlCommand("USE GD1C2013 SELECT Nombre_Funcionalidad FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad r JOIN LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad f on (r.Codigo_Funcionalidad = f.Codigo_Funcionalidad)WHERE r.Codigo_Rol=" + codigoRol, conexion);
SqlDataAdapter adapter1 = new SqlDataAdapter(funcRol);
DataTable tablaDeNombres1 = new DataTable();
adapter1.Fill(tablaDeNombres1);
comboBox2.DisplayMember = "Nombre_Funcionalidad";
comboBox2.DataSource = tablaDeNombres1;
SqlCommand funcs = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad", conexion);
SqlDataAdapter adapter2 = new SqlDataAdapter(funcs);
DataTable tablaDeNombres2 = new DataTable();
adapter2.Fill(tablaDeNombres2);
comboBox3.DisplayMember = "Nombre_Funcionalidad";
comboBox3.DataSource = tablaDeNombres2;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton modificar nombre rol
private void button1_Click(object sender, EventArgs e)
{
nombreRol = comboBox1.Text;
string nuevoNombreRol = textBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand modRol = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.Rol SET Nombre_Rol='" + nuevoNombreRol + "' where Nombre_Rol='" + nombreRol + "'", conexion);
modRol.ExecuteNonQuery();
comboBox1.Text = nuevoNombreRol;
new Dialogo("Rol " + nombreRol + " modificado a " + nuevoNombreRol + "\n 1 fila afectada", "Aceptar").ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton modificar nombre func
private void button2_Click(object sender, EventArgs e)
{
nombreFunc = comboBox2.Text;
string nuevoNombreFunc = textBox2.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand modFunc = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad SET Nombre_Funcionalidad='" + nuevoNombreFunc + "' where Nombre_Funcionalidad='" + nombreFunc + "'", conexion);
modFunc.ExecuteNonQuery();
comboBox2.Text = nuevoNombreFunc;
new Dialogo("Funcionalidad " + nombreFunc + " modificada a " + nuevoNombreFunc + "\n 1 fila afectada", "Aceptar").ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton elimimar func
private void button3_Click(object sender, EventArgs e)
{
nombreRol = comboBox1.Text;
nombreFunc = comboBox2.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
SqlCommand codFunc = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad WHERE Nombre_Funcionalidad = '" + nombreFunc + "'", conexion);
int codigoFunc = (int)codFunc.ExecuteScalar();
SqlCommand delRolFunc = new SqlCommand("USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad WHERE Codigo_Rol=" + codigoRol + "and Codigo_Funcionalidad=" + codigoFunc, conexion);
delRolFunc.ExecuteNonQuery();
comboBox2.Update();
new Dialogo("La funcionalidad " + nombreFunc + ", fue eliminada de " + nombreRol + "\n 1 fila afectada", "Aceptar").ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton agregar func
private void button4_Click(object sender, EventArgs e)
{
nombreRol = comboBox1.Text;
nombreFunc = comboBox3.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
SqlCommand codFunc = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad WHERE Nombre_Funcionalidad = '" + nombreFunc + "'", conexion);
int codigoFunc = (int)codFunc.ExecuteScalar();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT COUNT(*) FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad WHERE Codigo_Rol =" + codigoRol + "and Codigo_Funcionalidad=" + codigoFunc, conexion);
int cantidadDeFilas = (int)cmd.ExecuteScalar();
if (cantidadDeFilas != 0)
{
(new Dialogo("El rol " + nombreRol + " ya posee la funcionalidad " + nombreFunc, "Aceptar")).ShowDialog();
}
else
{
SqlCommand addRolFunc = new SqlCommand("USE GD1C2013 INSERT INTO LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad VALUES (" + codigoRol + "," + codigoFunc + ")", conexion);
addRolFunc.ExecuteNonQuery();
new Dialogo("La funcionalidad " + nombreFunc + ", fue agregada a " + nombreRol + "\n 1 fila afectada", "Aceptar").ShowDialog();
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
comboBox2.Text = "";
comboBox3.Text = "";
comboBox2.Enabled = false;
comboBox3.Enabled = false;
}
private void button5_Click_1(object sender, EventArgs e)
{
nombreRol = comboBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand validacion = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol where Nombre_Rol = '" + nombreRol + "' and Habilitacion=0", conexion);
int cantidadDeFilas = (int)validacion.ExecuteScalar();
if (cantidadDeFilas != 0)
{
SqlCommand habilitarRol = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.Rol SET Habilitacion=1 where Nombre_Rol = '" + nombreRol + "'", conexion);
habilitarRol.ExecuteNonQuery();
(new Dialogo("El rol se ha habilitado", "Aceptar")).ShowDialog();
}
else
{
(new Dialogo("El rol ya esta habilitado", "Aceptar")).ShowDialog();
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("El rol ya esta habilitado", "Aceptar")).ShowDialog();
}
}
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Rol
{
public partial class BajaRol : Form1
{
string nombreRol;
public BajaRol()
{
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
//cargar comboBox
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Nombre_Rol";
comboBox1.DataSource = tablaDeNombres;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
private void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
nombreRol = comboBox1.Text;
SqlCommand inhabilitar = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.Rol SET Habilitacion=0 WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int filasAfectadas = (int)inhabilitar.ExecuteNonQuery();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
codRol.CommandText = "USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.Usuario_Rol WHERE Codigo_Rol='" + codigoRol + "'";
codRol.ExecuteNonQuery();
new Dialogo(nombreRol + " inhabilitado \n", "Aceptar").ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ModifButacas : Form1
{
public ModifButacas(string unaPatente)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
label3.Text = unaPatente;
conexion.Open();
SqlCommand butacas = new SqlCommand("USE GD1C2013 select Cantidad_Butacas from LOS_VIAJEROS_DEL_ANONIMATO.MICRO where Patente = '" + unaPatente + "'", conexion);
string butacasTotales = butacas.ExecuteScalar().ToString();
textBox1.Text = butacasTotales;
textBox1.Enabled = false;
SqlCommand kgs = new SqlCommand("USE GD1C2013 select KG_Disponibles from LOS_VIAJEROS_DEL_ANONIMATO.MICRO where Patente = '" + unaPatente + "'", conexion);
string kgsTotales = kgs.ExecuteScalar().ToString();
textBox2.Text = kgsTotales;
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 select NumeroButaca, Ubicacion, Piso from LOS_VIAJEROS_DEL_ANONIMATO.BUTACA_MICRO WHERE Patente = '" + unaPatente + "' order by 1", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
DataGridViewButtonColumn botonEliminar = this.crearBotones("", "Eliminar Butaca");
dataGridView1.Columns.Add(botonEliminar);
}
}
private void button2_Click(object sender, EventArgs e)
{
string patente = label3.Text;
string kgs = textBox2.Text;
try
{
if(!(Convert.ToInt32(kgs)>0)){
throw new Exception ("Kgs ingresados deben ser mayores a 0");
}
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand actializarKgs = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.MICRO SET KG_Disponibles = " + kgs + " where Patente = '" + patente + "'", conexion);
actializarKgs.ExecuteNonQuery();
(new Dialogo("Capacidad maxima de kgs modificada;Nueva capacidad: "+kgs, "Aceptar")).ShowDialog();
}
} catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void button1_Click(object sender, EventArgs e)
{
string patente = label3.Text;
(new AgregarButaca(patente)).Show();
}
private void button3_Click(object sender, EventArgs e)
{
string unaPatente = label3.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
dataGridView1.Columns.Clear();
conexion.Open();
SqlCommand butacas = new SqlCommand("USE GD1C2013 select Cantidad_Butacas from LOS_VIAJEROS_DEL_ANONIMATO.MICRO where Patente = '" + unaPatente + "'", conexion);
string butacasTotales = butacas.ExecuteScalar().ToString();
textBox1.Text = butacasTotales;
textBox1.Enabled = false;
SqlCommand kgs = new SqlCommand("USE GD1C2013 select KG_Disponibles from LOS_VIAJEROS_DEL_ANONIMATO.MICRO where Patente = '" + unaPatente + "'", conexion);
string kgsTotales = kgs.ExecuteScalar().ToString();
textBox2.Text = kgsTotales;
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 select NumeroButaca, Ubicacion, Piso from LOS_VIAJEROS_DEL_ANONIMATO.BUTACA_MICRO WHERE Patente = '" + unaPatente + "' order by 1", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
dataGridView1.Columns[2].ReadOnly = true;
DataGridViewButtonColumn botonEliminar = this.crearBotones("", "Eliminar Butaca");
dataGridView1.Columns.Add(botonEliminar);
}
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string patente = label3.Text;
try
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String numeroButaca = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
if (e.ColumnIndex == 3)
{
SqlCommand borrarButaca = new SqlCommand("USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.BUTACA_MICRO WHERE Patente='"+patente+"' and NumeroButaca='"+numeroButaca+"'", conexion);
borrarButaca.ExecuteNonQuery();
SqlCommand actualizarTotButacas = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.MICRO SET Cantidad_Butacas=Cantidad_Butacas-1 WHERE Patente= '" + patente + "'", conexion);
actualizarTotButacas.ExecuteNonQuery();
SqlCommand butacas = new SqlCommand("USE GD1C2013 select Cantidad_Butacas from LOS_VIAJEROS_DEL_ANONIMATO.MICRO where Patente = '" + patente + "'", conexion);
string butacasTotales = butacas.ExecuteScalar().ToString();
textBox1.Text = butacasTotales;
(new Dialogo("Butaca "+numeroButaca+" borrada", "Aceptar")).ShowDialog();
}
}
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - La butaca esta siendo utilizada;No se puede borrar", "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Micro
{
public partial class EspecificarPiso : Form1
{
public int piso;
public EspecificarPiso()
{
InitializeComponent();
}
private void EspecificarPiso_Load(object sender, EventArgs e)
{
comboPiso.Items.AddRange(new object[]{1,2});
comboPiso.SelectedIndex = 0;
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void buttonAceptar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.piso = Convert.ToInt32(comboPiso.Text);
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class MostrarButacasDisponibles : Form1
{
private int codigoViaje;
public int pisoElegido;
public int numeroBElegido;
public String ubicacionElegida;
public MostrarButacasDisponibles(int codigoViajeHeredado)
{
InitializeComponent();
this.codigoViaje = codigoViajeHeredado;
DataGridViewButtonColumn botonesComprarButaca = this.crearBotones("Comprar butaca", "Comprar");
dataGridView1.Columns.Add(botonesComprarButaca);
dataGridView1.Columns[0].Visible = false;
}
private void MostrarButacasDisponibles_Load(object sender, EventArgs e)
{
comboBoxPiso.Items.AddRange(new String[] { "Cualquier piso", "Primero", "Segundo" });
comboBoxPiso.SelectedIndex = 0;
comboBoxUbicacion.Items.AddRange(new String[] { "Cualquier ubicación", "Ventanilla", "Pasillo" });
comboBoxUbicacion.SelectedIndex = 0;
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
comboBoxPiso.SelectedIndex = 0;
comboBoxUbicacion.SelectedIndex = 0;
dataGridView1.Columns[0].Visible = false;
}
private void buttonFiltrar_Click(object sender, EventArgs e)
{
String piso;
if(comboBoxPiso.Text.Equals("Cualquier piso"))
piso = "3";
else
piso = comboBoxPiso.SelectedIndex.ToString();
using (SqlConnection conexion = this.obtenerConexion())
{
String queryBuscadora = "SELECT * "+
"FROM LOS_VIAJEROS_DEL_ANONIMATO.F_ObtenerButacasDisponibles("+
this.codigoViaje +
","+ piso +
",'"+ comboBoxUbicacion.Text +"')";
using(SqlCommand comando = new SqlCommand(queryBuscadora,conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable tablaButacasDisponiblesFiltradas = new DataTable();
adapter.Fill(tablaButacasDisponiblesFiltradas);
dataGridView1.DataSource = tablaButacasDisponiblesFiltradas;
dataGridView1.Columns[0].Visible = true;
dataGridView1.ReadOnly = true;
dataGridView1.Columns[0].ReadOnly = false;
}
}
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
this.numeroBElegido = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[1].Value);
this.pisoElegido = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[2].Value);
this.ubicacionElegida = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}
}
<file_sep>Create PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.SPRegistrarLLegada
( @CodigoViaje nvarchar(255),
@FechaExacta datetime
)
AS
BEGIN
UPDATE LOS_VIAJEROS_DEL_ANONIMATO.VIAJE SET FechaLlegada=@FechaExacta WHERE CodigoViaje=@CodigoViaje
exec LOS_VIAJEROS_DEL_ANONIMATO.SPasignarPuntosVF @CodigoViaje, @FechaExacta
END;
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Registrar_LLegada_Micro
{
public partial class BuscarViajeSinRegistrar : Form1
{
public BuscarViajeSinRegistrar()
{
DateTime fechaActual = getFechaActual();
InitializeComponent();
// Llenar combo box con valores posibles
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand cmdParaLlenarComboBox = new SqlCommand();
cmdParaLlenarComboBox.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN";
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboBox1.DisplayMember = "NombreCiudad";
comboBox1.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboBox2.DisplayMember = "NombreCiudad";
comboBox2.DataSource = ciudadesDestino;
// Llenar el combo box 'tipo de servicio'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreServicio FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN";
DataTable tiposDeServicio = new DataTable();
adapter.Fill(tiposDeServicio);
comboBox3.DisplayMember = "NombreServicio";
comboBox3.DataSource = tiposDeServicio; // Tipos de servicio
comboBox4.Text = "No seleccionado";
}
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
//cargar comboBox con micros disponibles
string tipoServicio = comboBox3.Text;
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 select DISTINCT(m.Patente) from LOS_VIAJEROS_DEL_ANONIMATO.MICRO m join LOS_VIAJEROS_DEL_ANONIMATO.VIAJE v on (m.Patente=v.PatenteMicro) where TipoServicio='" + tipoServicio + "' and BajaPorVidaUtil=0", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox4.DisplayMember = "Patente";
comboBox4.DataSource = tablaDeNombres;
}
}
private void button1_Click(object sender, EventArgs e)
{
//cargarATablaParaDataGripView(
try
{
string patenteMicro = comboBox4.Text;
string origen = comboBox1.Text;
string destino = comboBox2.Text;
string tipoServicio = comboBox3.Text;
string Filtro = "and CodigoRecorrido = @codigo and PatenteMicro= '" + patenteMicro + "'";
string FiltroFuncion = "declare @codigo numeric(18,0) = (LOS_VIAJEROS_DEL_ANONIMATO.F_ObetenerRecorrido('" + patenteMicro + "', '" + origen + "', '" + destino + "', '" + tipoServicio + "'))";
// this.sePuedeCrearUnViaje();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
if (String.Equals(patenteMicro, "No seleccionado") && String.Equals(tipoServicio, "No seleccionado") && String.Equals(origen, "No seleccionado") && String.Equals(destino, "No seleccionado"))
{
Filtro = "";
FiltroFuncion = "";
}
else
{
if (String.Equals(patenteMicro, "No seleccionado") || String.Equals(tipoServicio, "No seleccionado") || String.Equals(origen, "No seleccionado") || String.Equals(destino, "No seleccionado"))
{
throw new Exception("Seleccione todos los filtros, o ninguno para mostrar todos los viajes");
}
}
DateTime fechaActual = getFechaActual();
DataTable tabla = new DataTable();
cargarATablaParaDataGripView(FiltroFuncion + "SELECT CodigoViaje, PatenteMicro, FechaSalida, FechaLlegadaEstimada, FechaLlegada FROM LOS_VIAJEROS_DEL_ANONIMATO.VIAJE WHERE DATEADD(dd, 0, DATEDIFF(dd, 0, FechaLlegadaEstimada)) = '" + fechaActual + "'" + Filtro, ref tabla, conexion);
dataGridView1.Columns.Clear();
dataGridView1.DataSource = tabla;
DataGridViewButtonColumn botonRegistrarLLegada = this.crearBotones("", "RegistrarLLegada");
dataGridView1.Columns.Add(botonRegistrarLLegada);
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String codigoViaje = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
// DateTime fechaEstimadaLLegada = dataGridView1.Rows[e.RowIndex].Cells[3].Value;
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
if (e.ColumnIndex == 5)
{
new Registrar_LLegada(codigoViaje).Show();
}
}
}
}
private void button2_Click(object sender, EventArgs e)
{
comboBox1.Text = "No seleccionado";
comboBox2.Text = "No seleccionado";
comboBox3.Text = "No seleccionado";
comboBox4.Text = "No seleccionado";
dataGridView1.Columns.Clear();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Rol
{
public partial class ListadoInhablitarRol : Form1
{
public ListadoInhablitarRol()
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
//cargar comboBox
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT NombreRol FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Roles () ORDER BY RN", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "NombreRol";
comboBox1.DataSource = tablaDeNombres;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton buscar
private void button2_Click(object sender, EventArgs e)
{
string varFiltro1 = "";
string varFiltro2 = "";
string textoFiltro1;
string textoFiltro2;
textoFiltro1 = comboBox1.Text;
textoFiltro2 = textBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
DataTable tabla = new DataTable();
if (!(String.Equals(textoFiltro1, "No seleccionado")))
{
varFiltro1 = "WHERE r.Nombre_Rol = '" + textoFiltro1 + "'";
if (textoFiltro2.Length > 0)
{
varFiltro2 = "and f.Nombre_Funcionalidad LIKE '%" + textoFiltro2 + "%'";
}
}
else
{
if (textoFiltro2.Length > 0)
{
varFiltro2 = "WHERE f.Nombre_Funcionalidad LIKE '%" + textoFiltro2 + "%'";
}
}
cargarATablaParaDataGripView("USE GD1C2013 SELECT DISTINCT(r.Nombre_Rol), r.Habilitacion FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol r join LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad rf on (r.Codigo_Rol = rf.Codigo_Rol) join LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad f on (rf.Codigo_Funcionalidad = f.Codigo_Funcionalidad) " + varFiltro1 + varFiltro2, ref tabla, conexion);
dataGridView1.Columns.Clear();
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
DataGridViewButtonColumn botonFuncionalidades = this.crearBotones("Funcionalidades", "Mostrar Funciondalidades");
dataGridView1.Columns.Add(botonFuncionalidades);
DataGridViewButtonColumn botonInhabilitar = this.crearBotones("Inhabilitacion Logica", "Inhabilitar Rol");
dataGridView1.Columns.Add(botonInhabilitar);
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton limpiar
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
comboBox1.Text = "No seleccionado";
dataGridView1.Columns.Clear();
dataGridView2.Columns.Clear();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String nombreRol = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
if (e.ColumnIndex == 2)
{
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 SELECT Nombre_funcionalidad FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol r join LOS_VIAJEROS_DEL_ANONIMATO.Rol_Funcionalidad rf on (r.Codigo_Rol = rf.Codigo_Rol) join LOS_VIAJEROS_DEL_ANONIMATO.Funcionalidad f on (rf.Codigo_Funcionalidad = f.Codigo_Funcionalidad) where Nombre_Rol = '" + nombreRol + "'", ref tabla, conexion);
dataGridView2.DataSource = tabla;
dataGridView2.Columns[0].ReadOnly = true;
}
if (e.ColumnIndex == 3)
{
try
{
SqlCommand inhabilitar = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.Rol SET Habilitacion=0 WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int filasAfectadas = (int)inhabilitar.ExecuteNonQuery();
SqlCommand codRol = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.Rol WHERE Rol.Nombre_Rol = '" + nombreRol + "'", conexion);
int codigoRol = (int)codRol.ExecuteScalar();
codRol.CommandText = "USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.Usuario_Rol WHERE Codigo_Rol='" + codigoRol + "'";
codRol.ExecuteNonQuery();
new Dialogo(nombreRol + " inhabilitado \n", "Aceptar").ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Ciudades
{
public partial class ABM_Ciudad_Pantalla_Inicial : Form
{
public ABM_Ciudad_Pantalla_Inicial()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
(new AltaCiudad()).Show();
}
private void button2_Click(object sender, EventArgs e)
{
(new BajaCiudad()).Show();
}
private void button1_Click(object sender, EventArgs e)
{
(new ModifCiudad()).Show();
}
private void button4_Click(object sender, EventArgs e)
{
(new ListadoCiudades()).Show();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Ciudades
{
public partial class ListadoCiudades : Form
{
public ListadoCiudades()
{
InitializeComponent();
DataGridViewButtonColumn botonesBajaCiudad = this.crearBotones("Eliminar Ciudad","Eliminar");
dataGridView1.Columns.Add(botonesBajaCiudad);
DataGridViewButtonColumn botonesModifCiudad = this.crearBotones("Modificar Ciudad","Modificar");
dataGridView1.Columns.Add(botonesModifCiudad);
using (SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;"))
{
try
{
conexion.Open();
SqlCommand command = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataTable tabla = new DataTable();
adapter.Fill(tabla);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
}
catch
{ }
}
}
public DataGridViewButtonColumn crearBotones(String nombreColumna, String leyendaBoton)
{
DataGridViewButtonColumn botones = new DataGridViewButtonColumn();
botones.HeaderText = nombreColumna;
botones.Text = leyendaBoton;
botones.UseColumnTextForButtonValue = true;
botones.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
return botones;
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String nombreCiudadActual = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
if (e.ColumnIndex == 0)
{
(new BajaCiudad(nombreCiudadActual)).Show() ;
}
if (e.ColumnIndex == 1)
{
(new ModifCiudad(nombreCiudadActual)).Show();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Recorrido
{
public partial class AltaRecorrido : Form1
{
public AltaRecorrido()
{
InitializeComponent();
// Llenar combo box con valores posibles
using ( SqlConnection conexion = this.obtenerConexion() )
{
conexion.Open();
SqlCommand cmdParaLlenarComboBox = new SqlCommand();
cmdParaLlenarComboBox.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN";
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboBox1.DisplayMember = "NombreCiudad";
comboBox1.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboBox2.DisplayMember = "NombreCiudad";
comboBox2.DataSource = ciudadesDestino;
// Llenar el combo box 'tipo de servicio'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreServicio FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN";
DataTable tiposDeServicio = new DataTable();
adapter.Fill(tiposDeServicio);
comboBox3.DisplayMember = "NombreServicio";
comboBox3.DataSource = tiposDeServicio; // Tipos de servicio
}
}
// Previsualizar recorrido
private void button2_Click(object sender, EventArgs e)
{
try
{
this.sePuedeCrearUnRecorrido();
this.Hide();
new VisualizarRecorrido("Previsualizar",
comboBox1.Text.ToString(),
comboBox2.Text.ToString(),
comboBox3.Text.ToString(),
numericUpDown1.Value,
numericUpDown2.Value).ShowDialog();
this.Show();
}
catch(ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message,"Aceptar")).ShowDialog();
this.Show();
}
}
// Validaciones
private void sePuedeCrearUnRecorrido()
{
String errorMensaje = "";
bool hayError = false;
// Los campos origen y destino son distintos.
if (comboBox1.Text.Equals(comboBox2.Text))
{
hayError = true;
errorMensaje += "El origen y el destino son el mismo;";
}
if ( comboBox1.Text.Equals("No seleccionado") ||
comboBox2.Text.Equals("No seleccionado") ||
comboBox3.Text.Equals("No seleccionado") )
{
hayError = true;
errorMensaje += "Alguno de los campos necesarios no fue seleccionado;";
}
// Los precios no son cero
if (numericUpDown1.Value <= 0)
{
hayError = true;
errorMensaje += "Error en el precio base para pasaje;";
}
if (numericUpDown2.Value <= 0)
{
hayError = true;
errorMensaje += "Error en el precio base por Kg.;";
}
// Que el recorrido no exista en la base de datos
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPexisteElRecorrido", conexion))
{
conexion.Open();
bool existeRecorrido;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Origen",SqlDbType.NVarChar).Value = comboBox1.Text;
cmd.Parameters.Add("@Destino", SqlDbType.NVarChar).Value = comboBox2.Text;
cmd.Parameters.Add("@Servicio", SqlDbType.NVarChar).Value = comboBox3.Text;
cmd.Parameters.Add("@retorno", SqlDbType.Bit).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
existeRecorrido = Convert.ToBoolean(cmd.Parameters["@retorno"].Value);
if (existeRecorrido)
{
hayError = true;
errorMensaje += "Ya existe el recorrido;";
}
}
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
// Limpiar campos
private void button1_Click(object sender, EventArgs e)
{
comboBox1.SelectedIndex = 0;
comboBox2.SelectedIndex = 0;
comboBox3.SelectedIndex = 0;
numericUpDown1.Value = 0;
numericUpDown2.Value = 0;
}
// Dar de alta en la base de datos un recorrido
private void button3_Click(object sender, EventArgs e)
{
try
{
this.sePuedeCrearUnRecorrido();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.insertarRecorrido", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@origen", SqlDbType.NVarChar).Value = comboBox1.Text;
cmd.Parameters.Add("@destino", SqlDbType.NVarChar).Value = comboBox2.Text;
cmd.Parameters.Add("@servicio", SqlDbType.NVarChar).Value = comboBox3.Text;
cmd.Parameters.Add("@basePasaje", SqlDbType.Decimal).Value = numericUpDown1.Value;
cmd.Parameters.Add("@baseKG", SqlDbType.Decimal).Value = numericUpDown2.Value;
cmd.ExecuteNonQuery();
this.Hide();
new VisualizarRecorrido("Recorrido agregado",
comboBox1.Text.ToString(),
comboBox2.Text.ToString(),
comboBox3.Text.ToString(),
numericUpDown1.Value,
numericUpDown2.Value).ShowDialog();
this.Show();
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Collections;
namespace FrbaBus.Abm_Recorrido
{
public partial class ListadoRol : Form1
{
public ListadoRol()
{
InitializeComponent();
DataGridViewButtonColumn botonesBajaCiudad = this.crearBotones("Eliminar Ciudad", "Eliminar");
dataGridView1.Columns.Add(botonesBajaCiudad);
dataGridView1.Columns[0].Visible = false;
DataGridViewButtonColumn botonesModifCiudad = this.crearBotones("Modificar Ciudad", "Modificar");
dataGridView1.Columns.Add(botonesModifCiudad);
dataGridView1.Columns[1].Visible = false;
// Llenar combo box con valores posibles
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand cmdParaLlenarComboBox = new SqlCommand();
cmdParaLlenarComboBox.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN";
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboOrigen.DisplayMember = "NombreCiudad";
comboOrigen.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboDestino.DisplayMember = "NombreCiudad";
comboDestino.DataSource = ciudadesDestino;
// Llenar el combo box 'tipo de servicio'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreServicio FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN";
DataTable tiposDeServicio = new DataTable();
adapter.Fill(tiposDeServicio);
comboServicio.DisplayMember = "NombreServicio";
comboServicio.DataSource = tiposDeServicio; // Tipos de servicio
comboHabilitación.Items.Add("No seleccionado");
comboHabilitación.Items.Add("Deshabilitados");
comboHabilitación.Items.Add("Habilitados");
comboHabilitación.SelectedIndex = 0;
}
}
//Limpiar
private void button2_Click(object sender, EventArgs e)
{
comboOrigen.SelectedIndex = 0;
comboDestino.SelectedIndex = 0;
comboServicio.SelectedIndex = 0;
comboHabilitación.SelectedIndex = 0;
numericPrecioDesde.Value = 0;
numericPrecioHasta.Value = 0;
numericPrecioPaqueteDesde.Value = 0;
numericPrecioPaqueteHasta.Value = 0;
dataGridView1.DataSource = null;
dataGridView1.Columns[0].Visible = false;
dataGridView1.Columns[1].Visible = false;
}
// Validaciones
private void validarFiltros()
{
String errorMensaje = "";
bool hayError = false;
if (numericPrecioDesde.Value < 0 || numericPrecioHasta.Value < 0)
{
hayError = true;
errorMensaje += "El precio no debe ser menor a 0;";
}
if (numericPrecioDesde.Value > numericPrecioHasta.Value &&
numericPrecioDesde.Value != 0 && numericPrecioHasta.Value != 0)
{
hayError = true;
errorMensaje += "Pasaje: El precio mínimo debe ser menor a precio máximo;";
}
if (numericPrecioPaqueteDesde.Value > numericPrecioPaqueteHasta.Value &&
numericPrecioPaqueteDesde.Value != 0 && numericPrecioPaqueteHasta.Value != 0)
{
hayError = true;
errorMensaje += "Paquete: El precio mínimo debe ser menor a precio máximo;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private void buttonBuscar_Click(object sender, EventArgs e)
{
try
{
this.validarFiltros();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable busqueda = new DataTable();
int filtrarPorHabilitacion;
if (comboHabilitación.Text.Equals("No seleccionado"))
filtrarPorHabilitacion = 0;
else
filtrarPorHabilitacion = 1;
comando.Connection = conexion;
comando.CommandText = "SELECT * " +
"FROM LOS_VIAJEROS_DEL_ANONIMATO.F_AplicarFiltrosRecorridos " +
"(" + "'" + comboOrigen.Text + "'" +
"," + "'" + comboDestino.Text + "'" +
"," + "'" + comboServicio.Text + "'" +
"," + filtrarPorHabilitacion.ToString() +
"," + (Math.Max(comboHabilitación.SelectedIndex - 1, 0)).ToString() +
"," + numericPrecioDesde.Value.ToString().Replace(',','.') +
"," + numericPrecioHasta.Value.ToString().Replace(',', '.') +
"," + numericPrecioPaqueteDesde.Value.ToString().Replace(',', '.') +
"," + numericPrecioPaqueteHasta.Value.ToString().Replace(',', '.') + ")";
adapter.Fill(busqueda);
dataGridView1.DataSource = busqueda;
dataGridView1.ReadOnly = true;
dataGridView1.Columns[0].ReadOnly = false;
dataGridView1.Columns[1].ReadOnly = false;
dataGridView1.Columns[0].Visible = true;
dataGridView1.Columns[1].Visible = true;
}
}
}
catch(ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String origen = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
String destino = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();
String servicio = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();
if(e.ColumnIndex == 0)
{
this.Hide();
(new BajaRecorrido(origen,destino,servicio)).ShowDialog();
this.Show();
}
if (e.ColumnIndex == 1)
{
this.Hide();
(new ModifFormularioRecorrido(origen,destino,servicio)).ShowDialog();
this.Show();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Canje_de_Ptos
{
public partial class CanjePuntos : Form1
{
public CanjePuntos()
{
InitializeComponent();
textBox2.Enabled = false;
}
private void button1_Click(object sender, EventArgs e)
{
string dni = textBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
if (!(Convert.ToInt64(textBox1.Text) > 0))
{
throw new Exception("DNI invalido;");
}
conexion.Open();
DataTable tabla = new DataTable();
DateTime fechaMenosUnAño = (getFechaActual().AddYears(-1));
/*
SqlCommand borrarPuntosVencidos = new SqlCommand("USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + dni + "and Fecha < '" + fechaMenosUnAño + "'", conexion);
borrarPuntosVencidos.ExecuteNonQuery();
*/
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT SUM(Puntos) FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + dni + "and CodigoCanje is NULL and Fecha > '" + fechaMenosUnAño + "' ", conexion);
string totalPuntos = cmd.ExecuteScalar().ToString();
textBox2.Text = totalPuntos;
cargarATablaParaDataGripView("select DetalleProducto, PuntosNecesarios from LOS_VIAJEROS_DEL_ANONIMATO.PREMIO where PuntosNecesarios<" + totalPuntos, ref tabla, conexion);
dataGridView1.Columns.Clear();
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
DataGridViewColumn cantidad = new DataGridViewTextBoxColumn();
cantidad.HeaderText = "Cantidad";
cantidad.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dataGridView1.Columns.Add(cantidad);
DataGridViewButtonColumn botonCanjear = this.crearBotones("", "Canjear");
dataGridView1.Columns.Add(botonCanjear);
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
try
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String premio = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
int puntos = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
int cantidad = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
int puntosCliente = Convert.ToInt32(textBox2.Text);
DateTime fechaMenosUnAño = (getFechaActual().AddYears(-1));
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
if (e.ColumnIndex == 3) //boton canjear
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_CanjearPremio", conexion))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@DNI", SqlDbType.NVarChar).Value = textBox1.Text;
cmd.Parameters.Add("@Premio", SqlDbType.NVarChar).Value = premio;
cmd.Parameters.Add("@Puntos", SqlDbType.Int).Value = puntos;
cmd.Parameters.Add("@Cantidad", SqlDbType.Int).Value = cantidad;
cmd.Parameters.Add("@PuntosCliente", SqlDbType.Int).Value = puntosCliente;
cmd.Parameters.Add("@FechaActual", SqlDbType.DateTime).Value = getFechaActual();
cmd.Parameters.Add("@retorno", SqlDbType.Bit).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
int seRealizoCanje = Convert.ToInt32(cmd.Parameters["@retorno"].Value);
if (seRealizoCanje == 1)
{
SqlCommand cmd2 = new SqlCommand("USE GD1C2013 SELECT SUM(Puntos) FROM LOS_VIAJEROS_DEL_ANONIMATO.PUNTOVF WHERE DNI_Usuario = " + textBox1.Text + "and CodigoCanje is NULL and Fecha > '" + fechaMenosUnAño + "'", conexion);
string totalPuntos = cmd2.ExecuteScalar().ToString();
textBox2.Text = totalPuntos;
(new Dialogo("Canje realizado con exito;Premio: " +premio+";Cantidad: "+cantidad+ ";Puntos gastados: "+(puntos*cantidad), "Aceptar")).ShowDialog();
}
if (seRealizoCanje == 0)
{
(new Dialogo("Canje no realizado;Puntos insuficientes para la cantidad seleccionada", "Aceptar")).ShowDialog();
}
}
}
}
}
}catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class AltaMicro : Form1
{
public AltaMicro()
{
InitializeComponent();
}
private void AltaMicro_Load(object sender, EventArgs e)
{
String query = "";
DataGridViewButtonColumn botonesEliminarButVen = this.crearBotones("Eliminar butaca", "Eliminar");
dataGVButVent.Columns.Add(botonesEliminarButVen);
DataGridViewButtonColumn botonesEliminarButPis = this.crearBotones("Eliminar butaca", "Eliminar");
dataGVButPis.Columns.Add(botonesEliminarButPis);
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
conexion.Open();
comando.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(comando);
// Llenar combo marca
query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Marcas() ORDER BY RN ASC";
comando.CommandText = query;
DataTable marcas = new DataTable();
adapter.Fill(marcas);
comboMarca.DisplayMember = "Marca";
comboMarca.DataSource = marcas;
// Llenar combo servicios
query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN ASC";
comando.CommandText = query;
DataTable servicios = new DataTable();
adapter.Fill(servicios);
comboServicio.DisplayMember = "NombreServicio";
comboServicio.DataSource = servicios;
// Textos de butacas
textButPas.Text = "0";
textButVent.Text = "0";
}
}
}
private void buttonButVent_Click(object sender, EventArgs e)
{
this.Hide();
EspecificarPiso EP = new EspecificarPiso();
DialogResult dr = EP.ShowDialog();
if (dr == DialogResult.OK)
{
dataGVButVent.Rows.Add(new object[]{EP.piso});
textButVent.Text = (Convert.ToInt32(textButVent.Text) + 1).ToString();
this.Show();
}
}
private void buttonButPas_Click(object sender, EventArgs e)
{
this.Hide();
EspecificarPiso EP = new EspecificarPiso();
DialogResult dr = EP.ShowDialog();
if (dr == DialogResult.OK)
{
dataGVButPis.Rows.Add(new object[] { EP.piso });
textButPas.Text = (Convert.ToInt32(textButPas.Text) + 1).ToString();
this.Show();
}
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
textPatente.Text = "";
comboMarca.SelectedIndex = 0;
textModelo.Text = "";
comboServicio.SelectedIndex = 0;
numericKG.Value = 0;
textButPas.Text = "0";
textButVent.Text = "0";
dataGVButPis.Rows.Clear();
dataGVButVent.Rows.Clear();
}
private void dataGVButVent_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGVButVent.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
dataGVButVent.Rows.RemoveAt(e.RowIndex);
textButVent.Text = (Convert.ToInt32(textButVent.Text) - 1).ToString();
}
}
private void dataGVButPis_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGVButPis.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
dataGVButPis.Rows.RemoveAt(e.RowIndex);
textButPas.Text = (Convert.ToInt32(textButPas.Text) - 1).ToString();
}
}
private void validarParametros()
{
Boolean hayError = false;
String mensajeError = "";
if (textPatente.Text.Equals(""))
{
hayError = true;
mensajeError += "No se seleccionó la patente del micro;";
}
if (comboMarca.SelectedIndex == 0)
{
hayError = true;
mensajeError += "No se seleccionó la marca del micro;";
}
if (textModelo.Text.Equals(""))
{
hayError = true;
mensajeError += "No se seleccionó el modelo del micro;";
}
if (comboServicio.SelectedIndex == 0)
{
hayError = true;
mensajeError += "No se seleccionó el servicio del micro;";
}
if (numericKG.Value == 0)
{
hayError = true;
mensajeError += "No se seleccionó la capacidad del micro;";
}
if (textButPas.Text.Equals("0") && textButVent.Text.Equals("0"))
{
hayError = true;
mensajeError += "No se agregó ninguna butaca;";
}
if (hayError)
throw new ParametrosIncorrectosException(mensajeError);
}
private void buttonFinal_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.DarDeAltaMicro",conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@patente",SqlDbType.NVarChar).Value = textPatente.Text;
comand.Parameters.Add("@marca",SqlDbType.NVarChar).Value = comboMarca.Text;
comand.Parameters.Add("@modelo",SqlDbType.NVarChar).Value = textModelo.Text;
comand.Parameters.Add("@fechaAlta",SqlDbType.DateTime).Value = this.getFechaActual();
comand.Parameters.Add("@servicio",SqlDbType.NVarChar).Value = comboServicio.Text;
comand.Parameters.Add("@KG_bodega",SqlDbType.Decimal).Value = numericKG.Value;
comand.Parameters.Add("@CantidadButacas", SqlDbType.Int).Value = (Convert.ToInt32(textButPas.Text)) + (Convert.ToInt32(textButVent.Text));
comand.ExecuteNonQuery();
this.insertarButacas();
buttonLimpiar.PerformClick();
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message,"Aceptar")).ShowDialog();
this.Show();
}
catch(SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void insertarButacas()
{
int numero = 1;
DataGridViewRowCollection butacasPasillo = dataGVButPis.Rows;
foreach (DataGridViewRow pasillo in butacasPasillo)
{
this.persistirButacas("Pasillo", ref numero, Convert.ToInt32(pasillo.Cells[0].Value));
numero++;
}
DataGridViewRowCollection butacasVentanilla = dataGVButVent.Rows;
foreach (DataGridViewRow ventanilla in butacasVentanilla)
{
this.persistirButacas("Ventanilla", ref numero, Convert.ToInt32(ventanilla.Cells[0].Value));
numero++;
}
}
private void persistirButacas(string ubicacion,ref int numeroB,int pisoB)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.DarDeAltaButaca", conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@patente",SqlDbType.NVarChar).Value = textPatente.Text;
comand.Parameters.Add("@numero", SqlDbType.Int).Value = numeroB;
comand.Parameters.Add("@ubicacion", SqlDbType.NVarChar).Value = ubicacion;
comand.Parameters.Add("@piso", SqlDbType.Int).Value = pisoB;
comand.ExecuteNonQuery();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class EspecificarPago : Form1
{
public int DNI_Abonante = -1;
public String tipoPago = "";
public int numeroTarjeta = -1;
public String claveTarjeta = "";
public String companiaTarjeta = "";
public EspecificarPago()
{
InitializeComponent();
}
private void buttonEspecificarPagante_Click(object sender, EventArgs e)
{
this.Hide();
InsertarCliente insercion = new InsertarCliente();
(insercion).ShowDialog();
textBoxDNI.Text = insercion.DNI_Cliente_Agregado.ToString();
textBoxApellido.Text = insercion.Apellido_Cliente_Agregado;
textBoxNombre.Text = insercion.Nombre_Cliente_Agregado;
this.Show();
}
private void EspecificarPago_Load(object sender, EventArgs e)
{
comboBoxTipoPago.Items.AddRange(new String[] { "Tipo de pago", "Con tarjeta", "En efectivo" });
comboBoxTipoPago.SelectedIndex = 0;
}
private void comboBoxTipoPago_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBoxTipoPago.SelectedIndex == 1)
{
numericNumTarjeta.Enabled = true;
textBoxClave.Enabled = true;
buttonFechaVto.Enabled = true;
textBoxCompania.Enabled = true;
checkBoxCuotas.Enabled = true;
}
else
{
numericNumTarjeta.Enabled = false;
textBoxClave.Enabled = false;
buttonFechaVto.Enabled = false;
textBoxCompania.Enabled = false;
checkBoxCuotas.Enabled = false;
numericNumTarjeta.Value = 0;
textBoxFechaVto.Text = "";
textBoxClave.Text = "";
textBoxCompania.Text = "";
checkBoxCuotas.Checked = false;
}
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
textBoxDNI.Text = "";
textBoxApellido.Text = "";
textBoxNombre.Text = "";
comboBoxTipoPago.SelectedIndex = 0;
numericNumTarjeta.Value = 0;
textBoxFechaVto.Text = "";
textBoxClave.Text = "";
textBoxCompania.Text = "";
checkBoxCuotas.Checked = false;
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
public void validarCampos()
{
Boolean hayError = false;
String errorMensaje = "";
if (textBoxDNI.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar DNI;";
}
if (textBoxApellido.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar apellido;";
}
if (textBoxNombre.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar nombre;";
}
if (comboBoxTipoPago.Text.Equals("Tipo de pago"))
{
hayError = true;
errorMensaje += "Falta especificar un tipo de pago;";
}
if (comboBoxTipoPago.Text.Equals("Con tarjeta"))
{
if (textBoxCompania.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta especificar un companía de tarjeta;";
}
if (numericNumTarjeta.Value == 0)
{
hayError = true;
errorMensaje += "Falta especificar un numero de tarjeta;";
}
if (Convert.ToDateTime(textBoxFechaVto.Text) <= this.getFechaActual())
{
hayError = true;
errorMensaje += "La tarjeta esta vencida;";
}
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private void buttonConfirm_Click(object sender, EventArgs e)
{
try
{
this.validarCampos();
DNI_Abonante = Convert.ToInt32(textBoxDNI.Text);
tipoPago = comboBoxTipoPago.Text;
numeroTarjeta = Convert.ToInt32(numericNumTarjeta.Value);
companiaTarjeta = textBoxCompania.Text;
claveTarjeta = textBoxClave.Text;
this.DialogResult = DialogResult.OK;
this.Close();
}
catch (ParametrosIncorrectosException ex)
{
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
}
}
private void buttonFechaVto_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textBoxFechaVto.Text = ex.Message;
}
finally
{
this.Show();
this.Focus();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FrbaBus.Top_Micros;
using FrbaBus.Top_Destinos;
using FrbaBus.Top_Clientes;
namespace FrbaBus.Listado_Estadistico
{
public partial class ListadoEstadistico : Form1
{
int semestre;
string año;
public ListadoEstadistico()
{
InitializeComponent();
textBox1.Text = "Formato AAAA";
}
private void button5_Click(object sender, EventArgs e)
{
try
{
this.sePuedeGenerarListado();
año = textBox1.Text;
if (checkBox1.Checked)
{
semestre = 1;
}
else
{
semestre = 2;
}
(new TopMicrosMayorPeriodoBaja(año,semestre)).Show();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void button1_Click(object sender, EventArgs e)
{
try
{
this.sePuedeGenerarListado();
año = textBox1.Text;
if (checkBox1.Checked)
{
semestre = 1;
}
else
{
semestre = 2;
}
(new DestinosMasPasajesComprados(año, semestre)).Show();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void sePuedeGenerarListado()
{
String errorMensaje = "";
bool hayError = false;
if (textBox1.Text.Equals("Formato AAAA") || textBox1.Text.Length != 4 || Convert.ToInt64(textBox1.Text) < 2000)
{
hayError = true;
errorMensaje += "Año no ingresado o en formato erroneo;";
}
if (!(checkBox1.Checked) && !(checkBox2.Checked))
{
hayError = true;
errorMensaje += "Semestre no seleccionado;";
}
if ((checkBox1.Checked) && (checkBox2.Checked))
{
hayError = true;
errorMensaje += "Mas de un semestre seleccionado;";
}
if (hayError)
throw new Exception(errorMensaje);
}
private void button3_Click(object sender, EventArgs e)
{
try
{
this.sePuedeGenerarListado();
año = textBox1.Text;
if (checkBox1.Checked)
{
semestre = 1;
}
else
{
semestre = 2;
}
(new TopPuntos(año, semestre)).Show();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
this.sePuedeGenerarListado();
año = textBox1.Text;
if (checkBox1.Checked)
{
semestre = 1;
}
else
{
semestre = 2;
}
(new TopDestinosMicrosVacios(año, semestre)).Show();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
private void button4_Click(object sender, EventArgs e)
{
try
{
this.sePuedeGenerarListado();
año = textBox1.Text;
if (checkBox1.Checked)
{
semestre = 1;
}
else
{
semestre = 2;
}
(new TopDestinosPasajesCancelados(año, semestre)).Show();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using FrbaBus.Abm_Recorrido;
namespace FrbaBus.GenerarViaje
{
public partial class Generar_Viaje : Form1
{
public Generar_Viaje()
{
DateTime fechaActual = getFechaActual();
InitializeComponent();
// Llenar combo box con valores posibles
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand cmdParaLlenarComboBox = new SqlCommand();
cmdParaLlenarComboBox.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN";
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboBox1.DisplayMember = "NombreCiudad";
comboBox1.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboBox2.DisplayMember = "NombreCiudad";
comboBox2.DataSource = ciudadesDestino;
// Llenar el combo box 'tipo de servicio'
cmdParaLlenarComboBox.CommandText = "USE GD1C2013 SELECT NombreServicio FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN";
DataTable tiposDeServicio = new DataTable();
adapter.Fill(tiposDeServicio);
comboBox3.DisplayMember = "NombreServicio";
comboBox3.DataSource = tiposDeServicio; // Tipos de servicio
comboBox4.Text="No Seleccionado";
}
}
private void sePuedeCrearUnViaje()
{
String errorMensaje = "";
bool hayError = false;
DateTime fechaActual = getFechaActual();
// Fecha viaje posterior a Fecha Actual
if (fechaActual > dateTimePicker1.Value.Date)
{
hayError = true;
errorMensaje += "La fecha seleccionada es anterior a la fecha actual;";
}
//a igual fecha comprobar que el horario es posterior
if (fechaActual == dateTimePicker1.Value.Date)
{
if (dateTimePicker1.Value.Hour == numericUpDown1.Value)
{
if (dateTimePicker1.Value.Minute >= numericUpDown2.Value)
{
hayError = true;
errorMensaje += "La fecha seleccionada es anterior a la fecha actual;";
}
}
else
{
if (dateTimePicker1.Value.Hour > numericUpDown1.Value)
{
hayError = true;
errorMensaje += "La fecha seleccionada es anterior a la fecha actual;";
}
}
}
// Fecha llegada posterior o igual a fecha salida
if (dateTimePicker1.Value.Date == dateTimePicker2.Value.Date)
{
if (numericUpDown1.Value == numericUpDown3.Value)
{
if (numericUpDown2.Value == numericUpDown4.Value)
{
hayError = true;
errorMensaje += "La fecha de salida es igual a la fecha de llegada estimada;";
}
else
{
if (numericUpDown2.Value > numericUpDown4.Value)
{
hayError = true;
errorMensaje += "La fecha de salida es posterior a la fecha de llegada estimada;";
}
}
}else
{
if(numericUpDown1.Value > numericUpDown3.Value)
{
hayError = true;
errorMensaje += "La fecha de salida es posterior a la fecha de llegada estimada;";
}
}
}
else
{
if (dateTimePicker1.Value.Date > dateTimePicker2.Value.Date)
{
hayError = true;
errorMensaje += "La fecha de salida es posterior a la fecha de llegada estimada;";
}
}
// Los campos origen y destino son iguales.
if (comboBox1.Text.Equals(comboBox2.Text))
{
hayError = true;
errorMensaje += "El origen y el destino son el mismo;";
}
if (comboBox1.Text.Equals("No seleccionado") ||
comboBox2.Text.Equals("No seleccionado") ||
comboBox3.Text.Equals("No seleccionado") ||
comboBox4.Text.Equals("No seleccionado"))
{
hayError = true;
errorMensaje += "Alguno de los campos necesarios no fue seleccionado;";
}
// Que el recorrido no exista en la base de datos
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPexisteElRecorrido", conexion))
{
conexion.Open();
bool existeRecorrido;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Origen", SqlDbType.NVarChar).Value = comboBox1.Text;
cmd.Parameters.Add("@Destino", SqlDbType.NVarChar).Value = comboBox2.Text;
cmd.Parameters.Add("@Servicio", SqlDbType.NVarChar).Value = comboBox3.Text;
cmd.Parameters.Add("@retorno", SqlDbType.Bit).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
existeRecorrido = Convert.ToBoolean(cmd.Parameters["@retorno"].Value);
if (!existeRecorrido)
{
hayError = true;
errorMensaje += "No existe el recorrido;";
}
}
}
//comprobar que en la fecha este disponible el micro
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPMicroOcupadoEnFecha", conexion))
{
conexion.Open();
// bool microOcupado;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@PatenteMicro", SqlDbType.NVarChar).Value = comboBox4.Text;
cmd.Parameters.Add("@Fecha", SqlDbType.DateTime).Value = dateTimePicker1.Value;
cmd.Parameters.Add("@retorno", SqlDbType.Int).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
int microOcupado = Convert.ToInt32(cmd.Parameters["@retorno"].Value);
if (microOcupado == 1)
{
hayError = true;
errorMensaje += "Micro no disponible para la fecha " + dateTimePicker1.Value + ";Motivo: ya hay un viaje ingresado en esa fecha";
}
if (microOcupado == 2)
{
hayError = true;
errorMensaje += "Micro no disponible para la fecha " + dateTimePicker1.Value + ";Motivo: el micro esta fuera de servicio en esa fecha";
}
}
}
if (hayError)
throw new Exception(errorMensaje);
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
//cargar comboBox con micros disponibles
string tipoServicio = comboBox3.Text;
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 select DISTINCT(m.Patente) from LOS_VIAJEROS_DEL_ANONIMATO.MICRO m join LOS_VIAJEROS_DEL_ANONIMATO.VIAJE v on (m.Patente=v.PatenteMicro) where TipoServicio='" + tipoServicio + "' and BajaPorVidaUtil=0", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox4.DisplayMember = "Patente";
comboBox4.DataSource = tablaDeNombres;
}
}
//boton limpiar
private void button3_Click(object sender, EventArgs e)
{
comboBox1.Text = "No seleccionado";
comboBox2.Text = "No seleccionado";
comboBox3.Text = "No seleccionado";
comboBox4.Text = "No seleccionado";
}
//boton crear
private void button1_Click(object sender, EventArgs e)
{
try
{
string patenteMicro = comboBox4.Text;
string origen = comboBox1.Text;
string destino = comboBox2.Text;
string tipoServicio = comboBox3.Text;
double horasSalida = Convert.ToDouble(numericUpDown1.Value.ToString());
double minutosSalida = Convert.ToDouble(numericUpDown2.Value.ToString());
DateTime fechaSalida = dateTimePicker1.Value;
DateTime fechaSalidaSinTiempo = fechaSalida.AddSeconds(-fechaSalida.Second).AddMinutes(-fechaSalida.Minute).AddHours(-fechaSalida.Hour);
DateTime fechaSalidaCompleta = fechaSalidaSinTiempo.AddHours(horasSalida).AddMinutes(minutosSalida);
double horasLlegada = Convert.ToDouble(numericUpDown3.Value.ToString());
double minutosLlegada = Convert.ToDouble(numericUpDown4.Value.ToString());
DateTime fechaLlegada = dateTimePicker2.Value;
DateTime fechaLlegadaSinTiempo = fechaLlegada.AddSeconds(-fechaLlegada.Second).AddMinutes(-fechaLlegada.Minute).AddHours(-fechaLlegada.Hour);
DateTime fechaLlegadaCompleta = fechaLlegadaSinTiempo.AddHours(horasLlegada).AddMinutes(minutosLlegada);
this.sePuedeCrearUnViaje();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPCrearViaje", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@PatenteMicro", SqlDbType.NVarChar).Value = patenteMicro;
cmd.Parameters.Add("@FechaSalida", SqlDbType.DateTime).Value = fechaSalidaCompleta;
cmd.Parameters.Add("@FechaLlegadaEstimada", SqlDbType.DateTime).Value = fechaLlegadaCompleta;
cmd.Parameters.Add("@Origen", SqlDbType.NVarChar).Value = origen;
cmd.Parameters.Add("@Destino", SqlDbType.NVarChar).Value = destino;
cmd.Parameters.Add("@TipoServicio", SqlDbType.NVarChar).Value = tipoServicio;
cmd.ExecuteNonQuery();
(new Dialogo("Nuevo viaje creado;Micro: " +patenteMicro+ ";Fecha salida: " +fechaSalidaCompleta+ ";Fecha llegada estimada: " +fechaLlegadaCompleta+ ";Origen: " +origen+ ";Destino: " +destino+ ";Tipo Servicio: " +tipoServicio, "Aceptar")).ShowDialog();
}
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus
{
public partial class Alta_Rol : Form1
{
private List<String> funcionesAgregadas;
private int cantidadFunc;
public Alta_Rol()
{
InitializeComponent();
listBox1.Items.Add("Funcion1");
listBox1.Items.Add("Funcion2");
listBox1.Items.Add("Funcion3");
this.funcionesAgregadas = new List<string>();
this.cantidadFunc = 0;
}
// Boton previsualizar
private void button4_Click_1(object sender, EventArgs e)
{
MostrarRol previsualizarRol = new MostrarRol(textBox1.Text,this.funcionesAgregadas);
previsualizarRol.Text = "Guardaras el siguiente rol";
previsualizarRol.Show();
}
// Boton agregar funcionalidad
private void button1_Click(object sender, EventArgs e)
{
this.funcionesAgregadas.Add(listBox1.Text);
this.cantidadFunc++;
label1.Text = this.cantidadFunc.ToString();
}
private void button5_Click(object sender, EventArgs e)
{
MostrarRol previsualizarRol = new MostrarRol(textBox1.Text, this.funcionesAgregadas);
previsualizarRol.Text = "Guardaras el siguiente rol";
previsualizarRol.Show();
}
private void button3_Click(object sender, EventArgs e)
{
label1.Text = "0";
textBox1.Text = "";
this.funcionesAgregadas = new List<string>();
this.cantidadFunc = 0;
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Top_Destinos
{
public partial class DestinosMasPasajesComprados : Form1
{
public DestinosMasPasajesComprados(string unAño, int unSemestre)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 select TOP 5 NombreCiudad, LOS_VIAJEROS_DEL_ANONIMATO.FcalcularPasajesCompradosEn(NombreCiudad," + unAño + "," + unSemestre + ") AS cantidadPasajes from LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD where LOS_VIAJEROS_DEL_ANONIMATO.FcalcularPasajesCompradosEn(NombreCiudad," + unAño + "," + unSemestre + ")!=0 order by 2 desc", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
dataGridView1.Columns[1].ReadOnly = true;
dataGridView1.Columns[1].HeaderText = "Pasajes comprados";
}
}
}
}
<file_sep>-- PROCEDURES
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.PElRecorridoEstaHabilitado
(@Origen nvarchar(255),
@Destino nvarchar(255),
@Servicio nvarchar(255),
@Retorno bit output)
AS
BEGIN
SET @Retorno = (SELECT R.Habilitado FROM LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO R
WHERE R.CiudadOrigen = @Origen AND
R.CiudadDestino = @Destino AND
R.TipoServicio = @Servicio);
END;
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerDatosDeRecorrido
(@Origen nvarchar(255),
@Destino nvarchar(255),
@Servicio nvarchar(255),
@Habilitacion bit output,
@PrecioBase_KG numeric(18,2) output,
@PrecioBase numeric(18,2) output)
AS
BEGIN
(SELECT
@Habilitacion = R.Habilitado,
@PrecioBase_KG = R.PrecioBase_KG,
@PrecioBase = R.PrecioBase
FROM LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO R
WHERE R.CiudadOrigen = @Origen AND
R.CiudadDestino = @Destino AND
R.TipoServicio = @Servicio);
END;
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.SP_ModificarRecorrido
@origen nvarchar(255),
@destino nvarchar(255),
@servicio nvarchar(255),
@basePasaje numeric(18,2),
@baseKG numeric(18,2),
@habilitacion bit
AS
BEGIN
UPDATE LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO
SET PrecioBase = @basePasaje,
PrecioBase_KG = @baseKG,
Habilitado = @habilitacion
WHERE CiudadOrigen = @origen AND
CiudadDestino = @destino AND
TipoServicio = @servicio
END;
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.insertarRecorrido
@origen nvarchar(255),
@destino nvarchar(255),
@servicio nvarchar(255),
@basePasaje numeric(18,2),
@baseKg numeric(18,2)
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO
VALUES(@origen,@destino,@servicio,@basePasaje,@baseKg,1);
END;
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.eliminarRecorrido
@origen nvarchar(255),
@destino nvarchar(255),
@servicio nvarchar(255)
AS
BEGIN
SET NOCOUNT ON;
UPDATE LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO
SET Habilitado = 0
WHERE CiudadOrigen = @origen AND
CiudadDestino = @destino AND
TipoServicio = @servicio;
END;
CREATE PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.SPexisteElRecorrido
( @Origen nvarchar(255), @Destino nvarchar(255),@Servicio nvarchar(255), @retorno bit output )
AS
BEGIN
IF EXISTS(SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO R
WHERE (
R.CiudadOrigen = @Origen AND
R.CiudadDestino = @Destino AND
R.TipoServicio = @Servicio
) )
SET @retorno = 1; -- Si existe
ELSE
SET @retorno = 0; -- Si no existe
END;
-- FUNCTIONS
CREATE FUNCTION LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios ()
RETURNS TABLE
AS
RETURN (SELECT 0 as RN,'No seleccionado' as NombreServicio
UNION
SELECT
ROW_NUMBER() OVER(ORDER BY TS.NombreServicio ASC) as RN,
TS.NombreServicio
FROM LOS_VIAJEROS_DEL_ANONIMATO.TIPOSERVICIO TS
);
CREATE FUNCTION LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades ()
RETURNS TABLE
AS
RETURN (SELECT 0 as RN,'No seleccionado' as NombreCiudad
UNION
SELECT ROW_NUMBER() OVER(ORDER BY C.NombreCiudad ASC) as RN,C.NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD C
);
CREATE FUNCTION LOS_VIAJEROS_DEL_ANONIMATO.F_AplicarFiltrosRecorridos
(
@origen nvarchar(255),
@destino nvarchar(255),
@servicio nvarchar(255),
@filtroHabilitado bit,
@habilitado bit,
@precioDesde numeric(18,2),
@preciohasta numeric(18,2),
@precioKGDesde numeric(18,2),
@precioKGHasta numeric(18,2)
)
RETURNS TABLE
AS
RETURN
(
SELECT *
FROM LOS_VIAJEROS_DEL_ANONIMATO.RECORRIDO R
WHERE
( @origen = 'No seleccionado' OR R.CiudadOrigen = @origen ) AND
( @destino = 'No seleccionado' OR R.CiudadDestino = @destino ) AND
( @servicio = 'No seleccionado' OR R.TipoServicio = @servicio ) AND
( @filtroHabilitado = 0 OR (R.Habilitado = @habilitado AND @filtroHabilitado = 1) ) AND
( @precioDesde = 0 OR R.PrecioBase > @precioDesde ) AND
( @preciohasta = 0 OR R.PrecioBase < @preciohasta ) AND
( @precioKGDesde = 0 OR R.PrecioBase_KG > @precioKGDesde ) AND
( @precioKGHasta = 0 OR R.PrecioBase_KG < @precioKGHasta )
);<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus
{
public partial class PruebaSQL : Form
{
public PruebaSQL()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Text = "PROCESANDO";
SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;");
try
{
conexion.Open();
SqlCommand command = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.TIPOSERVICIO", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataTable tabla = new DataTable();
adapter.Fill(tabla);
dataGridView1.DataSource = tabla;
dataGridView1.AutoSize = true;
this.Text = "LISTO";
}
catch
{ }
conexion.Close();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ModifMarca : Form1
{
public ModifMarca(string unaPatente)
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand marca = new SqlCommand("USE GD1C2013 select ma.Marca from los_viajeros_del_anonimato.MICRO mi join LOS_VIAJEROS_DEL_ANONIMATO.MARCA ma on (mi.Marca = ma.Id_Marca) WHERE Patente = '" + unaPatente + "'", conexion);
string marcaActual = marca.ExecuteScalar().ToString();
textBox1.Text = marcaActual;
textBox1.Enabled = false;
textBox3.Text = unaPatente;
textBox3.Enabled = false;
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT Marca FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Marcas () ORDER BY RN", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "Marca";
comboBox1.DataSource = tablaDeNombres;
}
}
private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = "";
comboBox1.Text = "No seleccionado";
}
private void button2_Click(object sender, EventArgs e)
{
try
{
string patente = textBox3.Text;
string nuevoNombreMarca = textBox2.Text;
string marcaActual = textBox1.Text;
string otraMarca = comboBox1.Text;
using (SqlConnection conexion = this.obtenerConexion())
{
if ((nuevoNombreMarca.Length > 0) && !(String.Equals(comboBox1.Text, "No seleccionado")))
{
throw new Exception("Debe hacer solo una accion a la vez");
}
if ((nuevoNombreMarca.Length == 0) && (String.Equals(comboBox1.Text, "No seleccionado")))
{
throw new Exception("No especifica que hacer");
}
if (nuevoNombreMarca.Length > 0)
{
conexion.Open();
SqlCommand modificarNombre = new SqlCommand("USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.MARCA SET Marca = 'asd' where MARCA= '" + marcaActual + "'", conexion);
modificarNombre.ExecuteNonQuery();
conexion.Close();
textBox1.Text = otraMarca;
(new Dialogo("Marca modificada;" +marcaActual+ " modificada a "+nuevoNombreMarca, "Aceptar")).ShowDialog();
}
if (!(String.Equals(comboBox1.Text, "No seleccinado")))
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPModificarMarca", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Patente", SqlDbType.NVarChar).Value = patente;
cmd.Parameters.Add("@otraMarca", SqlDbType.NVarChar).Value = otraMarca;
cmd.ExecuteNonQuery();
(new Dialogo("Marca modificada;" +marcaActual+ " modificada a "+otraMarca+ " para la patente "+patente, "Aceptar")).ShowDialog();
textBox1.Text = otraMarca;
}
}
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Ciudades
{
public partial class BajaCiudad : Form
{
String nombreCiudad;
public BajaCiudad()
{
InitializeComponent();
using (SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;"))
{
try
{
conexion.Open();
// TODO usar funciones con parametros
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD", conexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable tablaDeNombres = new DataTable();
adapter.Fill(tablaDeNombres);
comboBox1.DisplayMember = "NombreCiudad";
comboBox1.DataSource = tablaDeNombres;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("A la mierda con todo; " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
public BajaCiudad(String nombreCiudadAEliminar)
{
InitializeComponent();
//textBox1.Text = nombreCiudadAEliminar;
comboBox1.Text = nombreCiudadAEliminar;
//textBox1.Enabled = false;
comboBox1.Enabled = false;
}
private void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;"))
{
try
{
conexion.Open();
//nombreCiudad = textBox1.Text;
nombreCiudad = comboBox1.Text;
// TODO usar funciones con parametros
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT COUNT(*) FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD Ciudad WHERE Ciudad.NombreCiudad = '" + nombreCiudad + "'", conexion);
int cantidadDeFilas = (int)cmd.ExecuteScalar();
if (cantidadDeFilas == 0)
{
(new Dialogo("No existe la ciudad", "Aceptar")).ShowDialog();
}
else
{
cmd.CommandText = "USE GD1C2013 DELETE FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD WHERE NombreCiudad = '" + nombreCiudad + "'";
int filasAfectadas = cmd.ExecuteNonQuery();
(new Dialogo(nombreCiudad + " eliminada: \n" + filasAfectadas + " filas afectadas", "Aceptar")).ShowDialog();
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("A la mierda con todo; " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
namespace FrbaBus
{
public partial class Form1 : Form
{
private String stringDeConexion;
private DateTime fechaActual;
public Form1()
{
InitializeComponent();
this.configurarse();
Console.Out.WriteLine("Conexion: " + this.stringDeConexion);
Console.Out.WriteLine("fecha: " + this.fechaActual.ToString("yyyy/MM/dd"));
}
private void configurarse()
{
String linea;
String ruta = Application.StartupPath+@"\FRBABUS.txt";
StreamReader archivo = new StreamReader(ruta,Encoding.ASCII);
while ((linea = archivo.ReadLine()) != null)
{
String[] renglon = linea.Split(':');
String primerPalabra = renglon[0];
if (primerPalabra.Equals("conexion"))
this.stringDeConexion = renglon[1];
if (primerPalabra.Equals("fecha"))
{
String[] fecha = renglon[1].Split('/');
this.fechaActual = new DateTime(Convert.ToInt32(fecha[0]),Convert.ToInt32(fecha[1]),Convert.ToInt32(fecha[2]));
}
}
archivo.Close();
}
private void Form1_Load(object sender, EventArgs e)
{
}
public DateTime getFechaActual()
{
return this.fechaActual;
}
public void setFechaActual(String fecha)
{
this.fechaActual = Convert.ToDateTime(fecha);
}
public SqlConnection obtenerConexion()
{
return new SqlConnection(this.stringDeConexion);
}
public void cargarATablaParaDataGripView(string unaConsulta, ref DataTable unaTabla, SqlConnection unaConexion)
{
SqlCommand cmd = new SqlCommand(unaConsulta, unaConexion);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(unaTabla);
}
public DataGridViewButtonColumn crearBotones(String nombreColumna, String leyendaBoton)
{
DataGridViewButtonColumn botones = new DataGridViewButtonColumn();
botones.HeaderText = nombreColumna;
botones.Text = leyendaBoton;
botones.UseColumnTextForButtonValue = true;
botones.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
return botones;
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class DialogoMicroFSTieneViajes : Form1
{
private String tipoDeBaja;
private String patenteMicro;
private DateTime fechaInicio;
private DateTime fechaFin;
public DialogoMicroFSTieneViajes(String tipoBaja,String patente, DateTime fechaIni,DateTime fechaFin)
{
InitializeComponent();
this.tipoDeBaja = tipoBaja;
this.patenteMicro = patente;
this.fechaInicio = fechaIni;
this.fechaFin = fechaFin;
}
public DialogoMicroFSTieneViajes(String tipoBaja, String patente, DateTime fechaIni)
{
InitializeComponent();
this.tipoDeBaja = tipoBaja;
this.patenteMicro = patente;
this.fechaInicio = fechaIni;
}
public void buttonCancelarTodo_Click(object sender, EventArgs e)
{
buttonCancelarTodo.Enabled = false;
buttonReemplazar.Enabled = false;
String textoAnterior = label1.Text;
label1.Text = "Espere por favor. Estamos ejecutando la acción que eligió. Esta operación puede tardar mucho tiempo. No cierre el programa";
this.Enabled = false;
if (this.tipoDeBaja.Equals("PorModificacion"))
this.cancelarTodoPorModificacion();
else
this.cancelarTodoDefinitivamente();
label1.Text = textoAnterior;
this.Enabled = true;
buttonCancelarTodo.Enabled = true;
buttonReemplazar.Enabled = true;
this.Close();
}
private void cancelarTodoDefinitivamente()
{
using (SqlConnection conexion = this.obtenerConexion())
{
String query = "SELECT * " +
"FROM LOS_VIAJEROS_DEL_ANONIMATO.ComprasDelMicroEnPeriodo_Def(" +
"'" + this.patenteMicro + "'," +
"'" + this.getFechaActual().ToString("yyyyMMdd") + "')";
using (SqlCommand comando = new SqlCommand(query, conexion))
{
conexion.Open();
SqlDataReader reader = comando.ExecuteReader();
while (reader.Read())
this.cancelarCompra(reader[0]);
}
}
}
private void cancelarTodoPorModificacion()
{
using (SqlConnection conexion = this.obtenerConexion())
{
String query = "SELECT * " +
"FROM LOS_VIAJEROS_DEL_ANONIMATO.ComprasDelMicroEnPeriodo(" +
"'" + this.patenteMicro + "'," +
"'" + this.fechaInicio.ToString("yyyyMMdd") + "'," +
"'" + this.fechaFin.ToString("yyyyMMdd") + "')";
using (SqlCommand comando = new SqlCommand(query, conexion))
{
conexion.Open();
SqlDataReader reader = comando.ExecuteReader();
while (reader.Read())
this.cancelarCompra(reader[0]);
}
}
}
private void cancelarCompra(object Voucher)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.CancelarCompra", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numVoucher", SqlDbType.Int).Value = Convert.ToInt32(Voucher);
comando.ExecuteNonQuery();
}
}
}
private void buttonReemplazar_Click(object sender, EventArgs e)
{
this.Hide();
if (this.tipoDeBaja.Equals("PorModificacion"))
(new ReemplazarMicro(this.tipoDeBaja,this.patenteMicro, this.fechaInicio, this.fechaFin)).ShowDialog();
else
(new ReemplazarMicro(this.tipoDeBaja,this.patenteMicro, this.fechaInicio)).ShowDialog();
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Prueba
{
public partial class Basico : Form1
{
public Basico()
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand command = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.TIPOSERVICIO", conexion);
SqlDataAdapter adap = new SqlDataAdapter(command);
DataTable tablaTipos = new DataTable();
adap.Fill(tablaTipos);
comboBox1.DisplayMember = "NombreServicio";
comboBox1.DataSource = tablaTipos;
}
}
private void Basico_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
SqlCommand command = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD", conexion);
SqlDataAdapter adap = new SqlDataAdapter(command);
DataTable tablaCiudad = new DataTable();
adap.Fill(tablaCiudad);
dataGridView1.DataSource = tablaCiudad;
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus
{
public partial class MostrarRol : Form
{
public MostrarRol(String nombreRol,List<String> funciones)
{
InitializeComponent();
label2.Text = nombreRol;
foreach (String funcion in funciones)
{
listBox1.Items.Add(funcion);
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class AgregarEncomienda : Form1
{
private int codigoViaje { get; set; }
private int numeroVoucher { get; set; }
public AgregarEncomienda(int codigoViajeHeredado,int numVoucher)
{
InitializeComponent();
this.numeroVoucher = numVoucher;
this.codigoViaje = codigoViajeHeredado;
}
private void buttonEspecificarCliente_Click(object sender, EventArgs e)
{
this.Hide();
InsertarCliente insercion = new InsertarCliente();
(insercion).ShowDialog();
textBoxDNI.Text = insercion.DNI_Cliente_Agregado.ToString();
textBoxApellido.Text = insercion.Apellido_Cliente_Agregado;
textBoxNombre.Text = insercion.Nombre_Cliente_Agregado;
this.Show();
}
public void validarCampos()
{
Boolean hayError = false;
String errorMensaje = "";
if (textBoxDNI.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar DNI;";
}
if (textBoxApellido.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar apellido;";
}
if (textBoxNombre.Text.Equals(""))
{
hayError = true;
errorMensaje += "Falta completar nombre;";
}
if (numericPeso.Value == 0)
{
hayError = true;
errorMensaje += "Falta completar peso del paquete;";
}
if (numericPeso.Value < 0)
{
hayError = true;
errorMensaje += "El peso debe ser positivo;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private void buttonConfirmar_Click(object sender, EventArgs e)
{
try
{
this.validarCampos();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.InsertarEncomienda", conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comand.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.numeroVoucher;
comand.Parameters.Add("@DNI_pasajero", SqlDbType.Int).Value = Convert.ToInt32(textBoxDNI.Text);
comand.Parameters.Add("@kilosPaqueteString", SqlDbType.VarChar).Value = numericPeso.Value.ToString().Replace(',', '.');
comand.Parameters.Add("@codigoEncomienda", SqlDbType.Int,18).Direction = ParameterDirection.Output;
comand.ExecuteNonQuery();
}
}
this.DialogResult = DialogResult.OK;
this.Close();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ReemplazarMicro : Form1
{
private String tipoDeBaja;
private String patenteMicro;
private DateTime fechaInicio;
private DateTime fechaFin;
public ReemplazarMicro(String tipoDeBaja,String patente,DateTime fechaInicio,DateTime fechaFin)
{
InitializeComponent();
this.tipoDeBaja = tipoDeBaja;
this.patenteMicro = patente;
this.fechaInicio = fechaInicio;
this.fechaFin = fechaFin;
}
public ReemplazarMicro(String tipoDeBaja, String patente, DateTime fechaInicio)
{
InitializeComponent();
this.tipoDeBaja = tipoDeBaja;
this.patenteMicro = patente;
this.fechaInicio = fechaInicio;
}
private void ReemplazarMicro_Load(object sender, EventArgs e)
{
if (this.NoExisteMicroCoincidente())
{
this.Hide();
(new NoExisteMicro()).ShowDialog();
this.Close();
}
else
{
DataGridViewButtonColumn botonesReemplazar = this.crearBotones("Reemplazar", "Reemplazar");
dataGridView1.Columns.Add(botonesReemplazar);
if (this.tipoDeBaja.Equals("PorModificacion"))
this.MostrarMicrosParaMantenimiento();
else
this.MostrarMicrosDefinitiva();
}
}
private void MostrarMicrosDefinitiva()
{
using (SqlConnection conexion = this.obtenerConexion())
{
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_MicrosDeReemplazo_Def(" +
"'" + this.patenteMicro.ToString() + "'," +
"'" + this.getFechaActual().ToString("yyyyMMdd") + "')";
using (SqlCommand comando = new SqlCommand(query, conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable microsReemplazo = new DataTable();
adapter.Fill(microsReemplazo);
dataGridView1.DataSource = microsReemplazo;
}
}
}
private void MostrarMicrosParaMantenimiento()
{
using (SqlConnection conexion = this.obtenerConexion())
{
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_MicrosDeReemplazo(" +
"'" + this.patenteMicro.ToString() + "'," +
"'" + this.fechaInicio.ToString("yyyyMMdd") + "'," +
"'" + this.fechaFin.ToString("yyyyMMdd") + "')";
using (SqlCommand comando = new SqlCommand(query, conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable microsReemplazo = new DataTable();
adapter.Fill(microsReemplazo);
dataGridView1.DataSource = microsReemplazo;
}
}
}
private bool NoExisteMicroCoincidente()
{
if (this.tipoDeBaja.Equals("PorModificacion"))
return this.NoExisteMicroParaModificacion();
else
return this.noexistemicroparadefinitiva();
}
private bool noexistemicroparadefinitiva()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.HayMicroParaReemplazo_Def", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = this.patenteMicro;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = this.getFechaActual();
comando.Parameters.Add("@hayMicros", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return !Convert.ToBoolean(comando.Parameters["@hayMicros"].Value);
}
}
}
private bool NoExisteMicroParaModificacion()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.HayMicroParaReemplazo", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = this.patenteMicro;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = this.fechaInicio;
comando.Parameters.Add("@FechaFin", SqlDbType.DateTime).Value = this.fechaFin;
comando.Parameters.Add("@hayMicros", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return !Convert.ToBoolean(comando.Parameters["@hayMicros"].Value);
}
}
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
String patenteReemplazo = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString() ;
if (this.tipoDeBaja.Equals("PorModificacion"))
this.ReemplazarPorModificacion(patenteReemplazo);
else
this.ReemplazarDefinitivamente(patenteReemplazo);
this.Close();
}
}
private void ReemplazarDefinitivamente(string patenteReemplazo)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.ReemplazarMicro_Def", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patenteReemplazado", SqlDbType.NVarChar).Value = this.patenteMicro;
comando.Parameters.Add("@patenteReemplazo", SqlDbType.NVarChar).Value = patenteReemplazo;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = this.fechaInicio;
comando.ExecuteNonQuery();
}
}
}
private void ReemplazarPorModificacion(string patenteReemplazo)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.ReemplazarMicro", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patenteReemplazado", SqlDbType.NVarChar).Value = this.patenteMicro;
comando.Parameters.Add("@patenteReemplazo", SqlDbType.NVarChar).Value = patenteReemplazo;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = this.fechaInicio;
comando.Parameters.Add("@FechaFin", SqlDbType.DateTime).Value = this.fechaFin;
comando.ExecuteNonQuery();
}
}
}
private void button1_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Data.SqlClient;
using FrbaBus.Login;
using FrbaBus.Compra_de_Pasajes;//Borrar
using FrbaBus.Abm_Micro;// Borrar
namespace FrbaBus
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Pantalla_Inicial());
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Ciudades
{
public partial class ModifCiudad : Form
{
String nombreCiudad;
public ModifCiudad()
{
InitializeComponent();
}
public ModifCiudad(String nombreCiudadAModificar)
{
InitializeComponent();
textBox1.Text = nombreCiudadAModificar;
textBox1.Enabled = false;
}
private void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;"))
{
try
{
conexion.Open();
nombreCiudad = textBox1.Text;
String nuevoNombreCiudad = textBox2.Text;
// TODO usar funciones con parametros
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT COUNT(*) FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD Ciudad WHERE Ciudad.NombreCiudad = '" + nombreCiudad + "'", conexion);
int cantidadDeFilas = (int)cmd.ExecuteScalar();
if (cantidadDeFilas == 0)
{
(new Dialogo("No existe la ciudad", "Aceptar")).ShowDialog();
this.Close();
}
else
{
cmd.CommandText = "USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD SET NombreCiudad = '" + nuevoNombreCiudad + "' WHERE NombreCiudad = '" + nombreCiudad + "'";
int filasAfectadas = cmd.ExecuteNonQuery();
(new Dialogo(nombreCiudad + " modificada \n por: " + nuevoNombreCiudad + "\n" + filasAfectadas + " filas afectadas", "Aceptar")).ShowDialog();
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("A la mierda con todo; " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Micro
{
public partial class ABMMicroInicio : Form1
{
public ABMMicroInicio()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
(new AltaMicro()).ShowDialog();
this.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
(new BajaMicro()).ShowDialog();
this.Show();
}
private void button4_Click(object sender, EventArgs e)
{
this.Hide();
(new ListadoMicro()).ShowDialog();
this.Show();
}
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
(new ModifMicro()).ShowDialog();
this.Show();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Abm_Micro
{
public partial class BajaMicro : Form1
{
public BajaMicro()
{
InitializeComponent();
}
private void buttonBajaDefinitiva_Click(object sender, EventArgs e)
{
this.Hide();
(new BajaDefinitiva()).ShowDialog();
this.Show();
}
private void buttonBajaMantenimiento_Click(object sender, EventArgs e)
{
this.Hide();
(new BajaFueraDeServicio()).ShowDialog();
this.Show();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Cancelar_Viaje
{
public partial class CancelarPasajeEncomienda : Form1
{
DateTime fechaSalida;
public CancelarPasajeEncomienda()
{
InitializeComponent();
textBoxFecha.Text = "No seleccionado";
fechaSalida = DateTime.MinValue;
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
using (SqlCommand cmdParaLlenarComboBox = new SqlCommand("USE GD1C2013 SELECT NombreCiudad FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Ciudades () ORDER BY RN", conexion))
{
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
DataTable ciudadesOrigen = new DataTable();
adapter.Fill(ciudadesOrigen);
comboOrigen.DisplayMember = "NombreCiudad";
comboOrigen.DataSource = ciudadesOrigen;
DataTable ciudadesDestino = new DataTable();
adapter.Fill(ciudadesDestino);
comboDestino.DisplayMember = "NombreCiudad";
comboDestino.DataSource = ciudadesDestino;
}
}
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
comboOrigen.SelectedIndex = 0;
comboDestino.SelectedIndex = 0;
textBoxFecha.Text = "No seleccionado";
fechaSalida = DateTime.MinValue;
comboVouchers.SelectedIndex = 0;
comboVouchers.Enabled = false;
buttonSeleccionar.Enabled = false;
}
public void validarParametros()
{
Boolean hayError = false;
String errorMensaje = "";
if (comboOrigen.Text.Equals(comboDestino.Text) && !comboDestino.Text.Equals("No seleccionado"))
{
hayError = true;
errorMensaje += "Origen y destino son la misma ciudad;";
}
if (comboDestino.SelectedIndex == 0 ||
comboOrigen.SelectedIndex == 0 ||
textBoxFecha.Text.Equals("No seleccionado"))
{
hayError = true;
errorMensaje += "Debe especificar todos los parametros de busqueda;";
}
if (fechaSalida < this.getFechaActual() && fechaSalida != DateTime.MinValue)
{
hayError = true;
errorMensaje += "La fecha debe ser mayor al día de hoy;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMensaje);
}
private void buttonBuscar_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
String fechaFormateada = fechaSalida.Date.ToString("yyyyMMdd");
String query = "USE GD1C2013 SELECT NumeroVoucher FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Voucher ('" +
comboOrigen.Text + "','" +
comboDestino.Text + "','" +
fechaFormateada + "') ORDER BY RN";
using (SqlConnection conexion = this.obtenerConexion())
{
conexion.Open();
using (SqlCommand cmdParaLlenarComboBox = new SqlCommand(query, conexion))
{
SqlDataAdapter adapter = new SqlDataAdapter(cmdParaLlenarComboBox);
// Llenar los combo box 'origen' y 'destino'
DataTable vouchers = new DataTable();
adapter.Fill(vouchers);
comboVouchers.DisplayMember = "NumeroVoucher";
comboVouchers.DataSource = vouchers;
}
}
comboVouchers.Enabled = true;
buttonSeleccionar.Enabled = true;
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void buttonFecha_Click(object sender, EventArgs e)
{
this.Hide();
try
{
(new CalendarioCompra()).ShowDialog();
}
catch (FechaElegidaExeption ex)
{
textBoxFecha.Text = ex.Message;
fechaSalida = Convert.ToDateTime(ex.Message);
}
finally
{
this.Show();
this.Focus();
}
}
private void comboVouchers_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboVouchers.Text.Equals("-1"))
{
comboVouchers.Text = "No seleccionado";
}
}
private void buttonSeleccionar_Click(object sender, EventArgs e)
{
if (comboVouchers.SelectedIndex == 0)
{
this.Hide();
(new Dialogo("No se selecciono ningún voucher", "Aceptar")).ShowDialog();
this.Show();
}
else
{
System.Data.DataRowView fila = (System.Data.DataRowView)comboVouchers.SelectedItem;
this.Hide();
(new EspecificarCancelacion(Convert.ToInt32(fila["NumeroVoucher"]))).ShowDialog();
this.Close();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Registrar_LLegada_Micro
{
public partial class Registrar_LLegada : Form1
{
public Registrar_LLegada(string codigoViaje)
{
InitializeComponent();
label7.Text = codigoViaje;
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT FechaLlegadaEstimada FROM LOS_VIAJEROS_DEL_ANONIMATO.VIAJE where CodigoViaje='" + codigoViaje + "'", conexion);
DateTime FechaLLegadaEstimada = (DateTime)cmd.ExecuteScalar();
textBox1.Text = FechaLLegadaEstimada.ToString();
textBox1.Enabled = false;
textBox2.Enabled = false;
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
//boton calcular
private void button2_Click(object sender, EventArgs e)
{
double horas = Convert.ToDouble(numericUpDown1.Value.ToString());
double minutos = Convert.ToDouble(numericUpDown2.Value.ToString());
string codigoViaje = label7.Text;
DateTime fechaLLegadaEstimada = Convert.ToDateTime(textBox1.Text);
DateTime fechaExacta = fechaLLegadaEstimada.AddHours(horas).AddMinutes(minutos);
textBox2.Text = fechaExacta.ToString();
}
//boton volver a calcular
private void button3_Click(object sender, EventArgs e)
{
textBox2.Text = "";
numericUpDown1.Value = 0;
numericUpDown2.Value = 0;
}
//boton registrar
private void button1_Click(object sender, EventArgs e)
{
string codigoViaje = label7.Text;
DateTime fechaExacta = Convert.ToDateTime(textBox2.Text);
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SPRegistrarLLegada", conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@CodigoViaje", SqlDbType.NVarChar).Value = codigoViaje;
cmd.Parameters.Add("@FechaExacta", SqlDbType.DateTime).Value = fechaExacta;
cmd.ExecuteNonQuery();
(new Dialogo("Fecha de llegada " + fechaExacta.ToString() + " regitrada para el viaje " + codigoViaje, "Aceptar")).ShowDialog();
}
/*
using (SqlConnection conexion = this.obtenerConexion())
{
try
{
conexion.Open();
SqlCommand cmd = new SqlCommand("declare @fechaExacta datetime="+fechaExacta+" USE GD1C2013 UPDATE LOS_VIAJEROS_DEL_ANONIMATO.VIAJE SET FechaLlegada=@fechaExacta WHERE CodigoViaje='" + codigoViaje + "'", conexion);
(new Dialogo("Fecha de llegada "+fechaExacta.ToString()+" regitrada para el viaje "+codigoViaje, "Aceptar")).ShowDialog();
}
catch (Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("ERROR - " + ex.Message, "Aceptar")).ShowDialog();
}
}
*/
}
}
}
}<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FrbaBus;
using FrbaBus.Abm_Rol;
namespace FrbaBus.Abm_Recorrido
{
public partial class ABM_Recorrido : Form1
{
public ABM_Recorrido()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
( new AltaRecorrido() ).ShowDialog();
this.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
( new BajaRecorrido() ).ShowDialog();
this.Show();
}
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
(new ModifRecorrido()).ShowDialog();
this.Show();
}
private void button4_Click(object sender, EventArgs e)
{
this.Hide();
(new ListadoRol()).ShowDialog();
this.Show();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ModifMicro : Form1
{
public ModifMicro()
{
InitializeComponent();
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Patentes() ORDER BY RN ASC", conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable patentes = new DataTable();
adapter.Fill(patentes);
comboBox1.DisplayMember = "Patente";
comboBox1.DataSource = patentes;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
(new ModifMarca(comboBox1.Text)).Show();
}
private void button2_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_TieneViajesProgramados_Def", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = comboBox1.Text;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = getFechaActual();
comando.Parameters.Add("@tieneViajes", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
Boolean tieneViajes = Convert.ToBoolean(comando.Parameters["@tieneViajes"].Value);
if (tieneViajes)
{
this.Hide();
(new Dialogo("El micro tiene viajes programados;No se puede modificar butacas/kgs", "Aceptar")).ShowDialog();
}
else
{
(new ModifButacas(comboBox1.Text)).Show();
}
}
}
}
private void button3_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
string patente = comboBox1.Text;
conexion.Open();
DataTable tabla = new DataTable();
cargarATablaParaDataGripView("USE GD1C2013 select Patente, ma.Marca, KG_Disponibles, Cantidad_Butacas from los_viajeros_del_anonimato.MICRO mi join LOS_VIAJEROS_DEL_ANONIMATO.MARCA ma on (mi.Marca = ma.Id_Marca) WHERE Patente = '" + patente + "'", ref tabla, conexion);
dataGridView1.DataSource = tabla;
dataGridView1.Columns[0].ReadOnly = true;
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Ciudades
{
public partial class AltaCiudad : Form
{
String nombreCiudad;
public AltaCiudad()
{
InitializeComponent();
}
protected virtual void button1_Click(object sender, EventArgs e)
{
using (SqlConnection conexion = new SqlConnection("Server=localhost\\SQLSERVER2008;Database=GD1C2013;User Id=gd;Password=<PASSWORD>;"))
{
try
{
conexion.Open();
nombreCiudad = textBox1.Text;
// TODO usar funciones con parametros
SqlCommand cmd = new SqlCommand("USE GD1C2013 SELECT COUNT(*) FROM LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD Ciudad WHERE Ciudad.NombreCiudad = '" + nombreCiudad + "'", conexion);
int cantidadDeFilas = (int) cmd.ExecuteScalar();
if (cantidadDeFilas != 0)
{
(new Dialogo("Ya existe la ciudad", "Aceptar")).ShowDialog();
this.Close();
}
else
{
cmd.CommandText = "USE GD1C2013 INSERT INTO LOS_VIAJEROS_DEL_ANONIMATO.CIUDAD VALUES ('" + nombreCiudad + "')";
int filasAfectadas = cmd.ExecuteNonQuery();
(new Dialogo(nombreCiudad + " agregado: \n" + filasAfectadas + " filas afectadas", "Aceptar")).ShowDialog();
}
}
catch(Exception ex)
{
Console.Write(ex.Message);
(new Dialogo("A la mierda con todo; " + ex.Message, "Aceptar")).ShowDialog();
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class DialogoEspecificarTutor : Form1
{
private int numeroVoucher;
private int codigoViaje;
private int DNI_Tutoreado;
public DialogoEspecificarTutor(int numeroVoucher,int codigoViaje,int DNI_Atutorado)
{
InitializeComponent();
this.numeroVoucher = numeroVoucher;
this.codigoViaje = codigoViaje;
this.DNI_Tutoreado = DNI_Atutorado;
DataGridViewButtonColumn botonesTutor = this.crearBotones("Elegir tutor", "Elegir");
dataGVExistentes.Columns.Add(botonesTutor);
dataGVExistentes.Columns[0].Visible = false;
}
private void buttonManual_Click(object sender, EventArgs e)
{
this.Hide();
dataGVExistentes.DataSource = null;
dataGVExistentes.Columns[0].Visible = false;
AgregarPasaje addPasaje = new AgregarPasaje(this.codigoViaje, this.numeroVoucher, "Por tutor");
addPasaje.ShowDialog();
this.Close();
}
private void buttonExistente_Click(object sender, EventArgs e)
{
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_ObtenerPasajesDeUnaCompra( " + this.numeroVoucher.ToString() + " , 'SINTUTOR' , " + this.DNI_Tutoreado.ToString() + ")";
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand(query, conexion))
{
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable tablaPasajes = new DataTable();
adapter.Fill(tablaPasajes);
dataGVExistentes.DataSource = tablaPasajes;
dataGVExistentes.Columns[0].Visible = true;
}
}
}
private void dataGVExistentes_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
try
{
if (dataGVExistentes.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex != -1)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comand = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.EstablecerTutor", conexion))
{
conexion.Open();
comand.CommandType = CommandType.StoredProcedure;
comand.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.numeroVoucher;
comand.Parameters.Add("@DNI_Tutor", SqlDbType.Int).Value = Convert.ToInt32(dataGVExistentes.Rows[e.RowIndex].Cells["DNI"].Value);
comand.ExecuteNonQuery();
}
}
this.Close();
}
}
catch (SqlException ex)
{
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
}
}
private int obtenerCodigoButaca(int numero, int codViaje)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerCodigoButaca", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@numeroButaca", SqlDbType.Int).Value = numero;
comando.Parameters.Add("@codigoButaca", SqlDbType.Int).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return Convert.ToInt32(comando.Parameters["@codigoButaca"].Value);
}
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Collections;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class EspecificarCompra : Form1
{
private int codigoViaje;
private ArrayList PASAJEROS_ARRAY = new ArrayList();
private ArrayList PASAJES_ARRAY = new ArrayList();
private int NroVoucher;
public EspecificarCompra(int codigoViaje)
{
InitializeComponent();
this.codigoViaje = codigoViaje;
this.NroVoucher = this.GenerarCompra();
}
private int GenerarCompra()
{
int NumeroVoucher = -1;
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.GenerarCompra",conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
Console.Out.WriteLine("EL VIAJE ES : " + this.codigoViaje);
comando.Parameters.Add("@codigoViaje",SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@nroVoucher", SqlDbType.Int).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
NumeroVoucher = Convert.ToInt32(comando.Parameters["@nroVoucher"].Value);
return NumeroVoucher;
}
}
}
// PASAJE
// Calcular el monto del pasaje agregado
private decimal obtenerMonto()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerMontoPasaje", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@monto", SqlDbType.Float).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return Convert.ToDecimal(comando.Parameters["@monto"].Value);
}
}
}
private void buttonAddPasaje_Click(object sender, EventArgs e)
{
this.Hide();
AgregarPasaje addPasaje = new AgregarPasaje(this.codigoViaje,this.NroVoucher,"Todos");
addPasaje.ShowDialog();
this.ActualizarGridPasajes();
this.Show();
}
private void ActualizarGridPasajes()
{
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_ObtenerPasajesDeUnaCompra( " + this.NroVoucher.ToString() + " , 'TODO' , 0 )";
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand(query, conexion))
{
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable tablaPasajes = new DataTable();
adapter.Fill(tablaPasajes);
dataGVPasajes.DataSource = tablaPasajes;
}
}
}
// Eliminar pasaje.
private void button3_Click(object sender, EventArgs e)
{
DataGridViewSelectedRowCollection filasEliminadas = dataGVPasajes.SelectedRows;
foreach (DataGridViewRow filaEliminada in filasEliminadas)
{
//Estoy eliminando un tutor o un atutorado
if (Convert.ToInt32(filaEliminada.Cells[6].Value) == 0)
this.EliminarAtutorado_Tutor(filaEliminada);
this.eliminarPasaje(filaEliminada);
}
this.ActualizarGridPasajes();
}
private void EliminarAtutorado_Tutor(DataGridViewRow filaEliminada)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_EliminarTutorOAtutorado", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.NroVoucher;
comando.Parameters.Add("@DNI_Atutorado_Tutor", SqlDbType.Int).Value = filaEliminada.Cells[0].Value;
try
{
comando.ExecuteNonQuery();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
private void eliminarPasaje(DataGridViewRow filaEliminada)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using(SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_EliminarPasajeSinCancelar",conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@codigoViaje",SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@numeroVoucher",SqlDbType.Int).Value = this.NroVoucher;
comando.Parameters.Add("@DNI_pasajero", SqlDbType.Int).Value = filaEliminada.Cells[0].Value;
comando.Parameters.Add("@numeroButaca",SqlDbType.Int).Value = filaEliminada.Cells[3].Value;
comando.Parameters.Add("@piso",SqlDbType.Int).Value = filaEliminada.Cells[4].Value;
comando.Parameters.Add("@ubicacion",SqlDbType.NVarChar).Value = filaEliminada.Cells[5].Value;
try
{
comando.ExecuteNonQuery();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
// ENCOMIENDA
// Calcular monto del paquete agregado
private decimal obtenerMontoEncomienda(decimal kilos)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_ObtenerMontoEncomienda", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@codigoViaje", SqlDbType.Int).Value = this.codigoViaje;
comando.Parameters.Add("@monto", SqlDbType.Float).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
return Convert.ToDecimal(comando.Parameters["@monto"].Value) * kilos;
}
}
}
private void buttonAddEncomienda_Click(object sender, EventArgs e)
{
this.Hide();
AgregarEncomienda addEncomienda = new AgregarEncomienda(this.codigoViaje, this.NroVoucher);
addEncomienda.ShowDialog();
this.actualizarGridEncomiendas();
this.Show();
}
private void actualizarGridEncomiendas()
{
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_ObtenerEncomiendasDeUnaCompra( " + this.NroVoucher.ToString() + " )";
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand(query, conexion))
{
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable tablaEncomiendas = new DataTable();
adapter.Fill(tablaEncomiendas);
dataGVEncomienda.DataSource = tablaEncomiendas;
}
}
dataGVEncomienda.Columns[5].Visible = false;
}
private void buttonRemEncomienda_Click(object sender, EventArgs e)
{
DataGridViewSelectedRowCollection filasEliminadas = dataGVEncomienda.SelectedRows;
foreach (DataGridViewRow filaEliminada in filasEliminadas)
this.eliminarEncomienda(filaEliminada);
this.actualizarGridEncomiendas();
}
private void eliminarEncomienda(DataGridViewRow filaEliminada)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using(SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_EliminarEncomiendaSinCancelar",conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numeroVoucher",SqlDbType.Int).Value = this.NroVoucher;
comando.Parameters.Add("@kilosPaquete", SqlDbType.Decimal).Value = filaEliminada.Cells[3].Value;
comando.Parameters.Add("@codigoEncomienda", SqlDbType.Int).Value = filaEliminada.Cells[5].Value;
try
{
comando.ExecuteNonQuery();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
// DEL FORMULARIO
//Cancelar
private void button5_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.cancelarCompra();
this.Close();
}
private void EspecificarCompra_FormClosing(Object sender, FormClosingEventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.cancelarCompra();
this.Close();
}
private void cancelarCompra()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_CancelarCompraSinDevolver", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.NroVoucher;
try
{
comando.ExecuteNonQuery();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
private void buttonContinuar_Click(object sender, EventArgs e)
{
this.Hide();
// Especificar quien paga.
EspecificarPago addPago = new EspecificarPago();
DialogResult dr = addPago.ShowDialog();
if (dr == DialogResult.OK)
{
this.EstablecerPago(addPago);
(new Comprobante(this.NroVoucher)).ShowDialog();
this.Close();
}
else
this.Show();
}
private void EstablecerPago(EspecificarPago pago)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_EstablecerPago", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.NroVoucher;
comando.Parameters.Add("@DNI_Pago",SqlDbType.Int).Value = pago.DNI_Abonante;
comando.Parameters.Add("@TipoPago",SqlDbType.NVarChar).Value = pago.tipoPago;
comando.Parameters.Add("@NumeroTarjetaPago",SqlDbType.Int).Value = pago.numeroTarjeta;
comando.Parameters.Add("@ClaveTarjetaPago",SqlDbType.NVarChar).Value = pago.claveTarjeta;
comando.Parameters.Add("@CompaniaTarjetaPago",SqlDbType.NVarChar).Value = pago.companiaTarjeta;
try
{
comando.ExecuteNonQuery();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
}
}
private void EspecificarCompra_Load(object sender, EventArgs e)
{
this.ControlBox = false;
}
private void groupBox3_Enter(object sender, EventArgs e)
{
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Cancelar_Viaje
{
public partial class EspecificarCancelacion : Form1
{
public int nroVoucher;
public int codigoDevolucion;
public EspecificarCancelacion(int voucher)
{
InitializeComponent();
this.nroVoucher = voucher;
}
private void EspecificarCancelacion_Load(object sender, EventArgs e)
{
this.codigoDevolucion = this.generarDevolucion();
textMotivo.MaxLength = 255;
listListadoCodigos.DisplayMember = "CodigoCompra";
String QueryPasajes = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_PasajesDeVoucher(" + this.nroVoucher.ToString() + ")";
String QueryEncomiendas = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_EncomiendasDeVoucher(" + this.nroVoucher.ToString() + ")";
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand())
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
cmd.Connection = conexion;
cmd.CommandText = QueryPasajes;
DataTable pasajesDeVoucher = new DataTable();
adapter.Fill(pasajesDeVoucher);
comboCodPasaje.DisplayMember = "CodigoCompra";
comboCodPasaje.DataSource = pasajesDeVoucher;
cmd.CommandText = QueryEncomiendas;
DataTable encomiendasDeVoucher = new DataTable();
adapter.Fill(encomiendasDeVoucher);
comboCodEncomienda.DisplayMember = "CodigoCompra";
comboCodEncomienda.DataSource = encomiendasDeVoucher;
}
}
}
private int generarDevolucion()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.GenerarDevolucion",conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@codigoDev", SqlDbType.Int).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
return Convert.ToInt32(cmd.Parameters["@codigoDev"].Value);
}
}
}
private void comboCodEncomienda_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboCodEncomienda.Text.Equals("-1"))
{
comboCodEncomienda.Text = "No seleccionado";
}
}
private void comboCodPasaje_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboCodPasaje.Text.Equals("-1"))
{
comboCodPasaje.Text = "No seleccionado";
}
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void buttonAddEncomienda_Click(object sender, EventArgs e)
{
if (comboCodEncomienda.SelectedIndex != 0)
{
if (!listListadoCodigos.Items.Contains(comboCodEncomienda.SelectedItem))
listListadoCodigos.Items.Add(comboCodEncomienda.SelectedItem);
}
}
private void buttonAddPasaje_Click(object sender, EventArgs e)
{
if (comboCodPasaje.SelectedIndex != 0)
{
if (!listListadoCodigos.Items.Contains(comboCodPasaje.SelectedItem))
listListadoCodigos.Items.Add(comboCodPasaje.SelectedItem);
}
}
private void buttonDelEncomienda_Click(object sender, EventArgs e)
{
listListadoCodigos.Items.RemoveAt(listListadoCodigos.SelectedIndex);
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
listListadoCodigos.Items.Clear();
textMotivo.Text = "";
comboCodEncomienda.SelectedIndex = 0;
comboCodPasaje.SelectedIndex = 0;
}
public void validarParametros()
{
Boolean hayError = false;
String errorMessage = "";
if (textMotivo.Text == "")
{
hayError = true;
errorMessage += "Debe especificar un motivo;";
}
if (listListadoCodigos.Items.Count == 0)
{
hayError = true;
errorMessage += "No se especificó ningun pasaje/encomienda;";
}
if (hayError)
throw new ParametrosIncorrectosException(errorMessage);
}
private void buttonContinuar_Click(object sender, EventArgs e)
{
try
{
this.validarParametros();
foreach (System.Data.DataRowView valor in listListadoCodigos.Items)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand cmd = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.Insertar_Devolucion",conexion))
{
conexion.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@motivo", SqlDbType.NVarChar).Value = textMotivo.Text;
cmd.Parameters.Add("@codigoCompra", SqlDbType.Int).Value = valor["CodigoCompra"];
cmd.Parameters.Add("@numeroVoucher", SqlDbType.Int).Value = this.nroVoucher;
cmd.Parameters.Add("@codigoDev", SqlDbType.Int).Value = this.codigoDevolucion;
cmd.ExecuteNonQuery();
}
}
}
this.Close();
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message,"Aceptar")).ShowDialog();
this.Show();
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class ListadoMicro : Form1
{
private int bodegaKGDesde;
private int bodegaKGHasta;
private DateTime fechaDesde;
private DateTime fechaHasta;
public ListadoMicro()
{
InitializeComponent();
}
private void buttonCancelar_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void buttonLimpiar_Click(object sender, EventArgs e)
{
textPatente.Text = "";
comboMarca.SelectedIndex = 0;
textModelo.Text = "";
comboServicio.SelectedIndex = 0;
numericCantBut.Value = 0;
dataGridView1.DataSource = null;
}
private void buttonFinal_Click(object sender, EventArgs e)
{
try
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
String fechaStDesde = this.fechaDesde.ToString("yyyyMMdd");
String fechaStHasta = this.fechaHasta.ToString("yyyyMMdd");
if (this.fechaDesde == DateTime.MinValue)
fechaStDesde = "20120101";
if (this.fechaHasta == DateTime.MinValue)
fechaStHasta = "20120101";
String patente = textPatente.Text;
if (textPatente.Text.Equals(""))
patente = "Ninguna";
String marca = comboMarca.Text;
if (comboMarca.SelectedIndex == 0)
marca = "Ninguna";
String modelo = textModelo.Text;
if (textModelo.Text.Equals(""))
modelo = "Ninguna";
String servicio = comboServicio.Text;
if (comboServicio.SelectedIndex == 0)
servicio = "Ninguna";
String query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.AplicarFiltrosMicro(" +
"'" + patente + "'," +
"'" + marca + "'," +
"'" + modelo + "'," +
"'" + servicio + "'," +
"'" + numericCantBut.Value.ToString() + "'," +
"'" + fechaStDesde + "'," +
"'" + fechaStHasta + "'," +
this.bodegaKGDesde.ToString() + "," +
this.bodegaKGHasta.ToString() + ")";
comando.Connection = conexion;
comando.CommandText = query;
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable filtrados = new DataTable();
adapter.Fill(filtrados);
dataGridView1.DataSource = filtrados;
}
}
}
catch (ParametrosIncorrectosException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
catch (SqlException ex)
{
this.Hide();
(new Dialogo(ex.Message, "Aceptar")).ShowDialog();
this.Show();
}
}
private void ListadoMicro_Load(object sender, EventArgs e)
{
String query = "";
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand())
{
conexion.Open();
comando.Connection = conexion;
SqlDataAdapter adapter = new SqlDataAdapter(comando);
// Llenar combo marca
query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Marcas() ORDER BY RN ASC";
comando.CommandText = query;
DataTable marcas = new DataTable();
adapter.Fill(marcas);
comboMarca.DisplayMember = "Marca";
comboMarca.DataSource = marcas;
// Llenar combo servicios
query = "SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Servicios () ORDER BY RN ASC";
comando.CommandText = query;
DataTable servicios = new DataTable();
adapter.Fill(servicios);
comboServicio.DisplayMember = "NombreServicio";
comboServicio.DataSource = servicios;
}
}
}
private void buttonMasF_Click(object sender, EventArgs e)
{
this.Hide();
ListadoMicro2 otrosFiltros = new ListadoMicro2();
otrosFiltros.ShowDialog();
this.fechaDesde = otrosFiltros.fechaDesde;
this.fechaHasta = otrosFiltros.fechaHasta;
this.bodegaKGDesde = otrosFiltros.KGDesde;
this.bodegaKGHasta = otrosFiltros.KGHasta;
this.Show();
}
}
}
<file_sep>Create PROCEDURE LOS_VIAJEROS_DEL_ANONIMATO.SPMicroOcupadoEnFecha
( @PatenteMicro nvarchar(255), @Fecha datetime, @retorno int output )
AS
BEGIN
IF (EXISTS (select * from LOS_VIAJEROS_DEL_ANONIMATO.PeridoFueraDeServicio
WHERE Patente=@PatenteMicro AND
((@fecha BETWEEN FechaInicio AND FechaFin) OR
(@fecha+1 BETWEEN FechaInicio AND FechaFin))))
begin
SET @retorno = 2; -- Micro no disponible por fuera de servicio
end
ELSE
begin
IF EXISTS(SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.VIAJE v
WHERE (
v.PatenteMicro = @PatenteMicro AND
FechaSalida > (@fecha-1) AND
FechaSalida < @fecha+1
) )
begin
SET @retorno = 1; -- Ya tiene viaje asignado
end
ELSE
begin
SET @retorno = 0; -- Micro libre
end
end
END;
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FrbaBus.Compra_de_Pasajes
{
public partial class DialogoInsertarTutor : Form1
{
private int numeroVoucher;
private int codigoViaje;
private int DNI_Atutorado;
public DialogoInsertarTutor(int numeroVoucher,int codigoViaje,int DNI)
{
InitializeComponent();
this.numeroVoucher = numeroVoucher;
this.codigoViaje = codigoViaje;
this.DNI_Atutorado = DNI;
}
private void buttonNo_Click(object sender, EventArgs e)
{
this.Close();
}
private void buttonSi_Click(object sender, EventArgs e)
{
DialogoEspecificarTutor dialogoTutor = new DialogoEspecificarTutor(this.numeroVoucher,this.codigoViaje,this.DNI_Atutorado);
dialogoTutor.ShowDialog();
this.Close();
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace FrbaBus.Abm_Micro
{
public partial class BajaDefinitiva : Form1
{
public BajaDefinitiva()
{
InitializeComponent();
}
private void BajaDefinitiva_Load(object sender, EventArgs e)
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("SELECT * FROM LOS_VIAJEROS_DEL_ANONIMATO.F_Patentes() ORDER BY RN ASC", conexion))
{
conexion.Open();
SqlDataAdapter adapter = new SqlDataAdapter(comando);
DataTable patentes = new DataTable();
adapter.Fill(patentes);
comboPatentes.DisplayMember = "Patente";
comboPatentes.DataSource = patentes;
}
}
}
private void buttonAceptar_Click(object sender, EventArgs e)
{
if (comboPatentes.SelectedIndex == 0)
{
this.Hide();
(new Dialogo("No se seleccionó ningún micro", "Aceptar")).ShowDialog();
this.Show();
}
else
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_DarDeBajaDefinitivamente", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = comboPatentes.Text;
comando.Parameters.Add("@Fecha", SqlDbType.DateTime).Value = this.getFechaActual();
comando.ExecuteNonQuery();
this.comprobarViajes();
this.Close();
}
}
}
}
private void comprobarViajes()
{
using (SqlConnection conexion = this.obtenerConexion())
{
using (SqlCommand comando = new SqlCommand("LOS_VIAJEROS_DEL_ANONIMATO.SP_TieneViajesProgramados_Def", conexion))
{
conexion.Open();
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add("@patente", SqlDbType.NVarChar).Value = comboPatentes.Text;
comando.Parameters.Add("@FechaInicio", SqlDbType.DateTime).Value = this.getFechaActual();
comando.Parameters.Add("@tieneViajes", SqlDbType.Bit).Direction = ParameterDirection.Output;
comando.ExecuteNonQuery();
Boolean tieneViajes = Convert.ToBoolean(comando.Parameters["@tieneViajes"].Value);
if (tieneViajes)
{
this.Hide();
(new DialogoMicroFSTieneViajes("Definitivamente", comboPatentes.Text,this.getFechaActual())).ShowDialog();
}
this.Close();
}
}
}
}
}
|
6cc7b01e51333747c7f50331b3f883d0c9409c61
|
[
"Markdown",
"C#",
"SQL"
] | 63
|
C#
|
FedericoGarou/TP_GESTION_1C2013
|
2b6e6e0135d37e85e688de094729bad12c573e62
|
2922d360382b6dcecb27c63f25f9c53d648d9ef6
|
refs/heads/8.0
|
<file_sep># -*- coding: utf-8 -*-
##############################################################################
#
# Author: <NAME>
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields, api
class CrmLead(models.Model):
"""Add third field in lead address"""
_inherit = "crm.lead"
street3 = fields.Char('Street 3')
@api.model
def _lead_create_contact(self, lead, name, is_company, parent_id=False):
return (super(CrmLead, self.with_context(default_street3=lead.street3))
._lead_create_contact(lead, name, is_company, parent_id))
@api.multi
def on_change_partner_id(self, partner_id):
res = super(CrmLead, self).on_change_partner_id(partner_id)
if partner_id:
partner = self.env['res.partner'].browse(partner_id)
res['value'].update({'street3': partner.street3})
return res
|
4c10b98b7e518a5c9f8f14787a68f26cc9a53a97
|
[
"Python"
] | 1
|
Python
|
Antiun/crm
|
d3056d89914fff6a0bb7d9b173ee7cdd4e7f67b6
|
2dac7a45b36746c8f71d93cfb8176d479414a683
|
refs/heads/master
|
<file_sep>Tarea-Programada-4
==================
Repositorio para adjuntar los archivos de la Tarea Programada 4
<file_sep>#!/usr/bin/env python
# -*- coding: utf-8 -*-
## Tarea Programada 4- Lenguajes de Programación - I Semestre 2014
## Estudiantes: - <NAME>
## - <NAME>
## - <NAME>
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
# ---------> Archivo para el manejo de la aplicación Web <---------
## Se importan las librerías necesarias de Flask
from flask import Flask, redirect, url_for, request, render_template
app = Flask(__name__) # Instancia de la aplicacion
#______________________________________________________________________________________#
#Funcion que crea el archivo donde se almacena la informacion de los apartamentos
class Crear():
def __init__(self):
self.datos = []
def Apartas(self):
archivo = open('Apartas.txt','w')
archivo.close()
def Favoritos(self):
archivo = open('Favoritos.txt','w')
archivo.close()
#______________________________________________________________________________________#
#Funcion que se encarga de escribir en un archivo los datos del apartamento que agrega el usuario
class Escribir():
def __init__(self):
self.datos = []
def EscrituraApartas(self, titulo, descripcion, facilidades, caracteristicas, ubicacion, precio, contacto):
self.Titulo = titulo
self.Descripcion = descripcion
self.Facilidades = facilidades
self.Caracteristicas = caracteristicas
self.Ubicacion = ubicacion
self.Precio = precio
self.Contacto = contacto
Apartas = open('Apartas.txt','a')
Apartas.write(titulo.lower() + "," + descripcion.lower() + "," + [facilidades.lower()] + ","+ [caracteristicas.lower()] + "," + ubicacion.lower() + "," + precio + "," + contacto.lower() )
Apartas.write("\n")
print("\n")
Apartas.close()
def EscrituraFavoritos(self, titulo, descripcion, ubicacion, precio, contacto):
self.Titulo = titulo
self.Descripcion = descripcion
self.Ubicacion = ubicacion
self.Precio = precio
self.Contacto = contacto
Favoritos = open('Favoritos.txt','a')
Favoritos.write(titulo.lower() + "," + descripcion.lower() + "," + [facilidades.lower()] + ","+ [caracteristicas.lower()] + "," + ubicacion.lower() + "," + precio + "," + contacto.lower() )
Favoritos.write("\n")
Favoritos.close()
#____________________________________________________________________________________________________#
# Funcion que se encarga de leer el archivo donde estan los datos del apartamento ingresado
class Leer():
def __init__(self):
self.datos = []
def LecturaApartas(self):
archivo = open('Apartas.txt','r')
lista = []
consulta = archivo.readlines() # Lista que contiene las consultas del archivo.
for elemento in consulta:
fuerasalto = elemento.strip("\n") # Elimina el salto de linea
enter = fuerasalto
lista = lista + [lista.append([str(enter)])]
archivo.close()
lista = filter(None,lista)
return lista
def LecturaFavoritos(self):
archivo = open('Favoritos.txt','r')
lista=[]
consulta = archivo.readlines() # Lista que contiene todas las consultas del archivo.
for elemento in consulta:
fuera_salto = elemento.strip("\n") # Elimina el salto de consulta
enter = fuera_salto
lista= lista + [lista.append([str(enter)])]
archivo.close()
lista= filter(None,lista)
return lista
#______________________________________________________________________________________#
# *********************************
# ******** Mostrar Paginas ********
# *********************************
# - Funciones para mostrar las paginas desde el Menu
# - Funcion para mostrar la Pagina Principal
@app.route('/')
@app.route('/inicio')
def inicio():
return render_template('ventana.inicio.htm')
# - Funcion para mostrar la pagina de Busqueda de apartamentos
@app.route('/busquedas/apartamentos')
def consulta_apartamentos():
return render_template('consulta.apartamentos.htm')
# - Funcion para mostrar la pagina de publicacion de apartamentos
@app.route('/publicacion/apartamentos')
def publicacion_restaurantes():
crear_Archivo()
return render_template('publicar.apartamentos.htm')
# - Funcion para mostrar la pagina de Información del proyecto
@app.route('/informacion')
def informacion():
return render_template('rest.manager.informacion.htm')
# !!!!!!!!!!!!!!!!!!!
#!!! MANTENIMIENTO !!!
# !!!!!!!!!!!!!!!!!!!
# - Funciones para agregar los restaurantes y platillos a la Base de Conocimiento. Se utiliza el valor de un input invisible para determinar cual solicitud se
# debe realizar.
##############################
######## Apartamentos ########
##############################
## Agregar un aparta nuevo ##
@app.route('/resultado_agregar_apartamento', methods=['POST'])
def agregar_aparta():
titulo_local = 'Apartas'
mensaje_insercion = ''
# Valores que ingresa el usuario:
titulo = request.form['inputTitulo']
descripcion = request.form['inputDescripcion']
facilidades = request.form['inputFacilidades']
caracteristicas = request.form['inputCaracteristicas']
ubicacion = request.form['inputUbicacion']
precio = request.form['inputPrecio']
contacto = request.form['inputContacto']
# Darle a mensaje el valor de 'El aparta fue ingresado con éxito' o 'No se logró agregar el aparta'
try:
## Llamar a la funcion que agrega el aparta en la Base de datos
Escribir.EscrituraApartas(titulo, descripcion, facilidades, caracteristicas, ubicacion, precio, contacto)
except:
mensaje_insercion = 'No se logró agregar el apartamento'
else:
mensaje_insercion = 'El aparta fue ingresado con éxito'
return render_template('resultado_insercion.html', titulo = titulo_local, mensaje = mensaje_insercion)
##############################
######### Favoritos ##########
##############################
## Agregar favorito ##
@app.route('/resultado_agregar_favorito', methods=['POST'])
def agregar_favorito():
titulo_local = 'Favoritos'
mensaje_insercion = ''
# Valores que ingresa el usuario:
titulo = request.form['inputTitulo']
descripcion = request.form['inputDescripcion']
facilidades = request.form['inputFacilidades']
caracteristicas = request.form['inputCaracteristicas']
ubicacion = request.form['inputUbicacion']
precio = request.form['inputPrecio']
contacto = request.form['inputContacto']
# Darle a mensaje el valor de 'El aparta fue ingresado con éxito' o 'No se logró agregar el aparta'
try:
## Llamar a la funcion que agrega el aparta en la Base de datos
Escribir.EscrituraFavorito(titulo, descripcion, facilidades, caracteristicas, ubicacion, precio, contacto)
except:
mensaje_insercion = 'No se logró agregar el apartamento'
else:
mensaje_insercion = 'El aparta fue ingresado con éxito a favoritos'
return render_template('resultado_insercion.html', titulo = titulo_local, mensaje = mensaje_insercion)
# !!!!!!!!!!!!!!!!!!!
#!!!!! CONSULTAS !!!!!!
# !!!!!!!!!!!!!!!!!!!
# - Funciones para devolver el resultado de las diferentes consultas. Se utiliza el valor de un input invisible para determinar cual consulta es la que se
# esta solicitando.
##############################
######## Apartamentos ########
##############################
## Mostrar todos los apartamentos ##
@app.route('/resultado_consulta_todos', methods=['POST'])
def consultar_apartas_todos():
titulo_local = 'Todos los apartamentos'
cont = 0
lista = Leer.LecturaApartas()
largo = len(lista)
Resultado = []
while (cont < largo):
ListaApartas = lista[cont]
ListaApartasMuestra= ListaApartas[0].split(",")
Resultado.append(ListaApartasMuestra[0])
cont = cont + 1
Resultado = list(set(Resultado))
Resultado = filter(None,Resultado)
return render_template('resultado_consulta_apartamentos.html', titulo = titulo_local, apartamentos = Resultado)
## Mostrar los apartas por ubicacion ##
@app.route('/resultado_consulta_ubicacion', methods=['POST'])
def consultar_apartas_ubicacion():
Tipo = 'ubicacion'
consulta = request.form['inputTipo']
titulo_local = 'Apartas por ubicacion: '+consulta
cont=0
lista = Leer.LecturaApartas()
largo= len(lista)
Resultado = []
while (cont < largo):
ListaApartas = lista[cont]
ListaApartasMuestra = ListaAparats[0].split(",")
Ubicacion = ListaApartasMuestra[4]
if(consulta == Ubicacion):
Nombre = ListaApartasMuestra[0]
Resultado.append(Nombre)
cont = cont + 1
Resultado = list(set(Resultado))
if Resultado == []:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='', tipo=Tipo)
else:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='Si hay resultados', apartamentos=Resultado)
## Mostrar los apartas con un determinado precio ##
@app.route('/resultado_consulta_precio', methods=['POST'])
def consultar_restaurantes_nombre():
consulta = request.form['inputPrecio']
tipo = 'precio'
titulo_local = 'Apartamentos por precio: '+consulta
cont=0
lista = Leer.LecturaApartas()
largo= len(lista)
Resultado = []
while (cont < largo):
ListaApartas = lista[cont]
ListaApartasMuestra = ListaApartas[0].split(",")
Precio = ListaApartasMuestra[5]
if(consulta == Precio):
Titulo = ListaApartasMuestra[0]
Descripcion = ListaApartasMuestra[1]
Caracteristicas = ListaApartasMuestra[3]
Ubicacion = ListaApartasMuestra[4]
Contacto = ListaApartasMuestra[5]
Resultado.append(Titulo)
Resultado.append(Descripcion)
Resultado.append(Caracteristicas)
Resultado.append(Ubicacion)
Resultado.append(Contacto)
cont = cont + 1
Resultado = list(set(Resultado))
if Resultado == []:
return render_template('resultado_consulta_precio.html', titulo=titulo_local, nombre='No existen apartamentos con ese precio')
else:
return render_template('resultado_consulta_precio.html', titulo=titulo_local, nombre=consulta, tipo_comida=Tipo_Comida, ubicacion=Ubicacion, telefono=Telefono, horario=Horario)
##############################
######### Facilidades y caracteristicas##########
##############################
## Mostrar los apartamentos que tengan cierta facilidad ##
@app.route('/resultado_consulta_apartas', methods=['POST'])
def consultar_apartas_facilidad():
consulta = request.form['inputFacilidad']
titulo_local = 'Apartamentos por facilidad: '+consulta
Tipo = 'facilidad'
cont=0
lista = Leer.LecturaApartas()
largo= len(lista[2])
Resultado = []
while (cont < largo):
for i in lista[2]:
if(consulta == i):
Titulo = lista[0]
Resultado.append(Titulo)
cont = cont + 1
Resultado = list(set(Resultado))
if Resultado == []:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='', tipo=Tipo)
else:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='Si hay resultados', apartamentos=Resultado)
## Mostrar los apartamentos que tengan cierta caracteristica ##
@app.route('/resultado_consulta_apartas', methods=['POST'])
def consultar_apartas_facilidad():
consulta = request.form['inputCaracteristica']
titulo_local = 'Apartamentos por caracteristica: '+consulta
Tipo = 'caracteristicas'
cont=0
lista = Leer.LecturaApartas()
largo= len(lista[3])
Resultado = []
while (cont < largo):
for i in lista[3]:
if(consulta == i):
Titulo = lista[0]
Resultado.append(Titulo)
cont = cont + 1
Resultado = list(set(Resultado))
if Resultado == []:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='', tipo=Tipo)
else:
return render_template('resultado_consulta_apartamentos.html', titulo=titulo_local, nombre='Si hay resultados', apartamentos=Resultado)
###############################################
# - Se corre el servidor web para la aplicación
###############################################
if __name__ == '__main__':
app.run(debug=True)
|
4ddb081100c0cb474395859973b23c906c7b658e
|
[
"Markdown",
"Python"
] | 2
|
Markdown
|
damocha6/Tarea-Programada-4
|
7a5601a9c0e60054a44fc8900027182039ce2eba
|
f4d2fc7dd77e659d25e4306eae9ffcd73eb8fd00
|
refs/heads/master
|
<repo_name>karanjitsingh/xml-coverage-reporter<file_sep>/XmlCoverageReporter/Program.cs
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using Microsoft.TeamFoundation.TestManagement.WebApi;
using Newtonsoft.Json;
using Palmmedia.ReportGenerator.Core.Parser;
using Palmmedia.ReportGenerator.Core.Parser.Filtering;
namespace XmlCoverageReporter
{
class Program
{
static void Main(string[] args)
{
var files = Directory.GetFiles(args[0], "*.xml", SearchOption.AllDirectories);
var collectionUri = Environment.GetEnvironmentVariable("System.TeamFoundationCollectionUri");
var projectId = Environment.GetEnvironmentVariable("System.TeamProjectId");
int.TryParse(Environment.GetEnvironmentVariable("Build.BuildId"), out int buildId);
var token = Environment.GetEnvironmentVariable("<PASSWORD>_ACCESSTOKEN");
var coverageDir = Path.Combine(args[0], Guid.NewGuid().ToString());
var mergeFile = Path.Combine(coverageDir, Guid.NewGuid().ToString() + ".cjson");
Directory.CreateDirectory(coverageDir);
MergeCoverageFiles(files.ToList(), mergeFile);
Console.WriteLine(mergeFile);
UploadCoverageFile.UploadCodeCoverageAttachmentsToNewStore(buildId, projectId, new List<string>() { mergeFile }, collectionUri, token);
}
private static void MergeCoverageFiles(List<string> coverageFiles, string mergeFile)
{
CoverageReportParser parser = new CoverageReportParser(1, new string[] { }, new DefaultFilter(new string[] { }),
new DefaultFilter(new string[] { }),
new DefaultFilter(new string[] { }));
ReadOnlyCollection<string> collection = new ReadOnlyCollection<string>(coverageFiles);
var parseResult = parser.ParseFiles(collection);
List<FileCoverage> fileCoverages = new List<FileCoverage>();
foreach (var assembly in parseResult.Assemblies)
{
foreach (var @class in assembly.Classes)
{
foreach (var file in @class.Files)
{
FileCoverage resultFileCoverageInfo = new FileCoverage { FilePath = file.Path, LineCoverageStatus = new Dictionary<uint, CoverageStatus>() };
int lineNumber = 0;
foreach (var line in file.lineCoverage)
{
if (line != -1 && lineNumber != 0)
{
resultFileCoverageInfo.LineCoverageStatus.Add((uint)lineNumber, line == 0 ? CoverageStatus.NotCovered : CoverageStatus.Covered);
}
++lineNumber;
}
fileCoverages.Add(resultFileCoverageInfo);
}
}
}
File.WriteAllText(mergeFile, JsonConvert.SerializeObject(fileCoverages));
}
}
struct FileCoverage
{
public string FilePath;
public Dictionary<uint, CoverageStatus> LineCoverageStatus;
}
}
<file_sep>/XmlCoverageReporter/UploadCoverageFile.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Microsoft.TeamFoundation.TestClient.PublishTestResults;
using Microsoft.VisualStudio.Services.WebApi;
namespace XmlCoverageReporter
{
class UploadCoverageFile
{
public static void UploadCodeCoverageAttachmentsToNewStore(int buildId, string projectId, List<string> coverageFiles, string collectionUrl, string token)
{
var connection = new VssConnection(new Uri(collectionUrl), new Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential(token));
TestLogStore logStore = new TestLogStore(connection, new LogTraceListener() );
foreach (var file in coverageFiles)
{
Dictionary<string, string> metaData = new Dictionary<string, string>();
metaData.Add("ModuleName", Path.GetFileName(file));
var attachment = logStore.UploadTestBuildLogAsync(new Guid(projectId), buildId, Microsoft.TeamFoundation.TestManagement.WebApi.TestLogType.Intermediate, file, metaData, null, true, System.Threading.CancellationToken.None).Result;
}
}
}
public class LogTraceListener : TraceListener
{
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
{
switch (eventType)
{
case TraceEventType.Information:
Console.WriteLine(message);
break;
case TraceEventType.Warning:
Console.WriteLine(message);
break;
case TraceEventType.Verbose:
Console.WriteLine(message);
break;
}
}
public override void Write(string message)
{
Console.WriteLine(message);
}
public override void WriteLine(string message)
{
Console.WriteLine(message);
}
}
}
|
bda346e5c294463984259998c35792330e00a1a6
|
[
"C#"
] | 2
|
C#
|
karanjitsingh/xml-coverage-reporter
|
b266a476eba5dd9958aaa54a9e346d7666d3cbf0
|
a40b84480fc288911f89dc7c8ec7ff5b86691669
|
refs/heads/master
|
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Signup_model extends CI_Model {
public function __construct() {
parent::__construct();
}
function new_user($email,$pw,$id_rol)
{
$data = array(
'email' => $email,
'password' => $pw,
'role_id' => $id_rol
);
$this->db->insert('users', $data);
return $this->db->insert_id();
}
public function get_emp($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('employees');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_adm($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('administrators');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_sport($id_sport){
$this->db->where('id_sport',$id_sport);
$query = $this->db->get('sports');
if ($query->num_rows() == 1) {
return $query->row();
}
}
function new_subscription($id_university,$ends,$sports_quantity,$sub_price)
{
$data = array(
'id_university' => $id_university,
'end_date' => $ends,
'sports_quantity' => $sports_quantity,
'price' => $sub_price
);
$this->db->insert('subscriptions', $data);
return $this->db->insert_id();
}
function new_agency($name,$phone,$address,$director,$id_user)
{
$data = array(
'name' => $name,
'phone' => $phone,
'address' => $address,
'director' => $director,
'user_id' => $id_user
);
$this->db->insert('agencies', $data);
return $this->db->insert_id();
}
function new_daycare($name,$phone,$address,$children,$owner)
{
$data = array(
'name' => $name,
'phone' => $phone,
'address' => $address,
'children_quantity' => $children,
'owner' => $owner
);
$this->db->insert('daycares', $data);
return $this->db->insert_id();
}
function new_administrator($id_daycare,$id_user,$type_emp,$director)
{
$data = array(
'daycare_id' => $id_daycare,
'user_id' => $id_user,
'type_employee_id' => $type_emp,
'name' => $director
);
$this->db->insert('employees', $data);
return $this->db->insert_id();
}
function new_employee($id_user,$type_emp,$name,$phone,$address,$birthdate,$gender)
{
$data = array(
'user_id' => $id_user,
'type_employee_id' => $type_emp,
'name' => $name,
'phone' => $phone,
'address' => $address,
'birthdate' => $birthdate,
'gender' => $gender
);
$this->db->insert('employees', $data);
return $this->db->insert_id();
}
}<file_sep><div>
<?=$this->session->userdata('name');?>
</div>
<section class="story-section section section-on-bg">
<div class=" container text-center">
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="panel1 panel-uno">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-university fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge">26</div>
<div>Total Childcare!</div>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
<div class="clearfix"></div>
</div>
</a>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="panel1 panel-dos">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-users fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge">120</div>
<div>Total members!</div>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
<div class="clearfix"></div>
</div>
</a>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="panel1 panel-tres">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-pie-chart fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge">124</div>
<div>New Orders!</div>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
<div class="clearfix"></div>
</div>
</a>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="panel1 panel-cuatro">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-exclamation-triangle fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge">13</div>
<div>Delayed courses!</div>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
<div class="clearfix"></div>
</div>
</a>
</div>
</div>
</div>
<!-- /.row -->
<div class="page-header">
<h1>Progress</h1>
</div>
<label>Progress of institutions</label>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">60% Complete
</div>
</div>
<label>Increase in staff</label>
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%;">40% Increase
</div>
</div>
<label>Courses in progress</label>
<div class="progress">
<div class="progress-bar progress-bar-info progress-bar-striped active" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%;">20% Progress
</div>
</div>
<label>Finished courses</label>
<div class="progress">
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">60% Complete
</div>
</div>
<label>Remaining courses</label>
<div class="progress">
<div class="progress-bar progress-bar-danger progress-bar-striped active" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%;">80% Remaining
</div>
</div>
<br><br>
</div><!--//container-->
</section><!--//story-video--><file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_Controller
{
public function __construct()
{
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
$this->load->model(array('front/Login_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
}
function index()
{
$data['title'] = 'Log In';
$data['active'] = 'login';
//$data['rol'] = $this->session->userdata('jerarquia');
switch ($this->session->userdata('roles')) {
case '':
$data['token'] = $this->token();
$data['title'] = 'Child Care';
//$data['sport'] = $this->Login_model->get_all_sports();
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/login_view', $data);
$this->load->view('front/footer_view', $data);
break;
case 'webadmin':
redirect(base_url().'user-section/home');
break;
case 'agency':
redirect(base_url().'user-section/home');
break;
case 'administrator':
redirect(base_url().'user-section/home');
break;
case 'vendor':
redirect(base_url().'user-section/home');
break;
case 'employee':
redirect(base_url().'user-section/home');
break;
default:
//$data['token'] = $this->token();
//$data['sport'] = $this->Login_model->get_all_sports();
$data['title'] = 'Child Care';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/login_view', $data);
$this->load->view('front/footer_view', $data);
break;
}
}
public function singin()
{
if($this->input->post('token') && $this->input->post('token') == $this->session->userdata('token'))
{
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'required|trim|min_length[5]|max_length[150]|xss_clean|md5');
//
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
//$this->form_validation->set_message('valid_email', 'El %s no es válido');
//lanzamos mensajes de error si es que los hay
/* $this->form_validation->set_message('min_length', 'El campo debe tener al menos 5 caracteres');
$this->form_validation->set_message('max_length', 'El campo no puede tener más de 150 caracteres');
$this->form_validation->set_message('required', 'El campo %s es requerido');*/
if($this->form_validation->run() == FALSE)
{
$this->index();
}else{
$email = $this->input->post('email');
$password = $this->input->post('<PASSWORD>');
$check_user = $this->Login_model->login_user($email,$password);
//$usuario_foto=$this->login_model->get_nombre_foto($username);
$id_rol = $check_user->role_id;
$id_user = $check_user->id_user;
if ($id_rol == 1) {
$row_adm = $this->Login_model->get_adm($id_user);
//$id_school = $row_adm->id_school;
//$row_school = $this->Login_model->get_univ($id_school);
$row_rol = $this->Login_model->get_user_rol($id_rol);
if($check_user == TRUE)
{
$data = array(
'is_logued_in' => TRUE,
'id_user' => $check_user->id_user,
'roles' => $row_rol->description,
'id_rol' => $row_rol->id_role,
'email' => $check_user->email,
'id_school' => $id_school,
'school' => $row_school->name
);
$this->session->set_userdata($data);
$this->index();
}
}elseif ($id_rol == 2) {
$row_age = $this->Login_model->get_age($id_user);
$name = $row_age->name;
$row_rol = $this->Login_model->get_user_rol($id_rol);
if($check_user == TRUE)
{
$data = array(
'is_logued_in' => TRUE,
'id_user' => $check_user->id_user,
'roles' => $row_rol->description,
'id_rol' => $row_rol->id_role,
'id_agency' => $row_age->id_agencies,
'email' => $check_user->email,
'name' => $name
);
$this->session->set_userdata($data);
$this->index();
}
}elseif ($id_rol == 3) {
$row_adm = $this->Login_model->get_adm($id_user);
$name = $row_adm->name;
$row_rol = $this->Login_model->get_user_rol($id_rol);
if($check_user == TRUE)
{
$data = array(
'is_logued_in' => TRUE,
'id_user' => $check_user->id_user,
'roles' => $row_rol->description,
'id_rol' => $row_rol->id_role,
'email' => $check_user->email,
'id_administrator' => $row_adm->id_administrators,
'name' => $name
);
$this->session->set_userdata($data);
$this->index();
}
}elseif ($id_rol == 4) {
$row_ven = $this->Login_model->get_ven($id_user);
$name = $row_ven->name;
$row_rol = $this->Login_model->get_user_rol($id_rol);
if($check_user == TRUE)
{
$data = array(
'is_logued_in' => TRUE,
'id_user' => $check_user->id_user,
'roles' => $row_rol->description,
'id_rol' => $row_rol->id_role,
'email' => $check_user->email,
'id_vendor' => $row_ven->id_vendor,
'name' => $name
);
$this->session->set_userdata($data);
$this->index();
}
}elseif ($id_rol == 5) {
$row_emp = $this->Login_model->get_emp($id_user);
$name = $row_emp->name;
$row_rol = $this->Login_model->get_user_rol($id_rol);
if($check_user == TRUE)
{
$data = array(
'is_logued_in' => TRUE,
'id_user' => $check_user->id_user,
'roles' => $row_rol->description,
'id_rol' => $row_rol->id_role,
'email' => $check_user->email,
'id_employee' => $row_emp->id_employees,
'id_daycare' => $row_emp->daycare_id,
'name' => $name
);
$this->session->set_userdata($data);
$this->index();
}
}
}
}else{
redirect(base_url().'login');
}
}
public function token()
{
$token = md5(uniqid(rand(),true));
$this->session->set_userdata('token',$token);
return $token;
}
public function logout_ci()
{
$this->session->sess_destroy();
redirect(base_url().'login');
//$this->index();
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Agency_workshop extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Agency_workshop_model');
//$this->load->model(array('Login_model','backend/Beneficiary_model','backend/Event_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
}
public function index()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$id_agency = $this->session->userdata('id_agency');
$arrWor = $this->Agency_workshop_model->get_workshops($id_agency);
//$id_category_arr = $this->Agency_workshop_model->get_id_categories();
if (is_array($arrWor))
{
foreach($arrWor as $c => $k)
{
$id_category = $arrWor[$c]->category_id;
$rowCat[$c] = $this->Agency_workshop_model->get_category($id_category);
}
}
$data['category'] = $rowCat;
$data['arrWor'] = $arrWor;
$data['active'] = 'Workshop';
$data['title'] = 'Workshops';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_workshop_list_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function add_new()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'New Workshop';
$data['active'] = 'workshop';
$data['option'] = 'no';
$data['legend'] = 'New Workshop';
$data['button'] = 'Create';
$data['action'] = 'user-section/agency-workshop/create_workshop/';
$data['categories'] = $this->Agency_workshop_model->get_categories();
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_workshop_view', $data);
$this->load->view('back/footer_view', $data);
}
else {
redirect(base_url().'home');
}
}
function create_workshop()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
//echo "probando";
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('cat',"Category",'required|callback_check_default2');
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('hours','Hours','trim|is_natural_no_zero|max_length[11]');
$this->form_validation->set_rules('topic','Topic','required|trim|max_length[250]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
$this->form_validation->set_message('check_default2', 'Please select a Category');
if($this->form_validation->run()==FALSE)
{
$this->add_new();
}else{
$name = $this->input->post('name');
$category = $this->input->post('cat');
$hours = $this->input->post('hours');
$topic = $this->input->post('topic');
$id_agency = $this->session->userdata('id_agency');
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_workshop = $this->Agency_workshop_model->new_workshop($category,$id_agency,$name,$hours,$topic);
//$this->Agency_vendor_model->new_agency_vendor($id_agency,$id_vendor);
if ( $id_workshop != Null) {
echo "<script> if (confirm('Do you want to continue?')){
window.location='".base_url()."user-section/agency-workshop/add-new"."'
} else {
window.location='".base_url()."user-section/agency-workshop"."'
}</script>";
}
//redirect(base_url().'agency-daycare/add_new');
}
}
}
}
function edit($id_workshop)
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'Edit Workshop';
$data['active'] = 'workshop';
$data['option'] = 'yes';
$data['legend'] = 'Edit Workshop';
$data['button'] = 'Save';
$data['action'] = 'user-section/agency-workshop/update_workshop/';
$data['workshop'] = $this->Agency_workshop_model->get_workshop($id_workshop);
$data['categories'] = $this->Agency_workshop_model->get_categories();
$row_cat = $this->Agency_workshop_model->get_category($data['workshop']->category_id);
$data['category'] = $row_cat->description;
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_workshop_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function update_workshop()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
$id_workshop = $this->input->post('id_workshop');
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('cat',"Category",'required|callback_check_default2');
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('hours','Hours','trim|is_natural_no_zero|max_length[11]');
$this->form_validation->set_rules('topic','Topic','required|trim|max_length[250]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
$this->form_validation->set_message('check_default2', 'Please select a Category');
if($this->form_validation->run()==FALSE)
{
$this->edit($id_workshop);
}else{
$name = $this->input->post('name');
$category = $this->input->post('cat');
$hours = $this->input->post('hours');
$topic = $this->input->post('topic');
$id_agency = $this->session->userdata('id_agency');
$this->Agency_workshop_model->update_workshop($id_workshop,$category,$name,$hours,$topic);
redirect(base_url().'user-section/agency-workshop');
}
}
}
}
function check_default2($post_string)
{
return $post_string == '-1' ? FALSE : TRUE;
}
}<file_sep> <div class="headline-bg contact-headline-bg">
</div><!--//headline-bg-->
<section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Sign up now</h2>
<div class="text-center"><spam class="intro text-center">It only takes 5 minutes! <br> <br>Are You?<br></spam></div>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<!--<form class="signup-form"> -->
<?php $attributes = array('class' => 'signup-form'); ?>
<?php echo form_open_multipart(base_url().'signup/create_subscription', $attributes) ?>
<div class="form-group">
<label class="radio-inline input-lg">
<input type="radio" name="inlineRadioOptions" id="age1" value="1"> Agency
</label>
<label class="radio-inline input-lg">
<input type="radio" name="inlineRadioOptions" id="day2" value="2"> Daycare
</label>
<label class="radio-inline input-lg">
<input type="radio" name="inlineRadioOptions" id="emp3" value="3"> Employee
</label>
</div> <br><br>
<div id="sub"> <?php echo form_error('name'); ?>
<?php echo form_error('address'); ?>
<?php echo form_error('director'); ?>
<?php echo form_error('phone'); ?>
<?php echo form_error('email'); ?>
<?php echo form_error('children'); ?>
<?php echo form_error('owner'); ?>
<?php echo form_error('birthdate'); ?>
<?php echo form_error('gender'); ?>
<?php
if ( form_error('name') || form_error('address') || form_error('director') || form_error('phone') || form_error('email') || form_error('children') || form_error('owner') || form_error('birthdate') || form_error('gender') )
{ ?>
<div class="alert alert-info">Please Select an option again</div>
<?php }
?>
</div>
<!--<div class="form-group">
<?php echo form_error('name'); ?>
<label class="sr-only" >Name of the Agency</label>
<input type="text" name="name" class="form-control login-email" placeholder="Name of the Agency" value="<?=set_value('name')?>">
</div>
<div class="form-group">
<?php echo form_error('address'); ?>
<label class="sr-only" >Address</label>
<input type="text" name="address" class="form-control login-email" placeholder="Address" value="<?=set_value('address')?>">
</div>
<div class="form-group">
<?php echo form_error('director'); ?>
<label class="sr-only" >Name of Director</label>
<input type="text" name="director" class="form-control login-email" placeholder="Name of Director" value="<?=set_value('director')?>">
</div>
<div class="form-group">
<?php echo form_error('phone'); ?>
<label class="sr-only" >Phone Number</label>
<input type="text" name="phone" class="form-control login-email" placeholder="Phone Number" value="<?=set_value('phone')?>">
</div>
<div class="form-group">
<?php echo form_error('email'); ?>
<label class="sr-only" for="signup-email">Your email</label>
<input id="signup-email" name="email" type="email" class="form-control " placeholder="Your email" value="<?=set_value('email')?>">
</div>
<input type="hidden" name="grabar" value="si"/>
<button type="submit" class="btn btn-block btn-cta-primary">Sign up</button>
<p class="note">By signing up, you agree to our terms of services and privacy policy.</p>
<p class="lead">Already have an account? <a class="login-link" id="login-link" href="<?=base_url().'login'?>">Log in</a></p>-->
</form>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
</div><!--//upper-wrapper-->
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
$("#age1").click(function() {
age = $('#age1').val();
$.post("<?=base_url();?>signup/fill_sub", {
type : age
}, function(data) {
$("#sub").html(data);
// console.log(data);
},);
});
$("#day2").click(function() {
day = $('#day2').val();
$.post("<?=base_url();?>signup/fill_sub", {
type : day
}, function(data) {
$("#sub").html(data);
// console.log(data);
});
});
$("#emp3").click(function() {
emp = $('#emp3').val();
$.post("<?=base_url();?>signup/fill_sub", {
type : emp
}, function(data) {
$("#sub").html(data);
// console.log(data);
});
});
});
</script><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Home extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Home_model');
//$this->load->model(array('Login_model','backend/Beneficiary_model','backend/Event_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
$this->load->model('back/employee_model');
}
public function index()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'webadmin')
{
$data['active'] = 'home';
$data['title'] = 'Child Care';
//$this->load->view('header_view', $data);
$this->load->view('back/agency/home_view', $data);
}elseif($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['active'] = 'home';
$data['title'] = 'Agency';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/home_view', $data);
$this->load->view('back/footer_view', $data);
}elseif($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'administrator')
{
$data['title'] = 'Employee List';
$data['active'] = 'Employee_List';
$data['employees'] = $this->employee_model->getEmployees();
$this->load->view('back/daycare/header_view_k', $data);
$this->load->view('back/daycare/employee_list', $data);
$this->load->view('back/footer_view', $data);
}elseif($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'vendor')
{
$data['active'] = 'home';
$data['title'] = 'Child Care';
//$this->load->view('header_view', $data);
$this->load->view('back/agency/home_view', $data);
//$this->load->view('footer_view', $data);
}elseif($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'employee')
{
$data['active'] = 'home';
$data['title'] = 'Child Care';
//$this->load->view('header_view', $data);
$this->load->view('back/agency/home_view', $data);
}else {
redirect(base_url().'login');
}
}
}<file_sep># ect
ECT por DiazApps
<file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Signup extends CI_Controller
{
public function __construct()
{
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
$this->load->model(array('front/Signup_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
}
function index()
{
$data['title'] = 'Sign Up';
$data['active'] = 'signup';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/signup_view', $data);
$this->load->view('front/footer_view', $data);
}
function fill_sub()
{
$type = $this->input->post('type');
if ( $type == 1) {
echo '<div class="form-group">'.
form_error("name").'
<label class="sr-only" >Name of the Agency</label>
<input type="text" name="name" class="form-control login-email" placeholder="Name of the Agency" value="'.set_value("name").'">
</div>
<div class="form-group">'.
form_error("address").'
<label class="sr-only" >Address</label>
<input type="text" name="address" class="form-control login-email" placeholder="Address" value="'.set_value("address").'">
</div>
<div class="form-group">'.
form_error("director").'
<label class="sr-only" >Name of Director</label>
<input type="text" name="director" class="form-control login-email" placeholder="<NAME> Director" value="'.set_value("director").'">
</div>
<div class="form-group">'.
form_error("phone").'
<label class="sr-only" >Phone Number</label>
<input type="text" name="phone" class="form-control login-email txtboxToFilter" placeholder="Phone Number" value="'.set_value("phone").'">
</div>
<div class="form-group">'.
form_error("email").'
<label class="sr-only" for="signup-email">Your email</label>
<input id="signup-email" name="email" type="email" class="form-control " placeholder="Your email" value="'.set_value("email").'">
</div>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="ty" value="'.$type.'"/>
<button type="submit" class="btn btn-block btn-cta-primary">Sign up</button>
<p class="note">By signing up, you agree to our terms of services and privacy policy.</p>
<p class="lead">Already have an account? <a class="login-link" id="login-link" href="'.base_url().'login'.'">Log in</a></p>
<script language="JavaScript" type="text/javascript">
$(".txtboxToFilter").keydown(function (e) {
// Allow: backspace, delete, tab, escape, :, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110,187,189, 190, 58]) !== -1 ||
// Allow: Ctrl+A, Command+A
(e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
// Allow: home, end, left, right, down, up
(e.keyCode >= 35 && e.keyCode <= 40)) {
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
</script>';
}elseif ($type == 2) {
echo '<div class="form-group">'.
form_error("name").'
<label class="sr-only" >Name of the Daycare</label>
<input type="text" name="name" class="form-control login-email" placeholder="Name of the Daycare" value="'.set_value("name").'">
</div>
<div class="form-group">'.
form_error("address").'
<label class="sr-only" >Address</label>
<input type="text" name="address" class="form-control login-email" placeholder="Address" value="'.set_value("address").'">
</div>
<div class="form-group">'.
form_error("dirname").'
<label class="sr-only" >Name of Director</label>
<input type="text" name="dirname" class="form-control login-email" placeholder="Name of Director" value="'.set_value("dirname").'">
</div>
<div class="form-group">'.
form_error("phone").'
<label class="sr-only" >Phone Number</label>
<input type="text" name="phone" class="form-control login-email txtboxToFilter" placeholder="Phone Number" value="'.set_value("phone").'">
</div>
<div class="form-group">'.
form_error("children").'
<label class="sr-only" >Number of children</label>
<input type="number" name="children" min="0" class="form-control login-email " placeholder="Number of Children" value="'.set_value("children").'">
</div>
<div class="form-group">'.
form_error("owner").'
<label class="sr-only" >Owner</label>
<input type="text" name="owner" class="form-control login-email" placeholder="Owner" value="'.set_value("owner").'">
</div>
<div class="form-group">'.
form_error("email").'
<label class="sr-only" for="signup-email">Your email</label>
<input id="signup-email" name="email" type="email" class="form-control " placeholder="Your email" value="'.set_value("email").'">
</div>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="ty" value="'.$type.'"/>
<button type="submit" class="btn btn-block btn-cta-primary">Sign up</button>
<p class="note">By signing up, you agree to our terms of services and privacy policy.</p>
<p class="lead">Already have an account? <a class="login-link" id="login-link" href="'.base_url().'login'.'">Log in</a></p>
<script language="JavaScript" type="text/javascript">
$(".txtboxToFilter").keydown(function (e) {
// Allow: backspace, delete, tab, escape, :, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110,187,189, 190, 58]) !== -1 ||
// Allow: Ctrl+A, Command+A
(e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
// Allow: home, end, left, right, down, up
(e.keyCode >= 35 && e.keyCode <= 40)) {
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
</script>
';
}elseif ($type == 3) {
echo '<div class="form-group">'.
form_error("name").'
<label class="sr-only" >Name</label>
<input type="text" name="name" class="form-control login-email" placeholder="Name" value="'.set_value("name").'">
</div>
<div class="form-group">'.
form_error("address").'
<label class="sr-only" >Address</label>
<input type="text" name="address" class="form-control login-email" placeholder="Address" value="'.set_value("address").'">
</div>
<div class="form-group">'.
form_error("birthdate").'
<label class="sr-only" >Date of birth</label>
<input id="datepicker" type="text" name="birthdate" class="form-control login-email" placeholder="Date of birth" value="'.set_value("birthdate").'">
</div>
<div class="form-group">'.
form_error("phone").'
<label class="sr-only" >Phone Number</label>
<input type="text" name="phone" class="form-control login-email txtboxToFilter" placeholder="Phone Number" value="'.set_value("phone").'">
</div>
<div class="form-group">'.
form_error("gender").'
<select class="form-control" name="gender" id="gender">
<option value="-1">
Select Gender
</option>
<option value="1">
Male
</option>
<option value="0">
Female
</option>
</select>
</div>
<div class="form-group">'.
form_error("email").'
<label class="sr-only" for="signup-email">Your email</label>
<input id="signup-email" name="email" type="email" class="form-control " placeholder="Your email" value="'.set_value("email").'">
</div>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="ty" value="'.$type.'"/>
<button type="submit" class="btn btn-block btn-cta-primary">Sign up</button>
<p class="note">By signing up, you agree to our terms of services and privacy policy.</p>
<p class="lead">Already have an account? <a class="login-link" id="login-link" href="'.base_url().'login'.'">Log in</a></p>
<script language="JavaScript" type="text/javascript">
$(".txtboxToFilter").keydown(function (e) {
// Allow: backspace, delete, tab, escape, :, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110,187,189, 190, 58]) !== -1 ||
// Allow: Ctrl+A, Command+A
(e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
// Allow: home, end, left, right, down, up
(e.keyCode >= 35 && e.keyCode <= 40)) {
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
$("#datepicker").datepicker({
dateFormat: "mm/dd/yy",
maxDate: "01/31/1997"
});
</script>
';
}
}
function create_subscription()
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si' and $_POST['ty'] == 1)
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('director','Director','required|trim|max_length[250]');
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|is_unique[users.email]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
if($this->form_validation->run()==FALSE)
{
$this->index();
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$director = $this->input->post('director');
$email = $this->input->post('email');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 2;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
//$id_user = $this->Signup_model->new_user($email,$pw,$id_rol);
//$id_agency = $this->Signup_model->new_agency($name,$phone,$address,$director,$id_user);
//redirect(base_url().'signup');
$data['title'] = 'Sign Up';
$data['name'] = $name;
$data['phone'] = $phone;
$data['address'] = $address;
$data['director'] = $director;
$data['email'] = $email;
$data['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/signup_pp_view', $data);
$this->load->view('front/footer_view', $data);
}
}elseif (isset($_POST['grabar']) and $_POST['grabar'] == 'si' and $_POST['ty'] == 2) {
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('dirname','Director','required|trim|max_length[250]');
$this->form_validation->set_rules('children','Number of Children','required|trim|is_natural_no_zero');
$this->form_validation->set_rules('owner','Owner','required|trim|max_length[250]');
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|is_unique[users.email]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
if($this->form_validation->run()==FALSE)
{
$this->index();
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$director = $this->input->post('dirname');
$children = $this->input->post('children');
$owner = $this->input->post('owner');
$email = $this->input->post('email');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 3;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
//$id_user = $this->Signup_model->new_user($email,$pw,$id_rol);
//$id_agency = $this->Signup_model->new_agency($name,$phone,$address,$director,$id_user);
//redirect(base_url().'signup');
$data['title'] = 'Sign Up';
$data['name'] = $name;
$data['phone'] = $phone;
$data['address'] = $address;
$data['director'] = $director;
$data['children'] = $children;
$data['owner'] = $owner;
$data['email'] = $email;
$data['type'] = $this->input->post('ty');
$data['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/signup_pp_view', $data);
$this->load->view('front/footer_view', $data);
}
}elseif (isset($_POST['grabar']) and $_POST['grabar'] == 'si' and $_POST['ty'] == 3) {
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('birthdate','Date of birth','required|trim|max_length[45]');
$this->form_validation->set_rules('gender',"Gender",'required|callback_check_default2');
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|is_unique[users.email]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
$this->form_validation->set_message('check_default2', 'Please select a Gender');
if($this->form_validation->run()==FALSE)
{
$this->index();
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$birthdate = $this->input->post('birthdate');
$gender = $this->input->post('gender');
$email = $this->input->post('email');
$date = new DateTime($birthdate);
$bdate =$date->format('Y-m-d');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 3;
$data['title'] = 'Sign Up';
$data['name'] = $name;
$data['phone'] = $phone;
$data['address'] = $address;
$data['birthdate'] = $bdate;
$data['gender'] = $gender;
$data['email'] = $email;
$data['type'] = $this->input->post('ty');
$data['action'] = 'https://www.paypal.com/cgi-bin/webscr';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/signup_pp_view', $data);
$this->load->view('front/footer_view', $data);
}
}
}
function create_pp_subscription()
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
if($this->session->userdata('a_type') == 1)
{
$name = $this->session->userdata('a_name');
$phone = $this->session->userdata('a_phone');
$address = $this->session->userdata('a_address');
$director = $this->session->userdata('a_director');
$email = $this->session->userdata('a_email');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 2;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_user = $this->Signup_model->new_user($email,$pw,$id_rol);
$id_agency = $this->Signup_model->new_agency($name,$phone,$address,$director,$id_user);
if ($id_agency != Null) {
echo '<script type="text/javascript">';
echo 'alert("Successful Registration!");';
echo 'window.location.href = "'.base_url().'signup";';
echo '</script>';
}
//redirect(base_url().'signup');
}elseif ($this->session->userdata('a_type') == 2) {
$name = $this->session->userdata('a_name');
$phone = $this->session->userdata('a_phone');
$address = $this->session->userdata('a_address');
$director = $this->session->userdata('a_director');
$children = $this->session->userdata('a_children');
$owner = $this->session->userdata('a_owner');
$email = $this->session->userdata('a_email');
$type_emp = 1;
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 3;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_user = $this->Signup_model->new_user($email,$pw,$id_rol);
$id_daycare = $this->Signup_model->new_daycare($name,$phone,$address,$children,$owner);
$id_administrator = $this->Signup_model->new_administrator($id_daycare,$id_user,$type_emp,$director);
if ($id_daycare != Null) {
echo '<script type="text/javascript">';
echo 'alert("Successful Registration!");';
echo 'window.location.href = "'.base_url().'signup";';
echo '</script>';
}
}elseif ($this->session->userdata('a_type') == 3) {
$name = $this->session->userdata('a_name');
$phone = $this->session->userdata('a_phone');
$address = $this->session->userdata('a_address');
$birthdate = $this->session->userdata('a_birthdate');
$gender = $this->session->userdata('a_gender');
$email = $this->session->userdata('a_email');
$type_emp = 2;
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 5;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_user = $this->Signup_model->new_user($email,$pw,$id_rol);
$id_employee = $this->Signup_model->new_employee($id_user,$type_emp,$name,$phone,$address,$birthdate,$gender);
if ($id_employee != Null) {
echo '<script type="text/javascript">';
echo 'alert("Successful Registration!");';
echo 'window.location.href = "'.base_url().'signup";';
echo '</script>';
}
}
}
function check_default2($post_string)
{
return $post_string == '-1' ? FALSE : TRUE;
}
}<file_sep> <?php
$email = array('type' => 'email','name' => 'email','id' => 'email', 'placeholder' => 'Enter your e-mail', 'class' => 'form-control login-email');
$password = array('name' => 'password', 'id' => 'password', 'type'=>'password', 'placeholder' => 'Enter your password', 'class' => 'form-control login-password');
$submit = array('name' => 'submit', 'value' => 'Log In', 'title' => 'Log In', 'type' => 'submit', 'class' => 'btn btn-block btn-cta-primary');
$reset = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-lg btn-login btn-block');
$submit2 = array('name' => 'submit', 'value' => 'Register', 'title' => 'Sign in', 'class' => 'btn btn-main featured');
$reset2 = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-main featured');
$toForm = array('class' => 'login-form');
$toForm2 = array('class' => 'subscription-form mailchimp');
$submit3 = array('name' => 'submit', 'value' => 'Submit Now', 'title' => 'Submit Now', 'class' => 'btn btn-main featured');
//$registrarse = array('name' => 'button', 'value' => 'Registrarse', 'title' => 'Registrarse')
?>
<div class="headline-bg contact-headline-bg">
</div><!--//headline-bg-->
<section class="login-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8" align="center">
<div class="form-box-inner">
<h2 class="title text-center">Log in to Child Care</h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center" >
<?=form_open(base_url().'login/singin', $toForm)?>
<div class="form-group email">
<?=form_error('email')?>
<label class="sr-only" for="email">Email</label>
<?=form_input($email)?>
</div><!--//form-group-->
<div class="form-group password">
<?=form_error('password')?>
<label class="sr-only" for="login-password">Password</label>
<?=form_password($password)?>
<!--<p class="forgot-password"><a href="reset-password.html">Forgot password?</a></p>-->
</div><!--//form-group onclick="validate()"-->
<?=form_hidden('token',$token)?><br>
<?=form_submit($submit)?>
<!--<button type="submit" class="btn btn-block btn-cta-primary" >Log in</button>-->
<!--<div class="checkbox remember">
<label>
<input type="checkbox"> Remember me
</label>
</div><!--//checkbox-->
<p class="lead">Don't have a Child Care account yet? <br /><a class="signup-link" href="<?=base_url().'signup'?>">Create your account now</a></p>
<?=form_close()?>
<?php
if($this->session->flashdata('incorrect_user'))
{
?>
<p><?=$this->session->flashdata('incorrect_user')?></p>
<?php
}
?>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//contact-section--><file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Page extends CI_Controller
{
public function __construct()
{
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$this->load->model(array('Period_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
}
function index()
{
$data['title'] = 'Child Care';
$data['active'] = 'home';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/page_view', $data);
$this->load->view('front/footer_view', $data);
}
}<file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Contact extends CI_Controller
{
public function __construct()
{
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$this->load->model(array('Period_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
}
function index()
{
$data['title'] = 'Contact Us';
$data['active'] = 'contact';
$this->load->view('front/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('front/contact_view', $data);
$this->load->view('front/footer_view', $data);
}
function request()
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('messageCon','Message','required|trim|xss_clean|max_length[450]');
$this->form_validation->set_rules('nameCon','Name','required|trim|xss_clean|max_length[100]');
$this->form_validation->set_rules('emailCon', 'E-mail', 'required|trim|valid_email|xss_clean');
//$this->form_validation->set_rules('phoneCon','Phone','required|trim|is_natural');
//$this->form_validation->set_rules('phone','Phone Number','required|trim|xss_clean|is_natural');
//$this->form_validation->set_rules('presidents','End Date','required|trim|xss_clean');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
//$id_university = $this->session->userdata('id_university');
if($this->form_validation->run()==FALSE)
{
$this->index('contact');
}else{
//EN CASO CONTRARIO PROCESAMOS LOS DATOS
$name = $this->input->post('nameCon');
$message = $this->input->post('messageCon');
$email = $this->input->post('emailCon');
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
//$id_university = $this->Login_model->new_university($university,$address);
// EMAIL
//cargamos la libreria email de ci
/*$this->load->library("email");
//configuracion para gmail
$configGmail = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => '<EMAIL>',
//<EMAIL>
'smtp_pass' => '<PASSWORD>',
'mailtype' => 'html',
'charset' => 'utf-8',
'newline' => "\r\n"
);
//cargamos la configuración para enviar con gmail
$this->email->initialize($configGmail);
$this->email->from($email);
$this->email->to('<EMAIL>');
$this->email->subject('playerpasslist.com');
$this->email->message('<div>
<h2 style="text-align:center;">
Contact Message
</h2>
<hr>
<br>
<span style="font-size:14px;">Name: '.$name.'</span><br>
<span style="font-size:14px;">Phone: '.$phone.'</span><br>
<span style="font-size:14px;">Email: '.$email.'</span><br> <br>
<span style="font-size:14px;">Message: '.$message.'</span><br>
</div>');
$this->email->send();*/
//con esto podemos ver el resultado
//var_dump($this->email->print_debugger());
$this->load->library("email");
$configGmail = array(
'protocol' => 'mail',
'mailtype' => 'html',
'charset' => 'utf-8',
'newline' => "\r\n"
);
$this->email->initialize($configGmail);
$this->email->from($email);
$this->email->to('<EMAIL>');
//$this->email->cc('<EMAIL>');
//$this->email->bcc('<EMAIL>');
$this->email->subject('Contact message from ect.com');
$this->email->message('<div>
<h2 style="text-align:center;">
Contact Message
</h2>
<hr>
<br>
<span style="font-size:14px;">Name: '.$name.'</span><br>
<span style="font-size:14px;">Email: '.$email.'</span><br> <br>
<span style="font-size:14px;">Message: '.$message.'</span><br>
</div>');
$this->email->send();
//echo $this->email->print_debugger();
//var_dump($this->email->print_debugger());
redirect(base_url().'contact');
}
}else {echo "Wrong way!!!";}
}
}<file_sep> <section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center"><?=$legend?></h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<?php $attributes = array('class' => 'signup-form'); ?>
<?php echo form_open_multipart(base_url().$action, $attributes)
?>
<div class="form-group">
<label class="sr-only" >Name</label>
<?=form_error('name')?>
<input type="text" class="form-control login-email" name="name" value="<?=is_null($vendor) ? set_value('name') : $vendor->name?>" placeholder="Name">
</div>
<div class="form-group">
<label class="sr-only" >Phone Number</label>
<?=form_error('phone')?>
<input type="text" class="form-control" name="phone" value="<?=is_null($vendor) ? set_value('phone') : $vendor->phone?>" class="form-control login-email" placeholder="Phone Number">
</div>
<div class="form-group">
<label class="sr-only" >Address</label>
<?=form_error('address')?>
<input type="text" name="address" value="<?=is_null($vendor) ? set_value('address') : $vendor->address?>" class="form-control login-email" placeholder="Address">
</div>
<div class="form-group">
<label class="sr-only" >Date of birth</label>
<?=form_error('birthdate')?>
<input id="datepicker" type ="text" name="birthdate" value="<?=is_null($vendor) ? set_value('birthdate') : $bdate?>" class="form-control" placeholder="Date of birth">
</div>
<div class="form-group">
<label class="sr-only" >Gender</label>
<?=form_error('gender')?>
<select class="form-control" name="gender" id="gender">
<?php if (!$vendor) {?>
<option value="-1">
Gender
</option>
<?php }else{?>
<option value="<?=$vendor->gender?>">
<?php if ($vendor->gender == 0) {
echo "Male";
}elseif ($vendor->gender == 1) {
echo "Female";
}
?>
</option>
<?php } ?>
<?php if ($vendor->gender == null) {?>
<option value="0">
<?="Male"?>
</option>
<option value="1">
<?="Female"?>
</option>
<?php }elseif ($vendor->gender == 0) { ?>
<option value="1">
<?="Male"?>
</option>
<?php }elseif ($vendor->gender == 1) { ?>
<option value="0">
<?="Female"?>
</option>
<?php } ?>
</select>
</div>
<?php if (!$vendor) { ?>
<div class="form-group">
<label class="sr-only" for="signup-email">Your email</label>
<?=form_error('email')?>
<input id="signup-email" type="email" name="email" value="<?=is_null($vendor) ? set_value('email') : $email?>" class="form-control login-email" placeholder="e-mail">
</div><!--//form-group-->
<?php
}?>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="id_vendor" value="<?=$vendor->id_vendor?>"/>
<button type="submit" class="btn btn-cta-primary"><?=$button?></button>
<button type="reset" id="res" class="btn btn-cta-primary">Cancel</button>
<a class="btn btn-default" href="#" onclick="window.history.back();">Back</a>
<!--<button type="submit" class="btn btn-block btn-cta-primary">Save</button> -->
</form>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
<script>
$(document).ready(function() {
$('#datepicker').datepicker({
dateFormat: 'mm/dd/yy',
maxDate: '01/31/1997'
});
});
</script><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Quiz_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
public function createQuiz($data){
$this->db->insert('quizzes', array('description'=>$data['description'],
'address' =>$data['address'],
'daycare_id' => $data['daycare_id'],
'quizztype_id' => $data['quizztype_id'],
'duration'=>$data['duration']
));
}
public function getQuizzes(){
$query = $this->db->get('quizzes');
echo $query->num_rows();
if($query->num_rows()>0)
return $query;
else
return false;
}
public function showQuiz($id){
$this->db->where('id_quizzes', $id);
$query = $this->db->get('quizzes');
if($query->num_rows()>0)
return $query;
else
return false;
}
public function getWorkshops($id){
$this->db->where('quiz_id', $id);
$query = $this->db->get('quiz_workshops');
if($query->num_rows()>0)
return $query;
else
return false;
}
function get_daycare_quiz($daycare_id){
$query = $this->db->get_where('quizzes', array('daycare_id' => $daycare_id, 'status' => 1));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_quiz_questions($quiz_id){
$query = $this->db->get_where('questions', array('quiz_id' => $quiz_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_question_solutions($question_id){
$query = $this->db->get_where('solutions', array('question_id' => $question_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
}<file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Daycare extends CI_Controller {
public function __construct(){
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$this->load->model(array('Period_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
$this->load->model('back/quiz_model');
}
function personnel_registration(){
$data['title'] = 'Quiz Registration';
$data['active'] = 'Quiz_Registration';
$this->load->view('back/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('back/daycare/quiz_registration', $data);
$this->load->view('back/footer_view', $data);
}
function create_quiz(){
$data = array(
'name' => $this->input->post('name'),
'address' =>$this->input->post('address'),// $this->input->post('address'),
'daycare_id' => 1,
'user_id'=>1,
'phone'=>$this->input->post('phone'),
'birthdate'=>$this->input->post('birthdate'),
'gender'=>$this->input->post('gender'),
);
$this->quiz_model->createquiz($data);
$this->quiz_list();
}
function quiz_list(){
$data['title'] = 'quiz List';
$data['active'] = 'quiz_List';
$data['quizzes'] = $this->quiz_model->getquizzes();
$this->load->view('back/header_view', $data);
$this->load->view('back/daycare/quiz_list', $data);
$this->load->view('back/footer_view', $data);
}
function show_quiz(){
$data['title'] = 'quiz List';
$data['active'] = 'quiz_List';
#$data['quizzes'] = $this->quiz_model->getquizzes();
$data['segmento'] = $this->uri->segment(3);
$this->load->view('back/header_view', $data);
if($data['segmento']){
$data['quiz'] = $this->quiz_model->showquiz($data['segmento']);
$data['workshops'] = $this->quiz_model->getWorkshops($data['segmento']);
$this->load->view('back/daycare/show_quiz', $data);
}
else{
$this->load->view('back/daycare/show_quiz', $data);
}
$this->load->view('back/footer_view', $data);
}
}
?><file_sep> <?php
$email = array('type' => 'email','name' => 'email','id' => 'email', 'placeholder' => 'Enter your e-mail', 'class' => 'form-control login-email');
$password = array('name' => 'password', 'id' => 'password', 'type'=>'password', 'placeholder' => 'Enter your password', 'class' => 'form-control login-password');
$submit = array('name' => 'submit', 'value' => 'Log In', 'title' => 'Log In', 'type' => 'submit', 'class' => 'btn btn-block btn-cta-primary');
$reset = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-lg btn-login btn-block');
$submit2 = array('name' => 'submit', 'value' => 'Register', 'title' => 'Sign in', 'class' => 'btn btn-main featured');
$reset2 = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-main featured');
$toForm = array('class' => 'login-form');
$toForm2 = array('class' => 'subscription-form mailchimp');
$submit3 = array('name' => 'submit', 'value' => 'Submit Now', 'title' => 'Submit Now', 'class' => 'btn btn-main featured');
//$registrarse = array('name' => 'button', 'value' => 'Registrarse', 'title' => 'Registrarse')
?>
<div class="headline-bg contact-headline-bg">
</div><!--//headline-bg-->
<section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Sign up now</h2>
<p class="intro text-center">It only takes 3 minutes!</p>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<form class="signup-form">
<div class="form-group">
<label class="sr-only" >Name of the Centre</label>
<input type="text" name="" class="form-control login-email" placeholder="Name of the Centre">
</div>
<div class="form-group">
<label class="sr-only" >Address</label>
<input type="text" name="" class="form-control login-email" placeholder="Address">
</div>
<div class="form-group">
<label class="sr-only" >Number of Children</label>
<input type="text" name="" class="form-control login-email" placeholder="Number of Children">
</div>
<div class="form-group">
<label class="sr-only" >Date of Registration</label>
<input type="text" name="" class="form-control login-email" placeholder="Date of Registration">
</div>
<div class="form-group">
<label class="sr-only" >Listing of Certifications</label>
<input type="text" name="" class="form-control login-email" placeholder="Listing of Certifications">
</div>
<div class="form-group">
<label class="sr-only" >Number of Employee</label>
<input type="text" name="" class="form-control login-email" placeholder="Number of Employee">
</div>
<div class="form-group">
<label class="sr-only" >Owner</label>
<input type="text" name="" class="form-control login-email" placeholder="Owner">
</div>
<div class="form-group">
<label class="sr-only" >Name of Director</label>
<input type="text" name="" class="form-control login-email" placeholder="Name of Director">
</div>
<div class="form-group">
<label class="sr-only" >Phone Numbers</label>
<input type="text" name="" class="form-control login-email" placeholder="Phone Numbers">
</div>
<div class="form-group">
<label class="sr-only" for="signup-email">Your email</label>
<?=form_input($email)?>
</div><!--//form-group-->
<div class="form-group">
<input id="signup-password" type="<PASSWORD>" class="form-control " placeholder="<PASSWORD>">
</div><!--//form-group-->
<button type="submit" class="btn btn-block btn-cta-primary">Sign up</button>
<p class="note">By signing up, you agree to our terms of services and privacy policy.</p>
<p class="lead">Already have an account? <a class="login-link" id="login-link" href="login.html">Log in</a></p>
<?=form_close()?>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
</div><!--//upper-wrapper--><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Agency_daycare extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Agency_daycare_model');
//$this->load->model(array('Login_model','backend/Beneficiary_model','backend/Event_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
}
public function index()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$id_agency = $this->session->userdata('id_agency');
$daycares = $this->Agency_daycare_model->get_daycares($id_agency);
$data['arrDay'] = $daycares;
/*if (is_array($daycares)){
foreach ($daycares as $k => $daycare) {
$rowCourse = $this->Clas_model->get_course($class->id_course);
$course[$k] = $rowCourse->name;
}
}*/
$data['active'] = 'daycare';
$data['title'] = 'Daycare';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_daycare_list_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function add_new()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'New Daycare';
$data['active'] = 'agency';
$data['option'] = 'no';
$data['legend'] = 'New Daycare';
$data['button'] = 'Create';
$data['action'] = 'user-section/agency-daycare/create_daycare/';
//$id_school = $this->session->userdata('id_school');
/* $id_grades = $this->Clas_model->get_grades($id_teacher);
if (is_array($id_grades))
{
foreach($id_grades as $f => $key)
{
$grade[$f] = $this->Clas_model->get_grade($id_grades[$f]->id_grade);
}
}*/
//$data['grades'] = $grade;
//$data['programs'] = $this->Course_model->get_programs($id_school);
//$data['departments'] = $this->Course_model->get_departments($id_school);
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_daycare_view', $data);
$this->load->view('back/footer_view', $data);
}
else {
redirect(base_url().'home');
}
}
function create_daycare()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
//echo "probando";
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('children','Children Quantity','trim|is_natural_no_zero|max_length[11]');
$this->form_validation->set_rules('owner','Owner','required|trim|max_length[45]');
$this->form_validation->set_rules('dirname',"Director's Name",'required|trim|max_length[45]');
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|is_unique[users.email]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
if($this->form_validation->run()==FALSE)
{
$this->add_new();
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$children = $this->input->post('children');
$owner = $this->input->post('owner');
$dirname = $this->input->post('dirname');
$email = $this->input->post('email');
$id_agency = $this->session->userdata('id_agency');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 3;
$type_emp = 1;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_user = $this->Agency_daycare_model->new_user($email,$pw,$id_rol);
$id_daycare = $this->Agency_daycare_model->new_daycare($id_agency,$name,$phone,$address,$children,$owner);
$id_administrator = $this->Agency_daycare_model->new_administrator($id_daycare,$id_user,$type_emp,$dirname);
if ($id_daycare != Null) {
echo "<script> if (confirm('Do you want to continue?')){
window.location='".base_url()."user-section/agency-daycare/add-new"."'
} else {
window.location='".base_url()."user-section/agency-daycare"."'
}</script>";
}
//redirect(base_url().'agency-daycare/add_new');
}
}
}
}
function edit($id_daycare)
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'Edit Daycare';
$data['active'] = 'daycare';
$data['legend'] = 'Edit Daycare';
$data['daycare'] = $this->Agency_daycare_model->get_daycare($id_daycare);
$data['button'] = 'Save';
$data['option'] = 'yes';
$data['action'] = 'user-section/agency-daycare/update_daycare/'.$id_daycare;
$id_agency = $this->session->userdata('id_agency');
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_daycare_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function update_daycare()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
$id_daycare = $this->input->post('id_daycare');
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('children','Children Quantity','trim|is_natural_no_zero|max_length[11]');
$this->form_validation->set_rules('owner','Owner','required|trim|max_length[45]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
if($this->form_validation->run()==FALSE)
{
$this->edit($id_daycare);
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$children = $this->input->post('children');
$owner = $this->input->post('owner');
$this->Agency_daycare_model->update_daycare($id_daycare,$name,$phone,$address,$children,$owner);
redirect(base_url().'user-section/agency-daycare');
}
}
}
}
}<file_sep><style type="text/css">
@import "compass/css3";
@import "compass/utilities/links/unstyled-link";
body{
font-family: 'Raleway', sans-serif;
background:url("http://www.wallpapersin.net/wallpapers/2013/03/Tokyo-Skyscrapers-485x728.jpg");
}
a{
@include unstyled-link();
color:#00BBBB;
&:hover{
color:#666;
}
}
#container{
width:400px;
height:500px;
@include box-shadow(#999 2px 2px 10px);
margin:0px auto;
}
.image{
height:275px;
background: center center no-repeat;
background-size:cover;
}
.info{
height:175px;
background:#FAFAFA;
text-align:center;
h1.name{
text-transform:uppercase;
margin:0px;
font-weight: 400;
letter-spacing: 3px;
color: #5C5B5B;
font-size: 30px;
padding: 25px 0px 0px 0px;
}
h3.position{
margin:0px;
}
p{
color:#666;
padding:0px 60px;
}
}
.social{
height:40px;
background:#DAE0DE;
text-align:center;
padding-top:20px;
i{
font-size:20px;
}
a{
margin:0px 10px;
color:#666;
&:hover{
color:#00BBBB;
}
}
}
</style>
<section class="features-tabbed section">
<div class="container">
<h2 class="page-title text-center"><i class="fa fa-user"></i> Show Employee</h2><br><br>
<div class="row">
<div class="col-lg-4">
<div class="social">
</div>
<div class="image" style="background-image: url(https://25.media.tumblr.com/f9cd81645ebd2f0904227b42784bbfae/tumblr_mj6r7nBfdV1s7aky5o2_r1_1280.jpg)"></div>
<div class="info">
<?php if(isset($employee)) { ?>
<h1><?= $employee->first_row()->name; ?></h1>
<h4><?= $employee->first_row()->type_employee_id ?></h4>
<h5>Gender: <?= $employee->first_row()->gender ?>, Birthdate: <?= $employee->first_row()->birthdate ?></h5>
<p>Phone: <?= $employee->first_row()->phone ?> Address: <?= $employee->first_row()->address ?><br>
Date of Hire: <?= $employee->first_row()->date_of_hired ?><br>
Date of Responsability: <?= $employee->first_row()->date_of_responsability ?>
</p>
<?php } else{ ?>
<h1 class="name"><NAME></h1>
<h3 class="position"><a href="#">Creative director</a></h3>
<p>Large bet on myself in round one pansy i more, but you go</p>
<?php }?>
</div>
<div class="social">
<a href=""><i class="fa fa-twitter"></i></a>
<a href=""><i class="fa fa-linkedin"></i></a>
<a href=""><i class="fa fa-facebook"></i></a>
<a href=""><i class="fa fa-google-plus"></i></a>
<a href=""><i class="fa fa-github-alt"></i></a>
</div>
</div>
<div class="col-lg-7">
<div class="panel panel-danger">Workshops</div>
<div id="dvData" class="table-responsive">
<table class="table table-bordered display" id="my_table">
<thead>
<tr>
<th>Name</th>
<th>Vendor</th>
<th>Finish Date</th>
<th>Qualification</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php foreach ($employee->result() as $emp) {?>
<tr>
<td>Child happiness</td>
<td><a href="show_employee/<?= $emp->id_employees ?>"><?= $emp->name ?></a></td>
<td><?= $emp->birthdate ?></td>
<td><?= $emp->id_employees ?></td>
<td class="success">Completed</td>
</tr>
<?php }?><!-- ENDFOREACH -->
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<script type="text/javascript" src="<?=base_url().'assets/js/main.js'?>"></script>
<file_sep><!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
<title><?=$title?></title>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100' rel='stylesheet' type='text/css'>
<!-- Global CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/bootstrap/css/bootstrap.min.css'?>">
<!-- Plugins CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/font-awesome/css/font-awesome.css'?>">
<link rel="stylesheet" href="<?=base_url().'assets/plugins/flexslider/flexslider.css'?>">
<!-- Theme CSS -->
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/css/styles.css'?>">
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/plugins/ui/jquery-ui.css'?>">
<script type="text/javascript" src="<?=base_url().'assets/plugins/jquery-1.12.3.min.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/ui/jquery-ui.min.js'?>"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="home-page">
<!-- ******HEADER****** -->
<header id="header" class="header navbar-fixed-top">
<div class="container">
<a href="<?=base_url().'page'?>"><img src="assets/images/logo.png" height="70" alt=""></a>
<!--//logo-->
<nav class="main-nav navbar-right" role="navigation">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><!--//nav-toggle-->
</div><!--//navbar-header-->
<div id="navbar-collapse" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<!-- Home -->
<?php if ($active == 'home') { ?>
<li class="active nav-item"><a href="<?=base_url().'page'?>">Home</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'page'?>">Home</a></li>
<?php }?>
<!-- About Us -->
<?php if ($active == 'about') { ?>
<li class="active nav-item"><a href="<?=base_url().'about'?>">About Us</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'about'?>">About Us</a></li>
<?php }?>
<!-- Pricing -->
<?php if ($active == 'pricing') { ?>
<li class="active nav-item"><a href="<?=base_url().'pricing'?>">Pricing</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'pricing'?>">Pricing</a></li>
<?php }?>
<!-- Contact Us -->
<?php if ($active == 'contact') { ?>
<li class="active nav-item"><a href="<?=base_url().'contact'?>">Contact Us</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'contact'?>">Contact Us</a></li>
<?php }?>
<!-- Log in -->
<?php if ($active == 'login') { ?>
<li class="active nav-item"><a href="<?=base_url().'login'?>">Log In</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'login'?>">Log In</a></li>
<?php }?>
<!-- Sign Up -->
<?php if ($active == 'signup') { ?>
<li class="active nav-item"><a href="<?=base_url().'signup'?>">Sign Up</a></li>
<?php } else { ?>
<li class="nav-item"><a href="<?=base_url().'signup'?>">Sign Up</a></li>
<?php }?>
<!--<li class="active nav-item"><a href="index.html">Home</a></li>
<li class="nav-item"><a href="about.html">About Us</a></li>
<li class="nav-item"><a href="pricing.html">Pricing</a></li>
<li class="nav-item"><a href="contact.html">Contact Us</a></li>
<li class="nav-item"><a href="login.html">Log in</a></li>
<li class="nav-item nav-item-cta last"><a class="btn btn-cta btn-cta-secondary" href="signup.html">Sign Up</a></li>-->
</ul><!--//nav-->
</div><!--//navabr-collapse-->
</nav><!--//main-nav-->
</div><!--//container-->
</header><!--//header--><file_sep>
<section class="features-tabbed section">
<div class="container">
<h2 class="page-title text-center"><i class="fa fa-archive"></i> Employee List</h2><br><br>
<div class="row">
<div class="blog-list blog-category-list">
<div id="dvData" class="table-responsive">
<table class="table table-bordered display" id="my_table">
<thead>
<tr>
<th>Name</th>
<th>phone</th>
<th>Gender</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php foreach ($employees->result() as $emp) {?>
<tr>
<td><a href="show_employee/<?= $emp->id_employees ?>"><?= $emp->name ?></a></td>
<td><?= $emp->phone ?></td>
<td><?= $emp->gender ?></td>
<td class="success">Completed</td>
</tr>
<?php }?><!-- ENDFOREACH -->
</tbody>
</table>
</div>
<input class="btn btn-cta btn-cta-primary" type="button" id="btnExport" value=" Export Table data into Excel " />
</div>
</div>
</div>
</section>
<script type="text/javascript" src="<?=base_url().'assets/js/main.js'?>"></script>
<file_sep><footer class="footer">
<div class="footer-content">
<div class="container">
<div class="row">
<div class="footer-col links col-md-2 col-sm-4 col-xs-12">
<div class="footer-col-inner">
<h3 class="title">About us</h3>
<!--<a href="favicon.ico" download="prueba">Descargar Archivo</a>-->
<!--
<ul class="list-unstyled">
<li><a href="#"><i class="fa fa-caret-right"></i>Who we are</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Press</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Blog</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Jobs</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Contact us</a></li>
</ul>-->
</div><!--//footer-col-inner-->
</div><!--//foooter-col-->
<div class="footer-col links col-md-2 col-sm-4 col-xs-12">
<div class="footer-col-inner">
<h3 class="title">Product</h3><!--
<ul class="list-unstyled">
<li><a href="#"><i class="fa fa-caret-right"></i>How it works</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>API</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Download Apps</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Pricing</a></li>
</ul>-->
</div><!--//footer-col-inner-->
</div><!--//foooter-col-->
<div class="footer-col links col-md-2 col-sm-4 col-xs-12 sm-break">
<div class="footer-col-inner">
<h3 class="title">Others</h3><!--
<ul class="list-unstyled">
<li><a href="#"><i class="fa fa-caret-right"></i>Help</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Documentation</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Terms of services</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>Privacy</a></li>
</ul>-->
</div><!--//footer-col-inner-->
</div><!--//foooter-col-->
<div class="footer-col connect col-xs-12 col-md-6">
<div class="footer-col-inner">
<ul class="social list-inline">
<li><a href="https://twitter.com/3rdwave_themes" target="_blank"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-google-plus"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
</ul>
<div class="form-container">
<p class="intro">Stay up to date with the latest news and offers from Child Care</p>
<form class="signup-form navbar-form">
<div class="form-group">
<input type="text" class="form-control" placeholder="Enter your email address">
</div>
<button type="submit" class="btn btn-cta btn-cta-primary">Subscribe Now</button>
</form>
</div><!--//subscription-form-->
</div><!--//footer-col-inner-->
</div><!--//foooter-col-->
<div class="clearfix"></div>
</div><!--//row-->
</div><!--//container-->
</div><!--//footer-content-->
<div class="bottom-bar">
<div class="container">
<small class="copyright">Template Copyright @ <a href="http://DiazApps.com/" target="_blank">DiazApps</a></small>
</div><!--//container-->
</div><!--//bottom-bar-->
</footer><!--//footer-->
<!-- Javascript -->
<script type="text/javascript" src="<?=base_url().'assets/plugins/bootstrap/js/bootstrap.min.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/bootstrap-hover-dropdown.min.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/back-to-top.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/jquery-placeholder/jquery.placeholder.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/FitVids/jquery.fitvids.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/flexslider/jquery.flexslider-min.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/js/main.js'?>"></script>
<!-- Vimeo video API -->
<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>
<script type="text/javascript" src="<?=base_url().'assets/js/vimeo.js'?>"></script>
</body>
</html> <file_sep> <div class="headline-bg contact-headline-bg">
</div><!--//headline-bg-->
<section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Last Steps</h2>
<p class="intro text-center">Follow the Steps Below Carefully</p>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<!--<form class="signup-form"> -->
<?php $attributes = array('class' => 'signup-form','target' => '_blank'); ?>
<?php echo form_open_multipart($action, $attributes) ?>
<div align="left">
<ol>
<li>Please Click "Subscribe" Button to Proceed to the Payment</li>
<li>Then Click "Finish" Button to Complete your Registration</li>
</ol>
</div><br><br>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="NYZ26APQA9EC8">
<input id="check" type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<?php echo form_close();?>
<?=$this->session->set_userdata('a_name', $name);?>
<?=$this->session->set_userdata('a_phone', $phone);?>
<?=$this->session->set_userdata('a_address', $address);?>
<?=$this->session->set_userdata('a_director', $director);?>
<?=$this->session->set_userdata('a_children', $children);?>
<?=$this->session->set_userdata('a_owner', $owner);?>
<?=$this->session->set_userdata('a_email', $email);?>
<?=$this->session->set_userdata('a_type', $type);?>
<?=$this->session->set_userdata('a_birthdate', $birthdate);?>
<?=$this->session->set_userdata('a_gender', $gender);?>
<br><br><br><div class="row">
<div class="form-container col-xs-6 col-md-6" align="center">
<a href="<?=base_url().'signup/create_pp_subscription'?>"><button id="sub" class="btn btn-block btn-cta-primary" disabled>Finish</button></a>
</div>
<div class="form-container col-xs-6 col-md-6" align="center">
<a class="btn btn-block btn-cta-primary" href="#" onclick="window.history.back();">Back</a>
</div>
</div>
<script language="JavaScript" type="text/javascript">
$(function() {
$("#check").on("click",function(e) {
$("#sub").prop("disabled",false); // NOT a toggle
});
});
</script>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
</div><!--//upper-wrapper--><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Login_model extends CI_Model {
public function __construct() {
parent::__construct();
}
public function login_user($email,$password)
{
//$this->db->cache_off();
$this->db->where('email',$email);
$this->db->where('password',$password);
$this->db->where('status','1');
$query = $this->db->get('users');
if($query->num_rows() == 1)
{
//$this->session->set_flashdata('usuario_incorrecto',$password);
return $query->row();
}else{
$this->session->set_flashdata('incorrect_user','<div class="alert alert-danger">Incorrect data, please try again<div>');
//$this->session->set_flashdata('usuario_incorrecto',$password);
redirect(base_url().'login','refresh');
}
}
public function get_user_rol($id_rol){
$this->db->where('id_role',$id_rol);
$query = $this->db->get('roles');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_age($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('agencies');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_emp($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('employees');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_ven($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('vendors');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_grade($id_grade){
$this->db->where('id_grades',$id_grade);
$query = $this->db->get('grades');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_section($id_section){
$this->db->where('id_section',$id_section);
$query = $this->db->get('sections');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_school($id_school){
$this->db->where('id_school',$id_school);
$query = $this->db->get('schools');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_adm($id_user){
$this->db->where('user_id',$id_user);
$query = $this->db->get('employees');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_sport($id_sport){
$this->db->where('id_sport',$id_sport);
$query = $this->db->get('sports');
if ($query->num_rows() == 1) {
return $query->row();
}
}
public function get_benefit($id_benefit){
$this->db->where('id_benefit',$id_benefit);
$query = $this->db->get('benefits');
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_all_sports(){
$query = $this->db->get_where('sports', array('status' => '1'));
//$query = $this->db->query('SELECT * FROM sports');
if ($query->num_rows() > 0) {
return $query->result();
}
}
function new_university($university,$address)
{
$data = array(
'name' => $university,
'address' => $address
);
$this->db->insert('universities', $data);
return $this->db->insert_id();
}
function new_director($name,$id_university,$id_user)
{
$data = array(
'first_name' => $name,
'id_university' => $id_university,
'id_user' => $id_user
);
$this->db->insert('directors', $data);
return $this->db->insert_id();
}
function new_admin($id_university,$id_user)
{
$data = array(
'id_university' => $id_university,
'id_user' => $id_user
);
$this->db->insert('administrators', $data);
return $this->db->insert_id();
}
function new_subscription($id_university,$ends,$sports_quantity,$sub_price)
{
$data = array(
'id_university' => $id_university,
'end_date' => $ends,
'sports_quantity' => $sports_quantity,
'price' => $sub_price
);
$this->db->insert('subscriptions', $data);
return $this->db->insert_id();
}
function new_sport_subscription($id_subscription,$id_sport)
{
$data = array(
'id_subscription' => $id_subscription,
'id_sport' => $id_sport
);
return $this->db->insert('subscription_sports', $data);
}
function new_sport_university($id_university,$id_sport)
{
$data = array(
'id_university' => $id_university,
'id_sport' => $id_sport
);
return $this->db->insert('university_sports', $data);
}
function new_benefit($id_university,$description,$tickets_home,$tickets_away)
{
$data = array(
'id_university' => $id_university,
'description' => $description,
'tickets_number_home' => $tickets_home,
'tickets_number_away' => $tickets_away
);
return $this->db->insert('benefits', $data);
}
function new_benefit_coach($id_university,$description,$tickets_home,$tickets_away,$is_coach)
{
$data = array(
'id_university' => $id_university,
'description' => $description,
'tickets_number_home' => $tickets_home,
'tickets_number_away' => $tickets_away,
'is_coach' => $is_coach
);
return $this->db->insert('benefits', $data);
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Employee_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
public function createEmployee($data){
$this->db->insert('employees', array('name'=>$data['name'],
//'address'=>$data['address'],
'address' =>$data['address'],
'daycare_id' => $data['daycare_id'],
'type_employee_id' => 1,
'user_id'=>$data['user_id'],
'phone'=>$data['phone'],
'birthdate'=>$data['birthdate'],
'gender'=>$data['gender']
));
}
public function getEmployees(){
$query = $this->db->get('employees');
echo $query->num_rows();
if($query->num_rows()>0)
return $query;
else
return false;
}
public function showEmployee($id){
$this->db->where('id_employees', $id);
$query = $this->db->get('employees');
if($query->num_rows()>0)
return $query;
else
return false;
}
public function getWorkshops($id){
$this->db->where('employee_id', $id);
$query = $this->db->get('employee_workshops');
if($query->num_rows()>0)
return $query;
else
return false;
}
}<file_sep><div class="headline-bg pricing-headline-bg">
</div><!--//headline-bg-->
<!-- ******Pricing Section****** -->
<section class="pricing section section-on-bg">
<div class="container">
<h2 class="title text-center">We have <span class="highlight">promotional</span> prices!</h2>
<p class="intro text-center">Our pricing is simple and you can cancel or change your plan at any time.</p>
<div class="price-cols row">
<div class="items-wrapper col-md-10 col-sm-12 col-xs-12 col-md-offset-1 col-sm-offset-0 col-xs-offset-0">
<div class="item price-1 col-md-4 col-sm-4 col-xs-12 text-center">
<div class="item-inner">
<div class="heading">
<h3 class="title">Inscription</h3>
<p class="price-figure"><span class="price-figure-inner"><span class="currency">$</span><span class="number">25</span><br /><span class="unit"> per month</span></span></p>
</div>
<div class="content">
<p>We will charge $ 25 per month per caregiver to the Child Care that subscribes after the promotional date</p>
<a class="btn btn-cta btn-cta-primary" href="<?=base_url().'signup'?>">Sign Up</a>
</div><!--//content-->
</div><!--//item-inner-->
</div><!--//item-->
<div class="item price-2 col-md-4 col-sm-4 col-xs-12 text-center best-buy">
<div class="item-inner">
<div class="heading">
<h3 class="title">Inscription</h3>
<p class="price-figure"><span class="price-figure-inner"><span class="currency">$</span><span class="number">10</span><br /><span class="unit">per month</span></span></p>
</div>
<div class="content">
<p>We will charge $10 monthly per caregiver to the Child Care which subscribe between today and June/15/2017. We will keep this price for a second year.</p>
<a class="btn btn-cta btn-cta-primary" href="<?=base_url().'signup'?>">Sign Up</a>
</div><!--//content-->
<div class="ribbon">
<div class="text">Promotion</div>
</div><!--//ribbon-->
</div><!--//item-inner-->
</div><!--//item-->
<div class="item price-3 col-md-4 col-sm-4 col-xs-12 text-center">
<div class="item-inner">
<div class="heading">
<h3 class="title">Inscription</h3>
<p class="price-figure"><span class="price-figure-inner"><span class="currency">$</span><span class="number">25</span><br /><span class="unit">per month</span></span></p>
</div>
<div class="content">
<p>We will charge $ 25 per month per caregiver to the Child Care that subscribes after the promotional date</p>
<a class="btn btn-cta btn-cta-primary" href="<?=base_url().'signup'?>">Sign Up</a>
</div><!--//content-->
</div><!--//item-inner-->
</div><!--//item-->
</div><!--//items-wrapper-->
</div><!--//row-->
</div><!--//container-->
</section><!--//pricing-->
<!-- ******CTA Section****** -->
<section id="cta-section" class="section cta-section text-center pricing-cta-section">
<div class="container">
<h2 class="title">Many people are looking for <span class="counting">Child Care</span> with certification that gives them the security they need to trust the most valuable they have</h2>
<p class="intro">What are you waiting for?</p>
<p><a class="btn btn-cta btn-cta-primary" href="<?=base_url().'signup'?>">Subscribe Now</a></p>
</div><!--//container-->
</section><!--//cta-section--><file_sep> <section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center"><?=$legend?></h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<?php $attributes = array('class' => 'signup-form'); ?>
<?php echo form_open_multipart(base_url().$action, $attributes)
?>
<div class="form-group">
<label class="sr-only">Category</label>
<?=form_error('cat')?>
<select class="form-control" name="cat" id="cat">
<?php if (!$workshop) {?>
<option value="-1">
Select
</option>
<?php }else{?>
<option value="<?=$workshop->category_id?>">
<?=$category?>
</option>
<?php } ?>
<?php
if (is_array($categories))
{
foreach($categories as $filaca)
{
if ($filaca->id_categories != $workshop->category_id) {
?>
<option value="<?=$filaca->id_categories?>">
<?=$filaca->description?>
</option>
<?php
}
}
}
?>
</select>
</div>
<div class="form-group">
<label class="sr-only" >Name</label>
<?=form_error('name')?>
<input type="text" class="form-control login-email" name="name" value="<?=is_null($workshop) ? set_value('name') : $workshop->name?>" placeholder="Name">
</div>
<div class="form-group">
<label class="sr-only" >Hours</label>
<?=form_error('hours')?>
<input type="number" name="hours" value="<?=is_null($workshop) ? set_value('hours') : $workshop->hours?>" class="form-control login-email" placeholder="Hours">
</div>
<div class="form-group">
<label class="sr-only" >Topic</label>
<?=form_error('topic')?>
<textarea id="topic" rows="5" name="topic" class="form-control" placeholder="Topic"><?=is_null($workshop) ? set_value('topic') : $workshop->topic?></textarea>
</div>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="id_workshop" value="<?=$workshop->id_workshops?>"/>
<button type="submit" class="btn btn-cta-primary"><?=$button?></button>
<button type="reset" id="res" class="btn btn-cta-primary">Cancel</button>
<a class="btn btn-default" href="#" onclick="window.history.back();">Back</a>
<!--<button type="submit" class="btn btn-block btn-cta-primary">Save</button> -->
</form>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
<script>
$(document).ready(function() {
$('#datepicker').datepicker({
dateFormat: 'mm/dd/yy',
maxDate: '01/31/1997'
});
});
</script><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Workshop_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
function get_employee($id_employees){
$query = $this->db->get_where('employees', array('id_employees' => $id_employees, 'status' => 1));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_employee_rules($years_diff, $type_employee_id){
$query = $this->db->get_where('rules', array('min_years <=' => $years_diff, 'max_years >=' => $years_diff, 'type_employee_id' => $type_employee_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_actual_scholar_year($daycare_id){
$today = date( 'Y-m-d H:i:s' );
$query = $this->db->get_where('scholar_years', array('start <=' => $today, 'finish >=' => $today, 'daycare_id' => $daycare_id, 'status' => 1));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_employee_scholar_year_enrollments($employee_id, $scholar_year_id){
$query = $this->db->get_where('enrollment', array('employee_id' => $employee_id, 'scholar_year_id' => $scholar_year_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_category_workshops($category_id){
$query = $this->db->get_where('workshops', array('category_id' => $category_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_workshop_enrollments($workshop_id){
$query = $this->db->get_where('workshops', array('category_id' => $category_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_employee_enrolls($employee_id){
$query = $this->db->get_where('enrollment', array('employee_id' => $employee_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_workshop($id_workshops){
$query = $this->db->get_where('workshops', array('id_workshops' => $id_workshops, 'status' => 1));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_vendor($id_vendor){
$query = $this->db->get_where('vendors', array('id_vendor' => $id_vendor, 'status' => 1));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_employee_schyear_workshop_enrolls($employee_id, $workshop_id, $scholar_year_id){
$query = $this->db->get_where('enrollment', array('employee_id' => $employee_id, 'workshop_id' => $workshop_id, 'scholar_year_id' => $scholar_year_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_employee_workshop_enrolls($employee_id, $workshop_id){
$query = $this->db->get_where('enrollment', array('employee_id' => $employee_id, 'workshop_id' => $workshop_id, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Agency_workshop_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
function get_workshops($id_agency){
$query = $this->db->get_where('workshops', array('agency_id' => $id_agency, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_categories(){
$query = $this->db->get_where('categories', array( 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_id_categories(){
$query = $this->db->get_where('categories', array('status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_category($id_category){
$query = $this->db->get_where('categories', array('id_categories' =>$id_category, 'status' => '1'));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_workshop($id_workshop){
$query = $this->db->get_where('workshops', array('id_workshops' =>$id_workshop, 'status' => '1'));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function new_user($email,$pw,$id_rol)
{
$data = array(
'email' => $email,
'password' => $pw,
'role_id' => $id_rol
);
$this->db->insert('users', $data);
return $this->db->insert_id();
}
function new_workshop($category,$id_agency,$name,$hours,$topic)
{
$data = array(
'category_id' => $category,
'agency_id' => $id_agency,
'name' => $name,
'hours' => $hours,
'topic' => $topic
);
$this->db->insert('workshops', $data);
return $this->db->insert_id();
}
function new_administrator($id_daycare,$id_user,$type_emp,$dirname)
{
$data = array(
'daycare_id' => $id_daycare,
'user_id' => $id_user,
'type_employee_id' => $type_emp,
'name' => $dirname
);
$this->db->insert('employees', $data);
return $this->db->insert_id();
}
function update_workshop($id_workshop,$category,$name,$hours,$topic){
$data = array(
'category_id' => $category,
'name' => $name,
'hours' => $hours,
'topic' => $topic
);
$this->db->where('id_workshops', $id_workshop);
return $this->db->update('workshops', $data);
}
}<file_sep><section class="features-tabbed section">
<div class="container">
<h2 class="page-title text-center"><i class="fa fa-archive"></i> All Workshops </h2><br><br>
<div class="row">
<div class="blog-list blog-category-list">
<div id="dvData" class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Workshop</th>
<th>Institution</th>
<th>Certificate</th>
<th>Credit hours</th>
<th>Missing hours</th>
<th>Estatus</th>
</tr>
<?php
if (is_array($workshops)) {
foreach($workshops as $i => $workshop)
{
?>
<tr>
<td><a class="" href="" data-toggle="modal" data-target="#myModal"><?=$workshop->name?></a></td>
<td><?=$vendors[$i]->name?></td>
<td>
<a href="<?php echo site_url("employee_workshops/completed_workshops"); ?>" rel="modal:open" class="btn btn-success btn-lg">Upload</a>
</td>
<td><?=$workshop->hours?></td>
<?php if ($completed_hours_cat[$workshop->category_id] >= $required_hours_cat[$workshop->category_id]) { ?>
<td class="success">0</td>
<td class="success">Completed</td>
<?php
} else if (($completed_hours_cat[$workshop->category_id] < $required_hours_cat[$workshop->category_id]) &&
($completed_hours_cat[$workshop->category_id] > 0)) {
?>
<td class="warning"><?=$required_hours_cat[$workshop->category_id] - $completed_hours_cat[$workshop->category_id] ?> </td>
<td class="warning">In Process</td>
<?php
} else {
?>
<td class="danger"><?= $required_hours_cat[$workshop->category_id] ?></td>
<td class="danger">Pending</td>
<?php
}
?>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
</div>
</section>
<file_sep><!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
<title><?=$title?></title>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300' rel='stylesheet' type='text/css'> <?=base_url().''?>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100' rel='stylesheet' type='text/css'>
<!-- Global CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/bootstrap/css/bootstrap.min.css'?>">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
<!-- Plugins CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/font-awesome/css/font-awesome.css'?>">
<link rel="stylesheet" href="<?=base_url().'assets/plugins/flexslider/flexslider.css'?>">
<!-- Theme CSS -->
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/css/styles.css'?>">
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/plugins/ui/jquery-ui.css'?>">
<script type="text/javascript" src="<?=base_url().'assets/plugins/jquery-1.12.3.min.js'?>"></script>
<script type="text/javascript" src="<?=base_url().'assets/plugins/ui/jquery-ui.min.js'?>"></script>
<!-- DATATABLES -->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.css">
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/css/datatables.css'?>">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<!--bootstrap -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="blog-page blog-archive-page">
<div class="wrapper">
<!-- ******HEADER****** -->
<header class="header header-blog">
<div class="container">
<h1 class="logo">
<a href="<?=base_url().'user-section/home'?>">ECT <span class="sub"><?=$title?></span></a>
</h1><!--//logo-->
<nav class="main-nav navbar-right" role="navigation">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><!--//nav-toggle-->
</div><!--//navbar-header-->
<div id="navbar-collapse" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="nav-item"><a href="<?=base_url().'user-section/home'?>">Home</a></li>
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">Register <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="<?=base_url().'user-section/agency-category'?>">Categories</a></li>
<li><a href="<?=base_url().'user-section/agency-workshop'?>">Workshops</a></li>
</ul>
</li><!--//dropdown-->
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">Reports <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="">Daycare Certifications</a></li>
<li><a href="">Personnel Certifications.</a></li>
<li><a href="reportexcel.html">To Export</a></li>
</ul>
</li><!--//dropdown-->
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#"><i class="fa fa-user"></i> <?=$this->session->userdata('name')?> <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="#">Profile</a></li>
<li><a href="#">Upload certificate</a></li>
<li><a href="<?=base_url().'login/logout_ci'?>">Sign Off</a></li>
</ul>
</li><!--//dropdown-->
</ul><!--//nav-->
</div><!--//navabr-collapse-->
</nav><!--//main-nav-->
</div><!--//container-->
</header><!--//header-->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Agency_vendor extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Agency_vendor_model');
//$this->load->model(array('Login_model','backend/Beneficiary_model','backend/Event_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
}
public function index()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$id_agency = $this->session->userdata('id_agency');
$id_vendor_arr = $this->Agency_vendor_model->get_id_vendors($id_agency);
if (is_array($id_vendor_arr))
{
foreach($id_vendor_arr as $c => $k)
{
$id_vendor = $id_vendor_arr[$c]->vendor_id;
$rowVendor[$c] = $this->Agency_vendor_model->get_vendor($id_vendor);
}
}
$data['vendor'] = $rowVendor;
$data['active'] = 'vendor';
$data['title'] = 'Vendor';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_vendor_list_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function add_new()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'New Vendor';
$data['active'] = 'vendor';
$data['option'] = 'no';
$data['legend'] = 'New Vendor';
$data['button'] = 'Create';
$data['action'] = 'user-section/agency-vendor/create_vendor/';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_vendor_view', $data);
$this->load->view('back/footer_view', $data);
}
else {
redirect(base_url().'home');
}
}
function create_vendor()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
//echo "probando";
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('birthdate','Date of birth','required|trim|max_length[45]');
$this->form_validation->set_rules('gender',"Gender",'required|callback_check_default2');
$this->form_validation->set_rules('email', 'E-mail', 'required|trim|valid_email|is_unique[users.email]');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
$this->form_validation->set_message('check_default2', 'Please select a Gender');
if($this->form_validation->run()==FALSE)
{
$this->add_new();
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$birthdate = $this->input->post('birthdate');
$date = new DateTime($birthdate);
$bdate =$date->format('Y-m-d');
$gender = $this->input->post('gender');
$email = $this->input->post('email');
$id_agency = $this->session->userdata('id_agency');
$password ='<PASSWORD>';
$pw = md5($password); $id_rol = 4;
//ENVÍAMOS LOS DATOS AL MODELO CON LA SIGUIENTE LÍNEA
$id_user = $this->Agency_vendor_model->new_user($email,$pw,$id_rol);
$id_vendor = $this->Agency_vendor_model->new_vendor($name,$phone,$address,$bdate,$gender,$id_user);
//$this->Agency_vendor_model->new_agency_vendor($id_agency,$id_vendor);
if ($this->Agency_vendor_model->new_agency_vendor($id_agency,$id_vendor) != Null) {
echo "<script> if (confirm('Do you want to continue?')){
window.location='".base_url()."user-section/agency-vendor/add-new"."'
} else {
window.location='".base_url()."user-section/agency-vendor"."'
}</script>";
}
//redirect(base_url().'agency-daycare/add_new');
}
}
}
}
function edit($id_vendor)
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
$data['title'] = 'Edit Vendor';
$data['active'] = 'vendor';
$data['legend'] = 'Edit Vendor';
$data['vendor'] = $this->Agency_vendor_model->get_vendor($id_vendor);
$date = new DateTime($data['vendor']->birthdate);
$bdate =$date->format('m/d/Y');
$data['bdate'] = $bdate;
$data['button'] = 'Save';
$data['option'] = 'yes';
$data['action'] = 'user-section/agency-vendor/update_vendor/';
$this->load->view('back/header_view', $data);
$this->load->view('back/agency/agency_vendor_view', $data);
$this->load->view('back/footer_view', $data);
}
}
function update_vendor()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'agency')
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
$id_vendor = $this->input->post('id_vendor');
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('name','Name','required|trim|max_length[250]');
$this->form_validation->set_rules('phone','Phone Number','required|trim|max_length[45]');
$this->form_validation->set_rules('address','Address','required|trim|max_length[250]');
$this->form_validation->set_rules('birthdate','Date of birth','required|trim|max_length[45]');
$this->form_validation->set_rules('gender',"Gender",'required|callback_check_default2');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
$this->form_validation->set_message('check_default2', 'Please select a Gender');
if($this->form_validation->run()==FALSE)
{
$this->edit($id_vendor);
}else{
$name = $this->input->post('name');
$phone = $this->input->post('phone');
$address = $this->input->post('address');
$birthdate = $this->input->post('birthdate');
$date = new DateTime($birthdate);
$bdate =$date->format('Y-m-d');
$gender = $this->input->post('gender');
$this->Agency_vendor_model->update_vendor($id_vendor,$name,$phone,$address,$bdate,$gender);
redirect(base_url().'user-section/agency-vendor');
}
}
}
}
function check_default2($post_string)
{
return $post_string == '-1' ? FALSE : TRUE;
}
}<file_sep>header_view.php<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
<title><?=$title?></title>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300' rel='stylesheet' type='text/css'> <?=base_url().''?>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100' rel='stylesheet' type='text/css'>
<!-- Global CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/bootstrap/css/bootstrap.min.css'?>">
<!-- Plugins CSS -->
<link rel="stylesheet" href="<?=base_url().'assets/plugins/font-awesome/css/font-awesome.css'?>">
<link rel="stylesheet" href="<?=base_url().'assets/plugins/flexslider/flexslider.css'?>">
<!-- Theme CSS -->
<link id="theme-style" rel="stylesheet" href="<?=base_url().'assets/css/styles.css'?>">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="blog-page blog-archive-page">
<div class="wrapper">
<!-- ******HEADER****** -->
<header class="header header-blog">
<div class="container">
<h1 class="logo">
<a href="<?=base_url().'user-section/home'?>">ETC <span class="sub">Employee</span></a>
</h1><!--//logo-->
<nav class="main-nav navbar-right" role="navigation">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button><!--//nav-toggle-->
</div><!--//navbar-header-->
<div id="navbar-collapse" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="nav-item"><a href="<?=base_url().'user-section/home'?>">Home</a></li>
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">Workshops <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="<?=base_url().'workshops/completed'?>">Completed</a></li>
<li><a href="<?=base_url().'workshops/all'?>">All</a></li>
</ul>
</li><!--//dropdown-->
<li class="nav-item"><a href="<?=base_url().'quiz/preservice'?>">Quiz</a></li>
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">Reports <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="">All Certifications</a></li>
</ul>
</li><!--//dropdown-->
<li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#"><i class="fa fa-user"></i> <?=$this->session->userdata('name')?> <i class="fa fa-angle-down"></i></a>
<ul class="dropdown-menu">
<li><a href="#">Profile</a></li>
<li><a href="#">Upload certificate</a></li>
<li><a href="<?=base_url().'login/logout_ci'?>">Sign Off</a></li>
</ul>
</li><!--//dropdown-->
</ul><!--//nav-->
</div><!--//navabr-collapse-->
</nav><!--//main-nav-->
</div><!--//container-->
</header><!--//header--> <file_sep> <section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center"><?=$legend?></h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<?php $attributes = array('class' => 'signup-form'); ?>
<?php echo form_open_multipart(base_url().$action, $attributes)
?>
<div class="form-group">
<label class="sr-only" >Name</label>
<?=form_error('name')?>
<input type="text" class="form-control login-email" name="name" value="<?=is_null($daycare) ? set_value('name') : $daycare->name?>" placeholder="Name">
</div>
<div class="form-group">
<label class="sr-only" >Phone Number</label>
<?=form_error('phone')?>
<input type="text" class="form-control" name="phone" value="<?=is_null($daycare) ? set_value('phone') : $daycare->phone?>" class="form-control login-email" placeholder="Phone Number">
</div>
<div class="form-group">
<label class="sr-only" >Address</label>
<?=form_error('address')?>
<input type="text" name="address" value="<?=is_null($daycare) ? set_value('address') : $daycare->address?>" class="form-control login-email" placeholder="Address">
</div>
<div class="form-group">
<label class="sr-only" >Children quantity</label>
<?=form_error('children')?>
<input type="number" name="children" value="<?=is_null($daycare) ? set_value('children') : $daycare->children_quantity?>" class="form-control login-email" placeholder="Children Quantity">
</div>
<div class="form-group">
<label class="sr-only" >Owner</label>
<?=form_error('owner')?>
<input type="text" name="owner" value="<?=is_null($daycare) ? set_value('owner') : $daycare->owner?>" class="form-control login-email" placeholder="Owner">
</div>
<?php if (!$daycare) { ?>
<div class="form-group">
<label class="sr-only" >Director's Name</label>
<?=form_error('dirname')?>
<input type="text" class="form-control login-email" name="dirname" value="<?=is_null($daycare) ? set_value('dirname') : $dirname?>" placeholder="Director's Name">
</div>
<div class="form-group">
<label class="sr-only" for="signup-email">Your email</label>
<?=form_error('email')?>
<input id="signup-email" type="email" name="email" value="<?=is_null($daycare) ? set_value('email') : $email?>" class="form-control login-email" placeholder="e-mail">
</div><!--//form-group-->
<?php
}?>
<input type="hidden" name="grabar" value="si"/>
<input type="hidden" name="id_daycare" value="<?=$daycare->id_daycares?>"/>
<button type="submit" class="btn btn-cta-primary"><?=$button?></button>
<button type="reset" id="res" class="btn btn-cta-primary">Cancel</button>
<a class="btn btn-default" href="#" onclick="window.history.back();">Back</a>
<!--<button type="submit" class="btn btn-block btn-cta-primary">Save</button> -->
</form>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section--><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Employee_workshops extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Workshop_model');
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
}
public function completed_workshops()
{
if($this->session->userdata('roles') == TRUE &&
$this->session->userdata('roles') == 'employee')
{
$id_employee = $this->session->userdata('id_employee');
$employee = $this->Workshop_model->get_employee($id_employee);
$enrolls = $this->Workshop_model->get_employee_enrolls($id_employee);
if( is_array($enrolls)){
foreach ($enrolls as $i => $enroll) {
$workshops[$i] = $this->Workshop_model->get_workshop($enroll->workshop_id);
$vendor_id = $workshops[$i]->vendor_id;
$vendors[$i] = $this->Workshop_model->get_vendor($vendor_id);
}
}
$data['active'] = 'home'; //TODO
$data['workshops'] = $workshops;
$data['vendors'] = $vendors;
$this->load->view('back/employee/header_view', $data);
$this->load->view('back/employee/completed_workshops', $data);
$this->load->view('back/footer_view', $data);
}
else
{
redirect(base_url().'login');
}
}
public function all_workshops()
{
if($this->session->userdata('roles') == TRUE &&
$this->session->userdata('roles') == 'employee')
{
$id_employee = $this->session->userdata('id_employee');
$employee = $this->Workshop_model->get_employee($id_employee);
$daycare_id = $employee->daycare_id;
$date_of_hired = new DateTime($employee->date_of_hired);
$today = new DateTime( date( 'Y-m-d H:i:s' ) );
$diff = $today->diff($date_of_hired);
$years_diff = $diff->y;
$rules = $this->Workshop_model->get_employee_rules($years_diff, $employee->type_employee_id);
$actual_scholar_year = $this->Workshop_model->get_actual_scholar_year($daycare_id);
$ind = 0;
if (is_array($rules)){
foreach ($rules as $i => $rule) {
$category_workshops = $this->Workshop_model->get_category_workshops($rule->category_id);
$hours = 0;
if (is_array($category_workshops)){
foreach ($category_workshops as $j => $category_workshop) {
$workshops[$ind] = $category_workshop;
$vendor_id = $workshops[$ind]->vendor_id;
$vendors[$ind] = $this->Workshop_model->get_vendor($vendor_id);
$ind++;
if (is_null($actual_scholar_year)){
$workshop_enrolls = $this->Workshop_model->get_employee_workshop_enrolls($id_employee, $category_workshop->id_workshops, $actual_scholar_year->id_scholar_years);
} else {
$workshop_enrolls = $this->Workshop_model->get_employee_schyear_workshop_enrolls($id_employee, $category_workshop->id_workshops, $actual_scholar_year->id_scholar_years);
}
if (is_array($workshop_enrolls)){
foreach ($workshop_enrolls as $k => $workshop_enroll) {
$hours = $hours + $category_workshop->hours;
}
}
}
}
$completed_hours_cat[$rule->category_id] = $hours;
$required_hours_cat[$rule->category_id] = $rule->hours;
}
}
$data['active'] = 'home'; //TODO
$data['workshops'] = $workshops;
$data['vendors'] = $vendors;
$data['completed_hours_cat'] = $completed_hours_cat;
$data['required_hours_cat'] = $required_hours_cat;
$this->load->view('back/employee/header_view', $data);
$this->load->view('back/employee/all_workshops', $data);
$this->load->view('back/footer_view', $data);
}
else
{
redirect(base_url().'login');
}
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
function get_students($id_school){
$query = $this->db->get_where('students', array('id_school' => $id_school, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_student($id_student){
$query = $this->db->get_where('students', array('id_student' => $id_student));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function get_courses_grades($id_school,$id_grade){
$query = $this->db->get_where('courses', array('id_school' => $id_school,'id_grade' => $id_grade, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
}<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Agency_vendor_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
function get_vendors($id_agency){
$query = $this->db->get_where('vendors', array('agency_id' => $id_agency, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_id_vendors($id_agency){
$query = $this->db->get_where('agency_vendor', array('agency_id' => $id_agency, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_courses_grades($id_school,$id_grade){
$query = $this->db->get_where('courses', array('id_school' => $id_school,'id_grade' => $id_grade, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_vendor($id_vendor){
$query = $this->db->get_where('vendors', array('id_vendor' => $id_vendor, 'status' => '1'));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function new_user($email,$pw,$id_rol)
{
$data = array(
'email' => $email,
'password' => $pw,
'role_id' => $id_rol
);
$this->db->insert('users', $data);
return $this->db->insert_id();
}
function new_vendor($name,$phone,$address,$birthdate,$gender,$id_user)
{
$data = array(
'name' => $name,
'phone' => $phone,
'address' => $address,
'birthdate' => $birthdate,
'gender' => $gender,
'user_id' => $id_user
);
$this->db->insert('vendors', $data);
return $this->db->insert_id();
}
function new_agency_vendor($id_agency,$id_vendor)
{
$data = array(
'agency_id' => $id_agency,
'vendor_id' => $id_vendor
);
return $this->db->insert('agency_vendor', $data);
}
function update_vendor($id_vendor,$name,$phone,$address,$birthdate,$gender){
$data = array(
'name' => $name,
'phone' => $phone,
'address' => $address,
'birthdate' => $birthdate,
'gender' => $gender
);
$this->db->where('id_vendor', $id_vendor);
return $this->db->update('vendors', $data);
}
}<file_sep><section class="story-section section section-on-bg">
<div class=" container text-center">
<div class="" >
<div class="team row">
<h3 class="title">Daycare List</h3>
<div class="text-center"><a href="<?=base_url().'user-section/agency-daycare/add-new'?>"><button type="button" class="btn btn-cta btn-cta-primary">Add New <i class="fa fa-plus"></i></button></a></div><br><br>
<div class="text-center" id="test-list">
<i class="fa fa-search"></i> <input type="text" class="search"><br><br><br>
<ul style="list-style:none;" class="list">
<?php
if (is_array($arrDay))
{
foreach ($arrDay as $k => $n)
{
?>
<li>
<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-1.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><?=$arrDay[$k]->name?></span><br />
<span class="phone"><?=$arrDay[$k]->phone?></span>
</figcaption>
</figure><!--//profile-->
<div class="social">
<ul class="social-list list-inline">
<li><a href="profile.html"><i class="fa fa-eye"></i></a></li>
<li><a href="<?=base_url().'user-section/agency-daycare/edit/'.$arrDay[$k]->id_daycares?>"><i class="fa fa-pencil"></i></a></li>
<li><a href="<?=base_url().'user-section/agency-daycare/delete/'.$arrDay[$k]->id_daycares?>"><i class="fa fa-trash"></i></a></li>
</ul><!--//social-list-->
</div><!--//social-->
</div><!--//member-inner-->
<!--<div><br><a href="<?=base_url().'user-section/agency-daycare/add-new'?>"><button type="button" class="btn btn-cta btn-primary">Add Director <i class="fa fa-plus"></i></button></a></div>-->
</div>
</li>
<?php
}
}?>
</ul>
<br style="clear: both !important;">
<div class="text-center">
<ul class="pagination">
</ul><!--//member-->
</div>
<!--<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-2.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><NAME></span><br />
<span class="job-title">Childcare Director</span>
</figcaption>
</figure><!--//profile
<div class="social">
<ul class="social-list list-inline">
<li><a href="#"><i class="fa fa-eye"></i></a></li>
<li><a href="#"><i class="fa fa-pencil"></i></a></li>
</ul><!--//social-list
</div><!--//social
</div><!--//member-inner
</div><!--//member
<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-3.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><NAME></span><br />
<span class="job-title">0 - 3 month Room Care provider</span>
</figcaption>
</figure><!--//profile
<div class="social">
<ul class="social-list list-inline">
<li><a href="#"><i class="fa fa-eye"></i></a></li>
<li><a href="#"><i class="fa fa-pencil"></i></a></li>
</ul><!--//social-list
</div><!--//social
</div><!--//member-inner
</div><!--//member
<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-4.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><NAME></span><br />
<span class="job-title">Toddler Room Teacher</span>
</figcaption>
</figure><!--//profile
<div class="social">
<ul class="social-list list-inline">
<li><a href="#"><i class="fa fa-eye"></i></a></li>
<li><a href="#"><i class="fa fa-pencil"></i></a></li>
</ul><!--//social-list
</div><!--//social
</div><!--//member-inner
</div><!--//member
<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-5.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><NAME></span><br />
<span class="job-title">Childcare Director</span>
</figcaption>
</figure><!--//profile
<div class="social">
<ul class="social-list list-inline">
<li><a href="#"><i class="fa fa-eye"></i></a></li>
<li><a href="#"><i class="fa fa-pencil"></i></a></li>
</ul><!--//social-list
</div><!--//social
</div><!--//member-inner
</div><!--//member
<div class="member col-md-4 col-sm-6 col-xs-12">
<div class="member-inner">
<figure class="profile">
<img class="img-responsive" src="<?=base_url().'assets/images/team/member-6.png'?>" alt=""/>
<figcaption class="info">
<span class="name"><NAME></span><br />
<span class="job-title">0 - 3 month Room Care provider</span>
</figcaption>
</figure><!--//profile
<div class="social">
<ul class="social-list list-inline">
<li><a href="#"><i class="fa fa-eye"></i></a></li>
<li><a href="#"><i class="fa fa-pencil"></i></a></li>
</ul><!--//social-list
</div><!--//social
</div><!--//member-inner
</div><!--//member
-->
</div><!--//team-->
<!--<div class="pagination-container text-center">
<ul class="pagination">
<li class="disabled"><a href="#">«</a></li>
<li class="active"><a href="#">1<span class="sr-only">(current)</span></a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul>
</div><!--//pagination-container-->
</div><!--//story-container-->
</div><!--//container-->
</section><!--//story-video-->
<script type="text/javascript">
$(document).ready(function() {
var monkeyList = new List('test-list', {
valueNames: ['name', 'phone'],
page: 3,
pagination: true
});
});
</script><file_sep><!-- ******Features Section****** -->
<section class="features-tabbed section">
<div class="container"><br>
<h2 class="page-title text-center"><i class="fa fa-archive"></i> Courses to be done</h2><br><br>
<div class="row">
<div class="blog-list blog-category-list">
<article>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<tr class="active">
<th>Date</th>
<th>Course</th>
<th>Institution</th>
<th>Credit hours</th>
<th>To Register</th>
</tr>
<?php
if (is_array($courses)) {
foreach($courses as $course)
{
?>
<tr>
<td></td>
<td><a href="" data-toggle="modal" data-target=".bs-example-modal-lg"><?=$course->name?></a></td>
<td></td>
<td><?=$course->hours?></td>
<td>
<a href="<?=base_url().'employee_courses/enroll/'.$course->id_workshops?>" class="btn btn-success btn-lg" onclick="if(confirma() == false) return false;">
Enroll</i>
</a>
</td>
</tr>
<?php
}
}
?>
</table>
</div>
<div class="pagination-container text-center">
<ul class="pagination">
<li class="disabled"><a href="#">«</a></li>
<li class="active"><a href="#">1<span class="sr-only">(current)</span></a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul><!--//pagination-->
</div><!--//pagination-container-->
</article>
</div><!--//blog-list-->
</div><!--//row-->
</div><!--//container-->
</section><!--//features-tabbed-->
</div><!--//wrapper-->
<script type="text/javascript">
function confirma(){
return window.confirm("Are you sure you want to enroll?");
}
</script><file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Employee_quiz extends CI_Controller {
public function __construct() {
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE));
$this->load->model('back/Quiz_model');
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
}
public function preservice_quiz()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'employee')
{
$data['active'] = 'home';
$daycare_id = $this->session->userdata('id_daycare');
$quiz = $this->Quiz_model->get_daycare_quiz($daycare_id);
$questions = $this->Quiz_model->get_quiz_questions($quiz->id_quizzes);
foreach ($questions as $i => $question) {
if ($question->questiontype_id == 1) {
$solutions[$question->id_questions] = $this->Quiz_model->get_question_solutions($question->id_questions);
}
}
$data['questions'] = $questions;
$data['solutions'] = $solutions;
$data['quiz_description'] = $quiz->description;
$this->load->view('back/employee/header_view', $data);
$this->load->view('back/employee/quiz_view', $data);
$this->load->view('back/footer_view', $data);
}else {
redirect(base_url().'login');
}
}
function request_transfer()
{
if($this->session->userdata('roles') == TRUE && $this->session->userdata('roles') == 'employee')
{
if(isset($_POST['grabar']) and $_POST['grabar'] == 'si')
{
//SI EXISTE EL CAMPO OCULTO LLAMADO GRABAR CREAMOS LAS VALIDACIONES
$this->form_validation->set_rules('daycare','Daycare','required|trim|xss_clean');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
if($this->form_validation->run()==FALSE)
{
$this->index();
}
else
{
//EN CASO CONTRARIO PROCESAMOS LOS DATOS
$id_new_daycare = $this->input->post('daycare');
$id_employee = $this->session->userdata('id_employee');
$id_old_daycare = $this->session->userdata('id_daycare');
$this->Transfer_model->new_transfer_request($id_employee,$id_old_daycare,$id_new_daycare);
redirect(base_url()); //TODO
}
}
}
}
}<file_sep><?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Daycare extends CI_Controller {
public function __construct(){
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$this->load->model(array('Period_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
$this->load->model('back/employee_model');
}
function personnel_registration(){
$data['title'] = 'Personnel Registration';
$data['active'] = 'Personnel_Registration';
$this->load->view('back/daycare/header_view_k', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('back/daycare/personnel_registration', $data);
$this->load->view('back/footer_view', $data);
}
function create_employee(){
$data = array(
'name' => $this->input->post('name'),
'address' =>$this->input->post('address'),// $this->input->post('address'),
'daycare_id' => 1,
'user_id'=>1,
'phone'=>$this->input->post('phone'),
'birthdate'=>$this->input->post('birthdate'),
'gender'=>$this->input->post('gender'),
);
$this->employee_model->createEmployee($data);
$this->employee_list();
}
function employee_list(){
$data['title'] = 'Employee List';
$data['active'] = 'Employee_List';
$data['employees'] = $this->employee_model->getEmployees();
$this->load->view('back/daycare/header_view_k', $data);
$this->load->view('back/daycare/employee_list', $data);
$this->load->view('back/footer_view', $data);
}
function show_employee(){
$data['title'] = 'Employee List';
$data['active'] = 'Employee_List';
#$data['employees'] = $this->employee_model->getEmployees();
$data['segmento'] = $this->uri->segment(3);
$this->load->view('back/daycare/header_view_k', $data);
if($data['segmento']){
$data['employee'] = $this->employee_model->showEmployee($data['segmento']);
$data['workshops'] = $this->employee_model->getWorkshops($data['segmento']);
$this->load->view('back/daycare/show_employee', $data);
}
else{
$this->load->view('back/daycare/show_employee', $data);
}
$this->load->view('back/footer_view', $data);
}
}
?><file_sep> <?php
$toForm2 = array('class' => 'contact-form', 'id' => 'contact-form');
$submit3 = array('name' => 'submit', 'value' => 'Send Message', 'title' => 'Send Message', 'class' => 'btn btn-block btn-cta btn-cta-primary', 'type' => 'submit');
?>
<div class="headline-bg contact-headline-bg">
</div><!--//headline-bg-->
<!-- ******Contact Section****** -->
<section class="contact-section section section-on-bg">
<div class="container">
<h2 class="title text-center">Contact Us</h2>
<p class="intro text-center">We would love to hear from you. Because your opinion is important to us.</p>
<?=form_open_multipart(base_url().'contact/request', $toForm2)?>
<div class="row text-center">
<div class="contact-form-inner col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="row">
<div class="form-group col-xs-12 col-sm-6">
<?php echo form_error('nameCon'); ?>
<label class="sr-only" for="nameCon">Your name</label>
<input type="text" class="form-control" value = "<?php echo set_value('nameCon'); ?>" id="nameCon" name="nameCon" placeholder="Your name" minlength="2" required>
</div>
<div class="form-group col-xs-12 col-sm-6">
<?php echo form_error('emailCon'); ?>
<label class="sr-only" for="emailCon">Email address</label>
<input type="email" class="form-control" value="<?php echo set_value('emailCon'); ?>" id="emailCon" name="emailCon" placeholder="Your email address" required>
</div>
<div class="form-group col-xs-12">
<?php echo form_error('messageCon'); ?>
<label class="sr-only" for="messageCon">Your message</label>
<textarea class="form-control" id="messageCon" name="messageCon" placeholder="Enter your message" rows="12" required><?php echo set_value('messageCon');?></textarea>
</div>
<div class="form-group col-xs-12">
<input type="hidden" name="grabar" value="si"/>
<?=form_submit($submit3)?>
</div>
</div><!--//row-->
</div>
</div><!--//row-->
<div id="form-messages"></div>
<?=form_close()?>
</div><!--//container-->
</section><!--//contact-section-->
<!-- ******Other Contact Section****** -->
<section class="contact-other-section section">
<div class="container text-center">
<h2 class="title">Other ways to reach us</h2>
<p class="intro">You can also get in touch by the following means. </p>
<div class="row">
<ul class="other-info list-unstyled col-md-6 col-sm-10 col-xs-12 col-md-offset-3 col-sm-offset-1 xs-offset-0" >
<li><i class="fa fa-envelope-o"></i><a href="#"><EMAIL></a></li>
<li><i class="fa fa-twitter"></i><a href="https://twitter.com/3rdwave_media" target="_blank">@Day_Care</a></li>
<li><i class="fa fa-phone"></i><a href="tel:+0800123456">0800 123 456</a></li>
<li><i class="fa fa-map-marker"></i>Queen Square <br /> 56 College Green Road<br />BS1 XR18<br />Bristol<br />UK</li>
</ul>
</div><!--//row-->
</div><!--//container-->
</section><!--//contact-other-section-->
<file_sep><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Agency_daycare_model extends CI_Model
{
public function construct()
{
parent::__construct();
}
function get_daycares($id_agency){
$query = $this->db->get_where('daycares', array('agency_id' => $id_agency, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_courses_grades($id_school,$id_grade){
$query = $this->db->get_where('courses', array('id_school' => $id_school,'id_grade' => $id_grade, 'status' => '1'));
// si hay resultados
if ($query->num_rows() > 0) {
return $query->result();
}
}
function get_daycare($id_daycare){
$query = $this->db->get_where('daycares', array('id_daycares' =>$id_daycare, 'status' => '1'));
// si hay resultados
if ($query->num_rows() == 1) {
return $query->row();
}
}
function new_user($email,$pw,$id_rol)
{
$data = array(
'email' => $email,
'password' => $pw,
'role_id' => $id_rol
);
$this->db->insert('users', $data);
return $this->db->insert_id();
}
function new_daycare($id_agency,$name,$phone,$address,$children,$owner)
{
$data = array(
'agency_id' => $id_agency,
'name' => $name,
'phone' => $phone,
'address' => $address,
'children_quantity' => $children,
'owner' => $owner
);
$this->db->insert('daycares', $data);
return $this->db->insert_id();
}
function new_administrator($id_daycare,$id_user,$type_emp,$dirname)
{
$data = array(
'daycare_id' => $id_daycare,
'user_id' => $id_user,
'type_employee_id' => $type_emp,
'name' => $dirname
);
$this->db->insert('employees', $data);
return $this->db->insert_id();
}
function update_daycare($id_daycare,$name,$phone,$address,$children,$owner){
$data = array(
'name' => $name,
'phone' => $phone,
'address' => $address,
'children_quantity' => $children,
'owner' => $owner
);
$this->db->where('id_daycares', $id_daycare);
return $this->db->update('daycares', $data);
}
}<file_sep> <?php
$submit = array('name' => 'submit', 'value' => 'Log In', 'title' => 'Log In', 'type' => 'submit', 'class' => 'btn btn-block btn-cta-primary');
$reset = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-lg btn-login btn-block');
$submit2 = array('name' => 'submit', 'value' => 'Register', 'title' => 'Sign in', 'class' => 'btn btn-main featured');
$reset2 = array('name' => 'reset', 'value' => 'Cancel', 'title' => 'clear', 'class' => 'btn btn-main featured');
$description = array('type' => 'text','name' => 'description','id' => 'description', 'placeholder' => 'description', 'class' => 'form-control login-email');
$address = array('type' => 'text','name' => 'address','id' => 'address', 'placeholder' => 'Address', 'class' => 'form-control login-email');
$phone = array('type' => 'text','name' => 'phone','id' => 'phone', 'placeholder' => 'Phone', 'class' => 'form-control login-email');
$birthdate = array('type' => 'date','name' => 'birthdate','id' => 'birthdate', 'placeholder' => 'Birthdate', 'class' => 'form-control login-email');
$gender = array('type' => 'text','name' => 'gender','id' => 'gender', 'placeholder' => 'Gender', 'class' => 'form-control login-email');
$position = array('type' => 'text','name' => 'position','id' => 'position', 'placeholder' => 'Position', 'class' => 'form-control login-email');
$hired = array('type' => 'date','name' => 'hired','id' => 'hired', 'placeholder' => 'hired', 'class' => 'form-control login-email');
$responsability = array('type' => 'date','name' => 'responsability','id' => 'responsability', 'placeholder' => 'responsability', 'class' => 'form-control login-email');
$toForm = array('class' => 'login-form');
$toForm2 = array('class' => 'subscription-form mailchimp');
$submit3 = array('name' => 'submit', 'value' => 'Submit Now', 'title' => 'Submit Now', 'class' => 'btn btn-main featured');
//$registrarse = array('name' => 'button', 'value' => 'Registrarse', 'title' => 'Registrarse')
?>
<!-- ******Signup Section****** -->
<section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Employee Registration</h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<?=form_open(base_url().'daycare/create_employee', $toForm)?>
<div class="form-group">
<?=form_error('name')?>
<label class="sr-only" for="name">Description</label>
<?=form_input($description)?>
</div>
<div class="form-group">
<?=form_error('position')?>
<label class="sr-only" for="Gender">Gender</label>
<select name="gender" class="form-control login-email">
<option value="Male" selected="selected">Male</option>
<option value="Female">Female</option>
<!-----Displaying fetched cities in options using foreach loop
<?/*php foreach($employee_types as $type):?>
<option value="<?//php echo $type->id_employee_types ?>"><?php echo $type->name?></option>
<?//php endforeach;*/?>---->
</select>
</div>
<div class="form-group">
<?=form_error('birthdate')?>
<label class="sr-only" for="birthdate">Birthdate</label>
<span class="pull-left">Birthdate:</span>
<?=form_input($birthdate)?>
</div>
<div class="form-group">
<?=form_error('hired')?>
<label class="sr-only" for="hired">Hire Date</label>
<span class="pull-left">Hire date:</span>
<?=form_input($hired)?>
</div>
<div class="form-group">
<?=form_error('responsability')?>
<label class="sr-only" for="responsability">Responsability date</label>
<span class="pull-left">Responsability Date:</span>
<?=form_input($responsability)?>
</div>
<button type="submit" class="btn btn-block btn-cta-primary">Save</button>
<?=form_close()?>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
<file_sep> <section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Transfer Request</h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12" align="center">
<?php $attributes = array('class' => 'form-horizontal'); ?>
<?php echo form_open_multipart(base_url().'employee/transfer/request_transfer', $attributes) ?>
</br>
<div class="form-group">
<label class="sr-only" > New Daycare</label>
<?php echo form_error('daycare'); ?>
<select name="daycare" id="daycare">
<option>Select a daycare</option>
<?php
foreach($daycares as $daycare)
{
?>
<option value="<?=$daycare -> id_daycares?>">
<?=$daycare -> name?>
</option>
<?php
}
?>
</select>
</div>
<input type="hidden" name="grabar" value="si"/>
</br>
<button type="submit" class="btn btn-block btn-cta-primary">Send</button>
<?php echo form_close() ?>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
<file_sep><?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Agency extends CI_Controller {
function __construct(){
parent::__construct();
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$this->load->model(array('Period_model'));
$this->load->library(array('form_validation'));
$this->load->helper(array('url','form'));
$this->load->database('default');
//$this->load->helper('server_root');
//$this->removeCache();
}
function index(){
$data['title'] = 'Daycare Registration';
$data['active'] = 'daycare_registration';
$this->load->view('back/header_view', $data);
//$this->load->view('front/nav_view', $data);
$this->load->view('back/agency/daycare_registration', $data);
$this->load->view('back/footer_view', $data);
}
}
?><file_sep> <section class="signup-section access-section section">
<div class="container">
<div class="row">
<div class="form-box col-md-offset-2 col-sm-offset-0 xs-offset-0 col-xs-12 col-md-8">
<div class="form-box-inner">
<h2 class="title text-center">Pre-service Quiz</h2>
<div class="row">
<div class="form-container col-xs-12 col-md-12">
<?php $attributes = array('class' => 'form-horizontal'); ?>
<?php echo form_open_multipart(base_url().'employee/transfer/request_transfer', $attributes) ?>
</br>
<?php
foreach($questions as $question)
{
?>
<div class="form-group">
<b><?=$question->description?></b><br><br>
<?php echo form_error('question'); ?>
<?php
switch($question->questiontype_id)
{
case 1:
foreach($solutions[$question->id_questions] as $sols)
{
?>
<input type="radio" name=<?=$question->id_questions?> value=<?=$sols->id_solutions?>> <?=$sols->description?><br>
<?php
}
break;
case 2:
?>
<input type="radio" name=<?=$question->id_questions?> value="yes"> YES <br>
<input type="radio" name=<?=$question->id_questions?> value="no"> NO <br>
<?php
break;
case 3:
?>
<textarea id=<?=$question->id_questions?> name=<?=$question->id_questions?> rows="4" style="width:100%"></textarea>
<?php
break;
}
?>
</div>
<?php
}
?>
<input type="hidden" name="grabar" value="si"/>
</br>
<button type="submit" class="btn btn-block btn-cta-primary">Send</button>
<?php echo form_close() ?>
</div><!--//form-container-->
</div><!--//row-->
</div><!--//form-box-inner-->
</div><!--//form-box-->
</div><!--//row-->
</div><!--//container-->
</section><!--//signup-section-->
<file_sep><div class="bg-slider-wrapper">
<div class="flexslider bg-slider">
<ul class="slides">
<li class="slide slide-1"></li>
<li class="slide slide-2"></li>
<li class="slide slide-3"></li>
</ul>
</div>
</div><!--//bg-slider-wrapper-->
<section class="promo section section-on-bg">
<div class="container text-center">
<h2 class="title">Child Care centers need to effectively monitor caregivers training clock hours to maintain optimal trustworthy standards and compliance status</h2>
<p class="intro">How is your center keeping up?</p>
<p><a class="btn btn-cta btn-cta-primary" href="<?=base_url().'signup'?>">Subscribe Now</a></p>
</div><!--//container-->
</section><!--//promo-->
|
77954f33fbcc584cc7fe2d8a33896d8f999dcd7f
|
[
"Markdown",
"PHP"
] | 46
|
PHP
|
kgarcia/ect
|
74818de0ab6a07fe36d40769e1e2993705dd6ecd
|
7cd5cc5b5fde194ce09400424b398196e5aa1578
|
refs/heads/master
|
<file_sep>import axios from "axios";
// import backupJson from "./backupJson";
axios.defaults.baseURL = "https://www.googleapis.com/youtube/v3/";
export async function search(query) {
try {
const { data } = await axios.get("/search", {
params: {
part: "snippet",
maxResults: 10,
key: process.env.REACT_APP_YT_KEY1,
q: query,
type: "video"
}
});
return data;
// return backupJson;
} catch (error) {
console.error(error);
return false;
}
}
<file_sep>import React from "react";
import PropTypes from "prop-types";
import ListItem from "../ListItem/ListItem";
import { search } from "../../api/youtubeApi";
import styles from "./List.module.css";
const List = ({ searchQuery, setSelectedVideo }) => {
const [videos, setVideos] = React.useState(null);
React.useEffect(() => {
search(searchQuery).then(result => {
setVideos(result.items);
setSelectedVideo(result.items[0]);
});
return () => setVideos(null);
}, [searchQuery, setSelectedVideo]);
return (
<div className={styles.container}>
{videos === null ? (
<div>Loading...</div>
) : (
videos.map(video => (
<ListItem
key={video.id.videoId}
data={video.snippet}
onClick={() => setSelectedVideo(video)}
/>
))
)}
</div>
);
};
List.propTypes = {
searchQuery: PropTypes.string.isRequired,
setSelectedVideo: PropTypes.func.isRequired
};
export default List;
<file_sep>import React from "react";
import PropTypes from "prop-types";
import { FaPlay, FaPause, FaVolumeMute, FaVolumeUp } from "react-icons/fa";
import styles from "./ControlPanel.module.css";
const ControlPanel = ({
state,
play,
pause,
isMuted,
mute,
unMute,
children
}) => {
const [sound, setSound] = React.useState(true);
const tooglePlayback = () => {
// -1 – unstarted
// 0 – ended
// 1 – playing
// 2 – paused
// 3 – buffering
// 5 – video cued
if (state === 1) {
pause();
} else if (state === 2 || state === 5) {
play();
} else {
// do nothing
}
};
const toggleMute = () => {
if (isMuted()) {
unMute();
setSound(true);
} else {
mute();
setSound(false);
}
};
const isDisabled = state !== 1 && state !== 2 && state !== 5;
return (
<div className={styles.container}>
<div>{children}</div>
<button
disabled={isDisabled}
className={styles.playButton}
onClick={() => tooglePlayback()}
>
{state === 1 ? <FaPause size="20px" /> : <FaPlay size="20px" />}
</button>
<button
disabled={isDisabled}
className={styles.muteButton}
onClick={() => toggleMute()}
>
{sound ? (
<FaVolumeUp size="20px" />
) : (
<FaVolumeMute color="red" size="20px" />
)}
</button>
</div>
);
};
ControlPanel.propTypes = {
state: PropTypes.number.isRequired,
play: PropTypes.func.isRequired,
pause: PropTypes.func.isRequired,
mute: PropTypes.func.isRequired,
unMute: PropTypes.func.isRequired,
isMuted: PropTypes.func.isRequired
};
export default ControlPanel;
<file_sep>import { formatTime } from "./utils";
it("format time in seconds to minutes:seconds format", () => {
expect(formatTime(145)).toEqual("2:25");
expect(formatTime(67)).toEqual("1:07");
});
<file_sep>import React from "react";
import useInterval from "../../hooks/setInterval";
import { formatTime } from "../../utils/utils";
const Counter = ({ playerObject }) => {
let [time, setTime] = React.useState(0);
useInterval(() => {
// Your custom logic here
setTime(playerObject.getCurrentTime());
}, 500);
const secondsSinceStart = time;
const formatedTimeSinceStart = formatTime(secondsSinceStart);
const totalDuration = formatTime(playerObject.getDuration());
return (
<span>
{formatedTimeSinceStart}/{totalDuration}
</span>
);
};
export default Counter;
<file_sep>import React from "react";
import PropTypes from "prop-types";
import { htmlDecode } from "../../utils/utils";
import styles from "../VideoDetails/VideoDetail.module.css";
const VideoDetails = ({ title, channelTitle, description }) => {
return (
<div className={styles.container}>
<div className={styles.title}>{htmlDecode(title)}</div>
<div className={styles.description}>{htmlDecode(description)}</div>
<div className={styles.channelTitle}>{htmlDecode(channelTitle)}</div>
</div>
);
};
VideoDetails.propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
channelTitle: PropTypes.string.isRequired
};
export default VideoDetails;
<file_sep>export default {
kind: "youtube#searchListResponse",
etag: '"<KEY>"',
nextPageToken: "CAoQAA",
regionCode: "SE",
pageInfo: {
totalResults: 1000000,
resultsPerPage: 10
},
items: [
{
kind: "youtube#searchResult",
etag: '"<KEY>"',
id: {
kind: "youtube#video",
videoId: "DlJy7HQMgSI"
},
snippet: {
publishedAt: "2018-10-12T12:00:02.000Z",
channelId: "UCDPk9MG2RexnOMGTD-YnSnA",
title:
"Manatees Are the "Sea Cows" of the Coasts | Nat Geo Wild",
description:
"There are three species of manatee in the world and can be found in coastal rivers and waters. ➡ Subscribe: http://bit.ly/NatGeoWILDSubscribe #NatGeoWILD ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/DlJy7HQMgSI/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/DlJy7HQMgSI/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/DlJy7HQMgSI/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "Nat Geo WILD",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"<KEY>"',
id: {
kind: "youtube#video",
videoId: "5eO4P2hZv_k"
},
snippet: {
publishedAt: "2013-01-18T20:33:14.000Z",
channelId: "UCZw37dJR7v_08nLpuIvfpcQ",
title: "Swimming with Florida manatees",
description:
"outdoortravelchannel.tv - Endangered Florida manatees (Trichechus manatus latirostris) are present in Kings Bay's warm, spring-fed waters year-round; ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/5eO4P2hZv_k/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/5eO4P2hZv_k/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/5eO4P2hZv_k/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "outdoortravelchannel.tv",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"<KEY>"',
id: {
kind: "youtube#video",
videoId: "hNT83a7Bl1c"
},
snippet: {
publishedAt: "2016-01-12T14:00:00.000Z",
channelId: "UC6E2mP01ZLH_kbAyeazCNdg",
title: "Manatees LOVE Video Cameras!",
description:
"Please SUBSCRIBE NOW! http://bit.ly/BWchannel Watch More - http://bit.ly/BTmanatee On this episode of Breaking Trail, Coyote is taking you on a special ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/hNT83a7Bl1c/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/hNT83a7Bl1c/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/hNT83a7Bl1c/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "Brave Wilderness",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"8jEFfXBrqiSrcF6Ee7MQuz8XuAM/s-fxN4A8dCAfDQSZeAak3BkuZBY"',
id: {
kind: "youtube#video",
videoId: "_AvjXSEWBXk"
},
snippet: {
publishedAt: "2013-03-04T07:13:43.000Z",
channelId: "UCevoyrIocmJyguw2Iit_Hwg",
title: "Crystal Manatees - Florida Manatee Wildlife",
description:
"For licensing or usage, contact <EMAIL>) First - thanks so much for watching this video! Second - thanks even more for SHARING! This was ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/_AvjXSEWBXk/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/_AvjXSEWBXk/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/_AvjXSEWBXk/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "<NAME>",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"<KEY>"',
id: {
kind: "youtube#video",
videoId: "R7-a7UBXT2E"
},
snippet: {
publishedAt: "2017-04-07T18:46:12.000Z",
channelId: "UCcBp_9YPyma4c3HTadmRJ3Q",
title: "Meet the Manatees",
description:
"Meet some injured and orphaned manatees on the road to recovery. Please LIKE and SUBSCRIBE if you enjoyed! http://bit.ly/1Adl6ht **More info & videos ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/R7-a7UBXT2E/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/R7-a7UBXT2E/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/R7-a7UBXT2E/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "Nature on PBS",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"8jEFfXBrqiSrcF6Ee7MQuz8<KEY>"',
id: {
kind: "youtube#video",
videoId: "k8n2FZU2VXY"
},
snippet: {
publishedAt: "2012-06-25T14:44:00.000Z",
channelId: "UC-BanpozNovTi1sEo94EQCA",
title: "Meet Snooty the Manatee",
description:
"Meet the Manatee Ambassador, Snooty from the South Florida Museum's Parker Manatee Aquarium. Produced by - On the Leesh Productions Starring - Marilyn ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/k8n2FZU2VXY/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/k8n2FZU2VXY/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/k8n2FZU2VXY/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "What You Can Do",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"8jEFfXBrqiSrcF6Ee7MQuz8XuAM/aG6od7fAlV69p98SKRrNJJ7SrWE"',
id: {
kind: "youtube#video",
videoId: "ZIC8QmBKRHc"
},
snippet: {
publishedAt: "2019-03-13T21:11:40.000Z",
channelId: "UCSyg9cb3Iq-NtlbxqNB9wGw",
title:
"Underwater Manatee-Cam at Blue Spring State Park powered by EXPLORE.org",
description:
"The camera shows the mid spring run at Blue Spring State Park, where manatees congregate during the winter months when the river temperature in the ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/ZIC8QmBKRHc/default_live.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/ZIC8QmBKRHc/mqdefault_live.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/ZIC8QmBKRHc/hqdefault_live.jpg",
width: 480,
height: 360
}
},
channelTitle: "Explore Oceans",
liveBroadcastContent: "live"
}
},
{
kind: "youtube#searchResult",
etag: '"8<KEY>"',
id: {
kind: "youtube#video",
videoId: "yLmfgK8adXk"
},
snippet: {
publishedAt: "2015-04-06T13:09:14.000Z",
channelId: "UCYcos2PP6aOrDQzKY0mUzcw",
title: "Girl getting attacked by a manatee",
description:
"JUKIN MEDIA VERIFIED (ORIGINAL) FOR LICENSING / PERMISSION TO USE: CONTACT - LICENSING(AT)JUKINMEDIADOTCOM hilarious video of my friend ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/yLmfgK8adXk/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/yLmfgK8adXk/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/yLmfgK8adXk/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "<NAME>",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"<KEY>"',
id: {
kind: "youtube#video",
videoId: "SbdC9PqZ7dU"
},
snippet: {
publishedAt: "2015-04-14T17:00:01.000Z",
channelId: "UCsVXjNRWJMyXViNLM2pyMfg",
title: "Girl Freaks Out About Manatee | Cow of the Sea",
description:
"While enjoying her spring break in Florida, this woman freaks the hell out when she notices that some evil, underwater creature looks below her and invades her ...",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/SbdC9PqZ7dU/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/SbdC9PqZ7dU/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/SbdC9PqZ7dU/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "JukinVideo",
liveBroadcastContent: "none"
}
},
{
kind: "youtube#searchResult",
etag: '"<KEY>MA"',
id: {
kind: "youtube#video",
videoId: "lxJ_047ld1U"
},
snippet: {
publishedAt: "2015-11-12T14:24:06.000Z",
channelId: "UCZDBmqTWwsL0euXJ_C7xvWg",
title: "Huge Manatee Attacks Stand Up Paddle Board Fisherman",
description:
"This video shows a manatee trying to knock a fisherman off of his stand up paddle board as he is stealth snook fishing the mangroves near Vero Beach, Florida.",
thumbnails: {
default: {
url: "https://i.ytimg.com/vi/lxJ_047ld1U/default.jpg",
width: 120,
height: 90
},
medium: {
url: "https://i.ytimg.com/vi/lxJ_047ld1U/mqdefault.jpg",
width: 320,
height: 180
},
high: {
url: "https://i.ytimg.com/vi/lxJ_047ld1U/hqdefault.jpg",
width: 480,
height: 360
}
},
channelTitle: "fishyourassoff.com",
liveBroadcastContent: "none"
}
}
]
};
<file_sep>import React from "react";
import "./App.css";
import Search from "./components/Search/Search";
import List from "./components/List/List";
import Player from "./components/Player/Player";
import VideoDetails from "./components/VideoDetails/VideoDetails";
function App() {
const [selectedVideo, setSelectedVideo] = React.useState(null);
const [searchQuery, setSearchQuery] = React.useState(null);
return (
<div className="App">
<div className="top-content">
<Search onSubmit={setSearchQuery} />
</div>
<div className="main">
<div className="primary-content">
{selectedVideo && <Player videoId={selectedVideo.id.videoId} />}
{selectedVideo && (
<VideoDetails
title={selectedVideo.snippet.title}
channelTitle={selectedVideo.snippet.channelTitle}
description={selectedVideo.snippet.description}
/>
)}
</div>
<div className="secondary-content">
{searchQuery && (
<List
searchQuery={searchQuery}
setSelectedVideo={setSelectedVideo}
/>
)}
</div>
</div>
</div>
);
}
export default App;
<file_sep>import React from "react";
import PropTypes from "prop-types";
import Counter from "../Counter/Counter.js";
import ControlPanel from "../ControlPanel/ControlPanel";
const Player = ({ videoId }) => {
const [ready, setReady] = React.useState(false);
const [playerState, setPlayerState] = React.useState(false);
const playerRef = React.useRef(null);
const onPlayerReady = event => {
setReady(true);
};
const onPlayerStateChange = event => {
setPlayerState(event.data);
};
React.useEffect(() => {
const createVideoPlayer = () => {
playerRef.current = new window.YT.Player("player", {
height: "100%",
width: "100%",
events: {
onReady: onPlayerReady,
onStateChange: onPlayerStateChange
},
playerVars: {
autoplay: 0,
controls: 0,
rel: 0,
fs: 0
}
});
};
const addYoutubeScript = () => {
const tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
window.onYouTubeIframeAPIReady = createVideoPlayer;
const firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
};
if (ready && videoId) {
playerRef.current.cueVideoById(videoId);
} else if (!window.YT) {
addYoutubeScript();
} else {
// If script is already there, create the videoPlayer
createVideoPlayer();
}
}, [videoId, ready]);
return (
<>
<div className="player" id={"player"} />
{ready && playerState && (
<>
<ControlPanel
state={playerState}
isMuted={() => playerRef.current.isMuted()}
play={() => playerRef.current.playVideo()}
pause={() => playerRef.current.pauseVideo()}
mute={() => playerRef.current.mute()}
unMute={() => playerRef.current.unMute()}
>
<Counter playerObject={playerRef.current} />
</ControlPanel>
</>
)}
</>
);
};
Player.propTypes = {
videoId: PropTypes.string.isRequired
};
export default Player;
<file_sep>import React from "react";
import PropTypes from "prop-types";
import { htmlDecode } from "../../utils/utils";
import styles from "./ListItem.module.css";
const ListItem = ({
data: {
title,
channelTitle,
thumbnails: { default: thumbnail }
},
onClick
}) => {
return (
<div className={styles.container} onClick={onClick}>
<img src={thumbnail.url} className={styles.thumbnail} alt="thumbnail" />
<div className={styles.info_container}>
<div className={styles.title}>{htmlDecode(title)}</div>
<div className={styles.channelTitle}>{htmlDecode(channelTitle)}</div>
</div>
</div>
);
};
ListItem.propTypes = {
data: PropTypes.shape({
title: PropTypes.string.isRequired,
channelTitle: PropTypes.string.isRequired,
thumbnails: PropTypes.shape({
default: PropTypes.object
})
}),
onClick: PropTypes.func.isRequired
};
export default ListItem;
|
d679a73b06dd7151b4d494c79ce30f6bb30f99d7
|
[
"JavaScript"
] | 10
|
JavaScript
|
EvertLagerberg/Youtube-player-with-react-hooks
|
d9befee5d8f64a09052377d813db062aa17de93c
|
b80084b02a2e633400955673e152458c91917123
|
refs/heads/master
|
<repo_name>SophieBonneau/earlyDetection<file_sep>/myo.cpp
// Copyright (C) 2013-2014 <NAME> Inc.
// Distributed under the Myo SDK license agreement. See LICENSE.txt for details.
// Myo sensor records with a 50Hz frequency
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cmath>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <stdexcept>
#include <string>
using namespace std;
#include "atltime.h"
#include <process.h>
#include <conio.h>
// The only file that needs to be included to use the Myo C++ SDK is myo.hpp.
#include <myo/myo.hpp>
#include "DetectEvent.h"
static ofstream ofs[nMyoSensors];
//static ofstream test[nMyoSensors];
// Classes that inherit from myo::DeviceListener can be used to receive events from Myo devices. DeviceListener
// provides several virtual functions for handling different kinds of events. If you do not override an event, the
// default behavior is to do nothing.
class DataCollector : public myo::DeviceListener {
public:
DataCollector()
: onArm(false), isUnlocked(false), currentPose(), emgSamples()
{
}
// onUnpair() is called whenever the Myo is disconnected from Myo Connect by the user.
void onUnpair(myo::Myo* myo, uint64_t timestamp)
{
// We've lost a Myo.
// Let's clean up some leftover state.
onArm = false;
isUnlocked = false;
emgSamples[identifyMyo(myo)].fill(0);
}
//onPair() is called when a Myo has been paired
void onPair(myo::Myo* myo, uint64_t timestamp, myo::FirmwareVersion firmwareVersion)
{
// Add the Myo pointer to our list of known Myo devices. This list is used to implement identifyMyo() below so
// that we can give each Myo a nice short identifier.
knownMyos.push_back(myo);
// Now that we've added it to our list, get our short ID for it and print it out.
std::cout << "Paired with " << identifyMyo(myo) << "." << std::endl;
}
//onConnect() is called when a paired Myo has been connected
void onConnect(myo::Myo* myo, uint64_t timestamp, myo::FirmwareVersion firmwareVersion)
{
std::cout << "Myo " << identifyMyo(myo) << " has connected." << std::endl;
myo->setStreamEmg(myo::Myo::streamEmgEnabled);
}
//onDisconnect() is called when a paired Myo has been disconnected
void onDisconnect(myo::Myo* myo, uint64_t timestamp)
{
std::cout << "Myo " << identifyMyo(myo) << " has disconnected." << std::endl;
}
// onOrientationData() is called whenever the Myo device provides its current orientation, which is represented
// as a unit quaternion.
/*void onOrientationData(myo::Myo* myo, uint64_t timestamp, const myo::Quaternion<float>& quat)
{
using std::atan2;
using std::asin;
using std::sqrt;
using std::max;
using std::min;
// Calculate Euler angles (roll, pitch, and yaw) from the unit quaternion.
roll[identifyMyo(myo)] = atan2(2.0f * (quat.w() * quat.x() + quat.y() * quat.z()),
1.0f - 2.0f * (quat.x() * quat.x() + quat.y() * quat.y()));
pitch[identifyMyo(myo)] = asin(max(-1.0f, min(1.0f, 2.0f * (quat.w() * quat.y() - quat.z() * quat.x()))));
yaw[identifyMyo(myo)] = atan2(2.0f * (quat.w() * quat.z() + quat.x() * quat.y()),
1.0f - 2.0f * (quat.y() * quat.y() + quat.z() * quat.z()));
//ofs[identifyMyo(myo) - 1] << roll << "," << pitch << "," << yaw << ",";
}*/
// onAccelerometerData() is called whenever the Myo device provides its current acceleration, which is represented
// as a three-dimensional vector.
void onAccelerometerData(myo::Myo* myo, uint64_t timestamp, const myo::Vector3<float>& accel){
CTime u_time = CTime::GetCurrentTime();
accel_x[identifyMyo(myo)] = accel.x();
accel_y[identifyMyo(myo)] = accel.y();
accel_z[identifyMyo(myo)] = accel.z();
}
// onGyroscopeData() is called whenever the Myo device provides its current angular velocity, which is represented
// as a three-dimensional vector.
void onGyroscopeData(myo::Myo* myo, uint64_t timestamp, const myo::Vector3<float>& gyro){
gyro_x[identifyMyo(myo)] = gyro.x();
gyro_y[identifyMyo(myo)] = gyro.y();
gyro_z[identifyMyo(myo)] = gyro.z();
}
// onEmgData() is called whenever a paired Myo has provided new EMG data, and EMG streaming is enable
void onEmgData(myo::Myo* myo, uint64_t timestamp, const int8_t* emg)
{
for (int i = 0; i < 8; i++){
emgSamples[identifyMyo(myo)][i] = emg[i];
}
}
// This is a utility function implemented for this sample that maps a myo::Myo* to a unique ID starting at 1.
// It does so by looking for the Myo pointer in knownMyos, which onPair() adds each Myo into as it is paired.
size_t identifyMyo(myo::Myo* myo) {
// Walk through the list of Myo devices that we've seen pairing events for.
for (size_t i = 0; i < knownMyos.size(); ++i) {
// If two Myo pointers compare equal, they refer to the same Myo device.
if (knownMyos[i] == myo) {
return i + 1;
}
}
return 0;
}
// We define this function to print the current values that were updated by the on...() functions above.
void print(NormParam* param)
{
for (int sens = 0; sens < nMyoSensors; sens++) {
//Print acceleration and orientation results in the csv file
/*seq(0+DIM*sens, compt) = accel_x[sens];
seq(1+DIM*sens, compt) = accel_y[sens];
seq(2+DIM*sens, compt) = accel_z[sens];
seq(3+DIM*sens, compt) = roll[sens];
seq(4+DIM*sens, compt) = pitch[sens];
seq(5+DIM*sens, compt) = yaw[sens];*/
//Normalized data
seq(0+DIM*sens, compt) = (accel_x[sens] - param->mean(14*sens + 0,0))/param->stand_dev(14*sens + 0,0);
seq(1+DIM*sens, compt) = (accel_y[sens] - param->mean(14*sens + 1,0))/param->stand_dev(14*sens + 1,0);
seq(2+DIM*sens, compt) = (accel_z[sens] - param->mean(14*sens + 2,0))/param->stand_dev(14*sens + 2,0);
seq(3+DIM*sens, compt) = (gyro_x[sens] - param->mean(14*sens + 3,0))/param->stand_dev(14*sens + 3,0);
seq(4+DIM*sens, compt) = (gyro_y[sens] - param->mean(14*sens + 4,0))/param->stand_dev(14*sens + 4,0);
seq(5+DIM*sens, compt) = (gyro_z[sens] - param->mean(14*sens + 5,0))/param->stand_dev(14*sens + 5,0);
//ofs[sens] << accel_x[sens] << "," << accel_y[sens] << "," << accel_z[sens] << "," << roll[sens] << "," << pitch[sens] << "," << yaw[sens] << "," ;
// Print out the EMG data
for (size_t i = 0; i < emgSamples[sens].size(); i++){
//seq(6 + i + DIM*sens, compt) = emgSamples[sens][i];
seq(6 + i + DIM*sens, compt) = (emgSamples[sens][i] - param->mean(6 + 14*sens + i,0))/param->stand_dev(6 + 14*sens + i,0); //Normalization of EMG data
/*std::ostringstream oss;
oss << static_cast<double>(seq(6 + i + DIM*sens, compt));
std::string emgString = oss.str();
ofs[sens] << emgString << ",";*/
}
//ofs[sens] << endl;
}
compt++;
}
// These values are set by onArmSync() and onArmUnsync() above.
bool onArm;
myo::Arm whichArm;
// This is set by onUnlocked() and onLocked() above.
bool isUnlocked;
// These values are set by onOrientationData() and onPose() above.
myo::Pose currentPose;
//float roll[nMyoSensors], pitch[nMyoSensors], yaw[nMyoSensors];
float accel_x[nMyoSensors], accel_y[nMyoSensors], accel_z[nMyoSensors];
float gyro_x[nMyoSensors], gyro_y[nMyoSensors], gyro_z[nMyoSensors];
std::array<int8_t, 8> emgSamples[nMyoSensors];
// We store each Myo pointer that we pair with in this list, so that we can keep track of the order we've seen
// each Myo and give it a unique short identifier (see onPair() and identifyMyo() above).
std::vector<myo::Myo*> knownMyos;
};
int main(int argc, char** argv)
{
//Initialisation
const char *hadou_file = "./training_set/Hadou.mat";
const char *jump_file = "./training_set/Jump.mat";
const char *mpunch_file = "./training_set/Punch.mat";
const char *shoryu_file = "./training_set/Shoryu.mat";
const char *squat_file = "./training_set/Squat.mat";
//1 number = 1 movement (ex: 1=>hadouken)
//To see the corresponding number, let see the KeyboardSimulator.h file
//The second number correspond to the associate thresholds
DetectEvent* event_hadou = new DetectEvent(hadou_file,1,1.6);
DetectEvent* event_jump = new DetectEvent(jump_file,2,0.5);
DetectEvent* event_mpunch = new DetectEvent(mpunch_file,3,1.5);
DetectEvent* event_shoryu = new DetectEvent(shoryu_file,4,1.8);
DetectEvent* event_squat = new DetectEvent(squat_file,5,1.9);
const char *norm_file = "./norm_param_1206nomvt.mat";
NormParam* param = new NormParam(norm_file);
// We catch any exceptions that might occur below -- see the catch statement for more details.
try{
/*CTime c_time = CTime::GetCurrentTime();
unsigned char YY = c_time.GetYear() - 2000;
unsigned char MM = c_time.GetMonth();
unsigned char DD = c_time.GetDay();
unsigned char hh = c_time.GetHour();
unsigned char mm = c_time.GetMinute();
unsigned char ss = c_time.GetSecond();
char filename[256];
//char filen[256];
for (int i = 0; i < nMyoSensors; i++) {
sprintf_s(filename, sizeof(filename), "%02d%02d%02d_%02d%02d%02d_%i.csv", YY, MM, DD, hh, mm, ss,i);
ofs[i] = ofstream(filename, ios::app);
//sprintf_s(filen, sizeof(filen), "%02d%02d%02d_%02d%02d%02d_test%i.csv", YY, MM, DD, hh, mm, ss,i);
//test[i] = ofstream(filen,ios::app);
}*/
// First, we create a Hub with our application identifier. Be sure not to use the com.example namespace when
// publishing your application. The Hub provides access to one or more Myos.
myo::Hub hub("com.limu.hello-myo");
std::cout << "Attempting to find a Myo..." << std::endl;
// Next, we attempt to find a Myo to use. If a Myo is already paired in Myo Connect, this will return that Myo
// immediately.
// waitForMyo() takes a timeout value in milliseconds. In this case we will try to find a Myo for 10 seconds, and
// if that fails, the function will return a null pointer.
myo::Myo* myo = hub.waitForMyo(10000);
// If waitForMyo() returned a null pointer, we failed to find a Myo, so exit with an error message.
if (!myo) {
throw std::runtime_error("Unable to find a Myo!");
}
// We've found a Myo.
std::cout << "Connected to a Myo armband!" << std::endl << std::endl;
// Next we enable EMG streaming on the found Myo.
myo->setStreamEmg(myo::Myo::streamEmgEnabled);
// Next we construct an instance of our DeviceListener, so that we can register it with the Hub.
DataCollector collector;
// Hub::addListener() takes the address of any object whose class inherits from DeviceListener, and will cause
// Hub::run() to send events to all registered device listeners.
hub.addListener(&collector);
// Finally we enter our main loop.
while (1) {
// In each iteration of our main loop, we run the Myo event loop for a set number of milliseconds.
// In this case, we wish to update our display 20 times a second, so we run for 1000/20 milliseconds.
hub.run(1000 / 50);
// After processing events, we call the print() member function we defined above to print out the values we've
// obtained from any events that have occurred.
collector.print(param);
//Create threads to recognize event
if(compt == MINLENGTH+10){ //Compute the similarity of the first 30 frames
event_hadou ->call_comp();
event_jump ->call_comp();
event_mpunch ->call_comp();
event_shoryu ->call_comp();
event_squat ->call_comp();
}
if(compt > MINLENGTH+10 && compt%STRIDE == 0) { //Compute the detection score function for each stride of frames
event_hadou ->call_recognize();
event_jump ->call_recognize();
event_mpunch ->call_recognize();
event_shoryu ->call_recognize();
event_squat ->call_recognize();
}
}
}
// If a standard exception occurred, we print out its message and exit.
catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;
std::cerr << "Press enter to continue.";
std::cin.ignore();
return 1;
}
} <file_sep>/event.h
/**************************************************
* Event class
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#ifndef EVENT_HPP
#define EVENT_HPP
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits>
#include <algorithm>
#include <gsl/gsl_cblas.h>
#include <string>
#include <string.h>
#include <time.h>
class Event{
public:
int s, e;
Event(int s_, int e_){ s = s_; e = e_; }
Event(){ s = -1; e = -1; }
Event(const Event& other){ s = other.s; e = other.e; };
bool isEmpty() const;
double deltaLoss(Event const& otherEv) const;
int length() const;
// bool operator < (const Event & otherEv) const{
// if (e < otherEv.e) return true;
// if ((e == otherEv.e) && (s <= otherEv.s)) return true;
// return false;
// }
std::string str();
};
double diffclock(clock_t clock1, clock_t clock2);
void cmpIntIm(double const *D, int d, int n, double *IntD);
void cmpIntIm_1D(double const *D, int n, double *IntD);
void sampleSeg(double const *D, int d, Event const& ev, int sd, double *raw_feat);
#endif // EVENT_H<file_sep>/kernelTS.cpp
/**************************************************
* Kernel and Time series classes
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#include "kernelTS.h"
using namespace std;
void
TimeSeries::getSegFeatVec(Event const& ev, double *feat){
if (ker.nSegDiv == 1) getSegFeatVec_oneDiv(ev, feat);
else {
int fd_div = ker.get_fd_oneDiv(d);
int evLen = ev.length();
int divLen = evLen / ker.nSegDiv; //Separate the window into nSegDiv (=2) windows
int ev_i_s = ev.s;
double *feat_ptr = feat;
for (int i = 0; i < ker.nSegDiv - 1; i++){ //Get segment feature vector for each half
getSegFeatVec_oneDiv(Event(ev_i_s, ev_i_s + divLen - 1), feat_ptr);
ev_i_s += divLen;
feat_ptr += fd_div;
}
getSegFeatVec_oneDiv(Event(ev_i_s, ev.e), feat_ptr);
}
}
void
TimeSeries::getSegFeatVec_oneDiv(Event const& ev, double *feat){
double *raw_feat = NULL; // raw feature vector
int raw_dim; // dimension of raw feature vector
if (featType == FEAT_BAG) {
raw_dim = d;
raw_feat = new double[raw_dim];
memcpy(raw_feat, IntD + d*(ev.e + 1), d*sizeof(double)); // raw_feat = IntD(:, ev.e+1)
cblas_daxpy(d, -1.0, IntD + d*ev.s, 1, raw_feat, 1); // raw_feat = raw_feat - IntD(:,ev.s)
}
else if (featType == FEAT_ORDER) { // interpolation
raw_dim = d*sd;
raw_feat = new double[raw_dim];
sampleSeg(D, d, ev, sd, raw_feat);
}
else if (featType == FEAT_ENDDIFF){
raw_dim = d;
raw_feat = new double[raw_dim];
memcpy(raw_feat, D + d*ev.e, d*sizeof(double));
cblas_daxpy(d, -1.0, D + d*ev.s, 1, raw_feat, 1);
}
if ((ker.kerType == KER_CHI2) || (ker.kerType == KER_INTER)){
std::cout << "kerchi2" << std::endl;
int d2 = 2 * ker.kerN + 1;
memset(feat, 0, fd*sizeof(double)); // this is absolutely necessary
double sum = cblas_dasum(raw_dim, raw_feat, 1);
cblas_dscal(raw_dim, 1 / sum, raw_feat, 1); // raw_feat = raw_feat/sum(raw_feat);
for (int i = 0; i < raw_dim; i++){
vl_homogeneouskernelmap_evaluate_d(ker.kerMap, feat + i*d2, 1, raw_feat[i]);
}
}
else if (ker.kerType == KER_LINEAR){
double nrm2 = cblas_dnrm2(raw_dim, raw_feat, 1);
cblas_dscal(raw_dim, 1 / nrm2, raw_feat, 1); // raw_feat = raw_feat/sum(raw_feat);
memcpy(feat, raw_feat, raw_dim*sizeof(double));
}
else if (ker.kerType == KER_LINEAR_NONORM){
memcpy(feat, raw_feat, raw_dim*sizeof(double));
}
else if (ker.kerType == KER_LINEAR_LENGTHNORM){
cblas_dscal(raw_dim, 1.0f / ev.length(), raw_feat, 1);
memcpy(feat, raw_feat, raw_dim*sizeof(double));
}
delete[] raw_feat;
}
/* ************************************** *
* Set all the windows of the time series *
* ************************************** */
void
TimeSeries::setSegLst(int minSegLen, int maxSegLen, int stride){
if (maxSegLen > n) maxSegLen = n;
if (minSegLen > maxSegLen) return;
if ((stride < 1) || (minSegLen < 1)) throw(-1);
int r = (n - minSegLen) / stride;
int e = minSegLen - 1 + r*stride; //Consider only the last frame
//for (int e = minSegLen - 1 + r*stride; e >= 0; e -= stride){ // prefer segments starting at 0 rather than ending at n-1
for (int l = minSegLen; l <= maxSegLen; l += stride){
int s = e - l + 1;
if (s < 0) break;
segLst.push_back(ExEvent(s, e));
}
//}
reverse(segLst.begin(), segLst.end());
}
void
TimeSeries::setEvtLst(int stride, int maxEvLen){
if (!gtEv.isEmpty()) {
if (stride < 1) throw - 1;
for (int e = gtEv.e; e >= gtEv.s; e -= stride){
if (e - gtEv.s >= maxEvLen) evtLst.push_back(ExEvent(e - maxEvLen + 1, e));
else evtLst.push_back(ExEvent(gtEv.s, e));
}
reverse(evtLst.begin(), evtLst.end());
}
}
void
TimeSeries::cacheSegLstFeats(){
isSegFeatCached = true;
cacheLst(segLst);
}
void
TimeSeries::cacheEvtLstFeats(){
isEvtFeatCached = true;
cacheLst(evtLst);
}
void
TimeSeries::cacheLst(std::vector<ExEvent> &lst){
for (int i = 0; i < lst.size(); i++){
lst[i].feat = new double[fd];
getSegFeatVec(lst[i], lst[i].feat);
}
}
void
TimeSeries::updateAllVals(double const* w, double const& b){
updateSegLstVals(w, b);
updateEvtLstVals(w, b);
if (gtEv.isEmpty()){
gtEv.val = 0;
}
else {
if (isGtEvFeatCached) {
gtEv.val = cblas_ddot(fd, w, 1, gtEv.feat, 1) + b;
}
else {
gtEv.feat = new double[fd];
getSegFeatVec(gtEv, gtEv.feat);
gtEv.val = cblas_ddot(fd, w, 1, gtEv.feat, 1) + b;
isGtEvFeatCached = true;
}
}
}
void TimeSeries::updateSegLstVals(double const* w, double const& b){
if (isSegFeatCached) updateLstVals_cached(segLst, w, b);
else updateLstVals(segLst, w, b);
}
void TimeSeries::updateEvtLstVals(double const* w, double const& b){
if (isEvtFeatCached) updateLstVals_cached(evtLst, w, b);
else updateLstVals(evtLst, w, b);
}
void
TimeSeries::updateLstVals_cached(std::vector<ExEvent> &lst, double const* w, double const& b){
for (int i = 0; i < lst.size(); i++){
lst[i].val = cblas_ddot(fd, w, 1, lst[i].feat, 1) + b;
}
}
void
TimeSeries::updateLstVals(std::vector<ExEvent> &lst, double const* w, double const& b){
double *feat = new double[fd];
for (int i = 0; i < lst.size(); i++){
getSegFeatVec(lst[i], feat);
lst[i].val = cblas_ddot(fd, w, 1, feat, 1) + b; //Score function
}
}
string
TimeSeries::str(){
ostringstream rslt;
rslt << "TrEvList: ";
for (int i = 0; i < evtLst.size(); i++){
rslt << evtLst[i].str() << " ";
}
rslt << "\n" << "SegList: ";
for (int i = 0; i < segLst.size(); i++){
rslt << segLst[i].str() << " ";
}
return rslt.str();
}
TimeSeries::TimeSeries(){
isSegFeatCached = false;
isEvtFeatCached = false;
isGtEvFeatCached = false;
}
TimeSeries::~TimeSeries(){
if (isSegFeatCached)
for (int i = 0; i < segLst.size(); i++) delete segLst[i].feat;
if (isEvtFeatCached)
for (int i = 0; i < evtLst.size(); i++) delete evtLst[i].feat;
if (isGtEvFeatCached) delete[] gtEv.feat;
if (featType == FEAT_BAG) delete[] IntD;
}
<file_sep>/KeyboardSimulator.h
#ifndef __KEYBOARDSIMULATOR_H__
#define __KEYBOARDSIMULATOR_H__
#include <windows.h>
#include <stdio.h>
using namespace std;
//enum Command {Chudan, Guard, Hadouken, LKick, LPunch, MetsuHadou, RKick, RPunch, ShinkuHadou, Shoryuken};
enum Command {Hadouken,Jump,MPunch,Shoryuken,Squat};
class KeyboardSimulator{
private:
void KeyAction(WORD VirtualKey, BOOL bKeepPressing, DWORD extkey = 0)
{
INPUT input[1];
input[0].type = INPUT_KEYBOARD;
input[0].ki.wVk = VirtualKey;
input[0].ki.wScan = MapVirtualKey(input[0].ki.wVk, 0);
input[0].ki.dwFlags = extkey;
::SendInput(1, input, sizeof(INPUT));
if (!bKeepPressing)
{
input[0].ki.dwFlags = extkey | KEYEVENTF_KEYUP;
::SendInput(1, input, sizeof(INPUT));
}
}
public:
int command;
bool print_flg;
KeyboardSimulator() {
print_flg = false;
}
void TestCommand()
{
KeyAction('A', TRUE);
// Sleep(50);
KeyAction('A', FALSE);
KeyAction('B', TRUE);
// Sleep(50);
KeyAction('B', FALSE);
KeyAction('C', TRUE);
// Sleep(50);
KeyAction('C', FALSE);
KeyAction('D', TRUE);
// Sleep(50);
KeyAction('D', FALSE);
}
void SetSyoryukenP1()
{
KeyAction(VK_RIGHT, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_RIGHT, FALSE, KEYEVENTF_EXTENDEDKEY);
KeyAction(VK_DOWN, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_DOWN, FALSE, KEYEVENTF_EXTENDEDKEY);
KeyAction(VK_RIGHT, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_RIGHT, FALSE, KEYEVENTF_EXTENDEDKEY);
KeyAction('A', TRUE);
Sleep(50);
KeyAction('A', FALSE);
Sleep(2000);
}
void SetSyoryukenP2()
{
KeyAction('J', TRUE);
Sleep(50);
KeyAction('J', FALSE);
KeyAction('M', TRUE);
Sleep(50);
KeyAction('J', TRUE);
Sleep(50);
KeyAction('M', FALSE);
KeyAction('J', FALSE);
KeyAction('4', TRUE);
Sleep(50);
KeyAction('4', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
void SetHadoukenP1()
{
KeyAction(VK_DOWN, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_RIGHT, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_DOWN, FALSE, KEYEVENTF_EXTENDEDKEY);
Sleep(50);
KeyAction(VK_RIGHT, FALSE, KEYEVENTF_EXTENDEDKEY);
KeyAction('D', TRUE);
Sleep(50);
KeyAction('D', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
void SetHadoukenP2()
{
KeyAction('M', TRUE);
Sleep(50);
KeyAction('J', TRUE);
Sleep(50);
KeyAction('M', FALSE);
Sleep(50);
KeyAction('J', FALSE);
KeyAction('4', TRUE);
Sleep(50);
KeyAction('4', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P滅・波動拳
void SetMetsuP1()
{
KeyAction('Z', TRUE);
Sleep(20);
KeyAction('S', TRUE);
Sleep(20);
KeyAction('Z', FALSE);
Sleep(20);
KeyAction('S', FALSE);
Sleep(20);
KeyAction('Z', TRUE);
Sleep(20);
KeyAction('S', TRUE);
Sleep(20);
KeyAction('Z', FALSE);
Sleep(20);
KeyAction('S', FALSE);
KeyAction('X', TRUE);
Sleep(20);
KeyAction('X', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P滅・波動拳
void SetMetsuP2()
{
KeyAction('M', TRUE);
Sleep(20);
KeyAction('J', TRUE);
Sleep(20);
KeyAction('M', FALSE);
Sleep(20);
KeyAction('J', FALSE);
Sleep(20);
KeyAction('M', TRUE);
Sleep(20);
KeyAction('J', TRUE);
Sleep(20);
KeyAction('M', FALSE);
Sleep(20);
KeyAction('J', FALSE);
KeyAction('7', TRUE);
Sleep(20);
KeyAction('7', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P弱パンチ
void SetLPunchP1()
{
//KeyAction('D', TRUE);
//Sleep(20);
//KeyAction('D', FALSE);
KeyAction('A', TRUE);
Sleep(20);
KeyAction('A', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P弱パンチ
void SetLPunchP2()
{
KeyAction('4', TRUE);
Sleep(20);
KeyAction('4', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P弱キック
void SetLKickP1()
{
//KeyAction('E', TRUE);
//Sleep(20);
//KeyAction('E', FALSE);
KeyAction('Z', TRUE);
Sleep(20);
KeyAction('Z', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P弱キック
void SetLKickP2()
{
KeyAction('1', TRUE);
Sleep(20);
KeyAction('1', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P中パンチ
void SetMPunchP1()
{
//KeyAction('F', TRUE);
//Sleep(20);
//KeyAction('F', FALSE);
KeyAction('S', TRUE);
Sleep(20);
KeyAction('S', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P中パンチ
void SetMPunchP2()
{
KeyAction('5', TRUE);
Sleep(20);
KeyAction('5', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P中キック
void SetMKickP1()
{
KeyAction('R', TRUE);
Sleep(20);
KeyAction('R', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P中キック
void SetMKickP2()
{
KeyAction('2', TRUE);
Sleep(20);
KeyAction('2', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P強パンチ
void SetHPunchP1()
{
KeyAction('D', TRUE);
Sleep(20);
KeyAction('D', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P強パンチ
void SetHPunchP2()
{
KeyAction('8', TRUE);
Sleep(20);
KeyAction('8', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P強キック
void SetHKickP1()
{
//KeyAction('G', TRUE);
//Sleep(20);
//KeyAction('G', FALSE);
KeyAction('C', TRUE);
Sleep(20);
KeyAction('C', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P強キック
void SetHKickP2()
{
KeyAction('6', TRUE);
Sleep(20);
KeyAction('6', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 1P真空波動拳
void SetShinkuHadouP1()
{
KeyAction('Z', TRUE);
Sleep(20);
KeyAction('S', TRUE);
Sleep(20);
KeyAction('Z', FALSE);
Sleep(20);
KeyAction('S', FALSE);
Sleep(20);
KeyAction('Z', TRUE);
Sleep(20);
KeyAction('S', TRUE);
Sleep(20);
KeyAction('Z', FALSE);
Sleep(20);
KeyAction('S', FALSE);
KeyAction('D', TRUE);
Sleep(20);
KeyAction('D', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(3000);
}
// 2P真空波動拳
void SetShinkuHadouP2()
{
KeyAction('M', TRUE);
Sleep(20);
KeyAction('J', TRUE);
Sleep(20);
KeyAction('M', FALSE);
Sleep(20);
KeyAction('J', FALSE);
Sleep(20);
KeyAction('M', TRUE);
Sleep(20);
KeyAction('J', TRUE);
Sleep(20);
KeyAction('M', FALSE);
Sleep(20);
KeyAction('J', FALSE);
KeyAction('4', TRUE);
Sleep(20);
KeyAction('4', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(3000);
}
//void SetShinryukenP2()
//{
// KeyAction('M', TRUE);
// Sleep(20);
// KeyAction('J', TRUE);
// Sleep(20);
// KeyAction('M', FALSE);
// Sleep(20);
// KeyAction('J', FALSE);
// Sleep(20);
// KeyAction('M', TRUE);
// Sleep(20);
// KeyAction('J', TRUE);
// Sleep(20);
// KeyAction('M', FALSE);
// Sleep(20);
// KeyAction('J', FALSE);
// KeyAction('7', TRUE);
// Sleep(20);
// KeyAction('7', FALSE);
//}
// 1Pガード
void SetGuardP1()
{
KeyAction(VK_LEFT, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(1000);
KeyAction(VK_LEFT, FALSE, KEYEVENTF_EXTENDEDKEY);
//KeyAction('A', TRUE);
//Sleep(50);
//KeyAction('A', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(1200);
}
// 2Pガード
void SetGuardP2()
{
KeyAction('K', TRUE);
Sleep(50);
KeyAction('K', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(1000);
}
// 1P中段攻撃(リュウ・鎖骨割り)
void SetChudanP1()
{
KeyAction(VK_RIGHT, TRUE, KEYEVENTF_EXTENDEDKEY);
KeyAction('S', TRUE);
Sleep(20);
KeyAction(VK_RIGHT, FALSE, KEYEVENTF_EXTENDEDKEY);
KeyAction('S', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
// 2P中段攻撃(リュウ・鎖骨割り)
void SetChudanP2()
{
KeyAction('J', TRUE);
KeyAction('5', TRUE);
Sleep(20);
KeyAction('J', FALSE);
KeyAction('5', FALSE);
// ユーザ動作が終わるまで時間がかかるので、それまで停止
Sleep(2000);
}
void SetJumpP1()
{
KeyAction(VK_UP, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(20);
KeyAction(VK_UP, FALSE, KEYEVENTF_EXTENDEDKEY);
Sleep(1000);
}
void SetSquatP1()
{
KeyAction(VK_DOWN, TRUE, KEYEVENTF_EXTENDEDKEY);
Sleep(500);
KeyAction(VK_DOWN, FALSE, KEYEVENTF_EXTENDEDKEY);
Sleep(1700);
}
};
/********** 1P側のコマンド呼び出し *** Class to call 1 player's command *******/
class CallCommand{
private:
unsigned int thID;
HANDLE hTh;
int new_command_flag;
public:
KeyboardSimulator *ks;
//スレッド用関数
static unsigned __stdcall mythread(void *lpx)
{
KeyboardSimulator *ks = (KeyboardSimulator *)lpx;
KeyboardSimulator *ks2 = (KeyboardSimulator *)lpx;
switch(ks->command){
case Chudan:
//ks->print_flg = true;
cout << "1P_中段攻撃! Chudan!" << endl;
ks->SetChudanP1();
break;
case Guard:
//ks->print_flg = true;
cout << "1P_ガード!" << endl;
ks->SetGuardP1();
break;
case Hadouken:
//ks->print_flg = true;
cout << "1P_波動拳! Hadouken!" << endl;
ks->SetHadoukenP1();
break;
case Jump:
//ks->print_flg = true;
cout << "1P_Jump!" << endl;
ks->SetJumpP1();
break;
/*case LKick:
//ks->print_flg = true;
cout << "1P_左キック!" << endl;
ks->SetLKickP1();
break;
case MetsuHadou:
//ks->print_flg = true;
//cout << "1P_MetsuHadou!" << endl;
//ks->SetMetsuP1();
cout << "1P_波動拳!" << endl;
ks->SetHadoukenP1();
break;
case RKick:
cout << "1P_右キック!" << endl;
//ks->SetMKickP1();
//ks->print_flg = true;
ks->SetHKickP1();
break;*/
case LPunch:
cout << "1P_左パンチ!" << endl;
ks->SetLPunchP1();
//ks->print_flg = true;
break;
case MPunch:
//ks->print_flg = true;
cout << "1P_右パンチ!" << endl;
ks->SetMPunchP1();
break;
case HPunch:
cout << "1P_Big 左パンチ!" << endl;
ks->SetHPunchP1();
//ks->print_flg = true;
break;
/*case ShinkuHadou:
//ks->print_flg = true;
//cout << "1P_ShinkuHadou!" << endl;
//ks->SetShinkuHadouP1();
cout << "1P_波動拳!" << endl;
ks->SetHadoukenP1();
break;*/
case Shoryuken:
//ks->print_flg = true;
cout << "1P_昇竜拳! Shoryuken!" << endl;
ks->SetSyoryukenP1();
break;
case Squat:
//ks->print_fflg = true
cout << "1P_Squat!" << endl;
ks->SetSquatP1();
break;
}
//Sleep(1500);
return 0;
}
void call_thread()
{
DWORD dwExCode;
if (hTh != NULL){
GetExitCodeThread(hTh, &dwExCode); //if the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE
if (dwExCode == STILL_ACTIVE) {
// printf("スレッド稼働中\n");
} else { //Movement detected
hTh = (HANDLE)_beginthreadex(NULL, 0, mythread, (void *)ks, 0, &thID);
if (hTh == 0) {
printf("スレッド作成失敗\n");
return;
}
}
}
}
public:
CallCommand()
{
hTh = (HANDLE)1;
new_command_flag = 0;
ks = new KeyboardSimulator();
}
void SendCommand(int _command)
{
if (_command < 0){
return;
} else {
ks->command = _command;
call_thread();
}
}
};
/********** 2P側のコマンド呼び出し **********/
/*class CallCommand_2{
private:
unsigned int thID;
HANDLE hTh;
int new_command_flag;
KeyboardSimulator *ks;
bool write_flg;
//スレッド用関数
static unsigned __stdcall mythread(void *lpx)
{
KeyboardSimulator *ks = (KeyboardSimulator *)lpx;
switch(ks->command){
case Chudan:
cout << "2P_中段攻撃!" << endl;
ks->SetChudanP2();
break;
case Guard:
cout << "2P_ガード!" << endl;
ks->SetGuardP2();
break;
case Hadouken:
cout << "2P_波動拳!" << endl;
ks->SetHadoukenP2();
break;
case LKick:
cout << "2P_左キック!" << endl;
ks->SetLKickP2();
break;
case LPunch:
cout << "2P_左パンチ!" << endl;
ks->SetLPunchP2();
break;
case MetsuHadou:
cout << "2P_滅・波動拳!" << endl;
ks->SetMetsuP2();
break;
case RKick:
cout << "2P_右キック!" << endl;
ks->SetMKickP2();
//ks->SetHKickP2();
break;
case RPunch:
cout << "2P_右パンチ!" << endl;
ks->SetMPunchP2();
//ks->SetHPunchP2();
break;
case ShinkuHadou:
cout << "2P_真空波動拳!" << endl;
ks->SetShinkuHadouP2();
break;
case Shoryuken:
cout << "2P_昇竜拳!" << endl;
ks->SetSyoryukenP2();
break;
}
//Sleep(1000);
return 0;
}
void call_thread()
{
DWORD dwExCode;
if (hTh != NULL){
GetExitCodeThread(hTh, &dwExCode);
if (dwExCode == STILL_ACTIVE) {
// printf("スレッド稼働中\n");
} else {
hTh = (HANDLE)_beginthreadex(NULL, 0, mythread, (void *)ks, 0, &thID);
if (hTh == 0) {
printf("スレッド作成失敗\n");
return;
}
}
}
}
public:
CallCommand_2()
{
hTh = (HANDLE)1;
new_command_flag = 0;
ks = new KeyboardSimulator();
}
void SendCommand(int _command)
{
//cout<<"com "<<_command<<endl;
if (_command < 0){
return;
} else {
ks->command = _command;
call_thread();
}
}
};*/
#endif//__KEYBOARDSIMULATOR_H<file_sep>/README.txt
Application able to do some early detection with wearable sensors
- Methodology : Max-Margin Early Event Detectors (Minh Hoai, 2012)
- Dataset record with Myo sensors,
but it is possible to make it works with simple accelerometers and gyrometers
<file_sep>/crtFeatWindow.cpp
/**************************************************
* Create time series data for a window of frames
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 14 Janvier 2015
* ************************************************/
#include "crtFeatWindow.h"
#include <sstream>
#include <math.h>
/* ********************************************************** *
* Evaluate the detection score function of a window of frames *
* *********************************************************** */
int evalKer(Eigen::MatrixXd Ds, TimeSeries TS, Eigen::MatrixXd w, double b, int minSegLen, int maxSegLen, int segStride, int d, int sd, int featType, double thresh)
{
int n = Ds.cols();
double minth = -125.803;
double maxth = 130.957;
if ((minSegLen < 1) || (maxSegLen < minSegLen) || (segStride < 1))
std::cout << "crtFeatWindow: evalKer: invalid option for sOpt";
if (minSegLen > n)
std::cout << "crtFeatWindow: evalKer: minimum segment length is greater than the time series length" << std::endl;
if (maxSegLen > n)
maxSegLen = n;
//Time series options
TS.D = Ds.data();
TS.n = n;
if (featType == FEAT_BAG) {
TS.IntD = new double[d*(n + 1)];
cmpIntIm(TS.D, d, n, TS.IntD);
}
else if (featType == FEAT_ORDER) {
TS.sd = sd;
}
TS.setSegLst(minSegLen, maxSegLen, segStride);
TS.updateSegLstVals(w.data(), b);
//Event mxEv;
double mxVal = -std::numeric_limits<double>::infinity();
int curIdx = 0, segLstSz = TS.segLst.size();
for (int t = minSegLen; t<n; t++) {
if (curIdx < segLstSz) { // there are more segments to consider
ExEvent curSeg = TS.segLst[curIdx];
while (curSeg.e <= t) {
mxVal = curSeg.val;
//Detect the Event (if detect score sup to a threshold)
if (mxVal > thresh) {
//std::cout<<"sortie "<<mxVal << " > " <<thresh <<std::endl;
return 0;
}
curIdx++;
if (curIdx >= segLstSz)
break;
curSeg = TS.segLst[curIdx];
}
}
}
//std::cout << "crtFeatWindow: evalKer: No event was found" << std::endl;
return -1;
}
<file_sep>/read_file.cpp
/*********************************************
* Read files (mat files)
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* *******************************************/
#include "read_file.h"
/* *************** *
* Read a mat file *
* *************** */
mxArray *read_matfile(const char *filename, const char *varname)
{
/* Open the mat file */
MATFile *pmat;
pmat = matOpen(filename, "r");
if (pmat == NULL) {
std::cout << "read_file.cpp: read_matfile: Error opening file" << std::endl;
}
/* Read the variables of mat file */
mxArray *var = NULL;
var = matGetVariable(pmat, varname);
matClose(pmat);
//print_matfile(var,varname);
return var;
}
/* ****************************** *
* Print a variable of a mat file *
* ****************************** */
void print_matfile(const char *filename, const char *varname)
{
mxArray *var;
var = read_matfile(filename, varname);
if (mxGetClassID(var) == 6) { //if var is a double
double *cell = NULL;
cell = mxGetPr(var);
for (int i = 0; i<mxGetNumberOfElements(var); i++){
std::cout << varname << " is " << *cell << std::endl;
cell++;
}
}
else { //Create a new case if an other class exist
std::cout << "the class name of " << var << "is" << mxGetClassName(var) << std::endl;
}
}
/* ****************************************************************** *
* Compute the number of dimension of a matfile's particular variable *
* ****************************************************************** */
Eigen::VectorXi no_dim(const char *filename, const char *varname) {
mxArray *var = NULL;
var = read_matfile(filename, varname);
size_t nb_dim;
nb_dim = mxGetNumberOfDimensions(var);
const size_t *dim;
dim = mxGetDimensions(var);
Eigen::initParallel();
Eigen::VectorXi tab_dim(nb_dim);
// Number of raws and columns
for (int i = 0; i<nb_dim; i++) {
tab_dim(i) = *dim;
dim++;
}
return tab_dim;
}
/* ********************************************* *
* Store the matfile'variable: if it is a double *
* ********************************************* */
double store_matvar(const char *filename, const char *varname)
{
double variable;
mxArray * var;
var = read_matfile(filename, varname);
if (mxGetClassID(var) == 6) { //if var is a double
double *cell = NULL;
cell = mxGetPr(var);
variable = *cell;
}
else { //Create a new case if an other class exist
std::cout << "read_file: store_matvar: the class name of " << varname << " is " << mxGetClassName(var) << std::endl;
}
return variable;
}
/* ****************************************************** *
* Store the matfile'variable: if it is a matrix of double *
* ******************************************************* */
Eigen::MatrixXd store_mattab(const char *filename, const char *varname)
{
mxArray *var;
var = read_matfile(filename, varname);
size_t nb_dim;
nb_dim = mxGetNumberOfDimensions(var);
Eigen::initParallel();
Eigen::VectorXi tab_dim;
tab_dim = no_dim(filename, varname);
//if var is a double
if (mxGetClassID(var) == 6) {
if (nb_dim == 2) {
Eigen::MatrixXd tab_var(tab_dim(0), tab_dim(1));
double *cell = NULL;
cell = mxGetPr(var);
// Matrix creation
for (int j = 0; j<tab_dim(1); j++) {
for (int i = 0; i<tab_dim(0); i++) {
tab_var(i, j) = *cell;
cell++;
}
}
return tab_var;
}
else {
std::cout << "read_file: store_mattab: number of dim != 2";
}
}
//if var is a struct
else if (mxGetClassID(var) == 2) {
int nb_fields;
nb_fields = mxGetNumberOfFields(var);
Eigen::MatrixXd tab_var(nb_fields, 1);
// Matrix creation
for (int i = 0; i<nb_fields; i++) {
tab_var(i, 0) = *mxGetPr(mxGetCell(var, i));
}
return tab_var;
}
else { //Create a new case if an other class exist
std::cout << "read_file: store_mattab: the class name of " << varname << " is " << mxGetClassName(var) << std::endl;
}
}
/* ******************************************************* *
* Store the matfile'variable: if it is an array of matrix *
* ********************************************************* */
std::vector<Eigen::MatrixXd> store_mattab2(const char *filename, const char *varname)
{
mxArray *var;
var = read_matfile(filename, varname);
double *cell = NULL;
cell = mxGetPr(var);
size_t nb_dim;
nb_dim = mxGetNumberOfDimensions(var);
const size_t *dim;
dim = mxGetDimensions(var);
Eigen::initParallel();
Eigen::VectorXi tab_dim;
tab_dim = no_dim(filename, varname);
if (mxGetClassID(var) == 6) { //if var is a double
if (nb_dim == 3) {
std::vector<Eigen::MatrixXd> cell_var;
Eigen::MatrixXd tab_var(tab_dim(0), tab_dim(1));
// Matrix creation
for (int k = 0; k<tab_dim(2); k++){
for (int j = 0; j<tab_dim(1); j++) {
for (int i = 0; i<tab_dim(0); i++) {
tab_var(i, j) = *cell;
cell++;
}
}
cell_var.push_back(tab_var);
}
return cell_var;
}
else {
std::cout << "read_file: store_mattab2: Number of dimensions: " << nb_dim << std::endl;
}
}
}<file_sep>/kernelTS.h
/**************************************************
* Kernel and Time series classes
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#ifndef KERNELTS_HPP
#define KERNELTS_HPP
#include "event.h"
#include <vector>
#include <iostream>
#include <sstream>
extern "C" {
#include <vl/homkermap.h>
}
enum{
KER_CHI2 = 0,
KER_INTER,
KER_LINEAR,
KER_LINEAR_NONORM,
KER_CHI2_NONORM, // not currently supported
KER_INTER_NONORM, // not currently supported
KER_LINEAR_LENGTHNORM,
};
enum{
FEAT_BAG = 0, // before normalization (if any) feature vector of a segment is the sum of
// feature vectors inside the segment
FEAT_ORDER, // before normalization (if any), we make ordered sampling of feature vectors inside
// the segment and concatenate them (row-by-row) to make feature vector for the segment
FEAT_ENDDIFF, // before normalization (if any), the feature vector of a segment is the difference
};
class ExEvent :public Event{
public:
ExEvent() :Event(){ val = 0; };
ExEvent(int s_, int e_) :Event(s_, e_){};
double *feat;
double val;
};
class Kernel{ //wrapper for kernel
public:
VlHomogeneousKernelMap *kerMap;
int kerN;
double kerL;
int kerType;
int nSegDiv; // number of segment division
int get_fd(int d) const{
return get_fd_oneDiv(d)*nSegDiv;
}
int get_fd_oneDiv(int d) const{
int fd;
if ((kerType == KER_LINEAR) || (kerType == KER_LINEAR_NONORM) ||
(kerType == KER_LINEAR_LENGTHNORM)) fd = d;
else fd = d*(2 * kerN + 1);
return fd;
}
};
class TimeSeries{ //time series class
public:
int d, fd, n;
int featType;
Kernel ker;
double *D; // D is d*n matrix
double *mu; //a 1*n vector, for slack variable rescaling
ExEvent gtEv;
bool isGtEvFeatCached, isSegFeatCached, isEvtFeatCached; // mark if the feature vectors are cached
std::vector<ExEvent> segLst; // list of segments to be considered, sorted by end frames and tie breaking using start frames
std::vector<ExEvent> evtLst; // list of truncated events to be considered, sorted by end frames
TimeSeries();
void setSegLst(int minSegLen, int maxSegLen, int stride); //set the segment list
void setEvtLst(int stride, int maxEvLen); // set the list of truncated events
void cacheSegLstFeats();
void cacheEvtLstFeats();
void updateSegLstVals(double const* w, double const& b);
void updateEvtLstVals(double const* w, double const& b);
void updateAllVals(double const* w, double const& b);
//Usefull to normalize the score function
//double find_max();
//double find_min();
std::string str();
~TimeSeries();
// Most important function of all
void getSegFeatVec(Event const& ev, double *feat);
// specific to FEAT_BAG
double *IntD; // d*(n+1) matrix for the integral image
// specific to FEAT_ORDER
int sd; // number of samples per segment
protected:
void cacheLst(std::vector<ExEvent> &lst);
void updateLstVals_cached(std::vector<ExEvent> &lst, double const* w, double const& b);
void updateLstVals(std::vector<ExEvent> &lst, double const* w, double const& b);
void getSegFeatVec_oneDiv(Event const& ev, double *feat); // segment feature vector without segment division
};
#endif // KERNELTS_H
<file_sep>/event.cpp
/**************************************************
* Event class
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#include "event.h"
#include <sstream>
#include <iostream>
using namespace std;
bool
Event::isEmpty() const{
if ((s < 0) || (e < s)) return true;
else return false;
}
int Event::length() const{
if (isEmpty()) return 0;
else return (e - s + 1);
}
double
Event::deltaLoss(Event const& otherEv) const{
if (isEmpty() && otherEv.isEmpty()) return 0;
else if (isEmpty() || otherEv.isEmpty()) return 1;
else{
int mx_s = max(s, otherEv.s);
int mn_e = min(e, otherEv.e);
if (mn_e < mx_s) return 1;
else {
return 1 - 2 * ((double)(mn_e - mx_s + 1)) / (length() + otherEv.length());
}
}
}
void cmpIntIm(double const *D, int d, int n, double *IntD){
memset(IntD, 0, d*sizeof(double));
memcpy(IntD + d, D, d*n*sizeof(double)); //IntD ~ D ?
for (int c = 1; c <= n; c++){
cblas_daxpy(d, 1.0, IntD + d*(c - 1), 1, IntD + d*c, 1); //IntD(:,c)=IntD(:,c)+IntD(:,c-1) ?
}
}
void cmpIntIm_1D(double const *D, int n, double *IntD){
IntD[0] = 0;
for (int c = 1; c <= n; c++){
IntD[c] = IntD[c - 1] + D[c - 1];
}
}
double diffclock(clock_t clock1, clock_t clock2){
double diffticks = clock1 - clock2;
double diffms = diffticks / CLOCKS_PER_SEC;
return diffms;
}
string Event::str(){
ostringstream rslt;
rslt << "(" << s << " " << e << ")";
return rslt.str();
}
void sampleSeg(double const *D, int d, Event const& ev, int sd, double *raw_feat){
double r, *raw_feat_i;
int len = ev.length(), lo, up;
for (int i = 0; i < sd; i++){
raw_feat_i = raw_feat + i*d;
r = ev.s + ((double)i*(len - 1)) / (sd - 1);
lo = (int)floor(r);
memcpy(raw_feat_i, D + d*lo, d*sizeof(double)); //copy D(:,lo) to raw_feat_i
if (lo < r){
up = lo + 1;
cblas_dscal(d, r - lo, raw_feat_i, 1); // raw_feat_i = raw_feat_i*(r-lo);
cblas_daxpy(d, up - r, D + d*up, 1, raw_feat_i, 1); // raw_feat_i = raw_feat_i + (up-r)*D(:,up)
}
}
}
<file_sep>/read_file.h
/*********************************************
* Read files (mat files)
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* *******************************************/
#ifndef READ_FILE_HPP
#define READ_FILE_HPP
#include <iostream>
#include <vector>
#include <Eigen/Dense>
#include "mat.h"
#include "matrix.h"
mxArray *read_matfile(const char *filename, const char *varname);
void print_matfile(const char *filename, const char *varname);
Eigen::VectorXi no_dim(const char *filename, const char *varname);
double store_matvar(const char *filename, const char *varname);
Eigen::MatrixXd store_mattab(const char *filename, const char *varname);
std::vector<Eigen::MatrixXd> store_mattab2(const char *filename, const char *varname);
#endif // READ_FILE_H
<file_sep>/crtFeatWindow.h
/**************************************************
* Create time series data for a window of frames
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 14 Janvier 2015
* ************************************************/
#ifndef CRTFEATWINDOW_HPP
#define CRTFEATWINDOW_HPP
#include "crtFeatVect.h"
#include "kernelTS.h"
int evalKer(Eigen::MatrixXd Ds, TimeSeries TS, Eigen::MatrixXd w, double b, int minSegLen, int maxSegLen, int segStride, int d, int sd, int featType, double thresh);
#endif // CRTFEATWINDOW_H<file_sep>/crtFeatVect.h
/**************************************************
* Create time series data for SVM-based detectors
*
* By <NAME>
* Date: 25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#ifndef CRTFEATVECT_HPP
#define CRTFEATVECT_HPP
#include "read_file.h"
#include <list>
#include <math.h>
#include <Eigen/Cholesky>
Eigen::MatrixXd mixgauss_prob(Eigen::MatrixXd seq, Eigen::MatrixXd mu, Eigen::VectorXi dim_mu, std::vector<Eigen::MatrixXd> sigma, Eigen::VectorXi dim_sigma, Eigen::MatrixXd mixmat, int nbCluster);
Eigen::MatrixXd top3(Eigen::MatrixXd mat);
Eigen::MatrixXd square_dist(Eigen::MatrixXd p, Eigen::MatrixXd q, Eigen::MatrixXd A);
#endif // CRTTSDATA_H<file_sep>/DetectEvent.h
#ifndef __DETECTEVENT_H__
#define __DETECTEVENT_H__
#include <Eigen/Dense>
#include "KeyboardSimulator.h"
#include "crtFeatWindow.h"
#define nMyoSensors 2 //Number of Myo sensors
#define STRIDE 5 //Size of the stride between each sliding window
#define MINLENGTH 30 //Minimum size of a window
#define NFRAMES 100000 //Maximum number of frames
#define DIM 14 //Number of dimensions
Eigen::MatrixXd seq(DIM*nMyoSensors, NFRAMES);
//Eigen::MatrixXd seq2(DIM*nMyoSensors, NFRAMES);
int cpt_col = 0;
int compt = 0;
/* ******************************************************************** *
* Class containing the average and standard deviation for normalization *
* ********************************************************************* */
class NormParam {
public:
Eigen::MatrixXd mean;
Eigen::MatrixXd stand_dev;
//Constructors
NormParam()
{
}
NormParam(Eigen::MatrixXd aver, Eigen::MatrixXd dev)
{
mean = aver;
stand_dev = dev;
}
NormParam(const char* file)
{
mean = store_mattab(file,"average");
stand_dev = store_mattab(file,"standDev");
}
};
/* ********************************************** *
* Class containing all tha parameters of clusters *
* *********************************************** */
class Parameters {
public:
Eigen::MatrixXd mu;
Eigen::VectorXi dim_mu;
std::vector<Eigen::MatrixXd> sigma;
Eigen::VectorXi dim_sigma;
Eigen::MatrixXd mixmat;
Eigen::MatrixXd w;
double b;
int d, sd, fd, featType;
int maxSegLen;
TimeSeries TS;
int nbCluster;
Eigen::MatrixXd Ds;
//Call players'command
CallCommand *c;
int label;
double threshold;
//Constructors
Parameters()
{
}
Parameters(const char *pstFile, int nb, double thresh)
{
label = nb;
threshold = thresh;
mu = store_mattab(pstFile, "mu");
dim_mu = no_dim(pstFile, "mu");
sigma = store_mattab2(pstFile, "sigma");
dim_sigma = no_dim(pstFile, "sigma");
mixmat = store_mattab(pstFile, "mixmat");
nbCluster = mu.cols();
/* Create the Time Series data */
Ds.resize(nbCluster,NFRAMES);
d = Ds.rows();
w = store_mattab(pstFile, "w_instant");
b = store_matvar(pstFile, "b_instant");
/* Segment search options (sOpt) */
maxSegLen = 2 * MINLENGTH;
/* Kernel options (kOpt) */
Eigen::MatrixXd kOpt;
kOpt = store_mattab(pstFile, "kOpt");
Kernel ker;
ker.kerType = static_cast<int>(kOpt(0, 0));
ker.kerN = static_cast<int>(kOpt(1, 0));
ker.kerL = kOpt(2, 0);
if (kOpt(5, 0) != 0) {
ker.nSegDiv = static_cast<int>(kOpt(5, 0));
if (ker.nSegDiv < 1)
std::cout << "DetectEvent.h: nSegDiv must be >= 1" << std::endl;
}
else {
ker.nSegDiv = 1;
}
featType = static_cast<int>(kOpt(3, 0));
if (featType == FEAT_ORDER) {
sd = static_cast<int>(kOpt(4, 0));
fd = ker.get_fd(sd*d);
}
else if ((featType == FEAT_BAG) || (featType == FEAT_ENDDIFF)) {
fd = ker.get_fd(d);
}
else {
std::cout << "DetectEvent.h: Unknown feature option" << std::endl;
}
if (fd != w.rows()){
std::cout << "DetectEvent.h: length of w is inconsistent with the dimension of data" << std::endl;
}
/* Time series options */
TS.fd = fd;
TS.ker = ker;
TS.featType = featType;
TS.d = d;
c = new CallCommand();
}
};
class DetectEvent {
private:
unsigned thIDcomp, thIDRec;
public:
Parameters* param;
HANDLE hThComp, hThRec;
DetectEvent() {
hThComp = (HANDLE)1;
hThRec = (HANDLE)1;
param = new Parameters();
}
DetectEvent(const char *pstFile, int nb, double thresh)
{
hThComp = (HANDLE)1;
hThRec = (HANDLE)1;
param = new Parameters(pstFile, nb, thresh);
}
static unsigned __stdcall GetComputationLabel(void* param_ev)
{
Parameters *param = (Parameters *)param_ev;
Eigen::MatrixXd obslik;
obslik = mixgauss_prob(seq.block(0,10,DIM*nMyoSensors, MINLENGTH), param->mu, param->dim_mu, param->sigma, param->dim_sigma, param->mixmat, param->nbCluster);
//Top 3 values
Eigen::MatrixXd top;
top = top3(obslik);
for(int i=0; i<MINLENGTH; i++)
param->Ds.col(i) = top.col(i);
std::cout<<"top first"<<std::endl;
return 0;
}
static unsigned __stdcall GetRecognizedLabel(void* param_ev)
{
Parameters *param = (Parameters *)param_ev;
//Recognition code
int eval = -1;
Eigen::MatrixXd obslik;
obslik = mixgauss_prob(seq.block(0,compt-STRIDE,DIM*nMyoSensors,STRIDE), param->mu, param->dim_mu, param->sigma, param->dim_sigma, param->mixmat, param->nbCluster);
//Top 3 values
Eigen::MatrixXd top;
top = top3(obslik);
for(int i=0; i<STRIDE; i++)
param->Ds.col(MINLENGTH + STRIDE*cpt_col + i) = top.col(i);
eval = evalKer(param->Ds.block(0,0,param->nbCluster,MINLENGTH+STRIDE*cpt_col+STRIDE), param->TS, param->w, param->b, MINLENGTH, param->maxSegLen, STRIDE, param->d, param->sd, param->featType, param->threshold);
cpt_col++;
//Recognition_results return a corresponding number which is reused as paramenter
if(eval == 0){
//Ehab's code to discriminate mvt (FIRST WAY)
param->c->SendCommand(param ->label);
}
return 0;
}
void call_comp()
{
DWORD dwExCode;
if (hThComp != NULL){
GetExitCodeThread(hThComp, &dwExCode); //if the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE
if (dwExCode == STILL_ACTIVE) {
// printf("スレッド稼働中\n");
}
else { //Movement detected
hThComp = (HANDLE)_beginthreadex(NULL, 0, GetComputationLabel, (void *)param, 0, &thIDcomp);
}
}
}
void call_recognize()
{
DWORD dwExCode;
if (hThRec != NULL){
GetExitCodeThread(hThRec, &dwExCode); //if the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE
if (dwExCode == STILL_ACTIVE) {
// printf("スレッド稼働中\n");
}
else { //Movement detected
hThRec = (HANDLE)_beginthreadex(NULL, 0, GetRecognizedLabel, (void *)param, 0, &thIDRec);
}
}
}
};
#endif//__DETECTEVENT_H__<file_sep>/crtFeatVect.cpp
/**************************************************
* Create time series data for SVM-based detectors
*
* By <NAME>
* Date:25 Nov 2014
* Last modified: 25 Nov 2014
* ************************************************/
#include "crtFeatVect.h"
/* ******************************************************************************* *
* Evaluate the probability density function of a consitionnal mixture of Gaussian *
* ******************************************************************************* */
Eigen::MatrixXd mixgauss_prob(Eigen::MatrixXd data, Eigen::MatrixXd mu, Eigen::VectorXi dim_mu, std::vector<Eigen::MatrixXd> sigma, Eigen::VectorXi dim_sigma, Eigen::MatrixXd mixmat, int nbCluster)
{
int d, Q, M;
if (dim_mu.size() == 2 && mu.cols() == 1){
d = mu.rows();
Q = 1;
M = 1;
}
else if (dim_mu.size() == 2 && mu.cols() > 1) {
d = mu.rows();
Q = mu.cols();
M = 1;
}
else if (dim_mu.size() == 3) {
d = mu.rows();
Q = mu.cols();
M = dim_mu(2);
}
else {
std::cout << "crtTSData: mixgauss_prob: Problem in mu dimension" << std::endl;
}
int T = data.cols();
Eigen::MatrixXd B(Q, T);
Eigen::MatrixXd D; //in fact D is a vector
std::vector<Eigen::MatrixXd> B2;
if (dim_sigma.size() == 3) {
//Eigen::MatrixXd B2(Q,M,T);
std::vector<Eigen::VectorXcd> tab_eigvals;
bool isposdef = 0;
// Compute the eigenvalues for each matrix of sigma
for (std::vector<Eigen::MatrixXd>::iterator it = sigma.begin(), it_end = sigma.end(); it != it_end; ++it) {
Eigen::VectorXcd eigenvals;
Eigen::MatrixXd cell = *it;
eigenvals = cell.eigenvalues();
tab_eigvals.push_back(eigenvals);
}
// Determine if the matrix is positively-definite
for (std::vector<Eigen::VectorXcd>::iterator it = tab_eigvals.begin(), it_end = tab_eigvals.end(); it != it_end; ++it) {
Eigen::VectorXcd cell = *it;
for (int i = 0; i<cell.size(); i++) {
if (std::imag(cell(i)) == 0) {
if (std::real(cell(i)) > 0.0f) {
isposdef = 1;
}
else {
isposdef = 0;
}
}
else {
//std::cout << "crtFeatVect: mixgauss_prob: Eigenvalues shouldn't be complex" << std::endl;
}
}
}
int cpt = 0;
//Compute the normal distribution function B2
for (std::vector<Eigen::MatrixXd>::iterator it = sigma.begin(), it_end = sigma.end(); it != it_end; ++it) {
Eigen::MatrixXd cell = *it;
if (isposdef == 1) {
Eigen::MatrixXd inv_sig;
inv_sig = cell.inverse();
D = square_dist(data, mu.col(cpt), inv_sig);
D.transposeInPlace();
//logB2 = -(d/2)*log(2*pi) - 0.5*log(det(sigma)) - 0.5*D is a vector
Eigen::LLT<Eigen::MatrixXd> lltOfSigma(cell);
Eigen::MatrixXd L;
L = lltOfSigma.matrixL();
Eigen::VectorXd diag;
diag = L.diagonal();
double sum_diag = 0;
for (int i = 0; i<diag.rows(); i++) {
diag(i) = log(diag(i));
sum_diag += diag(i);
}
sum_diag = -sum_diag - (d / 2)*log(2 * M_PI);
Eigen::MatrixXd logB2(D.rows(), D.cols());
for (int i = 0; i<D.rows(); i++) {
for (int j = 0; j<D.cols(); j++) {
logB2(i, j) = sum_diag;
}
}
logB2 = logB2 - 0.5*D;
for (int i = 0; i<logB2.rows(); i++) {
for (int j = 0; j<logB2.cols(); j++) {
logB2(i, j) = exp(logB2(i, j));
}
}
B2.push_back(logB2);
}
else {
std::cout << "crtTSData: mixgauss_prob: sigma is not a positively definite matrix" << std::endl;
}
cpt++;
}
}
else {
std::cout << "crtTSData: mixgauss_prob: Problem of sigma dimension (cf mixgauss_prob to implement genral case)" << std::endl;
}
//if (Q < T) {
int cpt2 = 0;
for (std::vector<Eigen::MatrixXd>::iterator it = B2.begin(), it_end = B2.end(); it != it_end; ++it) {
Eigen::MatrixXd cell = *it;
for (int t = 0; t<T; t++) {
B(cpt2, t) = mixmat(cpt2, 0) * cell(0, t); //Weight
}
cpt2++;
}
/*}
else {
std::cout << "crtTSData: mixgauss_prob: implement the other case (cf matlab mixgauss_prob)" << std::endl;
}*/
return B;
}
/* *********************************** *
* Retain the top 3 values of a matrix *
* *********************************** */
Eigen::MatrixXd top3(Eigen::MatrixXd mat){
Eigen::MatrixXd matbis(mat.rows(), 1);
Eigen::MatrixXd maxTab(mat.cols(), 3);
//Compute the top three values
for (int k = 0; k<mat.cols(); k++) {
matbis = mat.col(k);
for (int i = 0; i<3; i++) {
Eigen::MatrixXf::Index maxRow, maxCol;
double max = 0;
max = matbis.maxCoeff(&maxRow, &maxCol);
maxTab(k, i) = max;
matbis(maxRow, maxCol) = 0;
}
}
//Store the top 3 values of each columns in a matrix
for (int c = 0; c<mat.cols(); c++) {
for (int r = 0; r<mat.rows(); r++) {
if (mat(r, c) != maxTab(c, 0) && mat(r, c) != maxTab(c, 1) && mat(r, c) != maxTab(c, 2)){
mat(r, c) = 0;
}
else {
if (mat(r, c) == 0) {
mat(r, c) = 0;
}
else {
mat(r, c) = log(mat(r, c));
}
}
}
}
return mat;
}
/* ***************************************** *
* Compute square distance between 2 matrix *
* m(i,j)=(p(:,i)-q(:,j))'*A*(p(:,i)-q(:,j)) *
* ***************************************** */
Eigen::MatrixXd square_dist(Eigen::MatrixXd p, Eigen::MatrixXd q, Eigen::MatrixXd A)
{
Eigen::MatrixXd sqdist(p.cols(), q.cols());
if (p.rows() != q.rows()) {
//std::cout << "crtFeatVect: square_dist: number of rows must be the same" << std::endl;
}
else {
Eigen::VectorXd sub_pq(p.rows());
for (int i = 0; i<p.cols(); i++) {
for (int j = 0; j<q.cols(); j++) {
for (int k = 0; k<p.rows(); k++) {
sub_pq(k) = p(k, i) - q(k, j);
}
sqdist(i, j) = sub_pq.transpose()*A*sub_pq;
}
}
}
return sqdist;
}
|
74621d1762f8b6ca728b8f90c2bca2052f23262a
|
[
"C",
"Text",
"C++"
] | 14
|
C++
|
SophieBonneau/earlyDetection
|
985aa9d804952244e53adf597b03bd97f564d8c8
|
ccfa0aa133e634eff8b50220cb3c47237eb0f17b
|
refs/heads/master
|
<file_sep>import plistlib
from collections import defaultdict
import pickle
import os
import requests
'''
Create the artist-albums database. If already exists load data file
'''
def parse():
artist_to_albums = defaultdict(set)
if os.path.isfile("index.p"):
artist_to_albums = pickle.load( open( "index.p", "rb"))
else:
#read the file into memory
plist = plistlib.readPlist('lib.xml')
for meta in plist:
if meta == u'Tracks':
for key in plist[meta]:
#dict for each song
cur_song = plist[meta][key]
if u'Album' in cur_song.keys() and u'Artist' in cur_song.keys():
artist_to_albums[cur_song[u'Artist']].add(cur_song[u'Album'])
pickle.dump(artist_to_albums, open("index.p", "wb"))
"""
# Sanity testing code
if os.path.isfile("ArtistList.")
for artist in artist_to_albums.keys():
if artist == u'The Black Keys' or artist == u'The Kooks' or artist == u'Frank Ocean':
for album in artist_to_albums[artist]:
print artist, album
"""
'''
Open the list of artists to look for.
Future: if no list, ask for user input to create the list
'''
if os.path.isfile("ArtistList.in"):
f = open("ArtistList.in", "r")
ch_artists = [raw.strip() for raw in f.readlines()]
res_values = []
for ch_artist in ch_artists:
exist_albums = []
if ch_artist in artist_to_albums.keys():
exist_albums = artist_to_albums['ch_artist']
#find the artist id to get more accurate results
payload = {'term':ch_artist, 'attribute':"artistTerm", 'entity':"song"}
r = requests.get("https://itunes.apple.com/search", params = payload)
res = r.json()
if res['resultCount'] > 0:
ch_artist_id = res['results'][0]['artistId']
#TODO: write a method to store the artist id's in a cache
#get the albums that this artist has released
#TODO: put the number of results in the config file
payload = {'id':ch_artist_id,'entity':'album', 'sort':'recent', 'limit':'10'}
r = requests.get("https://itunes.apple.com/lookup", params = payload)
res = r.json()
new_albums = []
for album in res[u'results']:
if album['wrapperType'] == u'artist':
if not album['artistName'] == ch_artist:
print "The returned artist is not what we're looking for"
else:
if not album['collectionName'] in artist_to_albums[ch_artist]:
values = [ch_artist, album['collectionName'], album['releaseDate'][0:10]]
res_values.append(values)
#TODO : Prettify the output
# print
# for word in values:
# print word+'\t',
return res_values
<file_sep>updateMusic
===========
sudo-apt get for music
We all have artists we want to keep track of, but I couldnt find an easy way to do this - in comes updateMusic(tentative name).
Specify a list of bands that you want to keep up with. The app checks for any new releases that you don't already own by the bands. It then lets you see all these new albums and links to the Itunes page for them.
The interface is meant for people comfortable with opening up a command line. :)
|
940beccd34e4714971c763ad7f81c60243cf580c
|
[
"Markdown",
"Python"
] | 2
|
Python
|
fabrol/updateMusic
|
7632c88be833e9a62a296adde117af74f3ccdfdb
|
7a3dc3840c32efdbe7690a014a69d591e4f7f18d
|
refs/heads/master
|
<repo_name>ChristianVillegas/serializable<file_sep>/Serializacion/src/ficherosBinarios_2/GuardarYRecuperarEstado.java
package ficherosBinarios_2;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
public class GuardarYRecuperarEstado extends EstadoPartida {
public void guardarEstado(EstadoPartida nombre) throws Exception{
File fichero = new File("C:/Users/Christian/Desktop/Pruebas/Guardar.dat");
FileOutputStream fileout = new FileOutputStream(fichero, true);
ObjectOutputStream fileoutput = new ObjectOutputStream(fileout);
fileoutput.writeObject(nombre);
fileoutput.close();
}
public void recuperarEstado(EstadoPartida nombre) throws Exception{
File fichero = new File("C:/Users/Christian/Desktop/Pruebas/Guardar.dat");
FileInputStream filein = new FileInputStream(fichero);
ObjectInputStream fileinput = new ObjectInputStream(filein);
do {
nombre = (EstadoPartida) fileinput.readObject();
System.out.println(nombre.toString());
} while (nombre != null);
fileinput.close();
}
}
<file_sep>/Serializacion/src/Administrador.java
public class Administrador extends Empleado {
private double incentivo;
public Administrador(String n, double s, int anno, int mes, int dia) {
super(n, s, anno, mes, dia);
this.incentivo=0;
}
public double getSueldo() {
double sueldoBase=super.getSueldo();
return sueldoBase + incentivo;
}
public double getIncentivo() {
return incentivo;
}
public void setIncentivo(double b) {
incentivo = b;
}
@Override
public String toString() {
return super.toString() + " Incentivo=" + incentivo;
}
}
|
c00d7ef83cf7c718909049f3658aaf8ce23f6678
|
[
"Java"
] | 2
|
Java
|
ChristianVillegas/serializable
|
d443d7dd54f82a509549008cddb9582f08b82e35
|
d3e6acfc80cf31d4af8df46d7a03e984482c0395
|
refs/heads/master
|
<repo_name>YuraPogorelov/sber-app<file_sep>/src/components/list-сustomization/list-сustomization.js
import React, {Component} from "react";
import {makeStyles} from "@material-ui/core";
import FormControl from "@material-ui/core/FormControl";
import FormGroup from "@material-ui/core/FormGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Checkbox from "@material-ui/core/Checkbox";
import Button from "@material-ui/core/Button";
import SaveIcon from "@material-ui/icons/Save"
const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
},
formControl: {
margin: theme.spacing(3),
},
button: {
margin: theme.spacing(1),
},
}));
class ListCustomization extends Component {
constructor(props) {
super(props);
this.state = {state: false};
this.state = { modalVisible: true}
}
state = {
id: false,
data: false,
tipClient: false,
fioClient: false,
sum: true,
};
handleChange = name => e => {
this.setState({ [name]: e.target.checked});
this.setState(
prevState => ({ modalVisible: !prevState.modalVisible})
)
};
render() {
const classes = useStyles;
const {id, data, tipClient, fioClient, sum} = this.state;
return (
<div className={classes.root}>
<h1>Customization</h1>
<FormControl component="fieldset" className={classes.formControl}>
<FormGroup>
{this.state.modalVisible ? (
<FormControlLabel
control={<Checkbox checked={id} onChange={this.handleChange('id')} value="id"/>}
label="Id операции"
/>
) : null}
<FormControlLabel
control={<Checkbox checked={data} onChange={this.handleChange('data')} value="data"/>}
label="Дата операции"
/>
<FormControlLabel
control={<Checkbox checked={tipClient} onChange={this.handleChange('tipClient')}
value="tipClient"/>}
label="Тип клиента"
/>
<FormControlLabel
control={<Checkbox checked={fioClient} onChange={this.handleChange('fioClient')}
value="fioClient"/>}
label="ФИО клиента"
/>
<FormControlLabel
control={<Checkbox checked={sum} onChange={this.handleChange('sum')} value="sum"/>}
label="Сумма операции"
/>
</FormGroup>
<hr/>
<Button
variant="outlined"
color="default"
size="medium"
className={classes.button}
startIcon={<SaveIcon/>}
>
Сохранить
</Button>
</FormControl>
</div>
)
}
};
export default ListCustomization;
<file_sep>/src/components/app-desktop/app-desktop.js
import React from "react";
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Typography from '@material-ui/core/Typography';
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import {
BrowserRouter as Router,
Switch,
Route,
Link, NavLink
} from "react-router-dom";
import ListCustomization from "../list-сustomization";
import ListOperations from "../list-operations";
import Grid from "@material-ui/core/Grid";
const useStyles = makeStyles({
card: {
margin: 20,
maxWidth: 300,
border: 'solid 2px black',
},
});
const AppDesktop = () =>{
const classes = useStyles();
return(
<Router>
<Switch>
<Route path="/list-customization" component={ListCustomization}/>
<Route path="/list-operations" component={ListOperations}/>
<Card className={classes.card}>
<CardContent>
<Typography>
<h3>Операции</h3>
</Typography>
<List>
<ListItem>
<NavLink to="/list-operations">Список операций</NavLink>
</ListItem>
<ListItem>
<NavLink to="/list-customization">Настройка списка</NavLink>
</ListItem>
</List>
</CardContent>
</Card>
</Switch>
</Router>
)
};
export default AppDesktop;
<file_sep>/src/components/list-сustomization/index.js
import ListCustomization from "./list-сustomization";
export default ListCustomization;
<file_sep>/src/components/app-desktop/index.js
import AppDesktop from "./app-desktop";
export default AppDesktop
<file_sep>/src/components/app/App.js
import React, {Component} from 'react';
import './App.css';
import Container from "@material-ui/core/Container";
import Grid from "@material-ui/core/Grid";
import AppHeader from "../app-header";
import LeftPanel from "../left-panel";
import AppDesktop from "../app-desktop";
import {
BrowserRouter as Router,
Switch,
Route,
} from "react-router-dom";
import ListCustomization from "../list-сustomization";
import ListOperations from "../list-operations";
class App extends Component {
render() {
return (
<Router>
<Route exact path="/"/>
<div className="App">
<Container>
<Grid container>
<Grid>
<LeftPanel/>
</Grid>
<Grid item xs={11}>
<AppHeader/>
<Switch>
<Route path="/list-customization" component={ListCustomization}/>
<Route path="/list-operations" component={ListOperations}/>
<AppDesktop/>
</Switch>
</Grid>
</Grid>
</Container>
</div>
</Router>
);
}
}
export default App;
<file_sep>/src/components/left-panel/left-panel.js
import React from 'react';
import {makeStyles} from '@material-ui/core/styles';
import SettingsIcon from '@material-ui/icons/Settings';
import ListIcon from '@material-ui/icons/List';
import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows';
import IconButton from '@material-ui/core/IconButton';
import {NavLink} from "react-router-dom";
const useStyles = makeStyles(theme => ({
root: {
background: '#000000',
height: 700,
width: 65,
},
icon: {
color: '#ffffff',
height: 40,
width: 40,
},
}));
const LeftPanel = () => {
const classes = useStyles();
return (
<div className={classes.root}>
<IconButton>
<NavLink to=""><DesktopWindowsIcon className={classes.icon}/></NavLink>
</IconButton>
<IconButton>
<NavLink to="/list-operations"><ListIcon className={classes.icon}/></NavLink>
</IconButton>
<IconButton>
<NavLink to="/list-customization"><SettingsIcon className={classes.icon}/></NavLink>
</IconButton>
</div>
);
};
export default LeftPanel;
<file_sep>/src/components/list-operations/index.js
import ListOperations from "./list-operations";
export default ListOperations;
|
006bc207a23e30493e5d0f452d58d7af2d77a6e5
|
[
"JavaScript"
] | 7
|
JavaScript
|
YuraPogorelov/sber-app
|
e2f0afb195b11c7853d3718b3c710d80a74ec0de
|
68aa6b497856bea5056963b3fc4078be74bbc7ad
|
refs/heads/master
|
<repo_name>missing-user/mensa<file_sep>/homometer/views.py
from django.shortcuts import render
from django.db.models import Sum
from django.views.decorators.clickjacking import xframe_options_exempt
from math import ceil
from .models import Stat
def index(request, minimal=False):
current = Stat.objects.aggregate(current_sum=Sum('current'))['current_sum']
current = current if current else 0
percent = (current / 1500 if current / 1500 < 0.99 else 0.99) * 100 + 1
colors = ['#2dde57', '#2dde57', '#2dde57', '#f3ad4e', '#f3ad4e', '#f3ad4e', '#f3ad4e', '#ed0009', '#ed0009', '#ed0009']
color = colors[ceil(percent / 10) - 1]
context = {
'current': current,
'percent': percent,
'color': color,
'minimal': minimal,
}
return render(request, 'homometer/index.html', context)
@xframe_options_exempt
def index_minimal(request):
return index(request, minimal=True)
<file_sep>/requirements.txt
django ~= 2.2
requests ~= 2.22.0
|
b1e1dea0632e42f029772ba037525ce954424b41
|
[
"Python",
"Text"
] | 2
|
Python
|
missing-user/mensa
|
3d8f558def6bed9a3e98f5e0b589883ab79ac09a
|
fbf3c5358fe8a618df259f270eced001042ec460
|
refs/heads/main
|
<repo_name>Neos-codes/DataStructures<file_sep>/Labs/Lab4/StackADT.h
#ifndef STACK_F
#define STACK_F
class Stack{
public:
virtual void push(int) = 0;
virtual int pop() = 0;
virtual bool isEmpty() = 0;
};
#endif
<file_sep>/Labs/Lab5/queueADT.h
#ifndef ADTQUEUE_H
#define ADTQUEUE_H
class Queue{
public:
virtual void push(int) = 0;
virtual void pop() = 0;
virtual int front() = 0;
virtual int back() = 0;
virtual int size() = 0;
virtual bool isEmpty() = 0;
};
#endif
<file_sep>/Labs/lab7/mapDH.cpp
#include "mapDH.h"
using namespace std;
//usaremos la funcion good_hash implementada en mapg.cpp como "Primer hash"
int good_hash_(string str,int tam){
int a = 0;
for(int i = 0; i < str.length(); i++)
a +=(int)str[i]*(i+1); //a cada letra del string, la multiplica por su posicion
return a%tam;
}
int double_hash(string str,int tam){
int a = 0;
for(int i = 0; i < str.length(); i++)
a+= (int)str[str.length()-1-i]*(i+1); //a cada letra del string, la multiplica por su posicion
// inversa
return a%tam;
}
static int primos [] = {53,97,193,389,769,1543,3079,6151,12289,24593,49157,98317,196613,393241,786433}; //Arreglo de numeros primos
mapDH::mapDH(){
index = 0; //Esto lleva la posicion del arreglo de primos
tam = primos[0]; //Asignar primer numero primo en el arreglo
elem = 0; //Cantidad de elementos no nulos insertados
hash = (pair<string,int> *)malloc(tam*sizeof(pair<string,int>)); // crear arreglo hash
for(int i = 0; i < tam; i++)
hash[i].first = "_";
//Crear arreglo de pares
}
void mapDH::insert(pair<string,int> par){ //o(n) Lineal amortizado
if(tam == elem) //Si tabla hash llena
rehash();
int a = good_hash_(par.first,tam);
int dh = -1;
int p = 0;
// cout << "Llego aca\n";
while(p < tam){
if(!hash[a].first.compare(par.first)){ //Si la clave ha sido insertada
cout << "Clave ya insertada, rechazado\n"; //Rechazar colocacion
return;
}
if(!hash[a].first.compare("_") || !hash[a].first.compare("*")){ //Si no hay "nada"
hash[a] = par; //Asignar a esa posicion
break;
}
//Si llega aqui, hubo colision
if(dh == -1) //Se calcula una vez el doble hash
dh = double_hash(par.first,tam);
a = (a+dh)%tam;
p++;
}//endwhile
// cout << "Pero no llego aca\n";
elem++;
//cout << "Elementos: " << elem << endl;
}
void mapDH::erase(string str){ // O(n)
int a = good_hash_(str,tam);
int dh = -1;
int p = 0;
while(p < tam && hash[a].first.compare("_")){ //Mientras no se recorra arreglo y no
//Encuentre un nulo
if(!hash[a].first.compare(str)){
hash[a].first = "*";
elem--;
cerr << "Elementos luego de borrar: " << elem << endl;
}
if(dh == -1)
dh = double_hash(str,tam);
a = (a+dh)%tam;
p++;
}
// cerr << "No se encontro la clave\n";
}
int mapDH::at(string str){ //O(n)
int a = good_hash_(str,tam);
int dh = -1;
int p = 0;
while(p < tam && hash[a].first.compare("_")){ //Mientras recorre arreglo y no hay "_"
if(!hash[a].first.compare(str)) //SI encuentra clave, devuelve valor
return hash[a].second;
if(dh == -1)
dh = double_hash(str,tam); //Calculamos hash doble si hay colision
a = (a+dh)%tam;
p++;
}
// cerr << "No esta guardada esta clave\n";
return -1;
}
int mapDH::size(){ //O(1)
return elem;
}
bool mapDH::empty(){ //O(1)
if(elem == 0)
return true;
return false;
}
void mapDH::rehash(){ //Metodo auxiliar
index++;
if(index == 15){ //Si ocupamos todos los primos del arreglo
cout << "Capacidad maxima alcanzada\nAgregar mas primos al arreglo\n";
return;
}
pair<string,int> *aux = (pair<string,int> *)malloc(primos[index]*100*sizeof(pair<string,int>)); //Se multiplica por 100 porque a veces genera error en el bus, pero se controla
//el desborde con las variables de tamaño del arreglo
for(int i = 0; i < primos[index]; i++)
aux[i].first = "_";
//cout <<"Rehashing DH......\n";
for(int i = 0; i < tam; i++){
int a = good_hash_(hash[i].first,primos[index]);
int dh = -1;
int p = 0;
while(p < primos[index]){
if(!aux[a].first.compare("_")){
aux[a] = hash[i];
break;
}
if(dh == -1)
dh = double_hash(hash[i].first,primos[index]);
a = (a+dh+2)%primos[index];
p++;
}
}
tam = primos[index];
free(hash);
hash = aux;
//cout << "Termino rehash\n";
}
void mapDH::maprint(){ //Metodo auxiliar
cerr << "Mapa actual:\n";
for(int i = 0; i < tam; i++)
cerr << "Pos "<<i<<": Clave: "<<hash[i].first << " elemento: "<<hash[i].second<<endl;
}
<file_sep>/Labs/Lab4/arrayStack.cpp
#include "arrayStack.h"
#include <iostream>
using namespace std;
arrayStack::arrayStack(){
start = new int [10000000];
max = 10000000;
top = 0;
}
void arrayStack::push(int num){
if(top < max){
start[top] = num;
// cout << "array push: " << start[top] << endl;
top++;
}
else
cout << "Error: Stack lleno\n";
}
int arrayStack::pop(){
if(top != 0){
// cout << "array pop :" << start[top-1] << endl;
top--;
return start[top];
}
else
cout << "El Stack esta vacio\n";
return -1;
}
bool arrayStack::isEmpty(){
if(top != 0)
return false;
else
return true;
}
<file_sep>/Labs/Lab3/ListADT.h
#ifndef LISTA_H
#define LISTA_H
class List{
public:
virtual void push_back(int) = 0; // Agregar elemento al final de la cola
virtual int at(int) = 0; // Obtiene un elemento de la lista
virtual int size() = 0; // Retorna el tamaño de la lista
};
#endif
<file_sep>/P1_QuadTree_and_KDTree/generador_normal.py
#inclusion de modulo (como libreria), usar el "as" me permite acortar codigo
import numpy as np
import matplotlib.pyplot as plt
#las variables no llevan tipo definido explicitamente
#input viene siendo la entrada
numPuntos = int(input())
n = int(input())
dm = float(input()) #desviacion media
# distribucion normal recibe promedio,desviacion estandar y cantidad
# de elementos
#CUIDADO AL CAMBIAR LA DESVIACION ESTANDAR, SE PUEDE SALIR DEL RANGO
arrX = np.random.normal(n*0.5,n*dm,numPuntos)
#castear los elementos a enteros (redondear)
arrX = arrX.astype('int')
arrY = np.random.normal(n*0.5,n*dm,numPuntos)
#castear los elementos a enteros (redondear)
arrY = arrY.astype('int')
puntos = set(zip(arrX,arrY))
#zip(arrX,arrY) junta los dos arreglos y los convierte en
#un arreglo de pares
print(n, n)
print(len(puntos))
#aqui se imprimen los puntos (el for de python es distinto al de c)
for x,y in puntos:
print (x,y)
plt.plot(arrX, arrY, '+')
plt.axis([0, numPuntos, 0, numPuntos])
plt.show()
# otras distribuciones:
# uniform([low, high, size])
# zipf(a[, size])
# normal([loc, scale, size])
# referencias https://docs.scipy.org/doc/numpy/reference/routines.random.html
<file_sep>/Labs/Lab1/Busqueda.cpp
#include <bits/stdc++.h>
#include "Busqueda.h"
using namespace std;
Busqueda::Busqueda(int n) {
this->vec = new int[n];
srand(time(NULL));
for(int i=0;i<n;i++) {
this->vec[i] = rand() % n + 1;
}
this->tam = n;
sort(this->vec,this->vec + this->tam);
//DESCOMENTAR ESTAS LINEAS PARA IMPRIMIR
// for(int i=0;i<this->tam;i++) cout<<this->vec[i]<<" ";
// puts("");
}
Busqueda::~Busqueda(){
delete this->vec;
}
int Busqueda::size(){
return this->tam;
}
int Busqueda::lineal(int num){
int pos = -1;
for(int i = 0; i < tam; i++){ // Busca desde inicio arreglo
if(vec[i] == num){ // y se detiene al encontrar num
pos = i;
// cout << "Lineal num: " << vec[i] << endl;
return pos;
}
}
return pos;
}
int Busqueda::binaria(int num){
int inf = 0,mid,sup = tam - 1;
int pos = -1;
while(inf <= sup){
mid = (inf + sup)/2;
// cout << "Inf: " << inf << " Sup: " << sup << " mid: " << mid << endl;
// cout << "Pos: " << pos << endl;
if(num > vec[sup] || num < vec[inf]) // Si esta fuera de los limites menor o mayor
break; // Del arreglo, retornar pos -1
if(num == vec[mid]){ // Si encontramos el numero, acotamos superiormente
pos = mid; // Para buscar mas a la izquierda
sup = mid - 1;
}
if(num > vec[mid]) // Si es mayor a la mitad, acotamos inferiormente
inf = mid + 1;
else // Si es menor a la mitad, acotamos superiormente
sup = mid - 1;
}
return pos;
}
int Busqueda::testSTL(int num){
//http://www.cplusplus.com/reference/algorithm/lower_bound/
int *iter = lower_bound(this->vec,this->vec+this->tam,num);
int pos = iter-vec;
if(pos>=this->tam){
return -1;
}else if(vec[pos]!=num){
return -1;
}else{
return pos;
}
}
<file_sep>/Labs/lab7/mapb.h
#include "mapADT.h"
using namespace std;
class mapb: public map{
private:
int tam; //Guarda el tamaño de la tabla hash
int elem; //Guarda la cantidad de elementos insertados en tabla hash
pair<string,int> *hash; //tabla hash, arreglo de pares
public:
mapb();
void insert(pair<string,int>);
void erase(string);
int at(string);
int size();
bool empty();
void rehash();
void maprint();
};
<file_sep>/Labs/lab8/mapBST.cpp
#include "mapBST.h"
using namespace std;
mapBST::mapBST(){
root = new node(); //Setear root como nodo vacio
tam = 0; //Setear tamaño en 0
}
void mapBST::insert(pair<string,int> par){
node *aux = root; //Iniciar siempre por la raiz
while(1){
if(aux -> data.first == "EMPTY"){ //Si nodo vacio
aux -> data = par; //Insertar dato
aux -> right = new node(); //crear hijos
aux -> left = new node();
//cerr << "Inserte " << aux -> data.first << " " << aux -> data.second << endl;
tam++;
return;
}
else if(!aux -> data.first.compare(par.first)){ //Si claves iguales
cerr << "Clave ya insertada, rechazada\n"; //Rechazar
return;
}
else if(aux -> data.first.compare(par.first) < 0){ //Si clave insertada es mayor
aux = aux -> right;
//cerr << "Me fui a la derecha\n";
}
else{ //Si clave insetada es menor
aux = aux -> left;
//cerr << "Me fui a la izquierda\n";
}
}//endwhile
}
void mapBST::erase(string key){
//No se llama
}
int mapBST::at(string key){
node *aux = root;
while(1){
if(!aux -> data.first.compare(key)){ //Si clave es igual a la insertada
// cerr << "Encontrado " << aux -> data.first << " dato: " << aux -> data.second <<endl;
return aux -> data.second; //Retornar valor
}
else if(!aux -> data.first.compare("EMPTY")){ //Si clave nodo vacia
cerr << "Clave no insertada\n"; //Rechazar y salir
return -1;
}
else if(aux -> data.first.compare(key) < 0){ //Si clave es mayor
aux = aux -> right; //Ir a la derecha
//cerr << "Me fui a la derecha\n";
}
else{ //Si la clave es menor
aux = aux -> left; //Ir hacia la izquierda
//cerr << "Me fui a la izquierda\n";
}
}//endwhile
return -1;
}
int mapBST::size(){
return tam;
}
bool mapBST::empty(){
if(root -> data.first.compare("EMPTY")) //Si primer elemento de la root vacio
return true; //return true
return false; //default return false
}
<file_sep>/Labs/lab9/test.cpp
#include "graph.h"
/*void dfs(int nodo, vector<vector<int>> adj){
stack<int> s;
q.push(nodo);
while(!s.empty()){
int nodo = s.top();
s.pop();
//Continuar rellenando
}
}
void bfs(int nodo, vector<vector<int>> adj){
queue<int> q;
q.push(nodo);
while(!q.empty()){
int nodo = q.front();
q.pop();
//Continuar rellenando
}
}
*/
int main(){
int n,m;
cin >> n;
cin >> m;
Graph g(n);
for(int i = 0; i < m; i++){ //Insertar aristas
int a,b;
cin >> a >> b;
g.insertEdge(a-1,b-1);
}
g.printAdj();
cerr << "\nCantidad de vertices: " << g.numVertices() << endl;
cerr << "\nCantidad de aristas: " << g.numEdges() << endl;
g.DFS(1);
return 0;
}
<file_sep>/Labs/Lab4/main.cpp
#include <bits/stdc++.h>
#include "arrayStack.h"
#include "linkedStack.h"
using namespace std;
int main(){
int n;
srand(time(NULL));
Stack *as = new arrayStack();
Stack *ls = new linkedStack();
cout<<"Cantidad de numeros a insertar"<<endl;
cin>>n;
clock_t t1 = clock();
for(int i = 0; i<n; i++){
as -> push(rand()%100);
}
clock_t t2 = clock();
double tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Insercion ArrayStack: "<<tiempo<<endl;
t1 = clock();
for(int i = 0; i<n; i++){
ls -> push(rand()%100);
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Insercion LinkedtStack: "<<tiempo<<endl;
t1 = clock();
while(!as -> isEmpty()){
as -> pop();
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Pop ArrayStack: "<<tiempo<<endl;
t1 = clock();
while(!ls -> isEmpty()){
ls -> pop();
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Pop ListStack: "<<tiempo<<endl;
return 0;
}
<file_sep>/Labs/Lab3/arrayList.h
#include "ListADT.h"
class arrayList: public List{
public:
arrayList();
void push_back(int);
int at(int);
int size();
private:
int *start;
int top;
int max;
};
<file_sep>/Labs/Lab5/main.cpp
#include <iostream>
#include "stackqueue.h"
using namespace std;
int main(){
/*
q -> push(1);
q -> push(2);
q -> push(3);
q -> push(4);
q -> push(5);
q -> push(6);
q -> push(7);
q -> push(8);
for(int i = 0; i < 9; i++){
it.nextInt();
}
*/
int n;
srand(time(NULL));
Queue *q = new stackqueue();
StackIt it((stackqueue *)q);
cout<<"Cantidad de numeros a insertar"<<endl;
cin>>n;
clock_t t1 = clock();
for(int i = 0; i<n; i++){
q -> push(rand()%100);
}
clock_t t2 = clock();
double tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Push Queuestack: "<<tiempo<<endl;
t1 = clock();
q -> front();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Front Queuestack: "<<tiempo<<endl;
t1 = clock();
it.nextInt();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Iterador NextInt Queuestack: "<<tiempo<<endl;
t1 = clock();
for(int i=0;i<n;++i){
q -> pop();
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<<"Pop Queuestack: "<<tiempo<<endl;
//cout<<q -> isEmpty()<<endl;
return 0;
}
<file_sep>/Labs/Lab3/main.cpp
#include <iostream>
#include "ListADT.h"
#include "arrayList.h"
using namespace std;
int main(){
List *a = new arrayList();
a->push_back(19);
a->push_back(10);
a->push_back(9);
cout << a->size() << " " << a->at(0) << endl;
delete a;
return 0;
}
<file_sep>/Labs/Lab0/clase.h
/*
En el .h se declara y en el .cpp se implementam
Para compilar:
g++ -c *.cpp //crea los objetos .o
g++ -o ejecutable *.o //linka todos los .o en un ejecutable
*/
class clase {
private:
int _myInt;
public:
clase(int myInt);
int getMyInt();
int incrementar();
int _incrementar(int aux);
};
<file_sep>/P1_QuadTree_and_KDTree/PRQuad.cpp
#include "PRQuad.h"
#include <utility> // Para usar Pair
using namespace std;
PRQuad::PRQuad(int a, int b,vector<pair<int,int>> input){
//Constructor usado para cuando se recibe inicialmente los datos
NW = NULL;
SW = NULL;
SE = NULL;
NE = NULL;
hasPoint = false;
//point = NULL;
point.first = -1;
point.second = -1;
topRight.first=a-1;
topRight.second=b-1;
botLeft.first=0;
botLeft.second=0;
construir(input);
//construir(input);
//cerr<<"Construido con int"<<endl;
}
PRQuad::PRQuad(pair<int,int> newTopRight, pair<int,int> newBotLeft){
//Se reciben los bounds del punto, luego, se guardan dentro de esta clase
//Se inicializan los hijos en null
//falta insertar el nodo anterior al crear la wea
NW = NULL;
SW = NULL;
SE = NULL;
NE = NULL;
hasPoint = false;
//point = NULL;
point.first = -1;
point.second = -1;
topRight = newTopRight;
botLeft = newBotLeft;
// cerr<<"Construido con pairs"<<endl;
}
bool PRQuad::hasChild(){
//Solo se encarga de revisar si el quad actual tiene algun hijo
//retorna true si tiene hijo
//retorna false si no tiene hijo
if(NW!=NULL || SW!=NULL || SE!=NULL || NE!=NULL){
//cerr<<"Tiene hijos"<<endl;
return true;
}
else{
/*cerr<<"No tiene hijos en cuadrante "<<botLeft.first<<" "<<botLeft.second<<" / "<<topRight.first<<" "<<topRight.second;
if (hasPoint){
cerr<<" pero tiene un punto"<<endl;
}
else{
cerr<<" no hay punto"<<endl;
}*/
return false;
}
}
bool PRQuad::isContained(pair<int,int> givenPoint){
//revisamos si el nodo esta contenido en este quad
if((givenPoint.first >= botLeft.first) && (givenPoint.first <= topRight.first) &&
(givenPoint.second >= botLeft.second) && (givenPoint.second <= topRight.second)){
//esta contenido en el eje x e y
//cerr<<givenPoint.first<<" "<<givenPoint.second<<" esta contenido en "<<botLeft.first<<" "<<botLeft.second<<" / "<<topRight.first<<" "<<topRight.second<<endl;
return true;
}
else{
//cerr<<givenPoint.first<<" "<<givenPoint.second<<" no esta contenido en "<<botLeft.first<<" "<<botLeft.second<<" / "<<topRight.first<<" "<<topRight.second<<endl;
return false;
}
}
void PRQuad::Subdivide(){
//Subdividimos el nodo y reubicamos nuestro punto anterior
pair<int,int> NWT = make_pair((topRight.first+botLeft.first)/2,topRight.second);
pair<int,int> NWB = make_pair(botLeft.first,(topRight.second+botLeft.second+1)/2);
pair<int,int> NET = topRight;
pair<int,int> NEB = make_pair((topRight.first+botLeft.first+1)/2,(topRight.second+botLeft.second+1)/2);
pair<int,int> SET = make_pair(topRight.first,(topRight.second+botLeft.second)/2);
pair<int,int> SEB = make_pair((topRight.first+botLeft.first+1)/2,botLeft.second);
pair<int,int> SWT = make_pair((topRight.first+botLeft.first)/2,(topRight.second+botLeft.second)/2);
pair<int,int> SWB = botLeft;
//top right , bot left
NW = new PRQuad(NWT,NWB);
NE = new PRQuad(NET,NEB);
SE = new PRQuad(SET,SEB);
SW = new PRQuad(SWT,SWB);
/*
NW = new PRQuad(make_pair(topRight.first/2,topRight.second),make_pair(botLeft.first,topRight.second/2)); ///BUGS
NE = new PRQuad(make_pair(topRight.first,topRight.second),make_pair(topRight.first/2,topRight.second/2)); ///BUGS
SE = new PRQuad(make_pair(topRight.first,topRight.second/2),make_pair(topRight.first/2,botLeft.second)); ///BUGS
SW = new PRQuad(make_pair(topRight.first/2,topRight.second/2),make_pair(botLeft.first,botLeft.second)); ///BUGS
*/
//Aca se reubica el punto anterior en el cuadrante correspondiente
if(NW->Insert(point)){
// cerr<<"Inserte el punto anterior en NW"<<endl;
return;
}
if(NE->Insert(point)){
// cerr<<"Inserte el punto anterior en NE"<<endl;
return;
}
if(SE->Insert(point)){
// cerr<<"Inserte el punto anterior en SE"<<endl;
return;
}
if(SW->Insert(point)){
// cerr<<"Inserte el punto anterior en SW"<<endl;
return;
}
}
bool PRQuad::Insert(pair<int,int> insertPoint){
//Al insertar, primero se revisa si dado punto esta contenido
if(!isContained(insertPoint)){
return false;
}
//cerr<<"Insertar en Cuadrante "<<botLeft.first<<" "<<botLeft.second<<" / "<<topRight.first<<" "<<topRight.second<<endl;
if(point == insertPoint){
//Si el punto q uno quiere insertar es igual al guardado return true
//cerr<<"Ya insertaste ese punto dummy"<<endl;
return true;
}
//si tiene un punto y no tiene hijos
//entonces insertamos nuestro punto y marcamos que tiene un hijo
if(!hasPoint && !hasChild()){
// cerr<<insertPoint.first<<" "<<insertPoint.second<<" insertado en una hoja"<<endl<<endl;
point = insertPoint;
hasPoint = true;
return true;
}
if(!hasChild()){
// cerr<<"SUBDIVIDIR"<<endl<<endl;
//getchar();
Subdivide();
//crea los 4 cuadrantes y revisa donde quedara el punto que teniamos antes
}
if(NW->Insert(insertPoint)){
// cerr<<insertPoint.first<<" "<<insertPoint.second<<" insertado en NW"<<endl;
return true;
}
if(NE->Insert(insertPoint)){
// cerr<<insertPoint.first<<" "<<insertPoint.second<<" insertado en NE"<<endl;
return true;
}
if(SE->Insert(insertPoint)){
// cerr<<insertPoint.first<<" "<<insertPoint.second<<" insertado en SE"<<endl;
return true;
}
if(SW->Insert(insertPoint)){
// cerr<<insertPoint.first<<" "<<insertPoint.second<<" insertado en SW"<<endl;
return true;
}
//Si llega aca es porque no se puede seguir subdiviediendo
// cerr<<"No se pudo seguir dividiendo"<<endl;
return false;
}
void PRQuad::construir(vector<pair<int,int>> input){ //recibe un vector de pairs
while(!input.empty()){ //mientras el vector de puntos no vacio
// cerr << "Construyo el punto "<< input[0].first<<" " <<input[0].second <<endl<<endl;
Insert(input[0]); //inserto en mi mismo la cabeza de vector
// cerr << "Quito del vector el punto "<< input[0].first<<" " <<input[0].second <<endl<<endl;
input.erase(input.begin()); // borrar cabeza de vector luego de insertar
}
}
vector<pair<int,int>> PRQuad::buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft){
vector<pair<int,int>> pointVec;
vector<pair<int,int>> aux;
if(!intersectRect(searchTopRight,searchBotLeft)){
//Si no se intersectan return
return pointVec;
}
if(!hasChild()){
if(intersectPoint(point,searchTopRight,searchBotLeft)){
pointVec.push_back(point);
//Entonces el punto si esta contenido dentro del rectangulo de busqueda
//se agrega al vector
}
}
else{
aux = NW->buscar(searchTopRight,searchBotLeft); //Guardamos el vector recibido recursivo
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
aux = NE->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
aux = SE->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
aux = SW->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
/*
pointVec.push_back(NE->buscar(searchTopRight,searchBotLeft));
pointVec.push_back(SE->buscar(searchTopRight,searchBotLeft));
pointVec.push_back(SW->buscar(searchTopRight,searchBotLeft));
*/
}
return pointVec;
}
bool PRQuad::intersectRect(pair<int,int> searchTopRight, pair<int,int> searchBotLeft){
//Recibe 2 ptos del rectangulo
//Si no se intersectan en X
if(topRight.first < searchBotLeft.first || searchTopRight.first < botLeft.first){
// cerr << "No se intersectan por X\n";
return false;
}
//Si no se intersectan en Y
if(topRight.second < searchBotLeft.second || searchTopRight.second < botLeft.second){
// cerr << "No se intersectan por Y\n";
return false;
}
// cerr << "Se intersectan los rectangulos\n";
//Si no se cumple lo anterior, se intersectan
return true;
}
bool PRQuad::intersectPoint(pair<int,int> givenPoint, pair<int,int> searchTopRight, pair<int,int> searchBotLeft){
//revisamos si el nodo esta contenido en este rectangulo
if((givenPoint.first >= searchBotLeft.first) && (givenPoint.first <= searchTopRight.first) &&
(givenPoint.second >= searchBotLeft.second) && (givenPoint.second <= searchTopRight.second)){
//esta contenido en el eje x e y
// cerr<<givenPoint.first<<" "<<givenPoint.second<<" esta contenido"<<endl;
return true;
}
else{
// cerr<<givenPoint.first<<" "<<givenPoint.second<<" no esta contenido"<<endl;
// cerr<<"En el rectangulo de topR " << searchTopRight.first << " " << searchTopRight.second<<endl;
// cerr << searchBotLeft.first << " " << searchBotLeft.second << endl;
return false;
}
}
/*
//FUNCION DEPRECADA
//ya no se usa porque ahora sabemos que las matrices son cuadradas y de tamaño 2^n
bool PRQuad::canSubdivide(){
//revisamos si se puede subdividir
//para esto, restamos las coordenadas en x e y y vemos si es 1 o 0
//si son 1 o 0, entonces no se va a poder subdividir mas
if((abs(topRight.first - botLeft.first) <= 1) && (abs(topRight.second - botLeft.second) <= 1)){
cerr<<"No se puede subdividir mas"<<endl;
return false;
}
else{
cerr<<"Se puede subdividir"<<endl;
return true;
}
}
*/
<file_sep>/Labs/lab9/graph.h
#include <iostream>
#include <vector>
using namespace std;
class Graph{
public:
Graph(int n);
bool areAdjacent(int a, int b);
void insertVertex();
void insertEdge(int a, int b);
void printAdj();
int numVertices();
int numEdges();
void DFS(int v);
private:
vector<vector<int>> nodes; //Lista de adyacencia
int m; //Cantidad de aristas
};
<file_sep>/P2_Map_using_AVLTree/MapAVL.cpp
#include "MapAVL.h"
using namespace std;
MapAVL::MapAVL(){
tam = 0;
root = new Node();
}
void MapAVL::insert(pair<string,int> newPair){
Node* aux = root;
insertAux(newPair,aux);
return;
}
void MapAVL::insertAux(pair<string,int> newPair, Node* aux){
if (aux->data.first == "EMPTY"){
aux->data = newPair;
aux->left = new Node();
aux->right = new Node();
aux->height = 1; //CAMBIOS
cerr<<"Inserte "<<newPair.first<<endl;
tam++;
return;
}
if (aux->data.first == newPair.first){
//Si la clave es igual no se inserta
cerr<<"Son iguales, no se inserta\n";
return;
}
/*if (aux->right == NULL && aux->left == NULL){
cerr<<"Cree los hijos para nodo "<<aux->data.first<<endl;
aux->left = new Node();
aux->right = new Node();
}*/
if (newPair.first.compare(aux->data.first)<0){
//Si es menor alfabeticamente, se inserta la izq
cerr<<newPair.first<<" va en la izquierda\n";
insertAux(newPair, aux->left);
computeHeight(aux); //CAMBIOS
}
else{
//Si es mayor alfabeticamente, se inserta la der
cerr<<newPair.first<<" va en la derecha\n";
insertAux(newPair, aux->right);
computeHeight(aux); //CAMBIOS
}
cerr<<"Return final"<<endl;
return;
}
void MapAVL::erase(string key){
Node *aux = root;
eraseAux(aux,key);
return;
}
Node* MapAVL::eraseAux(Node *aux, string key){
Node *res;
//or aux ==NULL
if(!aux -> data.first.compare("EMPTY")) //Si esta vacio, retornar nada
return root;
else if(key.compare(aux->data.first) < 0){ //Si clave menor, borrar a la izq
cerr << "Busco a la izquierda\n";
aux -> left = eraseAux(aux -> left, key);
}
else if(key.compare(aux->data.first) > 0){ //Si clave mayor, borrar a la der
cerr << "Busco a la derecha\n";
aux -> right = eraseAux(aux->right, key);
}
else{ //Cuando encontramos la clave
cerr << "Encontre la clave: " << aux->data.first<<endl;
if(aux -> left -> data.first == "EMPTY" && aux -> right -> data.first == "EMPTY"){
//No tiene hijos, entonces borramos
cerr << "Entre a la hoja "<<aux->data.first<<endl;
delete aux -> left;
delete aux -> right;
aux -> left = NULL;
aux -> right = NULL;
aux -> data.first = "EMPTY";
aux -> data.second = -1;
aux -> height = 0;
}
else if(aux -> left -> data.first == "EMPTY"){
//Tiene 1 hijo en la izquierda
cerr << "Borrado de " << aux -> data.first << " con hijo a la derecha\n";
res = aux;
aux = aux -> right;
delete res;
}
else if(aux -> right -> data.first == "EMPTY"){
//Tiene 1 hijo en la derecha
cerr << "Borrado de " << aux -> data.first << " con hijo a la izquierda\n";
res = aux;
aux = aux -> left;
delete res;
}
else{
//Tiene 2 hijos
cerr << "Borrado de " << aux -> data.first << " con 2 hijos\n";
res = findMin(aux -> right); //Busca minimo a la derecha, mantiene propiedad AVL
aux -> data = res -> data; //Copia el minimo en el nodo que se quiere borrar
aux -> right = eraseAux(aux -> right, res -> data.first);
}
}
computeHeight(aux);
return aux;
}
int MapAVL::at(string key){
Node* aux = root;
while(1){
//Si el nodo es vacio, termino
if (aux->data.first == key){
//Si la clave es igual, se retorna el entero asociado
//cerr<<"Son iguales, este es\n";
return aux->data.second;
}
if (aux->data.first == "EMPTY"){
//cerr<<"No encontre "<<key<<endl;
return -1;
}
if (aux->left == NULL || aux->right == NULL){
return -1;
}
if (key.compare(aux->data.first)<0){
//Si es menor alfabeticamente, se inserta la izq
//cerr<<key<<" va en la izquierda\n";
aux = aux->left;
}
else{
//Si es mayor alfabeticamente, se inserta la der
//cerr<<key<<" va en la derecha\n";
aux = aux->right;
}
}
//cerr<<"Return final"<<endl;
return -1;
}
int MapAVL::size(){
return tam;
}
bool MapAVL::empty(){
if (root->data.first != "EMPTY"){
return false;
}
else{
return true;
}
}
Node* MapAVL::balance(Node *current){
//te balanceai x weon
}
Node* MapAVL::Rrot(Node *current){
Node* newRoot = current->left;
current->left = newRoot->right;
newRoot->right = current;
computeHeight(current);
computeHeight(newRoot);
return newRoot;
}
Node* MapAVL::Lrot(Node *current){
Node* newRoot = current->right;
current->right = newRoot->left;
newRoot->left = current;
computeHeight(current);
computeHeight(newRoot);
return newRoot;
}
Node* MapAVL::LRrot(Node *current){
current->left = Lrot(current->left);
return Rrot(current);
}
Node* MapAVL::RLrot(Node *current){
current->right = Rrot(current->right);
return Lrot(current);
}
void MapAVL::computeHeight(Node* current){ //CAMBIOS
int leftH = 0;
int rightH = 0;
/*
calculamos la altura
si no tiene hijos, la altura es 1
si tiene hijos, se toma el max de la altura de los hijos +1
*/
if(current->hasChildren()){
//Si tiene hijos revisamos la altura de los hijos y tomamos el max
leftH = current->left->height;
rightH = current->right->height;
}
current->height = 1 + max(leftH, rightH);
}
void MapAVL::printAVL(){
//cerr<<"IN ORDER"<<endl;
//inOrderPrint(root);
cerr<<endl<<"PRE ORDER"<<endl;
preOrderPrint(root);
//cerr<<endl<<"POST ORDER"<<endl;
//postOrderPrint(root);
}
void MapAVL::inOrderPrint(Node* n){
if(n->left != NULL){
inOrderPrint(n->left);
}
cerr<<n->data.first<<endl;
if(n->right != NULL){
inOrderPrint(n->right);
}
}
void MapAVL::preOrderPrint(Node* n){
cerr<<n->data.first<<" "<<n->height<<" "<<n->hasChildren()<<endl; //CAMBIOS
if(n->left != NULL){
preOrderPrint(n->left);
}
if(n->right != NULL){
preOrderPrint(n->right);
}
}
void MapAVL::postOrderPrint(Node* n){
if(n->left != NULL){
postOrderPrint(n->left);
}
if(n->right != NULL){
postOrderPrint(n->right);
}
cerr<<n->data.first<<endl;
}
//--------------NUEVO METODO CREADO---------------//
Node* MapAVL::findMin(Node *n){ // Retorna el par de menor clave en el sub-arbol dado
// Buscando de manera recursiva
Node *min = n; //Seteamos hijo derecho como el menor
if(n->left != NULL){ //Buscamos el menor hacia la izq
min = findMin(n -> left);
if(min -> data.first.compare(n -> data.first) < 0) //Si clave encontrada es menor a clave de n
return min;
}
else
return min;
}
<file_sep>/Labs/Lab4/linkedStack.cpp
#include "linkedStack.h"
#include <iostream>
using namespace std;
linkedStack::linkedStack(){
nodo *head = NULL;
int tam = 0;
}
void linkedStack::push(int num){
nodo *aux = (nodo *)malloc(sizeof(nodo)); //crea un nodo en el hype
if(head == NULL){
head = aux;
aux -> next = NULL;
}
else{
aux -> next = head;
head = aux;
}
head -> n = num;
tam ++;
// cout << "linked push: " << head -> n << endl;
}
int linkedStack::pop(){
if(tam != 0){
nodo *temp = head;
int ret;
head = head -> next;
ret = temp -> n;
free(temp);
tam--;
// cout << "linked pop: " << ret << endl;
return ret;
}
else{
cout << "El Stack esta vacio\n";
return -1;
}
}
bool linkedStack::isEmpty(){
if(head != NULL)
return false;
else
return true;
}
<file_sep>/Labs/Lab1/Ejs 1-2/ej1.cpp
#include <iostream>
//----- CODIGO 1 -----
int A[n],sum[n];
for(int i = 0; i < n; i++) scanf("%d",&A[i]); //Escanea n enteros y los guarda en A
for(int i = 0; i < n; i++){ // desde la posicion i, suma todos los valores de A
int aux = 0; // que estan por antes de la posicion i usando 2 for
for(int j = 0; j <= i; j++){ // la suma desde 0 hasta i la guarda en aux
aux += a[j]; // luego la suma hasta la posicion i la guarda en la
} // posicion i del arreglo sum. (Osea en sum[i])
sum[i] = aux;
}
//----- CODIGO 2 -----
int A[n],sum[n];
for(int i = 0; i < n; i++) scanf("%d",&A[i]); //Escanea n enteros y los guarda en A
sum[0] = A[0]; // la primera posicion de sum guarda
for(int i = 1; i < n; i++){ // la primera posicion del arreglo A
sum[i] = sum[i-1] + A[i]; // y luego con un for, la suma en la posicion
} // i se calcula como la suma anterior más el valor
// en A[i]
// En resumen, el codigo 2 cumple la misma tarea de sumar los valores de A hasta la posicion i
// solo que lo hace en una cantidad mucho menor de pasos.
<file_sep>/Labs/lab8/test.cpp
#include <ctime>
#include "mapBST.h"
#include <vector>
void swap(pair<string,int> *a , pair<string,int> *b){
pair<string,int> aux = *a;
*a = *b;
*b = aux;
}
int main(){
int n;
map *m1 = new mapBST();
map *m2 = new mapBST();
string name;
vector<pair<string,int>> vec;
srand(time(NULL));
clock_t t1;
clock_t t2;
cout << "Ingrese la cantidad de elementos a generar\n";
cin >> n;
cout << "Creando BST ....\n";
cout << endl << endl;
for(int i = 0; i < n; i++){ //Crear vector de pares
for(int j = 0; j < 12; j++)
name.push_back('A'+rand()%25);
int k = rand()%100;
vec.push_back(make_pair(name,k));
name.clear();
}
t1 = clock();
for(int i = 0; i < vec.size(); i++) //Insertar desordenado
m1 -> insert(vec[i]);
t2 = clock();
double tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo insercion en mapBST sin orden: " << tiempo << endl;
for(int i = 0; i < vec.size(); i++){ //Selection sort simple
for(int j = i+1; j < vec.size();j++){ // Para ordenar arreglo de pares
if(vec[i].first.compare(vec[j].first) > 0){
swap(&vec[i],&vec[j]);
}
}
}
/* cerr << "Arreglo ordenado\n";
for(int i = 0; i < vec.size(); i++)
cerr << "pos i: " << vec[i].first << " " << vec[i].second << endl;
*/
t1 = clock();
for(int i = 0; i < vec.size(); i++)
m2 -> insert(vec[i]);
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo de insercion en mapBST ordenado: " << tiempo << endl;
cout << endl << endl;
name.clear(); //Limpiar string auxiliar
name = vec[vec.size() -1].first; // Colocar clave en name para buscar
// cerr << "Key para at: " <<name << endl;
t1 = clock();
m1->at(name);
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo busqueda en mapBST sin orden: " << tiempo << endl;
t1 = clock();
m2->at(name);
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo busqueda en mapBST ordenado: " << tiempo << endl;
// cout << "size m1: " << m1 -> size() << " size m2: " << m2 -> size() << endl;
return 0;
}
<file_sep>/P2_Map_using_AVLTree/test.cpp
#include "MapAVL.h"
using namespace std;
int main(){
string s1 = "aaa";
string s2 = "aad";
string s3 = "aac";
string s4 = "aaf";
string s5 = "aag";
//string s6 = "aba";
MapAVL ma;
cerr<<"Intento insertar "<<s1<<endl;
ma.insert(make_pair(s1,2));
cerr<<endl;
cerr<<"Intento insertar "<<s2<<endl;
ma.insert(make_pair(s2,2));
cerr<<endl;
cerr<<"Intento insertar "<<s3<<endl;
ma.insert(make_pair(s3,2));
cerr<<endl;
cerr<<"Intento insertar "<<s4<<endl;
ma.insert(make_pair(s4,10));
cerr<<endl;
cerr<<"Intento insertar "<<s5<<endl;
ma.insert(make_pair(s5,2));
cerr<<endl;
//cerr<<"Intento insertar "<<s6<<endl;
//ma.insert(make_pair(s6,-5));
//cerr<<endl;
cerr<<endl<<endl;
ma.printAVL();
cerr << "Escribir string a borrar: \n";
string test;
cin>>test;
cerr<<"Buscar "<<test<<" es: "<<ma.at(test)<<endl;
cerr<<ma.size()<<endl;
cerr<<ma.empty()<<endl;
cerr<<"Ahora borramos "<<test<<endl;
ma.erase(test);
ma.printAVL();
goto end;
end:
return 0;
}
<file_sep>/Labs/lab6/priorityQueueUnsorted.cpp
#include "priorityQueueUnsorted.h"
priorityQueueUnsorted::priorityQueueUnsorted(){ }
int priorityQueueUnsorted::top(){ // O(n), recorre 1 vez el vector
int min;
if(!q.empty()){ //Si la cola no esta vacia
min = q[0]; // el menor se asigna el primero de la cola
for(int i = 1; i < q.size(); i++){ //se compara con todo el resto del vector
if(min > q[i]) //si es mayor que el comparado
min = q[i]; //cambiar min
}
}
// cout << "top: " << min << endl;
return min;
}
void priorityQueueUnsorted::pop(){ // O(n), recorre una vez el vector
int min,minPos;
if(!q.empty()){ //Si no está vacio
min = q[0]; //se deja min como la primera posicion
minPos = 0; //y minPos como el subindice de la primera posicion
for(int i = 1; i < q.size() ;i++){ //se recorre el arreglo
if(min > q[i]){ //si min es mayor que el elemento actual
min = q[i]; //se reasigna min
minPos = i; // y se guarda su subindice
}
}
q.erase(q.begin() + minPos); //por ultimo se borra el elemento
}
/*
cout << "despues de pop\n";
for(int i = 0 ; i <q.size(); i++)
cout << q[i] << " ";
cout << endl;
*/
}
void priorityQueueUnsorted::push(int num){ // O(1), inserta al final del vector
q.push_back(num); //Se inserta el numero al final de la cola
/*
cout << "despues de push\n";
for(int i = 0 ; i <q.size(); i++)
cout << q[i] << " ";
cout << endl;
*/
}
int priorityQueueUnsorted::size(){ // O(1), devuelve el tamaño del vector
return q.size(); //size de cola es igual a size del vector
}
bool priorityQueueUnsorted::empty(){ // O(1), devuelve true si vector esta vacio
return q.empty(); //empty de cola es igual a empty de vector
}
<file_sep>/Labs/lab7/mapADT.h
#ifndef MAPADT_H
#define MAPADT_H
#include <iostream>
#include <utility>
using namespace std;
class map{
public:
virtual void insert(pair<string,int>) = 0;
virtual void erase(string) = 0;
virtual int at(string) = 0;
virtual int size() = 0;
virtual bool empty() = 0;
virtual void maprint() = 0;
};
#endif
<file_sep>/Labs/lab6/priorityQueueSorted.cpp
#include "priorityQueueSorted.h"
priorityQueueSorted::priorityQueueSorted(){ }
int priorityQueueSorted::top(){ // O(1), retornar cabeza de la cola
if(!q.empty())
return q[0];
//cout << "Queue vacia\n";
return -1;
}
void priorityQueueSorted::pop(){ //O(1), borrar cabeza de la cola
if(!q.empty())
q.erase(q.begin());
/* cout << "despues de borrar: " << endl;
for(int i = 0; i < q.size(); i++)
cout << q[i] << " ";
cout << endl;
*/
}
void priorityQueueSorted::push(int num){ // O(n*n), por complejidad de Insertion Sort
q.push_back(num);
int i,pivote,j;
//Busque muchas ideas de Selection Sort en internet
// tome ideas de muchas, pero comento para demostrar que entiendo lo que hago
for(i = 1; i < q.size(); i++){ //recorremos el arreglo
pivote = q[i]; //se asigna pivote como la posicion i del arreglo del for
j = i-1; // j esta una posicion a la izquierda de i
while(j >= 0 && q[j] > pivote){ // mientras j este dentro del limite inferior del arreglo
// y la posicion anterior sea menor que el pivote
q[j+1] = q[j]; // |
j -= 1;
} // | swap con el pivote
q[j+1] = pivote; // |
}
/*cout << "j = " << j << endl;
cout << "Se inserta: " << num << endl;
for(int i = 0; i < q.size(); i++)
cout << q[i] << " ";
cout << endl;
*/
}
int priorityQueueSorted::size(){ // O(1), retorna tamaño del vector
return q.size();
}
bool priorityQueueSorted::empty(){ // O(1), retorna si arreglo vacio o no
return q.empty();
}
<file_sep>/P1_QuadTree_and_KDTree/quadTreeADT.h
#ifndef QUADTREE_H
#define QUADTREE_H
#include <vector>
using namespace std;
class quadTree{
public:
virtual void construir(vector<pair<int,int>> input) = 0;
virtual vector<pair<int,int>> buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft) = 0;
};
#endif
<file_sep>/P2_Map_using_AVLTree/MapADT.h
#include <vector>
#include <utility>
#include <algorithm>
#include <string>
#include <iostream>
#include <ctime>
#ifndef MAP_H
#define MAP_H
using namespace std;
class MapADT{
public:
virtual void insert(pair<string,int> newPair) = 0;
virtual void erase(string key) = 0;
virtual int at(string key) = 0;
virtual int size() = 0;
virtual bool empty() = 0;
};
#endif
<file_sep>/Labs/lab7/mapg.cpp
#include "mapg.h"
using namespace std;
int good_hash(string str,int tam){
int a = 0;
for(int i = 0; i < str.length(); i++)
a +=(int)str[i]*(i+1); //a cada letra del string, la multiplica por su posicion
return a%tam;
}
static int primos [] = {53,97,193,389,769,1543,3079,6151,12289,24593,49157,98317,196613,393241,786433};
mapg::mapg(){
index = 0; // Esto lleva la posicion del arreglo de primos
tam = primos[0]; //Asignar primer numero primo en el arreglo
elem = 0;
hash = (pair<string,int> *)malloc(tam*sizeof(pair<string,int>)); // crear arreglo hash
for(int i = 0; i < tam; i++)
hash[i].first = "_";
//Crear arreglo de pares
}
void mapg::insert(pair<string,int> par){ // o(n) (Lineal amortizado)
if(tam == elem) //Si tabla hash llena
rehash(); // Rehash
int a = good_hash(par.first,tam);
int p = 0;
while(p < tam){
if(!hash[a].first.compare(par.first)){ //Si la clave ha sido insertada
cout << "Clave ya insertada, rechazado\n"; //Rechazar colocacion
return;
}
if(!hash[a].first.compare("_") || !hash[a].first.compare("*")){ //Si no hay "nada"
hash[a] = par; //asignar a esa posicion
break;
}
a = (a+1)%tam; //Recorrer arreglo circular
p++;
}//endwhile
elem++;
//cout << "Llego aca\n";
// cout << "Elementos: " << elem << endl;
}
void mapg::erase(string str){ // O(n)
int a = good_hash(str,tam);
int p = 0;
while(p < tam && hash[a].first.compare("_")){
if(!hash[a].first.compare(str)){
hash[a].first = "*";
elem--;
cerr << "Elementos luego de borrar: " << elem << endl;
return;
}
a = (a+1)%tam;
p++;
}
// cerr << "No se encontro la clave\n";
}
int mapg::at(string str){ //O(n)
int a = good_hash(str,tam);
int p = 0;
while(p < tam && hash[a].first.compare("_")){ //MIentras recorre arreglo y no hay "_"
if(!hash[a].first.compare(str)) //Si encuentra clave, devuelve valor
return hash[a].second;
a = (a+1)%tam; //Recorrer arreglo
p++;
}
// cerr << "No esta guardada esta clave\n"; //retorna -1 si no encuentra clave
return -1;
}
int mapg::size(){ // O(1)
return elem;
}
bool mapg::empty(){ //O(1)
if(elem == 0)
return true;
return false;
}
void mapg::rehash(){ //metodo auxiliar
index++;
if(index == 15){ //Si ocupamos todos los primos en arreglo
cout << "Capacidad maxima alcanzada\nAgregar mas primos al arreglo\n";
return;
}
//cout << "Siguiente tamaño: " << sizeof(pair<string,int>) << endl;
pair<string,int> *aux = (pair<string,int> *)malloc(primos[index]*100*sizeof(pair<string,int>));
//Se multiplica por 100, porque a veces provoca error en el bus, pero se controla
//el desborde con las variable de tamaño de arreglo
for(int i = 0; i < primos[index]; i++)
aux[i].first = "_"; //Inicializar todas las claves en "_"
// cout<<"Rehashing G.....\n";
for(int i = 0; i < tam; i++){
int a = good_hash(hash[i].first,primos[index]);
int p = 0;
while(p < primos[index]){
if(!aux[a].first.compare("_")){
aux[a] = hash[i];
break;
}
a = (a+1)%primos[index];
p++;
}//endwhile
}
tam = primos[index];
free(hash);
hash = aux;
}
void mapg::maprint(){ //Metodo auxiliar
cerr << "Mapa actual:\n";
for(int i = 0; i < tam; i++)
cerr << "Pos "<<i<<": Clave: "<<hash[i].first << " elemento: "<<hash[i].second<<endl;
}
<file_sep>/Labs/Lab0/main.cpp
#include <iostream>
#include "clase.h"
#include "arreglo.h"
using namespace std;
int main() {
srand(time(NULL));
clase c(5);
clock_t t1 = clock();
arreglo a(rand()%10000+2); // Dar tamaño de arreglo del 2 al 10000
cout << "La suma del arreglo es: " << a.suma() << endl;
clock_t t2 = clock();
cout << "Tiempo: " << (double)(t2-t1)/CLOCKS_PER_SEC << endl; // Imprime tiempo
// Imprimir valores
/*
c.incrementar();
cout << "El numero incrementado en 1: " << c.getMyInt() << endl;
c._incrementar(10);
cout << "El numero incrementado en n: " << c.getMyInt() << endl;
*/
}
<file_sep>/Labs/lab6/priorityQueueUnsorted.h
#include "pQueueADT.h"
#include <iostream>
#include <vector>
using namespace std;
class priorityQueueUnsorted: public pQueue{
private:
vector<int> q;
int aux;
public:
priorityQueueUnsorted();
int top();
void pop();
void push(int);
int size();
bool empty();
};
<file_sep>/P1_QuadTree_and_KDTree/kdT.cpp
#include "kdT.h"
#include <algorithm>
using namespace std;
//Obtenido de https://www.quora.com/How-do-I-sort-array-of-pair-int-int-in-C++-according-to-the-first-and-the-second-element
bool pairCompareX(const pair<int, int>&i, const pair<int, int>&j)
{
return i.first < j.first;
}
bool pairCompareY(const pair<int, int>&i, const pair<int, int>&j)
{
return i.second < j.second;
//sort(myvector.begin(), myvector.end(), myCompFunction)
}
kdT::kdT(){
isLeaf=false;
rightKDT = NULL;
leftKDT = NULL;
point.first = -1;
point.second = -1;
//El pto del padre se inicializa en -1,-1
}
kdT::kdT(vector<pair<int,int>> input){
isLeaf=false;
rightKDT = NULL;
leftKDT = NULL;
point.first = -1;
point.second = -1;
this->construir(input);
}
void kdT::construir(vector<pair<int,int>> input){
this->BuildKDT(input,0,input.size()-1,true);
}
kdT* kdT::BuildKDT(vector<pair<int,int>> input, int vStart, int vEnd, bool odd){
if (odd){
// cerr<<"Ordenamos el vector segun X"<<endl;
//Si es odd entonces el vector debe ser ordenado seugn X
sort(input.begin()+vStart,input.begin()+vEnd+1,pairCompareX);
}
else{
// cerr<<"Ordenamos el vector segun Y"<<endl;
//Si no es odd, etnonces se ordena por Y
sort(input.begin()+vStart,input.begin()+vEnd+1,pairCompareY);
}
int med = (vStart+vEnd)/2;
if (vStart == vEnd){
//Implica que este es una hoja
// cerr << "El punto "<<input[med].first << " "<<input[med].second<< " insertado en hoja\n";
point=input[med];
isLeaf=true;
}
else{
if(odd){
//Entonces trabajamos con el x
// cerr <<"vector izq: \n";
// for(int i = vStart; i <= med; i++){
// cout << input[i].first<<" "<<input[i].second<< " | ";
// }
// cerr<<"\nvector der: \n";
// for(int i = med+1; i <= vEnd; i++){
// cout << input[i].first<<" "<<input[i].second<< " | ";
// }
cerr <<endl;
point.first=input[med].first;
point.second=-1;
isLeaf=false;
}
else{
//Entonces trabajamos con el y
// cerr <<"vector izq: \n";
// for(int i = vStart; i <= med; i++){
// cout << input[i].first<<" "<<input[i].second<< " | ";
// }
// cerr <<"\nvector der: \n";
// for(int i = med+1; i <= vEnd; i++){
// cout << input[i].first<<" "<<input[i].second<< " | ";
// }
cerr <<endl;
point.first=-1;
point.second=input[med].second;
isLeaf=false;
}
leftKDT = new kdT();
rightKDT = new kdT();
// cerr<<"VECTOR LEFT "<<vStart<<" "<<med<<" "<<!odd<<endl;
leftKDT->BuildKDT(input,vStart,med,!odd);
// cerr<<"VECTOR RIGHT "<<med+1<<" "<<vEnd<<" "<<!odd<<endl;
rightKDT->BuildKDT(input,med+1,vEnd,!odd);
}
return this;
}
vector<pair<int,int>> kdT::buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft){
vector<pair<int,int>> pointVec;
vector<pair<int,int>> aux;
if(point.second==-1 && point.first==-1){
//No hay punto, return
return pointVec;
}
if(isLeaf){ //Si es una hoja
if(intersectPoint(point,searchTopRight,searchBotLeft)){
pointVec.push_back(point);
//Entonces el punto si esta contenido dentro del rectangulo de busqueda
//se agrega al vector
}
}
else{
if(point.second==-1){ //Si estamos revisando por X
// cerr<<"Revisamos por X"<<endl;
if(searchTopRight.first >= point.first && searchBotLeft.first <= point.first){
// cerr<<"Se revisa ambos"<<endl;
aux = leftKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
aux = rightKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
else if(searchBotLeft.first >= point.first){
// cerr<<"se revisa lado derecho\n";
aux = rightKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
else if(searchTopRight.first <= point.first){
// cerr<<"se revisa lado izquierdo\n";
aux = leftKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
}
else{ //Si estamos revisando por Y
// cerr<<"Revisamos por Y"<<endl;
if(searchTopRight.second >= point.second && searchBotLeft.second <= point.second){
// cerr<<"Se revisa ambos"<<endl;
aux = leftKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
aux = rightKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
else if(searchBotLeft.second >= point.second){
// cerr<<"se revisa por arriba\n";
aux = rightKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
else if(searchTopRight.second <= point.second){
// cerr<<"se revisa por abajo\n";
aux = leftKDT->buscar(searchTopRight,searchBotLeft);
pointVec.insert(pointVec.end(),aux.begin(),aux.end());
}
}
}
return pointVec;
}
bool kdT::intersectPoint(pair<int,int> givenPoint, pair<int,int> searchTopRight, pair<int,int> searchBotLeft){
//revisamos si el nodo esta contenido en este rectangulo
if((givenPoint.first >= searchBotLeft.first) && (givenPoint.first <= searchTopRight.first) &&
(givenPoint.second >= searchBotLeft.second) && (givenPoint.second <= searchTopRight.second)){
//esta contenido en el eje x e y
// cerr<<givenPoint.first<<" "<<givenPoint.second<<" esta contenido"<<endl;
return true;
}
else{
// cerr<<givenPoint.first<<" "<<givenPoint.second<<" no esta contenido"<<endl;
// cerr<<"En el rectangulo de topR " << searchTopRight.first << " " << searchTopRight.second<<endl;
// cerr << searchBotLeft.first << " " << searchBotLeft.second << endl;
return false;
}
}
/*
kdT::kdT(int a, int b,vector input ){
rootSize.first = a; //raiz del arbol guarda el tamaño
rootSize.second = b;
root = NULL;
rightKDT = NULL; //punteros a hijos nulos
leftKDT = NULL;
point.fist = -1; //El pto del padre se inicializa en -1,-1
point.second = -1;
//Aqui se llama el constructor con el vector
}
*/<file_sep>/Labs/Lab0/arreglo.h
class arreglo{
public:
arreglo(int n);
int suma();
int getn();
private:
int *myArray;
int n;
};
<file_sep>/P1_QuadTree_and_KDTree/PRQuad.h
#include "quadTreeADT.h"
#include <iostream>
#include <utility>
using namespace std;
class PRQuad: public quadTree{
private:
PRQuad *NW; //Punteros a subQuadtrees
PRQuad *SW;
PRQuad *SE;
PRQuad *NE;
pair <int,int> point; // Punto a almacenar
bool hasPoint; // Usado para saber si tiene punto
pair <int,int> topRight; // Punto de limite
pair <int,int> botLeft; // Punto de limite
public:
PRQuad(int a, int b,vector<pair<int,int>> input); //el constructor usado para cuando se recibe inicialmente los datos
PRQuad(pair<int,int> newTopRight,pair<int,int> newBotLeft); //Constructor
void construir(vector<pair<int,int>> input);
vector<pair<int,int>> buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft);
bool hasChild();
bool isContained(pair<int,int> givenPoint);
//bool canSubdivide();
void Subdivide();
bool Insert(pair<int,int> insertPoint);
bool intersectRect(pair<int,int> searchTopRight, pair<int,int> searchBotLeft);
bool intersectPoint(pair<int,int> givenPoint, pair<int,int> searchTopRight, pair<int,int> searchBotLeft);
};
<file_sep>/Labs/Lab5/stackqueue.cpp
#include "stackqueue.h"
#include <iostream>
#include <stack>
using namespace std;
//-----METODOS PARA LA QUEUE-----//
stackqueue::stackqueue(){ //Constructor
}
void stackqueue::push(int num){ //PUSH
s.push(num);
//cout << "Pushed: " << s.top() << endl;
}
void stackqueue::pop(){ //POP
// Complejidad 2n
while(!s.empty()){ // Copiar Stack en auxiliar
aux.push(s.top()); // COPIAR CON TOP
// cout << "Poped s: " << s.top() << endl;
s.pop();
}
if(!aux.empty()){ // Quitar elemento final de aux
//cout << "Poped aux: " << aux.top() << endl;;
aux.pop();
}
while(!aux.empty()){ // Devolver al stack
s.push(aux.top());
aux.pop();
}
//cout << "Poped\n";
}
int stackqueue::front(){
// Complejidad 2n+1
int top;
while(!s.empty()){ // Copiar stack en auxiliar
aux.push(s.top());
s.pop();
}
if(!aux.empty()) // Toma primer elemento
top = aux.top();
while(!aux.empty()){ // Devolver auxiliar a Stack
s.push(aux.top());
aux.pop();
}
//cout << "front: " << top << endl;
return top;
}
int stackqueue::back(){
//cout << "back: " << s.top() << endl;
return s.top();
}
int stackqueue::size(){
// cout << "size: " << s.size() << endl;
return s.size();
}
bool stackqueue::isEmpty(){
// cout << s.empty() << "\n";
return s.empty();
}
//-----METODOS PARA EL ITERADOR-----//
StackIt::StackIt(stackqueue *q){ // Constructor StackIt
count = 0; // Inicia contador de posicion
aq = q; // Toma referencia a lista
}
bool StackIt::hasNext(){
int tam = aq -> s.size(); // Obtener tamaño del stack "lista"
if(tam > count){ // si el tamaño es mayor al contador, tiene
cout << "Tiene next\n";
return true;
}
else{
cout << "No tiene next\n";
return false;
}
}
int StackIt::nextInt(){
int i = 0;
int next = -1;
while(!aq -> s.empty()){ // Copiar Stack en auxiliar
aq ->aux.push(aq -> s.top());
// cout << "Poped s: " << aq -> s.top() << endl;
aq -> s.pop();
}
while(!aq -> aux.empty()){ // Devolver al stack
aq -> s.push(aq -> aux.top());
if(i == count) // Si i = contador de iterador, retorna valor
next = aq -> aux.top(); // Caso contrario, retorna -1;
aq -> aux.pop();
i++;
}
count++;
// cout << "nextInt: " << next << endl;
return next;
}
void StackIt::reset(){
cout << "Reseted\n";
count = 0;
}
<file_sep>/Labs/lab6/pQueueADT.h
#ifndef ADTPQUEUE_H
#define ADTPQUEUE_H
class pQueue{
public:
virtual int top() = 0;
virtual void pop() = 0;
virtual void push(int) = 0;
virtual int size() = 0;
virtual bool empty() = 0;
};
#endif
<file_sep>/Labs/Lab4/linkedStack.h
#include "StackADT.h"
typedef struct node{
int n;
node *next;
}nodo;
class linkedStack: public Stack{
public:
linkedStack();
void push(int);
int pop();
bool isEmpty();
private:
nodo *head;
int tam;
};
<file_sep>/Labs/lab9/graph.cpp
#include "graph.h"
#include <stack>
using namespace std;
Graph::Graph(int n){
m = 0;
for(int i = 0; i < n; i++) //Crear lista de adyacencia de para n nodos
nodes.push_back(vector<int>());
}
bool Graph::areAdjacent(int a, int b){
a--;
b--;
for(int i = 0; i < nodes[a].size(); i++) //Se recorre lista de nodo a
if(nodes[a][i] == b){ //Si lo encuentra, retorna true
cerr << "El nodo " << a+1 << " y " << b+1 << " si son adyacentes\n";
return true;
}
cerr << "El nodo " << a+1 << " y " << b+1 << " no son adyacentes\n";
return false; //Si no, false
}
void Graph::insertVertex(){
nodes.push_back(vector<int>()); //Se agrega nuevo nodo enumerado
cerr << "Ahora el vector tiene " << nodes.size() << "vertices\n";
}
void Graph::insertEdge(int a, int b){
nodes[a].push_back(b); //Al nodo a se agrega adyacencia con b
nodes[b].push_back(a); //Al nodo b se agrega adyacencia con a
m++;
}
void Graph::printAdj(){
cerr << "Adyacencia del grafo:\n";
for(int i = 0; i < nodes.size(); i++){
cerr << "Nodo " << i+1 << ": ";
for(int j = 0; j < nodes[i].size(); j++){
cerr << nodes[i][j]+1 << " ";
}
cerr << endl;
}
}
int Graph::numVertices(){
return nodes.size();
}
int Graph::numEdges(){
return m;
}
void Graph::DFS(int v){
stack<int> s;
bool visited[nodes.size()]; //Arreglo de nodos visitados
for(int i = 0; i < nodes.size(); i++) //Setear todos los nodos como no visitados
visited[i] = false;
s.push(v-1); //Agregar el nodo a la cola
while(!s.empty()){ //Mientras se tengan nodos visitables
int nodo = s.top();
s.pop();
if(!visited[nodo]){ //Si el nodo no ha sido visitado
visited[nodo] = true;
cerr << "Voy al nodo " << nodo+1 << endl;
for(int i = 0 ; i < nodes[nodo].size(); i++){
//if(!visited[nodes[nodo][i]])
s.push(nodes[nodo][i]);
}
}
else{
//cerr << "Nodo " << nodo+1 << " ya visitado\n";
}
cerr << endl;
}//endwhile
}
<file_sep>/P1_QuadTree_and_KDTree/kdTreeADT.h
#ifndef KDTREE_H
#define KDTREE_H
#include <vector>
using namespace std;
class kdTree{
public:
virtual void construir(vector<pair<int,int>> input) = 0;
virtual vector<pair<int,int>> buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft) = 0;
};
#endif<file_sep>/Labs/Lab1/Busqueda.h
class Busqueda {
private:
int tam;
int *vec;
public:
Busqueda(int n);
~Busqueda();
int size();
int lineal(int num);
int binaria(int num);
int testSTL(int num);
};
<file_sep>/Labs/lab7/mapg.h
#include "mapADT.h"
using namespace std;
class mapg: public map{
private:
int index;
int tam; //Tamaño actual de la tabla
int elem; //Cantidad de elementos en la tabla
pair<string,int> *hash; //Puntero a la tabla hash
public:
mapg();
void insert(pair<string,int>);
void erase(string);
int at(string);
int size();
bool empty();
void rehash();
void maprint();
};
<file_sep>/P1_QuadTree_and_KDTree/kdT.h
#include "kdTreeADT.h"
#include <iostream>
#include <utility>
using namespace std;
class kdT: public kdTree{
private:
kdT *rightKDT;
kdT *leftKDT;
pair<int,int> point;
pair<int,int> rootSize;
bool isLeaf;
//true si se revisa X
//false si se revisa Y
/*
vector<pair<int,int>> Xr;
vector<pair<int,int>> Yr;
vector<pair<int,int>> Xl;
vector<pair<int,int>> Yl;
*/
public:
//kdT(int a, int b);
kdT();
kdT(vector<pair<int,int>> input);
void construir(vector<pair<int,int>> input);
vector<pair<int,int>> buscar(pair<int,int> searchTopRight, pair<int,int> searchBotLeft);
kdT *BuildKDT(vector<pair<int,int>> input, int vStart, int vEnd, bool odd);
bool intersectPoint(pair<int,int> givenPoint, pair<int,int> searchTopRight, pair<int,int> searchBotLeft);
}; <file_sep>/Labs/Lab3/arrayList.cpp
#include "arrayList.h"
#include <iostream>
using namespace std;
arrayList::arrayList(){
start = new int[100];
max = 100;
top = 0;
}
void arrayList::push_back(int num){
if(top < max){
start[top] = num;
top++;
}
else{
int *aux = new int[2*max];
max *= 2;
for(int i = 0; i < top; i++)
aux[i] = start[i];
delete start;
start = aux;
start[top] = num;
top++;
}
};
int arrayList::at(int num){
if(num < top)
return start[num];
else{
cout << "No existe esa posicion\n";
return -1;
}
};
int arrayList::size(){
return top;
};
<file_sep>/Labs/lab7/main.cpp
#include <iostream>
#include <ctime>
#include "mapb.h"
#include "mapg.h"
#include "mapDH.h"
int main(){
int n;
map *b = new mapb();
map *g = new mapg();
map *dh = new mapDH();
string aux;
srand(time(NULL));
clock_t t1 = clock();
clock_t t2 = clock();
cout<<"Ingrese la cantidad de elementos a generar\n";
cin >> n;
t1 = clock();
t2 = clock();
for(int i = 0; i<n; i++){
for(int j = 0; j<8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
b->insert(make_pair(aux,rand()%100));
aux.clear();
}
t2 = clock();
double tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo insercion mapb: " << tiempo << endl;
t1 = clock();
for(int i = 0; i < n; i++){
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
g->insert(make_pair(aux,rand()%100));
aux.clear();
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout<< "Tiempo insercion mapg: " << tiempo << endl;
t1 = clock();
for(int i = 0; i<n; i++){
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
dh->insert(make_pair(aux,rand()%100));
aux.clear();
}
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo insercion mapDH: " << tiempo << endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
b->at(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo at mapb: " << tiempo <<endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
g->at(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo at mapg: " << tiempo <<endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
dh->at(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo at mapDH: " << tiempo <<endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
b->erase(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo erase mapb: " << tiempo <<endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
g->erase(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo erase mapg: " << tiempo <<endl;
t1 = clock();
for(int j = 0; j < 8; j++){
aux.push_back('A'+rand()%25);
//cout << 'A'+rand()%25 << endl;
}
dh->erase(aux);
aux.clear();
t2 = clock();
tiempo = (double)(t2-t1)/CLOCKS_PER_SEC;
cout << "Tiempo erase mapDH: " << tiempo <<endl;
return 0;
}
<file_sep>/README.md
# DataStructures
Labs and Projects of my course "Data Structures". First half of 2019
Labs Folder: Some data structures implemented in C++. By me
P1_QuadTree_and_KDTree: QuadTree and KDTree implementations using C++. By <NAME> & <NAME>
P2_Map_using_AVLTree: The name of this folder says everything. C++. By <NAME> & <NAME>
<file_sep>/Labs/lab8/mapBST.h
#include "mapADT.h"
using namespace std;
typedef struct node{
node *right;
node *left;
pair<string,int> data;
node(){
right = NULL;
left = NULL;
data.first = "EMPTY";
}
}nodo;
class mapBST: public map{
private:
nodo *root;
int tam;
public:
mapBST();
void insert(pair<string,int> par);
void erase(string key);
int at(string key);
int size();
bool empty();
};
<file_sep>/P1_QuadTree_and_KDTree/main.cpp
#include "PRQuad.h"
#include "kdT.h"
#include <algorithm>
using namespace std;
int main(){
int N,M,P;
int x,y;
cout << "Ingresar tamaño del espacio"<<endl; //Se lee tamaño y puntos
cin >> N;
cin >> M;
cin >> P;
vector<pair<int,int>> ptos; //Se crea vector de puntos
vector<pair<int,int>> buscadoskd;
vector<pair<int,int>> buscadosquad;
for(int i = 0; i < P; i++){ //Se leen puntos
cin >> x;
cin >> y;
ptos.push_back(make_pair(x,y)); //Se insertan al vector
}
quadTree *PRQ = new PRQuad(N,M,ptos); //Se crea QuadTree
kdT *kd = new kdT(ptos); //Se crea kdTree
buscadoskd = kd->buscar(make_pair(8,10),make_pair(6,6)); //Despues de insertar se busca en ambos
buscadosquad = PRQ-> buscar(make_pair(8,10),make_pair(6,6));
cout << "Buscados en kd\n"; //Imprimir encontrados por ambos trees
for(int i = 0;i < buscadoskd.size();i++){
cerr<<"El punto " << buscadoskd[i].first << " " <<buscadoskd[i].second << " esta dentro"<<endl;
}
cout <<"Buscado en Quad\n";
for(int i = 0;i < buscadosquad.size();i++){
cerr<<"El punto " << buscadosquad[i].first << " " <<buscadosquad[i].second << " esta dentro"<<endl;
}
goto reprobar;
reprobar:
if(!0)
return 0;
}
<file_sep>/Labs/lab7/mapb.cpp
#include "mapb.h"
using namespace std;
int hashing(string str, int tam){
// Numero ascii primera letra modulo tamaño de arreglo
return (int)*str.begin()%tam;
}
mapb::mapb(){
tam = 10; //Parte tamaño 10
hash = (pair<string,int> *)malloc(tam*sizeof(pair<string,int>)); //Crear arreglo de pares
elem = 0; //Inicia con 0 elementos
for(int i = 0; i < tam; i++) //Setea todas las claves iniciales con un "_" para distinguir nulos
hash[i].first = "_";
}
void mapb::insert(pair<string,int> par){ // o(n) (Lineal amortizado)
if(tam == elem) //Si tabla hash llena
rehash(); // Rehash
int a = hashing(par.first,tam);
int p = 0;
while(p < tam){
if(!hash[a].first.compare(par.first)){ //Si la clave ya está insertada
cout<<"Clave ya insertada, rechazado\n";
return;
}
if(!hash[a].first.compare("_") || !hash[a].first.compare("*")){ //Si esa posicion esta vacia
hash[a] = par; // Insertar
break; // Salir de bucle
}
a = (a+1)%tam; //Avanzar posicion en arreglo circular
p++;
}//endwhile
elem++;
// cout << "Elementos: " << elem << endl;
}
void mapb::erase(string k){ // O(n)
int a = hashing(k,tam);
int p = 0;
while(p<tam && hash[a].first.compare("_")){ //Mientras recorre arreglo y no pille "_"
if(!hash[a].first.compare(k)){ // Si encuentra clave
hash[a].first = "*"; // Lo sustituye por un '*' como bandera
elem--;
cerr << "Elementos luego de borrar: " << elem << endl;
return;
}
a = (a+1)%tam; //Recorrer arreglo circular
p++;
}
// cerr <<"No se encontro la clave\n";
}
int mapb::at(string k){ //O(n)
int a = hashing(k,tam);
int p = 0;
while(p < tam && hash[a].first.compare("_")){ //Mientras se recorre arreglo y no ecuentre "_"
if(!hash[a].first.compare(k)) //SI encuentra clave devuelve elemento
return hash[a].second;
a = (a+1)%tam;
p++;
}
// cerr << "No esta guardada esta clave\n"; //Retorna -1 si no encuentra clave
return -1;
}
int mapb::size(){ //O(1)
cerr << "Elementos guardados: " << elem << endl;
return elem;
}
bool mapb::empty(){ //O(1)
if(elem == 0){
return true;
}
return false;
}
void mapb::rehash(){ //Metodo auxiliar
pair<string,int> *aux = (pair<string,int> *)malloc(tam*2*sizeof(pair<string,int>));
for(int i = 0; i < 2*tam; i++)
aux[i].first = "_";
// cout<<"Rehashing B.....\n";
for(int i = 0; i < tam; i++){
int a = hashing(hash[i].first,tam*2);
int p = 0;
while(p < 2*tam){
if(!aux[a].first.compare("_")){ //Si esa posicion esta vacia
aux[a] = hash[i]; // Insertar
break; // Salir de bucle
}
a = (a+1)%(2*tam); //Avanzar posicion en arreglo circular
p++;
}//endwhile
}
tam *= 2;
free(hash);
hash = aux;
}
void mapb::maprint(){ //Metodo auxiliar
cerr << "Mapa actual:\n";
for(int i = 0; i < tam; i++)
cerr << "Pos "<<i<<": Clave: "<<hash[i].first << " elemento: "<<hash[i].second<<endl;
}
<file_sep>/Labs/lab6/priorityQueueHeap.cpp
#include "priorityQueueHeap.h"
void swap(int *a, int *b){ //funcion auxiliar, O(1)
int aux;
aux = *a;
*a = *b;
*b = aux;
}
priorityQueueHeap::priorityQueueHeap(){ // O(1), inserta algo al inicio
q.push_back(-1); // Agregar cualquier cosa al inicio
// arbol comienza en posicion q[1]
}
int priorityQueueHeap::top(){ // O(1), retorna root de heap
if(q.size() >= 2) //Si cola no vacia, si tiene algo en q[1]
return q[1]; //Retornar elemento frontal
}
void priorityQueueHeap::pop(){ // O(log(n)), se mueve por la altura del arbol
int i = 1;
swap(&q[1],&q[q.size() - 1]); //Cambiar de posicion primero con ultimo
q.erase(q.begin() + q.size()-1 ); //Borrar ultimo elemento
while(2*i <= q.size() -1 || (2*i +1) <= q.size() -1){ //Mientras se tengan hijos
if((2*i +1) < q.size() ){ //Si tiene hijo derecho
if(q[2*i + 1] >= q[2*i]){ //Si el hijo derecho es mayor o igual que el izquierdo
swap(&q[i],&q[2*i]); //Swap con hijo izquierdo
i *= 2; // Modificar i
}
else if(q[2*i+1] < q[2*i]){ //Si hijo derecho es menor que el izquierdo
swap(&q[i],&q[2*i+1]); //swap con hijo derecho
i = 2*i +1;
}
else // Si no es mayor que ninguno, salir del ciclo
break;
}
//------------------------------------------------------------------------------------//
else{ //Si tiene solo hijo izquierdo
if(q[i] > q[2*i]){ // SI el hijo izquierdo es menor
swap(&q[i],&q[2*i]); // swap
i *= 2;
}
else //SI no es menor que el hijo, salir del ciclo
break;
}
}
/*
cout << "Arreglo Popeado:\n"; //Imprime heap (arreglo)
for(int j = 1; j <q.size(); j++)
cout << q[j] <<" ";
cout << "\n";
*/
}
void priorityQueueHeap::push(int num){ // O(log(n)), inserta al final pero hace upheaps
int i = q.size(); // Posicion del elemento que se insertara
int aux;
q.push_back(num); //Push al final del vector, (insercion)
while(i >=1){ // Mientras i sea mayor que el limite inferior del tree
if(q[i] < q[i/2]) // Si el elemento es menor que su padre
swap(&q[i],&q[i/2]); // Swap (upheap)
else // Si es mayor o igual se mantiene
break;
i /= 2; // i se modifica a la posicion del numero
}
/*
cout << "Heap: " << endl;
for(int j = 1; j <q.size(); j++)
cout << q[j] << endl;
cout << endl;
*/
}
int priorityQueueHeap::size(){ // O(1), retorna tamaño del arreglo
// cout << "size: " << q.size() - 1 << endl;
return q.size() - 1;
}
bool priorityQueueHeap::empty(){ // O(1), retorna si el arreglo esta vacio o no
if(q.size() <= 1)
return true;
return false;
}
<file_sep>/Labs/Lab5/stackqueue.h
#include <stack>
#include "queueADT.h"
using namespace std;
class stackqueue: public Queue{
private:
stack <int> s;
stack <int> aux;
public:
stackqueue();
void push(int);
void pop();
int front();
int back();
int size();
bool isEmpty();
friend class StackIt;
};
class StackIt{
private:
int count;
stackqueue *aq;
public:
StackIt(stackqueue *q);
bool hasNext();
int nextInt();
void reset();
};
<file_sep>/Labs/Lab1/main.cpp
#include <bits/stdc++.h>
#include "Busqueda.h"
using namespace std;
int main(){
int n;
cout<<"Ingrese la cantidad de números"<<endl;
cin>>n;
Busqueda b(n);
int num,pos;
double time;
cout<<"Ingrese número a buscar"<<endl;
cin>>num;
int rep=100;
clock_t start = clock();
for(int i=0;i<rep;i++) pos = b.lineal(num);
time = ((double)clock() - start) / CLOCKS_PER_SEC;
printf("Lineal: %d\n%.10f\n\n",pos, time/(double)rep);
start = clock();
for(int i=0;i<rep;i++) pos = b.binaria(num);
time = ((double)clock() - start) / CLOCKS_PER_SEC;
printf("Binaria: %d\n%.10f\n\n",pos, time/(double)rep);
start = clock();
for(int i=0;i<rep;i++) pos = b.testSTL(num);
time = ((double)clock() - start) / CLOCKS_PER_SEC;
printf("STL: %d\n%.10f\n\n",pos, time/(double)rep);
return 0;
}
<file_sep>/Labs/Lab4/arrayStack.h
#include "StackADT.h"
class arrayStack: public Stack{
public:
arrayStack();
void push(int);
int pop();
bool isEmpty();
private:
int *start;
int top;
int max;
};
<file_sep>/Labs/Lab1/Ejs 1-2/ej2.cpp
#include <iostream>
//----- CODIGO 1 -----
int A[n],sum[n]; //------- Estimacion de pasos--------------
for(int i = 0; i < n; i++) scanf("%d",&A[i]); // n
for(int i = 0; i < n; i++){ // n^2 (2 for anidados recorriendo arreglo)
int aux = 0;
for(int j = 0; j <= i; j++){
aux += a[j];
}
sum[i] = aux; // Total n^2 + n
} // Por lo tanto, el codigo 1 es O(n^2)
//----- CODIGO 2 -----
int A[n],sum[n];
for(int i = 0; i < n; i++) scanf("%d",&A[i]); // n
sum[0] = A[0]; // 1
for(int i = 1; i < n; i++){ // n
sum[i] = sum[i-1] + A[i];
} // Total: 2n + 1
// Por lo tanto, el codigo 2 es O(n)
// Esto quiere decir que el Codigo 2 es mas requiere una cantidad menor de pasos para
// hacer la misma tarea que el Codigo 1
<file_sep>/Labs/Lab3/linkedList.h
#include "ListADT.h"
class linkedList: public List{
public:
linkedList();
void push_back(int);
int at(int);
int size();
private:
nodo *head;
int top;
int max;
int tail;
}
<file_sep>/Labs/lab6/main.cpp
#include "priorityQueueHeap.h"
#include "priorityQueueUnsorted.h"
#include "priorityQueueSorted.h"
vector<int> heapSort(vector<int> q){ // O(n*log(n)), recorre la altura del arbol
pQueue *qe = new priorityQueueHeap(); // n veces ordenando los datos
for(int i = 0; !q.empty(); i++){ //meter todo al heap
qe -> push(q.front()); //push primer elemento del vector al heap
q.erase(q.begin()); // borrar primer elemento del vector
}
while(!qe -> empty()){ //Pasar del Heap al vector
q.push_back(qe -> top()); //Se pushea al vector la raiz del heap
qe -> pop(); //se borra la raiz del heap
}
for(int i = 0; i < q.size(); i++) //Imprimir vector
cout << q[i] << " ";
cout << endl;
return q;
}
vector<int> selectionSort(vector<int> q){ // O(n*n), recorre el arreglo 1 vez buscando el menor
pQueue *qe = new priorityQueueUnsorted(); // y lo devuelve, repite el proceso n veces
for(int i = 0; !q.empty(); i++){ //Meter todo a la cola
qe -> push(q.front());
q.erase(q.begin()); //Despues de meter elemento, borrarlo del vector
}
while(!qe -> empty()){ // Mientras la cola no este vacia
q.push_back(qe -> top()); // se pasa de la cola al vector
qe -> pop(); // pop elemento de la cola
}
for(int i = 0; i < q.size(); i++) // Imprimir vector
cout << q[i] << " ";
cout << endl;
return q;
}
vector<int> insertionSort(vector<int> q){ // O(n*n), recorre el arreglo n veces
pQueue *qe = new priorityQueueSorted(); // desde tamaño 2 hasta n.
for(int i = 0; !q.empty(); i++){ // Meter todo a la cola
qe -> push(q.front());
q.erase(q.begin()); //despues de emeter elemento, borrarlo del vector
}
while(!qe -> empty()){ //mientras la cola no este vacia
q.push_back(qe -> top()); //se pasa de la cola al vector
qe -> pop(); //pop del elemento de la cola
}
for(int i = 0; i < q.size(); i++) // Imprimir vector
cout << q[i] << " ";
cout << endl;
return q;
}
int main(){
srand(time(NULL));
pQueue *qe = new priorityQueueSorted();
vector<int> aux;
cout << "Se pushea al vector: ";
for(int i = 0; i < 15; i++){
int num = rand()%10 +1;
cout << num << " ";
aux.push_back(num);
}
cout << endl;
/*
cout << "Heapsort: \n";
aux = heapSort(aux);
*/
cout << "Selection Sort: \n";
aux = selectionSort(aux);
/*
cout << "Insertion Sort: \n";
aux = insertionSort(aux);
*/
return 0;
}
<file_sep>/Labs/Lab0/arreglo.cpp
#include "arreglo.h"
#include <iostream>
using namespace std;
arreglo::arreglo(int _n){
n = _n;
myArray = new int[n];
for(int i = 0; i < n; i++){ //Llenar arreglo con numeros aleatorios del 1 al 100
myArray[i] = rand()%100+1;
// cout << myArray[i] << " " ; // Imprimir numeros en arreglo
}
//cout << "\n";
}
int arreglo::suma(){ // Sumar numeros en el arreglo
int aux = 0;
for(int i = 0; i < n; i++)
aux += myArray[i];
return aux;
}
int arreglo::getn(){ // Dar tamaño del arreglo
return n;
}
<file_sep>/Labs/Lab0/clase.cpp
#include "clase.h"
clase::clase(int myInt) {
_myInt = myInt;
}
int clase::getMyInt() {
return _myInt;
}
int clase::incrementar(){ // Metodo que aumentar en 1 _myInt
_myInt++;
}
int clase::_incrementar(int aux){ // Metodo que suma aux a _myInt
_myInt += aux;
}
<file_sep>/P2_Map_using_AVLTree/MapAVL.h
#include "MapADT.h"
using namespace std;
struct Node{ //CAMBIOS
Node* right;
Node* left;
int height;
pair<string,int> data;
Node(){
right = NULL;
left = NULL;
data.first = "EMPTY";
data.second = -1;
height = 0;
}
bool hasChildren(){
if (right == NULL && left == NULL){
//Si no se han inicializado los hijos no hay hijos
return false;
}
if (right->data.first == "EMPTY" && left->data.first == "EMPTY"){
//Si los hijos se inicializaron, pero estan vacios
return false;
}
//Sino tiene hijos
return true;
}
};
class MapAVL: public MapADT{
private:
Node* root;
int tam;
void insertAux(pair<string,int> newPair, Node* aux);
Node* eraseAux(Node *aux, string key);
Node* findMin(Node* n);
public:
MapAVL();
void insert(pair<string,int> newPair);
void erase(string key);
int at(string key);
int size();
bool empty();
Node* balance(Node *current);
Node* Rrot(Node *current);
Node* Lrot(Node *current);
Node* LRrot(Node *current);
Node* RLrot(Node *current);
void computeHeight(Node *current);
void inOrderPrint(Node* n);
void preOrderPrint(Node* n);
void postOrderPrint(Node* n);
void printAVL();
};
|
c17b578c457f4abc8fa1253ce794aeffa4629893
|
[
"Markdown",
"Python",
"C++"
] | 57
|
C++
|
Neos-codes/DataStructures
|
e1ef33fc750051ea79133f96955c8f272b90c617
|
91e441dbc18e107d0b46492483c8cc9097e819d2
|
refs/heads/master
|
<file_sep>source 'https://rubygems.org'
ruby '2.1.7'
gem 'headless'
gem 'selenium-webdriver', '2.47.1'
gem 'watir-webdriver'
gem 'page-object'
gem 'cucumber'
gem 'rspec'
gem 'rspec-expectations'
gem 'rubocop', '0.39.0'
<file_sep># cremita-darkly
Cremita Darkly
<file_sep>require 'rubygems'
require 'headless'
require 'watir-webdriver'
require 'watir-webdriver/wait'
require 'page-object'
require 'page-object/page_factory'
require 'rspec'
require 'rspec/expectations'
require_relative 'browser_initialization'
include BrowserInitialization
include RSpec::Matchers
World(PageObject::PageFactory)
if ENV['HEADLESS'].eql?('true')
puts 'INFO: Headless mode on'
@headless = Headless.new
@headless.start
end
puts "INFO: Using #{ENV['BROWSER']} browser"
$browser = open_browser
<file_sep>module BrowserInitialization
def open_browser
Selenium::WebDriver::Chrome::Service.executable_path = chrome_driver_path
browser = Watir::Browser.new :chrome,
switches: ['--ignore-certificate-errors' \
'--disable-prompt-on-repost' \
'--disable-popup-blocking' \
'--disable-translate'],
detach: :unspecified
browser.window.resize_to(1280, 800)
browser
end
private
def chrome_driver_path
ENV['CHROMEDRIVER_PATH'] || File.expand_path(File.join(File.dirname(__FILE__),
'..',
'..',
'browser_driver',
'chromedriver'))
end
end
<file_sep>require 'watir-webdriver'
require 'watir-webdriver/wait'
$counter = 0
AfterConfiguration do
dir_list = %w(screenshots logs)
create_dir_list dir_list
clean_dir_list dir_list
end
Before do
@browser = $browser
@browser.cookies.clear
Watir.default_timeout = 10
PageObject.default_page_wait = 10
PageObject.default_element_wait = 10
end
After do |scenario|
if scenario.failed?
$counter += 1
screenshots_counter = $counter.to_s.rjust(3, '0')
scenario_name = scenario.name.gsub(/[^0-9A-Za-z_ ]/, '')
feature_name = scenario.feature.name.gsub(/[^0-9A-Za-z_> ]/, '')
screenshots_base_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'screenshots'))
screenshot_path = "#{screenshots_base_path}/#{screenshots_counter} #{feature_name} > #{scenario_name}.png"
@browser.driver.save_screenshot(screenshot_path)
embed screenshot_path, 'image/png'
end
end
at_exit do
$browser.quit
@headless.destroy if ENV['HEADLESS'] == 'true'
end
private
def clean_dir_list(dir_list)
puts 'INFO: Cleaning dir list'
dir_list.each do |dir|
clean_dir_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', dir, '*'))
FileUtils.rm_rf(Dir.glob(clean_dir_path))
end
end
def create_dir_list(dir_list)
puts 'INFO: Creating dir list'
dir_list.each do |dir|
create_dir_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', dir))
Dir.mkdir(create_dir_path) unless File.exist?(create_dir_path)
end
end
|
c669f88e01ebf87a58b0d2d80f95b67e0c083ade
|
[
"Markdown",
"Ruby"
] | 5
|
Ruby
|
amannaloyarte/cremita-darkly
|
eece1daac1378fc340a27a677a4adb6f435c05cf
|
bb1265d8e1aaa4972ac87f5a01f9a728bcd7e0fb
|
refs/heads/master
|
<repo_name>chienptit941/HackathonHCVT<file_sep>/MysqlDB/src/main/java/Hackathon/MysqlDB/MainDriver.java
package Hackathon.MysqlDB;
import java.io.BufferedReader;
import java.io.FileReader;
public class MainDriver {
public static void main(String[] args) {
readFile("E:\\Eclipse Workspace\\MysqlDB\\courses.json");
}
public static String readFile(String filename) {
String result = "";
try {
BufferedReader br = new BufferedReader(new FileReader(filename));
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line != null) {
sb.append(line);
line = br.readLine();
System.out.println(line);
}
result = sb.toString();
} catch(Exception e) {
e.printStackTrace();
}
return result;
}
}
<file_sep>/MysqlDB/build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
<property name="lib.dir" value="libs" />
<property name="jar.dir" value="build/jar" />
<property name="jar.name" value="JSONParser.jar" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" classpathref="classpath"/>
</target>
<target name="build" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="${jar.dir}/${jar.name}" basedir="build/classes">
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="jsonparser.MainDriver"/>
</manifest>
</jar>
</target>
<target name="run">
<java jar="${jar.dir}/${jar.name}" fork="true"/>
</target>
<target name="buildandrun" depends="build, run" />
</project><file_sep>/MysqlDB/src/main/java/Hackathon/MysqlDB/MySQL.java
package Hackathon.MysqlDB;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class MySQL {
private Connection connection;
private static MySQL instance = null;
public MySQL getInstance(){
if (instance == null) instance = new MySQL();
return instance;
}
public void insertCategory(Category category) throws SQLException{
String sql = "INSERT INTO `hcvt`.`tblcategory`(`name`,`description`) VALUES (?,?);";
PreparedStatement ps = connection.prepareStatement(sql);
ps.setString(1, category.getName());
ps.setString(2, category.getDescription());
ps.execute();
}
public MySQL(){
try {
Class.forName("com.mysql.jdbc.Driver"); // Nạp driver cho việc kết nối
// Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); dùng cái này nếu là sqlserver của microsoft
} catch (ClassNotFoundException e1) {
e1.printStackTrace();
}
String url = "jdbc:mysql://192.168.43.69:3306/hcvt"; // trong đó ://127.0.0.1:3306/test là tên và đường dẫn tới CSDL.
// String Url = "jdbc:odbc:" + dataBaseName; dùng cái này nếu là SQLServer
try {
// Kết nối tới CSDL theo đường dẫn url, tài khoản đăng nhập là root, pass là <PASSWORD>, nếu CSDL của bạn khi tạo không có pass thi bỏ qua nó, chỉ cần viết getConnection(url)
connection = DriverManager.getConnection(url, "root", "toor");
System.out.print("Kết nối thành công");
} catch (SQLException e) {
e.printStackTrace();
}
}
public static void main(String ar[]){
new MySQL();
}
}<file_sep>/README.md
# HackathonHCVT
Hackathon project
|
5b526e3bd7c39e1280230a9227651b06f8cf8d7c
|
[
"Markdown",
"Java",
"Ant Build System"
] | 4
|
Java
|
chienptit941/HackathonHCVT
|
64b7c2d5604b05116a8e79cb545ce3ae026e7bbc
|
7492560e89b5261e6eda6c759f86513a656cdf0b
|
refs/heads/master
|
<repo_name>aladin94/BreakingBadProject<file_sep>/README.md
# BreakingBad
<h1>Fan page dedicated to the hit TV series "Breaking Bad"</h1>
<h2>Built using JavaScript, React, HTML/CSS</h2>
<img src='bb.jpg' height='auto' width='auto'>
<file_sep>/src/components/ui/Footer.js
import React from 'react'
const Footer = () => {
return (
<footer className='footer'>
<h1 className='fansite'>Breaking Bad Fan Site</h1>
<h3 className='name'><NAME> © 2020</h3>
</footer>
)
}
export default Footer
|
34ad33978c62184f023332a84252c8a27ed8e29f
|
[
"Markdown",
"JavaScript"
] | 2
|
Markdown
|
aladin94/BreakingBadProject
|
56948fdd5d48d55e9d1e4a40e28b082f791385dd
|
aaf65d28fbc31f825052de754d6340109e3a92f5
|
refs/heads/master
|
<file_sep>package Mirza_problem2;
public class SavingsAccountTest
{
private static double saver1;
private static double saver2;
public SavingsAccountTest(double s1, double s2)
{
this.saver1 = s1;
this.saver2 = s2;
}
public static void main(String[] args)
{
SavingsAccount cal = new SavingsAccount();
SavingsAccountTest data = new SavingsAccountTest(2000, 3000);
cal.modifyInterestRate(4.0);
cal.calculateMonthlyInterest(saver1);
cal.printMethod();
cal.modifyInterestRate(5.0);
cal.calculateMonthlyInterest(saver2);
cal.printMethod();
}
}
|
a7ac06cf7455957c5c7eb2084a4c468e919b4552
|
[
"Java"
] | 1
|
Java
|
Nazishm9496/Mirza_assignment3
|
b2a8343e138367e2c5dc9cd3eeb180731386af91
|
76a9e9ef7140006ecc3d86e51a54ab53a8bdb25e
|
refs/heads/master
|
<repo_name>MarkLimML/MO1<file_sep>/gen/Java8ErrorListener.java
import org.antlr.v4.runtime.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Java8ErrorListener extends BaseErrorListener {
public int lastError = -1;
public List<String> Errors = new ArrayList<>();
@Override
public void syntaxError(Recognizer<?, ?> recognizer,
Object offendingSymbol,
int line, int charPositionInLine,
String msg,
RecognitionException e)
{
Parser parser = (Parser) recognizer;
String name = parser.getSourceName();
TokenStream tokens = parser.getInputStream();
Token offSymbol = (Token) offendingSymbol;
int thisError = offSymbol.getTokenIndex();
if (offSymbol.getType() == -1 && thisError == tokens.size() - 1) {
System.err.println(name + ": Incorrect error: " + msg);
return;
}
String offSymName = Java8Lexer.VOCABULARY.getSymbolicName(offSymbol.getType());
List<String> stack = parser.getRuleInvocationStack();
// Collections.reverse(stack);
/*
if (thisError > lastError + 10) {
lastError = thisError - 10;
}
for (int idx = lastError + 1; idx <= thisError; idx++) {
Token token = tokens.get(idx);
if (token.getChannel() != Token.HIDDEN_CHANNEL)
System.err.println(token.toString());
}
lastError = thisError;
*/
offSymbol = tokens.get(thisError-1);
//List<String> stack = ((Parser)recognizer).getRuleInvocationStack();
//Collections.reverse(stack);
//System.err.println("rule stack: "+stack);
//System.err.println("ERROR: at line "+line+":"+charPositionInLine+" : "+msg);
String ErrorMessage = "";
String errmsgstmt = msg.split("'")[0].toString();
String errmsgsymbol = msg.split("'")[1].toString();
String erroffsymbol = offendingSymbol.toString().split("'")[1];
//String errmsgsymbol = offSymbol.toString().split("'")[1];
// System.out.println("line "+line);
// System.out.println("charpos "+charPositionInLine);
// System.out.println("errmsgstmt "+errmsgstmt);
// System.out.println("errmsgsymbol"+errmsgsymbol);
// System.out.println("ERROR: at line "+line+":"+charPositionInLine+" : "+msg);
// System.out.println("ERROR: at line "+line+":"+charPositionInLine+" : "+msg);
// System.out.println("errstmt bool "+errmsgstmt.contains("missing"));
// System.out.println("message.contaitns "+ msg.contains("missing"));
System.out.println("");
if(errmsgstmt.contains("missing") || errmsgstmt.contains("cannot find symbol"))//
{
// System.out.println("\t\tMISSING");
ErrorMessage = "[MISSING SYMBOL] At line: "+ line + " Character Position: " + charPositionInLine + " Possible missing symbol: \"" + errmsgsymbol +"\"";
}
else if(errmsgstmt.contains("mismatched input"))
{
// System.out.println("\t\tMISMATCHED");
ErrorMessage = "[UNEXPECTED SYMBOL] At line: " + line + " Character Position: " + charPositionInLine + " unexpected symbol: \"" + errmsgsymbol +"\"";
}
else if(errmsgstmt.contains("extraneous input"))
{
// System.out.println("ERROR: at line "+line+":"+charPositionInLine+" : "+msg + "OFFENDING SYMBOL :" +erroffsymbol);
// System.out.println("\t\tEXTRANEOUS");
errmsgsymbol = offSymbol.toString().split("'")[1];
ErrorMessage = "[EXTRA SYMBOL] At line: " + line + " Character Position: " + charPositionInLine + " extra symbol: \"" + errmsgsymbol +"\"";
}
else if(errmsgstmt.contains("no viable alternative"))
{
// System.out.println("ERROR: at line "+line+":"+charPositionInLine+" : "+msg + "OFFENDING SYMBOL :" +erroffsymbol);
// System.out.println("\t\tNO ALTERNATIVE");
erroffsymbol = offSymbol.toString().split("'")[1];
ErrorMessage = "[SUGGESTION] At line: " + line + " consider inserting a symbol or changing the symbol \"" + erroffsymbol +"\"";
}
else
{
ErrorMessage = "[OTHERS] At line: " + line + " Character Position: " + charPositionInLine + " consider adding \"" + errmsgsymbol +"\"";
}
Errors.add(ErrorMessage);
// Errors.add("ERROR: at line "+line+":"+charPositionInLine+" : "+msg);
}
public List<String> getErrors() {
return Errors;
}
}<file_sep>/README.md
# MO1
Members:
<NAME>
<NAME>
<NAME>
All the codes as well as the main function is located at src/IDE.java
Instructions:
1. Download/clone/fork this repository.
2. Download Antlr complete and antlr runtime from https://www.antlr.org/download.html
3. Open IntelliJ.
4. Add antlr complete and antlr runtime into the Project Strucure.
5. Run IDE.java in IntelliJ.
6. Click run and wait for a window to pop up.
7. In the pop up window type/ paste in the input field the code.
8. Click parse to check the syntax error.
|
e6208fbf7733e1e487f937b3f8150448712df8a0
|
[
"Markdown",
"Java"
] | 2
|
Java
|
MarkLimML/MO1
|
f0a7a4a60ef52a68b6d5492aacf34cd803d3b116
|
02f67be87b17e1b07d5724e5ab771fcae6708fa7
|
refs/heads/master
|
<repo_name>YUZHANG001/saga--dva--umi<file_sep>/umi-wzry/.umirc.ts
import { defineConfig } from 'umi';
export default defineConfig({
dva: { immer: true, hmr: false, },
antd: {},
nodeModulesTransform: {
type: 'none',
},
// 不能自动生成路径
// routes: [
// {
// path: '/',
// component: '@/layouts/index',
// routes: [
// {
// path: '/',
// component: '@/pages/hero'
// },
// {
// path: '/hero',
// component: '@/pages/hero'
// },
// {
// path: '/item',
// component: '@/pages/item'
// },
// {
// path: '/summoner',
// component: '@/pages/summoner'
// },
// ]
// },
// ],
fastRefresh: {},
"proxy": {
"/api/": { //设置代理请求头,当访问到/api时就会触发代理
"target": "https://pvp.qq.com/", //代理访问的真实服务器地址
"changeOrigin": true, // 是否跨域请求地址
"pathRewrite": { "^/api": "" } // 是否重写请求地址,比如这里就是吧/api替换成空字符串
}
}
});
|
8ea15f7f7334dc2fe3fb709248a6a248237a0601
|
[
"TypeScript"
] | 1
|
TypeScript
|
YUZHANG001/saga--dva--umi
|
325810b8459c19cf94154df20a050bb4e8572ad0
|
7fb5da0a9d45c31796219420a7e3f09656cddddf
|
refs/heads/master
|
<file_sep>package rbtree
//RBNodeDir is
type RBNodeDir int
const (
//RBNodeLeft is
RBNodeLeft RBNodeDir = iota
//RBNodeRight is
RBNodeRight
//RBNodeHere is
RBNodeHere
)
//RBNode is
type RBNode struct {
isRed bool
Index int
parent *RBNode
children [2]*RBNode
}
//RBTree is
type RBTree struct {
Node *RBNode
less func(i int, j int) bool
}
//RBCursor is
type RBCursor RBTree
//NewTree is
func NewTree(less func(i int, j int) bool) *RBTree {
tree := &RBTree{less: less}
return tree
}
//Cursor is
func (cur *RBTree) Cursor() *RBCursor {
wrk := RBCursor(*cur)
return &wrk
}
func (cur *RBTree) root() *RBTree {
if cur.Node != nil {
for ; cur.Node.parent != nil; cur.Node = cur.Node.parent {
}
}
return cur
}
//Move is
func (cur *RBCursor) Move(dir RBNodeDir) *RBCursor {
rev := dir ^ 1
if next := cur.Node.children[dir]; next != nil {
for next.children[rev] != nil {
next = next.children[rev]
}
cur.Node = next
} else {
find := false
for cur.Node.parent != nil {
now := cur.Node
cur.Node = cur.Node.parent
if cur.Node.children[rev] == now {
find = true
break
}
}
if !find {
cur.Node = nil
}
}
return cur
}
//Find is
func (cur *RBTree) Find(Index int) (*RBTree, RBNodeDir) {
dir := RBNodeLeft
if cur.Node == nil {
return cur, dir
}
cur.root()
for {
if cur.less(Index, cur.Node.Index) {
dir = RBNodeLeft
next := cur.Node.children[dir]
if next == nil {
break
}
cur.Node = next
} else if cur.less(cur.Node.Index, Index) {
dir = RBNodeRight
next := cur.Node.children[dir]
if next == nil {
break
}
cur.Node = next
} else {
dir = RBNodeHere
break
}
}
return cur, dir
}
//Add is
func (cur *RBTree) Add(Index int) *RBTree {
newNode := &RBNode{Index: Index, isRed: true}
cur.root()
if cur.Node != nil {
pnode, dir := cur.Find(newNode.Index)
if dir != RBNodeHere {
newNode.parent = pnode.Node
newNode.parent.children[dir] = newNode
newNode.opt()
} else {
pnode.Node.Index = newNode.Index
newNode = pnode.Node
}
}
cur.Node = newNode
return cur
}
func (Node *RBNode) flip(dir RBNodeDir) {
curGranPa := Node.parent
newParent := Node.children[dir]
if curGranPa != nil {
curGranPa.children[Node.dir()] = newParent
}
newParent.parent, Node.parent = Node.parent, newParent
Node.children[dir] = newParent.children[dir^1]
if Node.children[dir] != nil {
Node.children[dir].parent = Node
}
newParent.children[dir^1] = Node
}
func (Node *RBNode) dir() RBNodeDir {
dir := RBNodeLeft
if Node.parent.children[dir] != Node {
dir = RBNodeRight
}
return dir
}
func (Node *RBNode) opt() {
for Node != nil && Node.isRed {
parent := Node.parent
if parent == nil {
break
} else if !parent.isRed {
break
} else if parent.parent == nil {
parent.isRed = false
} else {
grandparent := parent.parent
parentsibling := grandparent.children[parent.dir()^1]
if parentsibling != nil && parentsibling.isRed {
grandparent.isRed = true
parent.isRed = false
parentsibling.isRed = false
Node = grandparent
} else {
dir := parent.dir()
if parent.children[dir] != Node {
parent.flip(dir ^ 1)
}
grandparent.flip(dir)
grandparent.parent.isRed = false
grandparent.isRed = true
break
}
}
}
}
//End is
func (cur *RBTree) End(dir RBNodeDir) *RBCursor {
cur.root()
if cur.Node != nil {
for ; cur.Node.children[dir] != nil; cur.Node = cur.Node.children[dir] {
}
}
return cur.Cursor()
}
func (Node *RBNode) cut() {
if Node.parent != nil {
Node.parent.children[Node.dir()] = nil
}
}
func (Node *RBNode) hasDir() RBNodeDir {
dir := RBNodeLeft
if Node.children[dir] == nil {
dir = RBNodeRight
if Node.children[dir] == nil {
dir = RBNodeHere
}
}
return dir
}
//Delete is
func (cur *RBTree) Delete(Index int) (ret bool) {
wcur, dir := cur.Find(Index)
if dir != RBNodeHere {
return
}
delNode := wcur.Node
ret = true
dir = delNode.hasDir()
if delNode.children[RBNodeLeft] != nil &&
delNode.children[RBNodeRight] != nil {
var wrk *RBCursor
if dir != RBNodeHere {
wrk = wcur.Cursor().Move(dir)
delNode.Index = wrk.Node.Index
delNode = wrk.Node
dir = delNode.hasDir()
}
}
if dir == RBNodeHere {
if delNode.isRed {
delNode.cut()
cur.Node = delNode.parent
return
}
} else {
wrk := delNode.children[dir]
delNode.Index = wrk.Index
wrk.cut()
return
}
Node := delNode
for {
parent := Node.parent
if parent == nil {
break
}
dir := Node.dir()
dirOther := dir ^ 1
sibling := parent.children[dirOther]
if sibling.isRed {
//sibling is Red
parent.flip(dirOther)
sibling.isRed = false
parent.isRed = true
sibling = parent.children[dirOther]
}
//sibling is Black
nephew := sibling.children[dirOther]
if nephew == nil || !nephew.isRed {
//far nephew is Black
nephew = sibling.children[dir]
if nephew == nil || !nephew.isRed {
//near nephew is Black
sibling.isRed = true
if parent.isRed {
parent.isRed = false
break
} else {
Node = parent
continue
}
}
//near nephew is Red and far nephew is Black
sibling.flip(dir)
sibling, nephew = nephew, sibling
sibling.isRed = false
nephew.isRed = true
}
//sibling is Black && far nephew is Red
parent.flip(dirOther)
sibling.isRed = parent.isRed
parent.isRed = false
nephew.isRed = false
break
}
delNode.cut()
cur.Node = delNode.parent
return
}
<file_sep># rbtree_bygo
Using sample:
https://github.com/doshiraki/rbtree_bygo/wiki
|
2e52942e9ba5155c997d6bd6e9569f10334d0ec2
|
[
"Markdown",
"Go"
] | 2
|
Go
|
doshiraki/rbtree_bygo
|
5ad580c921c43a110b16fc390acbeefe9cdca602
|
3cf9fedfd94832ce4a03e520b5a93bc78b53ff90
|
refs/heads/master
|
<file_sep>package pap.appli.navilium;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Timer;
import java.util.TimerTask;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.app.Activity;
public class PSInfiniteScrollView extends FrameLayout implements View.OnTouchListener{
Context context;
ArrayList<PSCloneableView> carouselItems;
static boolean touchDown = false;
float previousScrollX = 0, currentScrollX = 0;
Timer scrollTimer;
PSCloneableView replicaF, replicaB;
int itemCount = 0;
public float scrollX;
public float firstX;
VelocityTracker vTracker;
PSSize itemSize;
static int FRAME_RATE = (int) (1000.0/60.0);
static float DECELERATION_RATE = (float) (1.0/1.1);
public PSInfiniteScrollView(Context ctx, PSSize itemsize) {
super(ctx);
context = ctx;
itemSize = itemsize;
RelativeLayout.LayoutParams sparams = new RelativeLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
this.setClipChildren(true);
this.setLayoutParams(sparams);
this.setOnTouchListener(this);
scrollTimer = new Timer();
scrollTimer.schedule(new ScrollTimerTask(),FRAME_RATE, FRAME_RATE);
carouselItems = new ArrayList<PSCloneableView>();
}
public PSInfiniteScrollView(Context ctx, AttributeSet attrs, PSSize itemsize) {
super(ctx,attrs);
context = ctx;
itemSize = itemsize;
RelativeLayout.LayoutParams sparams = new RelativeLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
this.setClipChildren(true);
this.setLayoutParams(sparams);
this.setOnTouchListener(this);
scrollTimer = new Timer();
scrollTimer.schedule(new ScrollTimerTask(), FRAME_RATE, FRAME_RATE);
carouselItems = new ArrayList<PSCloneableView>();
}
@Override
public boolean onTouch(View arg0, MotionEvent arg1) {
if (arg1.getAction() == MotionEvent.ACTION_DOWN) {
vTracker = VelocityTracker.obtain();
touchDown = true;
firstX = (float) (arg1.getX() * -1);
} else if (arg1.getAction() == MotionEvent.ACTION_MOVE) {
scrollX = firstX - (float) (arg1.getX() * -1);
firstX = (float) (arg1.getX() * -1);
vTracker.addMovement(arg1);
} else if (arg1.getAction() == MotionEvent.ACTION_UP) {
touchDown = false;
vTracker.computeCurrentVelocity(1000);
scrollX = (float) (vTracker.getXVelocity() * 0.1);
if(scrollX > itemSize.width){
scrollX = itemSize.width;
}
if(scrollX < -itemSize.width){
scrollX = -itemSize.width;
}
}
return true;
}
public class ScrollTimerTask extends TimerTask {
public synchronized void arrangeViews() {
if (scrollX != 0) {
synchronized (carouselItems) {
((Activity)context).runOnUiThread(new Runnable() {
public void run() {
Collections.sort(carouselItems,
new Comparator<View>() {
@Override
public int compare(View lhs,
View rhs) {
FrameLayout.LayoutParams lhsParams = (FrameLayout.LayoutParams) lhs
.getLayoutParams();
FrameLayout.LayoutParams rhsParams = (FrameLayout.LayoutParams) rhs
.getLayoutParams();
return ((Integer) lhsParams.leftMargin)
.compareTo((Integer) rhsParams.leftMargin);
}
});
for (int i = 0; i < carouselItems.size(); i++) {
// arrange
PSCloneableView vw = carouselItems.get(i);
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) vw
.getLayoutParams();
if (i == 0) {
params.leftMargin += scrollX;
} else {
FrameLayout.LayoutParams fparams = (FrameLayout.LayoutParams) carouselItems
.get(0).getLayoutParams();
params.leftMargin = (int) (fparams.leftMargin
+ (i * itemSize.width));
}
if (vw != replicaF && vw != replicaB) {
if (scrollX > 0) {
if (params.leftMargin > ((itemCount - 1) * itemSize.width)
&& params.leftMargin <= (itemCount * itemSize.width)) {
FrameLayout.LayoutParams rparams = null;
if (replicaF == null) {
replicaF = vw.clone();
rparams = new FrameLayout.LayoutParams(
(int) itemSize.width, (int) itemSize.height);
rparams.leftMargin = (int) -itemSize.width;
replicaF.setLayoutParams(rparams);
}
if (PSInfiniteScrollView.this
.findViewById(replicaF
.getId()) == null) {
PSInfiniteScrollView.this
.addView(replicaF);
carouselItems.add(0, replicaF);
}
}
if (params.leftMargin >= (itemCount * itemSize.width)) {
FrameLayout.LayoutParams fparams = (FrameLayout.LayoutParams)replicaF.getLayoutParams();
if (replicaF != null) {
if (PSInfiniteScrollView.this
.findViewById(replicaF
.getId()) != null) {
PSInfiniteScrollView.this
.removeView(replicaF);
carouselItems
.remove(replicaF);
carouselItems.remove(vw);
carouselItems.add(0, vw);
i = 0;
params.leftMargin = 0;
}
}
replicaF = null;
}
} else {
if (params.leftMargin < 0
&& params.leftMargin >= -itemSize.width) {
FrameLayout.LayoutParams rparams = null;
if (replicaB == null) {
replicaB = vw.clone();
rparams = new FrameLayout.LayoutParams(
(int) itemSize.width, (int) itemSize.height);
rparams.leftMargin = (int) ((itemCount - 1) * itemSize.width) ;
replicaB.setLayoutParams(rparams);
}
if (PSInfiniteScrollView.this
.findViewById(replicaB
.getId()) == null) {
PSInfiniteScrollView.this
.addView(replicaB);
carouselItems.add(replicaB);
}
}
if (params.leftMargin < -itemSize.width) {
if (replicaB != null) {
if (PSInfiniteScrollView.this
.findViewById(replicaB
.getId()) != null) {
PSInfiniteScrollView.this
.removeView(replicaB);
carouselItems
.remove(replicaB);
carouselItems.remove(vw);
carouselItems.add(vw);
i = 0;
params.leftMargin = (int) (itemCount * itemSize.width);
}
}
replicaB = null;
}
}
}else{}
vw.setLayoutParams(params);
}
if(replicaF != null){
FrameLayout.LayoutParams fparams = (FrameLayout.LayoutParams)replicaF.getLayoutParams();
if(fparams.leftMargin < -itemSize.width || fparams.leftMargin > 0){
if (PSInfiniteScrollView.this
.findViewById(replicaF
.getId()) != null) {
replicaF
.getLayoutParams();
PSInfiniteScrollView.this.removeView(replicaF);
carouselItems
.remove(replicaF);
}
replicaF = null;
}
}
if(touchDown){
scrollX = 0;
}else{
scrollX = (float) (scrollX * DECELERATION_RATE);
if(Math.abs(scrollX) < 0.01)
scrollX = 0;
}
Collections.sort(carouselItems,
new Comparator<View>() {
@Override
public int compare(View lhs,
View rhs) {
FrameLayout.LayoutParams lhsParams = (FrameLayout.LayoutParams) lhs
.getLayoutParams();
FrameLayout.LayoutParams rhsParams = (FrameLayout.LayoutParams) rhs
.getLayoutParams();
return ((Integer) lhsParams.leftMargin)
.compareTo((Integer) rhsParams.leftMargin);
}
});
}
});
}
}
}
@Override
public void run() {
arrangeViews();
}
}
public void addItem(PSCloneableView vw){
FrameLayout.LayoutParams rparams = new FrameLayout.LayoutParams(
(int) itemSize.width, (int) itemSize.height);
rparams.leftMargin = (int) (carouselItems.size() * itemSize.width);
vw.setLayoutParams(rparams);
super.addView(vw, carouselItems.size());
carouselItems.add(vw);
itemCount = carouselItems.size();
}
public void removeItem(PSCloneableView vw){
super.removeView(vw);
carouselItems.remove(vw);
itemCount = carouselItems.size();
}
}
<file_sep>package pap.appli.navilium;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;
import java.util.Random;
import java.util.WeakHashMap;
import com.etsy.android.grid.util.DynamicHeightTextView;
import android.widget.TextView;
/**
* Created by ilyas on 22/04/2015.
*/
public class MessageAdapter extends BaseAdapter{
private Context mContext;
private boolean sent;
private Map<String, TextView> textViews= Collections.synchronizedMap(new WeakHashMap<String, TextView>());
private int index= 0;
private final LayoutInflater mLayoutInflater;
private final Random mRandom;
private static final SparseArray<Double> sPositionHeightRatios = new SparseArray<Double>();
public MessageAdapter(Context c, boolean b) {
mContext = c;
this.sent = b;
this.mLayoutInflater = LayoutInflater.from(c);
this.mRandom = new Random();
}
public int getCount() {
return MESSAGEToIndex.size()*3;
}
public boolean getSent() {return this.sent;}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
// create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder vh;
if (convertView == null) { // if it's not recycled, initialize some attributes
convertView = mLayoutInflater.inflate(R.layout.row_grid_item2,parent, false);
vh = new ViewHolder();
vh.txtView = (DynamicHeightTextView) convertView.findViewById(R.id.txtView);
convertView.setTag(vh);
} else {
vh = (ViewHolder) convertView.getTag();
}
DisplayText(vh.txtView, position);
return convertView;
}
public String adjustDate(String date){
return date.substring(8,10)+"/"+date.substring(5,7)+"/"+date.substring(2,4);
}
public String adjustString(String subject){
if(subject.length() >=12)
return subject.substring(0,12);
else return subject;
}
//We store the path
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public void DisplayText(TextView textView, int position)
{
textViews.put(getItemId(position)+""+position%3, textView);
int c = getCount()/3-1-position/3;
switch(position%3) {
case 0:
textView.setText(getUser(c) + "");
break;
case 1:
textView.setText(adjustString(SUBJECTToIndex.get(c))+ "");
break;
case 2:
textView.setText(adjustDate(DATEToIndex.get(c))+ "");
break;
default:
break;
}
}
public void addMsg(String msg,int id,String firstName, String lastName,String subject,String date, int sender){
MESSAGEToIndex.add(index, msg);
MSGidToIndex.add(index,id);
firstToIndex.add(index,firstName);
lastToIndex.add(index,lastName);
SUBJECTToIndex.add(index,subject);
DATEToIndex.add(index,date);
idSender.add(index,sender);
index++;
}
public void remove(int position){
MESSAGEToIndex.remove(position);
MSGidToIndex.remove(position);
firstToIndex.remove(position);
lastToIndex.remove(position);
SUBJECTToIndex.remove(position);
DATEToIndex.remove(position);
idSender.remove(position);
index--;
}
public int getMSGId(int position){
return MSGidToIndex.get(position);
}
public String getUser(int position){
return firstToIndex.get(position)+" "+lastToIndex.get(position);
}
public String getUserFirst(int position){
return firstToIndex.get(position);
}
public String getUserLast(int position){
return lastToIndex.get(position);
}
public String getMessage(int position){
return MESSAGEToIndex.get(position);
}
public String getSubject(int position){
return SUBJECTToIndex.get(position);
}
public String getDate(int position){
return DATEToIndex.get(position);
}
public int getSender(int position){
return idSender.get(position);
}
// references to our images
private ArrayList<String> MESSAGEToIndex = new ArrayList<String>();
private ArrayList<String> SUBJECTToIndex = new ArrayList<String>();
private ArrayList<String> DATEToIndex = new ArrayList<String>();
//references between image'id and their index array
private ArrayList<Integer> MSGidToIndex = new ArrayList<Integer>();
private ArrayList<Integer> idSender = new ArrayList<Integer>();
//references between user'id and their index array
private ArrayList<String> firstToIndex = new ArrayList<String>();
private ArrayList<String> lastToIndex = new ArrayList<String>();
static class ViewHolder {
DynamicHeightTextView txtView;
}
private double getPositionRatio(final int position) {
double ratio = sPositionHeightRatios.get(position, 0.0);
// if not yet done generate and stash the columns height
// in our real world scenario this will be determined by
// some match based on the known height and width of the image
// and maybe a helpful way to get the column height!
if (ratio == 0) {
ratio = getRandomHeightRatio();
sPositionHeightRatios.append(position, ratio);
}
return ratio;
}
private double getRandomHeightRatio() {
return (mRandom.nextDouble() / 2.0) + 1.0; // height will be 1.0 - 1.5
// the width
}
}
<file_sep>package pap.appli.navilium;
import java.util.ArrayList;
import java.util.Random;
import com.etsy.android.grid.util.DynamicHeightImageView;
import com.etsy.android.grid.util.DynamicHeightTextView;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.Log;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
public class ImageAdapterGallerie extends BaseAdapter {
private Context mContext;
private ImageLoader imageLoader;
static String[] numberToName={"Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"};
private int size= 0;
private final LayoutInflater mLayoutInflater;
private final Random mRandom;
private static final SparseArray<Double> sPositionHeightRatios = new SparseArray<Double>();
public ImageAdapterGallerie(Context c, ImageLoader imageloader) {
mContext = c;
imageLoader= imageloader;
this.mLayoutInflater = LayoutInflater.from(c);
this.mRandom = new Random();
}
public int getCount() {
return mThumbIds.size();
}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
// create a new ImageView for each item referenced by the Adapter
public View getView(final int position, View convertView, ViewGroup parent) {
final ViewHolder vh;
String title;
if (convertView == null) { // if it's not recycled, initialize some attributes
//convertView = mLayoutInflater.inflate(R.layout.row_grid_item,parent, false);
convertView = mLayoutInflater.inflate(R.layout.row_grid_item_gallerie,parent, false);
vh = new ViewHolder();
vh.imgView = (DynamicHeightImageView) convertView.findViewById(R.id.imgView);
vh.titleView = (DynamicHeightTextView) convertView.findViewById(R.id.titleView);
convertView.setTag(vh);
} else {
vh = (ViewHolder) convertView.getTag();
}
if(DATEToIndex.get(position).substring(5).contains("-")){
title = TITLEToIndex.get(position) + " - "+DATEToIndex.get(position).substring(0, 4);
}
else{
title = TITLEToIndex.get(position) + " - "+numberToName[Integer.parseInt(DATEToIndex.get(position).substring(5))]+" "+DATEToIndex.get(position).substring(0, 4);
}
vh.titleView.setText(title);
Bitmap loadedImage;
loadedImage = imageLoader.getBitmap(mThumbIds.get(position));
double ratio;
if(loadedImage == null){
ratio = 0.75;
}else{
ratio = ((double) loadedImage.getWidth())/((double) loadedImage.getHeight());
}
vh.imgView.setHeightRatio(1 / ratio);
imageLoader.DisplayImage(mThumbIds.get(position), vh.imgView);
return convertView;
}
//We store the path
public void addImage(String path,int id,int refUser,String title,String date,String ext){
mThumbIds.add(size, path);
IMGidToIndex.add(size,id );
USERidToIndex.add(size,refUser);
TITLEToIndex.add(size,title);
DATEToIndex.add(size,date);
EXTToIndex.add(size,ext);
size++;
}
//We store the path
public void addImage(String path,int id,int refUser){
mThumbIds.add(size, path);
IMGidToIndex.add(size,id );
USERidToIndex.add(size,refUser);
size++;
}
//Get image id
public int getImgId(int position){
return IMGidToIndex.get(position);
}
//Get the refuser
public int getRefUser(int position){
return USERidToIndex.get(position);
}
public String getUrl(int position){
return mThumbIds.get(position);
}
public String getTitle(int position){
return TITLEToIndex.get(position);
}
public String getDate(int position){
return DATEToIndex.get(position);
}
public String getExt(int position){
return EXTToIndex.get(position);
}
// references to our images
private ArrayList<String> mThumbIds = new ArrayList<String>();
private ArrayList<String> TITLEToIndex = new ArrayList<String>();
private ArrayList<String> DATEToIndex = new ArrayList<String>();
private ArrayList<String> EXTToIndex= new ArrayList<String>();
//references between image'id and their index array
private ArrayList<Integer> IMGidToIndex = new ArrayList<Integer>();
//references between user'id and their index array
private ArrayList<Integer> USERidToIndex = new ArrayList<Integer>();
static class ViewHolder {
DynamicHeightImageView imgView;
DynamicHeightTextView titleView, dateView;
}
private double getPositionRatio(final int position) {
double ratio = sPositionHeightRatios.get(position, 0.0);
// if not yet done generate and stash the columns height
// in our real world scenario this will be determined by
// some match based on the known height and width of the image
// and maybe a helpful way to get the column height!
if (ratio == 0) {
ratio = getRandomHeightRatio();
sPositionHeightRatios.append(position, ratio);
}
return ratio;
}
private double getRandomHeightRatio() {
return (mRandom.nextDouble() / 2.0) + 1.0; // height will be 1.0 - 1.5
// the width
}
}
<file_sep>package pap.appli.navilium;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ViewGroup;
import android.widget.GridView;
/**
* ScrollViewの中のGridViewでも高さを可変にする<br>
* http://stackoverflow.com/questions/8481844/gridview-height-gets-cut
*/
public class ExpandableHeightGridView extends GridView
{
boolean expanded = false;
int mult = 1;
int count = 0;
int limit = 7;
public ExpandableHeightGridView(Context context)
{
super(context);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs)
{
super(context, attrs);
}
public ExpandableHeightGridView(Context context, AttributeSet attrs,
int defStyle)
{
super(context, attrs, defStyle);
}
public boolean isExpanded()
{
return expanded;
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
// HACK! TAKE THAT ANDROID!
/*if (isExpanded())
{
// Calculate entire height by providing a very large height hint.
// View.MEASURED_SIZE_MASK represents the largest height possible.
int expandSpec = MeasureSpec.makeMeasureSpec(MEASURED_SIZE_MASK,
MeasureSpec.AT_MOST);
if (count < limit)
super.onMeasure(widthMeasureSpec*mult, heightMeasureSpec);
else
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
count ++;
ViewGroup.LayoutParams params = getLayoutParams();
//params.width = params.width * mult;
params.width = getMeasuredWidth();
}
else
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}*/
//setMeasuredDimension(mult, heightMeasureSpec);
/*super.onMeasure(mult, heightMeasureSpec);
ViewGroup.LayoutParams params = getLayoutParams();
params.width = mult;
Log.d("WIDTH",params.width+"");*/
//setMeasuredDimension(1500, heightMeasureSpec);
ViewGroup.LayoutParams params = getLayoutParams();
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
params.width = mult;
}
public void setExpanded(boolean expanded, int mult)
{
this.expanded = expanded;
this.mult = mult;
}
}
<file_sep>package pap.appli.navilium;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Looper;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.util.Base64;
import android.util.Log;
import android.view.Gravity;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.etsy.android.grid.StaggeredGridView;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.URLEncoder;
import java.util.HashMap;
public class MPFragment extends Fragment {
public static int SELECT_FILE1=1;
public static int SELECT_FILE2=2;
View view;
private Button boutonGalerieProfil = null, buttonHistorique = null, boutonMP = null,
boutonParam = null, searchButton = null, boutonCarte = null, boutonDeco = null,
bouttonToAccueil = null, msgRec = null, msgSent = null, bouttonActualiser = null;
ImageView boutonAjoutPhoto = null, boutonMenuOptions = null;
boolean menuOptionsVisible = false;
StaggeredGridView mGridView;
MessageAdapter sent;
MessageAdapter received;
Context cont = null;
ViewPager mPager = null;
static SessionManager session;
HashMap<String, String> user;
String name;
String userid;
boolean dejaFait = false, mprec = true;
String responseText = null, responseText2 = null;
JSONObject jsonObj = null, jsonObj2 = null;
JSONArray ArrayPath1 = null, ArrayPath2 = null, ArrayPath3 = null, ArrayPath4 = null;
public void setContext(Context c){
cont = c;
}
public void setMPager(ViewPager v){
mPager = v;
}
/*public void setMAdpater(MyAdapter mAdpater){
this.mAdpater = mAdpater;
}*/
@Override
public void onPause(){
super.onPause();
}
@Override
public void onStop(){
dejaFait = true;
super.onStop();
}
public void onDestroy(){
super.onDestroy();
}
@Override
public void onResume(){
if(dejaFait) {
try {
fillAdapter(true,received, ArrayPath1, ArrayPath3);
fillAdapter(false,sent, ArrayPath2, ArrayPath4);
}
catch (Exception c){}
mGridView.setAdapter(received);
((TextView)view.findViewById(R.id.sendRec)).setText("De :");
}
ImageView tv= (ImageView) view.findViewById(R.id.icon);
if(tv != null && ProfilActivity.imageProfil!=null){
tv.setImageBitmap(ProfilActivity.imageProfil);
}
super.onResume();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
view =inflater.inflate(R.layout.mp_page_profil, container, false);
session = new SessionManager(cont.getApplicationContext());
user = session.getUserDetails();
ImageView profil = (ImageView)view.findViewById(R.id.icon);
profil.setImageBitmap(((ProfilActivity)getActivity()).getImageProfil());
TextView profilName = (TextView)view.findViewById(R.id.name);
profilName.setText(user.get(SessionManager.KEY_NAME)+" "+user.get(SessionManager.KEY_LASTNAME));
//buttonHistorique = (Button)view.findViewById(R.id.buttonPageProfilHistorique);
boutonGalerieProfil = (Button)view.findViewById(R.id.buttonPageProfilGalerie);
boutonMP = (Button)view.findViewById(R.id.buttonPageProfilMassagesPrives);
boutonParam = (Button)view.findViewById(R.id.buttonPageProfilParametres);
boutonMenuOptions = (ImageView)view.findViewById(R.id.menuOptionsPageMP);
searchButton = (Button) view.findViewById(R.id.searchLink);
boutonAjoutPhoto = (ImageView) view.findViewById(R.id.ajoutPhotos);
boutonCarte = (Button) view.findViewById(R.id.bouttonCarte);
boutonDeco = (Button) view.findViewById(R.id.bouttonDeco);
bouttonToAccueil = (Button) view.findViewById(R.id.accueilButton);
bouttonActualiser = (Button) view.findViewById(R.id.f5Button);
boutonMP.setTextColor(getResources().getColor(R.color.red));
view.findViewById(R.id.ViewBandeRougeMP).setVisibility(View.VISIBLE);
bouttonActualiser.setOnClickListener(bouttonActualiserMethode);
bouttonToAccueil.setOnClickListener(bouttonToAccueilMethode);
boutonMenuOptions.setOnClickListener(boutonMenuOptionsMethode);
searchButton.setOnClickListener(searchButtonMethode);
boutonGalerieProfil.setOnClickListener(boutonGalerieProfilMethode);
//buttonHistorique.setOnClickListener(buttonHistoriqueMethode);
boutonMP.setOnClickListener(boutonMPMethode);
boutonParam.setOnClickListener(boutonParamMethode);
boutonAjoutPhoto.setOnClickListener(boutonAjoutPhotoMethode);
boutonCarte.setOnClickListener(boutonCarteMethode);
boutonDeco.setOnClickListener(boutonDecoMethode);
RelativeLayout gridTitle = (RelativeLayout)view.findViewById(R.id.gridTitle);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
mPager = (ViewPager) getActivity().findViewById(R.id.pager);
/*A revoir*/
mPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int i, float v, int i2) {
}
@Override
public void onPageSelected(int i) {
if (i!=0){
cacherMenuOptions();
}
}
@Override
public void onPageScrollStateChanged(int i) {
cacherMenuOptions();
}
});
Display display = ((Activity) cont).getWindowManager().getDefaultDisplay();
int r = display.getWidth();
//lp.setMargins((int)(r/12 * getResources().getDisplayMetrics().density + 0.5f),0,(int)(r/12 * getResources().getDisplayMetrics().density + 0.5f),0);
lp.setMargins(r/12,0,r/12,0);
gridTitle.setLayoutParams(lp);
mGridView = (StaggeredGridView) view.findViewById(R.id.gridview);
name = user.get(SessionManager.KEY_NAME);
userid = user.get(SessionManager.KEY_ID);
sent = new MessageAdapter(cont, true);
received = new MessageAdapter(cont, false);
if(!dejaFait) {
rechercheMSG();
}
mGridView.setAdapter(received);
msgRec = (Button) view.findViewById(R.id.receptionButton);
msgSent = (Button) view.findViewById(R.id.sendButton);
msgRec.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mGridView.setAdapter(received);
((TextView)view.findViewById(R.id.sendRec)).setText("De :");
mprec = true;
}
});
msgSent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mGridView.setAdapter(sent);
((TextView)view.findViewById(R.id.sendRec)).setText("À :");
mprec = false;
}
});
mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, final View v0, final int position, long id) {
final MessageAdapter mA = (MessageAdapter) mGridView.getAdapter();
final int pos = mA.getCount()/3-1-position/3;
final String msg = mA.getMessage(pos);
final String subject = mA.getSubject(pos);
final int refUser = mA.getSender(pos);
final String name = mA.getUser(pos);
String date = mA.adjustDate(mA.getDate(pos));
final Dialog d = new Dialog(getActivity());
d.setTitle("Message");
d.setContentView(R.layout.message);
final TextView txtMsg = (TextView) d.findViewById(R.id.msg);
txtMsg.setText("\n"+msg);
TextView txtDate = (TextView) d.findViewById(R.id.date);
txtDate.setText("\nLe "+date);
final TextView txtSubject = (TextView) d.findViewById(R.id.subject);
txtSubject.setText("Sujet :"+subject);
TextView txtName = (TextView) d.findViewById(R.id.name);
if (((MessageAdapter)mGridView.getAdapter()).getSent())
txtName.setText("À :"+name);
else
txtName.setText("De :"+name);
Button b = (Button) d.findViewById(R.id.button);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
d.dismiss();
}
});
final Button delete = (Button) d.findViewById(R.id.delete);
delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
d.dismiss();
Thread deleteMsg = new Thread() {
@Override
public void run() {
try {
HttpPost httppostreq = new HttpPost("http://www.navilium.fr/session/deleteMessages?data="+mA.getMSGId(pos));
session = new SessionManager(getActivity().getApplicationContext());
String credentials = session.getUserDetails().get(session.KEY_EMAIL) + ":" + session.getUserDetails().get(session.KEY_PWD);
String base64EncodedCredentials = Base64.encodeToString(credentials.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP);
httppostreq.addHeader("Authorization", "Basic " + base64EncodedCredentials);
HttpResponse httpresponse = DisplaySlideActivity.httpclient.execute(httppostreq);
responseText = EntityUtils.toString(httpresponse.getEntity());
if(responseText.contains("true")){
mA.remove(pos);
v0.post(new Runnable() {
@Override
public void run() {
Toast.makeText(v.getContext(), "Message supprimé", Toast.LENGTH_SHORT).show();
}
});
}
else {
v0.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getActivity().getApplicationContext(), "Echec de la suppression", Toast.LENGTH_SHORT).show();
}
});
}
} catch (Exception e) {
e.printStackTrace();
Log.i("Json failed", e + "");
}
}
};
deleteMsg.start();
try {
deleteMsg.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
mGridView.setAdapter(mA);
}
});
Button respond = (Button)d.findViewById(R.id.respond);
if(!mprec)
respond.setText("Nouveau");
respond.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
d.dismiss();
final Dialog rep = new Dialog(getActivity());
rep.setTitle("Nouveau Message");
rep.setContentView(R.layout.send_message);
rep.getWindow().getAttributes().verticalMargin = -0.5F;
final EditText sub = (EditText) rep.findViewById(R.id.subject);
if(subject.contains("RE:") || !mprec) {
if(mprec)
sub.setText(subject);
}else
sub.setText("RE: " + subject);
EditText dest = (EditText) rep.findViewById(R.id.name);
dest.setText("À : "+name);
final EditText msg = (EditText)rep.findViewById(R.id.msg);
Display display = getActivity().getWindowManager().getDefaultDisplay();
int r = display.getHeight();
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 2*r/10);
lp.addRule(RelativeLayout.BELOW, txtSubject.getId());
msg.setLayoutParams(lp);
Button back = (Button)rep.findViewById(R.id.button2);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rep.dismiss();
}
});
Button send = (Button)rep.findViewById(R.id.button1);
send.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Thread sendMsgThread = new Thread() {
@Override
public void run() {
try {
String urlSubject = sub.getText().toString();
String urlBody = msg.getText().toString();
String encodedurl = URLEncoder.encode(urlSubject, "UTF-8");
String encodedurl2 = URLEncoder.encode(urlBody, "UTF-8");
HttpPost httppostreq = new HttpPost("http://www.navilium.fr/session/sendMessage?receiver="+
refUser+"&subject="+encodedurl+"&body="+encodedurl2);
session = new SessionManager(getActivity().getApplicationContext());
String credentials = session.getUserDetails().get(session.KEY_EMAIL) + ":" + session.getUserDetails().get(session.KEY_PWD);
String base64EncodedCredentials = Base64.encodeToString(credentials.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP);
httppostreq.addHeader("Authorization", "Basic " + base64EncodedCredentials);
HttpResponse httpresponse = DisplaySlideActivity.httpclient.execute(httppostreq);
responseText = EntityUtils.toString(httpresponse.getEntity());
JSONObject json = new JSONObject(responseText);
int id = json.getJSONObject("msg").getInt("id");
String date = json.getJSONObject("msg").getString("date");
if (json.has("err"))
view.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getActivity().getApplicationContext(), "Erreur lors de l'envoi du message", Toast.LENGTH_SHORT).show();
Log.d(responseText, "ERROR");
}
});
else {
view.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getActivity().getApplicationContext(), "Message envoyé", Toast.LENGTH_SHORT).show();
}
});
sent.addMsg(urlBody, id, mA.getUserFirst(pos), mA.getUserLast(pos), urlSubject, date, Integer.parseInt(session.getUserDetails().get(SessionManager.KEY_ID) ));
}
if(!mprec){
view.post(new Runnable() {
@Override
public void run() {
mGridView.setAdapter(sent);
}
});
}
} catch (Exception e) {
e.printStackTrace();
Log.i("Json failed", e + "");
}
}
};
sendMsgThread.start();
try {
sendMsgThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
rep.dismiss();
}
});
rep.show();
};
});
d.show();
//startActivity(MsgIntent);
}
});
return view;
}
private void rechercheMSG(){
Thread searchMsgThread= new Thread() {
@Override
public void run() {
try{
JSONObject jsonobj = new JSONObject();
jsonobj.put("isMobile", "true");
HttpPost httppostreq = new HttpPost("http://www.navilium.fr/user/messages?isJson=true");
session = new SessionManager(getActivity().getApplicationContext());
String credentials = session.getUserDetails().get(session.KEY_EMAIL) + ":" + session.getUserDetails().get(session.KEY_PWD);
String base64EncodedCredentials = Base64.encodeToString(credentials.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP);
httppostreq.addHeader("Authorization", "Basic " + base64EncodedCredentials);
StringEntity se = new StringEntity(jsonobj.toString());
se.setContentType("application/json;charset=UTF-8");
se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json;charset=UTF-8"));
httppostreq.setEntity(se);
HttpResponse httpresponse = DisplaySlideActivity.httpclient.execute(httppostreq);
responseText = null;
responseText = EntityUtils.toString(httpresponse.getEntity());
JSONObject jsonobj2 = new JSONObject();
HttpPost httppostreq2 = new HttpPost("http://www.navilium.fr/home/recep?isJson=true&userId="+userid);
httppostreq2.addHeader("Authorization", "Basic " + base64EncodedCredentials);
StringEntity se2 = new StringEntity(jsonobj2.toString());
se2.setContentType("application/json;charset=UTF-8");
se2.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json;charset=UTF-8"));
httppostreq.setEntity(se2);
HttpResponse httpresponse2 = DisplaySlideActivity.httpclient.execute(httppostreq2);
responseText2 = null;
responseText2 = EntityUtils.toString(httpresponse2.getEntity());
try{
jsonObj = new JSONObject(responseText);
jsonObj2 = new JSONObject(responseText2);
try {
ArrayPath1 = jsonObj.getJSONArray("received");
ArrayPath2 = jsonObj.getJSONArray("sent");
ArrayPath3 = jsonObj2.getJSONArray("author");
ArrayPath4 = jsonObj2.getJSONArray("receiver");
fillAdapter(true,received,ArrayPath1,ArrayPath3);
fillAdapter(false,sent,ArrayPath2,ArrayPath4);
} catch (JSONException e){
Log.d("Invalid user/pass",responseText);
}
} catch (Throwable t) {
Log.d(responseText,"ERROR");
}
}catch(Exception e){
e.printStackTrace();
Log.i("Json failed",e+"");
}
}
};
searchMsgThread.start();
try {
searchMsgThread.join();
DisplaySlideActivity.mp = 100;
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public void fillAdapter(boolean b, MessageAdapter message,JSONArray arrayPath, JSONArray arrayPath2){
for(int i=0; i<arrayPath.length();i++){
try{
String firstName = arrayPath2.getJSONObject(i).get("firstName").toString();
String lastName = arrayPath2.getJSONObject(i).get("lastName").toString();
String id = arrayPath.getJSONObject(i).get("id").toString();
String subject = arrayPath.getJSONObject(i).get("subject").toString();
String date = arrayPath.getJSONObject(i).get("date").toString();
String msg = arrayPath.getJSONObject(i).get("body").toString();
int sender;
if(b)
sender = Integer.parseInt(arrayPath2.getJSONObject(i).get("author").toString());
else
sender = Integer.parseInt(arrayPath2.getJSONObject(i).get("receiver").toString());
message.addMsg(msg, Integer.parseInt(id), firstName, lastName, subject, date, sender);
}catch(Exception e){
e.printStackTrace();
}
}
}
private void desactivationBouttons(){
msgRec.setClickable(false);
msgSent.setClickable(false);
mGridView.setEnabled(false);
}
private void activationBouttons(){
msgRec.setClickable(true);
msgSent.setClickable(true);
mGridView.setEnabled(true);
}
public void cacherMenuOptions(){
((RelativeLayout) view.findViewById(R.id.veilPageGallerie)).setVisibility(View.GONE);
view.findViewById(R.id.layoutInfosProfilMP).setVisibility(View.GONE);
menuOptionsVisible = false;
}
/***************************************************************************************/
/****************** OnClickListener ****************************************************/
/***************************************************************************************/
private View.OnClickListener bouttonActualiserMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
sent = new MessageAdapter(cont, true);
received = new MessageAdapter(cont, false);
rechercheMSG();
if(mprec) {
mGridView.setAdapter(received);
((TextView)view.findViewById(R.id.sendRec)).setText("De :");
}
else{
mGridView.setAdapter(sent);
((TextView) view.findViewById(R.id.sendRec)).setText("À :");
}
}
};
private View.OnClickListener bouttonToAccueilMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
cacherMenuOptions();
Intent i = new Intent();
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 4);
getActivity().setResult(getActivity().RESULT_OK, i);
getActivity().finish();
}
};
private View.OnClickListener boutonAjoutPhotoMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
cacherMenuOptions();
Intent i = new Intent();
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 2);
getActivity().setResult(getActivity().RESULT_OK, i);
getActivity().finish();
}
};
private View.OnClickListener boutonCarteMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
cacherMenuOptions();
Intent i = new Intent();
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 1);
getActivity().setResult(getActivity().RESULT_OK, i);
getActivity().finish();
}
};
private View.OnClickListener boutonDecoMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
LayoutInflater layoutInflater= (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.popupdec, null);
final PopupWindow connPopupWindow = new PopupWindow(popupView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
Button btnNO = (Button)popupView.findViewById(R.id.non);
Button btYES = (Button)popupView.findViewById(R.id.oui);
connPopupWindow.showAtLocation(view, Gravity.CENTER, 20, 0);
btnNO.setOnClickListener(new Button.OnClickListener(){
@Override
public void onClick(View v) {
connPopupWindow.dismiss();
}
});
btYES.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {
cacherMenuOptions();
Intent i = new Intent();
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 3);
getActivity().setResult(getActivity().RESULT_OK, i);
getActivity().finish();
connPopupWindow.dismiss();
}
});
}
};
private View.OnClickListener boutonMenuOptionsMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
if(menuOptionsVisible) {
cacherMenuOptions();
mGridView.setClickable(true);
activationBouttons();
}
else{
mGridView.setClickable(false);
((RelativeLayout) view.findViewById(R.id.veilPageGallerie)).setVisibility(View.VISIBLE);
view.findViewById(R.id.layoutInfosProfilMP).setVisibility(View.VISIBLE);
menuOptionsVisible = true;
desactivationBouttons();
}
}
};
private View.OnClickListener boutonGalerieProfilMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
mPager.setCurrentItem(0,true);
cacherMenuOptions();
}
};
/*private View.OnClickListener buttonHistoriqueMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
mPager.setCurrentItem(1,true);
cacherMenuOptions();
}
};*/
private View.OnClickListener boutonMPMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
mPager.setCurrentItem(1,true);
cacherMenuOptions();
}
};
private View.OnClickListener boutonParamMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
mPager.setCurrentItem(2,true);
cacherMenuOptions();
}
};
private View.OnClickListener searchButtonMethode = new View.OnClickListener() {
@Override
public void onClick(View v) {
cacherMenuOptions();
Intent i = new Intent();
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 0);
getActivity().setResult(getActivity().RESULT_OK, i);
getActivity().finish();
}
};
}<file_sep>/*****************************************************************************************************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
/*************************************** TEST PROFIL ACTIVITY****************************************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
package pap.appli.navilium;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import pap.appli.navilium.LoginActivity.PlacesAutoCompleteAdapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Typeface;
import android.location.Address;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Base64;
import android.view.GestureDetector;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.gms.maps.GoogleMap.InfoWindowAdapter;
import com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import static java.lang.Thread.sleep;
/****************************************************************************************
* **************************************************************************************
* **************************************************************************************
* CLASSE PRINCIPALE !!
* *************************************************************************************
* *************************************************************************************
* *************************************************************************************
*/
@SuppressLint("InlinedApi") public class ProfilActivity extends FragmentActivity {
//Result from the current search
static final int DATE_PICKER_ID = 1111;
static final int CAT_PICKER_ID = 2222;
private static MyAdapter mAdapter;
static ViewPager mPager;
private static int currentPage = 0;
private static FragmentActivity act;
private static ProfilActivity act_bis;
static HttpClient httpclient;
static String base64EncodedCredentials;
static String currentGlobalPosition;
// Session Manager Class
static SessionManager session;
static PlacesAutoCompleteAdapter myCompletionAdapter;
public final static String EXTRA_RESULT = "pap.appli.navilium.RESULT";
static OnInfoWindowClickListener globalInfoClick;
static InfoWindowAdapter infoAdapter;
final static HashMap<Marker, String> extHash = new HashMap<Marker, String>();
final static HashMap<Marker, String> refUserHash = new HashMap<Marker, String>();
final static HashMap<Marker, String> dateHash = new HashMap<Marker, String>();
public static ImageLoader myImgLoader = new ImageLoader(act);
public static Marker m;
static String responseConnText = "";
static ImageAdapter imgAdapter;
static Typeface font1;
static Bitmap imageProfil;
Bitmap imageCover;
static int mp = 0, gal = 0;
HashMap<String, String> user;
private static Context appContext = null;
ProfilActivity pa;
GallerieFragment galFrag = null;
//HistoriqueFragment histFrag = null;
MPFragment mpFrag = null;
ParametresFragment paramFrag = null;
private GestureDetector gestureScanner;
private int pagePrec = 0;
public Activity getActivity(){
return act_bis;
}
public Bitmap getImageProfil(){
return imageProfil;
}
public Bitmap getImageCover(){
return imageCover;
}
public static void barre_dattente(Context cont){
final ProgressDialog progress = new ProgressDialog(cont);
progress.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
progress.setCancelable(true);
progress.setMessage("Chargement...");
progress.setProgress(0);
progress.setMax(100);
progress.show();
mp = 0;
gal = 0;
new Thread(new Runnable() {
public void run() {
while (mp != 100 && gal != 100) {
try {
sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
progress.dismiss();
}
}).start();
}
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getActionBar().hide();
setContentView(R.layout.activity_profil);
session = new SessionManager(getApplicationContext());
user = session.getUserDetails();
final String image_url= "http://www.navilium.fr/session/reqProfilePic?userId="+user.get(SessionManager.KEY_ID);
final String image_url2= "http://www.navilium.fr/session/reqProfileCover?userId="+user.get(SessionManager.KEY_ID);
final URL[] url = {null, null};
Thread profilImage = new Thread() {
@Override
public void run(){
try {
url[0] = new URL(image_url);
url[1] = new URL(image_url2);
} catch (MalformedURLException e) {
e.printStackTrace();
}
try {
imageProfil = BitmapFactory.decodeStream(url[0].openConnection().getInputStream());
} catch (IOException e) {
e.printStackTrace();
}
}
};
profilImage.start();
/*try {
profilImage.join();
} catch (InterruptedException e) {
e.printStackTrace();
}*/
//create the adapter
myCompletionAdapter = new LoginActivity.PlacesAutoCompleteAdapter(this, R.layout.list_item);
//Create the httpclient
httpclient = new DefaultHttpClient();
String credentials = "<PASSWORD>:<PASSWORD>";
base64EncodedCredentials = Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);
infoAdapter = new InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
if (marker.getTitle().equals("RECHERCHE") || marker.getTitle().equals("END")) {
View v = act.getLayoutInflater().inflate(R.layout.infowindow1, null);
TextView note = (TextView) v.findViewById(R.id.title);
if (marker.getTitle().equals("END")) {
note.setText("Arrivée");
} else {
note.setText("Position");
}
return v;
} else {
// Getting view from the layout file info_window_layout
View v = act.getLayoutInflater().inflate(R.layout.infowindow2, null);
// Getting reference to the TextView to set title
final ImageView img = (ImageView) v.findViewById(R.id.image);
String id = marker.getTitle();
String refUser = refUserHash.get(marker);
String imgExtension = extHash.get(marker);
final String path = "http://www.navilium.fr/session/reqThumb?user=" + refUser + "&id=" + id + "&ext=" + imgExtension;
Thread thread = new Thread() {
@Override
public void run() {
try {
boolean done = false;
while (!done) {
done = myImgLoader.DisplayImage(path, img);
sleep(100);
}
} catch (Exception e) {
}
}
};
thread.start();
try {
thread.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// Returning the view containing InfoWindow contents
return v;
}
}
};
globalInfoClick = new OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker m) {
if (m.getTitle().equals("RECHERCHE")) {
return;
} else if (m.getTitle().equals("END")) {
} else {
// TODO Auto-generated method stub
int Imgid = Integer.parseInt(m.getTitle());
int Imgrefuser = Integer.parseInt(refUserHash.get(m));
String date = dateHash.get(m);
String title = m.getSnippet();
String ext = extHash.get(m);
Intent Zoomintent = new Intent();
Zoomintent.setComponent(new ComponentName("pap.appli.navilium", "pap.appli.navilium.ZoomActivity"));
Zoomintent.putExtra(ShowResultActivity.EXTRA_ID, Imgid);
Zoomintent.putExtra(ShowResultActivity.EXTRA_USER, Imgrefuser);
Zoomintent.putExtra(ShowResultActivity.EXTRA_TITLE, title);
Zoomintent.putExtra(ShowResultActivity.EXTRA_DATE, date);
Zoomintent.putExtra(ShowResultActivity.EXTRA_EXT, ext);
startActivity(Zoomintent);
}
}
};
// Session class instance
session = new SessionManager(getApplicationContext());
// get user data from session
HashMap<String, String> user = session.getUserDetails();
// name
String name = user.get(SessionManager.KEY_NAME);
// email
String userid = user.get(SessionManager.KEY_ID);
//Import the custom font
font1 = Typeface.createFromAsset(getAssets(), "fonts/nexa_slab_bold.ttf");
appContext = this;
act = this;
act_bis = this;
galFrag = new GallerieFragment();
//histFrag = new HistoriqueFragment();
mpFrag = new MPFragment();
paramFrag = new ParametresFragment();
//mAdapter = new MyAdapter(getSupportFragmentManager(), galFrag, histFrag, mpFrag, paramFrag);
mAdapter = new MyAdapter(getSupportFragmentManager(), galFrag, mpFrag, paramFrag);
mPager = (ViewPager) findViewById(R.id.pager);
mPager.setAdapter(mAdapter);
mPager.requestTransparentRegion(mPager);
Bundle extras = getIntent().getExtras();
System.out.println("Get Intent done");
if (extras != null) {
System.out.println("extra non nul !");
int val = extras.getInt("PROVENANCE");
selectVue(val);
} else {
selectVue(0);
}
/**********************************************************************************/
/**************** settages classes ! **********************************************/
galFrag.setContext(appContext);
galFrag.setMPager(mPager);
galFrag.setPA(this);
/*histFrag.setContext(appContext);
histFrag.setMPager(mPager);
histFrag.setFont(font1);
*/
mpFrag.setContext(appContext);
mpFrag.setMPager(mPager);
paramFrag.setContext(appContext);
paramFrag.setMPager(mPager);
//The text toSearch when we'll swap on the new page
}
public static MyAdapter getAdapter(){
return mAdapter;
}
private void selectVue(int v) {
switch (v) {
case 0:
mPager.setCurrentItem(0, true);
break;
case 1:
mPager.setCurrentItem(1, true);
break;
case 2:
mPager.setCurrentItem(2, true);
break;
default:
mPager.setCurrentItem(0, true);
break;
}
}
public Fragment findFragmentByPosition(int pos) {
final FragmentManager mFragmentManager = getSupportFragmentManager();
FragmentPagerAdapter fragmentPagerAdapter = mAdapter;
String tag = "android:switcher:" + mPager.getId() + ":" + pos;
Fragment fragment = mFragmentManager.findFragmentByTag(tag);
return fragment;
}
//TO DO
//Migrate for a splash screen connection
public void refreshMenu() {
invalidateOptionsMenu();
}
public static LatLngBounds getDeltaRing_map(Address addr, double radius) {
LatLng center = new LatLng(addr.getLatitude(), addr.getLongitude());
LatLngBounds dRing = new LatLngBounds.Builder().
include(SphericalUtil.computeOffset(center, radius, 0)).
include(SphericalUtil.computeOffset(center, radius, 90)).
include(SphericalUtil.computeOffset(center, radius, 180)).
include(SphericalUtil.computeOffset(center, radius, 270)).build();
return dRing;
}
public void reponseToDisplaySlideActivity(){
Intent i = new Intent();
//i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, "0");
i.putExtra(DisplaySlideActivity.MESSAGE_FROM_PROFIL_ACTIVITY, 0);
setResult(RESULT_OK, i);
getActivity().finish();
}
public static class MyAdapter extends FragmentPagerAdapter {
GallerieFragment galF;
//HistoriqueFragment histF;
MPFragment mpF;
FragmentManager frag;
ParametresFragment pFrag;
/*public MyAdapter(FragmentManager fm, GallerieFragment gFragment, HistoriqueFragment hFragment, MPFragment mpFragment, ParametresFragment pFrag) {
super(fm);
frag= fm;
this.galF= gFragment;
this.histF= hFragment;
this.mpF= mpFragment;
this.pFrag = pFrag;
}*/
public MyAdapter(FragmentManager fm, GallerieFragment gFragment, MPFragment mpFragment, ParametresFragment pFrag) {
super(fm);
frag= fm;
this.galF= gFragment;
this.mpF= mpFragment;
this.pFrag = pFrag;
}
@Override
public int getCount() {
return 3;
}
@Override
public Fragment getItem(int position) {
switch (position) {
case 0:
currentPage= 0;
return galF;
case 1:
currentPage= 1;
//return histF;
return mpF;
case 2:
currentPage= 2;
return pFrag;
default:
return null;
}
}
}
}
<file_sep>package pap.appli.navilium;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBarActivity;
import android.widget.ProgressBar;
import static java.lang.Thread.sleep;
/**
* Created by ilyas on 16/04/2015.
*/
public class ProgressBarActivity extends ActionBarActivity{
private static final int PROGRESS = 0x1;
ProgressDialog progressBar;
private ProgressBar mProgress;
private int mProgressStatus = 0;
//private Handler mHandler = new Handler();
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.progress_bar_activity);
mProgress = (ProgressBar) findViewById(R.id.progressBar);
// Start lengthy operation in a background thread
new Thread(new Runnable() {
public void run() {
while (mProgressStatus < 100) {
mProgressStatus ++;
try {
sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
// Update the progress bar
/*mHandler.post(new Runnable() {
public void run() {
mProgress.setProgress(mProgressStatus);
}
});*/
}
}
}).start();
}
}
|
5b45685c99dcae3534d4fb660e0c6b3c82d8d06d
|
[
"Java"
] | 7
|
Java
|
elieLeE/NaviliumMobV2Src
|
6ae6b06ef826fa7d76493a1b7c37c8a136823b6d
|
9b11cd445806d31dc9b8e08b4bb402900692f8b1
|
refs/heads/main
|
<file_sep># -*- coding: utf-8 -*-
import numpy as np
from skimage import filters
from skimage.measure import label, regionprops
from skimage import morphology
from skimage import draw
import matplotlib.pyplot as plt
def count_holes(s):
s = np.logical_not(s).astype('uint8')
ss = np.ones((s.shape[0] + 2, s.shape[1] + 2))
ss[1:-1, 1:-1] = s
LBs = label(ss)
LBs[LBs == 1] = 0
return len(np.unique(LBs))-1
def has_vline(s):
line = np.sum(s, 0) // s.shape[0]
return 1 in line
def hole_centers(s):
s = np.logical_not(s).astype('uint8')
ss = np.ones((s.shape[0] + 2, s.shape[1] + 2))
ss[1:-1, 1:-1] = s
LBs = label(ss)
LBs[LBs == 1] = 0
centers = []
labels = np.unique(LBs)
for lb in labels:
if lb == 0:
continue
x = int(np.mean(np.where(LBs == lb)[0]))
y = int(np.mean(np.where(LBs == lb)[1]))
centers.append((x,y))
return centers
# Считает кол-во штрихов
def count_hatch(s):
up = s[0, :]
upe = np.zeros(len(up) + 2)
upe[1: -1] = up
upe = np.abs(np.diff(upe))
intervals = np.where(upe > 0)[0]
points_up = []
for p1, p2 in zip( intervals[::2], intervals[1::2]):
points_up.append((p2+p1) // 2)
# print(points_up)
down = s[-1, :]
downe = np.zeros(len(down) + 2)
downe[1: -1] = down
downe = np.abs(np.diff(downe))
intervals = np.where(downe > 0)[0]
points_down = []
for p1, p2 in zip( intervals[::2], intervals[1::2]):
points_down.append((p2+p1) // 2)
# print(points_down)
h = 0 # Кол-во штрихов.
for p1 in points_up:
for p2 in points_down:
line = draw.line(0, p1, s.shape[0] - 1, p2)
if np.all(s[line] == 1):
h += 1
# print (h)
if (h == 0):
h = has_vline(s)
return h
def recognite(s):
# Смотрим кол-во отверстий в букве.
holes = count_holes(s)
if holes == 2:
# Считаем штрихи
hatches = count_hatch(s)
if hatches == 1:
return "B"
else:
return "8"
elif holes == 1:
hatches = count_hatch(s)
if hatches > 0:
if has_vline(s):
if hole_centers(s)[0][0] <= s.shape[0]/2.6:
return "P"
else:
return "D"
else:
return "A"
else:
return "0"
else:
hatches = count_hatch(s)
# print(hatches)
ratio = s.shape[0] / s.shape[1] # Соотношение (процентное) высоты к ширине
# print("Ratio = ", ratio)
if (hatches == 4):
return "W"
elif hatches == 2:
return "X"
elif has_vline(s) and ratio > 1:
return "1"
elif (hatches == 1) and (0.9 < ratio < 1.1):
return "*"
elif (hatches == 1) and (1.9 < ratio < 2.1):
return "/"
elif (hatches == 1) and (ratio < 0.5):
return "-"
return ""
if __name__ == "__main__":
alphabet = plt.imread("C:/Users/1052126/Desktop/symbols.png")
alphabet = np.mean(alphabet, 2)
thresh = filters.threshold_otsu(alphabet)
alphabet[alphabet < thresh] = 0
alphabet[alphabet >= thresh] = 1
count = len(np.unique(label(alphabet)))
b_alpha = np.zeros_like(alphabet)
b_alpha[alphabet < thresh] = 0
b_alpha[alphabet >= thresh] = 1
plt.figure(figsize = (20,20))
plt.imshow(b_alpha)
LB = label(b_alpha)
props = regionprops(LB)
count_symbols = {};
index = 0;
while (True):
try:
s = props[index].image
if count_symbols.get(recognite(s)):
count_symbols[recognite(s)] = count_symbols[recognite(s)] + 1
if recognite(s) == '':
plt.imshow(s)
plt.show()
# pass
else:
count_symbols[recognite(s)] = 1
index += 1
except Exception as e:
print(e)
break;
print(count_symbols)
<file_sep>import numpy as np
import matplotlib.pyplot as plt
def find(label,linked):
j=label
while linked[j]!=0:
j=linked[j]
return j
def union(l1,l2,linked):
j=find(l1,linked)
k=find(l2,linked)
if j!=k:
linked[k]=j
def check(B,y,x):
if not 0<=y<B.shape[0]:
return False
if not 0<=x<B.shape[1]:
return False
if B[y,x]==0:
return False
return True
def prior_neighbors(B,y,x):
left=y,x-1
top=y-1,x
if not check(B,*left):
left=None
if not check(B,*top):
top=None
return left,top
def exists(neighbors):
return not all([n is None for n in neighbors])
def two_pass_labeling(B):
size=np.ceil(B.shape[0]/2)*np.ceil(B.shape[1]/2)
linked=np.zeros(int(size),dtype="int32")
label=1
LB=np.zeros_like(B)
for i in range(B.shape[0]):
for j in range(B.shape[1]):
if B[i,j]!=0:
A=prior_neighbors(B,i,j)
if not exists(A):
M=label
label+=1
else:
labels=[LB[i] for i in A if i is not None]
M=min(labels)
LB[i,j]=M
for t in A:
if t is not None:
lb=LB[t]
if lb!=M:
union(M,lb,linked)
newLabels=[]
for i in range(B.shape[0]):
for j in range(B.shape[1]):
if B[i,j]!=0:
new_label=find(LB[i,j],linked)
if new_label not in newLabels:
newLabels.append(new_label)
LB[i,j]=newLabels.index(new_label)+1
return LB
def quantity(im):
c = len(set(im.ravel()))-1
return c
if __name__=="__main__":
image = np.zeros((20,20), dtype = "int32")
image[1:-1, -2] = 1
image[1, 1:5] = 1
image[1, 7:12] = 1
image[2,1:3] = 1
image[2,6:8] = 1
image[3:4, 1:7] = 1
image[7:11, 11] = 1
image[7:11, 14] = 1
image[10:15, 10:15] = 1
image[5:10, 5] = 1
image[5:10, 6] = 1
newim=two_pass_labeling(image)
print("Labels - ", list(set(newim.ravel()))[1:])
quantity(newim)
plt.figure(figsize = (12,5))
plt.subplot(121)
plt.title("ORIGINAL")
plt.imshow(image, cmap = "gray")
plt.subplot(122)
plt.title("NEW")
plt.imshow(newim, cmap = "gray")
plt.show()
|
c27d64fc5ec120ce16f681028c5de7220b640665
|
[
"Python"
] | 2
|
Python
|
KostyaRed444/-omputer-vision
|
6f21edf190649c3dda963e0b6d74b7189cb50504
|
c34ada37e931b7ae739908fd57f29931ec6824a2
|
refs/heads/master
|
<repo_name>joargp/QuizApp<file_sep>/Joar.Api.Quiz/Joar.Api.Quiz/Models/QuestionRepository.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
namespace Joar.Api.Quiz.Models
{
public class QuestionRepository : IQuestionRepository
{
QuizContext context = new QuizContext();
public IQueryable<Question> All
{
get { return context.Questions; }
}
public IQueryable<Question> AllIncluding(params Expression<Func<Question, object>>[] includeProperties)
{
IQueryable<Question> query = context.Questions;
foreach (var includeProperty in includeProperties) {
query = query.Include(includeProperty);
}
return query;
}
public Question Find(int id)
{
return context.Questions.Find(id);
}
public void InsertOrUpdate(Question question)
{
if (question.Id == default(int)) {
// New entity
context.Questions.Add(question);
} else {
// Existing entity
context.Entry(question).State = EntityState.Modified;
}
}
public void Delete(int id)
{
var question = context.Questions.Find(id);
context.Questions.Remove(question);
}
public void Save()
{
context.SaveChanges();
}
public void Dispose()
{
context.Dispose();
}
}
public interface IQuestionRepository : IDisposable
{
IQueryable<Question> All { get; }
IQueryable<Question> AllIncluding(params Expression<Func<Question, object>>[] includeProperties);
Question Find(int id);
void InsertOrUpdate(Question question);
void Delete(int id);
void Save();
}
}<file_sep>/Joar.Api.Quiz/Joar.Api.Quiz/Models/Question.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Joar.Api.Quiz.Models
{
public class Question
{
public int Id { get; set; }
public string Name { get; set; }
public string AnswerA { get; set; }
public string AnswerB { get; set; }
public string AnswerC { get; set; }
public string AnswerD { get; set; }
public float Rating { get; set; }
}
}<file_sep>/Joar.Api.Quiz/Joar.Api.Quiz/Controllers/Questions.cs
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Web.Http;
using Joar.Api.Quiz.Models;
namespace Joar.Api.Quiz.Controllers
{
public class QuestionsController : ApiController
{
private readonly IQuestionRepository questionRepository = new QuestionRepository();
// If you are using Dependency Injection, you can delete the following constructor
public QuestionsController() : this(new QuestionRepository())
{
}
public QuestionsController(IQuestionRepository countryRepository)
{
this.questionRepository = countryRepository;
}
public IEnumerable<Question> GetAll()
{
return questionRepository.All;
}
public Question Get(int id)
{
return questionRepository.Find(id);
}
public HttpResponseMessage Post(Question item)
{
throw new NotImplementedException();
}
public HttpResponseMessage Put(int id, Question item)
{
throw new NotImplementedException();
}
public HttpResponseMessage Delete(int id)
{
throw new NotImplementedException();
}
}
}
|
ac06c602c649de188e66c0675388e1f8c0f20c7b
|
[
"C#"
] | 3
|
C#
|
joargp/QuizApp
|
916ee4ab18cb5f9848d4c304759137f9dd387b69
|
4fce4130242562e68aa142d717d5135d2bd05b1e
|
refs/heads/master
|
<repo_name>joshuaUm/HW6Project2<file_sep>/HW6Project2/Program.cs
/// Homework No. 6 Project No. 2
/// File Name : Program.cs
/// @author : <NAME>
/// Date : Oct 4 2021
///
/// Problem Statement : Create an array of integers, then reverse the contents of the integer array.
///
/// Plan:
/// 1. Generate integers using GenerateNumbers(), returning an array of 10 random integers
/// 2. Print numbers to show original array contents.
/// 3. Enter Reverse() to reverse the contents.
/// 4. In Reverse(), enter for loop to iterate through array.
/// 5. Reverse each integer by storing one of the values in a temp handle to safely swap the two numbers without losing data.
/// 6. End loop once all values are swapped, exit Reverse().
/// 7. Print reversed array.
using System;
namespace HW6Project2
{
class Program
{
static void Main(string[] args)
{
int[] numbers = GenerateNumbers();
PrintNumbers(numbers);
Console.WriteLine("-After Reverse-");
Reverse(numbers);
PrintNumbers(numbers);
}
static void Reverse(int[] numbers)
{
for (int i = 0, count = numbers.Length / 2; i < count; i++)
{
int temp = numbers[i];
numbers[i] = numbers[numbers.Length - i - 1];
numbers[numbers.Length - i - 1] = temp;
}
}
static void PrintNumbers(int[] numbers)
{
String outputString = "";
for (int i = 0, count = numbers.Length; i < count; i++)
{
outputString += numbers[i] + " ";
}
Console.WriteLine(outputString);
}
static int[] GenerateNumbers()
{
Random rand = new Random();
int[] intArray = new int[10];
for (int i = 0, count = intArray.Length; i < count; i++)
{
intArray[i] = rand.Next(1, 101);
}
return intArray;
}
}
}
|
aed6afd1b26c7999938db8a71949826c04c5f939
|
[
"C#"
] | 1
|
C#
|
joshuaUm/HW6Project2
|
10fbaa44a6ef0f65ba15f58df0c468ca572a3097
|
b8007cbff2a8c6b4d57459bf396ba432f7b21789
|
refs/heads/master
|
<repo_name>GAGUAR/Guider<file_sep>/app/src/main/java/com/guider/guider/ObjectChoose.java
package com.guider.guider;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
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.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
public class ObjectChoose extends AppCompatActivity {
private static final String TAG = "MainActivity";
private boolean objects;
private FirebaseDatabase mFirebaseDatabase;
private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;
private DatabaseReference myRef;
private String userID;
private String strEndTime;
private Date currentTime = Calendar.getInstance().getTime();
private Date date;
//vars
private ArrayList<String> mNames1 = new ArrayList<>();
private ArrayList<Integer> mImageUrls1 = new ArrayList<Integer>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_object_choose);
Log.d(TAG, "onCreate: started.");
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context arg0, Intent intent) {
String action = intent.getAction();
if (action.equals("finish_activity")) {
finish();
// DO WHATEVER YOU WANT.
}
}
};
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo ==null){
startActivity(new Intent(getApplicationContext(),NoInternet.class));
finish();
}
registerReceiver(broadcastReceiver, new IntentFilter("finish_activity"));
initImageBitmaps();
mAuth = FirebaseAuth.getInstance();
mFirebaseDatabase = FirebaseDatabase.getInstance();
myRef = mFirebaseDatabase.getReference();
FirebaseUser user = mAuth.getCurrentUser();
userID = user.getUid();
myRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
private void showData(DataSnapshot dataSnapshot) {
for (DataSnapshot ds : dataSnapshot.getChildren()) {
UserInformation uInfo = new UserInformation();
uInfo.setEndTime(ds.child(userID).getValue(UserInformation.class).getEndTime());
strEndTime = uInfo.getEndTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
try {
date = format.parse(strEndTime);
Log.d(TAG, String.valueOf(date));
} catch (ParseException e) {
e.printStackTrace();
}
if (currentTime.after(date)) {
finish();
}
}
}
private void initImageBitmaps(){
Log.d(TAG, "initImageBitmaps: preparing bitmaps.");
Intent intent2= getIntent();
objects= (boolean) intent2.getExtras().get("ObjBool");
if(objects==true) {
mImageUrls1.add(R.drawable.ic_sightseeing);
mNames1.add(getString(R.string.aps));
mImageUrls1.add(R.drawable.ic_monument);
mNames1.add(getString(R.string.piem));
mImageUrls1.add(R.drawable.bed);
mNames1.add(getString(R.string.hotels));
mImageUrls1.add(R.drawable.ic_food);
mNames1.add(getString(R.string.cafe));
mImageUrls1.add(R.drawable.ic_iestade);
mNames1.add(getString(R.string.iestad));
}else {
mImageUrls1.add(R.drawable.route_choose);
mNames1.add(getString(R.string.VECPILSĒTA));
}
initRecyclerView();
}
private void initRecyclerView(){
Log.d(TAG, "initRecyclerView: init recyclerview.");
RecyclerView recyclerView = findViewById(R.id.recyclerv_view1);
RecyclerAdapter1 adapter = new RecyclerAdapter1(this, mNames1, mImageUrls1);
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
}
}
<file_sep>/app/src/main/java/com/guider/guider/NoInternet.java
package com.guider.guider;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class NoInternet extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_no_internet);
Button tryagain = findViewById(R.id.tryagain);
tryagain.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getApplicationContext(),LoginActivity.class));
finish();
}
});
}
}
<file_sep>/app/src/main/java/com/guider/guider/PaymentActivity.java
package com.guider.guider;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.anjlab.android.iab.v3.BillingProcessor;
import com.anjlab.android.iab.v3.TransactionDetails;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import org.json.JSONException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
public class PaymentActivity extends AppCompatActivity implements BillingProcessor.IBillingHandler{
BillingProcessor bp;
Button pay;
FirebaseAuth mAuth = FirebaseAuth.getInstance();
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_payment);
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo ==null){
startActivity(new Intent(getApplicationContext(),NoInternet.class));
finish();
}
bp = new BillingProcessor(this, "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiy<KEY>", this);
pay = findViewById(R.id.paybtn);
pay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
bp.consumePurchase("com.guider.entrance");
bp.purchase(PaymentActivity.this,"com.guider.entrance");
}
});
}
@Override
public void onProductPurchased(@NonNull String productId, @Nullable TransactionDetails details) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date date = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.HOUR, 6);
Date plusDate = calendar.getTime();
String dateTime = dateFormat.format(plusDate);
FirebaseUser user = mAuth.getCurrentUser();
String userID = user.getUid();
myRef.child("users").child(userID).child("endTime").setValue(dateTime);
startActivity(new Intent(getApplicationContext(),HomeActivity.class));
finish();
}
@Override
public void onPurchaseHistoryRestored() {
}
@Override
public void onBillingError(int errorCode, @Nullable Throwable error) {
}
@Override
public void onBillingInitialized() {
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (!bp.handleActivityResult(requestCode, resultCode, data)) {
super.onActivityResult(requestCode, resultCode, data);
}
}
@Override
public void onDestroy() {
if (bp != null) {
bp.release();
}
super.onDestroy();
}
}<file_sep>/app/src/main/java/com/guider/guider/RecyclerActivity.java
package com.guider.guider;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
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.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
public class RecyclerActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
//vars
private ArrayList<String> mNames = new ArrayList<>();
private ArrayList<Integer> mImageUrls = new ArrayList<Integer>();
private FirebaseDatabase mFirebaseDatabase;
private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;
private DatabaseReference myRef;
private String userID;
private String strEndTime;
private Date currentTime = Calendar.getInstance().getTime();
private Date date;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recycl);
Log.d(TAG, "onCreate: started.");
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context arg0, Intent intent) {
String action = intent.getAction();
if (action.equals("finish_activity")) {
finish();
}
}
};
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo ==null){
startActivity(new Intent(getApplicationContext(),NoInternet.class));
finish();
}
registerReceiver(broadcastReceiver, new IntentFilter("finish_activity"));
initImageBitmaps();
mAuth = FirebaseAuth.getInstance();
mFirebaseDatabase = FirebaseDatabase.getInstance();
myRef = mFirebaseDatabase.getReference();
FirebaseUser user = mAuth.getCurrentUser();
userID = user.getUid();
myRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
private void showData(DataSnapshot dataSnapshot) {
for (DataSnapshot ds : dataSnapshot.getChildren()) {
UserInformation uInfo = new UserInformation();
uInfo.setEndTime(ds.child(userID).getValue(UserInformation.class).getEndTime());
strEndTime = uInfo.getEndTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
try {
date = format.parse(strEndTime);
Log.d(TAG, String.valueOf(date));
} catch (ParseException e) {
e.printStackTrace();
}
if (currentTime.after(date)) {
finish();
}
}
}
private void initImageBitmaps(){
Log.d(TAG, "initImageBitmaps: preparing bitmaps.");
Intent myIntent = getIntent(); // gets the previously created intent
String chosenstring = myIntent.getStringExtra("chosen"); // will return "activity integer from GPS_Service"
int chosenNo = Integer.parseInt(chosenstring);
if(chosenNo==1){
mImageUrls.add(R.drawable.am);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.lop);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.rl);
mNames.add("RĀTSLAUKUMS");
mImageUrls.add(R.drawable.tulkmaja);
mNames.add("<NAME> UN TULKOTĀJU MĀJA");
mImageUrls.add(R.drawable.strkv);
mNames.add("STRŪKLAKA '<NAME>'");
mImageUrls.add(R.drawable.svnik);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.vt);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.niklutbaz);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.lutdrnams);
mNames.add("<NAME> <NAME>");
mImageUrls.add(R.drawable.aka);
mNames.add("AKA <NAME>");
mImageUrls.add(R.drawable.zvantornis);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.piespog);
mNames.add("GOVIS “<NAME>”");
mImageUrls.add(R.drawable.marites);
mNames.add("MĀRĪTES");
mImageUrls.add(R.drawable.sievgovs);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.supgovs);
mNames.add("<NAME>POLĒS");
mImageUrls.add(R.drawable.latvmeln);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.hute);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.staldz);
mNames.add("<NAME> STALDZENĒ");
mImageUrls.add(R.drawable.puka);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.gaismas);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.matrozis);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.piena);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.zala);
mNames.add("VENTSPILS ZĀĻ<NAME>");
mImageUrls.add(R.drawable.celot);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.mazb);
mNames.add("<NAME>");
}
if(chosenNo==2){
mImageUrls.add(R.drawable.gb);
mNames.add("VENTSPILS <NAME>");
mImageUrls.add(R.drawable.bt);
mNames.add("VENTSPILS <NAME>");
mImageUrls.add(R.drawable.pt);
mNames.add("<NAME>LIS");
mImageUrls.add(R.drawable.dc);
mNames.add("VENTSPILS <NAME>");
mImageUrls.add(R.drawable.jn);
mNames.add("VENTSPILS <NAME>");
mImageUrls.add(R.drawable.parvbibl);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.vsk);
mNames.add("VENTSPILS 2. VIDUSSKOLA");
}
if(chosenNo==3){
mImageUrls.add(R.drawable.jav);
mNames.add("JŪRAKMENS");
mImageUrls.add(R.drawable.kvp);
mNames.add("<NAME>ŠJĀ<NAME>");
mImageUrls.add(R.drawable.kk);
mNames.add("PIEMINEKLIS JŪRNIEKIE<NAME>JNIEKIEM");
mImageUrls.add(R.drawable.jf);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.pbm);
mNames.add("<NAME>");
}
if(chosenNo==4){
mImageUrls.add(R.drawable.landora);
mNames.add("LANDORA 6");
mImageUrls.add(R.drawable.erm);
mNames.add("ĒRMANĪTIS");
mImageUrls.add(R.drawable.skroderkrogs);
mNames.add("SKRODERKROGS");
mImageUrls.add(R.drawable.dolcevita);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.burgerbars);
mNames.add("BURGERBĀRS");
mImageUrls.add(R.drawable.ostas23);
mNames.add("OSTAS 23");
mImageUrls.add(R.drawable.rgalds);
mNames.add("RĀTSGALDS");
mImageUrls.add(R.drawable.courlander);
mNames.add("VENT<NAME>TAVA “COURLANDER”");
}
if(chosenNo==5){
mImageUrls.add(R.drawable.kupfer);
mNames.add("KUPFERNAMS");
mImageUrls.add(R.drawable.klosteris);
mNames.add("KLOSTERIS");
mImageUrls.add(R.drawable.mazais);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.oranznams);
mNames.add("<NAME>");
mImageUrls.add(R.drawable.portoss);
mNames.add("PORTOSS");
mImageUrls.add(R.drawable.dzintari);
mNames.add("DZINTARI");
}
initRecyclerView();
}
private void initRecyclerView(){
Log.d(TAG, "initRecyclerView: init recyclerview.");
RecyclerView recyclerView = findViewById(R.id.recyclerv_view);
RecyclerAdapter adapter = new RecyclerAdapter(this, mNames, mImageUrls);
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
}
}
<file_sep>/app/src/main/java/com/guider/guider/RegisterActivity.java
package com.guider.guider;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.NonNull;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.util.Patterns;
import android.view.View;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuthUserCollisionException;
import com.google.firebase.auth.FirebaseUser;
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.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class RegisterActivity extends AppCompatActivity implements View.OnClickListener {
ProgressBar progressBar;
EditText editTextEmail, editTextPassword;
private static final String TAG = "FbIN";
private FirebaseAuth mAuth;
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo ==null){
startActivity(new Intent(getApplicationContext(),NoInternet.class));
finish();
}
editTextEmail = (EditText) findViewById(R.id.editTextEmail);
editTextPassword = (EditText) findViewById(R.id.editTextPassword);
progressBar = (ProgressBar) findViewById(R.id.progressbar);
mAuth = FirebaseAuth.getInstance();
findViewById(R.id.buttonSignUp).setOnClickListener(this);
findViewById(R.id.textViewLogin).setOnClickListener(this);
}
private void registerUser() {
String email = editTextEmail.getText().toString().trim();
String password = editTextPassword.getText().toString().trim();
if (email.isEmpty()) {
editTextEmail.setError("Email is required");
editTextEmail.requestFocus();
return;
}
if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
editTextEmail.setError("Please enter a valid email");
editTextEmail.requestFocus();
return;
}
if (password.isEmpty()) {
editTextPassword.setError("Password is required");
editTextPassword.requestFocus();
return;
}
if (password.length() < 6) {
editTextPassword.setError("Minimum lenght of password should be 6");
editTextPassword.requestFocus();
return;
}
progressBar.setVisibility(View.VISIBLE);
mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
progressBar.setVisibility(View.GONE);
if (task.isSuccessful()) {
mAuth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if(task.isSuccessful()) {
Toast.makeText(RegisterActivity.this, "Konts ir reģistrēts. Apstipriniet Email", Toast.LENGTH_LONG).show();
addToFBase();
}else{
Toast.makeText(RegisterActivity.this,task.getException().getMessage(),Toast.LENGTH_LONG).show();
}
}
});
} else {
if (task.getException() instanceof FirebaseAuthUserCollisionException) {
Toast.makeText(getApplicationContext(), "You are already registered", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
});
}
private void addToFBase() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date date = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.HOUR, 1);
Date plusDate = calendar.getTime();
String dateTime = dateFormat.format(plusDate);
FirebaseUser user = mAuth.getCurrentUser();
final String userID = user.getUid();
myRef.child("users").child(userID).child("endTime").setValue(dateTime);
DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference("users");
rootRef.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
if (snapshot.hasChild(userID)) {
Log.d(TAG, "OK GOOD");
mAuth.signOut();
Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
}else {
Log.d(TAG, "BAD CORESPONSE");
addToFBase();
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.buttonSignUp:
registerUser();
break;
case R.id.textViewLogin:
finish();
startActivity(new Intent(this, LoginActivity.class));
break;
}
}
}<file_sep>/app/src/main/java/com/guider/guider/UserInformation.java
package com.guider.guider;
public class UserInformation {
private String endTime;
public UserInformation() {
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
}
<file_sep>/app/src/main/java/com/guider/guider/InformActivity.java
package com.guider.guider;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
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 com.google.maps.model.LatLng;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
public class InformActivity extends AppCompatActivity {
Button doctor, police, fire;
TextView timeExp , ppol;
private boolean objects;
private static final String TAG = "time: ";
private FirebaseDatabase mFirebaseDatabase;
private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;
private DatabaseReference myRef;
private String userID;
private String strEndTime;
private Date currentTime = Calendar.getInstance().getTime();
private Date date;
private Context mContext1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_inform);
timeExp=(TextView) findViewById(R.id.time);
fire=(Button)findViewById(R.id.fire);
police=(Button)findViewById(R.id.police);
doctor=(Button)findViewById(R.id.doctor);
mAuth = FirebaseAuth.getInstance();
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if(activeNetworkInfo ==null){
startActivity(new Intent(getApplicationContext(),NoInternet.class));
finish();
}
ppol=findViewById(R.id.ppolbtn);
mFirebaseDatabase = FirebaseDatabase.getInstance();
myRef = mFirebaseDatabase.getReference();
FirebaseUser user = mAuth.getCurrentUser();
userID = user.getUid();
myRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
buttons();
}
private void showData(DataSnapshot dataSnapshot) {
for (DataSnapshot ds : dataSnapshot.getChildren()) {
UserInformation uInfo = new UserInformation();
uInfo.setEndTime(ds.child(userID).getValue(UserInformation.class).getEndTime());
strEndTime = uInfo.getEndTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
try {
date = format.parse(strEndTime);
timeExp.setText(getApplicationContext().getString(R.string.timeexp)+date);
} catch (ParseException e) {
e.printStackTrace();
}
}
}
private void buttons() {
doctor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_DIAL);
// Send phone number to intent as data
intent.setData(Uri.parse("tel:" + "113"));
// Start the dialer app activity with number
startActivity(intent);
}
});
police.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_DIAL);
// Send phone number to intent as data
intent.setData(Uri.parse("tel:" + "110"));
// Start the dialer app activity with number
startActivity(intent);
}
});
fire.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_DIAL);
// Send phone number to intent as data
intent.setData(Uri.parse("tel:" + "112"));
// Start the dialer app activity with number
startActivity(intent);
}
});
ppol.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String url = "https://sites.google.com/view/guider-inc/privacy-policy?authuser=0";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});
}
}
|
860c39c38cf0cfc0ac31b8510d582fd9a2050171
|
[
"Java"
] | 7
|
Java
|
GAGUAR/Guider
|
b0f06acf442853c6c3df0b9fb0ffc142e0477f62
|
4d64c17172328a6364df9fbe3506197dce131df3
|
refs/heads/master
|
<repo_name>xKmz/graphql-api<file_sep>/src/test/UserService.test.js
const { expect } = require('chai');
const mongoose = require('mongoose');
const User = require('../schemas/User');
describe('Test User Service', () => {
before(async () => {
await mongoose.connect('mongodb://localhost:27017/desafio-backend-tests', {
useNewUrlParser: true,
});
});
after(async () => {
mongoose.disconnect();
});
it('Should be result a new users', async () => {
const user = await User.create({
name: '<NAME>',
email: '<EMAIL>',
});
expect(user.name).to.be.eq('<NAME>');
});
it('Should be find a user', async () => {
const user = await User.find();
expect(user).to.be.an('array');
});
it('Should be find a especific user', async () => {
const user = await User.create({
name: '<NAME>',
email: '<EMAIL>',
});
const resultUser = await User.findById(user._id);
expect(resultUser.name).to.be.eq('<NAME>');
});
it('Should be able to update a especific user', async () => {
const user = await User.create({
name: '<NAME>',
email: '<EMAIL>',
});
const resultUser = await User.findByIdAndUpdate(
{
_id: user._id,
},
{
$set: {
name: '<NAME>',
email: '<EMAIL>',
},
},
(err, updatedUser) => {
if (err) {
console.log(err);
}
return updatedUser;
},
);
expect(resultUser.name).to.be.eq('<NAME>');
expect(resultUser.email).to.be.eq('<EMAIL>');
});
it('Should be able to delete a especific user', async () => {
const user = await User.create({
name: '<NAME>',
email: '<EMAIL>',
});
const deletedUser = await User.findOneAndDelete({
_id: user._id,
});
const result = await User.findById({ _id: deletedUser._id });
expect(result).to.be.null;
});
});
<file_sep>/README.md
## Desafio Back-End Developer ##
### Preparando ambiente: ###
1. Instalando dependências:
**`yarn install`**
2. Preparando containers:
**`docker-compose up`**
3. Subindo serviço:
**`yarn build`**
Poderá acessar o serviço na url: http://localhost:4000/
4. Testes:
**`yarn test`**
## Informações gerais do projeto: ##
- Inicalmente tentei efetuar o projeto todo em typescript, mas infelizmente tive alguns problemas com as libs e não consegui efetuar com sucesso as relations no graphql, imagino que com mais tempo poderia acabar resolvendo essa questão.
- Já na parte de testes, tive uma certa dificuldade para efetuar eles nos resolvers, pela estrutura que necessita criar querys prontas e enviar, não vi de forma rápida e clara uma forma de passar argumentos, as formas que tentei infelizmente não funcionaram. Acredito que para nesses casos deveria criar um mock do banco e assim montar os testes.
- No caso que consegui efetuar alguns testes pelo graphql utilizei a lógica de Fakes, aonde ele copia a lógica de implementação do resolver e trabalha sem banco de dados, apenas salvando na memória.
- Acredito que no geral foi um bom teste, pude aprender coisas novas, mesmo com alguns problemas que encontrei ainda assim foi divertido!
<file_sep>/src/schemas/Appointment.js
const mongoose = require('mongoose');
const AppointmentSchema = new mongoose.Schema({
date: String,
iniHour: String,
endHour: String,
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
});
module.exports = mongoose.model('Appointment', AppointmentSchema);
<file_sep>/src/resolvers/fakes/FakeUserResolver.js
const { uuid } = require('uuidv4');
const User = require('../../schemas/User');
const users = [];
module.exports = {
Query: {
users: () => users,
user: (_, { name }) => users.find(user => user.name === name),
},
Mutation: {
createUser: (_, { name, email }) => {
const user = new User();
Object.assign(user, { _id: uuid(), name, email });
users.push(user);
return user;
},
updateUser: (_, { id, name, email }) => {
const findIndex = users.findIndex(findUser => findUser.id === id);
const updatedUser = {
id,
name,
email,
};
users[findIndex] = updatedUser;
return updatedUser;
},
deleteUser: (_, { id }) => {
const findIndex = users.findIndex(findUser => findUser.id === id);
console.log(findIndex);
if (findIndex < 0) {
return new Error('User not found.');
}
users.splice(findIndex, 1);
return users;
},
},
};
<file_sep>/src/test/UserGraphql.test.js
const EasyGraphQLTester = require('easygraphql-tester');
const gql = require('graphql-tag');
const { expect } = require('chai');
const fs = require('fs');
const path = require('path');
const schema = fs.readFileSync(
path.join(__dirname, '../', 'schema.graphql'),
'utf8',
);
const fakeUserResolver = require('../resolvers/fakes/FakeUserResolver');
let tester;
describe('Test Resolvers', () => {
beforeEach(() => {
tester = new EasyGraphQLTester(schema, fakeUserResolver);
});
it('Should be result a new users', async () => {
const mutation = gql`
mutation {
createUser(name: "test", email: "<EMAIL>") {
_id
name
email
}
}
`;
const { data } = await tester.graphql(mutation);
expect(data.createUser.name).to.be.eq('test');
});
it('Should be result a list of users', async () => {
const query = gql`
query {
users {
_id
name
email
}
}
`;
const { data } = await tester.graphql(query);
expect(data.users).to.be.an('array');
});
});
<file_sep>/src/resolvers/AppointmentResolver.js
const mongoose = require('mongoose');
const Appointment = require('../schemas/Appointment');
module.exports = {
Query: {
appointments: () =>
Appointment.aggregate([
{
$lookup: {
from: 'users',
localField: 'userId',
foreignField: '_id',
as: 'user',
},
},
]),
appointment: (_, { id }) =>
Appointment.aggregate(
[
{
$match: { userId: mongoose.Types.ObjectId(id) },
},
{
$lookup: {
from: 'users',
localField: 'userId',
foreignField: '_id',
as: 'user',
},
},
],
(err, appointment) => {
if (err) {
console.log(err);
}
return appointment;
},
),
},
Mutation: {
createAppointment: (_, { date, iniHour, endHour, userId }) =>
Appointment.create({ date, iniHour, endHour, userId }),
updateAppointment: (_, { id, ...args }) =>
Appointment.findByIdAndUpdate(
{
_id: id,
},
{
$set: {
...args,
},
},
(err, appointment) => {
if (err) {
console.log(err);
}
return appointment;
},
),
deleteAppointment: (_, { id }) => Appointment.findOneAndDelete({ _id: id }),
},
};
<file_sep>/src/resolvers/UserResolver.js
const User = require('../schemas/User');
module.exports = {
Query: {
users: () => User.find(),
user: (_, { id }) => User.findById(id),
},
Mutation: {
createUser: (_, { name, email }) => User.create({ name, email }),
updateUser: (_, { id, ...args }) =>
User.findByIdAndUpdate(
{
_id: id,
},
{
$set: {
...args,
},
},
(err, user) => {
if (err) {
console.log(err);
}
return user;
},
),
deleteUser: (_, { id }) => User.findOneAndDelete({ _id: id }),
},
};
|
560a66e8d19d169392a76979b596e8ee96520944
|
[
"JavaScript",
"Markdown"
] | 7
|
JavaScript
|
xKmz/graphql-api
|
2abcada433457efaea7258f12087a69480cdca20
|
f2188a4bb410317f8e2607377b53d6c117a351a3
|
refs/heads/master
|
<repo_name>VelluVu/C-exercises<file_sep>/Exercise17.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include <stdlib.h>
#include <time.h>
void numCalculator (float num1, float num2[5], int num3);
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
float number1 = 0;
float number2 = 0;
float num1 = 0;
float num2[5] = {};
int num3 = 5;
float amount [5]={};
int j;
do
{
printf("\nEnter Exchange rate: ");
scanf("%f",&number1);
printf("\nEnter 1. amount: ");
scanf("%f",&amount[0]);
printf("\nEnter 2. amount: ");
scanf("%f",&amount[1]);
printf("\nEnter 3. amount: ");
scanf("%f",&amount[2]);
printf("\nEnter 4. amount: ");
scanf("%f",&amount[3]);
printf("\nEnter 5. amount: ");
scanf("%f",&amount[4]);
if (number1 >= 0 && amount[0] >= 0 && amount[1] >= 0 && amount[2] >= 0 && amount[3] >= 0 && amount[4] >= 0)
{
num1 = number1;
num2[0] = amount[0];
num2[1] = amount[1];
num2[2] = amount[2];
num2[3] = amount[3];
num2[4] = amount[4];
}
else
{
printf("\n\aNumber must be positive!");
}
}while(number1 <0 && amount[0] <0 && amount[1] <0 && amount[2] <0 && amount[3] <0 && amount[4] <0);
numCalculator(num1, num2, num3);
for (j = 0; j<5; j++)
{
printf ("Converted values are:[%d]=%f\n",j,num2[j]);
}
return 0;
}
void numCalculator (float num1, float num2[5], int num3)
{
int i;
for (i = 0; i < num3; i++)
{
num2[i] *= num1;
}
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise20.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include "string.h"
#include <stdlib.h>
#include <time.h>
struct Months {
char month[22];
int monthId;
};
void whichMonth(struct Months);
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
struct Months num = {"",0};
struct Months num1 = {"",0};
printf ("\nEnter information about first month of year: ");
do{
printf ("\nEnter month number: ");
scanf("%d",&num.monthId);
if (num.monthId > 0 && num.monthId < 13){
}
else {
printf("\nMonth number must be in range 1-12!");
num.monthId=0;
}
}while(num.monthId <=0 || num.monthId >12);
printf ("\nEnter name of the month number %d: ",num.monthId);
scanf("%s",num.month);
printf ("\nEnter information about last month of year: ");
do{
printf ("\nEnter month number: ");
scanf("%d",&num1.monthId);
if (num1.monthId > 0 && num1.monthId < 13){
}
else{
printf("\nMonth number must be in range 1-12!");
num1.monthId=0;
}
}while(num1.monthId <=0 || num1.monthId >12);
printf ("\nEnter name of the month number %d: ",num1.monthId);
scanf("%s",num1.month);
printf("\nYou entered the following months: \n");
whichMonth(num);
whichMonth(num1);
return 0;
}
void whichMonth(struct Months m){
printf("\n%d . %s",m.monthId,m.month);
printf("\n");
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise19.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include "string.h"
#include <stdlib.h>
#include <time.h>
void askingQuestions(char *question,char *answer,int maxLength);
#define STR_SIZE 301
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
char question1[STR_SIZE]="Enter your name: ";
char question2[STR_SIZE]="Enter your address: ";
char question3[STR_SIZE]="Enter postal code: ";
char theAnswer[STR_SIZE]="";
char question[STR_SIZE]="";
char answer[STR_SIZE]="";
int maxLength=STR_SIZE;
strcpy(question,question1);
askingQuestions(question,answer,maxLength);
strcpy (theAnswer,answer);
strcpy(question,question2);
askingQuestions(question,answer,maxLength);
strcat (theAnswer,answer);
strcpy(question,question3);
askingQuestions(question,answer,maxLength);
strcat (theAnswer,answer);
printf("\nYour address is: \n%s",theAnswer);
return 0;
}
void askingQuestions (char *question, char *answer,int maxLength)
{
int length = strlen(question);
int length2 = strlen(answer);
if (length <= STR_SIZE-1 && length2 <= STR_SIZE-1){
printf("\n%s ",question);
if (answer[strlen(answer)-1]=='\n'){
answer[strlen(answer)-1]='\0';
}
fgets(answer,maxLength,stdin);
}
else
{
printf("Error %d > %d, or %d > %d\n",length,STR_SIZE,length2,STR_SIZE);
}
//printf("Length = %d\n",strlen(&answer));
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise16.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include <stdlib.h>
#include <time.h>
float numCalculator (float *num1, float *num2);
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
float number1 = 0;
float number2 = 0;
float *num1 = 0;
float *num2 = 0;
float averageNum = 0;
do{
printf("\nEnter 1. number: ");
scanf("%f",&number1);
if (number1 >= 0)
{
num1 = &number1;
}
else
{
printf("\n\aNumber must be positive!");
}
}while(number1 <0);
do{
printf("\nEnter 2. number: ");
scanf("%f",&number2);
if (number2 >= 0)
{
num2 = &number2;
}
else
{
printf("\n\aNumber must be positive!");
}
}while(number2 <0);
averageNum = numCalculator(num1,num2);
printf("Average value is: %f\n",averageNum);
printf("deviation 1: %f\n", 0-*num2);
printf("deviation 2: %f\n", *num2);
return 0;
}
float numCalculator (float *num1, float *num2)
{
float average = 0;
average = (*num1 + *num2) / 2;
*num1 = average;
*num2 -= *num1;
return average;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise14.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
int numSolver (int num1, int num2);
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
int num1 = 10;
int num2 = 20;
int number=numSolver (num1,num2);
num1 = 0;
num2 = 5;
int multiplyer=numSolver (num1,num2);
printf("%d multiplied by %d is: \n",number,multiplyer);
int numbersEqual = number*multiplyer;
printf("%d\n",numbersEqual);
return 0;
}
int numSolver (int num1, int num2)
{
int result = 0;
int inputNum1,inputNum2 = 0;
do{
printf("Enter a number [%d-%d]: \n",num1,num2);
scanf("%d",&inputNum1);
if (inputNum1 >= num1 && inputNum2 <= num2)
{
result = inputNum1;
}
else
{
printf("Invalid value! number must be between %d and %d.\n",num1,num2);
}
}while (result == 0);
return result;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/ZumoCalibration.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include <stdlib.h>
#include <time.h>
float calibrateWhite(float white1, float white2);
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
float white1 = 3300;
float white2 = 8300;
float black = 23999;
float reading = 0;
reading = calibrateWhite(white1, white2);
printf("result: %f \n",reading);
return 0;
}
float calibrateWhite(float white1, float white2)
{
float result1 = 0;
do
{
result1 = white2 / white1;
}
while(white1 <= white2 && white2 >= white1);
return result1;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise21.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
#include "string.h"
#include <stdlib.h>
#include <time.h>
#define studentAmount 5
struct Students {
char firstN[22];
char LastN[22];
int courseCredit;
};
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
struct Students name1[studentAmount] = {"","",0};
int fillData;
for(fillData=0;fillData<studentAmount;fillData++){
printf("Enter first name of \n");
printf("Student %d: ",fillData+1);
scanf("%s",name1[fillData].firstN);
printf("Enter last name of \n");
printf("Student %d: ",fillData+1);
scanf("%s",name1[fillData].LastN);
printf("Enter number of credits of \n");
printf("Student %d: ",fillData+1);
scanf("%d",&name1[fillData].courseCredit);
}
for(fillData=0;fillData<studentAmount;fillData++){
printf("%-20s%-20s%10d\n",
name1[fillData].firstN,name1[fillData].LastN,name1[fillData].courseCredit);
}
return 0;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise2.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
float cur_salary=2117.12;
float cur_tax_percent=20;
float one_percent=100;
float cur_tax_val;
float cur_money;
float salary_rise=2000;
float new_salary;
float new_tax_percent;
float new_tax_val;
float after_tax;
//counting taxes and stuff
cur_tax_val=cur_salary/one_percent*cur_tax_percent;
cur_money=cur_salary-cur_tax_val;
new_salary=cur_salary+salary_rise;
new_tax_percent=cur_tax_percent*1.675;
new_tax_val=new_salary/one_percent*new_tax_percent;
after_tax=new_salary-new_tax_val;
printf("My salary is %.2f euros.\n",cur_salary);
printf("My tax percentage is %.2f percent.\n",cur_tax_percent);
printf("I have to pay %.2f euros tax.\n",cur_tax_val);
printf("I have %.2f euros to spend or save.\n",cur_money);
printf("My boss raises my salary by %.2f euros.\n",salary_rise);
printf("My new salary is %.2f euros.\n",new_salary);
printf("My new Tax percent is %.2f. \n",new_tax_percent);
printf("After taxes I have %.2f euros.\n",after_tax);
return 0;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise10.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
int selection;
int result;
int op1;
int op2;
do
{
selection = SelectionMenu();
switch(selection)
{
case 1:
printf("\nEnter operand 1: ");
scanf("%d",&op1);
printf("\nEnter operand 2: ");
scanf("%d",&op2);
break;
case 2:
result=op1*op2;
printf("result = %d\n",result);
break;
case 3:
result=op1+op2;
printf("result = %d\n",result);
break;
case 4:
break;
}
}while(selection != 4);
return 0;
}
int SelectionMenu(void)
{
int selection;
printf("Select operation: \n");
printf("1)enter operands\n");
printf("2)multiply operands\n");
printf("3)add operants\n");
printf("4)quit\n");
scanf("%d",&selection);
return selection;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
<file_sep>/Exercise6.cydsn/main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
#include "stdio.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_1_Start();
int sleepTimeHours = 0;
int sleepTimeMinutes = 0;
int curHours = 0;
int curMinutes = 0;
int hoursPerDayMin=0;
int hoursPerDayMax=24;
int minutesPerHourMin=0;
int minutesPerHourMax=60;
int hoursToWakeUp = 0;
int minutesToWakeUp = 0;
int difHours = 0;
int difMins= 0;
printf("\nEnter current time (hh:mm): ");
scanf("%d:%d",&curHours,&curMinutes);
printf("How long do you want to sleep (h:mm): \n");
scanf("%d:%d",&sleepTimeHours,&sleepTimeMinutes);
//adds hours and minutes to curtime and stores it in new variable
difHours=curHours+sleepTimeHours;
difMins=curMinutes+sleepTimeMinutes;
//checks if difhours is bigger than max hours per day and minutes per hour.
if(difHours<hoursPerDayMax&&difMins<minutesPerHourMax)
{
hoursToWakeUp=difHours;
minutesToWakeUp=difMins;
}
else if (difHours>= hoursPerDayMax && difMins<minutesPerHourMax)
{
hoursToWakeUp = difHours&hoursPerDayMax;
minutesToWakeUp=difMins;
}
else if (difHours<hoursPerDayMax&&difMins>=minutesPerHourMax)
{
hoursToWakeUp = difHours;
minutesToWakeUp = difMins-minutesPerHourMax;
hoursToWakeUp += 1;
}
else if (difHours>=hoursPerDayMax&&difMins>=minutesPerHourMax)
{
hoursToWakeUp=difHours%hoursPerDayMax;
minutesToWakeUp=difMins-minutesPerHourMax;
hoursToWakeUp += 1;
}
printf("If you go to bed now you must wake up at %d:%d\n",hoursToWakeUp,minutesToWakeUp);
return 0;
}
int _write(int file, char *ptr, int len)
{
(void)file; /* Parameter is not used, suppress unused argument warning */
int n;
for(n = 0; n < len; n++) {
if(*ptr == '\n') UART_1_PutChar('\r');
UART_1_PutChar(*ptr++);
}
return len;
}
int _read (int file, char *ptr, int count)
{
int chs = 0;
char ch;
(void)file; /* Parameter is not used, suppress unused argument warning */
while(count > 0) {
ch = UART_1_GetChar();
if(ch != 0) {
UART_1_PutChar(ch);
chs++;
if(ch == '\r') {
ch = '\n';
UART_1_PutChar(ch);
}
*ptr++ = ch;
count--;
if(ch == '\n') break;
}
}
return chs;
}
/* [] END OF FILE */
|
4f400a5cc5b11d14eba3236d88a08f44f23b786e
|
[
"C"
] | 10
|
C
|
VelluVu/C-exercises
|
2811641c4302f0b3d350d396b85ce255c8a5f08e
|
6b5ee5357a5cd326f7c59d1d49730f197c7bcbc9
|
refs/heads/master
|
<repo_name>rashoodkhan/tomboy.ios<file_sep>/tomboy.ios/Screens/NoteTakingScreen.cs
//
// NoteTakingScreen.cs
//
// Author:
// <NAME> <<EMAIL>>
//
// Copyright (c) 2014 <NAME>
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace tomboy.ios
{
public partial class NoteTakingScreen : UIViewController
{
public NoteTakingScreen () : base ("NoteTakingScreen", null)
{
}
public override void DidReceiveMemoryWarning ()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
BackButton.Clicked += (sender, e) => {
this.NavigationController.PopToRootViewController (true);
};
View.AddGestureRecognizer (new UISwipeGestureRecognizer(sw => {
this.NavigationController.PopToRootViewController (true);
}));
Editing = true;
TextEditor.LoadHtmlString ("<html id=\"content\" contenteditable=\"true\" style=\"font-family: Helvetica\">\n\n <body>\n\n <div>Enter Note Content here..</div>\n\n </body>\n\n</html>", null);
}
}
}
<file_sep>/README.md
Tomboy.iOS
===========
Tomboy.iOS is the implementation of Tomboy Notes on iOS devices. Tomboy.iOS is built using the Tomboy.library, which also acts as the backend for many sister projects (Tomboy.OSX).
Tomboy is a desktop note-taking application for Linux, Unix and Mac. Its very simple and easy to use, with the potential to help you organize ideas and information you deal with every day.
Have you ever felt the frustation at not being able to locate a website you wanted to check out, or find an email you found interesting or remember an idea about the direction of the political landscape in post-industrial Australia? Or are you one of the those desperate souls with home-made, buggy, or not-quite-perfect notes systems?
Time for Tomboy. We bet you'll be surprised at how well a little application can make life less cluttered and run more smoothly.
Contact Tomboy
===============
Mailing List : <EMAIL>
Bugzilla : http://bugzilla.gnome.org/enter_bug.cgi?product=Tomboy
Tomboy-library : https://github.com/tomboy-notes/tomboy-library
<file_sep>/tomboy.ios/AppDelegate.cs
//
// AppDelegate.cs
//
// Author:
// <NAME> <<EMAIL>>
//
// Copyright (c) 2014 <NAME>
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Tomboy;
namespace tomboy.ios
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
UIWindow window;
// UI Navigation Controller
UINavigationController rootNavigationController;
//Main Notes Screen Controller
MainNotesScreen mainScreen;
NoteTakingScreen noteScreen;
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
rootNavigationController = new UINavigationController ();
// If you have defined a root view controller, set it here:
// window.RootViewController = myViewController;
if (mainScreen == null)
mainScreen = new MainNotesScreen ();
//window.RootViewController = mainScreen;
noteScreen = new NoteTakingScreen ();
rootNavigationController.PushViewController (mainScreen, false);
window.RootViewController = rootNavigationController;
// make the window visible
window.MakeKeyAndVisible ();
return true;
}
}
}
|
146ccbe6aed608fb84e31ee0a32ad77f575477ab
|
[
"Markdown",
"C#"
] | 3
|
C#
|
rashoodkhan/tomboy.ios
|
a532f080a310043c054a16beb7fbb9d718ec7999
|
4c1ed1de3133af0be34fa2e050f778e0e63cfc3f
|
refs/heads/master
|
<repo_name>bipinkc19/cloth-recommender-from-image<file_sep>/test.py
from tf_records import DataLoad
import tensorflow as tf
from sklearn.metrics import confusion_matrix
import seaborn as sns
from sklearn.metrics import classification_report
import numpy as np
import matplotlib.pyplot as plt
def classification_metrics(actual, pred, msg):
cm = confusion_matrix(actual, pred)
plt.figure()
ax= plt.subplot()
sns.heatmap(cm, annot = True, fmt = 'g')
# labels, title and ticks
ax.set_xlabel('Predicted labels')
ax.set_ylabel('True labels')
ax.set_title('Confusion Matrix')
ax.xaxis.set_ticklabels(['0', '1', '2', '3', '4', '5', '6'])
ax.yaxis.set_ticklabels(['0', '1', '2', '3', '4', '5', '6'])
plt.show()
print(classification_report(actual, pred))
def array_argmax(value):
args = []
for i in range(len(value)):
index_max = np.argmax(value[i])
args.append(index_max)
return args
dataset_test = DataLoad('./tfrecord_files/data_test.tfrecords', 1, 1, 32).return_dataset()
iterator_test = dataset_test.make_one_shot_iterator()
test = iterator_test.get_next()
i = 0
with tf.Session() as sess:
import_path = "./savedmodel/augmented_batch_64_lr_1e_resnetv2_100/epoch_21_6360"
signature_key = tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
input_key = 'x_input'
output_key = 'y_output'
meta_graph_def = tf.saved_model.loader.load(
sess,
[tf.saved_model.tag_constants.SERVING],
import_path)
signature = meta_graph_def.signature_def
x_tensor_name = signature[signature_key].inputs[input_key].name
y_tensor_name = signature[signature_key].outputs[output_key].name
x = sess.graph.get_tensor_by_name(x_tensor_name)
y = sess.graph.get_tensor_by_name(y_tensor_name)
while(True):
try:
value_ = sess.run(test)
predicted_ = sess.run(y, {x: value_[0]})
actual_ = value_[1]
if i == 0:
actual = actual_
predicted = predicted_
else:
actual = np.concatenate((actual, actual_))
predicted = np.concatenate((predicted, predicted_))
i = 1
except tf.errors.OutOfRangeError:
break
classification_metrics(array_argmax(actual), array_argmax(predicted), msg = '')<file_sep>/train.py
from tf_records import DataLoad
import tensorflow as tf
from tensorflow import keras
from datetime import datetime
SUM_OF_ALL_DATASAMPLES = 941489 # Number of augmented images
BATCHSIZE = 512
EPOCHS = 2
STEPS_PER_EPOCH = SUM_OF_ALL_DATASAMPLES / BATCHSIZE
METHOD = 'try'
# Loggers
logdir = "./tensorboard_logs/" + METHOD + "/" + datetime.now().strftime("%Y-%m-%d//%H-%M-%S")
# tensorboard_callback = keras.callbacks.TensorBoard(log_dir=logdir)
# Get your datatensors
image, label = DataLoad('../drive/My Drive/data_test.tfrecords', 512, EPOCHS, BATCHSIZE).return_dataset()
val_image, val_label = DataLoad('../drive/My Drive/data_test.tfrecords', 1, 1, 40000).return_dataset()
# Combine it with keras
model_input = keras.layers.Input(tensor=image)
inception = keras.applications.inception_v3.InceptionV3(include_top=False, weights='imagenet')
inception.trainable = False
average_pooling = keras.layers.GlobalAveragePooling2D()
model_output = keras.layers.Dense(46, activation='relu')
train_model = model = keras.Sequential([
model_input,
inception,
average_pooling,
model_output
])
# train_model = keras.models.load_model('../drive/My Drive/model_cloth.hd5')
print(train_model.summary())
# Compile your model
train_model.compile(optimizer=keras.optimizers.RMSprop(lr=0.0005),
loss='mean_squared_error',
metrics=[keras.metrics.categorical_accuracy],
target_tensors=[label])
# earlyStopping = keras.callbacks.EarlyStopping(monitor='val_loss', patience=12, verbose=0, mode='min')
# mcp_save = keras.callbacks.ModelCheckpoint('../drive/My Drive/model_cloth.hd5', save_best_only=True, monitor='val_loss', mode='min')
# reduce_lr_loss = keras.callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.15, patience=7, verbose=1, min_delta=1e-4, mode='min')
save_model_each_epoch = keras.callbacks.ModelCheckpoint('../drive/My Drive/model{epoch:08d}.h5', period=0)
print('*'*20)
# print(tensorboard_callback, earlyStopping, mcp_save, reduce_lr_loss)
# Train the model
train_model.fit(epochs=EPOCHS,
steps_per_epoch=STEPS_PER_EPOCH,
validation_data=[val_image, val_label],
validation_steps=1)
train_model.save('../drive/My Drive/final.hdf5')
<file_sep>/create_dataset.py
import pandas as pd
from tf_records import TfRecord
from augment_image import augment_images
def main():
# Read the metadata for images and their corresponding labels.
dataset_train = pd.read_csv("./augmented_image/meta_augmented.csv")
dataset_val = pd.read_csv("./test/val.csv")
dataset_test = pd.read_csv("./test/test.csv")
# Path to store the tfrecord file
out_path_train = "./tfrecord_files/data_train.tfrecords"
out_path_val = "./tfrecord_files/data_val.tfrecords"
out_path_test = "./tfrecord_files/data_test.tfrecords"
# Object of the dataset.
dataset_train = TfRecord(dataset_train['image_id'], pd.get_dummies(dataset_train['labels'], prefix='class').values, out_path_train)
dataset_val = TfRecord(dataset_val['images'], pd.get_dummies(dataset_test['label'], prefix='class').values, out_path_test)
dataset_test = TfRecord(dataset_test['images'], pd.get_dummies(dataset_test['label'], prefix='class').values, out_path_test)
# Converts and stores to the out_path.
dataset_train.convert_to_tfrecord()
dataset_val.convert_to_tfrecord()
dataset_test.convert_to_tfrecord()
if __name__ == "__main__":
main()
<file_sep>/tf_records.py
import time
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import cv2
class TfRecord:
def __init__(self, image_paths, labels, out_path):
self.image_paths = image_paths
self.labels = labels
self.out_path = out_path
def wrap_int(self, value):
''' Wrap the variable in Tensorflow Feature. '''
return(tf.train.Feature(int64_list=tf.train.Int64List(value=value)))
def wrap_bytes(self, value):
''' Wrap the variable in Tensorflow Feature. '''
return(tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])))
def convert_to_tfrecord(self):
''' Convert the images and labels to tfrecord format. '''
print("Converting: " + self.out_path)
# Number of images. Used when printing the progress.
num_images = len(self.image_paths)
start = time.time()
with tf.python_io.TFRecordWriter(self.out_path) as writer:
for i, (image, label) in enumerate(zip(self.image_paths, self.labels)):
if i % 100 == 0:
print("progress ", round(i/num_images * 100, 3), '%', round((time.time() - start)/60, 2), ' minutes')
# img = plt.imread(image)
# # Resize and scale.
# img = cv2.resize(img, (299, 299))
# # Convert to binary.
# img_bytes = img.tostring()
# Just using the raw encoded images to stroe in tfrecords as the decoded byte version is too large
# img_bytes = open(image, mode='rb').read()
im = cv2.imread(image)
im_resize = cv2.resize(im, (299, 299))
# Rescaling the images
im_resize = im_resize / 255
is_success, im_buf_arr = cv2.imencode(".jpg", im_resize)
byte_im = im_buf_arr.tobytes()
# Create a dictionary to store in tfRecord also wrap in Tensorflow Features.
data = {
'image': self.wrap_bytes(byte_im),
'label': self.wrap_int(label)
}
# Wrap the data as TensorFlow Features.
feature = tf.train.Features(feature=data)
# Wrap again as a TensorFlow Example.
example = tf.train.Example(features=feature)
# Serialize the data.
serialized = example.SerializeToString()
# Write the serialized data to the TFRecords file.
writer.write(serialized)
class DataLoad:
def __init__(self, file_path, buffer, epochs, batch_size):
self.buffer = buffer
self.file_path = file_path
self.epochs = epochs
self.batch_size = batch_size
def parse(self, serialized):
''' Decode the binary file tf.record to dictionary. '''
# The dictionary to be stored on.
features = {
'image': tf.FixedLenFeature([], tf.string),
# 46 is the length of array for label.
'label': tf.FixedLenFeature([46], tf.int64)
}
# Converting to example.
parsed_example = tf.parse_single_example(serialized=serialized,
features=features)
# Decosing the string to unit8.
image_raw = parsed_example['image']
# image = tf.decode_raw(image_raw, tf.uint8)
image = tf.image.decode_jpeg(image_raw)
# Replacing parsed_example dicitonary with float32 value if the image.
parsed_example['image'] = tf.cast(image, tf.float32)
return parsed_example['image'], parsed_example['label']
def return_dataset(self):
''' Return the dataset so that we can iterate in it and train model. '''
dataset = tf.data.TFRecordDataset(self.file_path, num_parallel_reads=16)
dataset = dataset.apply(
tf.contrib.data.shuffle_and_repeat(self.buffer, self.epochs)
)
dataset = dataset.apply(
tf.contrib.data.map_and_batch(self.parse, self.batch_size)
)
# Prefetch is still not available
dataset = dataset.apply(
tf.contrib.data.prefetch_to_device("/gpu:0")
)
# Create an iterator
iterator = dataset.make_one_shot_iterator()
# Create your tf representation of the iterator
image, label = iterator.get_next()
# Bring your picture back in shape
image = tf.reshape(image, [-1, 299, 299, 3])
return image, label
<file_sep>/augment_image.py
import re
import cv2
import time
import random
import numpy as np
import pandas as pd
import skimage as sk
from skimage import util
from scipy import ndarray
from skimage import transform
import matplotlib.pyplot as plt
import matplotlib.image as imgsave
def random_rotation(image_array):
''' Randomly rotates image between -45 and +45 degrees. '''
random_degree = random.uniform(-45, 45)
return sk.transform.rotate(image_array, random_degree)
def random_noise(image_array):
''' Adds random noise to the image. '''
return sk.util.random_noise(image_array)
def horizontal_flip(image_array):
''' Returns horizontally flipped image. '''
return image_array[:, ::-1]
def vertical_flip(image_array):
''' Retuns vertically flipped image. '''
return image_array[::-1, :]
def flip(image_array):
''' Selects randomly to do vertical or horizontal flip. '''
choice = random.choice([horizontal_flip, vertical_flip])
return(choice(image_array))
def change_brightness(image_array):
''' Randomly decreases or increases the brightness of an image. '''
value = random.randint(-30, 30)
value = np.uint8(value)
hsv = cv2.cvtColor(image_array, cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsv)
if value >= 0:
lim = 255 - value
v[v > lim] = 255
v[v <= lim] += value
if value < 0:
v[v > value] -= value
v[v <= value] += 0
final_hsv = cv2.merge((h, s, v))
img = cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR)
return img
available_transformations = {
'rotate': random_rotation,
'noise': random_noise,
'flip': flip,
'change_brightness': change_brightness
}
def augment_images(image_paths, labels):
''' Augments the images and returns the augmented images path and label. '''
all_paths = []
all_labels = []
progress = 0
total = len(labels)
i = 0
start = time.time()
for image_path, label in zip(image_paths, labels):
if progress % 100 == 0:
print('Progress', round(progress / total * 100, 3), ' Time ', round((time.time() - start)/60, 2), ' minutes')
progress += 1
# Reading the image.
image_to_transform = plt.imread(image_path)
# Randomly selecting how many transformations to occur for each image.
num_transformations_to_apply = random.randint(1, len(available_transformations))
num_of_transformations_occured = 0
# Saving original copy of image one time in seperate folder.
imgsave.imsave('./augmented_image/' + str(i) + '.jpg', image_to_transform)
all_paths.append('./augmented_image/' + str(i) + '.jpg')
all_labels.append(label)
while (num_of_transformations_occured <= num_transformations_to_apply):
# Randomly selecting which transformation to do.
key = random.choice(list(available_transformations))
transformed_image = available_transformations[key](image_to_transform)
# Saving the transformed image, path and label.
imgsave.imsave('./augmented_image/' + str(i) + '_' + str(num_of_transformations_occured) +'.jpg', transformed_image)
all_paths.append('./augmented_image/' + str(i) + '_' + str(num_of_transformations_occured) +'.jpg')
all_labels.append(label)
num_of_transformations_occured += 1
i += 1
# Creating a metadata for augmented images for backup.
to_write = pd.DataFrame()
to_write['image_id'] = all_paths
to_write['labels'] = all_labels
to_write.to_csv('./augmented_image/meta_augmented.csv')
def main():
images = []
labels = []
with open('./data/Anno/list_category_img.txt', 'r') as f:
for i, line in enumerate(f):
if i == 0:
continue
file = re.sub('\s+', ' ', line).strip().split()
images.append('./data/' + file[0])
labels.append(file[1])
all_data = pd.DataFrame()
all_data['images'] = images
all_data['labels'] = labels
images = []
labels = []
with open('./data/Eval/list_eval_partition.txt', 'r') as f:
for i, line in enumerate(f):
if i == 0:
continue
file = re.sub('\s+', ' ', line).strip().split()
images.append('./data/' + file[0])
labels.append(file[1])
train_test_split = pd.DataFrame()
train_test_split['images'] = images
train_test_split['labels'] = labels
dataset = train_test_split.merge(all_data, on='images').rename(columns={'labels_x': 'train_test', 'labels_y': 'label'})
test_data = dataset[dataset['train_test']=='test']
test_data.to_csv('./test/test.csv')
val_data = dataset[dataset['train_test']=='val']
val_data.to_csv('./test/val.csv')
train_data = dataset[dataset['train_test']=='train']
augment_images(train_data['images'].values, train_data['label'].values)
if __name__ == "__main__":
main()
<file_sep>/requirements.txt
tensorflow==1.14.0
scikit-learn==0.20.2
seaborn==0.9.0
matplotlib==3.0.2
pandas==0.24.1
numpy==1.15.4
tensorboard==1.14.0
opencv==3.3.1
scipy==1.2.1
scikit-image==0.14.1
<file_sep>/README.md
# Cloth Recommendation System
Convolutional Neural Network for recommending cloths
### Creating a custom model to train still remaining due to lack of resources for now
## Output from a VGG19 (pre-trained)
### Input image
 <br>
### Returned similar images
 <br>
 <br>
 <br>
### Input image
 <br>
### Returned similar images
 <br>
 <br>
 <br>
### Input image
 <br>
### Returned similar images
 <br>
 <br>
 <br>
## Install the dependencies.
```bash
$ pip install -r requirements.txt
```
## Augment images
```bash
$ python augment_images.py
```
## To train the model.
```bash
$ python train.py
```
## For tensorboard vizualization while training.
```bash
$ tensorboard --logdir=tensorboard_logs --host=localhost --port=8088
```
## Note:
Different model require different size if images. This can be edited in the `tf_records.py` in resize opereation.
|
064f45c5b848b9ddeb5c59c7199912b94a01cb96
|
[
"Markdown",
"Python",
"Text"
] | 7
|
Python
|
bipinkc19/cloth-recommender-from-image
|
7faff966c83395a8a7d27b53af1d4dbaea075c3c
|
81504577b6fb2982c3cfd3da31cbce83a7f17995
|
refs/heads/master
|
<repo_name>VanniaJimenez/38dombicislocas<file_sep>/js/main.js
function validateForm(){
var nombreApellido = /[A-Z]/;
var numeros = /[0-9]/;
var especiales = /[!@#$%^&"´*]/;
var formatoMail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([AZ-az])$/;
nombre = document.getElementById("name").value;
apellido = document.getElementById("lastname").value;
i_mail = document.getElementById("input-email").value;
i_password = document.getElementById("input-password").value;
//Todos los campos son obligatorios, excepto los dos últimos.
if( nombre == "" ){
alert("Nombre es obligatorio");
}
if( apellido == "" ){
alert("Apellido es obligatorio");
}
if( i_mail == "" ){
alert("Correo electrónico es obligatorio");
}
if( i_password == "" ){
alert("Password es obligatorio");
}
//Los campos nombre y apellido sólo deben permitir caracteres de la A-Z
if(nombre.match(especiales) || nombre.match(numeros))
{
alert('Nombre sólo permite caracteres de la A-Z');
}
if(apellido.match(especiales) || apellido.match(numeros))
{
alert('Apellido sólo permite caracteres de la A-Z');
}
//Para los campos nombre y apellido la primera letra debe ser mayúscula
if (nombre.substring(0,1).match(nombreApellido)) { }
else
{
alert('Primera letra del nombre debe ser mayúscula...!')
}
if (apellido.substring(0,1).match(nombreApellido)) { }
else
{
alert('Primera letra del apellido debe ser mayúscula...!')
}
//Validar que el campo email tenga un formato válido
if (formatoMail.test(i_mail) === false)
{
alert('Formato de email no válido : <EMAIL>');
}
//El campo password debe tener al menos 6 caracteres
if(i_password.length<6){
alert('Password debe tener al menos 6 caracteres');
}
//El campo password no puede ser igual a "<PASSWORD>" ó "<PASSWORD>" ó "<PASSWORD>
if (i_password === "<PASSWORD>" || i_password === "<PASSWORD>" || i_password === "<PASSWORD>")
{
alert('Password debe ser distinto a "<PASSWORD>" ó "<PASSWORD>" ó "<PASSWORD>"');
}
}
|
ff240ab3dab8a780b63045b6e6858d14eb948ac3
|
[
"JavaScript"
] | 1
|
JavaScript
|
VanniaJimenez/38dombicislocas
|
1b3755f09f1f76ba6b6747f4953b14b3baef941d
|
f118e0d26ff484aa4af205bd20a2c7394e3ea876
|
refs/heads/master
|
<file_sep>var calcolaCodiceFiscale = function(){
setTimeout(function(){
$(this).closest('form').data('changed', true);
var name = $('#name').val();
var surname = $('#surname').val();
var sex = $('input[name=sex]:checked').val();
var birthDate = $('#birthDate').val();
var nazioneNascita = $('#nazioneNascita option:selected').text();
var comuneNascita = $('#comuneNascita option:selected').text();
var provinciaNascita = $('#provinciaNascita option:selected').val();
if(name != undefined && surname != undefined && sex != undefined && birthDate != undefined && nazioneNascita != undefined && comuneNascita != undefined && provinciaNascita != undefined){
if(name != "" && surname != "" && sex != "" && birthDate != "" && nazioneNascita != "" && comuneNascita != "" && provinciaNascita != ""){
var codiceFiscaleCalcolato = calcolaCodiceFiscale(name, surname, sex, birthDate, nazioneNascita, comuneNascita, provinciaNascita);
$('#codiceFiscale').val(codiceFiscaleCalcolato);
}
}
}, 200)
}
$(document).on('change', 'form :input', function(){
calculateCF();
});
var calculateCF = function(name, surname, sex, birthDate, nazione, comune, provincia){
var nazioneCampo = nazione;
var comuneCampo = comune + "(" + provincia + ")";
var array = birthDate.split("/").map(Number);
var day = array[0];
var month = array[1];
var year = array[2]
var cf;
if(nazioneCampo === 'Italia')
cf = FiscalCode.calculateFiscalCode(name, surname, sex, day, month, year, comuneCampo);
else{
var nazioneCampoStringa = nazioneCampo.toString();
nazioneCampoStringa = nazioneCampoStringa+ " (EE)";
cf = FiscalCode.calculateFiscalCode(name, surname, sex, day, month, year, nazioneCampoStringa);
}
return cf;
}
<file_sep>const express = require('express');
const http = require('http');
const bodyParser = require('body-parser');
const webapp = express();
const port = process.env.port || 3000;
const consoleReader = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
consoleReader.question(`Server start at port ${port}`, () => {
webapp.listen(port, () => {
console.log(`Server is listening at http://locahost:${port}`);
});
});
webapp.use(bodyParser.json());
webapp.use(bodyParser.urlencoded({extended: true}));
webapp.set('views', __dirname + '/views');
webapp.set('view engine', 'jade');
webapp.get('/greetings/:name', (request, response) => {
const username = request.params.name;
response.render('index', {
title: 'This is a Node.js begin course',
message: `Hello ${username}, I'm your first application`
});
});
webapp.post('/new-user', (request, response) => {
console.log('This is the body', request.body);
const name = request.body.firstName;
const surname = request.body.secondName;
const email = request.body.email;
const password = <PASSWORD>;
const message = {
title: 'The user has been created!',
text: 'User created',
firstName: name,
lastName: surname,
email: email,
password: <PASSWORD>
};
response.render('user-confirm', message);
});<file_sep>var FiscalCode={};
FiscalCode.monthsTable=['A','B','C','D','E','H','L','M','P','R','S','T'];
FiscalCode.tavolaOmocodie=['L','M','N','P','Q','R','S','T','U','V'];
FiscalCode.tavolaCarattereDiControlloValoreCaratteriDispari = {
0:1, 1:0, 2:5, 3:7, 4:9, 5:13, 6:15, 7:17, 8:19,
9:21, A:1, B:0, C:5, D:7, E:9, F:13, G:15, H:17,
I:19, J:21, K:2, L:4, M:18, N:20, O:11, P:3, Q:6,
R:8, S:12, T:14, U:16, V:10, W:22, X:25, Y:24, Z:23
};
FiscalCode.tavolaCaratteriDiControlloValoreCaratteriPari = {
0:0, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8,
9:9, A:0, B:1, C:2, D:3, E:4, F:5, G:6, H:7,
I:8, J:9, K:10, L:11, M:12, N:13, O:14, P:15, Q:16,
R:17, S:18, T:19, U:20, V:21, W:22, X:23, Y:24, Z:25
};
FiscalCode.tavolaCarattereDiControllo = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
FiscalCode.calculateControlChar = function(fiscalCode){
var i , value = 0;
for(i = 0; i < 15; i++){
var code = fiscalCode[i];
if(i % 2)
value += this.tavolaCaratteriDiControlloValoreCaratteriPari[code];
else
value += this.tavolaCarattereDiControlloValoreCaratteriDispari[code]
}
value = value%26;
return this.tavolaCarattereDiControllo.charAt(value)
};
FiscalCode.affronta_omocodia = function(fiscalCode, numero_omocodia)
{
// non funziona
var cifre_disponibili=[14,13,12,10,9,7,6];
var cifre_da_cambiare=[];
while(numero_omocodia>0 && cifre_disponibili.length){
var i=numero_omocodia%cifre_disponibili.length;
numero_omocodia=Math.floor(numero_omocodia/cifre_disponibili.length);
cifre_da_cambiare.push(cifre_disponibili.splice(i-1,1)[0])
}
};
FiscalCode.ottieni_consonanti = function(str) {
return str.replace(/[^BCDFGHJKLMNPQRSTVWXYZ]/gi,'')
};
FiscalCode.ottieni_vocali=function(str) {
return str.replace(/[^AEIOU]/gi,'')
};
FiscalCode.calcola_codice_cognome = function(surname) {
var surnameCode = this.ottieni_consonanti(surname);
surnameCode += this.ottieni_vocali(surname);
surnameCode += 'XXX';
surnameCode = surnameCode.substr(0,3);
return surnameCode.toUpperCase()
};
FiscalCode.calculateNameCode = function(name) {
var nameCode = this.ottieni_consonanti(name);
if(nameCode.length >= 4){
nameCode = nameCode.charAt(0)+ nameCode.charAt(2)+ nameCode.charAt(3)
}
else{
nameCode += this.ottieni_vocali(name);
nameCode += 'XXX';
nameCode = nameCode.substr(0,3)
}
return nameCode.toUpperCase()
};
FiscalCode.calcola_codice_data=function(day, month, aa, sesso) {
var d=new Date();
d.setYear(aa);
d.setMonth(month-1);
d.setDate(day);
var anno="0"+d.getFullYear();
anno=anno.substr(anno.length-2,2);
var mese=this.monthsTable[d.getMonth()];
var giorno=d.getDate();
if(sesso =='F') giorno+=40;
giorno="0"+giorno;
giorno=giorno.substr(giorno.length-2,2);
return ""+anno+mese+giorno
};
FiscalCode.findComune = function(patternComune)
{
var stringaComune = ""+patternComune;
var stringa = stringaComune.toUpperCase();
var codice,comune,ret=[];
// var quoted=pattern_comune.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
// var re=new RegExp(quoted,'i');
// var str = re.toString();
for(codice in this.catastalCodes) {
comune=this.catastalCodes[codice]
if(comune == stringa) {
ret.push([comune,codice])
}
}
return ret
};
FiscalCode.calculateComuneCod = function(pattern_comune){
if(pattern_comune.match(/^[A-Z]\d\d\d$/i))
return pattern_comune;
return this.findComune(pattern_comune)[0][1];
};
FiscalCode.calculateFiscalCode =function(name, surname, sex, bornDay, bornMonth, bornYear, bornPlace){
var fiscalCode =
this.calcola_codice_cognome(surname) +
this.calculateNameCode(name) + this.calcola_codice_data(bornDay, bornMonth, bornYear, sex) +
this.calculateComuneCod(bornPlace);
fiscalCode += this.calculateControlChar(fiscalCode);
return fiscalCode
};
FiscalCode.catastalCodes = {
"E207":"GROTTAMMARE (AP)",
"E868":"MALTIGNANO (AP)",
"F044":"MASSIGNANO (AP)",
"F380":"MON<NAME> TRONTO (AP)",
"F415":"<NAME> (AP)",
"F487":"MONTEDINOVE (AP)",
"F501":"MONTEFIORE DELL'ASO (AP)",
"F516":"MONTEGALLO (AP)",
"F570":"MONTEMONACO (AP)",
"F591":"MONTEPRANDONE (AP)",
"G005":"OFFIDA (AP)",
"G289":"PALMIANO (AP)",
"H321":"RIPATRANSONE (AP)",
"H390":"ROCCAFLUVIONE (AP)",
"H588":"ROTELLA (AP)",
"H769":"SAN BENEDETTO DEL TRONTO (AP)",
"I912":"SPINETOLI (AP)",
"L728":"VENAROTTA (AP)",
"A233":"ALTIDONA (FM)",
"A252":"AMANDOLA (FM)",
"A760":"BELMONTE PICENO (FM)",
"B534":"CAMPOFILONE (FM)",
"D477":"FALERONE (FM)",
"D542":"FERMO (FM)",
"D760":"FRANCAVILLA D'ETE (FM)",
"E208":"GROTTAZZOLINA (FM)",
"E447":"LAPEDONA (FM)",
"E807":"MAGLIANO DI TENNA (FM)",
"F021":"MASSA FERMANA (FM)",
"F379":"MONSAMPIETRO MORICO (FM)",
"F428":"MONTAPPONE (FM)",
"F493":"MONTEFALCONE APPENNINO (FM)",
"F509":"MONTEFORTINO (FM)",
"F517":"MONTE GIBERTO (FM)",
"F520":"MONTEGIORGIO (FM)",
"F522":"MONTEGRANARO (FM)",
"F536":"MONTELEONE DI FERMO (FM)",
"F549":"MONTELPARO (FM)",
"F599":"MONTE RINALDO (FM)",
"F614":"MONTERUBBIANO (FM)",
"F626":"MONTE SAN PIETRANGELI (FM)",
"F653":"MONTE URANO (FM)",
"F664":"MONTE VIDON COMBATTE (FM)",
"F665":"MONTE VIDON CORRADO (FM)",
"F697":"MONTOTTONE (FM)",
"F722":"MORESCO (FM)",
"G137":"ORTEZZANO (FM)",
"G403":"PEDASO (FM)",
"G516":"PETRITOLI (FM)",
"G873":"PONZANO DI FERMO (FM)",
"G920":"PORTO SAN GIORGIO (FM)",
"G921":"PORTO SANT'ELPIDIO (FM)",
"H182":"RAPAGNANO (FM)",
"I315":"SANTA VITTORIA IN MATENANO (FM)",
"I324":"SANT'ELPIDIO A MARE (FM)",
"C070":"SERVIGLIANO (FM)",
"I774":"SMERILLO (FM)",
"L279":"TORRE SAN PATRIZIO (FM)",
"A040":"ACQUAPENDENTE (VT)",
"A412":"ARLENA DI CASTRO (VT)",
"A577":"BAGNOREGIO (VT)",
"A628":"B<NAME> (VT)",
"A704":"BASSANO ROMANO (VT)",
"A706":"BASSANO IN TEVERINA (VT)",
"A857":"BLERA (VT)",
"A949":"BOLSENA (VT)",
"A955":"BOMARZO (VT)",
"B388":"CALCATA (VT)",
"B597":"CANEPINA (VT)",
"B604":"CANINO (VT)",
"B663":"CAPODIMONTE (VT)",
"B688":"CAPRANICA (VT)",
"B691":"CAPRAROLA (VT)",
"B735":"CARBOGNANO (VT)",
"C269":"CAST<NAME>'ELIA (VT)",
"C315":"CASTIGLIONE IN TEVERINA (VT)",
"C446":"CELLENO (VT)",
"C447":"CELLERE (VT)",
"C765":"CI<NAME> (VT)",
"C780":"CIVITELLA D'AGLIANO (VT)",
"C988":"CORCHIANO (VT)",
"D452":"FABRICA DI ROMA (VT)",
"D475":"FALERIA (VT)",
"D503":"FARNESE (VT)",
"D870":"GALLESE (VT)",
"E126":"GRADOLI (VT)",
"E128":"GRAFFIGNANO (VT)",
"E210":"GROTTE DI CASTRO (VT)",
"E330":"ISCHIA DI CASTRO (VT)",
"E467":"LATERA (VT)",
"E713":"LUBRIANO (VT)",
"E978":"MARTA (VT)",
"F419":"MONTALTO DI CASTRO (VT)",
"F499":"MONTEFIASCONE (VT)",
"F603":"MONTE ROMANO (VT)",
"F606":"MONTEROSI (VT)",
"F868":"NEPI (VT)",
"G065":"ONANO (VT)",
"G111":"<NAME> (VT)",
"G135":"ORTE (VT)",
"G571":"PIANSANO (VT)",
"H071":"PROCENO (VT)",
"H534":"RONCIGLIONE (VT)",
"H913":"<NAME> IN TUSCIA (VT)",
"H969":"SAN <NAME> (VT)",
"I855":"SOR<NAME>EL CIMINO (VT)",
"L017":"SUTRI (VT)",
"D024":"TARQUINIA (VT)",
"L150":"TESSENNANO (VT)",
"L310":"TUSCANIA (VT)",
"L569":"VALENTANO (VT)",
"L612":"VALLERANO (VT)",
"A701":"VASANELLO (VT)",
"L713":"VEJANO (VT)",
"L814":"VETRALLA (VT)",
"L882":"VIGNANELLO (VT)",
"M082":"VITERBO (VT)",
"M086":"VITORCHIANO (VT)",
"A019":"ACCUMOLI (RI)",
"A258":"AMATRICE (RI)",
"A315":"ANTRODOCO (RI)",
"A464":"ASCREA (RI)",
"A765":"BELMONTE IN SABINA (RI)",
"A981":"BORBONA (RI)",
"B008":"BORGOROSE (RI)",
"A996":"BORGO VELINO (RI)",
"B627":"CANTALICE (RI)",
"B631":"CANTALUPO IN SABINA (RI)",
"B934":"CASAPROTA (RI)",
"A472":"CASPERIA (RI)",
"C098":"<NAME> (RI)",
"C224":"<NAME> (RI)",
"C268":"<NAME> (RI)",
"C746":"CITTADUCALE (RI)",
"C749":"CITTAREALE (RI)",
"C841":"<NAME> (RI)",
"C857":"<NAME> (RI)",
"C859":"COLLEGIOVE (RI)",
"C876":"COLLEVECCHIO (RI)",
"C880":"<NAME> (RI)",
"C946":"CONCERVIANO (RI)",
"C959":"CONFIGNI (RI)",
"C969":"CONTIGLIANO (RI)",
"D124":"COTTANELLO (RI)",
"D493":"FARA IN SABINA (RI)",
"D560":"FIAMIGNANO (RI)",
"D689":"FORANO (RI)",
"D785":"FRASSO SABINO (RI)",
"E160":"GRECCIO (RI)",
"E393":"LABRO (RI)",
"E535":"LEONESSA (RI)",
"E681":"LONGONE SABINO (RI)",
"E812":"MAG<NAME>INA (RI)",
"E927":"MARCETELLI (RI)",
"F193":"MICIGLIANO (RI)",
"F319":"MOMPEO (RI)",
"F430":"MONTASOLA (RI)",
"F446":"MONTEBUONO (RI)",
"F541":"MONTELEONE SABINO (RI)",
"F579":"MONTENERO SABINO (RI)",
"F619":"MONTE SAN GIOVANNI IN SABINA (RI)",
"F687":"MONTOPOLI DI SABINA (RI)",
"F746":"MORRO REATINO (RI)",
"F876":"NESPOLO (RI)",
"B595":"ORVINIO (RI)",
"G232":"PAGANICO SABINO (RI)",
"G498":"PESCOROCCHIANO (RI)",
"G513":"PETRELLA SALTO (RI)",
"G756":"POGGIO BUSTONE (RI)",
"G757":"POGGIO CATINO (RI)",
"G763":"POGGIO MIRTETO (RI)",
"G764":"POGGIO MOIANO (RI)",
"G765":"POGGIO NATIVO (RI)",
"G770":"POGGIO SAN LORENZO (RI)",
"G934":"POSTA (RI)",
"G951":"POZZAGLIA SABINA (RI)",
"H282":"RIETI (RI)",
"H354":"RIVODUTRI (RI)",
"H427":"ROCCANTICA (RI)",
"H446":"ROCCA SINIBALDA (RI)",
"H713":"SALISANO (RI)",
"I499":"SCANDRIGLIA (RI)",
"I581":"SELCI (RI)",
"I959":"STIMIGLIANO (RI)",
"L046":"TARANO (RI)",
"L189":"TOFFIA (RI)",
"L293":"TORRICELLA IN SABINA (RI)",
"L286":"TORRI IN SABINA (RI)",
"G507":"TURANIA (RI)",
"L525":"VACONE (RI)",
"L676":"VARCO SABINO (RI)",
"A062":"AFFILE (RM)",
"A084":"AGOSTA (RM)",
"A132":"ALBANO LAZIALE (RM)",
"A210":"ALLUMIERE (RM)",
"A297":"<NAME> (RM)",
"A309":"<NAME> (RM)",
"A323":"ANZIO (RM)",
"A370":"<NAME> (RM)",
"A401":"ARICCIA (RM)",
"A446":"ARSOLI (RM)",
"A449":"ARTENA (RM)",
"A749":"BELLEGRA (RM)",
"B114":"BRACCIANO (RM)",
"B472":"<NAME> (RM)",
"B496":"<NAME> ROMA (RM)",
"B576":"CAN<NAME> (RM)",
"B635":"CANTERANO (RM)",
"B649":"CAPENA (RM)",
"B687":"CAPRANICA PRENESTINA (RM)",
"B828":"<NAME> (RM)",
"B932":"CASAPE (RM)",
"C116":"<NAME> (RM)",
"C203":"<NAME> (RM)",
"C237":"CASTELNUOVO DI PORTO (RM)",
"C266":"<NAME> (RM)",
"C390":"CAVE (RM)",
"C518":"<NAME> (RM)",
"C543":"CERVARA DI ROMA (RM)",
"C552":"CERVETERI (RM)",
"C677":"CICILIANO (RM)",
"C702":"<NAME> (RM)",
"C773":"CIVITAVECCHIA (RM)",
"C784":"<NAME> (RM)",
"C858":"COLLEFERRO (RM)",
"C900":"COLONNA (RM)",
"D561":"FIANO ROMANO (RM)",
"D586":"FILACCIANO (RM)",
"D707":"FORMELLO (RM)",
"D773":"FRASCATI (RM)",
"D875":"GALLICANO NEL LAZIO (RM)",
"D945":"GAVIGNANO (RM)",
"D964":"GENAZZANO (RM)",
"D972":"GENZANO DI ROMA (RM)",
"D978":"GERANO (RM)",
"E091":"GORGA (RM)",
"E204":"GROTTAFERRATA (RM)",
"E263":"GUIDONIA MONTECELIO (RM)",
"E382":"JENNE (RM)",
"E392":"LABICO (RM)",
"C767":"LANUVIO (RM)",
"E576":"LICENZA (RM)",
"E813":"MAGLIANO ROMANO (RM)",
"B632":"MANDELA (RM)",
"E900":"MANZIANA (RM)",
"E908":"MARANO EQUO (RM)",
"E924":"MARCELLINA (RM)",
"E958":"MARINO (RM)",
"F064":"MAZZANO ROMANO (RM)",
"F127":"MENTANA (RM)",
"F477":"MONTE COMPATRI (RM)",
"F504":"MONTEFLAVIO (RM)",
"F534":"MONTELANICO (RM)",
"F545":"MONTELIBRETTI (RM)",
"F590":"MONTE PORZIO CATONE (RM)",
"F611":"MONTEROTONDO (RM)",
"F692":"MONTORIO ROMANO (RM)",
"F730":"MORICONE (RM)",
"F734":"MORLUPO (RM)",
"F857":"NAZZANO (RM)",
"F865":"NEMI (RM)",
"F871":"NEROLA (RM)",
"F880":"NETTUNO (RM)",
"G022":"OLEVANO ROMANO (RM)",
"G274":"PALESTRINA (RM)",
"G293":"PALOMBARA SABINA (RM)",
"G444":"PERCILE (RM)",
"G704":"PISONIANO (RM)",
"G784":"POLI (RM)",
"G811":"POMEZIA (RM)",
"G874":"PONZANO ROMANO (RM)",
"H267":"RIANO (RM)",
"H288":"RIGNANO FLAMINIO (RM)",
"H300":"RIOFREDDO (RM)",
"H387":"ROCCA CANTERANO (RM)",
"H401":"ROCCA DI CAVE (RM)",
"H404":"ROCCA DI PAPA (RM)",
"H411":"ROCCAGIOVINE (RM)",
"H432":"ROCCA PRIORA (RM)",
"H441":"ROCCA SANTO STEFANO (RM)",
"H494":"ROIATE (RM)",
"H501":"ROMA (RM)",
"H618":"ROVIANO (RM)",
"H658":"SACROFANO (RM)",
"H745":"SAMBUCI (RM)",
"H942":"<NAME> (RM)",
"I125":"<NAME>IERI (RM)",
"I255":"<NAME> (RM)",
"I284":"SANT'ANGELO ROMANO (RM)",
"I352":"SANT'ORESTE (RM)",
"I400":"SAN VITO ROMANO (RM)",
"I424":"SARACINESCO (RM)",
"I573":"SEGNI (RM)",
"I992":"SUBIACO (RM)",
"L182":"TIVOLI (RM)",
"L192":"TOLFA (RM)",
"L302":"TORRITA TIBERINA (RM)",
"L401":"<NAME> (RM)",
"L611":"VALLEPIETRA (RM)",
"L625":"VALLINFREDA (RM)",
"L639":"VALMONTONE (RM)",
"L719":"VELLETRI (RM)",
"L851":"VICOVARO (RM)",
"M095":"<NAME> (RM)",
"M141":"ZAGAROLO (RM)",
"M207":"LARIANO (RM)",
"M212":"LADISPOLI (RM)",
"M213":"ARDEA (RM)",
"M272":"CIAMPINO (RM)",
"M295":"SAN CESAREO (RM)",
"M297":"FIUMICINO (RM)",
"M309":"FONTE NUOVA (RM)",
"A341":"APRILIA (LT)",
"A707":"BASSIANO (LT)",
"B527":"CAMPODIMELE (LT)",
"C104":"CASTELFORTE (LT)",
"C740":"CISTERNA DI LATINA (LT)",
"D003":"CORI (LT)",
"D662":"FONDI (LT)",
"D708":"FORMIA (LT)",
"D843":"GAETA (LT)",
"E375":"ITRI (LT)",
"E472":"LATINA (LT)",
"E527":"LENOLA (LT)",
"E798":"MAENZA (LT)",
"F224":"MINTURNO (LT)",
"F616":"MONTE SAN BIAGIO (LT)",
"F937":"NORMA (LT)",
"G865":"PONTINIA (LT)",
"G871":"PONZA (LT)",
"G698":"PRIVERNO (LT)",
"H076":"PROSSEDI (LT)",
"H413":"ROCCAGORGA (LT)",
"H421":"ROCCA MASSIMA (LT)",
"H444":"ROCCASECCA DEI VOLSCI (LT)",
"H647":"SABAUDIA (LT)",
"H836":"SAN FELICE CIRCEO (LT)",
"I339":"SANTI COSMA E DAMIANO (LT)",
"I634":"SERMONETA (LT)",
"I712":"SEZZE (LT)",
"I832":"SONNINO (LT)",
"I892":"SPERLONGA (LT)",
"I902":"SPIGNO SATURNIA (LT)",
"L120":"TERRACINA (LT)",
"L742":"VENTOTENE (LT)",
"A032":"ACQUAFONDATA (FR)",
"A054":"ACUTO (FR)",
"A123":"ALATRI (FR)",
"A244":"ALVITO (FR)",
"A256":"AMASENO (FR)",
"A269":"ANAGNI (FR)",
"A348":"AQUINO (FR)",
"A363":"ARCE (FR)",
"A421":"ARNARA (FR)",
"A433":"ARPINO (FR)",
"A486":"ATINA (FR)",
"A502":"AUSONIA (FR)",
"A763":"<NAME> (FR)",
"A720":"BOVILLE ERNICA (FR)",
"B195":"BROCCOSTELLA (FR)",
"B543":"CAMPOLI APPENNINO (FR)",
"B862":"CASALATTICO (FR)",
"B919":"CASALVIERI (FR)",
"C034":"CASSINO (FR)",
"C177":"CASTELLIRI (FR)",
"C223":"<NAME> (FR)",
"C340":"CASTROCIELO (FR)",
"C338":"<NAME> (FR)",
"C413":"CECCANO (FR)",
"C479":"CEPRANO (FR)",
"C545":"CERVARO (FR)",
"C836":"COLFELICE (FR)",
"C864":"COLLEPARDO (FR)",
"C870":"<NAME> (FR)",
"C998":"<NAME> (FR)",
"D440":"ESPERIA (FR)",
"D483":"FALVATERRA (FR)",
"D539":"FERENTINO (FR)",
"D591":"FILETTINO (FR)",
"A310":"FIUGGI (FR)",
"D667":"FONTANA LIRI (FR)",
"D682":"FONTECHIARI (FR)",
"D810":"FROSINONE (FR)",
"D819":"FUMONE (FR)",
"D881":"GALLINARO (FR)",
"E057":"GIULIANO DI ROMA (FR)",
"E236":"GUARCINO (FR)",
"E340":"ISOLA DEL LIRI (FR)",
"F620":"<NAME>ANO (FR)",
"F740":"MOROLO (FR)",
"G276":"PALIANO (FR)",
"G362":"PASTENA (FR)",
"G374":"PATRICA (FR)",
"G500":"PESCOSOLIDO (FR)",
"G591":"PICINISCO (FR)",
"G592":"PICO (FR)",
"G598":"PIEDIMONTE SAN GERMANO (FR)",
"G659":"PIGLIO (FR)",
"G662":"PIGNATARO INTERAMNA (FR)",
"G749":"POFI (FR)",
"G838":"PONTECORVO (FR)",
"G935":"POSTA FIBRENO (FR)",
"H324":"RIPI (FR)",
"H393":"<NAME>'ARCE (FR)",
"H443":"ROCCASECCA (FR)",
"H779":"<NAME> (FR)",
"H824":"<NAME> (FR)",
"H880":"<NAME> (FR)",
"H917":"SAN <NAME> (FR)",
"I256":"<NAME> (FR)",
"I265":"<NAME> (FR)",
"D786":"UMBERTIDE (PG)",
"L573":"VALFABBRICA (PG)",
"L627":"<NAME> (PG)",
"L653":"VALTOPINA (PG)",
"A045":"ACQUASPARTA (TR)",
"A207":"ALLERONA (TR)",
"A242":"ALVIANO (TR)",
"A262":"AMELIA (TR)",
"A439":"ARRONE (TR)",
"A490":"ATTIGLIANO (TR)",
"A691":"BASCHI (TR)",
"B446":"<NAME> (TR)",
"C117":"<NAME> (TR)",
"C289":"<NAME> (TR)",
"D454":"FABRO (TR)",
"D538":"FERENTILLO (TR)",
"D570":"FICULLE (TR)",
"E045":"GIOVE (TR)",
"E241":"GUARDEA (TR)",
"E729":"LUGNANO IN TEVERINA (TR)",
"F457":"MONTECASTRILLI (TR)",
"F462":"MONTECCHIO (TR)",
"F510":"MONTEFRANCO (TR)",
"F513":"MONTEGABBIONE (TR)",
"F543":"MONTELEONE D'ORVIETO (TR)",
"F844":"NARNI (TR)",
"G148":"ORVIETO (TR)",
"G189":"OTRICOLI (TR)",
"G344":"PARRANO (TR)",
"G432":"PENNA IN TEVERINA (TR)",
"G790":"POLINO (TR)",
"G881":"PORANO (TR)",
"H857":"SAN GEMINI (TR)",
"I381":"SAN VENANZO (TR)",
"I981":"STRONCONE (TR)",
"L117":"TERNI (TR)",
"M258":"AVIGLIANO UMBRO (TR)",
"A035":"ACQUALAGNA (PU)",
"A327":"APECCHIO (PU)",
"A493":"AUDITORE (PU)",
"A740":"BELFORTE ALL'ISAURO (PU)",
"B026":"BORGO PACE (PU)",
"B352":"CAGLI (PU)",
"B636":"CANTIANO (PU)",
"B816":"CARPEGNA (PU)",
"B846":"CARTOCETO (PU)",
"D488":"FANO (PU)",
"D541":"FERMIGNANO (PU)",
"D749":"FOSSOMBRONE (PU)",
"D791":"FRATTE ROSA (PU)",
"D807":"FRONTINO (PU)",
"D808":"FRONTONE (PU)",
"D836":"GABICCE MARE (PU)",
"E122":"GRADARA (PU)",
"E351":"ISOLA DEL PIANO (PU)",
"E743":"LUNANO (PU)",
"E785":"MACERATA FELTRIA (PU)",
"F135":"MERCATELLO SUL METAURO (PU)",
"F136":"MERCATINO CONCA (PU)",
"F310":"MOMBAROCCIO (PU)",
"F347":"MONDAVIO (PU)",
"F348":"MONDOLFO (PU)",
"F450":"MONTECALVO IN FOGLIA (PU)",
"F467":"MONTE CERIGNONE (PU)",
"F474":"MONTECICCARDO (PU)",
"F478":"MONTECOPIOLO (PU)",
"F497":"MONTEFELCINO (PU)",
"F524":"MONTE GRIMANO TERME (PU)",
"F533":"MONTELABBATE (PU)",
"F589":"MONTE PORZIO (PU)",
"G415":"PEGLIO (PU)",
"G453":"PERGOLA (PU)",
"G479":"PESARO (PU)",
"G514":"PETRIANO (PU)",
"G551":"PIANDIMELETO (PU)",
"G627":"PIETRARUBBIA (PU)",
"G682":"PIOBBICO (PU)",
"H809":"SAN COSTANZO (PU)",
"H958":"SAN LORENZO IN CAMPO (PU)",
"I287":"SANT'ANGELO IN VADO (PU)",
"I344":"SANT'IPPOLITO (PU)",
"I459":"SASSOCORVARO (PU)",
"I460":"SASSOFELTRIO (PU)",
"I654":"SERRA SANT'ABBONDIO (PU)",
"L078":"TAVOLETO (PU)",
"L081":"TAVULLIA (PU)",
"L498":"URBANIA (PU)",
"L500":"URBINO (PU)",
"M331":"VALLEFOGLIA (PU)",
"M380":"COLLI AL METAURO (PU)",
"M379":"TERRE ROVERESCHE (PU)",
"A092":"AGUGLIANO (AN)",
"A271":"ANCONA (AN)",
"A366":"ARCEVIA (AN)",
"A626":"BARBARA (AN)",
"A769":"<NAME> (AN)",
"B468":"CAMERANO (AN)",
"B470":"<NAME> (AN)",
"C060":"CASTELBELLINO (AN)",
"C100":"CASTELFIDARDO (AN)",
"C152":"<NAME> (AN)",
"C248":"CASTELPLANIO (AN)",
"C524":"<NAME> (AN)",
"C615":"CHIARAVALLE (AN)",
"D007":"CORINALDO (AN)",
"D211":"CUPRAMONTANA (AN)",
"D451":"FABRIANO (AN)",
"D472":"<NAME> (AN)",
"D597":"FILOTTRANO (AN)",
"D965":"GENGA (AN)",
"E388":"JESI (AN)",
"E690":"LORETO (AN)",
"E837":"<NAME> (AN)",
"F145":"MERGO (AN)",
"F381":"MONSANO (AN)",
"F453":"MONTECAROTTO (AN)",
"F560":"MONTEMARCIANO (AN)",
"F600":"<NAME> (AN)",
"F634":"<NAME> (AN)",
"F745":"<NAME> (AN)",
"F978":"NUMANA (AN)",
"G003":"OFFAGNA (AN)",
"G157":"OSIMO (AN)",
"F401":"OSTRA (AN)",
"F581":"OSTRA VETERE (AN)",
"G771":"<NAME> (AN)",
"G803":"POLVERIGI (AN)",
"H575":"ROSORA (AN)",
"H979":"SAN MARCELLO (AN)",
"I071":"<NAME> (AN)",
"I251":"<NAME> (AN)",
"I461":"SASSOFERRATO (AN)",
"I608":"SENIGALLIA (AN)",
"I643":"SERRA DE' CONTI (AN)",
"I653":"SERRA SAN QUIRICO (AN)",
"I758":"SIROLO (AN)",
"I932":"STAFFOLO (AN)",
"M318":"TRECASTELLI (AN)",
"A329":"APIRO (MC)",
"A334":"APPIGNANO (MC)",
"A739":"BELFORTE DEL CHIENTI (MC)",
"A947":"BOLOGNOLA (MC)",
"B398":"CALDAROLA (MC)",
"B474":"CAMERINO (MC)",
"B562":"CAMPOROTONDO DI FIASTRONE (MC)",
"C251":"CASTELRAIMONDO (MC)",
"C267":"CASTELSANTANGELO SUL NERA (MC)",
"C582":"CESSAPALOMBO (MC)",
"C704":"CINGOLI (MC)",
"C770":"CIVITANOVA MARCHE (MC)",
"C886":"COLMURANO (MC)",
"D042":"CORRIDONIA (MC)",
"D429":"ESANATOGLIA (MC)",
"D564":"FIASTRA (MC)",
"D628":"FIUMINATA (MC)",
"D853":"GAGLIOLE (MC)",
"E228":"GUALDO (MC)",
"E694":"LORO PICENO (MC)",
"E783":"MACERATA (MC)",
"F051":"MATELICA (MC)",
"F268":"MOGLIANO (MC)",
"F454":"MONTECASSIANO (MC)",
"F460":"MONTE CAVALLO (MC)",
"F482":"MONTECOSARO (MC)",
"F496":"MONTEFANO (MC)",
"F552":"MONTELUPONE (MC)",
"F621":"MONTE SAN GIUSTO (MC)",
"F622":"MONTE SAN MARTINO (MC)",
"F749":"MORROVALLE (MC)",
"F793":"MUCCIA (MC)",
"G436":"PENNA SAN GIOVANNI (MC)",
"G515":"PETRIOLO (MC)",
"G657":"PIEVE TORINA (MC)",
"G690":"PIORACO (MC)",
"D566":"POGGIO SAN VICINO (MC)",
"F567":"POLLENZA (MC)",
"G919":"PORTO RECANATI (MC)",
"F632":"POTENZA PICENA (MC)",
"H211":"RECANATI (MC)",
"H323":"RIPE SAN GINESIO (MC)",
"H876":"SAN GINESIO (MC)",
"I156":"SAN SEVERINO MARCHE (MC)",
"I286":"SANT'ANGELO IN PONTANO (MC)",
"I436":"SARNANO (MC)",
"I569":"SEFRO (MC)",
"I651":"SERRAPETRONA (MC)",
"I661":"SERRAVALLE DI CHIENTI (MC)",
"L191":"TOLENTINO (MC)",
"L366":"TREIA (MC)",
"L501":"URBISAGLIA (MC)",
"L517":"USSITA (MC)",
"M078":"VISSO (MC)",
"M382":"VALFORNACE (MC)",
"A044":"ACQUASANTA TERME (AP)",
"A047":"ACQUAVIVA PICENA (AP)",
"A335":"APPIGNANO DEL TRONTO (AP)",
"A437":"ARQUATA DEL TRONTO (AP)",
"A462":"<NAME> (AP)",
"B727":"CARASSAI (AP)",
"C093":"<NAME> (AP)",
"C321":"CASTIGNANO (AP)",
"C331":"CASTORANO (AP)",
"C877":"<NAME> (AP)",
"C935":"COMUNANZA (AP)",
"C779":"<NAME> (PE)",
"C853":"COLLECORVINO (PE)",
"D078":"CORVARA (PE)",
"D201":"CUGNOLI (PE)",
"D394":"ELICE (PE)",
"D501":"FARINDOLA (PE)",
"E558":"LETTOMANOPPELLO (PE)",
"E691":"<NAME> (PE)",
"E892":"MANOPPELLO (PE)",
"F441":"<NAME> (PE)",
"F646":"MONTESILVANO (PE)",
"F765":"MOSCUFO (PE)",
"F908":"NOCCIANO (PE)",
"G438":"PENNE (PE)",
"G482":"PESCARA (PE)",
"G499":"PESCOSANSONESCO (PE)",
"G555":"PIANELLA (PE)",
"G589":"PICCIANO (PE)",
"G621":"PIETRANICO (PE)",
"G878":"POPOLI (PE)",
"H425":"ROCCAMORICE (PE)",
"H562":"ROSCIANO (PE)",
"H715":"SALLE (PE)",
"I332":"SANT'EUFEMIA A MAIELLA (PE)",
"I376":"SAN VALENTINO IN ABRUZZO CITERIORE (PE)",
"I482":"SCAFA (PE)",
"I649":"SERRAMONACESCA (PE)",
"I922":"SPOLTORE (PE)",
"L186":"TOCCO DA CASAURIA (PE)",
"L263":"TORRE DE' PASSERI (PE)",
"L475":"TURRIVALIGNANI (PE)",
"L846":"VICOLI (PE)",
"L922":"VILLA CELIERA (PE)",
"A235":"ALTINO (CH)",
"A367":"ARCHI (CH)",
"A398":"ARI (CH)",
"A402":"ARIELLI (CH)",
"A485":"ATESSA (CH)",
"A956":"BOMBA (CH)",
"B057":"BORRELLO (CH)",
"B238":"BUCCHIANICO (CH)",
"B268":"<NAME>UL SANGRO (CH)",
"B620":"CAN<NAME>ANNITA (CH)",
"B826":"<NAME> (CH)",
"B853":"CARUNCHIO (CH)",
"B859":"CASACANDITELLA (CH)",
"B861":"CASALANGUIDA (CH)",
"B865":"CASALBORDINO (CH)",
"B896":"CASALINCONTRADA (CH)",
"B985":"CASOLI (CH)",
"C114":"<NAME> (CH)",
"C123":"CASTELGUIDONE (CH)",
"C298":"<NAME> (CH)",
"C428":"CELENZA SUL TRIGNO (CH)",
"C632":"CHIETI (CH)",
"C768":"CIVITALUPARELLA (CH)",
"C776":"<NAME> (CH)",
"C855":"COLLEDIMACINE (CH)",
"C856":"COLLEDIMEZZO (CH)",
"D137":"CRECCHIO (CH)",
"D209":"CUPELLO (CH)",
"D315":"DOGLIOLA (CH)",
"D494":"<NAME> (CH)",
"D495":"<NAME> (CH)",
"D592":"FILETTO (CH)",
"D738":"FOSSACESIA (CH)",
"D757":"FRAINE (CH)",
"D763":"<NAME> (CH)",
"D796":"FRESAGRANDINARIA (CH)",
"D803":"FRISA (CH)",
"D823":"FURCI (CH)",
"D898":"GAMBERALE (CH)",
"D996":"GESSOPALENA (CH)",
"E052":"GISSI (CH)",
"E056":"GIULIANO TEATINO (CH)",
"E243":"GUARDIAGRELE (CH)",
"E266":"GUILMI (CH)",
"E424":"<NAME> (CH)",
"E435":"LANCIANO (CH)",
"E531":"LENTELLA (CH)",
"E559":"LETTOPALENA (CH)",
"E611":"LISCIA (CH)",
"F196":"MIGLIANICO (CH)",
"F433":"MONTAZZOLI (CH)",
"F498":"MONTEFERRANTE (CH)",
"F535":"MONTELAPIANO (CH)",
"F578":"MONTENERODOMO (CH)",
"F582":"MONTEODORISIO (CH)",
"F785":"MOZZAGROGNA (CH)",
"G128":"ORSOGNA (CH)",
"G141":"ORTONA (CH)",
"G237":"PAGLIETA (CH)",
"G271":"PALENA (CH)",
"G290":"PALMOLI (CH)",
"G294":"PALOMBARO (CH)",
"G434":"PENNADOMO (CH)",
"G435":"PENNAPIEDIMONTE (CH)",
"G441":"PERANO (CH)",
"G724":"PIZZOFERRATO (CH)",
"G760":"POGGIOFIORITO (CH)",
"G799":"POLLUTRI (CH)",
"H052":"PRETORO (CH)",
"H098":"QUADRI (CH)",
"H184":"RAPINO (CH)",
"H320":"RIPA TEATINA (CH)",
"H424":"ROCCAMONTEPIANO (CH)",
"H439":"ROCCA SAN GIOVANNI (CH)",
"H442":"ROCCASCALEGNA (CH)",
"H448":"ROCCASPINALVETI (CH)",
"H495":"ROIO DEL SANGRO (CH)",
"H566":"ROSELLO (CH)",
"H784":"SAN BUONO (CH)",
"H923":"SAN GIOVANNI LIPIONI (CH)",
"D690":"SAN GIOVANNI TEATINO (CH)",
"H991":"<NAME> (CH)",
"I148":"SAN SALVO (CH)",
"I244":"<NAME> (CH)",
"I335":"<NAME>ANGRO (CH)",
"I394":"SAN VITO CHIETINO (CH)",
"I520":"SCERNI (CH)",
"I526":"<NAME>UZZO (CH)",
"L047":"<NAME> (CH)",
"L194":"TOLLO (CH)",
"L218":"TOR<NAME> (CH)",
"L224":"TORNARECCIO (CH)",
"L253":"TORREBRUNA (CH)",
"L284":"TORREVECCHIA TEATINA (CH)",
"L291":"<NAME> (CH)",
"L363":"TREGLIO (CH)",
"L459":"TUFILLO (CH)",
"L526":"VACRI (CH)",
"E372":"VASTO (CH)",
"L961":"VILLALFONSINA (CH)",
"L964":"VILLAMAGNA (CH)",
"M022":"<NAME> (CH)",
"G613":"PIETRAFERRAZZANA (CH)",
"D480":"FALLO (CH)",
"A050":"<NAME> (CB)",
"A616":"BARANELLO (CB)",
"A930":"BOJANO (CB)",
"A971":"BONEFRO (CB)",
"B295":"BUSSO (CB)",
"B519":"CAMPOBASSO (CB)",
"B522":"CAMPOCHIARO (CB)",
"B528":"CAMPODIPIETRA (CB)",
"B544":"CAMPOLIETO (CB)",
"B550":"CAMPOMARINO (CB)",
"B858":"CASACALENDA (CB)",
"B871":"CASALCIPRANO (CB)",
"C066":"CASTELBOTTACCIO (CB)",
"C175":"<NAME> (CB)",
"C197":"CASTELMAURO (CB)",
"C346":"CASTROPIGNANO (CB)",
"C486":"CERCEMAGGIORE (CB)",
"C488":"CERCEPICCOLA (CB)",
"C764":"CIVITACAMPOMARANO (CB)",
"C854":"<NAME> (CB)",
"C875":"COLLETORTO (CB)",
"C772":"DURONIA (CB)",
"D550":"FERRAZZANO (CB)",
"D737":"FOSSALTO (CB)",
"D896":"GAMBATESA (CB)",
"E030":"GILDONE (CB)",
"E244":"GUARDIALFIERA (CB)",
"E248":"GUARDIAREGIA (CB)",
"E259":"GUGLIONESI (CB)",
"E381":"JELSI (CB)",
"E456":"LARINO (CB)",
"E599":"LIMOSANO (CB)",
"E722":"LUCITO (CB)",
"E748":"LUPARA (CB)",
"E780":"MAC<NAME> (CB)",
"E799":"MAFALDA (CB)",
"F055":"MATRICE (CB)",
"F233":"<NAME> (CB)",
"F294":"MOLISE (CB)",
"F322":"MONACILIONI (CB)",
"F391":"MONTAGANO (CB)",
"F475":"MONTECILFONE (CB)",
"F495":"MONTEFALCONE NEL SANNIO (CB)",
"F548":"MONTELONGO (CB)",
"F569":"MONTEMITRO (CB)",
"F576":"MONTENERO DI BISACCIA (CB)",
"F689":"<NAME> (CB)",
"F748":"<NAME>ANNIO (CB)",
"G086":"ORATINO (CB)",
"G257":"PALATA (CB)",
"G506":"PETACCIATO (CB)",
"G512":"<NAME> (CB)",
"G609":"PIETRACATELLA (CB)",
"G610":"PIETRACUPA (CB)",
"G910":"PORTOCANNONE (CB)",
"H083":"PROVVIDENTI (CB)",
"H273":"RICCIA (CB)",
"H311":"RIPABOTTONI (CB)",
"H313":"RIPALIMOSANI (CB)",
"H454":"ROCCAVIVARA (CB)",
"H589":"ROTELLO (CB)",
"H693":"SALCITO (CB)",
"H782":"SAN BIASE (CB)",
"H833":"<NAME> (CB)",
"D096":"COSSIGNANO (AP)",
"D210":"<NAME> (AP)",
"D652":"FOLIGNANO (AP)",
"C113":"<NAME> (PI)",
"C174":"<NAME> (PI)",
"C244":"CASTELNUOVO DI VAL DI CECINA (PI)",
"C609":"CHIANNI (PI)",
"D510":"FAUGLIA (PI)",
"E250":"GUARDISTALLO (PI)",
"E413":"LAJATICO (PI)",
"F458":"MONTECATINI VAL DI CECINA (PI)",
"F640":"MONTESCUDAIO (PI)",
"F661":"<NAME>ITTIMO (PI)",
"F686":"MONTOPOLI IN VAL D'ARNO (PI)",
"G090":"ORCIANO PISANO (PI)",
"G254":"PALAIA (PI)",
"G395":"PECCIOLI (PI)",
"G702":"PISA (PI)",
"G804":"POMARANCE (PI)",
"G822":"PONSACCO (PI)",
"G843":"PONTEDERA (PI)",
"H319":"RIPARBELLA (PI)",
"A562":"SAN GIULIANO TERME (PI)",
"I046":"SAN MINIATO (PI)",
"I177":"<NAME> (PI)",
"I217":"<NAME> (PI)",
"I232":"<NAME> MONTE (PI)",
"L138":"TERRICCIOLA (PI)",
"L702":"VECCHIANO (PI)",
"L850":"VICOPISANO (PI)",
"M126":"VOLTERRA (PI)",
"M327":"<NAME> (PI)",
"M328":"<NAME> (PI)",
"A291":"ANGHIARI (AR)",
"A390":"AREZZO (AR)",
"A541":"<NAME> (AR)",
"A851":"BIBBIENA (AR)",
"B243":"BUCINE (AR)",
"B670":"CAPOLONA (AR)",
"B693":"<NAME> (AR)",
"C102":"<NAME> (AR)",
"C263":"<NAME> (AR)",
"C318":"<NAME> (AR)",
"C319":"<NAME>IORENTINO (AR)",
"C407":"CAVRIGLIA (AR)",
"C648":"CHITIGNANO (AR)",
"C663":"<NAME> (AR)",
"C774":"CIVIT<NAME> DI CHIANA (AR)",
"D077":"CORTONA (AR)",
"D649":"FOIANO DELLA CHIANA (AR)",
"E468":"LATERINA (AR)",
"E693":"LORO CIUFFENNA (AR)",
"E718":"LUCIGNANO (AR)",
"E933":"MAR<NAME>IANA (AR)",
"F565":"MONTEMIGNAIO (AR)",
"F594":"MONTERCHI (AR)",
"F628":"MONTE SAN SAVINO (AR)",
"F656":"MONTEVARCHI (AR)",
"G139":"ORT<NAME> (AR)",
"G451":"<NAME> (AR)",
"G653":"PIEVE SANTO STEFANO (AR)",
"G879":"POPPI (AR)",
"H901":"<NAME> (AR)",
"I155":"SANSEPOLCRO (AR)",
"I681":"SESTINO (AR)",
"I991":"SUBBIANO (AR)",
"L038":"TALLA (AR)",
"L123":"TERRANUOVA BRACCIOLINI (AR)",
"M322":"<NAME> (AR)",
"M329":"PRATOVECCHIO STIA (AR)",
"A006":"ABBADIA SAN SALVATORE (SI)",
"A461":"ASCIANO (SI)",
"B269":"BUONCONVENTO (SI)",
"B984":"CASOLE D'ELSA (SI)",
"C172":"CASTELLINA IN CHIANTI (SI)",
"C227":"CASTEL<NAME>ENGA (SI)",
"C313":"CASTIGLIONE D'ORCIA (SI)",
"C587":"CETONA (SI)",
"C608":"CHIANCIANO TERME (SI)",
"C661":"CHIUSDINO (SI)",
"C662":"CHIUSI (SI)",
"C847":"COLLE DI <NAME>'ELSA (SI)",
"D858":"GAIOLE IN CHIANTI (SI)",
"F592":"MONTEPULCIANO (SI)",
"F598":"MONTERIGGIONI (SI)",
"F605":"MONTERONI D'ARBIA (SI)",
"F676":"MONTICIANO (SI)",
"F815":"MURLO (SI)",
"G547":"PIANCASTAGNAIO (SI)",
"G602":"PIENZA (SI)",
"G752":"POGGIBONSI (SI)",
"H153":"RADDA IN CHIANTI (SI)",
"H156":"RADICOFANI (SI)",
"H157":"RADICONDOLI (SI)",
"H185":"RAPOLANO TERME (SI)",
"H790":"SAN CASCIANO DEI BAGNI (SI)",
"H875":"SAN GIMIGNANO (SI)",
"I135":"SAN QUIRICO D'ORCIA (SI)",
"I445":"SARTEANO (SI)",
"I726":"SIENA (SI)",
"A468":"SINALUNGA (SI)",
"I877":"SOVICILLE (SI)",
"L303":"TORRITA DI SIENA (SI)",
"L384":"TREQUANDA (SI)",
"F402":"MONTALCINO (SI)",
"A369":"ARCIDOSSO (GR)",
"B497":"CAMPAGNATICO (GR)",
"B646":"CAPALBIO (GR)",
"C085":"<NAME> (GR)",
"C147":"CASTELL'AZZARA (GR)",
"C310":"CASTIGLIONE DELLA PESCAIA (GR)",
"C705":"CINIGIANO (GR)",
"C782":"CIVITELLA PAGANICO (GR)",
"D656":"FOLLONICA (GR)",
"D948":"GAVORRANO (GR)",
"E202":"GROSSETO (GR)",
"E348":"ISOLA DEL GIGLIO (GR)",
"E810":"MAGLIANO IN TOSCANA (GR)",
"E875":"MANCIANO (GR)",
"F032":"MASSA MARITTIMA (GR)",
"F437":"MONTE ARGENTARIO (GR)",
"F677":"MONTIERI (GR)",
"G088":"ORBETELLO (GR)",
"G716":"PITIGLIANO (GR)",
"H417":"ROCCALBEGNA (GR)",
"H449":"ROCCASTRADA (GR)",
"I187":"SANTA FIORA (GR)",
"I504":"SCANSANO (GR)",
"I510":"SCARLINO (GR)",
"I571":"SEGGIANO (GR)",
"I841":"SORANO (GR)",
"F612":"MONTEROTONDO MARITTIMO (GR)",
"I601":"SEMPRONIANO (GR)",
"B626":"CANTAGALLO (PO)",
"B794":"CARMIGNANO (PO)",
"F572":"MONTEMURLO (PO)",
"G754":"POGGIO A CAIANO (PO)",
"G999":"PRATO (PO)",
"L537":"VAIANO (PO)",
"L775":"VERNIO (PO)",
"A475":"ASSISI (PG)",
"A710":"BASTIA UMBRA (PG)",
"A832":"BETTONA (PG)",
"A835":"BEVAGNA (PG)",
"B504":"CAMPELLO SUL CLITUNNO (PG)",
"B609":"CANNARA (PG)",
"B948":"CASCIA (PG)",
"C252":"CASTEL RITALDI (PG)",
"C309":"CASTIGLIONE DEL LAGO (PG)",
"C527":"CERRETO DI SPOLETO (PG)",
"C742":"CITERNA (PG)",
"C744":"CITTÀ DELLA PIEVE (PG)",
"C745":"CITTÀ DI CASTELLO (PG)",
"C845":"COLLAZZONE (PG)",
"C990":"CORCIANO (PG)",
"D108":"COSTACCIARO (PG)",
"D279":"DERUTA (PG)",
"D653":"FOLIGNO (PG)",
"D745":"FOSSATO DI VICO (PG)",
"D787":"FRATTA TODINA (PG)",
"E012":"<NAME>'UMBRIA (PG)",
"E229":"GUALDO CATTANEO (PG)",
"E230":"GUALDO TADINO (PG)",
"E256":"GUBBIO (PG)",
"E613":"LISCIANO NICCONE (PG)",
"E805":"MAGIONE (PG)",
"E975":"MARSCIANO (PG)",
"F024":"<NAME> (PG)",
"F456":"<NAME> DI VIBIO (PG)",
"F492":"MONTEFALCO (PG)",
"F540":"MONTELEONE DI SPOLETO (PG)",
"F629":"<NAME>IBERINA (PG)",
"F685":"MONTONE (PG)",
"F911":"NOCERA UMBRA (PG)",
"F935":"NORCIA (PG)",
"G212":"PACIANO (PG)",
"G308":"PANICALE (PG)",
"G359":"PASSIGNANO SUL TRASIMENO (PG)",
"G478":"PERUGIA (PG)",
"G601":"PIEGARO (PG)",
"G618":"PIETRALUNGA (PG)",
"G758":"POGGIODOMO (PG)",
"H015":"PRECI (PG)",
"H935":"SAN GIUSTINO (PG)",
"I263":"SANT'ANATOLIA DI NARCO (PG)",
"I522":"SCHEGGIA E PASCELUPO (PG)",
"I523":"SCHEGGINO (PG)",
"I585":"SELLANO (PG)",
"I727":"SIGILLO (PG)",
"I888":"SPELLO (PG)",
"I921":"SPOLETO (PG)",
"L188":"TODI (PG)",
"F910":"NOCERA TERINESE (CZ)",
"D691":"FORCE (AP)",
"I302":"SANT'APOLLINARE (FR)",
"I321":"SANT'<NAME> (FR)",
"I351":"SANTOPADRE (FR)",
"I408":"SAN VITTORE DEL LAZIO (FR)",
"I669":"SERRONE (FR)",
"I697":"SETTEFRATI (FR)",
"I716":"SGURGOLA (FR)",
"I838":"SORA (FR)",
"I973":"STRANGOLAGALLI (FR)",
"L009":"SUPINO (FR)",
"L105":"TERELLE (FR)",
"L243":"TORRE CAJETANI (FR)",
"L290":"TORRICE (FR)",
"L398":"TREVI NEL LAZIO (FR)",
"L437":"TRIVIGLIANO (FR)",
"L598":"VALLECORSA (FR)",
"L605":"VALLEMAIO (FR)",
"L614":"VALLEROTONDA (FR)",
"L780":"VEROLI (FR)",
"L836":"VICALVI (FR)",
"L843":"VICO NEL LAZIO (FR)",
"A081":"VILLA LATINA (FR)",
"L905":"VILLA SANTA LUCIA (FR)",
"I364":"V<NAME> (FR)",
"M083":"VITICUSO (FR)",
"A018":"ACCIANO (AQ)",
"A100":"AIELLI (AQ)",
"A187":"ALFEDENA (AQ)",
"A318":"ANVERSA DEGLI ABRUZZI (AQ)",
"A481":"ATELETA (AQ)",
"A515":"AVEZZANO (AQ)",
"A603":"BALSORANO (AQ)",
"A656":"BARETE (AQ)",
"A667":"BARISCIANO (AQ)",
"A678":"BARREA (AQ)",
"A884":"BISEGNA (AQ)",
"B256":"BUGNARA (AQ)",
"B358":"<NAME> (AQ)",
"B382":"CALASCIO (AQ)",
"B526":"CA<NAME> (AQ)",
"B569":"CAMPOTOSTO (AQ)",
"B606":"CANISTRO (AQ)",
"B624":"CANSANO (AQ)",
"B651":"CAPESTRANO (AQ)",
"B656":"CAPISTRELLO (AQ)",
"B658":"CAPITIGNANO (AQ)",
"B672":"CAPORCIANO (AQ)",
"B677":"CAPPADOCIA (AQ)",
"B725":"<NAME> (AQ)",
"B842":"CARSOLI (AQ)",
"C083":"CASTEL DEL MONTE (AQ)",
"C090":"<NAME> (AQ)",
"C096":"<NAME> SANGRO (AQ)",
"C126":"CASTELLAFIUME (AQ)",
"C278":"CASTELVECCHIO CALVISIO (AQ)",
"C279":"CASTELVECCHIO SUBEQUO (AQ)",
"C426":"CELANO (AQ)",
"C492":"CERCHIO (AQ)",
"C766":"CIVITA D'ANTINO (AQ)",
"C778":"CIVITELLA ALFEDENA (AQ)",
"C783":"CIVITELLA ROVETO (AQ)",
"C811":"COCULLO (AQ)",
"C844":"COLLARMELE (AQ)",
"C862":"COLLELONGO (AQ)",
"C866":"COLLEPIETRO (AQ)",
"C999":"CORFINIO (AQ)",
"D465":"FAGNANO ALTO (AQ)",
"D681":"FONTECCHIO (AQ)",
"D736":"FOSSA (AQ)",
"D850":"G<NAME> (AQ)",
"E040":"GIOIA DEI MARSI (AQ)",
"E096":"GORIANO SICOLI (AQ)",
"E307":"INTRODACQUA (AQ)",
"A345":"L'AQUILA (AQ)",
"E505":"LECCE NEI MARSI (AQ)",
"E723":"LUCO DEI MARSI (AQ)",
"E724":"LUCOLI (AQ)",
"E811":"MAGLIANO DE' MARSI (AQ)",
"F022":"MASSA D'ALBE (AQ)",
"M255":"MOLINA ATERNO (AQ)",
"F595":"MONTEREALE (AQ)",
"F732":"MORINO (AQ)",
"F852":"NAVELLI (AQ)",
"F996":"OCRE (AQ)",
"G002":"OFENA (AQ)",
"G079":"OPI (AQ)",
"G102":"ORICOLA (AQ)",
"G142":"ORTONA DEI MARSI (AQ)",
"G145":"ORTUCCHIO (AQ)",
"G200":"OVINDOLI (AQ)",
"G210":"PACENTRO (AQ)",
"G449":"PERETO (AQ)",
"G484":"PESCASSEROLI (AQ)",
"G492":"PESCINA (AQ)",
"G493":"PESCOCOSTANZO (AQ)",
"G524":"PETTORANO SUL GIZIO (AQ)",
"G726":"PIZZOLI (AQ)",
"G766":"POGGIO PICENZE (AQ)",
"G992":"PRATA D'ANSIDONIA (AQ)",
"H007":"PRATOLA PELIGNA (AQ)",
"H056":"PREZZA (AQ)",
"H166":"RAIANO (AQ)",
"H353":"RIVISONDOLI (AQ)",
"H389":"ROCCACASALE (AQ)",
"H399":"ROCCA DI BOTTE (AQ)",
"H400":"ROCCA DI CAMBIO (AQ)",
"H402":"ROCCA DI MEZZO (AQ)",
"H429":"ROCCA PIA (AQ)",
"H434":"ROCCARASO (AQ)",
"H772":"SAN BENEDETTO DE<NAME> (AQ)",
"H773":"SAN BENEDETTO IN PERILLIS (AQ)",
"H819":"SAN DEMETRIO NE' VESTINI (AQ)",
"I121":"SAN PIO DELLE CAMERE (AQ)",
"I326":"SAN<NAME> (AQ)",
"I336":"SANT'EUSANIO FORCONESE (AQ)",
"I360":"SAN<NAME> DI SESSANIO (AQ)",
"I389":"SAN VINCENZO VALLE ROVETO (AQ)",
"I501":"SCANNO (AQ)",
"I543":"SCONTRONE (AQ)",
"I546":"SCOPPITO (AQ)",
"I553":"SCURCOLA MARSICANA (AQ)",
"I558":"SECINARO (AQ)",
"I804":"SULMONA (AQ)",
"L025":"TAGLIACOZZO (AQ)",
"L173":"TIONE DEGLI ABRUZZI (AQ)",
"L227":"TORNIMPARTE (AQ)",
"L334":"TRASACCO (AQ)",
"L958":"VILLALAGO (AQ)",
"M021":"VILLA SANTA LUCIA DEGLI ABRUZZI (AQ)",
"M023":"VILLA SANT'ANGELO (AQ)",
"M031":"VILLAVALLELONGA (AQ)",
"M041":"VILLETTA BARREA (AQ)",
"M090":"VITTORITO (AQ)",
"A125":"ALBA ADRIATICA (TE)",
"A270":"ANCARANO (TE)",
"A445":"ARSITA (TE)",
"A488":"ATRI (TE)",
"A692":"BASCIANO (TE)",
"A746":"BELLANTE (TE)",
"A885":"BISENTI (TE)",
"B515":"CAMPLI (TE)",
"B640":"CANZANO (TE)",
"C040":"<NAME> (TE)",
"C128":"CASTELLALTO (TE)",
"C169":"CASTELLI (TE)",
"C316":"<NAME> (TE)",
"C322":"CASTILENTI (TE)",
"C449":"CELLINO ATTANASIO (TE)",
"C517":"CERMIGNANO (TE)",
"C781":"CIVITELLA DEL TRONTO (TE)",
"C311":"COLLEDARA (TE)",
"C901":"COLONNELLA (TE)",
"C972":"CONTROGUERRA (TE)",
"D043":"CORROPOLI (TE)",
"D076":"CORTINO (TE)",
"D179":"CROGNALETO (TE)",
"D489":"<NAME> (TE)",
"E058":"GIULIANOVA (TE)",
"E343":"ISOLA DEL G<NAME> D'ITALIA (TE)",
"F500":"MONTEFINO (TE)",
"F690":"MONTORIO AL VOMANO (TE)",
"F747":"<NAME> (TE)",
"F764":"<NAME> (TE)",
"F870":"NERETO (TE)",
"F942":"NOTARESCO (TE)",
"G437":"<NAME> (TE)",
"G608":"PIETRACAMELA (TE)",
"F831":"PINETO (TE)",
"H440":"<NAME> (TE)",
"F585":"<NAME> (TE)",
"I318":"SANT'<NAME> (TE)",
"I348":"SANT'OMERO (TE)",
"I741":"SILVI (TE)",
"L103":"TERAMO (TE)",
"L207":"TOR<NAME> (TE)",
"L295":"TOR<NAME>ICURA (TE)",
"L307":"TORTORETO (TE)",
"L314":"TOSSICIA (TE)",
"L597":"<NAME> (TE)",
"E989":"MARTINSICURO (TE)",
"A008":"ABBATEGGIO (PE)",
"A120":"ALANNO (PE)",
"A945":"BOLOGNANO (PE)",
"B193":"BRITTOLI (PE)",
"B294":"BUSSI SUL TIRINO (PE)",
"B681":"CAPPELLE SUL TAVO (PE)",
"B722":"<NAME> (PE)",
"B827":"<NAME> (PE)",
"C308":"CASTIGLIONE A CASAURIA (PE)",
"C354":"CATIGNANO (PE)",
"C474":"CEPAGATTI (PE)",
"C750":"CITTÀ SANT'ANGELO (PE)",
"C771":"CIVITAQUANA (PE)",
"G424":"<NAME> (PR)",
"H384":"ROCCABIANCA (PR)",
"H682":"SALA BAGANZA (PR)",
"H720":"SALSOMAGGIORE TERME (PR)",
"I850":"SORGÀ (VR)",
"L136":"TERRAZZO (VR)",
"L287":"TORRI DEL BENACO (VR)",
"L364":"TREGNAGO (VR)",
"L396":"TREVENZUOLO (VR)",
"L567":"VALEGGIO SUL MINCIO (VR)",
"L722":"VELO VERONESE (VR)",
"L781":"VERONA (VR)",
"D193":"VERONELLA (VR)",
"L810":"VESTENANOVA (VR)",
"L869":"VIGASIO (VR)",
"L912":"VILLA BARTOLOMEA (VR)",
"L949":"VILLAFRANCA DI VERONA (VR)",
"M172":"ZEVIO (VR)",
"M178":"ZIMELLA (VR)",
"A093":"AGUGLIARO (VI)",
"A154":"ALBETTONE (VI)",
"A220":"ALONTE (VI)",
"A231":"ALTAVILLA VICENTINA (VI)",
"A236":"ALTISSIMO (VI)",
"A377":"ARCUGNANO (VI)",
"A444":"ARSIERO (VI)",
"A459":"ARZIGNANO (VI)",
"A465":"ASIAGO (VI)",
"A467":"ASIGLIANO VENETO (VI)",
"A627":"BARBARANO VICENTINO (VI)",
"A703":"BASSANO DEL GRAPPA (VI)",
"A954":"BOLZANO VICENTINO (VI)",
"B132":"BREGANZE (VI)",
"B143":"BRENDOLA (VI)",
"B161":"BRESSANVIDO (VI)",
"B196":"BROGLIANO (VI)",
"B403":"CALDOGNO (VI)",
"B433":"CALTRANO (VI)",
"B441":"CALVENE (VI)",
"B485":"CAMISANO VICENTINO (VI)",
"B511":"CAMPIGLIA DEI BERICI (VI)",
"B547":"CAMPOLONGO SUL BRENTA (VI)",
"B835":"CARRÈ (VI)",
"B844":"CARTIGLIANO (VI)",
"C037":"CASSOLA (VI)",
"C056":"CASTEGNERO (VI)",
"C119":"CASTELGOMBERTO (VI)",
"C605":"CHIAMPO (VI)",
"C650":"CHIUPPANO (VI)",
"C734":"CISMON DEL GRAPPA (VI)",
"C824":"COGOLLO DEL CENGIO (VI)",
"C949":"CONCO (VI)",
"D020":"CORNEDO VICENTINO (VI)",
"D107":"COSTABISSARA (VI)",
"D136":"CREAZZO (VI)",
"D156":"CRESPADORO (VI)",
"D379":"DUEVILLE (VI)",
"D407":"ENEGO (VI)",
"D496":"FARA VICENTINO (VI)",
"D750":"FOZA (VI)",
"D882":"GALLIO (VI)",
"D897":"GAMBELLARA (VI)",
"D902":"GAMBUGLIANO (VI)",
"E184":"GRISIGNANO DI ZOCCO (VI)",
"E226":"GRUMOLO DELLE ABBADESSE (VI)",
"E354":"ISOLA VICENTINA (VI)",
"E403":"LAGHI (VI)",
"E465":"LASTEBASSE (VI)",
"E671":"LONGARE (VI)",
"E682":"LONIGO (VI)",
"E731":"LUGO DI VICENZA (VI)",
"E762":"LUSIANA (VI)",
"E864":"MALO (VI)",
"E912":"MARANO VICENTINO (VI)",
"E970":"MAROSTICA (VI)",
"F019":"MASON VICENTINO (VI)",
"F306":"MOLVENA (VI)",
"F442":"MONTEBELLO VICENTINO (VI)",
"F464":"MONTECCHIO MAGGIORE (VI)",
"F465":"MONTECCHIO PRECALCINO (VI)",
"F486":"MONTE DI MALO (VI)",
"F514":"MONTEGALDA (VI)",
"F515":"MONTEGALDELLA (VI)",
"F662":"MONTEVIALE (VI)",
"F675":"MONTICELLO CONTE OTTO (VI)",
"F696":"MONTORSO VICENTINO (VI)",
"F768":"MOSSANO (VI)",
"F829":"MUSSOLENTE (VI)",
"F838":"NANTO (VI)",
"F922":"NOGAROLE VICENTINO (VI)",
"F957":"NOVE (VI)",
"F964":"NOVENTA VICENTINA (VI)",
"G095":"ORGIANO (VI)",
"G406":"PEDEMONTE (VI)",
"G560":"PIANEZZE (VI)",
"G694":"PIOVENE ROCCHETTE (VI)",
"G776":"<NAME> (VI)",
"G931":"POSINA (VI)",
"G943":"POVE DEL GRAPPA (VI)",
"G957":"POZZOLEONE (VI)",
"H134":"QUINTO VICENTINO (VI)",
"H214":"RECOARO TERME (VI)",
"H361":"ROANA (VI)",
"H512":"<NAME>'EZZELINO (VI)",
"H556":"ROSÀ (VI)",
"H580":"<NAME> (VI)",
"H594":"ROTZO (VI)",
"F810":"SALCEDO (VI)",
"H829":"SANDRIGO (VI)",
"I047":"SAN NAZARIO (VI)",
"I117":"SAN PIETRO MUSSOLINO (VI)",
"I353":"SANTORSO (VI)",
"I401":"SAN VITO DI LEGUZZANO (VI)",
"I425":"SARCEDO (VI)",
"I430":"SAREGO (VI)",
"I527":"SCHIAVON (VI)",
"I531":"SCHIO (VI)",
"I783":"SOLAGNA (VI)",
"I867":"SOSSANO (VI)",
"I879":"SOVIZZO (VI)",
"L156":"TEZZE SUL BRENTA (VI)",
"L157":"THIENE (VI)",
"D717":"TONEZZA DEL CIMONE (VI)",
"L248":"TORREBELVICINO (VI)",
"L297":"TORRI DI QUARTESOLO (VI)",
"L433":"TRISSINO (VI)",
"L551":"VALDAGNO (VI)",
"L554":"VALDASTICO (VI)",
"L624":"VALLI DEL PASUBIO (VI)",
"L650":"VALSTAGNA (VI)",
"L723":"VELO D'ASTICO (VI)",
"L840":"VICENZA (VI)",
"L952":"VILLAGA (VI)",
"M032":"VILLAVERLA (VI)",
"M145":"ZANÈ (VI)",
"M170":"ZERMEGHEDO (VI)",
"M194":"ZOVENCEDO (VI)",
"M199":"ZUGLIANO (VI)",
"M384":"VAL LIONA (VI)",
"A083":"AGORDO (BL)",
"A121":"ALANO DI PIAVE (BL)",
"A206":"ALLEGHE (BL)",
"A443":"ARSIÈ (BL)",
"A501":"AURONZO DI CADORE (BL)",
"A757":"BELLUNO (BL)",
"A982":"BORCA DI CADORE (BL)",
"B375":"CALALZO DI CADORE (BL)",
"C458":"CENCENIGHE AGORDINO (BL)",
"C577":"CESIOMAGGIORE (BL)",
"C630":"CHIES D'ALPAGO (BL)",
"C672":"CIBIANA DI CADORE (BL)",
"C872":"<NAME> (BL)",
"C920":"COMELICO SUPERIORE (BL)",
"A266":"CORTINA D'AMPEZZO (BL)",
"D247":"DANTA DI CADORE (BL)",
"D330":"DOMEGGE DI CADORE (BL)",
"D470":"FALCADE (BL)",
"D530":"FELTRE (BL)",
"D686":"FONZASO (BL)",
"B574":"CANALE D'AGORDO (BL)",
"E113":"GOSALDO (BL)",
"E429":"LAMON (BL)",
"E490":"LA VALLE AGORDINA (BL)",
"C562":"LENTIAI (BL)",
"E588":"LIMANA (BL)",
"E622":"LIVINALLONGO DEL COL DI LANA (BL)",
"E687":"LORENZAGO DI CADORE (BL)",
"E708":"LOZZO DI CADORE (BL)",
"F094":"MEL (BL)",
"G169":"OSPITALE DI CADORE (BL)",
"G404":"PEDAVENA (BL)",
"G442":"PERAROLO DI CADORE (BL)",
"G642":"PIEVE DI CADORE (BL)",
"B662":"<NAME>PI (BL)",
"H327":"RIVAMONTE AGORDINO (BL)",
"H379":"<NAME> (BL)",
"H938":"<NAME> (BL)",
"I063":"SAN NICOLÒ DI COMELICO (BL)",
"I088":"SAN PIETRO DI CADORE (BL)",
"I206":"SANTA GIUSTINA (BL)",
"I347":"SAN TOMASO AGORDINO (BL)",
"C919":"SAN<NAME> DI CADORE (BL)",
"I392":"SAN VITO DI CADORE (BL)",
"I421":"SAPPADA (BL)",
"I563":"SEDICO (BL)",
"I592":"SELVA DI CADORE (BL)",
"I626":"SEREN DEL GRAPPA (BL)",
"I866":"SOSPIROLO (BL)",
"I876":"SOVERZENE (BL)",
"I673":"SOVRAMONTE (BL)",
"L030":"TAIBON AGORDINO (BL)",
"L040":"TAMBRE (BL)",
"L422":"TRICHIANA (BL)",
"L584":"VALLADA AGORDINA (BL)",
"L590":"VALLE DI CADORE (BL)",
"L890":"VIGO DI CADORE (BL)",
"M108":"VODO CADORE (BL)",
"M124":"VOL<NAME> (BL)",
"M189":"ZOPPÈ DI CADORE (BL)",
"M332":"QUERO VAS (BL)",
"E672":"LONGARONE (BL)",
"M375":"ALPAGO (BL)",
"G688":"PIOMBINO DESE (PD)",
"G693":"PIOVE DI SACCO (PD)",
"G802":"POLVERARA (PD)",
"G823":"PONSO (PD)",
"G850":"PONTELONGO (PD)",
"G855":"PONTE SAN NICOLÒ (PD)",
"G963":"POZZONOVO (PD)",
"H622":"ROVOLON (PD)",
"H625":"RUBANO (PD)",
"H655":"SACCOLONGO (PD)",
"H705":"SALETTO (PD)",
"H893":"SAN GIORGIO DELLE PERTICHE (PD)",
"H897":"SAN GIORGIO IN BOSCO (PD)",
"I008":"SAN MARTINO DI LUPARI (PD)",
"I107":"SAN PIETRO IN GU (PD)",
"I120":"SAN PIETRO VIMINARIO (PD)",
"I207":"SANTA GIUSTINA IN COLLE (PD)",
"I226":"SANTA MARGHERITA D'ADIGE (PD)",
"I275":"SANT'ANGELO DI PIOVE DI SACCO (PD)",
"I319":"SANT'ELENA (PD)",
"I375":"SANT'URBANO (PD)",
"I418":"SAONARA (PD)",
"I595":"SELVAZZANO DENTRO (PD)",
"I799":"SOLESINO (PD)",
"I938":"STANGHELLA (PD)",
"L100":"TEOLO (PD)",
"L132":"TERRASSA PADOVANA (PD)",
"L199":"TOMBOLO (PD)",
"L270":"TORREGLIA (PD)",
"L349":"TREBASELEGHE (PD)",
"L414":"TRIBANO (PD)",
"L497":"URBANA (PD)",
"L710":"VEGGIANO (PD)",
"L805":"VESCOVANA (PD)",
"L878":"VIGHIZZOLO D'ESTE (PD)",
"L892":"VIGODARZERE (PD)",
"L900":"VIGONZA (PD)",
"L934":"VILLA DEL CONTE (PD)",
"L937":"VILLA ESTENSE (PD)",
"L947":"VILLAFRANCA PADOVANA (PD)",
"L979":"VILLANOVA DI CAMPOSAMPIERO (PD)",
"M103":"VO' (PD)",
"M300":"DUE CARRARE (PD)",
"A059":"ADRIA (RO)",
"A400":"<NAME> (RO)",
"A435":"<NAME> (RO)",
"A539":"<NAME> (RO)",
"A574":"<NAME> (RO)",
"A795":"BERGANTINO (RO)",
"B069":"BOSARO (RO)",
"B432":"CALTO (RO)",
"B578":"CANARO (RO)",
"B582":"CANDA (RO)",
"C122":"CASTELGUGLIELMO (RO)",
"C207":"CASTELMASSA (RO)",
"C215":"<NAME> (RO)",
"C461":"CENESELLI (RO)",
"C500":"CEREGNANO (RO)",
"C987":"CORBOLA (RO)",
"D105":"COSTA DI ROVIGO (RO)",
"D161":"CRESPINO (RO)",
"D568":"FICAROLO (RO)",
"D577":"FIESSO UMBERTIANO (RO)",
"D776":"FRASSINELLE POLESINE (RO)",
"D788":"FRATTA POLESINE (RO)",
"D855":"GAIBA (RO)",
"D942":"GAVELLO (RO)",
"E008":"GI<NAME> (RO)",
"E240":"<NAME> (RO)",
"E522":"LENDINARA (RO)",
"E689":"LOREO (RO)",
"E761":"LUSIA (RO)",
"F095":"MELARA (RO)",
"F994":"OCCHIOBELLO (RO)",
"G323":"PAPOZZE (RO)",
"G525":"PET<NAME> (RO)",
"G673":"PINCARA (RO)",
"G782":"POLESELLA (RO)",
"G836":"PONTECCHIO POLESINE (RO)",
"G923":"PORTO TOLLE (RO)",
"H573":"ROSOLINA (RO)",
"H620":"ROVIGO (RO)",
"H689":"SALARA (RO)",
"H768":"SAN BELLINO (RO)",
"H996":"SAN MARTINO DI VENEZZE (RO)",
"I953":"STIENTA (RO)",
"L026":"TAGLIO DI PO (RO)",
"L359":"TRECENTA (RO)",
"L939":"VILLADOSE (RO)",
"L967":"VILLAMARZANA (RO)",
"L985":"VILLANOVA DEL GHEBBO (RO)",
"L988":"<NAME> (RO)",
"G926":"PORTO VIRO (RO)",
"A103":"<NAME> (UD)",
"A254":"AMARO (UD)",
"A267":"AMPEZZO (UD)",
"A346":"AQUILEIA (UD)",
"A447":"<NAME> (UD)",
"A448":"ARTEGNA (UD)",
"A491":"ATTIMIS (UD)",
"A553":"<NAME> (UD)",
"A700":"BASILIANO (UD)",
"A810":"BERTIOLO (UD)",
"A855":"BICINICCO (UD)",
"A983":"BORDANO (UD)",
"B259":"BUJA (UD)",
"B309":"BUTTRIO (UD)",
"B483":"CAMINO AL TAGLIAMENTO (UD)",
"B536":"CAMPOFORMIDO (UD)",
"B788":"CARLINO (UD)",
"B994":"CASSACCO (UD)",
"C327":"CASTIONS DI STRADA (UD)",
"C389":"CAVAZZO CARNICO (UD)",
"C494":"CERCIVENTO (UD)",
"C556":"CERVIGNAN<NAME> FRIULI (UD)",
"C641":"CHIOPRIS-VISCONE (UD)",
"C656":"CHIUSAFORTE (UD)",
"C758":"CIVIDALE DEL FRIULI (UD)",
"C817":"CODROIPO (UD)",
"C885":"COLLOREDO DI MONTE ALBANO (UD)",
"C918":"COMEGLIANS (UD)",
"D027":"<NAME> (UD)",
"D085":"COSEANO (UD)",
"D300":"DIGNANO (UD)",
"D316":"DOGNA (UD)",
"D366":"DRENCHIA (UD)",
"D408":"ENEMONZO (UD)",
"D455":"FAEDIS (UD)",
"D461":"FAGAGNA (UD)",
"D627":"FIUMICELLO (UD)",
"D630":"FLAIBANO (UD)",
"D718":"FORNI AVOLTRI (UD)",
"D719":"FORNI DI SOPRA (UD)",
"D720":"FORNI DI SOTTO (UD)",
"D962":"GEMONA DEL FRIULI (UD)",
"E083":"GONARS (UD)",
"E179":"GRIMACCO (UD)",
"E473":"LATISANA (UD)",
"E476":"LAUCO (UD)",
"E553":"LESTIZZA (UD)",
"E584":"LIGNANO SABBIADORO (UD)",
"E586":"LIGOSULLO (UD)",
"E760":"LUSEVERA (UD)",
"E820":"MAGNANO IN RIVIERA (UD)",
"E833":"MAJANO (UD)",
"E847":"MALBORGHETTO VALBRUNA (UD)",
"E899":"MANZANO (UD)",
"E910":"MARANO LAGUNARE (UD)",
"E982":"MARTIGNACCO (UD)",
"F144":"MERETO DI TOMBA (UD)",
"F266":"MOGGIO UDINESE (UD)",
"F275":"MOIMACCO (UD)",
"F574":"MONTENARS (UD)",
"F756":"MORTEGLIANO (UD)",
"F760":"MORUZZO (UD)",
"F832":"MUZZANA DEL TURGNANO (UD)",
"F898":"NIMIS (UD)",
"G163":"OSOPPO (UD)",
"G198":"OVARO (UD)",
"G238":"PAGNACCO (UD)",
"G268":"<NAME> (UD)",
"G284":"PALMANOVA (UD)",
"G300":"PALUZZA (UD)",
"G352":"<NAME> (UD)",
"G381":"PAULARO (UD)",
"G389":"<NAME>DINE (UD)",
"G743":"POCENIA (UD)",
"G831":"PONTEBBA (UD)",
"G891":"PORPETTO (UD)",
"G949":"POVOLETTO (UD)",
"G966":"<NAME> (UD)",
"G969":"PRADAMANO (UD)",
"H002":"<NAME> (UD)",
"H014":"PRECENICCO (UD)",
"H029":"PREMARIACCO (UD)",
"H038":"PREONE (UD)",
"H040":"PREPOTTO (UD)",
"H089":"PULFERO (UD)",
"H161":"RAGOGNA (UD)",
"H196":"RAVASCLETTO (UD)",
"H200":"RAVEO (UD)",
"H206":"<NAME> (UD)",
"H229":"REMANZACCO (UD)",
"H242":"RESIA (UD)",
"H244":"RESIUTTA (UD)",
"H289":"RIGOLATO (UD)",
"H347":"<NAME> (UD)",
"H533":"RONCHIS (UD)",
"H629":"RUDA (UD)",
"H816":"<NAME> (UD)",
"H895":"<NAME> (UD)",
"H906":"<NAME> (UD)",
"H951":"<NAME> (UD)",
"I092":"<NAME> (UD)",
"I248":"<NAME> (UD)",
"I404":"SAN VITO AL TORRE (UD)",
"I405":"SAN VITO DI FAGAGNA (UD)",
"I464":"SAURIS (UD)",
"I478":"SAVOGNA (UD)",
"I562":"SEDEGLIANO (UD)",
"I777":"SOCCHIEVE (UD)",
"I974":"STREGNA (UD)",
"L018":"SUTRIO (UD)",
"G736":"TAIPANA (UD)",
"L039":"TALMASSONS (UD)",
"L050":"TARCENTO (UD)",
"L057":"TARVISIO (UD)",
"L065":"TAVAGNACCO (UD)",
"L144":"TERZO D'AQUILEIA (UD)",
"L195":"TOLMEZZO (UD)",
"L246":"TORREANO (UD)",
"L309":"TORVISCOSA (UD)",
"L335":"TRASAGHIS (UD)",
"L381":"TREPPO CARNICO (UD)",
"L382":"TREPPO GRANDE (UD)",
"L421":"TRICESIMO (UD)",
"L438":"TRIVIGNANO UDINESE (UD)",
"L483":"UDINE (UD)",
"L686":"VARMO (UD)",
"L743":"VENZONE (UD)",
"L801":"VERZEGNIS (UD)",
"L909":"VILLA SANTINA (UD)",
"M034":"VILLA VICENTINA (UD)",
"M073":"VISCO (UD)",
"M200":"ZUGLIO (UD)",
"D700":"<NAME> (UD)",
"M311":"CAMPOLONGO TAPOGLIANO (UD)",
"M317":"RI<NAME> (UD)",
"B712":"<NAME> (GO)",
"D014":"CORMONS (GO)",
"D312":"<NAME> (GO)",
"D321":"<NAME> (GO)",
"D504":"<NAME> (GO)",
"D645":"FOGLIANO REDIPUGLIA (GO)",
"E098":"GORIZIA (GO)",
"E124":"<NAME>'ISONZO (GO)",
"E125":"GRADO (GO)",
"E952":"<NAME> (GO)",
"F081":"MEDEA (GO)",
"F356":"MONFALCONE (GO)",
"F710":"MORARO (GO)",
"F767":"MOSSA (GO)",
"H514":"<NAME> (GO)",
"H531":"<NAME> (GO)",
"H665":"SAGRADO (GO)",
"H787":"<NAME>'ISONZO (GO)",
"H845":"<NAME>LIO (GO)",
"H964":"<NAME> (GO)",
"I082":"<NAME> (GO)",
"I479":"<NAME> (GO)",
"I939":"STARANZANO (GO)",
"L474":"TURRIACO (GO)",
"M043":"VILLESSE (GO)",
"D383":"DUINO-AURISINA (TS)",
"F378":"MONRUPINO (TS)",
"F795":"MUGGIA (TS)",
"D324":"<NAME>LA VALLE-DOLINA (TS)",
"I715":"SGONICO (TS)",
"L424":"TRIESTE (TS)",
"A283":"ANDREIS (PN)",
"A354":"ARBA (PN)",
"A516":"AVIANO (PN)",
"A530":"AZZANO DECIMO (PN)",
"A640":"BARCIS (PN)",
"B215":"BRUGNERA (PN)",
"B247":"BUDOIA (PN)",
"B598":"CANEVA (PN)",
"B940":"<NAME> (PN)",
"C217":"<NAME>RIULI (PN)",
"C385":"CAVASSO NUOVO (PN)",
"C640":"CHIONS (PN)",
"C699":"CIMOLAIS (PN)",
"C790":"CLAUT (PN)",
"C791":"CLAUZETTO (PN)",
"C991":"CORDENONS (PN)",
"C993":"CORDOVADO (PN)",
"D426":"ERTO E CASSO (PN)",
"D487":"FANNA (PN)",
"D621":"FIUME VENETO (PN)",
"D670":"FONTANAFREDDA (PN)",
"D804":"FRISANCO (PN)",
"E889":"MANIAGO (PN)",
"F089":"MEDUNO (PN)",
"F596":"MONTEREALE VALCELLINA (PN)",
"F750":"MORSANO AL TAGLIAMENTO (PN)",
"G353":"PASIANO DI PORDENONE (PN)",
"G680":"PINZANO AL TAGLIAMENTO (PN)",
"G780":"POLCENIGO (PN)",
"G886":"PORCIA (PN)",
"G888":"PORDENONE (PN)",
"G994":"PRATA DI PORDENONE (PN)",
"H010":"PRAVISDOMINI (PN)",
"H609":"ROVEREDO IN PIANO (PN)",
"H657":"SACILE (PN)",
"H891":"<NAME> (PN)",
"H999":"SAN MARTINO AL TAGLIAMENTO (PN)",
"I136":"SAN QUIRINO (PN)",
"I403":"SAN VITO AL TAGLIAMENTO (PN)",
"I621":"SEQUALS (PN)",
"I686":"SESTO AL REGHENA (PN)",
"I904":"SPILIMBERGO (PN)",
"L324":"TRAMONTI DI SOPRA (PN)",
"L325":"TRAMONTI DI SOTTO (PN)",
"L347":"TRAVESIO (PN)",
"M085":"VITO D'ASIO (PN)",
"M096":"VIVARO (PN)",
"M190":"ZOPPOLA (PN)",
"M265":"VAJONT (PN)",
"M346":"<NAME> (PN)",
"A111":"AIROLE (IM)",
"A338":"APRICALE (IM)",
"A344":"AQUILA D'ARROSCIA (IM)",
"A418":"ARMO (IM)",
"A499":"AURIGO (IM)",
"A536":"BADALUCCO (IM)",
"A581":"BAJARDO (IM)",
"A984":"BORDIGHERA (IM)",
"A993":"<NAME>'ARROSCIA (IM)",
"B020":"BORGOMARO (IM)",
"B559":"CAMPOROSSO (IM)",
"B734":"CARAVONICA (IM)",
"B814":"CARPASIO (IM)",
"C143":"CASTELLARO (IM)",
"C110":"CASTEL VITTORIO (IM)",
"C511":"CERIANA (IM)",
"C559":"CERVO (IM)",
"C578":"CESIO (IM)",
"C657":"CHIUSANICO (IM)",
"C660":"CHIUSAVECCHIA (IM)",
"C718":"CIPRESSA (IM)",
"C755":"CIVEZZA (IM)",
"D087":"CO<NAME> (IM)",
"D114":"COSTARAINERA (IM)",
"D293":"DIAN<NAME> (IM)",
"D296":"DIAN<NAME> (IM)",
"D297":"DIANO MARINA (IM)",
"D298":"DIANO SAN PIETRO (IM)",
"D318":"DOLCEACQUA (IM)",
"D319":"DOLCEDO (IM)",
"E290":"IMPERIA (IM)",
"E346":"ISOLABONA (IM)",
"E719":"LUCINASCO (IM)",
"F123":"MENDATICA (IM)",
"F290":"MOLINI DI TRIORA (IM)",
"F406":"MONTALTO LIGURE (IM)",
"F528":"MONTEGROSSO PIAN LATTE (IM)",
"G041":"OLIVETTA SAN MICHELE (IM)",
"G164":"OSPEDALETTI (IM)",
"G454":"PERINALDO (IM)",
"G607":"PIETRABRUNA (IM)",
"G632":"PIEVE DI TECO (IM)",
"G660":"PIGNA (IM)",
"G814":"POMPEIANA (IM)",
"G840":"PONTEDASSIO (IM)",
"G890":"PORNASSIO (IM)",
"H027":"PRELÀ (IM)",
"H180":"RANZO (IM)",
"H257":"REZZO (IM)",
"H328":"RIVA LIGURE (IM)",
"H460":"ROCCHETTA NERVINA (IM)",
"H763":"<NAME> (IM)",
"H780":"<NAME> (IM)",
"H957":"<NAME> (IM)",
"I138":"SANREMO (IM)",
"I365":"<NAME> (IM)",
"I556":"SEBORGA (IM)",
"I796":"SOLDANO (IM)",
"L024":"TAGGIA (IM)",
"L146":"TERZORIO (IM)",
"L430":"TRIORA (IM)",
"L596":"VALLEBONA (IM)",
"L599":"VALLECROSIA (IM)",
"L693":"VASIA (IM)",
"L741":"VENTIMIGLIA (IM)",
"L809":"VESSALICO (IM)",
"L943":"VILLA FARALDI (IM)",
"A122":"ALASSIO (SV)",
"A145":"ALBENGA (SV)",
"A165":"ALBISSOLA MARINA (SV)",
"A166":"ALBISOLA SUPERIORE (SV)",
"A226":"ALTARE (SV)",
"A278":"ANDORA (SV)",
"A422":"ARNASCO (SV)",
"A593":"BALESTRINO (SV)",
"A647":"BARDINETO (SV)",
"A796":"BERGEGGI (SV)",
"A931":"BOISSANO (SV)",
"A999":"BORGHETTO SANTO SPIRITO (SV)",
"B005":"BORGIO VEREZZI (SV)",
"B048":"BORMIDA (SV)",
"B369":"<NAME> (SV)",
"B409":"CALICE LIGURE (SV)",
"B416":"CALIZZANO (SV)",
"B748":"CARCARE (SV)",
"B927":"<NAME> (SV)",
"C063":"CASTELBIANCO (SV)",
"C276":"<NAME> (SV)",
"C443":"CELLE LIGURE (SV)",
"C463":"CENGIO (SV)",
"L216":"TORGIANO (PG)",
"L397":"TREVI (PG)",
"L466":"TUORO SUL TRASIMENO (PG)",
"A619":"BARASSO (VA)",
"A645":"BARDELLO (VA)",
"A728":"<NAME> (VA)",
"M374":"<NAME> (BL)",
"A237":"ALTIVOLE (TV)",
"A360":"ARCADE (TV)",
"A471":"ASOLO (TV)",
"B061":"<NAME> (TV)",
"B128":"<NAME> (TV)",
"B349":"<NAME> (TV)",
"B678":"<NAME> (TV)",
"B744":"CARBONERA (TV)",
"B879":"CAS<NAME>UL SILE (TV)",
"B965":"CASIER (TV)",
"C073":"CASTELCUCCO (TV)",
"C111":"<NAME> (TV)",
"C190":"<NAME> (TV)",
"C384":"<NAME> (TV)",
"C580":"CESSALTO (TV)",
"C614":"CHIARANO (TV)",
"C689":"CIMADOLMO (TV)",
"C735":"<NAME> (TV)",
"C815":"CODOGNÈ (TV)",
"C848":"<NAME> (TV)",
"C957":"CONEGLIANO (TV)",
"C992":"CORDIGNANO (TV)",
"D030":"CORNUDA (TV)",
"D157":"CRESPANO DEL GRAPPA (TV)",
"C670":"CROCETTA DEL MONTELLO (TV)",
"D505":"FARRA DI SOLIGO (TV)",
"D654":"FOLLINA (TV)",
"D674":"FONTANELLE (TV)",
"D680":"FONTE (TV)",
"D794":"FREGONA (TV)",
"D854":"GAIARINE (TV)",
"E021":"GIAVERA DEL MONTELLO (TV)",
"E071":"GODEGA DI SANT'URBANO (TV)",
"E092":"GORGO AL MONTICANO (TV)",
"E373":"ISTRANA (TV)",
"E692":"LORIA (TV)",
"E893":"MANSUÈ (TV)",
"E940":"MARENO DI PIAVE (TV)",
"F009":"MASER (TV)",
"F012":"MASERADA SUL PIAVE (TV)",
"F088":"MEDUNA DI LIVENZA (TV)",
"F190":"MIANE (TV)",
"F269":"MOGLIANO VENETO (TV)",
"F332":"MONASTIER DI TREVISO (TV)",
"F360":"MONFUMO (TV)",
"F443":"MONTEBELLUNA (TV)",
"F725":"MORGANO (TV)",
"F729":"MORIAGO DELLA BATTAGLIA (TV)",
"F770":"MOTTA DI LIVENZA (TV)",
"F872":"NERVESA DELLA BATTAGLIA (TV)",
"F999":"ODERZO (TV)",
"G115":"ORMELLE (TV)",
"G123":"ORSAGO (TV)",
"G221":"PADERNO DEL GRAPPA (TV)",
"G229":"PAESE (TV)",
"G408":"PEDEROBBA (TV)",
"G645":"PIEVE DI SOLIGO (TV)",
"G846":"PONTE DI PIAVE (TV)",
"G875":"PONZANO VENETO (TV)",
"G909":"PORTOBUFFOLÈ (TV)",
"G933":"POSSAGNO (TV)",
"G944":"POVEGLIANO (TV)",
"H022":"PREGANZIOL (TV)",
"H131":"QUINTO DI TREVISO (TV)",
"H220":"REFRONTOLO (TV)",
"H238":"RESANA (TV)",
"H253":"<NAME> (TV)",
"H280":"RIESE PIO X (TV)",
"H523":"RONCADE (TV)",
"H706":"SALGAREDA (TV)",
"H781":"<NAME> (TV)",
"H843":"SAN FIOR (TV)",
"I103":"<NAME>TO (TV)",
"I124":"<NAME>IAVE (TV)",
"I221":"<NAME> (TV)",
"I382":"SAN VENDEMIANO (TV)",
"I417":"SAN ZENONE DEGLI EZZELINI (TV)",
"I435":"SARMEDE (TV)",
"I578":"SEGUSINO (TV)",
"I635":"<NAME>TAGLIA (TV)",
"F116":"SILEA (TV)",
"I927":"SPRESIANO (TV)",
"L014":"SUSEGANA (TV)",
"L058":"TARZO (TV)",
"L402":"TREVIGNANO (TV)",
"L407":"TREVISO (TV)",
"L565":"VALDOBBIADENE (TV)",
"L700":"VAZZOLA (TV)",
"L706":"VEDELAGO (TV)",
"L856":"VIDOR (TV)",
"M048":"VILLORBA (TV)",
"M089":"VITTORIO VENETO (TV)",
"M118":"VOLPAGO DEL MONTELLO (TV)",
"M163":"ZENSON DI PIAVE (TV)",
"M171":"ZERO BRANCO (TV)",
"A302":"ANNONE VENETO (VE)",
"B493":"CAMPAGNA LUPIA (VE)",
"B546":"CAMPOLONGO MAGGIORE (VE)",
"B554":"CAMPONOGARA (VE)",
"B642":"CAORLE (VE)",
"C383":"CAVARZERE (VE)",
"C422":"CEGGIA (VE)",
"C638":"CHIOGGIA (VE)",
"C714":"CINTO CAOMAGGIORE (VE)",
"C938":"CONA (VE)",
"C950":"CON<NAME> (VE)",
"D325":"DOLO (VE)",
"D415":"ERACLEA (VE)",
"D578":"FIESSO D'ARTICO (VE)",
"D740":"FOSSALTA DI PIAVE (VE)",
"D741":"FOSSALTA DI PORTOGRUARO (VE)",
"D748":"FOSSÒ (VE)",
"E215":"GRUARO (VE)",
"C388":"JESOLO (VE)",
"E936":"MARCON (VE)",
"E980":"MARTELLAGO (VE)",
"F130":"MEOLO (VE)",
"F229":"MIRA (VE)",
"F241":"MIRANO (VE)",
"F826":"MUSILE DI PIAVE (VE)",
"F904":"NOALE (VE)",
"F963":"NOVENTA DI PIAVE (VE)",
"G565":"PIANIGA (VE)",
"G914":"PORTOGRUARO (VE)",
"G981":"PRAMAGGIORE (VE)",
"H117":"<NAME> (VE)",
"H735":"SALZANO (VE)",
"H823":"SAN DONÀ DI PIAVE (VE)",
"I040":"SAN MICHELE AL TAGLIAMENTO (VE)",
"I242":"<NAME> (VE)",
"I373":"SAN STINO DI LIVENZA (VE)",
"I551":"SCORZÈ (VE)",
"I908":"SPINEA (VE)",
"I965":"STRA (VE)",
"L085":"TEGLIO VENETO (VE)",
"L267":"TORRE DI MOSTO (VE)",
"L736":"VENEZIA (VE)",
"L899":"VIGONOVO (VE)",
"M308":"CAVALLINO-TREPORTI (VE)",
"A001":"ABANO TERME (PD)",
"A075":"AGNA (PD)",
"A161":"ALBIGNASEGO (PD)",
"A296":"ANGUILLARA VENETA (PD)",
"A434":"ARQUÀ PETRARCA (PD)",
"A438":"ARRE (PD)",
"A458":"ARZERGRANDE (PD)",
"A568":"BAGNOLI DI SOPRA (PD)",
"A613":"BAONE (PD)",
"A637":"BARBONA (PD)",
"A714":"BATTAGLIA TERME (PD)",
"A906":"BOARA PISANI (PD)",
"B031":"BORGORICCO (PD)",
"B106":"BOVOLENTA (PD)",
"B213":"BRUGINE (PD)",
"B345":"CADONEGHE (PD)",
"B524":"CAMPODARSEGO (PD)",
"B531":"CAMPODORO (PD)",
"B563":"CAMPOSAMPIERO (PD)",
"B564":"CAMPO SAN MARTINO (PD)",
"B589":"CANDIANA (PD)",
"B749":"CARCERI (PD)",
"B795":"CARMIGNANO DI BRENTA (PD)",
"B848":"CARTURA (PD)",
"B877":"CASALE DI SCODOSIA (PD)",
"B912":"CASALSERUGO (PD)",
"C057":"CASTELBALDO (PD)",
"C544":"CER<NAME> (PD)",
"C713":"CINTO EUGANEO (PD)",
"C743":"CITTADELLA (PD)",
"C812":"CODEVIGO (PD)",
"C964":"CONSELVE (PD)",
"D040":"CORREZZOLA (PD)",
"D226":"CURTAROLO (PD)",
"D442":"ESTE (PD)",
"D679":"FONTANIVA (PD)",
"D879":"GALLIERA VENETA (PD)",
"D889":"GALZIGNANO TERME (PD)",
"D956":"GAZZO (PD)",
"E145":"GRANTORTO (PD)",
"E146":"GRANZE (PD)",
"E515":"LEGNARO (PD)",
"E592":"LIMENA (PD)",
"E684":"LOREGGIA (PD)",
"E709":"LOZZO ATESTINO (PD)",
"F011":"MASERÀ DI PADOVA (PD)",
"F013":"MASI (PD)",
"F033":"MASSANZAGO (PD)",
"F091":"MEGLIADINO SAN FIDENZIO (PD)",
"F092":"MEGLIADINO SAN VITALE (PD)",
"F148":"MERLARA (PD)",
"F161":"MESTRINO (PD)",
"F382":"MONSELICE (PD)",
"F394":"MONTAGNANA (PD)",
"F529":"MONTEGROTTO TERME (PD)",
"F962":"NOVENTA PADOVANA (PD)",
"G167":"OSPEDALETTO EUGANEO (PD)",
"G224":"PADOVA (PD)",
"G461":"PERNUMIA (PD)",
"G534":"PIACENZA D'ADIGE (PD)",
"G587":"PIAZZOLA SUL BRENTA (PD)",
"I153":"SAN <NAME> (PR)",
"I803":"SOLIGNANO (PR)",
"I840":"SORAGNA (PR)",
"I845":"SORBOLO (PR)",
"E548":"TERENZO (PR)",
"L183":"<NAME> (PR)",
"L229":"TORNOLO (PR)",
"L299":"TORRILE (PR)",
"L346":"TRAVERSETOLO (PR)",
"L641":"VALMOZZOLA (PR)",
"L672":"VARANO DE' MELEGARI (PR)",
"L689":"VARSI (PR)",
"M325":"<NAME> (PR)",
"M367":"<NAME> (PR)",
"A162":"ALBINEA (RE)",
"A573":"BAGNOLO IN PIANO (RE)",
"A586":"BAISO (RE)",
"A850":"BIBBIANO (RE)",
"A988":"BORETTO (RE)",
"B156":"BRESCELLO (RE)",
"B328":"CADELBOSCO DI SOPRA (RE)",
"B499":"CAMPAGNOLA EMILIA (RE)",
"B502":"CAMPEGINE (RE)",
"B825":"CARPINETI (RE)",
"B893":"CASALGRANDE (RE)",
"B967":"CASINA (RE)",
"C141":"CASTELLARANO (RE)",
"C218":"<NAME> (RE)",
"C219":"<NAME> (RE)",
"C405":"CAVRIAGO (RE)",
"C669":"CANOSSA (RE)",
"D037":"CORREGGIO (RE)",
"D450":"FABBRICO (RE)",
"D934":"GATTATICO (RE)",
"E232":"GUALTIERI (RE)",
"E253":"GUASTALLA (RE)",
"E772":"LUZZARA (RE)",
"F463":"<NAME> (RE)",
"F960":"NOVELLARA (RE)",
"G947":"POVIGLIO (RE)",
"H122":"<NAME> (RE)",
"H225":"REGGIOLO (RE)",
"H223":"<NAME> (RE)",
"H298":"<NAME> (RE)",
"H500":"ROLO (RE)",
"H628":"RUBIERA (RE)",
"I011":"<NAME>IO (RE)",
"I123":"<NAME> (RE)",
"I342":"<NAME>'ENZA (RE)",
"I496":"SCANDIANO (RE)",
"L184":"TOANO (RE)",
"L815":"VETTO (RE)",
"L820":"<NAME> (RE)",
"L831":"VIANO (RE)",
"L969":"VILLA MINOZZO (RE)",
"M364":"VENTASSO (RE)",
"A713":"BASTIGLIA (MO)",
"A959":"BOMPORTO (MO)",
"B539":"CAMPOGALLIANO (MO)",
"B566":"CAMPOSANTO (MO)",
"B819":"CARPI (MO)",
"C107":"CASTELFRANCO EMILIA (MO)",
"C242":"CASTELNUOVO RANGONE (MO)",
"C287":"CASTELVETRO DI MODENA (MO)",
"C398":"CAVEZZO (MO)",
"C951":"CONCORDIA SULLA SECCHIA (MO)",
"D486":"FANANO (MO)",
"D599":"FINALE EMILIA (MO)",
"D607":"FIORANO MODENESE (MO)",
"D617":"FIUMALBO (MO)",
"D711":"FORMIGINE (MO)",
"D783":"FRASSINORO (MO)",
"E264":"GUIGLIA (MO)",
"E426":"LAMA MOCOGNO (MO)",
"E904":"MARANELLO (MO)",
"E905":"MARANO SUL PANARO (MO)",
"F087":"MEDOLLA (MO)",
"F240":"MIRANDOLA (MO)",
"F257":"MODENA (MO)",
"F484":"MONTECRETO (MO)",
"F503":"MONTEFIORINO (MO)",
"F642":"MONTESE (MO)",
"F930":"NONANTOLA (MO)",
"F966":"NOVI DI MODENA (MO)",
"G250":"PALAGANO (MO)",
"G393":"PAVULLO NEL FRIGNANO (MO)",
"G649":"PIEVEPELAGO (MO)",
"G789":"POLINAGO (MO)",
"H061":"PRIGNANO SULLA SECCHIA (MO)",
"H195":"RAVARINO (MO)",
"H303":"RIOLUNATO (MO)",
"H794":"SAN <NAME>UL PANARO (MO)",
"H835":"SAN FELICE SUL PANARO (MO)",
"I128":"SAN POSSIDONIO (MO)",
"I133":"SAN PROSPERO (MO)",
"I462":"SASSUOLO (MO)",
"I473":"<NAME>UL PANARO (MO)",
"F357":"SERRAMAZZONI (MO)",
"I689":"SESTOLA (MO)",
"I802":"SOLIERA (MO)",
"I903":"SPILAMBERTO (MO)",
"L885":"VIGNOLA (MO)",
"M183":"ZOCCA (MO)",
"A324":"<NAME> (BO)",
"A392":"ARGELATO (BO)",
"A665":"BARICELLA (BO)",
"A785":"BENTIVOGLIO (BO)",
"A944":"BOLOGNA (BO)",
"B044":"<NAME> (BO)",
"B249":"BUDRIO (BO)",
"B399":"<NAME> (BO)",
"B572":"CAMUGNANO (BO)",
"B880":"<NAME> (BO)",
"B892":"CASALFIUMANESE (BO)",
"C075":"<NAME> (BO)",
"C086":"<NAME> (BO)",
"B969":"<NAME> (BO)",
"C121":"<NAME> (BO)",
"C185":"<NAME> (BO)",
"C204":"<NAME> (BO)",
"C265":"<NAME> (BO)",
"C292":"CASTENASO (BO)",
"C296":"<NAME> (BO)",
"D166":"CREVALCORE (BO)",
"D360":"DOZZA (BO)",
"D668":"FONTANELICE (BO)",
"D847":"<NAME> (BO)",
"D878":"GALLIERA (BO)",
"E136":"<NAME>'EMILIA (BO)",
"E187":"<NAME> (BO)",
"E289":"IMOLA (BO)",
"A771":"LIZZANO IN BELVEDERE (BO)",
"E655":"LOIANO (BO)",
"E844":"MALALBERGO (BO)",
"B689":"MARZABOTTO (BO)",
"F083":"MEDICINA (BO)",
"F219":"MINERBIO (BO)",
"F288":"MOLINELLA (BO)",
"F363":"MONGHIDORO (BO)",
"F597":"MONTERENZIO (BO)",
"F627":"<NAME> PIETRO (BO)",
"F706":"MONZUNO (BO)",
"F718":"MORDANO (BO)",
"G205":"OZZANO DELL'EMILIA (BO)",
"G570":"PIANORO (BO)",
"G643":"PIEVE DI CENTO (BO)",
"H678":"SALA BOLOGNESE (BO)",
"G566":"SAN <NAME> DI SAMBRO (BO)",
"H896":"<NAME> PIANO (BO)",
"G467":"SAN GIOVANNI IN PERSICETO (BO)",
"H945":"<NAME> SAVENA (BO)",
"I110":"SAN PIETRO IN CASALE (BO)",
"I191":"SANT'AGATA BOLOGNESE (BO)",
"G972":"<NAME> (BO)",
"L762":"VERGATO (BO)",
"M185":"ZOLA PREDOSA (BO)",
"M320":"VALSAMOGGIA (BO)",
"M369":"ALTO RENO TERME (BO)",
"A393":"ARGENTA (FE)",
"A806":"BERRA (FE)",
"A965":"BONDENO (FE)",
"C469":"CENTO (FE)",
"C814":"CODIGORO (FE)",
"C912":"COMACCHIO (FE)",
"C980":"COPPARO (FE)",
"D548":"FERRARA (FE)",
"D713":"FORMIGNANA (FE)",
"E320":"<NAME> (FE)",
"E410":"LAGOSANTO (FE)",
"F016":"<NAME> (FE)",
"F156":"MESOLA (FE)",
"G184":"OSTELLATO (FE)",
"G768":"POGGIO RENATICO (FE)",
"G916":"PORTOMAGGIORE (FE)",
"H360":"RO (FE)",
"L868":"<NAME> (FE)",
"M110":"VOGHIERA (FE)",
"L390":"TRESIGALLO (FE)",
"E107":"GORO (FE)",
"F026":"FISCAGLIA (FE)",
"M381":"<NAME> (FE)",
"A191":"ALFONSINE (RA)",
"A547":"BAGNACAVALLO (RA)",
"A551":"<NAME> (RA)",
"B188":"BRISIGHELLA (RA)",
"B982":"<NAME> (RA)",
"C065":"<NAME> (RA)",
"C553":"CERVIA (RA)",
"C963":"CONSELICE (RA)",
"D121":"COTIGNOLA (RA)",
"D458":"FAENZA (RA)",
"D829":"FUSIGNANO (RA)",
"E730":"LUGO (RA)",
"F029":"<NAME> (RA)",
"H199":"RAVENNA (RA)",
"H302":"<NAME> (RA)",
"H642":"RUSSI (RA)",
"I196":"SANT'AGATA SUL SANTERNO (RA)",
"I787":"SOLAROLO (RA)",
"A565":"<NAME> (FC)",
"A809":"BERTINORO (FC)",
"B001":"BORGHI (FC)",
"C339":"<NAME> E TERRA DEL SOLE (FC)",
"C573":"CESENA (FC)",
"C574":"CESENATICO (FC)",
"C777":"<NAME> (FC)",
"D357":"DOVADOLA (FC)",
"D704":"FORLÌ (FC)",
"D705":"FORLIMPOPOLI (FC)",
"D867":"GALEATA (FC)",
"D899":"GAMBETTOLA (FC)",
"D935":"GATTEO (FC)",
"E675":"LONGIANO (FC)",
"F097":"MELDOLA (FC)",
"F139":"MERCATO SARACENO (FC)",
"F259":"MODIGLIANA (FC)",
"F668":"MONTIANO (FC)",
"G904":"PORTICO E SAN BENEDETTO (FC)",
"H017":"PREDAPPIO (FC)",
"H034":"PREMILCUORE (FC)",
"H437":"ROCCA SAN CASCIANO (FC)",
"H542":"RONCOFREDDO (FC)",
"I027":"SAN MAURO PASCOLI (FC)",
"I310":"SANTA SOFIA (FC)",
"I444":"SARSINA (FC)",
"I472":"SAVIGNANO SUL RUBICONE (FC)",
"I779":"SOGLIANO AL RUBICONE (FC)",
"L361":"TREDOZIO (FC)",
"L764":"VERGHERETO (FC)",
"A747":"BELLARIA-IGEA MARINA (RN)",
"C357":"CATTOLICA (RN)",
"D004":"CORIANO (RN)",
"D961":"GEMMANO (RN)",
"F244":"MISANO ADRIATICO (RN)",
"F346":"MONDAINO (RN)",
"F502":"MONTEFIORE CONCA (RN)",
"F523":"MONTEGRIDOLFO (RN)",
"F715":"MORCIANO DI ROMAGNA (RN)",
"H274":"RICCIONE (RN)",
"H294":"RIMINI (RN)",
"H724":"SALUDECIO (RN)",
"H801":"SAN CLEMENTE (RN)",
"H921":"SAN GIOVANNI IN MARIGNANO (RN)",
"I304":"SANTARCANGELO DI ROMAGNA (RN)",
"L797":"VERUCCHIO (RN)",
"C080":"CASTELDELCI (RN)",
"E838":"MAIOLO (RN)",
"F137":"NOVAFELTRIA (RN)",
"G433":"PENNABILLI (RN)",
"H949":"SAN LEO (RN)",
"I201":"SANT'AGATA FELTRIA (RN)",
"L034":"TALAMELLO (RN)",
"M324":"POGGIO TORRIANA (RN)",
"M368":"MONTESCUDO-MONTE COLOMBO (RN)",
"A496":"AULLA (MS)",
"A576":"BAGNONE (MS)",
"B832":"CARRARA (MS)",
"B979":"CASOLA IN LUNIGIANA (MS)",
"C914":"COMANO (MS)",
"D590":"FILATTIERA (MS)",
"D629":"FIVIZZANO (MS)",
"D735":"FOSDINOVO (MS)",
"E574":"LICCIANA NARDI (MS)",
"F023":"MASSA (MS)",
"F679":"MONTIGNOSO (MS)",
"F802":"MULAZZO (MS)",
"G746":"PODENZANA (MS)",
"G870":"PONTREMOLI (MS)",
"L386":"TRESANA (MS)",
"L946":"VILLAFRANCA IN LUNIGIANA (MS)",
"M169":"ZERI (MS)",
"A241":"ALTOPASCIO (LU)",
"A560":"BAGNI DI LUCCA (LU)",
"A657":"BARGA (LU)",
"B007":"BORGO A MOZZANO (LU)",
"B455":"CAMAIORE (LU)",
"B557":"CAMPORGIANO (LU)",
"B648":"CAPANNORI (LU)",
"B760":"CAREGGINE (LU)",
"C236":"CASTELNUOVO DI GARFAGNANA (LU)",
"C303":"CASTIGLIONE DI GARFAGNANA (LU)",
"C996":"COREGLIA ANTELMINELLI (LU)",
"D730":"FORTE DEI MARMI (LU)",
"D734":"FOSCIANDORA (LU)",
"D874":"GALLICANO (LU)",
"E715":"LUCCA (LU)",
"F035":"MASSAROSA (LU)",
"F225":"MINUCCIANO (LU)",
"F283":"MOLAZZANA (LU)",
"F452":"MONTECARLO (LU)",
"G480":"PESCAGLIA (LU)",
"G582":"PIAZZA AL SERCHIO (LU)",
"G628":"PIETRASANTA (LU)",
"G648":"PIEVE FOSCIANA (LU)",
"G882":"PORCARI (LU)",
"I142":"SAN ROMANO IN GARFAGNANA (LU)",
"I622":"SERAVEZZA (LU)",
"I942":"STAZZEMA (LU)",
"L533":"V<NAME> (LU)",
"L833":"VIAREGGIO (LU)",
"L913":"VILLA BASILICA (LU)",
"L926":"VILLA COLLEMANDINA (LU)",
"M319":"<NAME> (LU)",
"M347":"SILLANO GIUNCUGNANO (LU)",
"A071":"AGLIANA (PT)",
"B251":"BUGGIANO (PT)",
"E432":"LAMPORECCHIO (PT)",
"E451":"LARCIANO (PT)",
"E960":"MARLIANA (PT)",
"F025":"MASSA E COZZILE (PT)",
"F384":"MONSUMMANO TERME (PT)",
"F410":"MONTALE (PT)",
"A561":"MONTECATINI-TERME (PT)",
"G491":"PESCIA (PT)",
"G636":"PIEVE A NIEVOLE (PT)",
"G713":"PISTOIA (PT)",
"G833":"PONTE BUGGIANESE (PT)",
"H109":"QUARRATA (PT)",
"H744":"SAMBUCA PISTOIESE (PT)",
"I660":"SERRAVALLE PISTOIESE (PT)",
"L522":"UZZANO (PT)",
"C631":"CHIESINA UZZANESE (PT)",
"M376":"AB<NAME> (PT)",
"M377":"SAN MARCELLO PITEGLIO (PT)",
"A564":"BAGNO A RIPOLI (FI)",
"A632":"<NAME> (FI)",
"A633":"<NAME> (FI)",
"B036":"BORGO SAN LORENZO (FI)",
"B406":"CALENZANO (FI)",
"B507":"CAM<NAME> (FI)",
"B684":"CAPRAIA E LIMITE (FI)",
"C101":"CASTELFIORENTINO (FI)",
"C529":"CERRETO GUIDI (FI)",
"C540":"CERTALDO (FI)",
"D299":"DICOMANO (FI)",
"D403":"EMPOLI (FI)",
"D575":"FIESOLE (FI)",
"D612":"FIRENZE (FI)",
"D613":"FIRENZUOLA (FI)",
"D815":"FUCECCHIO (FI)",
"D895":"GAMBASSI TERME (FI)",
"E169":"GREVE IN CHIANTI (FI)",
"E291":"IMPRUNETA (FI)",
"E466":"LASTRA A SIGNA (FI)",
"E668":"LONDA (FI)",
"E971":"MARRADI (FI)",
"F398":"MONTAIONE (FI)",
"F551":"<NAME> (FI)",
"F648":"MONTESPERTOLI (FI)",
"G270":"PALAZZUOLO SUL SENIO (FI)",
"G420":"PELAGO (FI)",
"G825":"PONTASSIEVE (FI)",
"H222":"REGGELLO (FI)",
"H286":"RIGNANO SULL'ARNO (FI)",
"H635":"RUFINA (FI)",
"H791":"<NAME> IN VAL DI PESA (FI)",
"H937":"SAN GODENZO (FI)",
"B962":"SCANDICCI (FI)",
"I684":"<NAME> (FI)",
"I728":"SIGNA (FI)",
"L067":"<NAME> DI PESA (FI)",
"L529":"VAGLIA (FI)",
"L838":"VICCHIO (FI)",
"M059":"VINCI (FI)",
"M321":"FIGLINE E <NAME> (FI)",
"M326":"SCARPERIA E <NAME> (FI)",
"A852":"BIBBONA (LI)",
"B509":"<NAME> (LI)",
"B553":"<NAME> (LI)",
"B669":"CAPOLIVERI (LI)",
"B685":"<NAME> (LI)",
"C044":"<NAME> (LI)",
"C415":"CECINA (LI)",
"C869":"COLLESALVETTI (LI)",
"E625":"LIVORNO (LI)",
"E930":"MARCIANA (LI)",
"E931":"<NAME> (LI)",
"G687":"PIOMBINO (LI)",
"E680":"POR<NAME> (LI)",
"G912":"PORTOFERRAIO (LI)",
"H305":"<NAME> (LI)",
"H297":"<NAME> (LI)",
"H570":"<NAME> (LI)",
"I390":"SAN VINCENZO (LI)",
"I454":"SASSETTA (LI)",
"L019":"SUVERETO (LI)",
"A864":"BIENTINA (PI)",
"B303":"BUTI (PI)",
"B390":"CALCI (PI)",
"B392":"CALCINAIA (PI)",
"B647":"CAPANNOLI (PI)",
"B878":"<NAME> (PI)",
"B950":"CASCINA (PI)",
"C794":"CLES (TN)",
"C797":"CLOZ (TN)",
"C931":"COMMEZZADURA (TN)",
"D188":"CROVIANA (TN)",
"D243":"DAIANO (TN)",
"D246":"DAMBEL (TN)",
"D273":"DENNO (TN)",
"D365":"DRENA (TN)",
"D371":"DRO (TN)",
"D457":"FAEDO (TN)",
"D468":"<NAME> (TN)",
"D565":"FIAVÈ (TN)",
"D573":"FIEROZZO (TN)",
"D651":"FOLGARIA (TN)",
"D663":"FONDO (TN)",
"D714":"FORNACE (TN)",
"D775":"FRASSILONGO (TN)",
"D928":"GARNIGA TERME (TN)",
"E048":"GIOVO (TN)",
"E065":"GIUSTINO (TN)",
"E178":"GRIGNO (TN)",
"E288":"IMER (TN)",
"E334":"ISERA (TN)",
"E492":"LAVARONE (TN)",
"E500":"LAVIS (TN)",
"E565":"LEVICO TERME (TN)",
"E624":"LIVO (TN)",
"E664":"LONA-LASES (TN)",
"E757":"LUSERNA (TN)",
"E850":"MALÈ (TN)",
"E866":"MALOSCO (TN)",
"F045":"MASSIMENO (TN)",
"F068":"MAZZIN (TN)",
"F168":"MEZZANA (TN)",
"F176":"MEZZANO (TN)",
"F183":"MEZZOCORONA (TN)",
"F187":"MEZZOLOMBARDO (TN)",
"F263":"MOENA (TN)",
"F307":"MOLVENO (TN)",
"F728":"MORI (TN)",
"F835":"NAGO-TORBOLE (TN)",
"F853":"NAVE SAN ROCCO (TN)",
"F920":"NOGAREDO (TN)",
"F929":"NOMI (TN)",
"F947":"NOVALEDO (TN)",
"G168":"OSPEDALETTO (TN)",
"G173":"OSSANA (TN)",
"G296":"PALÙ DEL FERSINA (TN)",
"G305":"PANCHIÀ (TN)",
"M303":"RONZO-CHIENIS (TN)",
"G419":"PEIO (TN)",
"G428":"PELLIZZANO (TN)",
"G429":"PELUGO (TN)",
"G452":"PERGINE VALSUGANA (TN)",
"G656":"PIEVE TESINO (TN)",
"G681":"PINZOLO (TN)",
"G808":"POMAROLO (TN)",
"G950":"POZZA DI FASSA (TN)",
"H018":"PREDAZZO (TN)",
"H146":"RABBI (TN)",
"H254":"REVÒ (TN)",
"H330":"RIVA DEL GARDA (TN)",
"H506":"ROMALLO (TN)",
"H517":"ROMENO (TN)",
"H528":"RONCEGNO TERME (TN)",
"H532":"RONCHI VALSUGANA (TN)",
"H552":"RONZONE (TN)",
"H607":"ROVERÈ DELLA LUNA (TN)",
"H612":"ROVERETO (TN)",
"H634":"RUFFRÈ-MENDOLA (TN)",
"H639":"RUMO (TN)",
"H666":"<NAME> (TN)",
"H754":"SAMONE (TN)",
"I042":"<NAME> (TN)",
"I354":"<NAME> (TN)",
"I411":"SANZENO (TN)",
"I439":"SARNONICO (TN)",
"I554":"SCURELLE (TN)",
"I576":"SEGONZANO (TN)",
"I714":"SFRUZ (TN)",
"I839":"<NAME> (TN)",
"I871":"SOVER (TN)",
"I899":"SPIAZZO (TN)",
"I924":"SPORMAGGIORE (TN)",
"I925":"SPORMINORE (TN)",
"I949":"STENICO (TN)",
"I964":"STORO (TN)",
"I975":"STREMBO (TN)",
"L089":"TELVE (TN)",
"L090":"TELVE DI SOPRA (TN)",
"L096":"TENNA (TN)",
"L097":"TENNO (TN)",
"L121":"TERRAGNOLO (TN)",
"L145":"TERZOLAS (TN)",
"L147":"TESERO (TN)",
"L174":"TIONE DI TRENTO (TN)",
"L200":"TON (TN)",
"L211":"TORCEGNO (TN)",
"L322":"TRAMBILENO (TN)",
"L378":"TRENTO (TN)",
"L575":"VALFLORIANA (TN)",
"L588":"VALLARSA (TN)",
"L678":"VARENA (TN)",
"L769":"VERMIGLIO (TN)",
"L886":"VIGNOLA-FALESINA (TN)",
"L893":"VIGO DI FASSA (TN)",
"L957":"VILLA LAGARINA (TN)",
"M113":"VOLANO (TN)",
"M142":"ZAMBANA (TN)",
"M173":"ZIANO DI FIEMME (TN)",
"M314":"COMANO TERME (TN)",
"M313":"LEDRO (TN)",
"M344":"PREDAIA (TN)",
"M345":"<NAME> (TN)",
"M343":"VALDAONE (TN)",
"M366":"<NAME> (TN)",
"M365":"PIEVE DI BONO-PREZZO (TN)",
"M349":"ALTAVALLE (TN)",
"M350":"ALTOPIAN<NAME>IGOLANA (TN)",
"M351":"AMBLAR-DON (TN)",
"M352":"BORGO CHIESE (TN)",
"M353":"BORGO LARES (TN)",
"M354":"<NAME> (TN)",
"M355":"CEMBRA LISIGNAGO (TN)",
"M356":"CONTÀ (TN)",
"M357":"MADRUZZO (TN)",
"M358":"PORTE DI RENDENA (TN)",
"M359":"PRIMIERO SAN <NAME> (TN)",
"M360":"SELLA GIUDICARIE (TN)",
"M361":"TRE VILLE (TN)",
"M362":"VALLELAGHI (TN)",
"M363":"VILLE D'ANAUNIA (TN)",
"A061":"AFFI (VR)",
"A137":"<NAME>'ADIGE (VR)",
"A292":"ANGIARI (VR)",
"A374":"ARCOLE (VR)",
"A540":"BADIA CALAVENA (VR)",
"A650":"BARDOLINO (VR)",
"A737":"BELFIORE (VR)",
"A837":"BEVILACQUA (VR)",
"A964":"BONAVIGO (VR)",
"B070":"BOSCHI SANT'ANNA (VR)",
"B073":"BOSCO CHIESANUOVA (VR)",
"B107":"BOVOLONE (VR)",
"B152":"BRENTINO BELLUNO (VR)",
"B154":"BRENZONE SUL GARDA (VR)",
"B296":"BUSSOLENGO (VR)",
"B304":"BUTTAPIETRA (VR)",
"B402":"CALDIERO (VR)",
"B709":"CAPRINO VERONESE (VR)",
"B886":"CASALEONE (VR)",
"C041":"CASTAGNARO (VR)",
"C078":"<NAME> (VR)",
"C225":"<NAME> (VR)",
"C370":"CAVAION VERONESE (VR)",
"C412":"CAZZANO DI TRAMIGNA (VR)",
"C498":"CEREA (VR)",
"C538":"CERRO VERONESE (VR)",
"C890":"COLOGNA VENETA (VR)",
"C897":"COLOGNOLA AI COLLI (VR)",
"C943":"CONCAMARISE (VR)",
"D118":"COSTERMANO SUL GARDA (VR)",
"D317":"DOLCÈ (VR)",
"D419":"ERBÈ (VR)",
"D420":"ERBEZZO (VR)",
"D549":"FERRARA DI MONTE BALDO (VR)",
"D818":"FUMANE (VR)",
"D915":"GARDA (VR)",
"D957":"GAZZO VERONESE (VR)",
"E171":"GREZZANA (VR)",
"E284":"ILLASI (VR)",
"E349":"ISOLA DELLA SCALA (VR)",
"E358":"ISOLA RIZZA (VR)",
"E489":"LAVAGNO (VR)",
"E502":"LAZISE (VR)",
"E512":"LEGNAGO (VR)",
"E848":"MALCESINE (VR)",
"E911":"MAR<NAME> (VR)",
"F172":"ME<NAME> (VR)",
"F218":"MINERBE (VR)",
"F461":"<NAME> (VR)",
"F508":"MONTEFORTE D'ALPONE (VR)",
"F789":"MOZZECANE (VR)",
"F861":"NEGRAR (VR)",
"F918":"NOGARA (VR)",
"F921":"NOGAROLE ROCCA (VR)",
"G080":"OPPEANO (VR)",
"G297":"PALÙ (VR)",
"G365":"PASTRENGO (VR)",
"G481":"PESCANTINA (VR)",
"G489":"PESCHIERA DEL GARDA (VR)",
"G945":"POVEGLIANO VERONESE (VR)",
"H048":"PRESSANA (VR)",
"H356":"RIVOLI VERONESE (VR)",
"H522":"RONCÀ (VR)",
"H540":"RONCO ALL'ADIGE (VR)",
"H606":"ROVERCHIARA (VR)",
"H610":"ROVEREDO DI GUÀ (VR)",
"H608":"ROVERÈ VERONESE (VR)",
"H714":"SALIZZOLE (VR)",
"H783":"SAN BONIFACIO (VR)",
"H916":"SAN GIOVANNI ILARIONE (VR)",
"H924":"<NAME> (VR)",
"H944":"SANGUINETTO (VR)",
"I003":"<NAME> (VR)",
"H712":"<NAME> SALINE (VR)",
"I105":"<NAME> DI MORUBIO (VR)",
"I109":"SAN PIETRO IN CARIANO (VR)",
"I259":"SANT'AMBROGIO DI VALPOLICELLA (VR)",
"I292":"SANT'ANNA D'ALFAEDO (VR)",
"I414":"<NAME> MONTAGNA (VR)",
"I594":"SELVA DI PROGNO (VR)",
"I775":"SOAVE (VR)",
"I821":"SOMMACAMPAGNA (VR)",
"I826":"SONA (VR)",
"A096":"AICURZIO (MB)",
"A159":"ALBIATE (MB)",
"A376":"ARCORE (MB)",
"A668":"BARLASSINA (MB)",
"A759":"BELLUSCO (MB)",
"A802":"BERNAREGGIO (MB)",
"A818":"BESANA IN BRIANZA (MB)",
"A849":"BIASSONO (MB)",
"B105":"BOVISIO-MASCIAGO (MB)",
"B187":"BRIOSCO (MB)",
"B212":"BRUGHERIO (MB)",
"B272":"BURAGO DI MOLGORA (MB)",
"B501":"CAMPARADA (MB)",
"B729":"CARATE BRIANZA (MB)",
"B798":"CARNATE (MB)",
"C395":"CAVENAGO DI BRIANZA (MB)",
"C512":"CERIANO LAGHETTO (MB)",
"C566":"<NAME> (MB)",
"C820":"COGLIATE (MB)",
"C952":"CONCOREZZO (MB)",
"D038":"CORREZZANA (MB)",
"D286":"DESIO (MB)",
"E063":"GIUSSANO (MB)",
"E504":"LAZZATE (MB)",
"E550":"LESMO (MB)",
"E591":"LIMBIATE (MB)",
"E617":"LISSONE (MB)",
"E786":"MACHERIO (MB)",
"F078":"MEDA (MB)",
"F165":"MEZZAGO (MB)",
"F247":"MISINTO (MB)",
"F704":"MONZA (MB)",
"F797":"MUGGIÒ (MB)",
"F944":"NOVA MILANESE (MB)",
"G116":"ORNAGO (MB)",
"H233":"RENATE (MB)",
"H537":"RONCO BRIANTINO (MB)",
"I625":"SEREGNO (MB)",
"I709":"SEVESO (MB)",
"I878":"SOVICO (MB)",
"I998":"SULBIATE (MB)",
"L434":"TRIUGGIO (MB)",
"L511":"USMATE VELATE (MB)",
"L677":"VAREDO (MB)",
"L704":"VEDANO AL LAMBRO (MB)",
"L709":"VEDUGGIO CON COLZANO (MB)",
"L744":"VERANO BRIANZA (MB)",
"M017":"VILLASANTA (MB)",
"M052":"VIMERCATE (MB)",
"B289":"BUSNAGO (MB)",
"B671":"CAPONAGO (MB)",
"D019":"CORNATE D'ADDA (MB)",
"E530":"LENTATE SUL SEVESO (MB)",
"H529":"RONCELLO (MB)",
"A179":"ALDINO (BZ)",
"A286":"ANDRIANO (BZ)",
"A306":"ANTERIVO (BZ)",
"A332":"APPIANO SULLA STRADA DEL VINO (BZ)",
"A507":"AVELENGO (BZ)",
"A537":"BADIA (BZ)",
"A635":"BARBIANO (BZ)",
"A952":"BOLZANO (BZ)",
"B116":"BRAIES (BZ)",
"B145":"BRENNERO (BZ)",
"B160":"BRESSANONE (BZ)",
"B203":"BRONZOLO (BZ)",
"B220":"BRUNICO (BZ)",
"B364":"CAINES (BZ)",
"B397":"CALDARO SULLA STRADA DEL VINO (BZ)",
"B529":"CAMPO DI TRENS (BZ)",
"B570":"CAMPO TURES (BZ)",
"C062":"CASTELBELLO-CIARDES (BZ)",
"C254":"CASTELROTTO (BZ)",
"A022":"CERMES (BZ)",
"C625":"CHIENES (BZ)",
"C652":"CHIUSA (BZ)",
"B799":"<NAME>'ISARCO (BZ)",
"D048":"CORTACCIA SULLA STRADA DEL VINO (BZ)",
"D075":"CORTINA SULLA STRADA DEL VINO (BZ)",
"D079":"CORVARA IN BADIA (BZ)",
"D222":"<NAME> (BZ)",
"D311":"DOBBIACO (BZ)",
"D392":"EGNA (BZ)",
"D484":"FALZES (BZ)",
"D571":"FIÈ ALLO SCILIAR (BZ)",
"D731":"FORTEZZA (BZ)",
"D821":"FUNES (BZ)",
"D860":"GAIS (BZ)",
"D923":"GARGAZZONE (BZ)",
"E069":"GLORENZA (BZ)",
"E398":"LACES (BZ)",
"E412":"LAGUNDO (BZ)",
"E420":"LAION (BZ)",
"E421":"LAIVES (BZ)",
"E434":"LANA (BZ)",
"E457":"LASA (BZ)",
"E481":"LAUREGNO (BZ)",
"E764":"LUSON (BZ)",
"E829":"MAGRÈ SULLA STRADA DEL VINO (BZ)",
"E862":"<NAME> (BZ)",
"E938":"MAREBBE (BZ)",
"E959":"MARLENGO (BZ)",
"E981":"MARTELLO (BZ)",
"F118":"MELTINA (BZ)",
"F132":"MERANO (BZ)",
"F371":"MONGUELFO-TESIDO (BZ)",
"F392":"MONTAGNA (BZ)",
"F766":"MOSO IN PASSIRIA (BZ)",
"F836":"NALLES (BZ)",
"F849":"NATURNO (BZ)",
"F856":"NAZ-SCIAVES (BZ)",
"F949":"NOVA LEVANTE (BZ)",
"F950":"NOVA PONENTE (BZ)",
"G083":"ORA (BZ)",
"G140":"ORTISEI (BZ)",
"G328":"PARCINES (BZ)",
"G443":"PERCA (BZ)",
"G299":"PLAUS (BZ)",
"G830":"P<NAME> (BZ)",
"G936":"POSTAL (BZ)",
"H004":"PRATO ALLO STELVIO (BZ)",
"H019":"PREDOI (BZ)",
"H081":"PROVES (BZ)",
"H152":"RACINES (BZ)",
"H189":"RASUN-ANTERSELVA (BZ)",
"H236":"RENON (BZ)",
"H284":"RIFIANO (BZ)",
"H299":"RIO DI PUSTERIA (BZ)",
"H475":"RODENGO (BZ)",
"H719":"SALORNO (BZ)",
"H786":"SAN CANDIDO (BZ)",
"H858":"SAN GENESIO ATESINO (BZ)",
"H952":"SAN LEONARDO IN PASSIRIA (BZ)",
"H956":"SAN LORENZO DI SEBATO (BZ)",
"H988":"SAN MARTINO IN BADIA (BZ)",
"H989":"SAN MARTINO IN PASSIRIA (BZ)",
"I065":"SAN PANCRAZIO (BZ)",
"I173":"S<NAME> VALGARDENA (BZ)",
"I431":"SARENTINO (BZ)",
"I519":"SCENA (BZ)",
"I593":"<NAME> (BZ)",
"I591":"<NAME> (BZ)",
"I604":"SENALES (BZ)",
"I687":"SESTO (BZ)",
"I729":"SILANDRO (BZ)",
"I771":"SLUDERNO (BZ)",
"I948":"STELVIO (BZ)",
"L106":"TERENTO (BZ)",
"L108":"TERLANO (BZ)",
"L111":"TERMENO SULLA STRADA DEL VINO (BZ)",
"L149":"TESIMO (BZ)",
"L176":"TIRES (BZ)",
"L178":"TIROLO (BZ)",
"L444":"TRODENA NEL PARCO NATURALE (BZ)",
"L455":"TUBRE (BZ)",
"L490":"ULTIMO (BZ)",
"L527":"VADENA (BZ)",
"L552":"VALDAORA (BZ)",
"L564":"VAL DI VIZZE (BZ)",
"L595":"VALLE AURINA (BZ)",
"L601":"VALLE DI CASIES (BZ)",
"L660":"VANDOIES (BZ)",
"L687":"VARNA (BZ)",
"L745":"VERANO (BZ)",
"L915":"VILLABASSA (BZ)",
"L971":"VILLANDRO (BZ)",
"M067":"VIPITENO (BZ)",
"L724":"VELTURNO (BZ)",
"E491":"LA VALLE (BZ)",
"I603":"SENALE-SAN FELICE (BZ)",
"A116":"ALA (TN)",
"A158":"ALBIANO (TN)",
"A178":"ALDENO (TN)",
"A274":"ANDALO (TN)",
"A372":"ARCO (TN)",
"A520":"AVIO (TN)",
"A694":"BASELGA DI PINÈ (TN)",
"A730":"BEDOLLO (TN)",
"A821":"BESENELLO (TN)",
"A863":"BIENO (TN)",
"A902":"BLEGGIO SUPERIORE (TN)",
"A916":"BOCENAGO (TN)",
"A968":"BONDONE (TN)",
"B006":"BORGO VALSUGANA (TN)",
"B153":"BRENTONICO (TN)",
"B158":"BRESIMO (TN)",
"B165":"BREZ (TN)",
"B335":"CADERZONE TERME (TN)",
"B360":"CAGNÒ (TN)",
"B389":"CALCERANICA AL LAGO (TN)",
"B400":"CALDES (TN)",
"B404":"CALDONAZZO (TN)",
"B418":"CALLIANO (TN)",
"B514":"CAMPITELLO DI FASSA (TN)",
"B525":"CAMPODENNO (TN)",
"B577":"<NAME> (TN)",
"B579":"CANAZEI (TN)",
"B697":"CAPRIANA (TN)",
"B723":"CARANO (TN)",
"B783":"CARISOLO (TN)",
"B856":"CARZANO (TN)",
"C183":"<NAME> (TN)",
"C103":"CASTELFONDO (TN)",
"C189":"CASTELLO-<NAME> (TN)",
"C194":"<NAME> (TN)",
"C216":"CASTELNUOVO (TN)",
"C372":"CAVALESE (TN)",
"C380":"CAVARENO (TN)",
"C392":"CAVEDAGO (TN)",
"C393":"CAVEDINE (TN)",
"C400":"CAVIZZANA (TN)",
"C700":"CIMONE (TN)",
"C712":"CINTE TESINO (TN)",
"C727":"CIS (TN)",
"H554":"RORÀ (TO)",
"H555":"ROURE (TO)",
"H583":"ROSTA (TO)",
"H627":"RUBIANA (TO)",
"H631":"RUEGLIO (TO)",
"H691":"SALASSA (TO)",
"H684":"SALBERTRAND (TO)",
"A227":"ALTAVILLA MONFERRATO (AL)",
"A245":"ALZANO SCRIVIA (AL)",
"A436":"ARQUATA SCRIVIA (AL)",
"A523":"AVOLASCA (AL)",
"A605":"BALZOLA (AL)",
"A689":"BASALUZZO (AL)",
"A708":"BASSIGNANA (AL)",
"A738":"BELFORTE MONFERRATO (AL)",
"A793":"BERGAMASCO (AL)",
"A813":"BERZANO DI TORTONA (AL)",
"A889":"BISTAGNO (AL)",
"A998":"BORGHETTO DI BORBERA (AL)",
"B029":"BORGORATTO ALESSANDRINO (AL)",
"B037":"BORGO SAN MARTINO (AL)",
"B071":"BOSCO MARENGO (AL)",
"B080":"BOSIO (AL)",
"B109":"BOZZOLE (AL)",
"B179":"BRIGNANO-FRASCATA (AL)",
"B311":"CABELLA LIGURE (AL)",
"B453":"CAMAGNA MONFERRATO (AL)",
"B482":"CAMINO (AL)",
"B629":"CANTALUPO LIGURE (AL)",
"B701":"CAPRIATA D'ORBA (AL)",
"B736":"CARBONARA SCRIVIA (AL)",
"B765":"CARENTINO (AL)",
"B769":"CAREZZANO (AL)",
"B818":"CARPENETO (AL)",
"B836":"CARREGA LIGURE (AL)",
"B840":"CARROSIO (AL)",
"B847":"CARTOSIO (AL)",
"B870":"CASAL CERMELLI (AL)",
"B882":"CASALEGGIO BOIRO (AL)",
"B885":"CASALE MONFERRATO (AL)",
"B902":"CASALNOCETO (AL)",
"B941":"CASASCO (AL)",
"C005":"CASSANO SPINOLA (AL)",
"C027":"CASSINE (AL)",
"C030":"CASSINELLE (AL)",
"C137":"CASTELLANIA (AL)",
"C142":"CASTELLAR GUIDOBONO (AL)",
"C148":"CASTELLAZZO BORMIDA (AL)",
"C156":"<NAME> (AL)",
"C158":"<NAME> (AL)",
"C160":"<NAME> (AL)",
"C162":"CASTELLETTO MONFERRATO (AL)",
"C229":"CASTELNUOVO BORMIDA (AL)",
"C243":"CASTELNUOVO SCRIVIA (AL)",
"C274":"CASTELSPINA (AL)",
"C387":"CAVATORE (AL)",
"C432":"CELLA MONTE (AL)",
"C503":"CERESETO (AL)",
"C507":"CERRETO GRUE (AL)",
"C531":"CERRINA MONFERRATO (AL)",
"C962":"CONIOLO (AL)",
"C977":"CONZANO (AL)",
"D102":"COSTA VESCOVATO (AL)",
"D149":"CREMOLINO (AL)",
"D194":"CUCCARO MONFERRATO (AL)",
"D272":"DENICE (AL)",
"D277":"DERNICE (AL)",
"D447":"<NAME> (AL)",
"D528":"FELIZZANO (AL)",
"D559":"FRACONALTO (AL)",
"D759":"FRANCAVILLA BISIO (AL)",
"D770":"FRASCARO (AL)",
"D777":"FRASSINELLO MONFERRATO (AL)",
"D780":"FRASSINETO PO (AL)",
"D797":"FRESONARA (AL)",
"D813":"FRUGAROLO (AL)",
"D814":"FUBINE MONFERRATO (AL)",
"D835":"GABIANO (AL)",
"D890":"GAMALERO (AL)",
"D910":"GARBAGNA (AL)",
"D941":"GAVAZZANA (AL)",
"D944":"GAVI (AL)",
"E015":"GIAROLE (AL)",
"E164":"GREMIASCO (AL)",
"E188":"GROGNARDO (AL)",
"E191":"GRONDONA (AL)",
"E255":"GUAZZORA (AL)",
"E360":"ISOLA SANT'ANTONIO (AL)",
"E543":"LERMA (AL)",
"E712":"LU (AL)",
"E870":"MALVICINO (AL)",
"F015":"MASIO (AL)",
"F096":"MELAZZO (AL)",
"F131":"MERANA (AL)",
"F232":"MIR<NAME> (AL)",
"F281":"MOLARE (AL)",
"F293":"<NAME> (AL)",
"F313":"MOMBELLO MONFERRATO (AL)",
"F320":"MOMPERONE (AL)",
"F337":"MONCESTINO (AL)",
"F365":"MONGIARDINO LIGURE (AL)",
"F374":"MONLEALE (AL)",
"F387":"MONTACUTO (AL)",
"F403":"MONTALDEO (AL)",
"F404":"M<NAME> (AL)",
"F455":"MONTECASTELLO (AL)",
"F469":"MONTE<NAME> (AL)",
"F518":"MONTEGIOCO (AL)",
"F562":"MONTEMARZINO (AL)",
"F707":"MORANO SUL PO (AL)",
"F713":"MORBELLO (AL)",
"F737":"MORNESE (AL)",
"F751":"MORSASCO (AL)",
"F814":"MURISENGO (AL)",
"F965":"NOVI LIGURE (AL)",
"F995":"OCCIMIANO (AL)",
"F997":"ODALENGO GRANDE (AL)",
"F998":"ODALENGO PICCOLO (AL)",
"G042":"OLIVOLA (AL)",
"G124":"ORSARA BORMIDA (AL)",
"G193":"OTTIGLIO (AL)",
"G197":"OVADA (AL)",
"G199":"OVIGLIO (AL)",
"G204":"OZZANO MONFERRATO (AL)",
"G215":"PADERNA (AL)",
"G334":"PARETO (AL)",
"G338":"PARODI LIGURE (AL)",
"G367":"PASTURANA (AL)",
"G397":"PECETTO DI VALENZA (AL)",
"G619":"<NAME> (AL)",
"G695":"PIOVERA (AL)",
"G807":"POMARO MONFERRATO (AL)",
"G839":"PONTECURONE (AL)",
"G858":"PONTESTURA (AL)",
"G861":"PONTI (AL)",
"G872":"PONZANO MONFERRATO (AL)",
"G877":"PONZONE (AL)",
"G960":"POZZOL GROPPO (AL)",
"G961":"POZZOLO FORMIGARO (AL)",
"G987":"PRASCO (AL)",
"H021":"PREDOSA (AL)",
"H104":"QUARGNENTO (AL)",
"H121":"QUATTORDIO (AL)",
"H272":"RICALDONE (AL)",
"H334":"RIVALTA BORMIDA (AL)",
"H343":"RIVARONE (AL)",
"H406":"ROCCAFORTE LIGURE (AL)",
"H414":"ROCCA GRIMALDA (AL)",
"H465":"ROCCHETTA LIGURE (AL)",
"H569":"ROSIGNANO MONFERRATO (AL)",
"H677":"SALA MONFERRATO (AL)",
"H694":"SALE (AL)",
"H810":"SAN CRISTOFORO (AL)",
"H878":"SAN GIORGIO MONFERRATO (AL)",
"I144":"SAN SALVATORE MONFERRATO (AL)",
"I150":"SAN SEBASTIANO CURONE (AL)",
"I190":"SANT'AGATA FOSSILI (AL)",
"I429":"SARDIGLIANO (AL)",
"I432":"SAREZZANO (AL)",
"I645":"SERRALUNGA DI CREA (AL)",
"I657":"SERRAVALLE SCRIVIA (AL)",
"I711":"SEZZADIO (AL)",
"I738":"SILVANO D'ORBA (AL)",
"I798":"SOLERO (AL)",
"I808":"SOLONGHELLO (AL)",
"I901":"SPIGNO MONFERRATO (AL)",
"I911":"SPINETO SCRIVIA (AL)",
"I941":"STAZZANO (AL)",
"I977":"STREVI (AL)",
"L027":"TAGLIOLO MONFERRATO (AL)",
"L059":"TASSAROLO (AL)",
"L139":"TERRUGGIA (AL)",
"L143":"TERZO (AL)",
"L165":"TICINETO (AL)",
"L304":"TORTONA (AL)",
"L403":"TREVILLE (AL)",
"L432":"TRISOBBIO (AL)",
"L570":"VALENZA (AL)",
"L633":"VALMACCA (AL)",
"L881":"VIGNALE MONFERRATO (AL)",
"L887":"VIGNOLE BORBERA (AL)",
"L904":"VIGUZZOLO (AL)",
"L931":"VILLADEATI (AL)",
"L963":"VILLALVERNIA (AL)",
"L970":"VILLAMIROGLIO (AL)",
"L972":"VILLANOVA MONFERRATO (AL)",
"M009":"VILLAROMAGNANO (AL)",
"M077":"VISONE (AL)",
"M120":"VOLPEDO (AL)",
"M121":"VOLPEGLINO (AL)",
"M123":"VOLTAGGIO (AL)",
"A107":"AILOCHE (BI)",
"A280":"<NAME> (BI)",
"A784":"BENNA (BI)",
"A859":"BIELLA (BI)",
"A876":"BIOGLIO (BI)",
"B058":"BORRIANA (BI)",
"B229":"BRUSNENGO (BI)",
"B417":"CALLABIANA (BI)",
"B457":"CAMANDONA (BI)",
"B465":"CAMBURZANO (BI)",
"B586":"CANDELO (BI)",
"D492":"FARA NOVARESE (NO)",
"D675":"<NAME>'AGOGNA (NO)",
"D872":"GALLIATE (NO)",
"D911":"G<NAME>VARESE (NO)",
"D921":"GARGALLO (NO)",
"D937":"GATTICO (NO)",
"E001":"GHEMME (NO)",
"E120":"GOZZANO (NO)",
"E143":"GRANOZZO CON MONTICELLO (NO)",
"E177":"GRIGNASCO (NO)",
"E314":"INVORIO (NO)",
"E436":"LANDIONA (NO)",
"E544":"LESA (NO)",
"E803":"MAGGIORA (NO)",
"E880":"MANDELLO VITTA (NO)",
"E907":"<NAME> (NO)",
"F047":"<NAME> (NO)",
"F093":"MEINA (NO)",
"F188":"MEZZOMERICO (NO)",
"F191":"MIASINO (NO)",
"F317":"MOMO (NO)",
"F859":"NEBBIUNO (NO)",
"F886":"NIBBIOLA (NO)",
"F952":"NOVARA (NO)",
"G019":"OLEGGIO (NO)",
"G020":"<NAME> (NO)",
"G134":"ORTA SAN GIULIO (NO)",
"G349":"PARUZZARO (NO)",
"G421":"PELLA (NO)",
"G520":"PETTENASCO (NO)",
"G703":"PISANO (NO)",
"G775":"POGNO (NO)",
"G809":"POMBIA (NO)",
"H001":"PRATO SESIA (NO)",
"H213":"RECETTO (NO)",
"H502":"ROMAGNANO SESIA (NO)",
"H518":"ROMENTINO (NO)",
"I025":"SAN MAURIZIO D'OPAGLIO (NO)",
"I052":"SAN NAZZARO SESIA (NO)",
"I116":"SAN <NAME>SEZZO (NO)",
"I736":"SILLAVENGO (NO)",
"I767":"SIZZANO (NO)",
"I857":"SORISO (NO)",
"I880":"SOZZAGO (NO)",
"L007":"SUNO (NO)",
"L104":"TERDOBBIATE (NO)",
"L223":"TORNACO (NO)",
"L356":"TRECATE (NO)",
"L668":"VAPRIO D'AGOGNA (NO)",
"L670":"VARALLO POMBIA (NO)",
"L798":"VERUNO (NO)",
"L808":"VESPOLATE (NO)",
"L847":"VICOLUNGO (NO)",
"M062":"VINZAGLIO (NO)",
"A016":"ACCEGLIO (CN)",
"A113":"AISONE (CN)",
"A124":"ALBA (CN)",
"A139":"ALBARETTO DELLA TORRE (CN)",
"A238":"ALTO (CN)",
"A394":"ARGENTERA (CN)",
"A396":"ARGUELLO (CN)",
"A555":"BAGNASCO (CN)",
"A571":"<NAME> (CN)",
"A589":"<NAME> (CN)",
"A629":"BARBARESCO (CN)",
"A660":"BARGE (CN)",
"A671":"BAROLO (CN)",
"A709":"<NAME> (CN)",
"A716":"BATTIFOLLO (CN)",
"A735":"BEINETTE (CN)",
"A750":"BELLINO (CN)",
"A774":"BELVEDERE LANGHE (CN)",
"A779":"<NAME> (CN)",
"A782":"BENEVELLO (CN)",
"A798":"BERGOLO (CN)",
"A805":"BERNEZZO (CN)",
"A979":"BONVICINO (CN)",
"B018":"BORGOMALE (CN)",
"B033":"BORGO SAN DALMAZZO (CN)",
"B079":"BOSIA (CN)",
"B084":"BOSSOLASCO (CN)",
"B101":"BOVES (CN)",
"B111":"BRA (CN)",
"B167":"BRIAGLIA (CN)",
"B175":"BRIGA ALTA (CN)",
"B200":"BRONDELLO (CN)",
"B204":"BROSSASCO (CN)",
"B285":"BUSCA (CN)",
"B467":"CAMERANA (CN)",
"B489":"CAMO (CN)",
"B573":"CANALE (CN)",
"B621":"CANOSIO (CN)",
"B692":"CAPRAUNA (CN)",
"B719":"CARAGLIO (CN)",
"B720":"<NAME> (CN)",
"B755":"CARDÈ (CN)",
"B841":"CARRÙ (CN)",
"B845":"CARTIGNANO (CN)",
"B894":"CASALGRASSO (CN)",
"C046":"CASTAGNITO (CN)",
"C081":"CASTELDELFINO (CN)",
"C140":"CASTELLAR (CN)",
"C165":"<NAME> (CN)",
"C167":"CASTELLETTO UZZONE (CN)",
"C173":"<NAME> (CN)",
"C176":"<NAME> (CN)",
"C205":"CASTELMAGNO (CN)",
"C214":"CASTELNUOVO DI CEVA (CN)",
"C314":"CASTIGLIONE FALLETTO (CN)",
"C317":"CASTIGLIONE TINELLA (CN)",
"C323":"CASTINO (CN)",
"C375":"CAVALLERLEONE (CN)",
"C376":"CAVALLERMAGGIORE (CN)",
"C441":"CELLE DI MACRA (CN)",
"C466":"CENTALLO (CN)",
"C504":"CERESOLE ALBA (CN)",
"C530":"CERRETTO LANGHE (CN)",
"C547":"CERVASCA (CN)",
"C550":"CERVERE (CN)",
"C589":"CEVA (CN)",
"C599":"CHERASCO (CN)",
"C653":"CHIUSA DI PESIO (CN)",
"C681":"CIGLIÈ (CN)",
"C738":"CISSONE (CN)",
"C792":"CLAVESANA (CN)",
"D022":"<NAME> (CN)",
"D062":"CORTEMILIA (CN)",
"D093":"CO<NAME> (CN)",
"D120":"COSTIGLIOLE SALUZZO (CN)",
"D133":"CRAVANZANA (CN)",
"D172":"CRISSOLO (CN)",
"D205":"CUNEO (CN)",
"D271":"DEMONTE (CN)",
"D291":"<NAME>'ALBA (CN)",
"D314":"DOGLIANI (CN)",
"D372":"DRONERO (CN)",
"D401":"ELVA (CN)",
"D410":"ENTRACQUE (CN)",
"D412":"ENVIE (CN)",
"D499":"FARIGLIANO (CN)",
"D511":"FAULE (CN)",
"D523":"FEISOGLIO (CN)",
"D742":"FOSSANO (CN)",
"D751":"FRABOSA SOPRANA (CN)",
"D752":"FRABOSA SOTTANA (CN)",
"D782":"FRASSINO (CN)",
"D856":"GAIOLA (CN)",
"D894":"GAMBASCA (CN)",
"D920":"GARESSIO (CN)",
"D967":"GENOLA (CN)",
"E111":"GORZEGNO (CN)",
"E115":"GOTTASECCA (CN)",
"E118":"GOVONE (CN)",
"E182":"GRINZANE CAVOUR (CN)",
"E251":"GUARENE (CN)",
"E282":"IGLIANO (CN)",
"E327":"ISASCA (CN)",
"E406":"LAGNASCO (CN)",
"E430":"LA MORRA (CN)",
"E540":"LEQUIO BERRIA (CN)",
"E539":"LEQUIO TANARO (CN)",
"E546":"LESEGNO (CN)",
"E564":"LEVICE (CN)",
"E597":"LIMONE PIEMONTE (CN)",
"E615":"LISIO (CN)",
"E789":"MACRA (CN)",
"E809":"MAGLIANO ALFIERI (CN)",
"E808":"MAGLIANO ALPI (CN)",
"E887":"MANGO (CN)",
"E894":"MANTA (CN)",
"E939":"MARENE (CN)",
"E945":"MARGARITA (CN)",
"E963":"MARMORA (CN)",
"E973":"MARSAGLIA (CN)",
"E988":"MARTINIANA PO (CN)",
"F114":"MELLE (CN)",
"F279":"MOIOLA (CN)",
"F309":"MOMBARCARO (CN)",
"F312":"MOMBASIGLIO (CN)",
"F326":"MONASTERO DI VASCO (CN)",
"F329":"MONASTEROLO CASOTTO (CN)",
"F330":"MONASTEROLO DI SAVIGLIANO (CN)",
"F338":"MONCHIERO (CN)",
"F351":"MONDOVÌ (CN)",
"F355":"MONESIGLIO (CN)",
"F358":"MONFORTE D'ALBA (CN)",
"F385":"MONTÀ (CN)",
"F405":"MONTALDO DI MONDOVÌ (CN)",
"F408":"MONTALDO ROERO (CN)",
"F424":"MONTANERA (CN)",
"F550":"<NAME> (CN)",
"F558":"MONTEMALE DI CUNEO (CN)",
"F608":"<NAME> (CN)",
"F654":"<NAME> (CN)",
"F666":"MONTEZEMOLO (CN)",
"F669":"<NAME> (CN)",
"F723":"MORETTA (CN)",
"F743":"MOROZZO (CN)",
"F809":"MURAZZANO (CN)",
"F811":"MURELLO (CN)",
"F846":"NARZOLE (CN)",
"F863":"NEIVE (CN)",
"F883":"NEVIGLIE (CN)",
"F894":"<NAME> (CN)",
"F895":"<NAME> (CN)",
"F961":"NOVELLO (CN)",
"F972":"NUCETTO (CN)",
"G066":"ONCINO (CN)",
"G114":"ORMEA (CN)",
"G183":"OSTANA (CN)",
"G228":"PAESANA (CN)",
"G240":"PAGNO (CN)",
"G302":"PAMPARATO (CN)",
"G339":"PAROLDO (CN)",
"G457":"PERLETTO (CN)",
"G458":"PERLO (CN)",
"G526":"PEVERAGNO (CN)",
"G532":"PEZZOLO VALLE UZZONE (CN)",
"G561":"PIANFEI (CN)",
"G575":"PIASCO (CN)",
"G625":"PIETRAPORZIO (CN)",
"G683":"PIOBESI D'ALBA (CN)",
"G697":"PIOZZO (CN)",
"G742":"POCAPAGLIA (CN)",
"G800":"POLONGHERA (CN)",
"H702":"SALERANO CANAVESE (TO)",
"H734":"SALZA DI PINEROLO (TO)",
"H753":"SAMONE (TO)",
"H775":"SAN BENIGNO CANAVESE (TO)",
"H789":"SAN CARLO CANAVESE (TO)",
"H804":"SAN COLOMBANO BELMONTE (TO)",
"H820":"SAN DIDERO (TO)",
"H847":"SAN FRANCESCO AL CAMPO (TO)",
"H855":"SANGANO (TO)",
"H862":"<NAME> (TO)",
"H873":"SAN GILLIO (TO)",
"H890":"SAN GIORGIO CANAVESE (TO)",
"H900":"SAN GIORIO DI SUSA (TO)",
"H936":"SAN GIUSTO CANAVESE (TO)",
"H997":"SAN MARTINO CANAVESE (TO)",
"I024":"SAN MAURIZIO CANAVESE (TO)",
"I030":"SAN MAURO TORINESE (TO)",
"I090":"SAN PIETRO VAL LEMINA (TO)",
"I126":"SAN PONSO (TO)",
"I137":"SAN RAFFAELE CIMENA (TO)",
"I152":"SAN SEBASTIANO DA PO (TO)",
"I154":"SAN SECONDO DI PINEROLO (TO)",
"I258":"SANT'AMBROGIO DI TORINO (TO)",
"I296":"SANT'ANTONINO DI SUSA (TO)",
"I327":"SANTENA (TO)",
"I465":"SAUZE DI CESANA (TO)",
"I466":"SAUZE D'OULX (TO)",
"I490":"SCALENGHE (TO)",
"I511":"SCARMAGNO (TO)",
"I539":"SCIOLZE (TO)",
"I692":"SESTRIERE (TO)",
"I701":"SETTIMO ROTTARO (TO)",
"I703":"SETTIMO TORINESE (TO)",
"I702":"SETTIMO VITTONE (TO)",
"I886":"SPARONE (TO)",
"I969":"STRAMBINELLO (TO)",
"I970":"STRAMBINO (TO)",
"L013":"SUSA (TO)",
"L066":"TAVAGNASCO (TO)",
"L219":"TORINO (TO)",
"L238":"TORRAZZA PIEMONTE (TO)",
"L247":"TORRE CANAVESE (TO)",
"L277":"TORRE PELLICE (TO)",
"L327":"TRANA (TO)",
"L338":"TRAUSELLA (TO)",
"L345":"TRAVERSELLA (TO)",
"L340":"TRAVES (TO)",
"L445":"TROFARELLO (TO)",
"L515":"USSEAUX (TO)",
"L516":"USSEGLIO (TO)",
"L538":"VAIE (TO)",
"L555":"VAL DELLA TORRE (TO)",
"L578":"VALGIOIE (TO)",
"L629":"VALLO TORINESE (TO)",
"L644":"VALPERGA (TO)",
"B510":"VALPRATO SOANA (TO)",
"L685":"VARISELLA (TO)",
"L698":"VAUDA CANAVESE (TO)",
"L726":"VENAUS (TO)",
"L727":"VENARIA REALE (TO)",
"L779":"VEROLENGO (TO)",
"L787":"VERRUA SAVOIA (TO)",
"L811":"VESTIGNÈ (TO)",
"L830":"VIALFRÈ (TO)",
"L548":"VICO CANAVESE (TO)",
"L857":"VIDRACCO (TO)",
"L898":"VIGONE (TO)",
"L948":"VILLAFRANCA PIEMONTE (TO)",
"L982":"VILLANOVA CANAVESE (TO)",
"M002":"VILLARBASSE (TO)",
"L999":"VILLAR DORA (TO)",
"M004":"VILLAREGGIA (TO)",
"M007":"<NAME> (TO)",
"M013":"VILLAR PELLICE (TO)",
"M014":"V<NAME> (TO)",
"M027":"VILLASTELLONE (TO)",
"M060":"VINOVO (TO)",
"M069":"VIRLE PIEMONTE (TO)",
"M071":"VISCHE (TO)",
"M080":"VISTRORIO (TO)",
"M094":"VIÙ (TO)",
"M122":"VOLPIANO (TO)",
"M133":"VOLVERA (TO)",
"M316":"MAPPANO (TO)",
"A119":"ALAGNA VALSESIA (VC)",
"A130":"ALBANO VERCELLESE (VC)",
"A198":"ALICE CASTELLO (VC)",
"A358":"ARBORIO (VC)",
"A466":"ASIGLIANO VERCELLESE (VC)",
"A600":"BALMUCCIA (VC)",
"A601":"BALOCCO (VC)",
"A847":"BIANZÈ (VC)",
"A914":"BOCCIOLETO (VC)",
"B009":"BORGO D'ALE (VC)",
"B041":"BORGOSESIA (VC)",
"B046":"BORGO VERCELLI (VC)",
"B136":"BREIA (VC)",
"B280":"BURONZO (VC)",
"B505":"CAMPERTOGNO (VC)",
"B752":"CARCOFORO (VC)",
"B767":"CARESANA (VC)",
"B768":"CARESANABLOT (VC)",
"B782":"CARISIO (VC)",
"B928":"CASANOVA ELVO (VC)",
"B952":"SAN GIACOMO VERCELLESE (VC)",
"C450":"CELLIO (VC)",
"C548":"CERVATTO (VC)",
"C680":"CIGLIANO (VC)",
"C757":"CIVIASCO (VC)",
"C884":"COLLOBIANO (VC)",
"D113":"COSTANZANA (VC)",
"D132":"CRAVAGLIANA (VC)",
"D154":"CRESCENTINO (VC)",
"D187":"CROVA (VC)",
"D281":"DESANA (VC)",
"D641":"FOBELLO (VC)",
"D676":"FONTANETTO PO (VC)",
"D712":"FORMIGLIANA (VC)",
"D938":"GATTINARA (VC)",
"E007":"GHISLARENGO (VC)",
"E163":"GREGGIO (VC)",
"E237":"GUARDABOSONE (VC)",
"E433":"LAMPORO (VC)",
"E528":"LENTA (VC)",
"E583":"LIGNANA (VC)",
"E626":"LIVORNO FERRARIS (VC)",
"E711":"LOZZOLO (VC)",
"F297":"MOLLIA (VC)",
"F342":"MONCRIVELLO (VC)",
"F774":"MOTTA DE' CONTI (VC)",
"G016":"OLCENENGO (VC)",
"G018":"OLDENICO (VC)",
"G266":"PALAZZOLO VERCELLESE (VC)",
"G471":"PERTENGO (VC)",
"G528":"PEZZANA (VC)",
"G666":"PILA (VC)",
"G685":"PIODE (VC)",
"G940":"POSTUA (VC)",
"G985":"PRAROLO (VC)",
"H108":"QUARONA (VC)",
"H132":"QUINTO VERCELLESE (VC)",
"H188":"RASSA (VC)",
"H291":"<NAME> (VC)",
"H292":"RIMASCO (VC)",
"H293":"RIMELLA (VC)",
"H329":"<NAME> (VC)",
"H346":"RIVE (VC)",
"H365":"ROASIO (VC)",
"H549":"RONSECCO (VC)",
"H577":"ROSSA (VC)",
"H364":"ROVASENDA (VC)",
"H648":"SABBIA (VC)",
"H690":"SALASCO (VC)",
"H707":"SALI VERCELLESE (VC)",
"H725":"SALUGGIA (VC)",
"H861":"SAN GERMANO VERCELLESE (VC)",
"I337":"SANTHIÀ (VC)",
"I544":"SCOPA (VC)",
"I545":"SCOPELLO (VC)",
"I663":"SERRAVALLE SESIA (VC)",
"I984":"STROPPIANA (VC)",
"L420":"TRICERRO (VC)",
"L429":"TRINO (VC)",
"L451":"TRONZANO VERCELLESE (VC)",
"L566":"VALDUGGIA (VC)",
"L669":"VARALLO (VC)",
"L750":"VERCELLI (VC)",
"M003":"VILLARBOIT (VC)",
"M028":"VILLATA (VC)",
"M106":"VOCCA (VC)",
"A088":"AGRATE CONTURBIA (NO)",
"A264":"AMENO (NO)",
"A414":"ARMENO (NO)",
"A429":"ARONA (NO)",
"A653":"BARENGO (NO)",
"A752":"BELLINZAGO NOVARESE (NO)",
"A844":"BIANDRATE (NO)",
"A911":"BOCA (NO)",
"A929":"BOGOGNO (NO)",
"A953":"BOLZANO NOVARESE (NO)",
"B016":"BORGOLAVEZZARO (NO)",
"B019":"BORGOMANERO (NO)",
"B043":"BORGO TICINO (NO)",
"B176":"BRIGA NOVARESE (NO)",
"B183":"BRIONA (NO)",
"B431":"CALTIGNAGA (NO)",
"B473":"CAMERI (NO)",
"B823":"CARPIGNANO SESIA (NO)",
"B864":"CASALBELTRAME (NO)",
"B883":"<NAME> (NO)",
"B897":"CASALINO (NO)",
"B920":"CASALVOLONE (NO)",
"C149":"CASTELLAZZO NOVARESE (NO)",
"C166":"CASTELLETTO SOPRA TICINO (NO)",
"C364":"CAVAGLIETTO (NO)",
"C365":"CAVAGLIO D'AGOGNA (NO)",
"C378":"CAVALLIRIO (NO)",
"C483":"CERANO (NO)",
"C829":"COLAZZA (NO)",
"C926":"COMIGNAGO (NO)",
"D162":"CRESSA (NO)",
"D216":"CUREGGIO (NO)",
"D309":"DIVIGNANO (NO)",
"D347":"DORMELLETTO (NO)",
"A189":"ALFIANO NATTA (AL)",
"A197":"ALICE BEL COLLE (AL)",
"A211":"ALLUVIONI CAMBIÒ (AL)",
"A819":"BESANO (VA)",
"A825":"BESNATE (VA)",
"A826":"BESOZZO (VA)",
"A845":"BIANDRONNO (VA)",
"A891":"BISUSCHIO (VA)",
"A918":"BODIO LOMNAGO (VA)",
"B126":"BREBBIA (VA)",
"B131":"BREGANO (VA)",
"B150":"BRENTA (VA)",
"B166":"BREZZO DI BEDERO (VA)",
"B182":"BRINZIO (VA)",
"B191":"BRISSAGO-VALTRAVAGLIA (VA)",
"B219":"BRUNELLO (VA)",
"B228":"BRUSIMPIANO (VA)",
"B258":"BUGUGGIATE (VA)",
"B300":"BUSTO ARSIZIO (VA)",
"B326":"CADEGLIANO-VICONAGO (VA)",
"B347":"CADREZZATE (VA)",
"B368":"CAIRATE (VA)",
"B634":"CANTELLO (VA)",
"B732":"CARAVATE (VA)",
"B754":"CARDANO AL CAMPO (VA)",
"B796":"CARNAGO (VA)",
"B805":"CARONNO PERTUSELLA (VA)",
"B807":"CARONNO VARESINO (VA)",
"B875":"CASALE LITTA (VA)",
"B921":"CASALZUIGNO (VA)",
"B949":"CASCIAGO (VA)",
"B987":"CASORATE SEMPIONE (VA)",
"C004":"CASSANO MAGNAGO (VA)",
"B999":"CASSANO VALCUVIA (VA)",
"C139":"CASTELLANZA (VA)",
"B312":"<NAME> (VA)",
"C273":"CASTELSEPRIO (VA)",
"C181":"CASTELVECCANA (VA)",
"C300":"CASTIGLIONE OLONA (VA)",
"C343":"CASTRONNO (VA)",
"C382":"CAVARIA CON PREMEZZO (VA)",
"C409":"CAZZAGO BRABBIA (VA)",
"C732":"CISLAGO (VA)",
"C751":"CITTIGLIO (VA)",
"C796":"CLIVIO (VA)",
"C810":"COCQUIO-TREVISAGO (VA)",
"C911":"COMABBIO (VA)",
"C922":"COMERIO (VA)",
"D144":"CREMENAGA (VA)",
"D185":"CROSIO DELLA VALLE (VA)",
"D192":"CUASSO AL MONTE (VA)",
"D199":"CUGLIATE-FABIASCO (VA)",
"D204":"CUNARDO (VA)",
"D217":"CURIGLIA CON MONTEVIASCO (VA)",
"D238":"CUVEGLIO (VA)",
"D239":"CUVIO (VA)",
"D256":"DAVERIO (VA)",
"D384":"DUMENZA (VA)",
"D385":"DUNO (VA)",
"D467":"FAGNANO OLONA (VA)",
"D543":"FERNO (VA)",
"D551":"FERRERA DI VARESE (VA)",
"D869":"GALLARATE (VA)",
"D871":"GALLIATE LOMBARDO (VA)",
"D946":"GAVIRATE (VA)",
"D951":"GAZZADA SCHIANNO (VA)",
"D963":"GEMONIO (VA)",
"D981":"GERENZANO (VA)",
"D987":"GERMIGNAGA (VA)",
"E079":"GOLASECCA (VA)",
"E101":"GORLA MAGGIORE (VA)",
"E102":"GORLA MINORE (VA)",
"E104":"GORNATE OLONA (VA)",
"E144":"GRANTOLA (VA)",
"E292":"INARZO (VA)",
"E299":"INDUNO OLONA (VA)",
"E367":"ISPRA (VA)",
"E386":"JERAGO CON ORAGO (VA)",
"E494":"LAVENA PONTE TRESA (VA)",
"E496":"LAVENO-MOMBELLO (VA)",
"E510":"LEGGIUNO (VA)",
"E665":"LONATE CEPPINO (VA)",
"E666":"LONATE POZZOLO (VA)",
"E707":"LOZZA (VA)",
"E734":"LUINO (VA)",
"E769":"LUVINATE (VA)",
"E856":"MALGESSO (VA)",
"E863":"MALNATE (VA)",
"E929":"MARCHIROLO (VA)",
"E965":"MARNATE (VA)",
"F002":"MARZIO (VA)",
"F007":"MASCIAGO PRIMO (VA)",
"F134":"MERCALLO (VA)",
"F154":"MESENZANA (VA)",
"F526":"MONTEGRINO VALTRAVAGLIA (VA)",
"F703":"MONVALLE (VA)",
"F711":"MORAZZONE (VA)",
"F736":"MORNAGO (VA)",
"G008":"OGGIONA CON SANTO STEFANO (VA)",
"G028":"OLGIATE OLONA (VA)",
"G103":"ORIGGIO (VA)",
"G105":"ORINO (VA)",
"E529":"OSMATE (VA)",
"G906":"PORTO CERESIO (VA)",
"G907":"PORTO VALTRAVAGLIA (VA)",
"H173":"RAN<NAME>CUVIA (VA)",
"H174":"RANCO (VA)",
"H723":"SALTRIO (VA)",
"H736":"SAMARATE (VA)",
"I441":"SARONNO (VA)",
"I688":"SESTO CALENDE (VA)",
"I793":"SOLBIATE ARNO (VA)",
"I794":"SOLBIATE OLONA (VA)",
"I819":"SOMMA LOMBARDO (VA)",
"L003":"SUMIRAGO (VA)",
"L032":"TAINO (VA)",
"L115":"TERNATE (VA)",
"L319":"TRADATE (VA)",
"L342":"TRAVEDONA-MONATE (VA)",
"A705":"TRONZANO LAGO MAGGIORE (VA)",
"L480":"UBOLDO (VA)",
"L577":"VALGANNA (VA)",
"L671":"VARANO BORGHI (VA)",
"L682":"VARESE (VA)",
"L703":"VEDANO OLONA (VA)",
"L733":"VENEGONO INFERIORE (VA)",
"L734":"VENEGONO SUPERIORE (VA)",
"L765":"VERGIATE (VA)",
"L876":"VIGGIÙ (VA)",
"M101":"VIZZOLA TICINO (VA)",
"H872":"SANGIANO (VA)",
"M339":"MACCAGNO CON PINO E VEDDASCA (VA)",
"A143":"ALBAVILLA (CO)",
"A153":"ALBESE CON CASSANO (CO)",
"A164":"ALBIOLO (CO)",
"A224":"ALSERIO (CO)",
"A249":"ALZATE BRIANZA (CO)",
"A319":"<NAME> (CO)",
"A333":"AP<NAME> (CO)",
"A391":"ARGEGNO (CO)",
"A430":"AROSIO (CO)",
"A476":"ASSO (CO)",
"A670":"BARNI (CO)",
"A778":"<NAME> (CO)",
"A791":"BEREGAZZO CON FIGLIARO (CO)",
"A870":"BINAGO (CO)",
"A898":"BIZZARONE (CO)",
"A904":"BLESSAGNO (CO)",
"A905":"BLEVIO (CO)",
"B134":"BREGNANO (CO)",
"B144":"BRENNA (CO)",
"B172":"BRIENNO (CO)",
"B218":"BRUNATE (CO)",
"B262":"BULGAROGRASSO (CO)",
"B313":"CABIATE (CO)",
"B346":"CADORAGO (CO)",
"B355":"CAGLIO (CO)",
"B359":"CAGNO (CO)",
"B513":"CAMPIONE D'ITALIA (CO)",
"B639":"CANTÙ (CO)",
"B641":"CANZO (CO)",
"B653":"CAPIAGO INTIMIANO (CO)",
"B730":"CARATE URIO (CO)",
"B742":"CARBONATE (CO)",
"B778":"CARIMATE (CO)",
"B785":"CARLAZZO (CO)",
"B851":"CARUGO (CO)",
"B942":"<NAME>'INTELVI (CO)",
"B974":"<NAME>'ERBA (CO)",
"B977":"CASNATE CON BERNATE (CO)",
"C020":"<NAME> (CO)",
"C206":"CASTELMARTE (CO)",
"C220":"CASTELNUOVO BOZZENTE (CO)",
"C299":"<NAME> (CO)",
"C381":"CAVARGNA (CO)",
"C482":"<NAME> (CO)",
"C516":"CERMENATE (CO)",
"C520":"CERNOBBIO (CO)",
"C724":"CIRIMIDO (CO)",
"C787":"<NAME> (CO)",
"C902":"COLONNO (CO)",
"C933":"COMO (CO)",
"D041":"CORRIDO (CO)",
"D147":"CREMIA (CO)",
"D196":"CUCCIAGO (CO)",
"D232":"CUSINO (CO)",
"D310":"DIZZASCO (CO)",
"D329":"DOMASO (CO)",
"D341":"DONGO (CO)",
"D355":"DOSSO DEL LIRO (CO)",
"D416":"ERBA (CO)",
"D445":"EUPILIO (CO)",
"D462":"FAGGETO LARIO (CO)",
"D482":"FALOPPIO (CO)",
"D531":"FENEGRÒ (CO)",
"D579":"FIGINO SERENZA (CO)",
"D605":"FINO MORNASCO (CO)",
"D930":"GARZENO (CO)",
"D974":"GERA LARIO (CO)",
"E139":"GRANDATE (CO)",
"E141":"GRANDOLA ED UNITI (CO)",
"E172":"GRIANTE (CO)",
"E235":"GUANZATE (CO)",
"E309":"INVERIGO (CO)",
"E405":"LAGLIO (CO)",
"E416":"LAINO (CO)",
"E428":"LAMBRUGO (CO)",
"E462":"LASNIGO (CO)",
"E569":"LEZZENO (CO)",
"E593":"LIMIDO COMASCO (CO)",
"E607":"LIPOMO (CO)",
"E623":"LIVO (CO)",
"E638":"LOCATE VARESINO (CO)",
"E659":"LOMAZZO (CO)",
"E679":"LONGONE AL SEGRINO (CO)",
"E735":"LUISAGO (CO)",
"E749":"LURAGO D'ERBA (CO)",
"E750":"L<NAME> (CO)",
"E753":"LURATE CACCIVIO (CO)",
"E830":"MAGREGLIO (CO)",
"E951":"MARIANO COMENSE (CO)",
"F017":"MASLIANICO (CO)",
"F120":"MENAGGIO (CO)",
"F151":"MERONE (CO)",
"F305":"MOLTRASIO (CO)",
"F372":"MONGUZZO (CO)",
"F427":"MONTANO LUCINO (CO)",
"F564":"MONTEMEZZO (CO)",
"F688":"MONTORFANO (CO)",
"F788":"MOZZATE (CO)",
"F828":"MUSSO (CO)",
"F877":"NESSO (CO)",
"F958":"NOVEDRATE (CO)",
"G025":"OLGIATE COMASCO (CO)",
"G056":"OLTRONA DI SAN MAMETTE (CO)",
"G126":"ORSENIGO (CO)",
"G416":"PEGLIO (CO)",
"G556":"PIANELLO DEL LARIO (CO)",
"G665":"PIGRA (CO)",
"G737":"PLESIO (CO)",
"G773":"<NAME> (CO)",
"G821":"PONNA (CO)",
"G847":"<NAME> (CO)",
"G889":"PORLEZZA (CO)",
"H074":"PROSERPIO (CO)",
"H094":"PUSIANO (CO)",
"H255":"REZZAGO (CO)",
"H478":"RODERO (CO)",
"H521":"RONAGO (CO)",
"H601":"ROVELLASCA (CO)",
"H602":"<NAME> (CO)",
"H679":"<NAME> (CO)",
"H760":"<NAME> (CO)",
"H830":"SAN FEDELE INTELVI (CO)",
"H840":"<NAME> (CO)",
"I051":"<NAME> (CO)",
"I529":"SCHIGNANO (CO)",
"I611":"<NAME> (CO)",
"I792":"SOLBIATE (CO)",
"I856":"SORICO (CO)",
"I860":"SORMANO (CO)",
"I943":"STAZZONA (CO)",
"L071":"TAVERNERIO (CO)",
"L228":"TORNO (CO)",
"L413":"TREZZONE (CO)",
"L470":"TURATE (CO)",
"L487":"UGGIATE-TREVANO (CO)",
"L547":"VALBRONA (CO)",
"L640":"VALMOREA (CO)",
"H259":"VAL REZZO (CO)",
"C936":"VALSOLDA (CO)",
"L715":"VELESO (CO)",
"L737":"VENIANO (CO)",
"L748":"VERCANA (CO)",
"L792":"VERTEMATE CON MINOPRIO (CO)",
"L956":"VILLA GUARDIA (CO)",
"M156":"ZELBIO (CO)",
"I162":"SAN SIRO (CO)",
"E151":"GRAVEDONA ED UNITI (CO)",
"A744":"BELLAGIO (CO)",
"M336":"COLVERDE (CO)",
"L371":"TREMEZZINA (CO)",
"M383":"ALTA VALLE INTELVI (CO)",
"A135":"ALBAREDO PER SAN MARCO (SO)",
"A172":"ALBOSAGGIA (SO)",
"A273":"<NAME> (SO)",
"A337":"APRICA (SO)",
"A382":"ARDENNO (SO)",
"A777":"BEMA (SO)",
"A787":"<NAME> (SO)",
"A848":"BIANZONE (SO)",
"B049":"BORMIO (SO)",
"B255":"BUGLIO IN MONTE (SO)",
"B366":"CAIOLO (SO)",
"B530":"CAMPODOLCINO (SO)",
"B993":"CASPOGGIO (SO)",
"C186":"<NAME> (SO)",
"C325":"<NAME> (SO)",
"C418":"CEDRASCO (SO)",
"C493":"CERCINO (SO)",
"C623":"CHIAVENNA (SO)",
"C628":"CHIESA IN VALMALENCO (SO)",
"C651":"CHIURO (SO)",
"C709":"CINO (SO)",
"C785":"CIVO (SO)",
"C903":"COLORINA (SO)",
"D088":"COSIO VALTELLINO (SO)",
"D258":"DAZIO (SO)",
"D266":"DELEBIO (SO)",
"D377":"DUBINO (SO)",
"D456":"FAEDO VALTELLINO (SO)",
"D694":"FORCOLA (SO)",
"D830":"FUSINE (SO)",
"D990":"GEROLA ALTA (SO)",
"E090":"GORDONA (SO)",
"E200":"GROSIO (SO)",
"E201":"GROSOTTO (SO)",
"E342":"MADESIMO (SO)",
"E443":"LANZADA (SO)",
"E621":"LIVIGNO (SO)",
"E705":"LOVERO (SO)",
"E896":"MANTELLO (SO)",
"F070":"MAZZO DI VALTELLINA (SO)",
"F115":"MELLO (SO)",
"F153":"MESE (SO)",
"F393":"MONTAGNA IN VALTELLINA (SO)",
"F712":"MORBEGNO (SO)",
"F956":"NOVATE MEZZOLA (SO)",
"G410":"PEDESINA (SO)",
"G572":"PIANTEDO (SO)",
"G576":"PIATEDA (SO)",
"G718":"PIURO (SO)",
"G431":"POGGIRIDENTI (SO)",
"G829":"PONTE IN VALTELLINA (SO)",
"G937":"POSTALESIO (SO)",
"G993":"PRATA CAMPORTACCIO (SO)",
"H192":"RASURA (SO)",
"H493":"ROGOLO (SO)",
"H752":"SAMOLACO (SO)",
"H868":"SAN GIACOMO FILIPPO (SO)",
"I636":"SERNIO (SO)",
"I828":"SONDALO (SO)",
"I829":"SONDRIO (SO)",
"I928":"SPRIANA (SO)",
"L035":"TALAMONA (SO)",
"L056":"TARTANO (SO)",
"L084":"TEGLIO (SO)",
"L175":"TIRANO (SO)",
"L244":"TORRE DI SANTA MARIA (SO)",
"L316":"TOVO DI SANT'AGATA (SO)",
"L330":"TRAONA (SO)",
"L392":"TRESIVIO (SO)",
"L557":"VALDIDENTRO (SO)",
"L563":"VALDISOTTO (SO)",
"L576":"VALFURVA (SO)",
"L638":"VAL MASINO (SO)",
"L749":"VERCEIA (SO)",
"L799":"VERVIO (SO)",
"L907":"VILLA DI CHIAVENNA (SO)",
"L908":"VILLA DI TIRANO (SO)",
"A010":"ABBIATEGRASSO (MI)",
"A127":"ALBAIRATE (MI)",
"A375":"ARCONATE (MI)",
"A389":"ARESE (MI)",
"A413":"ARLUNO (MI)",
"A473":"ASSAGO (MI)",
"A652":"BAREGGIO (MI)",
"A697":"BASIANO (MI)",
"A699":"BASIGLIO (MI)",
"A751":"BELLINZAGO LOMBARDO (MI)",
"A804":"BERNATE TICINO (MI)",
"A820":"BESATE (MI)",
"A872":"BINASCO (MI)",
"A920":"BOFFALORA SOPRA TICINO (MI)",
"A940":"BOLLATE (MI)",
"B162":"BRESSO (MI)",
"B235":"BUBBIANO (MI)",
"B240":"BUCCINASCO (MI)",
"B286":"BUSCATE (MI)",
"B292":"BUSSERO (MI)",
"B301":"BUSTO GAROLFO (MI)",
"B448":"CALVIGNASCO (MI)",
"B461":"CAMBIAGO (MI)",
"B593":"CANEGRATE (MI)",
"B820":"CARPIANO (MI)",
"B850":"CARUGATE (MI)",
"B938":"CASARILE (MI)",
"B989":"CASOREZZO (MI)",
"C003":"C<NAME> (MI)",
"C014":"CASSINA DE' PECCHI (MI)",
"C033":"CASSINETTA DI LUGAGNANO (MI)",
"C052":"<NAME> (MI)",
"C523":"CERNUSCO SUL NAVIGLIO (MI)",
"C536":"CERRO AL LAMBRO (MI)",
"C537":"CERRO MAGGIORE (MI)",
"C565":"CESANO BOSCONE (MI)",
"C569":"CESATE (MI)",
"C707":"<NAME> (MI)",
"C733":"CISLIANO (MI)",
"C895":"COLOGNO MONZESE (MI)",
"C908":"COLTURANO (MI)",
"C986":"CORBETTA (MI)",
"D013":"CORMANO (MI)",
"D018":"CORNAREDO (MI)",
"D045":"CORSICO (MI)",
"D198":"CUGGIONO (MI)",
"D229":"CUSAGO (MI)",
"D231":"CUSANO MILANINO (MI)",
"D244":"DAIRAGO (MI)",
"D367":"DRESANO (MI)",
"D845":"GAGGIANO (MI)",
"D912":"GARBAGNATE MILANESE (MI)",
"D995":"GESSATE (MI)",
"E094":"GORGONZOLA (MI)",
"E170":"GREZZAGO (MI)",
"E258":"GUDO VISCONTI (MI)",
"E313":"INVERUNO (MI)",
"E317":"INZAGO (MI)",
"E395":"LACCHIARELLA (MI)",
"E415":"LAINATE (MI)",
"E514":"LEGNANO (MI)",
"E610":"LISCATE (MI)",
"E639":"LOCATE DI TRIULZI (MI)",
"E801":"MAGENTA (MI)",
"E819":"MAGNAGO (MI)",
"E921":"MARCALLO CON CASONE (MI)",
"F003":"MASATE (MI)",
"F084":"MEDIGLIA (MI)",
"C510":"CERIALE (SV)",
"C729":"CISANO SUL NEVA (SV)",
"D095":"COSSERIA (SV)",
"D264":"DEGO (SV)",
"D424":"ERLI (SV)",
"D600":"FINALE LIGURE (SV)",
"D927":"GARLENDA (SV)",
"E064":"GIUSTENICE (SV)",
"E066":"GIUSVALLA (SV)",
"E414":"LAIGUEGLIA (SV)",
"E632":"LOANO (SV)",
"E816":"MAGLIOLO (SV)",
"E860":"MALLARE (SV)",
"F046":"MASSIMINO (SV)",
"F213":"MILLESIMO (SV)",
"F226":"MIOGLIA (SV)",
"F813":"MURIALDO (SV)",
"F847":"NASINO (SV)",
"F926":"NOLI (SV)",
"G076":"ONZO (SV)",
"D522":"ORCO FEGLINO (SV)",
"G144":"ORTOVERO (SV)",
"G155":"OSIGLIA (SV)",
"G281":"PALLARE (SV)",
"G542":"<NAME> (SV)",
"G605":"PIETRA LIGURE (SV)",
"G741":"PLODIO (SV)",
"G866":"PONTINVREA (SV)",
"H126":"QUILIANO (SV)",
"H266":"RIALTO (SV)",
"H452":"ROCCAVIGNALE (SV)",
"I453":"SASSELLO (SV)",
"I480":"SAVONA (SV)",
"I926":"SPOTORNO (SV)",
"I946":"STELLA (SV)",
"I947":"STELLANELLO (SV)",
"L152":"TESTICO (SV)",
"L190":"TOIRANO (SV)",
"L315":"TO<NAME> (SV)",
"L499":"URBE (SV)",
"L528":"VADO LIGURE (SV)",
"L675":"VARAZZE (SV)",
"L730":"VENDONE (SV)",
"L823":"VEZZI PORTIO (SV)",
"L975":"VILLANO<NAME>'ALBENGA (SV)",
"M197":"ZUCCARELLO (SV)",
"A388":"ARENZANO (GE)",
"A506":"AVEGNO (GE)",
"A658":"BARGAGLI (GE)",
"A922":"BOGLIASCO (GE)",
"B067":"BORZONASCA (GE)",
"B282":"BUSALLA (GE)",
"B490":"CAMOGLI (GE)",
"B538":"CAMPO LIGURE (GE)",
"B551":"CAMPOMORONE (GE)",
"B726":"CARASCO (GE)",
"B939":"CASARZA LIGURE (GE)",
"B956":"CASELLA (GE)",
"C302":"<NAME> (GE)",
"C481":"CERANESI (GE)",
"C621":"CHIAVARI (GE)",
"C673":"CICAGNA (GE)",
"C823":"COGOLETO (GE)",
"C826":"COGORNO (GE)",
"C995":"COREGLIA LIGURE (GE)",
"D175":"CROCEFIESCHI (GE)",
"D255":"DAVAGNA (GE)",
"D509":"FASCIA (GE)",
"D512":"<NAME> (GE)",
"D677":"FONTANIGORDA (GE)",
"D969":"GENOVA (GE)",
"E109":"GORRETO (GE)",
"E341":"<NAME> (GE)",
"E488":"LAVAGNA (GE)",
"E519":"LEIVI (GE)",
"E695":"LORSICA (GE)",
"E737":"LUMARZO (GE)",
"F020":"MASONE (GE)",
"F098":"MELE (GE)",
"F173":"MEZZANEGO (GE)",
"F202":"MIGNANEGO (GE)",
"F256":"MOCONESI (GE)",
"F354":"MONEGLIA (GE)",
"F445":"MONTEBRUNO (GE)",
"F682":"MONTOGGIO (GE)",
"F858":"NE (GE)",
"F862":"NEIRONE (GE)",
"G093":"ORERO (GE)",
"G646":"PIEVE LIGURE (GE)",
"G913":"PORTOFINO (GE)",
"H073":"PROPATA (GE)",
"H183":"RAPALLO (GE)",
"H212":"RECCO (GE)",
"H258":"REZZOAGLIO (GE)",
"H536":"<NAME> (GE)",
"H546":"RONDANINA (GE)",
"H581":"ROSSIGLIONE (GE)",
"H599":"ROVEGNO (GE)",
"H802":"SAN COLOMBANO CERTENOLI (GE)",
"I225":"<NAME> (GE)",
"I346":"SANT'OLCESE (GE)",
"I368":"<NAME> (GE)",
"I475":"SAVIGNONE (GE)",
"I640":"<NAME> (GE)",
"I693":"<NAME>VANTE (GE)",
"I852":"SORI (GE)",
"L167":"TIGLIETO (GE)",
"L298":"TORRIGLIA (GE)",
"L416":"TRIBOGNA (GE)",
"L507":"USCIO (GE)",
"L546":"VALBREVENNA (GE)",
"M105":"VOBBIA (GE)",
"M182":"ZOAGLI (GE)",
"A261":"AMEGLIA (SP)",
"A373":"ARCOLA (SP)",
"A836":"BEVERINO (SP)",
"A932":"BOLANO (SP)",
"A961":"BONASSOLA (SP)",
"A992":"<NAME> (SP)",
"B214":"BRUGNATO (SP)",
"B410":"<NAME>LIO (SP)",
"B838":"CARRO (SP)",
"B839":"CARRODANO (SP)",
"C240":"<NAME> (SP)",
"D265":"DEIVA MARINA (SP)",
"D655":"FOLLO (SP)",
"D758":"FRAMURA (SP)",
"E463":"LA SPEZIA (SP)",
"E542":"LERICI (SP)",
"E560":"LEVANTO (SP)",
"E842":"MAISSANA (SP)",
"F609":"MONTEROSSO AL MARE (SP)",
"G143":"LUNI (SP)",
"G664":"PIGNONE (SP)",
"G925":"PORTOVENERE (SP)",
"H275":"RICCÒ DEL GOLFO DI SPEZIA (SP)",
"H304":"RIOMAGGIORE (SP)",
"H461":"ROCCHETTA DI VARA (SP)",
"I363":"SANTO STEFANO DI MAGRA (SP)",
"I449":"SARZANA (SP)",
"E070":"SESTA GODANO (SP)",
"L681":"VARESE LIGURE (SP)",
"L774":"VERNAZZA (SP)",
"L819":"VEZZANO LIGURE (SP)",
"M177":"ZIGNAGO (SP)",
"A067":"AGAZZANO (PC)",
"A223":"ALSENO (PC)",
"A823":"BESENZONE (PC)",
"A831":"BETTOLA (PC)",
"A909":"BOBBIO (PC)",
"B025":"BORGONOVO VAL TIDONE (PC)",
"B332":"CADEO (PC)",
"B405":"CALENDASCO (PC)",
"B479":"CAMINATA (PC)",
"B643":"CAORSO (PC)",
"B812":"CARPANETO PIACENTINO (PC)",
"C145":"CASTELL'ARQUATO (PC)",
"C261":"<NAME>IOVANNI (PC)",
"C288":"CASTELVETRO PIACENTINO (PC)",
"C513":"CERIGNALE (PC)",
"C838":"COLI (PC)",
"D054":"CORTE BRUGNATELLA (PC)",
"D061":"CORTEMAGGIORE (PC)",
"D502":"FARINI (PC)",
"D555":"FERRIERE (PC)",
"D611":"FIORENZUOLA D'ARDA (PC)",
"D958":"GAZZOLA (PC)",
"E114":"GOSSOLENGO (PC)",
"E132":"GRAGNANO TREBBIENSE (PC)",
"E196":"GROPPARELLO (PC)",
"E726":"LUGAGNANO VAL D'ARDA (PC)",
"F671":"MONTICELLI D'ONGINA (PC)",
"F724":"MORFASSO (PC)",
"F885":"NIBBIANO (PC)",
"G195":"OTTONE (PC)",
"G399":"PECORARA (PC)",
"G535":"PIACENZA (PC)",
"G557":"PIANELLO VAL TIDONE (PC)",
"G696":"PIOZZANO (PC)",
"G747":"PODENZANO (PC)",
"G842":"PONTE DELL'OLIO (PC)",
"G852":"PONTENURE (PC)",
"H350":"RIVERGARO (PC)",
"H593":"ROTTOFRENO (PC)",
"H887":"SAN GIORGIO PIACENTINO (PC)",
"G788":"SAN PIETRO IN CERRO (PC)",
"I434":"SARMATO (PC)",
"L348":"TRAVO (PC)",
"L772":"VERNASCA (PC)",
"L897":"VIGOLZONE (PC)",
"L980":"VILLANOVA SULL'ARDA (PC)",
"M165":"ZERBA (PC)",
"L848":"ZIANO PIACENTINO (PC)",
"A138":"ALBARETO (PR)",
"A646":"BARDI (PR)",
"A731":"BEDONIA (PR)",
"A788":"BERCETO (PR)",
"A987":"BORE (PR)",
"B042":"<NAME> (PR)",
"B293":"BUSSETO (PR)",
"B408":"CALESTANO (PR)",
"C852":"COLLECCHIO (PR)",
"C904":"COLORNO (PR)",
"C934":"COMPIANO (PR)",
"D026":"CORNIGLIO (PR)",
"D526":"FELINO (PR)",
"B034":"FIDENZA (PR)",
"D673":"FONTANELLATO (PR)",
"D685":"FONTEVIVO (PR)",
"D728":"<NAME> (PR)",
"E438":"LANGHIRANO (PR)",
"E547":"LE<NAME>' BAGNI (PR)",
"F082":"MEDESANO (PR)",
"F174":"MEZZANI (PR)",
"F340":"<NAME> (PR)",
"F473":"MONTECHIARUGOLO (PR)",
"F882":"<NAME> (PR)",
"F914":"NOCETO (PR)",
"G255":"PALANZANO (PR)",
"G337":"PARMA (PR)",
"L572":"VALERA FRATTA (LO)",
"L977":"VILLANOVA DEL SILLARO (LO)",
"M158":"<NAME> (LO)",
"A087":"AG<NAME>ANZA (MB)",
"G837":"PONTECHIANALE (CN)",
"G970":"PRADLEVES (CN)",
"H011":"PRAZZO (CN)",
"H059":"PRIERO (CN)",
"H068":"PRIOCCA (CN)",
"H069":"PRIOLA (CN)",
"H085":"PRUNETTO (CN)",
"H150":"RACCONIGI (CN)",
"H247":"REVELLO (CN)",
"H285":"RIFREDDO (CN)",
"H326":"RITTANA (CN)",
"H362":"ROASCHIA (CN)",
"H363":"ROASCIO (CN)",
"H377":"ROBILANTE (CN)",
"H378":"ROBURENT (CN)",
"H385":"ROCCABRUNA (CN)",
"H391":"ROCCA CIGLIÈ (CN)",
"H395":"ROCCA DE' BALDI (CN)",
"H407":"ROCCAFORTE MONDOVÌ (CN)",
"H447":"ROCCASPARVERA (CN)",
"H453":"ROCCAVIONE (CN)",
"H462":"ROCCHETTA BELBO (CN)",
"H472":"RODDI (CN)",
"H473":"RODDINO (CN)",
"H474":"RODELLO (CN)",
"H578":"ROSSANA (CN)",
"H633":"RUFFIA (CN)",
"H695":"SALE DELLE LANGHE (CN)",
"H704":"SALE SAN GIOVANNI (CN)",
"H710":"SALICETO (CN)",
"H716":"SALMOUR (CN)",
"H727":"SALUZZO (CN)",
"H746":"SAMBUCO (CN)",
"H755":"SAMPEYRE (CN)",
"H770":"SAN BENEDETTO BELBO (CN)",
"H812":"SAN DAMIANO MACRA (CN)",
"H851":"SANFRÈ (CN)",
"H852":"SANFRONT (CN)",
"I037":"SAN MICHELE MONDOVÌ (CN)",
"I210":"SANT'ALBANO STURA (CN)",
"I316":"SANTA VIT<NAME> (CN)",
"I367":"<NAME> (CN)",
"I372":"<NAME> (CN)",
"I470":"SAVIGLIANO (CN)",
"I484":"SCAGNELLO (CN)",
"I512":"SCARNAFIGI (CN)",
"I646":"<NAME> (CN)",
"I659":"SER<NAME> (CN)",
"I750":"SINIO (CN)",
"I817":"SOMANO (CN)",
"I822":"<NAME> (CN)",
"I823":"<NAME> (CN)",
"I985":"STROPPO (CN)",
"L048":"TARANTASCA (CN)",
"L252":"TORRE BORMIDA (CN)",
"L241":"TORRE MONDOVÌ (CN)",
"L278":"TORRE SAN GIORGIO (CN)",
"L281":"TORRESINA (CN)",
"L367":"TREISO (CN)",
"L410":"TREZZO TINELLA (CN)",
"L427":"TRINITÀ (CN)",
"L558":"VALDIERI (CN)",
"L580":"VALGRANA (CN)",
"L631":"VALLORIATE (CN)",
"L636":"VALMALA (CN)",
"L729":"VENASCA (CN)",
"L758":"VERDUNO (CN)",
"L771":"VERNANTE (CN)",
"L804":"VERZUOLO (CN)",
"L817":"VEZZA D'ALBA (CN)",
"L841":"VICOFORTE (CN)",
"L888":"VIGNOLO (CN)",
"L942":"VILLAFALLETTO (CN)",
"L974":"VILLANOVA MONDOVÌ (CN)",
"L990":"VILLANOVA SOLARO (CN)",
"M015":"<NAME> (CN)",
"M055":"VINADIO (CN)",
"M063":"VIOLA (CN)",
"M136":"VOTTIGNASCO (CN)",
"A072":"<NAME> (AT)",
"A173":"ALBUGNANO (AT)",
"A312":"ANTIGNANO (AT)",
"A352":"ARAMENGO (AT)",
"A479":"ASTI (AT)",
"A527":"<NAME> (AT)",
"A588":"<NAME> (AT)",
"A770":"BELVEGLIO (AT)",
"A812":"<NAME> (AT)",
"B221":"BRUNO (AT)",
"B236":"BUBBIO (AT)",
"B306":"B<NAME>'ASTI (AT)",
"B376":"CALAMANDRANA (AT)",
"B419":"CALLIANO (AT)",
"B425":"CALOSSO (AT)",
"B469":"<NAME> (AT)",
"B594":"CANELLI (AT)",
"B633":"CANTARANA (AT)",
"B707":"CAPRIGLIO (AT)",
"B991":"CASORZO (AT)",
"C022":"CASSINASCO (AT)",
"C049":"<NAME> (AT)",
"C047":"<NAME> (AT)",
"C064":"<NAME> (AT)",
"C127":"CASTELL'ALFERO (AT)",
"C154":"CASTELLERO (AT)",
"C161":"<NAME> (AT)",
"A300":"<NAME> (AT)",
"C226":"<NAME> (AT)",
"C230":"<NAME> (AT)",
"C232":"<NAME> (AT)",
"C253":"<NAME> (AT)",
"C438":"CELLARENGO (AT)",
"C440":"<NAME> (AT)",
"C528":"<NAME> (AT)",
"C533":"<NAME> (AT)",
"C583":"CESSOLE (AT)",
"C658":"<NAME> (AT)",
"C701":"CINAGLIO (AT)",
"C739":"<NAME> (AT)",
"C804":"COAZZOLO (AT)",
"C807":"COCCONATO (AT)",
"D046":"CORSIONE (AT)",
"D050":"CORTANDONE (AT)",
"D051":"CORTANZE (AT)",
"D052":"CORTAZZONE (AT)",
"D072":"CORTIGLIONE (AT)",
"D101":"COSSOMBRATO (AT)",
"D119":"COSTIGLIOLE D'ASTI (AT)",
"D207":"CUNICO (AT)",
"D388":"<NAME> (AT)",
"D554":"FERRERE (AT)",
"D678":"FONTANILE (AT)",
"D802":"FRINCO (AT)",
"E134":"GRANA (AT)",
"E159":"GRAZZANO BADOGLIO (AT)",
"E295":"INCISA SCAPACCINO (AT)",
"E338":"ISOLA D'ASTI (AT)",
"E633":"LOAZZOLO (AT)",
"E917":"MARANZANA (AT)",
"E944":"MARETTO (AT)",
"F254":"MOASCA (AT)",
"F308":"MOMBALDONE (AT)",
"F311":"MOMBARUZZO (AT)",
"F316":"MOMBERCELLI (AT)",
"F323":"MONALE (AT)",
"F325":"MONASTERO BORMIDA (AT)",
"F336":"MONCALVO (AT)",
"F343":"MONCUCCO TORINESE (AT)",
"F361":"MONGARDINO (AT)",
"F386":"MONTABONE (AT)",
"F390":"MONTAFIA (AT)",
"F409":"M<NAME> (AT)",
"F468":"MONTE<NAME>'ASTI (AT)",
"F527":"MONTEGROSSO D'ASTI (AT)",
"F556":"MONTEMAGNO (AT)",
"F709":"MORANSENGO (AT)",
"F902":"NIZZA MONFERRATO (AT)",
"G048":"OLMO GENTILE (AT)",
"G358":"PASSERANO MARMORITO (AT)",
"G430":"PENANGO (AT)",
"G593":"PIEA (AT)",
"G676":"PINO D'ASTI (AT)",
"G692":"PIOVÀ MASSAIA (AT)",
"G894":"PORTACOMARO (AT)",
"H102":"QUARANTI (AT)",
"H219":"REFRANCORE (AT)",
"H250":"REVIGLIASCO D'ASTI (AT)",
"H366":"ROATTO (AT)",
"H376":"ROBELLA (AT)",
"H392":"ROCCA D'ARAZZO (AT)",
"H451":"ROCCAVERANO (AT)",
"H466":"ROCCHETTA PALAFEA (AT)",
"H468":"ROCCHETTA TANARO (AT)",
"H811":"SAN DAM<NAME> (AT)",
"H899":"SAN GIORGIO SCARAMPI (AT)",
"H987":"<NAME> (AT)",
"I017":"SAN MARZANO OLIVETO (AT)",
"I076":"SAN PAOLO SOLBRITO (AT)",
"I555":"SCURZOLENGO (AT)",
"I637":"SEROLE (AT)",
"I678":"SESSAME (AT)",
"I698":"SETTIME (AT)",
"I781":"SOGLIO (AT)",
"L168":"TIGLIOLE (AT)",
"L203":"TONCO (AT)",
"L204":"TONENGO (AT)",
"L531":"VAGLIO SERRA (AT)",
"L574":"VALFENERA (AT)",
"L807":"VESIME (AT)",
"L829":"VIALE (AT)",
"L834":"VIARIGI (AT)",
"L879":"V<NAME>'ASTI (AT)",
"L945":"VILLAFRANCA D'ASTI (AT)",
"L984":"VILLANOVA D'ASTI (AT)",
"M019":"VILLA SAN SECONDO (AT)",
"M058":"VINCHIO (AT)",
"M302":"MONTIGLIO MONFERRATO (AT)",
"A052":"ACQUI TERME (AL)",
"A146":"ALBERA LIGURE (AL)",
"A182":"ALESSANDRIA (AL)",
"A074":"AGLIÈ (TO)",
"A109":"AIRASCA (TO)",
"A117":"ALA DI STURA (TO)",
"A157":"ALBIANO D'IVREA (TO)",
"A199":"ALICE SUPERIORE (TO)",
"G233":"PAGAZZANO (BG)",
"G249":"PALADINA (BG)",
"G259":"PALAZZAGO (BG)",
"G295":"PALOSCO (BG)",
"G346":"PARRE (BG)",
"G350":"PARZANICA (BG)",
"G412":"PEDRENGO (BG)",
"G418":"PEIA (BG)",
"G564":"PIANICO (BG)",
"G574":"PIARIO (BG)",
"G579":"PIAZZA BREMBANA (BG)",
"G583":"PIAZZATORRE (BG)",
"G588":"PIAZZOLO (BG)",
"G774":"POGNANO (BG)",
"F941":"PONTE NOSSA (BG)",
"G853":"PONTERANICA (BG)",
"G856":"PONTE SAN PIETRO (BG)",
"G864":"PONTIDA (BG)",
"G867":"PONTIROLO NUOVO (BG)",
"G968":"PRADALUNGA (BG)",
"H020":"PREDORE (BG)",
"H036":"PREMOLO (BG)",
"H046":"PRESEZZO (BG)",
"H091":"PUMENENGO (BG)",
"H176":"RANICA (BG)",
"H177":"RANZANICO (BG)",
"H331":"RIVA DI SOLTO (BG)",
"H492":"ROGNO (BG)",
"H509":"<NAME>ARDIA (BG)",
"H535":"RONCOBELLO (BG)",
"H544":"RONCOLA (BG)",
"H584":"ROTA D'IMAGNA (BG)",
"H615":"ROVETTA (BG)",
"H910":"SAN GIOVANNI BIANCO (BG)",
"B310":"<NAME>'ARGON (BG)",
"I079":"SAN PELLEGRINO TERME (BG)",
"I168":"SANTA BRIGIDA (BG)",
"I437":"SARNICO (BG)",
"I506":"SCANZOROSCIATE (BG)",
"I530":"SCHILPARIO (BG)",
"I567":"SEDRINA (BG)",
"I597":"SELVINO (BG)",
"I628":"SERIATE (BG)",
"I629":"SERINA (BG)",
"I812":"SOLTO COLLINA (BG)",
"I830":"SONGAVAZZO (BG)",
"I858":"SORISOLE (BG)",
"I869":"SOTTO IL MONTE GIOVANNI XXIII (BG)",
"I873":"SOVERE (BG)",
"I916":"SPINONE AL LAGO (BG)",
"I919":"SPIRANO (BG)",
"I951":"STEZZANO (BG)",
"I986":"STROZZA (BG)",
"I997":"SUISIO (BG)",
"L037":"TALEGGIO (BG)",
"L073":"TAVERNOLA BERGAMASCA (BG)",
"L087":"TELGATE (BG)",
"L118":"TERNO D'ISOLA (BG)",
"L251":"TORRE BOLDONE (BG)",
"L265":"TORRE DE' ROVERI (BG)",
"L276":"TORRE PALLAVICINA (BG)",
"L388":"TRESCORE BALNEARIO (BG)",
"L400":"TREVIGLIO (BG)",
"L404":"TREVIOLO (BG)",
"C789":"UBIALE CLANEZZO (BG)",
"L502":"URGNANO (BG)",
"L544":"VALBONDIONE (BG)",
"L545":"VALBREMBO (BG)",
"L579":"VALGOGLIO (BG)",
"L623":"VALLEVE (BG)",
"L642":"VALNEGRA (BG)",
"L655":"VALTORTA (BG)",
"L707":"VEDESETA (BG)",
"L752":"VERDELLINO (BG)",
"L753":"VERDELLO (BG)",
"L795":"VERTOVA (BG)",
"L827":"VIADANICA (BG)",
"L865":"VIGANO SAN MARTINO (BG)",
"L894":"VIGOLO (BG)",
"L929":"VILLA D'ADDA (BG)",
"A215":"VILLA D'ALMÈ (BG)",
"L936":"VILLA DI SERIO (BG)",
"L938":"VILLA D'OGNA (BG)",
"M045":"VILLONGO (BG)",
"M050":"VILMINORE DI SCALVE (BG)",
"M144":"ZANDOBBIO (BG)",
"M147":"ZANICA (BG)",
"M184":"ZOGNO (BG)",
"D111":"COSTA SERINA (BG)",
"A193":"ALGUA (BG)",
"D016":"CORNALBA (BG)",
"F085":"MEDOLAGO (BG)",
"I813":"SOLZA (BG)",
"I349":"SANT'OMOBONO TERME (BG)",
"M334":"VAL BREMBILLA (BG)",
"A034":"ACQUAFREDDA (BS)",
"A060":"ADRO (BS)",
"A082":"AGNOSINE (BS)",
"A188":"ALFIANELLO (BS)",
"A288":"ANFO (BS)",
"A293":"ANGOLO TERME (BS)",
"A451":"ARTOGNE (BS)",
"A529":"AZZANO MELLA (BS)",
"A569":"BAGNOLO MELLA (BS)",
"A578":"BAGOLINO (BS)",
"A630":"BARBARIGA (BS)",
"A661":"BARGHE (BS)",
"A702":"BASSANO BRESCIANO (BS)",
"A729":"BEDIZZOLE (BS)",
"A799":"BERLINGO (BS)",
"A816":"BERZO DEMO (BS)",
"A817":"BERZO INFERIORE (BS)",
"A861":"BIENNO (BS)",
"A878":"BIONE (BS)",
"B035":"BORGO SAN GIACOMO (BS)",
"B040":"BORGOSATOLLO (BS)",
"B054":"BORNO (BS)",
"B091":"BOTTICINO (BS)",
"B100":"BOVEGNO (BS)",
"B102":"BOVEZZO (BS)",
"B120":"BRANDICO (BS)",
"B124":"BRAONE (BS)",
"B149":"BRENO (BS)",
"B157":"BRESCIA (BS)",
"B185":"BRIONE (BS)",
"B365":"CAINO (BS)",
"B394":"CALCINATO (BS)",
"B436":"CALVAGESE DELLA RIVIERA (BS)",
"B450":"CALVISANO (BS)",
"B664":"CAPO DI PONTE (BS)",
"B676":"CAPOVALLE (BS)",
"B698":"CAPRIANO DEL COLLE (BS)",
"B711":"CAPRIOLO (BS)",
"B817":"CARPENEDOLO (BS)",
"C055":"CASTEGNATO (BS)",
"C072":"CASTELCOVATI (BS)",
"C208":"<NAME> (BS)",
"C293":"CASTENEDOLO (BS)",
"C330":"CASTO (BS)",
"C332":"CASTREZZATO (BS)",
"C408":"CAZZAGO S<NAME> (BS)",
"C417":"CEDEGOLO (BS)",
"C439":"CELLATICA (BS)",
"C549":"CERVENO (BS)",
"C585":"CETO (BS)",
"C591":"CEVO (BS)",
"C618":"CHIARI (BS)",
"C685":"CIGOLE (BS)",
"C691":"CIMBERGO (BS)",
"C760":"CIVIDATE CAMUNO (BS)",
"C806":"COCCAGLIO (BS)",
"C850":"COLLEBEATO (BS)",
"C883":"COLLIO (BS)",
"C893":"COLOGNE (BS)",
"C925":"COMEZZANO-CIZZAGO (BS)",
"C948":"CONCESIO (BS)",
"D058":"<NAME> (BS)",
"D064":"C<NAME> (BS)",
"D082":"CORZANO (BS)",
"D251":"<NAME> (BS)",
"D270":"DELLO (BS)",
"D284":"<NAME> (BS)",
"D391":"EDOLO (BS)",
"D421":"ERBUSCO (BS)",
"D434":"ESINE (BS)",
"D576":"FIESSE (BS)",
"D634":"FLERO (BS)",
"D891":"GAMBARA (BS)",
"D917":"GARDONE RIVIERA (BS)",
"D918":"GARDONE VAL TROMPIA (BS)",
"D924":"GARGNANO (BS)",
"D940":"GAVARDO (BS)",
"D999":"GHEDI (BS)",
"E010":"GIANICO (BS)",
"E116":"GOTTOLENGO (BS)",
"E271":"GUSSAGO (BS)",
"E280":"IDRO (BS)",
"E297":"INCUDINE (BS)",
"E325":"IRMA (BS)",
"E333":"ISEO (BS)",
"E364":"ISORELLA (BS)",
"E497":"LAVENONE (BS)",
"E526":"LENO (BS)",
"E596":"<NAME> (BS)",
"E652":"LODRINO (BS)",
"E654":"LOGRATO (BS)",
"E667":"LONATO DEL GARDA (BS)",
"E673":"LONGHENA (BS)",
"E698":"LOSINE (BS)",
"E706":"LOZIO (BS)",
"E738":"LUMEZZANE (BS)",
"E787":"MACLODIO (BS)",
"E800":"MAGASA (BS)",
"E841":"MAIRANO (BS)",
"E851":"MALEGNO (BS)",
"E865":"MALONNO (BS)",
"E883":"<NAME> (BS)",
"E884":"MANERBIO (BS)",
"E928":"MARCHENO (BS)",
"E961":"MARMENTINO (BS)",
"E967":"MARONE (BS)",
"F063":"MAZZANO (BS)",
"F216":"MILZANO (BS)",
"F373":"MONIGA DEL GARDA (BS)",
"F375":"MONNO (BS)",
"F532":"MONTE ISOLA (BS)",
"F672":"MONTICELLI BRUSATI (BS)",
"F471":"MONTICHIARI (BS)",
"F680":"MONTIRONE (BS)",
"F806":"MURA (BS)",
"F820":"MUSCOLINE (BS)",
"F851":"NAVE (BS)",
"F884":"NIARDO (BS)",
"F989":"NUVOLENTO (BS)",
"F990":"NUVOLERA (BS)",
"G001":"ODOLO (BS)",
"G006":"OFFLAGA (BS)",
"G061":"OME (BS)",
"G074":"<NAME> (BS)",
"G149":"ORZINUOVI (BS)",
"G150":"ORZIVECCHI (BS)",
"G170":"OSPITALETTO (BS)",
"G179":"OSSIMO (BS)",
"G213":"<NAME> (BS)",
"G217":"<NAME> (BS)",
"H814":"<NAME> (PV)",
"H859":"SAN GENESIO ED UNITI (PV)",
"H885":"SAN GIORGIO DI LOMELLINA (PV)",
"I014":"SAN MARTINO SICCOMARIO (PV)",
"I048":"<NAME> (PV)",
"I175":"S<NAME>SONE (PV)",
"I203":"SANTA GIULETTA (PV)",
"I213":"SANT'ALESSIO CON VIALONE (PV)",
"I230":"SANTA MARGHERITA DI STAFFORA (PV)",
"I237":"<NAME> (PV)",
"I276":"SANT'ANGELO LOMELLINA (PV)",
"I416":"SAN ZENONE AL PO (PV)",
"I447":"SARTIRANA LOMELLINA (PV)",
"I487":"SCALDASOLE (PV)",
"I599":"SEMIANA (PV)",
"I739":"<NAME> (PV)",
"E265":"SIZIANO (PV)",
"I825":"SOMMO (PV)",
"I894":"SPESSA (PV)",
"I968":"STRADELLA (PV)",
"B014":"SUARDI (PV)",
"L237":"TORRAZZA COSTE (PV)",
"L250":"TORRE BERETTI E CASTELLARO (PV)",
"L256":"TORRE D'ARESE (PV)",
"L262":"TORRE DE' NEGRI (PV)",
"L269":"TORRE D'ISOLA (PV)",
"L285":"TORREVECCHIA PIA (PV)",
"L292":"TORRICELLA VERZATE (PV)",
"I236":"TRAVACÒ SICCOMARIO (PV)",
"L440":"TRIVOLZIO (PV)",
"L449":"TROMELLO (PV)",
"L453":"TROVO (PV)",
"L562":"VAL DI NIZZA (PV)",
"L568":"VALEGGIO (PV)",
"L593":"VALLE LOMELLINA (PV)",
"L617":"VALLE SALIMBENE (PV)",
"L658":"VALVERDE (PV)",
"L690":"VARZI (PV)",
"L716":"VELEZZO LOMELLINA (PV)",
"L720":"VELLEZZO BELLINI (PV)",
"L784":"VERRETTO (PV)",
"L788":"VERRUA PO (PV)",
"L854":"VIDIGULFO (PV)",
"L872":"VIGEVANO (PV)",
"L917":"VILLA BISCOSSI (PV)",
"L983":"VILLANOVA D'ARDENGHI (PV)",
"L994":"VILLANTERIO (PV)",
"M079":"VISTARINO (PV)",
"M109":"VOGHERA (PV)",
"M119":"VOLPARA (PV)",
"M150":"ZAVATTARELLO (PV)",
"M152":"ZECCONE (PV)",
"M161":"ZEME (PV)",
"M162":"ZENEVREDO (PV)",
"M166":"ZERBO (PV)",
"M167":"ZERBOLÒ (PV)",
"M180":"ZINASCO (PV)",
"M338":"CORNALE E BASTIDA (PV)",
"M372":"CORTEOLONA E GENZONE (PV)",
"A039":"ACQUANEGRA CREMONESE (CR)",
"A076":"AGNADELLO (CR)",
"A299":"ANNICCO (CR)",
"A526":"AZZANELLO (CR)",
"A570":"BAGNOLO CREMASCO (CR)",
"A972":"BONEMERSE (CR)",
"A986":"BORDOLANO (CR)",
"B320":"CA' D'ANDREA (CR)",
"B439":"CALVATONE (CR)",
"B484":"CAMISANO (CR)",
"B498":"CAMPAGNOLA CREMASCA (CR)",
"B650":"CAPERGNANICA (CR)",
"B679":"CAPPELLA CANTONE (CR)",
"B680":"CAPPELLA DE' PICENARDI (CR)",
"B686":"CAPRALBA (CR)",
"B869":"CASALBUTTANO ED UNITI (CR)",
"B881":"CASALE CREMASCO-VIDOLASCO (CR)",
"B889":"CASALETTO CEREDANO (CR)",
"B890":"CASALETTO DI SOPRA (CR)",
"B891":"CASALETTO VAPRIO (CR)",
"B898":"CASALMAGGIORE (CR)",
"B900":"CASALMORANO (CR)",
"C089":"CASTELDIDONE (CR)",
"C115":"<NAME> (CR)",
"C153":"CASTELLEONE (CR)",
"B129":"CASTELVERDE (CR)",
"C290":"CASTELVISCONTI (CR)",
"C435":"CELLA DATI (CR)",
"C634":"CHIEVE (CR)",
"C678":"CICOGNOLO (CR)",
"C703":"CINGIA DE' BOTTI (CR)",
"D056":"CORTE DE' CORTESI CON CIGNONE (CR)",
"D057":"CORTE DE' FRATI (CR)",
"D141":"CREDERA RUBBIANO (CR)",
"D142":"CREMA (CR)",
"D150":"CREMONA (CR)",
"D151":"CREMOSANO (CR)",
"D186":"CROTTA D'ADDA (CR)",
"D203":"CUMIGNANO SUL NAVIGLIO (CR)",
"D278":"DEROVERE (CR)",
"D358":"DOVERA (CR)",
"D370":"DRIZZONA (CR)",
"D574":"FIESCO (CR)",
"D710":"FORMIGARA (CR)",
"D834":"GABBIONETA-BINANUOVA (CR)",
"D841":"GADESCO-PIEVE DELMONA (CR)",
"D966":"GENIVOLTA (CR)",
"D993":"GERRE DE' CAPRIOLI (CR)",
"E082":"GOMBITO (CR)",
"E193":"GRONTARDO (CR)",
"E217":"GRUMELLO CREMONESE ED UNITI (CR)",
"E272":"GUSSOLA (CR)",
"E356":"ISOLA DOVARESE (CR)",
"E380":"IZANO (CR)",
"E793":"MADIGNANO (CR)",
"E843":"MALAGNINO (CR)",
"E983":"MARTIGNANA DI PO (CR)",
"F434":"MONTE CREMASCO (CR)",
"F681":"MONTODINE (CR)",
"F761":"MOSCAZZANO (CR)",
"F771":"MOTTA BALUFFI (CR)",
"G004":"OFFANENGO (CR)",
"G047":"OLMENETA (CR)",
"G185":"OSTIANO (CR)",
"G222":"<NAME> (CR)",
"G260":"PALAZZO PIGNANO (CR)",
"G306":"PANDINO (CR)",
"G469":"PERSICO DOSIMO (CR)",
"G483":"PESCAROLO ED UNITI (CR)",
"G504":"PESSINA CREMONESE (CR)",
"G536":"PIADENA (CR)",
"G558":"PIANENGO (CR)",
"G603":"PIERANICA (CR)",
"G647":"PIEVE D'OLMI (CR)",
"G651":"PIEVE SAN GIACOMO (CR)",
"G721":"PIZZIGHETTONE (CR)",
"B914":"POZZAGLIO ED UNITI (CR)",
"H130":"QUINTANO (CR)",
"H276":"RICENGO (CR)",
"H314":"RIPALTA ARPINA (CR)",
"H315":"RIPALTA CREMASCA (CR)",
"H316":"RIPALTA GUERINA (CR)",
"H341":"RIVAROLO DEL RE ED UNITI (CR)",
"H357":"RIVOLTA D'ADDA (CR)",
"H372":"ROBECCO D'OGLIO (CR)",
"H508":"ROMANENGO (CR)",
"H731":"SALVIROLA (CR)",
"H767":"SAN BASSANO (CR)",
"H815":"SAN DANIELE PO (CR)",
"H918":"SAN GIOVANNI IN CROCE (CR)",
"I007":"SAN MARTINO DEL LAGO (CR)",
"I497":"SCANDOLARA RAVARA (CR)",
"I498":"SCANDOLARA RIPA D'OGLIO (CR)",
"I627":"SERGNANO (CR)",
"I683":"SESTO ED UNITI (CR)",
"I790":"SOL<NAME> (CR)",
"I827":"SONCINO (CR)",
"I849":"SORESINA (CR)",
"I865":"SOSPIRO (CR)",
"I906":"SPINADESCO (CR)",
"I909":"SPINEDA (CR)",
"I914":"SPINO D'ADDA (CR)",
"I935":"STAGNO LOMBARDO (CR)",
"L164":"TICENGO (CR)",
"L221":"TORLINO VIMERCATI (CR)",
"L225":"TORNATA (CR)",
"L258":"TORRE DE' PICENARDI (CR)",
"L296":"TORRICELLA DEL PIZZO (CR)",
"L389":"TRESCORE CREMASCO (CR)",
"L426":"TRIGOLO (CR)",
"L535":"VAIANO CREMASCO (CR)",
"L539":"VAILATE (CR)",
"L806":"VESCOVATO (CR)",
"M116":"VOLONGO (CR)",
"M127":"VOLTIDO (CR)",
"A038":"ACQUANEGRA SUL CHIESE (MN)",
"A470":"ASOLA (MN)",
"A575":"BAGNOLO SAN VITO (MN)",
"A866":"BIGARELLO (MN)",
"B013":"BORGOFRANCO SUL PO (MN)",
"B110":"BOZZOLO (MN)",
"B612":"CANNETO SULL'OGLIO (MN)",
"B739":"CARBONARA DI PO (MN)",
"B901":"CASALMORO (MN)",
"B907":"CASALOLDO (MN)",
"B708":"CAPRILE (BI)",
"B933":"CASAPINTA (BI)",
"C155":"<NAME> (BI)",
"C363":"CAVAGLIÀ (BI)",
"C526":"<NAME> (BI)",
"C532":"CERRIONE (BI)",
"C819":"COGGIOLA (BI)",
"D094":"COSSATO (BI)",
"D165":"CREVACUORE (BI)",
"D219":"CURINO (BI)",
"D339":"DONATO (BI)",
"D350":"DORZANO (BI)",
"D848":"GAGLIANICO (BI)",
"E024":"GIFFLENGA (BI)",
"E130":"GRAGLIA (BI)",
"E821":"MAGNANO (BI)",
"F037":"MASSAZZA (BI)",
"F042":"MASSERANO (BI)",
"F167":"MEZZANA MORTIGLIENGO (BI)",
"F189":"MIAGLIANO (BI)",
"F369":"MONGRANDO (BI)",
"F776":"MOTTALCIATA (BI)",
"F833":"MUZZANO (BI)",
"F878":"NETRO (BI)",
"F992":"OCCHIEPPO INFERIORE (BI)",
"F993":"OCCHIEPPO SUPERIORE (BI)",
"G521":"PETTINENGO (BI)",
"G577":"PIATTO (BI)",
"G594":"PIEDICAVALLO (BI)",
"G798":"POLLONE (BI)",
"G820":"PONDERANO (BI)",
"G927":"PORTULA (BI)",
"G980":"PRALUNGO (BI)",
"G974":"PRAY (BI)",
"H103":"QUAREGNA (BI)",
"H538":"RONCO BIELLESE (BI)",
"H553":"ROPPOLO (BI)",
"H561":"ROSAZZA (BI)",
"H662":"S<NAME> (BI)",
"H681":"SALA BIELLESE (BI)",
"H726":"SALUSSOLA (BI)",
"H821":"SANDIGLIANO (BI)",
"I835":"SOPRANA (BI)",
"I847":"SORDEVOLO (BI)",
"I868":"SOSTEGNO (BI)",
"I980":"STRONA (BI)",
"L075":"TAVIGLIANO (BI)",
"L116":"TERNENGO (BI)",
"L193":"TOLLEGNO (BI)",
"L239":"TORRAZZO (BI)",
"L436":"TRIVERO (BI)",
"L556":"VALDENGO (BI)",
"L586":"VALLANZENGO (BI)",
"L606":"VALLE MOSSO (BI)",
"L620":"VALLE SAN NICOLAO (BI)",
"L712":"VEGLIO (BI)",
"L785":"VERRONE (BI)",
"L880":"VIGLIANO BIELLESE (BI)",
"L933":"VILLA DEL BOSCO (BI)",
"L978":"VILLANOVA BIELLESE (BI)",
"M098":"VIVERONE (BI)",
"M179":"ZIMONE (BI)",
"M196":"ZUBIENA (BI)",
"M201":"ZUMAGLIA (BI)",
"M304":"MOSSO (BI)",
"E552":"LESSONA (BI)",
"B508":"CAMPIGLIA CERVO (BI)",
"A317":"ANTRONA SCHIERANCO (VB)",
"A325":"AN<NAME>'OSSOLA (VB)",
"A409":"ARIZZANO (VB)",
"A427":"AROLA (VB)",
"A497":"AURANO (VB)",
"A534":"BACENO (VB)",
"A610":"<NAME> (VB)",
"A725":"BAVENO (VB)",
"A733":"BEE (VB)",
"A742":"BELGIRATE (VB)",
"A834":"BEURA-CARDEZZA (VB)",
"A925":"BOGNANCO (VB)",
"B207":"BROVELLO-CARPUGNINO (VB)",
"B380":"CALASCA-CASTIGLIONE (VB)",
"B463":"CAMBIASCA (VB)",
"B610":"<NAME> (VB)",
"B615":"CANNOBIO (VB)",
"B694":"CAPREZZO (VB)",
"B876":"<NAME> (VB)",
"C367":"CAVAGLIO-SPOCCIA (VB)",
"C478":"<NAME> (VB)",
"C567":"CESARA (VB)",
"D099":"COSSOGNO (VB)",
"D134":"CRAVEGGIA (VB)",
"D168":"CREVOLADOSSOLA (VB)",
"D177":"CRODO (VB)",
"D225":"CURSOLO-ORASSO (VB)",
"D332":"DOMODOSSOLA (VB)",
"D374":"DRUOGNO (VB)",
"D481":"FALMENTA (VB)",
"D706":"FORMAZZA (VB)",
"D984":"GERMAGNO (VB)",
"E003":"GHIFFA (VB)",
"E028":"GIGNESE (VB)",
"E153":"GRAVELLONA TOCE (VB)",
"E269":"GURRO (VB)",
"E304":"INTRAGNA (VB)",
"E685":"LOREGLIA (VB)",
"E790":"MACUGNAGA (VB)",
"E795":"MADONNA DEL SASSO (VB)",
"E853":"MALESCO (VB)",
"F010":"MASERA (VB)",
"F048":"MASSIOLA (VB)",
"F146":"MERGOZZO (VB)",
"F192":"MIAZZINA (VB)",
"F483":"MONTECRESTESE (VB)",
"F639":"MONTESCHENO (VB)",
"F932":"NONIO (VB)",
"G007":"OGGEBBIO (VB)",
"G062":"OMEGNA (VB)",
"G117":"ORNAVASSO (VB)",
"G280":"PALLANZENO (VB)",
"G600":"PIEDIMULERA (VB)",
"G658":"PIEVE VERGONTE (VB)",
"H030":"PREMENO (VB)",
"H033":"PREMIA (VB)",
"H037":"PREMOSELLO-CHIOVENDA (VB)",
"H106":"QUARNA SOPRA (VB)",
"H107":"QUARNA SOTTO (VB)",
"H203":"RE (VB)",
"H777":"SAN BERNARDINO VERBANO (VB)",
"I249":"S<NAME> (VB)",
"I976":"STRESA (VB)",
"L187":"TOCENO (VB)",
"L333":"TRAREGO VIGGIONA (VB)",
"L336":"TRASQUERA (VB)",
"L450":"TRONTANO (VB)",
"L651":"VALSTRONA (VB)",
"L666":"VANZONE CON SAN CARLO (VB)",
"L691":"VARZO (VB)",
"L746":"VERBANIA (VB)",
"L889":"VIGNONE (VB)",
"L906":"VILLADOSSOLA (VB)",
"M042":"VILLETTE (VB)",
"M111":"VOGOGNA (VB)",
"M370":"BORGOMEZZAVALLE (VB)",
"A205":"ALLEIN (AO)",
"A305":"ANTEY-SAINT-ANDRÉ (AO)",
"A326":"AOSTA (AO)",
"A424":"ARNAD (AO)",
"A452":"ARVIER (AO)",
"A521":"AVISE (AO)",
"A094":"AYAS (AO)",
"A108":"AYMAVILLES (AO)",
"A643":"BARD (AO)",
"A877":"BIONAZ (AO)",
"B192":"BRISSOGNE (AO)",
"B230":"BRUSSON (AO)",
"C593":"CHALLAND-SAINT-ANSELME (AO)",
"C594":"CHALLAND-SAINT-VICTOR (AO)",
"C595":"CHAMBAVE (AO)",
"B491":"CHAMOIS (AO)",
"C596":"CHAMPDEPRAZ (AO)",
"B540":"CHAMPORCHER (AO)",
"C598":"CHARVENSOD (AO)",
"C294":"CHÂTILLON (AO)",
"C821":"COGNE (AO)",
"D012":"COURMAYEUR (AO)",
"D338":"DONNAS (AO)",
"D356":"DOUES (AO)",
"D402":"EMARÈSE (AO)",
"D444":"ETROUBLES (AO)",
"D537":"FÉNIS (AO)",
"D666":"FONTAINEMORE (AO)",
"D839":"GABY (AO)",
"E029":"GIGNOD (AO)",
"E165":"GRESSAN (AO)",
"E167":"GRESSONEY-LA-TRINITÉ (AO)",
"E168":"GRESSONEY-SAINT-JEAN (AO)",
"E273":"HÔNE (AO)",
"E306":"INTROD (AO)",
"E369":"ISSIME (AO)",
"E371":"ISSOGNE (AO)",
"E391":"JOVENÇAN (AO)",
"A308":"LA MAGDELEINE (AO)",
"E458":"LA SALLE (AO)",
"E470":"LA THUILE (AO)",
"E587":"LILLIANES (AO)",
"F367":"MONTJOVET (AO)",
"F726":"MORGEX (AO)",
"F987":"NUS (AO)",
"G045":"OLLOMONT (AO)",
"G012":"OYACE (AO)",
"G459":"PERLOZ (AO)",
"G794":"POLLEIN (AO)",
"G545":"PONTBOSET (AO)",
"G860":"PONTEY (AO)",
"G854":"PONT-SAINT-MARTIN (AO)",
"H042":"PRÉ-SAINT-DIDIER (AO)",
"H110":"QUART (AO)",
"H262":"RHÊMES-NOTRE-DAME (AO)",
"H263":"RHÊMES-SAINT-GEORGES (AO)",
"H497":"ROISAN (AO)",
"H669":"SAINT-CHRISTOPHE (AO)",
"H670":"SAINT-DENIS (AO)",
"H671":"SAINT-MARCEL (AO)",
"H672":"SAINT-NICOLAS (AO)",
"H673":"SAINT-OYEN (AO)",
"H674":"SAINT-PIERRE (AO)",
"H675":"SAINT-RHÉMY-EN-BOSSES (AO)",
"H676":"SAINT-VINCENT (AO)",
"I442":"SARRE (AO)",
"L217":"TORGNON (AO)",
"L582":"VALGRISENCHE (AO)",
"L643":"VALPELLINE (AO)",
"L647":"VALSAVARENCHE (AO)",
"L654":"VALTOURNENCHE (AO)",
"L783":"VERRAYES (AO)",
"C282":"VERRÈS (AO)",
"L981":"VILLENEUVE (AO)",
"A085":"AGRA (VA)",
"A167":"ALBIZZATE (VA)",
"A290":"ANGERA (VA)",
"A371":"ARCISATE (VA)",
"A441":"<NAME> (VA)",
"A531":"AZZATE (VA)",
"A532":"AZZIO (VA)",
"C756":"CIVEZZANO (TN)",
"G034":"OLIVADI (CZ)",
"G247":"PA<NAME> (BS)",
"G248":"PAITONE (BS)",
"G264":"<NAME> (BS)",
"G327":"PARATICO (BS)",
"G354":"PASPARDO (BS)",
"G361":"PASSIRANO (BS)",
"G391":"<NAME> (BS)",
"G407":"SAN PAOLO (BS)",
"G474":"PERTICA ALTA (BS)",
"G475":"PERTICA BASSA (BS)",
"G529":"PEZZAZE (BS)",
"G546":"<NAME> (BS)",
"G710":"PISOGNE (BS)",
"G779":"POLAVENO (BS)",
"G801":"POLPENAZZE DEL GARDA (BS)",
"G815":"POMPIANO (BS)",
"G818":"PONCARALE (BS)",
"G844":"PONTE DI LEGNO (BS)",
"G859":"PONTEVICO (BS)",
"G869":"PONTOGLIO (BS)",
"G959":"POZZOLENGO (BS)",
"G977":"PRALBOINO (BS)",
"H043":"PRESEGLIE (BS)",
"H055":"PREVALLE (BS)",
"H078":"PROVAGLIO D'ISEO (BS)",
"H077":"PROVAGLIO VAL SABBIA (BS)",
"H086":"PUE<NAME> (BS)",
"H140":"QUINZANO D'OGLIO (BS)",
"H230":"REMEDELLO (BS)",
"H256":"REZZATO (BS)",
"H410":"ROCCAFRANCA (BS)",
"H477":"RODENGO SAIANO (BS)",
"H484":"ROÈ VOLCIANO (BS)",
"H525":"RONCADELLE (BS)",
"H598":"ROVATO (BS)",
"H630":"RUDIANO (BS)",
"H650":"SABBIO CHIESE (BS)",
"H699":"SALE MARASINO (BS)",
"H717":"SALÒ (BS)",
"H838":"<NAME> (BS)",
"H865":"SAN GERVASIO BRESCIANO (BS)",
"I412":"SAN ZENO NAVIGLIO (BS)",
"I433":"SAREZZO (BS)",
"I476":"SAVIORE DELL'ADAMELLO (BS)",
"I588":"SELLERO (BS)",
"I607":"SENIGA (BS)",
"I631":"SERLE (BS)",
"I633":"SIRMIONE (BS)",
"I782":"SOIANO DEL LAGO (BS)",
"I831":"SONICO (BS)",
"L002":"SULZANO (BS)",
"C698":"TAVERNOLE SUL MELLA (BS)",
"L094":"TEMÙ (BS)",
"L169":"TIGNALE (BS)",
"L210":"TORBOLE CASAGLIA (BS)",
"L312":"TOSCOLANO-MADERNO (BS)",
"L339":"TRAVAGLIATO (BS)",
"L372":"TREMOSINE SUL GARDA (BS)",
"L380":"TRENZANO (BS)",
"L406":"TREVISO BRESCIANO (BS)",
"L494":"URAGO D'OGLIO (BS)",
"L626":"VALLIO TERME (BS)",
"L468":"VALVESTINO (BS)",
"L777":"VEROLANUOVA (BS)",
"L778":"VEROLAVECCHIA (BS)",
"L812":"VESTONE (BS)",
"L816":"VEZZA D'OGLIO (BS)",
"L919":"VILLA CARCINA (BS)",
"L923":"VILLACHIARA (BS)",
"L995":"VILLANUOVA SUL CLISI (BS)",
"M065":"VIONE (BS)",
"M070":"VISANO (BS)",
"M104":"VOBARNO (BS)",
"M188":"ZONE (BS)",
"G549":"PIANCOGNO (BS)",
"A118":"ALAGNA (PV)",
"A134":"ALBAREDO ARNABOLDI (PV)",
"A171":"ALBONESE (PV)",
"A175":"ALBUZZANO (PV)",
"A387":"ARENA PO (PV)",
"A538":"BADIA PAVESE (PV)",
"A550":"BAGNARIA (PV)",
"A634":"BARBIANELLO (PV)",
"A690":"BASCAPÈ (PV)",
"A712":"BASTIDA PANCARANA (PV)",
"A718":"BATTUDA (PV)",
"A741":"BELGIOIOSO (PV)",
"A792":"BEREGUARDO (PV)",
"A989":"BORGARELLO (PV)",
"B028":"BORGO PRIOLO (PV)",
"B030":"BORGORATTO MORMOROLO (PV)",
"B038":"BORGO SAN SIRO (PV)",
"B051":"BORNASCO (PV)",
"B082":"BOSNASCO (PV)",
"B117":"<NAME> (PV)",
"B142":"BREME (PV)",
"B159":"<NAME> (PV)",
"B201":"BRONI (PV)",
"B447":"CALVIGNANO (PV)",
"B567":"CAMPOSPINOSO (PV)",
"B587":"CANDIA LOMELLINA (PV)",
"B599":"CANEVINO (PV)",
"B613":"CANNETO PAVESE (PV)",
"B741":"CARBONARA AL TICINO (PV)",
"B929":"<NAME> (PV)",
"B945":"CASATISMA (PV)",
"B954":"CASEI GEROLA (PV)",
"B988":"CASORATE PRIMO (PV)",
"C038":"CASSOLNOVO (PV)",
"C050":"CASTANA (PV)",
"C053":"CASTEGGIO (PV)",
"C157":"CASTELLETTO DI BRANDUZZO (PV)",
"C184":"<NAME>'AGOGNA (PV)",
"C213":"CASTELNOVETTO (PV)",
"C360":"CAVA MANARA (PV)",
"C414":"CECIMA (PV)",
"C484":"CERANOVA (PV)",
"C508":"CERETTO LOMELLINA (PV)",
"C509":"CERGNAGO (PV)",
"C541":"CERTO<NAME> (PV)",
"C551":"CERVESINA (PV)",
"C637":"CHIGNOLO PO (PV)",
"C684":"CIGOGNOLA (PV)",
"C686":"CILAVEGNA (PV)",
"C813":"CODEVILLA (PV)",
"C958":"CONFIENZA (PV)",
"C979":"COPIANO (PV)",
"C982":"CORANA (PV)",
"D081":"CORVINO SAN QUIRICO (PV)",
"D109":"COSTA DE' NOBILI (PV)",
"D127":"COZZO (PV)",
"B824":"CURA CARPIGNANO (PV)",
"D348":"DORNO (PV)",
"D552":"FERRERA ERBOGNONE (PV)",
"D594":"FILIGHERA (PV)",
"D732":"FORTUNAGO (PV)",
"D771":"FRASCAROLO (PV)",
"D873":"GALLIAVOLA (PV)",
"D892":"GAMBARANA (PV)",
"D901":"GAMBOLÒ (PV)",
"D925":"GARLASCO (PV)",
"D980":"GERENZAGO (PV)",
"E062":"GIUSSAGO (PV)",
"E072":"GODIASCO SALICE TERME (PV)",
"E081":"GOLFERENZO (PV)",
"E152":"GRAVELLONA LOMELLINA (PV)",
"E195":"GROPELLO CAIROLI (PV)",
"E310":"INVERNO E MONTELEONE (PV)",
"E437":"LANDRIANO (PV)",
"E439":"LANGOSCO (PV)",
"E454":"LARDIRAGO (PV)",
"E600":"LINAROLO (PV)",
"E608":"LIRIO (PV)",
"E662":"LOMELLO (PV)",
"B387":"LUNGAVILLA (PV)",
"E804":"MAGHERNO (PV)",
"E934":"MARCIGNAGO (PV)",
"E999":"MARZANO (PV)",
"F080":"MEDE (PV)",
"F122":"MENCONICO (PV)",
"F170":"ME<NAME> (PV)",
"F171":"MEZZ<NAME> (PV)",
"F175":"MEZZANINO (PV)",
"F238":"MIRADOLO TERME (PV)",
"F417":"M<NAME> (PV)",
"F440":"MONTE<NAME> BATTAGLIA (PV)",
"F449":"MONTECALVO VERSIGGIA (PV)",
"F638":"MONTESCANO (PV)",
"F644":"MONTESEGALE (PV)",
"F670":"M<NAME> (PV)",
"F701":"MONTÙ BECCARIA (PV)",
"F739":"MORNICO LOSANA (PV)",
"F754":"MORTARA (PV)",
"F891":"NICORVO (PV)",
"G021":"OLEVANO DI LOMELLINA (PV)",
"G032":"OLIVA GESSI (PV)",
"G194":"OTTOBIANO (PV)",
"G275":"PALESTRO (PV)",
"G304":"PANCARANA (PV)",
"G342":"PARONA (PV)",
"G388":"PAVIA (PV)",
"G612":"PIETRA DE' GIORGI (PV)",
"G635":"PIEVE ALBIGNOLA (PV)",
"G639":"PIEVE DEL CAIRO (PV)",
"G650":"PIEVE PORTO MORONE (PV)",
"G671":"PINAROLO PO (PV)",
"G720":"PIZZALE (PV)",
"G851":"PONTE NIZZA (PV)",
"G895":"PORTALBERA (PV)",
"H204":"REA (PV)",
"H216":"REDAVALLE (PV)",
"H246":"RETORBIDO (PV)",
"H336":"RIVANAZZANO TERME (PV)",
"H369":"ROBBIO (PV)",
"H375":"ROBECCO PAVESE (PV)",
"H396":"ROCCA DE' GIORGI (PV)",
"H450":"ROCCA SUSELLA (PV)",
"H491":"ROGNANO (PV)",
"H505":"ROMAGNESE (PV)",
"H527":"RONCARO (PV)",
"H559":"ROSASCO (PV)",
"H614":"ROVESCALA (PV)",
"H637":"RUINO (PV)",
"H799":"SAN CIPRIANO PO (PV)",
"A218":"ALMESE (TO)",
"A221":"ALPETTE (TO)",
"A222":"ALPIGNANO (TO)",
"A275":"ANDEZENO (TO)",
"A282":"ANDRATE (TO)",
"A295":"ANGROGNA (TO)",
"A405":"ARIGNANO (TO)",
"A518":"AVIGLIANA (TO)",
"A525":"AZEGLIO (TO)",
"A584":"BAIRO (TO)",
"A587":"BALANGERO (TO)",
"A590":"BALDISSERO CANAVESE (TO)",
"A591":"BALDISSERO TORINESE (TO)",
"A599":"BALME (TO)",
"A607":"BANCHETTE (TO)",
"A625":"BARBANIA (TO)",
"A651":"BARDONECCHIA (TO)",
"A673":"BARONE CANAVESE (TO)",
"A734":"BEINASCO (TO)",
"A853":"BIBIANA (TO)",
"A910":"<NAME> (TO)",
"A941":"BOLLENGO (TO)",
"A990":"B<NAME> (TO)",
"B003":"BORGIALLO (TO)",
"B015":"B<NAME> (TO)",
"B021":"BORGOMASINO (TO)",
"B024":"BORGONE SUSA (TO)",
"B075":"BOSCONERO (TO)",
"B121":"BRANDIZZO (TO)",
"B171":"BRICHERASIO (TO)",
"B205":"BROSSO (TO)",
"B209":"BROZOLO (TO)",
"B216":"BRUINO (TO)",
"B225":"BRUSASCO (TO)",
"B232":"BRUZOLO (TO)",
"B278":"BURIASCO (TO)",
"B279":"BUROLO (TO)",
"B284":"BUSANO (TO)",
"B297":"BUSSOLENO (TO)",
"B305":"BUTTIGLIERA ALTA (TO)",
"B350":"CAFASSE (TO)",
"B435":"CALUSO (TO)",
"B462":"CAMBIANO (TO)",
"B512":"CAMPIGLIONE FENILE (TO)",
"B588":"CANDIA CANAVESE (TO)",
"B592":"CANDIOLO (TO)",
"B605":"CANISCHIO (TO)",
"B628":"CANTALUPA (TO)",
"B637":"CANTOIRA (TO)",
"B705":"CAPRIE (TO)",
"B733":"CARAVINO (TO)",
"B762":"CAREMA (TO)",
"B777":"CARIGNANO (TO)",
"B791":"CARMAGNOLA (TO)",
"B867":"CASALBORGONE (TO)",
"B953":"CASCINETTE D'IVREA (TO)",
"B955":"CASELETTE (TO)",
"B960":"CASELLE TORINESE (TO)",
"C045":"CASTAGNETO PO (TO)",
"C048":"<NAME> (TO)",
"C133":"CASTELLAMONTE (TO)",
"C241":"<NAME> (TO)",
"C307":"CASTIGLIONE TORINESE (TO)",
"C369":"CAVAGNOLO (TO)",
"C404":"CAVOUR (TO)",
"C487":"CERCENASCO (TO)",
"C497":"CERES (TO)",
"C505":"CERESOLE REALE (TO)",
"C564":"<NAME> (TO)",
"C604":"CHIALAMBERTO (TO)",
"C610":"CHIANOCCO (TO)",
"C624":"CHIAVERANO (TO)",
"C627":"CHIERI (TO)",
"C629":"CHIESANUOVA (TO)",
"C639":"CHIOMONTE (TO)",
"C655":"<NAME> (TO)",
"C665":"CHIVASSO (TO)",
"C679":"CICONIO (TO)",
"C711":"CINTANO (TO)",
"C715":"CINZANO (TO)",
"C722":"CIRIÈ (TO)",
"C793":"CLAVIERE (TO)",
"C801":"COASSOLO TORINESE (TO)",
"C803":"COAZZE (TO)",
"C860":"COLLEGNO (TO)",
"C867":"<NAME> (TO)",
"C868":"COLLERETTO GIACOSA (TO)",
"C955":"CONDOVE (TO)",
"D008":"CORIO (TO)",
"D092":"COSSANO CANAVESE (TO)",
"D197":"CUCEGLIO (TO)",
"D202":"CUMIANA (TO)",
"D208":"CUORGNÈ (TO)",
"D373":"DRUENTO (TO)",
"D433":"EXILLES (TO)",
"D520":"FAVRIA (TO)",
"D524":"FELETTO (TO)",
"D532":"FENESTRELLE (TO)",
"D562":"FIANO (TO)",
"D608":"FIORANO CANAVESE (TO)",
"D646":"FOGLIZZO (TO)",
"D725":"FORNO CANAVESE (TO)",
"D781":"FRASSINETTO (TO)",
"D805":"FRONT (TO)",
"D812":"FROSSASCO (TO)",
"D931":"GARZIGLIANA (TO)",
"D933":"GASSINO TORINESE (TO)",
"D983":"GERMAGNANO (TO)",
"E009":"GIAGLIONE (TO)",
"E020":"GIAVENO (TO)",
"E067":"GIVOLETTO (TO)",
"E154":"GRAVERE (TO)",
"E199":"GROSCAVALLO (TO)",
"E203":"GROSSO (TO)",
"E216":"GRUGLIASCO (TO)",
"E301":"INGRIA (TO)",
"E311":"INVERSO PINASCA (TO)",
"E345":"ISOLABELLA (TO)",
"E368":"ISSIGLIO (TO)",
"E379":"IVREA (TO)",
"E394":"LA CASSA (TO)",
"E423":"LA LOGGIA (TO)",
"E445":"LANZO TORINESE (TO)",
"E484":"LAURIANO (TO)",
"E518":"LEINI (TO)",
"E520":"LEMIE (TO)",
"E551":"LESSOLO (TO)",
"E566":"LEVONE (TO)",
"E635":"LOCANA (TO)",
"E660":"LOMBARDORE (TO)",
"E661":"LOMBRIASCO (TO)",
"E683":"LORANZÈ (TO)",
"E727":"LUGNACCO (TO)",
"E758":"LUSERNA SAN GIOVANNI (TO)",
"E759":"LUSERNETTA (TO)",
"E763":"LUSIGLIÈ (TO)",
"E782":"MACELLO (TO)",
"E817":"MAGLIONE (TO)",
"E941":"MARENTINO (TO)",
"F041":"MASSELLO (TO)",
"F053":"MATHI (TO)",
"F058":"MATTIE (TO)",
"F067":"MAZZÈ (TO)",
"F074":"MEANA DI SUSA (TO)",
"F140":"MERCENASCO (TO)",
"F164":"MEUGLIANO (TO)",
"F182":"MEZZENILE (TO)",
"F315":"MOMBELLO DI TORINO (TO)",
"F318":"MOMPANTERO (TO)",
"F327":"MONASTERO DI LANZO (TO)",
"F335":"MONCALIERI (TO)",
"D553":"MONCENISIO (TO)",
"F407":"MONTALDO TORINESE (TO)",
"F411":"MONTALENGHE (TO)",
"F420":"MONTALTO DORA (TO)",
"F422":"MONTANARO (TO)",
"F651":"MONTEU DA PO (TO)",
"F733":"MORIONDO TORINESE (TO)",
"F889":"NICHELINO (TO)",
"F906":"NOASCA (TO)",
"F925":"NOLE (TO)",
"F927":"NOMAGLIO (TO)",
"F931":"NONE (TO)",
"F948":"NOVALESA (TO)",
"G010":"OGLIANICO (TO)",
"G087":"ORBASSANO (TO)",
"G109":"ORIO CANAVESE (TO)",
"G151":"OSASCO (TO)",
"G152":"OSASIO (TO)",
"G196":"OULX (TO)",
"G202":"OZEGNA (TO)",
"G262":"PALAZZO CANAVESE (TO)",
"G303":"PANCALIERI (TO)",
"G330":"PARELLA (TO)",
"G387":"PAVAROLO (TO)",
"G392":"PAVONE CANAVESE (TO)",
"G396":"PECCO (TO)",
"G398":"PECETTO TORINESE (TO)",
"G463":"PEROSA ARGENTINA (TO)",
"G462":"PEROSA CANAVESE (TO)",
"G465":"PERRERO (TO)",
"G477":"PERTUSIO (TO)",
"G505":"PESSINETTO (TO)",
"G559":"PIANEZZA (TO)",
"G672":"PINASCA (TO)",
"G674":"PINEROLO (TO)",
"G678":"PINO TORINESE (TO)",
"G684":"PIOBESI TORINESE (TO)",
"G691":"PIOSSASCO (TO)",
"G705":"PISCINA (TO)",
"G719":"PIVERONE (TO)",
"G777":"POIRINO (TO)",
"G805":"POMARETTO (TO)",
"G826":"PONT-CANAVESE (TO)",
"G900":"PORTE (TO)",
"G973":"PRAGELATO (TO)",
"G978":"PRALI (TO)",
"G979":"PRALORMO (TO)",
"G982":"PRAMOLLO (TO)",
"G986":"PRAROSTINO (TO)",
"G988":"PRASCORSANO (TO)",
"G997":"PRATIGLIONE (TO)",
"H100":"QUAGLIUZZO (TO)",
"H120":"QUASSOLO (TO)",
"H127":"QUINCINETTO (TO)",
"H207":"REANO (TO)",
"H270":"RIBORDONE (TO)",
"H333":"RIVALBA (TO)",
"H335":"RIVALTA DI TORINO (TO)",
"H337":"RIVA PRESSO CHIERI (TO)",
"H338":"RIVARA (TO)",
"H340":"RIVAROLO CANAVESE (TO)",
"H344":"RIVAROSSA (TO)",
"H355":"RIVOLI (TO)",
"H367":"ROBASSOMERO (TO)",
"H386":"ROCCA CANAVESE (TO)",
"H498":"ROLETTO (TO)",
"H511":"ROMANO CANAVESE (TO)",
"H539":"RONCO CANAVESE (TO)",
"H547":"RONDISSONE (TO)",
"F100":"MELEGNANO (MI)",
"F119":"MELZO (MI)",
"F155":"MESERO (MI)",
"F205":"MILANO (MI)",
"D033":"MORIMONDO (MI)",
"F783":"MOTTA VISCONTI (MI)",
"F874":"NERVIANO (MI)",
"F939":"NOSATE (MI)",
"F955":"NOVATE MILANESE (MI)",
"F968":"NOVIGLIO (MI)",
"G078":"OPERA (MI)",
"G181":"OSSONA (MI)",
"G206":"OZZERO (MI)",
"G220":"<NAME> (MI)",
"G316":"PANTIGLIATE (MI)",
"G324":"PARABIAGO (MI)",
"G385":"PAULLO (MI)",
"C013":"PERO (MI)",
"G488":"PESCHIERA BORROMEO (MI)",
"G502":"PESSANO CON BORNAGO (MI)",
"G634":"PIEVE EMANUELE (MI)",
"G686":"PIOLTELLO (MI)",
"G772":"POGLIANO MILANESE (MI)",
"G955":"PO<NAME>'ADDA (MI)",
"G965":"POZZUOLO MARTESANA (MI)",
"H026":"PREGNANA MILANESE (MI)",
"H240":"RESCALDINA (MI)",
"H264":"RHO (MI)",
"H371":"ROBECCHETTO CON INDUNO (MI)",
"H373":"ROBECCO SUL NAVIGLIO (MI)",
"H470":"RODANO (MI)",
"H560":"ROSATE (MI)",
"H623":"ROZZANO (MI)",
"H803":"SAN COLOMBANO AL LAMBRO (MI)",
"H827":"SAN DONATO MILANESE (MI)",
"H884":"SAN GIORGIO SU LEGNANO (MI)",
"H930":"SAN GIULIANO MILANESE (MI)",
"I361":"SANTO STEFANO TICINO (MI)",
"I409":"SAN VITTORE OLONA (MI)",
"I415":"SAN ZENONE AL LAMBRO (MI)",
"I566":"SEDRIANO (MI)",
"I577":"SEGRATE (MI)",
"I602":"SENAGO (MI)",
"I690":"SESTO SAN GIOVANNI (MI)",
"I696":"SETTALA (MI)",
"I700":"SETTIMO MILANESE (MI)",
"I786":"SOLARO (MI)",
"L408":"TREZZANO ROSA (MI)",
"L409":"TREZZANO SUL NAVIGLIO (MI)",
"L411":"TREZZO SULL'ADDA (MI)",
"L415":"TRIBIANO (MI)",
"L454":"TRUCCAZZANO (MI)",
"L471":"TURBIGO (MI)",
"L665":"VANZAGO (MI)",
"L667":"VAPRIO D'ADDA (MI)",
"L768":"VERMEZZO (MI)",
"L773":"VERNATE (MI)",
"L883":"VIGNATE (MI)",
"M053":"VIMODRONE (MI)",
"M091":"VITTUONE (MI)",
"M102":"VIZZOLO PREDABISSI (MI)",
"M160":"ZELO SURRIGONE (MI)",
"M176":"ZIBIDO SAN GIACOMO (MI)",
"L928":"VILLA CORTESE (MI)",
"L664":"VANZAGHELLO (MI)",
"A618":"BARANZATE (MI)",
"A057":"ADRARA SAN MARTINO (BG)",
"A058":"ADRARA SAN ROCCO (BG)",
"A129":"ALBANO SANT'ALESSANDRO (BG)",
"A163":"ALBINO (BG)",
"A214":"ALMÈ (BG)",
"A216":"ALMENNO SAN BARTOLOMEO (BG)",
"A217":"ALMENNO SAN SALVATORE (BG)",
"A246":"ALZANO LOMBARDO (BG)",
"A259":"AMBIVERE (BG)",
"A304":"ANTEGNATE (BG)",
"A365":"ARCENE (BG)",
"A383":"ARDESIO (BG)",
"A440":"<NAME>'ADDA (BG)",
"A511":"AVERARA (BG)",
"A517":"AVIATICO (BG)",
"A528":"AZZANO SAN PAOLO (BG)",
"A533":"AZZONE (BG)",
"A557":"BAGNATICA (BG)",
"A631":"BARBATA (BG)",
"A664":"BARIANO (BG)",
"A684":"BARZANA (BG)",
"A732":"BEDULITA (BG)",
"A786":"BERBENNO (BG)",
"A794":"BERGAMO (BG)",
"A815":"BERZO SAN FERMO (BG)",
"A846":"BIANZANO (BG)",
"A903":"BLELLO (BG)",
"A937":"BOLGARE (BG)",
"A950":"BOLTIERE (BG)",
"A963":"BONATE SOPRA (BG)",
"A962":"BONATE SOTTO (BG)",
"B010":"BORGO DI TERZO (BG)",
"B083":"BOSSICO (BG)",
"B088":"BOTTANUCO (BG)",
"B112":"BRACCA (BG)",
"B123":"BRANZI (BG)",
"B137":"BREMBATE (BG)",
"B138":"BREMBATE DI SOPRA (BG)",
"B178":"<NAME>'ADDA (BG)",
"B217":"BRUMANO (BG)",
"B223":"BRUSAPORTO (BG)",
"B393":"CALCINATE (BG)",
"B395":"CALCIO (BG)",
"B434":"CALUSCO D'ADDA (BG)",
"B442":"CALVENZANO (BG)",
"B471":"CAMERATA CORNELLO (BG)",
"B618":"<NAME>'ADDA (BG)",
"B661":"CAPIZZONE (BG)",
"B703":"CAPRIATE SAN GERVASIO (BG)",
"B710":"<NAME> (BG)",
"B731":"CARAVAGGIO (BG)",
"B801":"<NAME> (BG)",
"B803":"CARONA (BG)",
"B854":"CARVICO (BG)",
"B947":"CASAZZA (BG)",
"B971":"<NAME>'ADDA (BG)",
"B978":"CASNIGO (BG)",
"C007":"CASSIGLIO (BG)",
"C079":"<NAME> (BG)",
"C255":"<NAME> (BG)",
"C324":"CASTIONE DELLA PRESOLANA (BG)",
"C337":"CASTRO (BG)",
"C396":"CAVERNAGO (BG)",
"C410":"<NAME> (BG)",
"C456":"CENATE SOPRA (BG)",
"C457":"CENATE SOTTO (BG)",
"C459":"CENE (BG)",
"C506":"CERETE (BG)",
"C635":"CHIGNOLO D'ISOLA (BG)",
"C649":"CHIUDUNO (BG)",
"C728":"CISANO BERGAMASCO (BG)",
"C730":"CISERANO (BG)",
"C759":"CIVIDATE AL PIANO (BG)",
"C800":"CLUSONE (BG)",
"C835":"COLERE (BG)",
"C894":"COLOGNO AL SERIO (BG)",
"C910":"COLZATE (BG)",
"C937":"COMUN NUOVO (BG)",
"D015":"CORNA IMAGNA (BG)",
"D066":"CORTENUOVA (BG)",
"D110":"COSTA DI MEZZATE (BG)",
"D103":"COSTA VALLE IMAGNA (BG)",
"D117":"COSTA VOLPINO (BG)",
"D126":"COVO (BG)",
"D139":"CREDARO (BG)",
"D221":"CURNO (BG)",
"D233":"CUSIO (BG)",
"D245":"DALMINE (BG)",
"D352":"DOSSENA (BG)",
"D406":"ENDINE GAIANO (BG)",
"D411":"ENTRATICO (BG)",
"D490":"FARA GERA D'ADDA (BG)",
"D491":"FARA OLIVANA CON SOLA (BG)",
"D588":"FILAGO (BG)",
"D604":"FINO DEL MONTE (BG)",
"D606":"FIORANO AL SERIO (BG)",
"D672":"FONTANELLA (BG)",
"D684":"FONTENO (BG)",
"D688":"FOPPOLO (BG)",
"D697":"FORESTO SPARSO (BG)",
"D727":"FORNOVO SAN GIOVANNI (BG)",
"D817":"FUIPIANO VALLE IMAGNA (BG)",
"D903":"GANDELLINO (BG)",
"D905":"GANDINO (BG)",
"D906":"GANDOSSO (BG)",
"D943":"GAVERINA TERME (BG)",
"D952":"GAZZANIGA (BG)",
"E006":"GHISALBA (BG)",
"E100":"GORLAGO (BG)",
"E103":"GORLE (BG)",
"E106":"GORNO (BG)",
"E148":"GRASSOBBIO (BG)",
"E189":"GROMO (BG)",
"E192":"GRONE (BG)",
"E219":"GRUMELLO DEL MONTE (BG)",
"E353":"ISOLA DI FONDRA (BG)",
"E370":"ISSO (BG)",
"E422":"LALLIO (BG)",
"E509":"LEFFE (BG)",
"E524":"LENNA (BG)",
"E562":"LEVATE (BG)",
"E640":"LOCATELLO (BG)",
"E704":"LOVERE (BG)",
"E751":"LURANO (BG)",
"E770":"LUZZANA (BG)",
"E794":"MADONE (BG)",
"E901":"MAPELLO (BG)",
"E987":"MARTINENGO (BG)",
"F186":"MEZZOLDO (BG)",
"F243":"MISANO DI GERA D'ADDA (BG)",
"F276":"MOIO DE' CALVI (BG)",
"F328":"MONASTEROLO DEL CASTELLO (BG)",
"F547":"MONTELLO (BG)",
"F720":"MORENGO (BG)",
"F738":"MORNICO AL SERIO (BG)",
"F786":"MOZZANICA (BG)",
"F791":"MOZZO (BG)",
"F864":"NEMBRO (BG)",
"G049":"OLMO AL BREMBO (BG)",
"G050":"OLTRE IL COLLE (BG)",
"G054":"OLTRESSENDA ALTA (BG)",
"G068":"ONETA (BG)",
"B911":"CASALROMANO (MN)",
"C059":"CASTELBELFORTE (MN)",
"C076":"<NAME> (MN)",
"C118":"<NAME> (MN)",
"C195":"CASTELLUCCHIO (MN)",
"C312":"CASTIGLIONE DELLE STIVIERE (MN)",
"C406":"CAVRIANA (MN)",
"C502":"CERESARA (MN)",
"C930":"COMMESSAGGIO (MN)",
"D227":"CURTATONE (MN)",
"D351":"DOSOLO (MN)",
"D949":"GAZOLDO DEGLI IPPOLITI (MN)",
"D959":"GAZZUOLO (MN)",
"E078":"GOITO (MN)",
"E089":"GONZAGA (MN)",
"E261":"GUIDIZZOLO (MN)",
"E818":"MAGNACAVALLO (MN)",
"E897":"MANTOVA (MN)",
"E922":"MARCARIA (MN)",
"E949":"<NAME> (MN)",
"E962":"MARMIROLO (MN)",
"F086":"MEDOLE (MN)",
"F267":"MOGLIA (MN)",
"F705":"MONZAMBANO (MN)",
"B012":"MOTTEGGIANA (MN)",
"G186":"OSTIGLIA (MN)",
"G417":"PEGOGNAGA (MN)",
"G633":"PIEVE DI CORIANO (MN)",
"G717":"PIUBEGA (MN)",
"G753":"POGGIO RUSCO (MN)",
"G816":"POMPONESCO (MN)",
"G862":"PONTI SUL MINCIO (MN)",
"G917":"PORTO MANTOVANO (MN)",
"H129":"QUINGENTOLE (MN)",
"H143":"QUISTELLO (MN)",
"H218":"REDONDESCO (MN)",
"H248":"REVERE (MN)",
"H342":"<NAME> (MN)",
"H481":"RODIGO (MN)",
"H541":"RONCOFERRARO (MN)",
"H604":"ROVERBELLA (MN)",
"H652":"SABBIONETA (MN)",
"H771":"SAN BENEDETTO PO (MN)",
"H870":"SAN GIACOMO DELLE SEGNATE (MN)",
"H883":"SAN GIORGIO DI MANTOVA (MN)",
"H912":"SAN GIOVANNI DEL DOSSO (MN)",
"I005":"<NAME> (MN)",
"I532":"SCHIVENOGLIA (MN)",
"I632":"SERMIDE E FELONICA (MN)",
"I662":"SERRAVALLE A PO (MN)",
"I801":"SOLFERINO (MN)",
"L015":"SUSTINENTE (MN)",
"L020":"SUZZARA (MN)",
"L826":"VIADANA (MN)",
"F804":"VILLA POMA (MN)",
"M044":"VILLIMPENTA (MN)",
"M125":"VOLTA MANTOVANA (MN)",
"M340":"BORGO VIRGILIO (MN)",
"A005":"ABBADIA LARIANA (LC)",
"A112":"AIRUNO (LC)",
"A301":"ANNONE DI BRIANZA (LC)",
"A594":"BALLABIO (LC)",
"A683":"BARZAGO (LC)",
"A686":"BARZANÒ (LC)",
"A687":"BARZIO (LC)",
"A745":"BELLANO (LC)",
"B081":"BOSISIO PARINI (LC)",
"B194":"BRIVIO (LC)",
"B261":"BULCIAGO (LC)",
"B396":"CALCO (LC)",
"B423":"CALOLZIOCORTE (LC)",
"B763":"CARENNO (LC)",
"B937":"CASARGO (LC)",
"B943":"CASATENOVO (LC)",
"B996":"<NAME> (LC)",
"C024":"<NAME> (LC)",
"C187":"<NAME> (LC)",
"C521":"<NAME> (LC)",
"C563":"<NAME> (LC)",
"C752":"CIVATE (LC)",
"C839":"COLICO (LC)",
"C851":"<NAME> (LC)",
"D065":"CORTENOVA (LC)",
"D112":"<NAME> (LC)",
"D131":"<NAME> (LC)",
"D143":"CREMELLA (LC)",
"D145":"CREMENO (LC)",
"D280":"DERVIO (LC)",
"D327":"DOLZAGO (LC)",
"D346":"DORIO (LC)",
"D398":"ELLO (LC)",
"D428":"ERVE (LC)",
"D436":"ES<NAME> (LC)",
"D865":"GALBIATE (LC)",
"D913":"GARBAGNATE MONASTERO (LC)",
"D926":"GARLATE (LC)",
"E287":"IMBERSAGO (LC)",
"E305":"INTROBIO (LC)",
"E308":"INTROZZO (LC)",
"E507":"LECCO (LC)",
"E581":"LIERNA (LC)",
"E656":"LOMAGNA (LC)",
"E858":"MALGRATE (LC)",
"E879":"MANDELLO DEL LARIO (LC)",
"E947":"MARGNO (LC)",
"F133":"MERATE (LC)",
"F248":"MISSAGLIA (LC)",
"F265":"MOGGIO (LC)",
"F304":"MOLTENO (LC)",
"F561":"MONTE MARENZO (LC)",
"F657":"MONTEVECCHIA (LC)",
"F674":"<NAME> (LC)",
"F758":"MORTERONE (LC)",
"F887":"NIBIONNO (LC)",
"G009":"OGGIONO (LC)",
"G026":"OLGIATE MOLGORA (LC)",
"G030":"OLGINATE (LC)",
"G040":"OLIVETO LARIO (LC)",
"G161":"OSNAGO (LC)",
"G218":"<NAME> (LC)",
"G241":"PAGNONA (LC)",
"G336":"PARLASCO (LC)",
"G368":"PASTURO (LC)",
"G456":"PERLEDO (LC)",
"G485":"PESCATE (LC)",
"H028":"PREMANA (LC)",
"H063":"PRIMALUNA (LC)",
"G223":"ROBBIATE (LC)",
"H486":"ROGENO (LC)",
"I243":"<NAME> (LC)",
"I759":"SIRONE (LC)",
"I761":"SIRTORI (LC)",
"I994":"SUEGLIO (LC)",
"I996":"SUELLO (LC)",
"L022":"TACENO (LC)",
"L257":"TORRE DE' BUSI (LC)",
"L368":"TREMENICO (LC)",
"L581":"VALGREGHENTINO (LC)",
"L634":"VALMADRERA (LC)",
"L680":"VARENNA (LC)",
"L731":"VENDROGNO (LC)",
"L751":"VERCURAGO (LC)",
"L813":"VESTRENO (LC)",
"L866":"VIGANÒ (LC)",
"M337":"VERDERIO (LC)",
"M348":"LA VALLETTA BRIANZA (LC)",
"A004":"<NAME> (LO)",
"A811":"BERTONICO (LO)",
"A919":"BO<NAME>'ADDA (LO)",
"A995":"BORGHETTO LODIGIANO (LO)",
"B017":"BORGO SAN GIOVANNI (LO)",
"B141":"BREMBIO (LO)",
"B456":"CAMAIRAGO (LO)",
"B887":"CASALETTO LODIGIANO (LO)",
"B899":"CASALMAIOCCO (LO)",
"B910":"CASALPUSTERLENGO (LO)",
"B961":"CASELLE LANDI (LO)",
"B958":"CASELLE LURANI (LO)",
"C228":"CASTELNUOVO BOCCA D'ADDA (LO)",
"C304":"CASTIGLIONE D'ADDA (LO)",
"C329":"CAST<NAME> (LO)",
"C362":"CAVACURTA (LO)",
"C394":"CA<NAME>'ADDA (LO)",
"C555":"CER<NAME>'ADDA (LO)",
"C816":"CODOGNO (LO)",
"C917":"COMAZZO (LO)",
"D021":"CORNEGLIANO LAUDENSE (LO)",
"D028":"CORNO GIOVINE (LO)",
"D029":"CORNOVECCHIO (LO)",
"D068":"CORTE PALASIO (LO)",
"D159":"CRESPIATICA (LO)",
"D660":"FOMBIO (LO)",
"D868":"GALGAGNANO (LO)",
"E127":"GRAFFIGNANA (LO)",
"E238":"GUARDAMIGLIO (LO)",
"E627":"LIVRAGA (LO)",
"E648":"LODI (LO)",
"E651":"LODI VECCHIO (LO)",
"E777":"MACCASTORNA (LO)",
"E840":"MAIRAGO (LO)",
"E852":"MALEO (LO)",
"E994":"MARUDO (LO)",
"F028":"MASSALENGO (LO)",
"F102":"MELETI (LO)",
"F149":"MERLINO (LO)",
"F423":"<NAME> (LO)",
"F801":"MULAZZANO (LO)",
"G107":"<NAME> (LO)",
"G166":"OSPEDALETTO LODIGIANO (LO)",
"G171":"<NAME> (LO)",
"G096":"<NAME> (LO)",
"H701":"<NAME> (LO)",
"H844":"SAN FIORANO (LO)",
"I012":"SAN MARTINO IN STRADA (LO)",
"I140":"SAN ROCCO AL PORTO (LO)",
"I274":"SANT'ANGELO LODIGIANO (LO)",
"I362":"<NAME> LODIGIANO (LO)",
"I561":"SECUGNAGO (LO)",
"I612":"SENNA LODIGIANA (LO)",
"I815":"SOMAGLIA (LO)",
"I848":"SORDIO (LO)",
"F260":"TAVAZZANO CON VILLAVESCO (LO)",
"L125":"TERRANOVA DEI PASSERINI (LO)",
"L469":"TURANO LODIGIANO (LO)",
"G075":"ONORE (BG)",
"G108":"ORIO AL SERIO (BG)",
"G118":"ORNICA (BG)",
"G159":"OSIO SOPRA (BG)",
"G160":"OSIO SOTTO (BG)",
"E891":"MANOCALZATI (AV)",
"E997":"MARZANO DI NOLA (AV)",
"F110":"MELITO IRPINO (AV)",
"F141":"MERCOGLIANO (AV)",
"F230":"MIRABELLA ECLANO (AV)",
"F397":"MONTAGUTO (AV)",
"F448":"MONTECALVO IRPINO (AV)",
"F491":"MONTEFALCIONE (AV)",
"F506":"MONTEFORTE IRPINO (AV)",
"F511":"MONTEFREDANE (AV)",
"F512":"MONTEFUSCO (AV)",
"F546":"MONTELLA (AV)",
"F559":"MONTEMARANO (AV)",
"F566":"MONTEMILETTO (AV)",
"F660":"MONTEVERDE (AV)",
"F744":"MORRA DE SANCTIS (AV)",
"F762":"MOSCHIANO (AV)",
"F798":"MUGNANO DEL CARDINALE (AV)",
"F988":"NUSCO (AV)",
"G165":"OSPEDALETTO D'ALPINOLO (AV)",
"G242":"PAGO DEL VALLO DI LAURO (AV)",
"G340":"PAROLISE (AV)",
"G370":"PATERNOPOLI (AV)",
"G519":"PETRURO IRPINO (AV)",
"G611":"PIETRADEFUSI (AV)",
"G629":"PIETRASTORNINA (AV)",
"G990":"PRATA DI PRINCIPATO ULTRA (AV)",
"H006":"<NAME> (AV)",
"H097":"QUADRELLE (AV)",
"H128":"QUINDICI (AV)",
"H382":"ROCCABASCERANA (AV)",
"H438":"ROCCA S<NAME> (AV)",
"H592":"ROTONDI (AV)",
"H733":"SALZA IRPINA (AV)",
"H975":"<NAME> (AV)",
"I016":"<NAME> (AV)",
"I034":"<NAME> (AV)",
"I061":"<NAME> (AV)",
"I129":"SAN POTITO ULTRA (AV)",
"I163":"<NAME> (AV)",
"I219":"<NAME> (AV)",
"I264":"SANT'ANDREA DI CONZA (AV)",
"I279":"SANT'<NAME> (AV)",
"I280":"SANT'ANGELO A SCALA (AV)",
"I281":"SANT'<NAME> (AV)",
"I301":"SANTA PAOLINA (AV)",
"I357":"SAN<NAME> SOLE (AV)",
"I471":"SAVIGNANO IRPINO (AV)",
"I493":"SCAMPITELLA (AV)",
"I606":"SENERCHIA (AV)",
"I630":"SERINO (AV)",
"I756":"SIRIGNANO (AV)",
"I805":"SOLOFRA (AV)",
"I843":"SORBO SERPICO (AV)",
"I893":"SPERONE (AV)",
"I990":"STURNO (AV)",
"L004":"SUMMONTE (AV)",
"L061":"TAURANO (AV)",
"L062":"TAURASI (AV)",
"L102":"TEORA (AV)",
"L214":"TORELLA DEI LOMBARDI (AV)",
"L272":"TORRE LE NOCELLE (AV)",
"L301":"TORRIONI (AV)",
"L399":"TREVICO (AV)",
"L461":"TUFO (AV)",
"L589":"VALLATA (AV)",
"L616":"VALLESACCARDA (AV)",
"L739":"VENTICANO (AV)",
"L965":"VILLAMAINA (AV)",
"L973":"VILLANOVA DEL BATTISTA (AV)",
"M130":"VOLTURARA IRPINA (AV)",
"M203":"ZUNGOLI (AV)",
"M330":"MONTORO (AV)",
"A023":"ACERNO (SA)",
"A091":"AGROPOLI (SA)",
"A128":"ALBANELLA (SA)",
"A186":"ALFANO (SA)",
"A230":"ALTAVILLA SILENTINA (SA)",
"A251":"AMALFI (SA)",
"A294":"ANGRI (SA)",
"A343":"AQUARA (SA)",
"A460":"ASCEA (SA)",
"A484":"ATENA LUCANA (SA)",
"A487":"ATRANI (SA)",
"A495":"AULETTA (SA)",
"A674":"BARONISSI (SA)",
"A717":"BATTIPAGLIA (SA)",
"A756":"BELLOSGUARDO (SA)",
"B115":"BRACIGLIANO (SA)",
"B242":"BUCCINO (SA)",
"B266":"BUONABITACOLO (SA)",
"B351":"CAGGIANO (SA)",
"B437":"CALVANICO (SA)",
"B476":"CAMEROTA (SA)",
"B492":"CAMPAGNA (SA)",
"B555":"CAMPORA (SA)",
"B608":"CANNALONGA (SA)",
"B644":"CAPACCIO PAESTUM (SA)",
"B868":"CASALBUONO (SA)",
"B888":"CASALETTO SPARTANO (SA)",
"B895":"CAS<NAME> (SA)",
"B959":"CASELLE IN PITTARI (SA)",
"C069":"CASTELCIVITA (SA)",
"C125":"CASTELLABATE (SA)",
"C231":"<NAME> (SA)",
"C235":"CASTELNUOVO DI CONZA (SA)",
"C259":"<NAME> (SA)",
"C262":"<NAME> (SA)",
"C306":"<NAME> (SA)",
"C361":"CAVA DE' TIRRENI (SA)",
"C444":"<NAME> (SA)",
"C470":"CENTOLA (SA)",
"C485":"CERASO (SA)",
"C584":"CETARA (SA)",
"C676":"CICERALE (SA)",
"C879":"COLLIANO (SA)",
"C940":"<NAME> (SA)",
"C973":"CONTRONE (SA)",
"C974":"CONTURSI TERME (SA)",
"C984":"CORBARA (SA)",
"D011":"CORLETO MONFORTE (SA)",
"D195":"CUCCARO VETERE (SA)",
"D390":"EBOLI (SA)",
"D527":"FELITTO (SA)",
"D615":"FISCIANO (SA)",
"D826":"FURORE (SA)",
"D832":"FUTANI (SA)",
"E026":"GIFFONI SE<NAME> (SA)",
"E027":"GIFFONI <NAME> (SA)",
"E037":"GIOI (SA)",
"E060":"GIUNGANO (SA)",
"E365":"ISPANI (SA)",
"E480":"LAUREANA CILENTO (SA)",
"E485":"LAURINO (SA)",
"E486":"LAURITO (SA)",
"E498":"LAVIANO (SA)",
"E767":"LUSTRA (SA)",
"E814":"MAGLIANO VETERE (SA)",
"E839":"MAIORI (SA)",
"F138":"MERCATO SAN SEVERINO (SA)",
"F223":"MINORI (SA)",
"F278":"MOIO DELLA CIVITELLA (SA)",
"F426":"M<NAME> (SA)",
"F479":"MONTECORICE (SA)",
"F480":"MONTECORVINO PUGLIANO (SA)",
"F481":"MONTECORVINO ROVELLA (SA)",
"F507":"MONTEFORTE CILENTO (SA)",
"F618":"MONTE SAN GIACOMO (SA)",
"F625":"MONT<NAME> (SA)",
"F731":"MORIGERATI (SA)",
"F912":"NOCERA INFERIORE (SA)",
"F913":"NOCERA SUPERIORE (SA)",
"F967":"NOVI VELIA (SA)",
"G011":"OGLIASTRO CILENTO (SA)",
"G023":"OLEVANO SUL TUSCIANO (SA)",
"G039":"OLIVETO CITRA (SA)",
"G063":"OMIGNANO (SA)",
"G121":"ORRIA (SA)",
"G192":"OTTATI (SA)",
"G226":"PADULA (SA)",
"G230":"PAGANI (SA)",
"G292":"PALOMONTE (SA)",
"G426":"PELLEZZANO (SA)",
"G447":"PERDIFUMO (SA)",
"G455":"PERITO (SA)",
"G476":"PERTOSA (SA)",
"G509":"PETINA (SA)",
"G538":"PIAGGINE (SA)",
"G707":"PISCIOTTA (SA)",
"G793":"POLLA (SA)",
"G796":"POLLICA (SA)",
"G834":"PONTECAGNANO FAIANO (SA)",
"G932":"POSITANO (SA)",
"G939":"POSTIGLIONE (SA)",
"G976":"PRAIANO (SA)",
"H062":"PRIGNANO CILENTO (SA)",
"H198":"RAVELLO (SA)",
"H277":"RICIGLIANO (SA)",
"H394":"ROCCADASPIDE (SA)",
"H412":"ROCCAGLORIOSA (SA)",
"H431":"ROCCAPIEMONTE (SA)",
"H485":"ROFRANO (SA)",
"H503":"ROMAGNANO AL MONTE (SA)",
"H564":"ROSCIGNO (SA)",
"H644":"RUTINO (SA)",
"H654":"SACCO (SA)",
"H683":"SALA CONSILINA (SA)",
"H686":"SALENTO (SA)",
"H703":"SALERNO (SA)",
"H732":"SALVITELLE (SA)",
"H800":"SAN CIPRIANO PICENTINO (SA)",
"H907":"SAN GIOVANNI A PIRO (SA)",
"H943":"SAN GREGORIO MAGNO (SA)",
"H977":"SAN MANGO PIEMONTE (SA)",
"I019":"SAN M<NAME> (SA)",
"I031":"<NAME> (SA)",
"I032":"<NAME> (SA)",
"C334":"CASTRI DI LECCE (LE)",
"C335":"CASTRIGNANO DE' GRECI (LE)",
"C336":"CASTRIGNANO DEL CAPO (LE)",
"C377":"CAVALLINO (LE)",
"C865":"COLLEPASSO (LE)",
"C978":"COPERTINO (LE)",
"D006":"<NAME> (LE)",
"D044":"CORSANO (LE)",
"D223":"CURSI (LE)",
"D237":"CUTROFIANO (LE)",
"D305":"DISO (LE)",
"D851":"GAGLIANO DEL CAPO (LE)",
"D862":"GALATINA (LE)",
"D863":"GALATONE (LE)",
"D883":"GALLIPOLI (LE)",
"E053":"GIUGGIANELLO (LE)",
"E061":"GIURDIGNANO (LE)",
"E227":"GUAGNANO (LE)",
"E506":"LECCE (LE)",
"E538":"LEQUILE (LE)",
"E563":"LEVERANO (LE)",
"E629":"LIZZANELLO (LE)",
"E815":"MAGLIE (LE)",
"E979":"MARTANO (LE)",
"E984":"MARTIGNANO (LE)",
"F054":"MATINO (LE)",
"F101":"MELENDUGNO (LE)",
"F109":"MELISSANO (LE)",
"F117":"MELPIGNANO (LE)",
"F194":"MIGGIANO (LE)",
"F221":"MINERVINO DI LECCE (LE)",
"F604":"MONTERONI DI LECCE (LE)",
"F623":"<NAME> (LE)",
"F716":"MORCIANO DI LEUCA (LE)",
"F816":"MURO LECCESE (LE)",
"F842":"NARDÒ (LE)",
"F881":"NEVIANO (LE)",
"F916":"NOCIGLIA (LE)",
"F970":"NOVOLI (LE)",
"G136":"ORTELLE (LE)",
"G188":"OTRANTO (LE)",
"G285":"PALMARIGGI (LE)",
"G325":"PARABITA (LE)",
"G378":"PATÙ (LE)",
"G751":"POGGIARDO (LE)",
"H047":"PRESICCE (LE)",
"H147":"RACALE (LE)",
"H632":"RUFFANO (LE)",
"H708":"SALICE SALENTINO (LE)",
"H729":"SALVE (LE)",
"H757":"SANARICA (LE)",
"H793":"SAN CESARIO DI LECCE (LE)",
"H826":"SAN DONATO DI LECCE (LE)",
"I059":"SANNICOLA (LE)",
"I115":"SAN PIETRO IN LAMA (LE)",
"I172":"SANTA CESAREA TERME (LE)",
"I549":"SCORRANO (LE)",
"I559":"SECLÌ (LE)",
"I780":"SOGLIANO CAVOUR (LE)",
"I800":"SOLETO (LE)",
"I887":"SPECCHIA (LE)",
"I923":"SPONGANO (LE)",
"I930":"SQUINZANO (LE)",
"I950":"STERNATIA (LE)",
"L008":"SUPERSANO (LE)",
"L010":"SURANO (LE)",
"L011":"SURBO (LE)",
"L064":"TAURISANO (LE)",
"L074":"TAVIANO (LE)",
"L166":"TIGGIANO (LE)",
"L383":"TREPUZZI (LE)",
"L419":"TRICASE (LE)",
"L462":"TUGLIE (LE)",
"L484":"UGENTO (LE)",
"L485":"UGGIANO LA CHIESA (LE)",
"L711":"VEGLIE (LE)",
"L776":"VERNOLE (LE)",
"M187":"ZOLLINO (LE)",
"M264":"SAN CASSIANO (LE)",
"M261":"CASTRO (LE)",
"M263":"PORTO CESAREO (LE)",
"A285":"ANDRIA (BT)",
"A669":"BARLETTA (BT)",
"A883":"BISCEGLIE (BT)",
"B619":"CANOSA DI PUGLIA (BT)",
"E946":"MARGHERITA DI SAVOIA (BT)",
"F220":"MINERV<NAME> (BT)",
"H839":"SAN FERDINANDO DI PUGLIA (BT)",
"I907":"SPINAZZOLA (BT)",
"L328":"TRANI (BT)",
"B915":"TRINITAPOLI (BT)",
"A013":"ABRIOLA (PZ)",
"A020":"ACERENZA (PZ)",
"A131":"<NAME> (PZ)",
"A321":"ANZI (PZ)",
"A415":"ARMENTO (PZ)",
"A482":"ATELLA (PZ)",
"A519":"AVIGLIANO (PZ)",
"A604":"BALVANO (PZ)",
"A612":"BANZI (PZ)",
"A615":"BARAGIANO (PZ)",
"A666":"BARILE (PZ)",
"A743":"BELLA (PZ)",
"B173":"BRIENZA (PZ)",
"B181":"<NAME> (PZ)",
"B440":"CALVELLO (PZ)",
"B443":"CALVERA (PZ)",
"B549":"CAMPOMAGGIORE (PZ)",
"B580":"CANCELLARA (PZ)",
"B743":"CARBONE (PZ)",
"B906":"<NAME> (PZ)",
"C120":"CASTELGRANDE (PZ)",
"C199":"<NAME> (PZ)",
"C201":"<NAME> (PZ)",
"C209":"CASTELMEZZANO (PZ)",
"C271":"CASTELSARACENO (PZ)",
"C345":"<NAME> (PZ)",
"C539":"CERSOSIMO (PZ)",
"C619":"CHIAROMONTE (PZ)",
"D010":"<NAME> (PZ)",
"D414":"EPISCOPIA (PZ)",
"D497":"FARDELLA (PZ)",
"D593":"FILIANO (PZ)",
"D696":"FORENZA (PZ)",
"D766":"<NAME> SINNI (PZ)",
"D876":"GALLICCHIO (PZ)",
"D971":"<NAME> (PZ)",
"E221":"GRUMENTO NOVA (PZ)",
"E246":"<NAME> (PZ)",
"E409":"LAGONEGRO (PZ)",
"E474":"LATRONICO (PZ)",
"E482":"LAURENZANA (PZ)",
"E483":"LAURIA (PZ)",
"E493":"LAVELLO (PZ)",
"E919":"MARATEA (PZ)",
"E976":"MARSICO NUOVO (PZ)",
"E977":"MARSICOVETERE (PZ)",
"F006":"MASCHITO (PZ)",
"F104":"MELFI (PZ)",
"F249":"MISSANELLO (PZ)",
"F295":"MOLITERNO (PZ)",
"F568":"MONTEMILONE (PZ)",
"F573":"MONTEMURRO (PZ)",
"F817":"<NAME> (PZ)",
"F866":"NEMOLI (PZ)",
"F917":"NOEPOLI (PZ)",
"G081":"<NAME> (PZ)",
"G261":"<NAME> (PZ)",
"G496":"PESCOPAGANO (PZ)",
"G590":"PICERNO (PZ)",
"G616":"PIETRAGALLA (PZ)",
"G623":"PIETRAPERTOSA (PZ)",
"G663":"PIGNOLA (PZ)",
"G942":"POTENZA (PZ)",
"H186":"RAPOLLA (PZ)",
"H187":"RAPONE (PZ)",
"H307":"RIONERO IN VULTURE (PZ)",
"H312":"RIPACANDIDA (PZ)",
"H348":"RIVELLO (PZ)",
"H426":"ROCCANOVA (PZ)",
"H590":"ROTONDA (PZ)",
"H641":"RUOTI (PZ)",
"H646":"RUVO DEL MONTE (PZ)",
"H795":"SAN CHIRICO NUOVO (PZ)",
"H796":"<NAME> (PZ)",
"H808":"SAN COSTANTINO ALBANESE (PZ)",
"H831":"SAN FELE (PZ)",
"H994":"<NAME> (PZ)",
"I157":"SAN SEVER<NAME> (PZ)",
"I288":"<NAME> (PZ)",
"I305":"SANT'ARCANGELO (PZ)",
"I426":"SARCONI (PZ)",
"I457":"<NAME> (PZ)",
"G614":"<NAME> (PZ)",
"H730":"SAVOIA DI LUCANIA (PZ)",
"I610":"SENISE (PZ)",
"I917":"SPINOSO (PZ)",
"L082":"TEANA (PZ)",
"L126":"TERRANOVA DI POLLINO (PZ)",
"L181":"TITO (PZ)",
"L197":"TOLVE (PZ)",
"L326":"TRAMUTOLA (PZ)",
"L357":"TRECCHINA (PZ)",
"L439":"TRIVIGNO (PZ)",
"L532":"VAGLIO BASILICATA (PZ)",
"L738":"VENOSA (PZ)",
"L859":"VIETRI DI POTENZA (PZ)",
"L873":"VIGGIANELLO (PZ)",
"L874":"VIGGIANO (PZ)",
"E033":"GINESTRA (PZ)",
"M269":"PATERNO (PZ)",
"A017":"ACCETTURA (MT)",
"A196":"ALIANO (MT)",
"A801":"BERNALDA (MT)",
"B391":"CALCIANO (MT)",
"C723":"CIRIGLIANO (MT)",
"C888":"COLOBRARO (MT)",
"D128":"CRACO (MT)",
"D547":"FERRANDINA (MT)",
"D909":"GARAGUSO (MT)",
"E093":"GORGOGLIONE (MT)",
"E147":"GRASSANO (MT)",
"E213":"GROTTOLE (MT)",
"E326":"IRSINA (MT)",
"F052":"MATERA (MT)",
"F201":"MIGLIONICO (MT)",
"F399":"MONTALBANO JONICO (MT)",
"F637":"MONTESCAGLIOSO (MT)",
"A942":"NOVA SIRI (MT)",
"G037":"OLIVETO LUCANO (MT)",
"G712":"PISTICCI (MT)",
"G786":"POLICORO (MT)",
"G806":"POMARICO (MT)",
"H591":"ROTONDELLA (MT)",
"H687":"SALANDRA (MT)",
"H888":"SAN GIORGIO LUCANO (MT)",
"I029":"SAN MAURO FORTE (MT)",
"I954":"STIGLIANO (MT)",
"L418":"TRICARICO (MT)",
"L477":"TURSI (MT)",
"D513":"VALSINNI (MT)",
"M256":"SCANZANO JONICO (MT)",
"A033":"ACQUAFORMOSA (CS)",
"A041":"ACQUAPPESA (CS)",
"A053":"ACRI (CS)",
"A102":"AIELLO CALABRO (CS)",
"A105":"AIETA (CS)",
"A160":"ALBIDONA (CS)",
"A183":"ALESSANDRIA DEL CARRETTO (CS)",
"A234":"ALTILIA (CS)",
"A240":"ALTOMONTE (CS)",
"A253":"AMANTEA (CS)",
"A263":"AMENDOLARA (CS)",
"A340":"APRIGLIANO (CS)",
"A762":"BELMONTE CALABRO (CS)",
"A768":"BELSITO (CS)",
"A773":"BELVEDERE MARITTIMO (CS)",
"A842":"BIANCHI (CS)",
"A887":"BISIGNANO (CS)",
"A912":"BOCCHIGLIERO (CS)",
"A973":"BONIFATI (CS)",
"B270":"BUONVICINO (CS)",
"B424":"CALOPEZZATI (CS)",
"B426":"CALOVETO (CS)",
"B500":"CAMPANA (CS)",
"B607":"CANNA (CS)",
"B774":"CARIATI (CS)",
"B802":"CAROLEI (CS)",
"B813":"CARPANZANO (CS)",
"C002":"<NAME> (CS)",
"C301":"CASTIGLIONE COSENTINO (CS)",
"C108":"CASTROLIBERO (CS)",
"C348":"CASTROREGIO (CS)",
"C349":"CASTROVILLARI (CS)",
"C430":"CELICO (CS)",
"C437":"CELLARA (CS)",
"C489":"CERCHIARA DI CALABRIA (CS)",
"C515":"CERISANO (CS)",
"C554":"CERVICATI (CS)",
"C560":"CERZETO (CS)",
"C588":"CETRARO (CS)",
"C763":"CIVITA (CS)",
"C795":"CLETO (CS)",
"C905":"COLOSIMI (CS)",
"D005":"CORIGLIANO CALABRO (CS)",
"D086":"COSENZA (CS)",
"D180":"CROPALATI (CS)",
"D184":"CROSIA (CS)",
"D289":"DIAMANTE (CS)",
"D304":"DIPIGNANO (CS)",
"D328":"DOMANICO (CS)",
"D464":"FAGNANO CASTELLO (CS)",
"D473":"FALCONARA ALBANESE (CS)",
"D582":"FIGLINE VEGLIATURO (CS)",
"D614":"FIRMO (CS)",
"D624":"FIUMEFREDDO BRUZIO (CS)",
"D764":"FRANCAVILLA MARITTIMA (CS)",
"D774":"FRASCINETO (CS)",
"D828":"FUSCALDO (CS)",
"E180":"GRIMALDI (CS)",
"E185":"GRISOLIA (CS)",
"E242":"GUARDIA PIEMONTESE (CS)",
"E407":"LAGO (CS)",
"E417":"LAINO BORGO (CS)",
"E419":"LAINO CASTELLO (CS)",
"E450":"LAPPANO (CS)",
"E475":"LATTARICO (CS)",
"E677":"LONGOBARDI (CS)",
"E678":"LONGOBUCCO (CS)",
"E745":"LUNGRO (CS)",
"E773":"LUZZI (CS)",
"E835":"MAIERÀ (CS)",
"E859":"MALITO (CS)",
"E872":"MALVITO (CS)",
"E878":"MANDATORICCIO (CS)",
"E888":"MANGONE (CS)",
"E914":"MARANO MARCHESATO (CS)",
"E915":"MARANO PRINCIPATO (CS)",
"F001":"MARZI (CS)",
"F125":"MENDICINO (CS)",
"F370":"MONGRASSANO (CS)",
"F416":"MONTALTO UFFUGO (CS)",
"F519":"MONTEGIORDANO (CS)",
"F708":"MORANO CALABRO (CS)",
"F735":"MORMANNO (CS)",
"F775":"MOTTAFOLLONE (CS)",
"F907":"NOCARA (CS)",
"G110":"ORIOLO (CS)",
"G129":"ORSOMARSO (CS)",
"G298":"PALUDI (CS)",
"G307":"PANETTIERI (CS)",
"G317":"PAOLA (CS)",
"G320":"PAPASIDERO (CS)",
"G331":"PARENTI (CS)",
"G372":"PATERNO CALABRO (CS)",
"G411":"PEDIVIGLIANO (CS)",
"G553":"PI<NAME> (CS)",
"G615":"PIETRAFITTA (CS)",
"G622":"PIETRAPAOLA (CS)",
"G733":"PLATACI (CS)",
"G975":"<NAME> (CS)",
"H235":"RENDE (CS)",
"H416":"ROCCA IMPERIALE (CS)",
"H488":"ROGGIANO GRAVINA (CS)",
"H490":"ROGLIANO (CS)",
"H565":"ROSE (CS)",
"H572":"ROSETO CAPO SPULICO (CS)",
"H579":"ROSSANO (CS)",
"H585":"ROTA GRECA (CS)",
"H621":"ROVITO (CS)",
"H765":"SAN BASILE (CS)",
"H774":"SAN BENEDETTO ULLANO (CS)",
"H806":"SAN COSMO ALBANESE (CS)",
"H818":"SAN DEMETRIO CORONE (CS)",
"H825":"SAN DONATO DI NINEA (CS)",
"H841":"SAN FILI (CS)",
"H877":"SANGINETO (CS)",
"H881":"SAN GIORGIO ALBANESE (CS)",
"H919":"SAN GIOVANNI IN FIORE (CS)",
"H961":"SAN LORENZO BELLIZZI (CS)",
"H962":"SAN LORENZO DEL VALLO (CS)",
"H971":"SAN LUCIDO (CS)",
"H981":"SAN MARCO ARGENTANO (CS)",
"H992":"SAN MARTINO DI FINITA (CS)",
"I060":"SAN NICOLA ARCELLA (CS)",
"I108":"SAN PIETRO IN AMANTEA (CS)",
"I114":"SAN PIETRO IN GUARANO (CS)",
"I165":"<NAME> (CS)",
"I171":"SANTA CATERINA ALBANESE (CS)",
"I183":"<NAME> (CS)",
"I192":"SANT'AGATA DI ESARO (CS)",
"C717":"<NAME> (CS)",
"I309":"SANTA SOFIA D'EPIRO (CS)",
"I359":"<NAME> ROGLIANO (CS)",
"I388":"SAN VINCENZO LA COSTA (CS)",
"I423":"SARACENA (CS)",
"I485":"SCALA COELI (CS)",
"I489":"SCALEA (CS)",
"D290":"SCIGLIANO (CS)",
"I642":"<NAME> (CS)",
"I895":"SPEZZANO ALBANESE (CS)",
"I896":"SPEZZANO DELLA SILA (CS)",
"L055":"TARSIA (CS)",
"L124":"TERRANOVA DA SIBARI (CS)",
"L134":"TERRAVECCHIA (CS)",
"L206":"<NAME> (CS)",
"L305":"TORTORA (CS)",
"L353":"TREBISACCE (CS)",
"L524":"VACCARIZZO ALBANESE (CS)",
"L747":"VERBICARO (CS)",
"B903":"VILLAPIANA (CS)",
"M202":"ZUMPANO (CS)",
"M385":"<NAME> (CS)",
"A155":"ALBI (CZ)",
"A255":"AMARONI (CZ)",
"A257":"AMATO (CZ)",
"A272":"ANDALI (CZ)",
"A397":"ARGUSTO (CZ)",
"A542":"BADOLATO (CZ)",
"A736":"BELCASTRO (CZ)",
"B002":"BORGIA (CZ)",
"B085":"BOTRICELLO (CZ)",
"B717":"<NAME> (CZ)",
"B758":"CARDINALE (CZ)",
"B790":"CARLOPOLI (CZ)",
"C352":"CATANZARO (CZ)",
"C453":"CENADI (CZ)",
"C472":"CENTRACHE (CZ)",
"C542":"CERVA (CZ)",
"C616":"CHIARAVALLE CENTRALE (CZ)",
"C674":"CICALA (CZ)",
"C960":"CONFLENTI (CZ)",
"D049":"CORTALE (CZ)",
"D181":"CROPANI (CZ)",
"D218":"CURINGA (CZ)",
"D257":"DAVOLI (CZ)",
"D261":"DECOLLATURA (CZ)",
"D476":"FALERNA (CZ)",
"D544":"FEROLETO ANTICO (CZ)",
"D744":"FOSSATO SERRALTA (CZ)",
"D852":"GAGLIATO (CZ)",
"D932":"GASPERINA (CZ)",
"E031":"GIMIGLIANO (CZ)",
"E050":"GIRIFALCO (CZ)",
"E068":"GIZZERIA (CZ)",
"E239":"GUARDAVALLE (CZ)",
"E328":"ISCA SULLO IONIO (CZ)",
"E274":"JACURSO (CZ)",
"E806":"MAGISANO (CZ)",
"E834":"MAIDA (CZ)",
"E923":"MARCEDUSA (CZ)",
"E925":"MARCELLINARA (CZ)",
"E990":"MARTIRANO (CZ)",
"E991":"MAR<NAME> (CZ)",
"F200":"MIGLIERINA (CZ)",
"F432":"MONTAURO (CZ)",
"F586":"MONTEPAONE (CZ)",
"F780":"MOTTA SANTA LUCIA (CZ)",
"A597":"BALLAO (CA)",
"I089":"SAN PIETRO AL TANAGRO (SA)",
"I143":"SAN RUFO (SA)",
"I253":"SANTA MARINA (SA)",
"I278":"SANT'ANGELO A FASANELLA (SA)",
"I307":"SANT'ARSENIO (SA)",
"I317":"SANT'EGIDIO DEL MONTE ALBINO (SA)",
"I260":"SANTOMENNA (SA)",
"I377":"SAN VALENTINO TORIO (SA)",
"I410":"SANZA (SA)",
"I422":"SAPRI (SA)",
"I438":"SARNO (SA)",
"I451":"SASSANO (SA)",
"I483":"SCAFATI (SA)",
"I486":"SCALA (SA)",
"I648":"SERRAMEZZANA (SA)",
"I666":"SERRE (SA)",
"I677":"SESSA CILENTO (SA)",
"I720":"SIANO (SA)",
"M253":"S<NAME> (SA)",
"G887":"STELLA CILENTO (SA)",
"I960":"STIO (SA)",
"D292":"TEGGIANO (SA)",
"L212":"TORCHIARA (SA)",
"L233":"TORRACA (SA)",
"L274":"TORRE ORSAIA (SA)",
"L306":"TORTORELLA (SA)",
"L323":"TRAMONTI (SA)",
"L377":"TRENTINARA (SA)",
"G540":"<NAME> (SA)",
"L628":"<NAME> (SA)",
"L656":"VALVA (SA)",
"L835":"VIBONATI (SA)",
"L860":"<NAME> (SA)",
"M294":"BELLIZZI (SA)",
"A015":"ACCADIA (FG)",
"A150":"ALBERONA (FG)",
"A320":"ANZANO DI PUGLIA (FG)",
"A339":"APRICENA (FG)",
"A463":"ASCOLI SATRIANO (FG)",
"A854":"BICCARI (FG)",
"B104":"BOVINO (FG)",
"B357":"CAGNANO VARANO (FG)",
"B584":"CANDELA (FG)",
"B724":"CARAPELLE (FG)",
"B784":"CARLANTINO (FG)",
"B829":"CARPINO (FG)",
"B904":"CASALNUOVO MONTEROTARO (FG)",
"B917":"CASALVECCHIO DI PUGLIA (FG)",
"C198":"CASTELLUCCIO DE<NAME> (FG)",
"C202":"<NAME> (FG)",
"C222":"<NAME> (FG)",
"C429":"CELENZA VALFORTORE (FG)",
"C442":"CELLE DI <NAME>ITO (FG)",
"C514":"CERIGNOLA (FG)",
"C633":"CHIEUTI (FG)",
"D269":"DELICETO (FG)",
"D459":"FAETO (FG)",
"D643":"FOGGIA (FG)",
"E332":"ISCHITELLA (FG)",
"E363":"ISO<NAME> (FG)",
"E549":"LESINA (FG)",
"E716":"LUCERA (FG)",
"E885":"MANFREDONIA (FG)",
"F059":"MATTINATA (FG)",
"F538":"MONTELEONE DI PUGLIA (FG)",
"F631":"MONTE SANT'ANGELO (FG)",
"F777":"MOTTA MONTECORVINO (FG)",
"G125":"ORSARA DI PUGLIA (FG)",
"G131":"ORTA NOVA (FG)",
"G312":"PANNI (FG)",
"G487":"PESCHICI (FG)",
"G604":"PIETRAMONTECORVINO (FG)",
"G761":"POGGIO IMPERIALE (FG)",
"H287":"R<NAME> (FG)",
"H467":"ROCCHETTA SANT'ANTONIO (FG)",
"H480":"RODI GARGANICO (FG)",
"H568":"ROSETO VALFORTORE (FG)",
"H926":"SAN GIOVANNI ROTONDO (FG)",
"H985":"SAN MARCO IN LAMIS (FG)",
"H986":"SAN MARCO LA CATOLA (FG)",
"I054":"SAN NICANDRO GARGANICO (FG)",
"I072":"<NAME> DI CIVITATE (FG)",
"I158":"SAN SEVERO (FG)",
"I193":"SANT'AGATA DI PUGLIA (FG)",
"I641":"SERRACAPRIOLA (FG)",
"I962":"STORNARA (FG)",
"I963":"STORNARELLA (FG)",
"L273":"TORREMAGGIORE (FG)",
"L447":"TROIA (FG)",
"L842":"VICO DEL GARGANO (FG)",
"L858":"VIESTE (FG)",
"M131":"VOLTURARA APPULA (FG)",
"M132":"VOLTURINO (FG)",
"M266":"ORDONA (FG)",
"M267":"ZAPPONETA (FG)",
"A048":"<NAME> (BA)",
"A055":"ADELFIA (BA)",
"A149":"ALBEROBELLO (BA)",
"A225":"ALTAMURA (BA)",
"A662":"BARI (BA)",
"A874":"BINETTO (BA)",
"A892":"BITETTO (BA)",
"A893":"BITONTO (BA)",
"A894":"BITRITTO (BA)",
"B716":"CAPURSO (BA)",
"B923":"CASAMASSIMA (BA)",
"B998":"<NAME> (BA)",
"C134":"<NAME> (BA)",
"C436":"CELLAMARE (BA)",
"C975":"CONVERSANO (BA)",
"C983":"CORATO (BA)",
"E038":"<NAME> (BA)",
"E047":"GIOVINAZZO (BA)",
"E155":"GRAVINA IN PUGLIA (BA)",
"E223":"GRUMO APPULA (BA)",
"E645":"LOCOROTONDO (BA)",
"F262":"MODUGNO (BA)",
"F280":"MOLA DI BARI (BA)",
"F284":"MOLFETTA (BA)",
"F376":"MONOPOLI (BA)",
"F915":"NOCI (BA)",
"F923":"NOICATTARO (BA)",
"G291":"PALO DEL COLLE (BA)",
"G769":"POGGIORSINI (BA)",
"G787":"POLIGNANO A MARE (BA)",
"H096":"PUTIGNANO (BA)",
"H643":"RUTIGLIANO (BA)",
"H645":"RUVO DI PUGLIA (BA)",
"H749":"<NAME> (BA)",
"I053":"<NAME> (BA)",
"I330":"SANTERAMO IN COLLE (BA)",
"L109":"TERLIZZI (BA)",
"L220":"TORITTO (BA)",
"L425":"TRIGGIANO (BA)",
"L472":"TURI (BA)",
"L571":"VALENZANO (BA)",
"A514":"AVETRANA (TA)",
"B808":"CAROSINO (TA)",
"C136":"CASTELLANETA (TA)",
"D171":"CRISPIANO (TA)",
"D463":"FAGGIANO (TA)",
"D754":"FRAGAGNANO (TA)",
"E036":"GINOSA (TA)",
"E205":"GROTTAGLIE (TA)",
"E469":"LATERZA (TA)",
"E537":"LEPORANO (TA)",
"E630":"LIZZANO (TA)",
"E882":"MANDURIA (TA)",
"E986":"MARTINA FRANCA (TA)",
"E995":"MARUGGIO (TA)",
"F027":"MASSAFRA (TA)",
"F531":"MONTEIASI (TA)",
"F563":"MONTEMESOLA (TA)",
"F587":"MONTEPARANO (TA)",
"F784":"MOTTOLA (TA)",
"G251":"PALAGIANELLO (TA)",
"G252":"PALAGIANO (TA)",
"H090":"PULSANO (TA)",
"H409":"ROCCAFORZATA (TA)",
"H882":"SAN GIORGIO IONICO (TA)",
"I018":"<NAME> DI S<NAME> (TA)",
"I467":"SAVA (TA)",
"L049":"TARANTO (TA)",
"L294":"TORRICELLA (TA)",
"M298":"STATTE (TA)",
"B180":"BRINDISI (BR)",
"B809":"CAROVIGNO (BR)",
"C424":"<NAME> (BR)",
"C448":"CELL<NAME> (BR)",
"C741":"CISTERNINO (BR)",
"D422":"ERCHIE (BR)",
"D508":"FASANO (BR)",
"D761":"FRANCAVILLA FONTANA (BR)",
"E471":"LATIANO (BR)",
"F152":"MESAGNE (BR)",
"G098":"ORIA (BR)",
"G187":"OSTUNI (BR)",
"H822":"SAN DONACI (BR)",
"I045":"SAN MICHELE SALENTINO (BR)",
"I066":"SAN PANCRAZIO SALENTINO (BR)",
"I119":"SAN PIETRO VERNOTICO (BR)",
"I396":"SAN VITO DEI NORMANNI (BR)",
"L213":"TORCHIAROLO (BR)",
"L280":"TORRE SANTA SUSANNA (BR)",
"L920":"<NAME> (BR)",
"A042":"ACQUARICA DEL CAPO (LE)",
"A184":"ALESSANO (LE)",
"A185":"ALEZIO (LE)",
"A208":"ALLISTE (LE)",
"A281":"ANDRANO (LE)",
"A350":"ARADEO (LE)",
"A425":"ARNESANO (LE)",
"A572":"<NAME> SALENTO (LE)",
"B086":"BOTRUGNO (LE)",
"B413":"CALIMERA (LE)",
"B506":"CAMPI SALENTINA (LE)",
"B616":"CANNOLE (LE)",
"B690":"<NAME> (LE)",
"B792":"CARMIANO (LE)",
"B822":"<NAME> (LE)",
"B936":"CASARANO (LE)",
"G272":"PALERMITI (CZ)",
"G439":"PENTONE (CZ)",
"G517":"PETRIZZI (CZ)",
"G518":"PETRONÀ (CZ)",
"D546":"PIANOPOLI (CZ)",
"G734":"PLATANIA (CZ)",
"H846":"SAN FLORO (CZ)",
"H976":"SAN MANGO D'AQUINO (CZ)",
"I093":"SAN PIETRO A MAIDA (CZ)",
"I095":"SAN PIETRO APOSTOLO (CZ)",
"I164":"SAN SOSTENE (CZ)",
"I170":"SANTA CATERINA DELLO IONIO (CZ)",
"I266":"SANT'ANDREA APOSTOLO DELLO IONIO (CZ)",
"I393":"SAN VITO SULLO IONIO (CZ)",
"I463":"SATRIANO (CZ)",
"I589":"SELLIA (CZ)",
"I590":"<NAME> (CZ)",
"I655":"SERRASTRETTA (CZ)",
"I671":"SERSALE (CZ)",
"I704":"SETTINGIANO (CZ)",
"I745":"<NAME> (CZ)",
"I844":"<NAME> (CZ)",
"I872":"SOVERATO (CZ)",
"I874":"<NAME> (CZ)",
"I875":"<NAME> (CZ)",
"I929":"SQUILLACE (CZ)",
"I937":"STALETTÌ (CZ)",
"L070":"TAVERNA (CZ)",
"L177":"TIRIOLO (CZ)",
"L240":"<NAME> (CZ)",
"I322":"VALLEFIORITA (CZ)",
"M140":"ZAGARISE (CZ)",
"M208":"LAMEZIA TERME (CZ)",
"A065":"AFRICO (RC)",
"A077":"AGNANA CALABRA (RC)",
"A303":"ANOIA (RC)",
"A314":"ANTONIMINA (RC)",
"A385":"ARDORE (RC)",
"A544":"BAGALADI (RC)",
"A552":"BAGNARA CALABRA (RC)",
"A780":"BENESTARE (RC)",
"A843":"BIANCO (RC)",
"A897":"BIVONGI (RC)",
"B097":"BOVA (RC)",
"B098":"BOVALINO (RC)",
"B099":"BOVA MARINA (RC)",
"B118":"BRANCALEONE (RC)",
"B234":"BRUZZANO ZEFFIRIO (RC)",
"B379":"CALANNA (RC)",
"B481":"CAMINI (RC)",
"B516":"CAMPO CALABRO (RC)",
"B591":"CANDIDONI (RC)",
"B617":"CANOLO (RC)",
"B718":"<NAME> (RC)",
"B756":"CARDETO (RC)",
"B766":"CARERI (RC)",
"B966":"CASIGNANA (RC)",
"C285":"CAULONIA (RC)",
"C695":"CIMINÀ (RC)",
"C710":"CINQUEFRONDI (RC)",
"C747":"CITTANOVA (RC)",
"C954":"CONDOFURI (RC)",
"D089":"COSOLETO (RC)",
"D268":"DELIANUOVA (RC)",
"D545":"<NAME> (RC)",
"D557":"FERRUZZANO (RC)",
"D619":"FIUMARA (RC)",
"D864":"GALATRO (RC)",
"D975":"GERACE (RC)",
"E025":"GIFFONE (RC)",
"E041":"GIOIA TAURO (RC)",
"E044":"GIOIOSA IONICA (RC)",
"E212":"GROTTERIA (RC)",
"E402":"LAGANADI (RC)",
"E479":"<NAME> (RC)",
"D976":"LOCRI (RC)",
"E873":"MAMMOLA (RC)",
"E956":"<NAME> (RC)",
"E968":"MAROPATI (RC)",
"E993":"MARTONE (RC)",
"F105":"MELICUCCÀ (RC)",
"F106":"MELICUCCO (RC)",
"F112":"<NAME> (RC)",
"F301":"MOLOCHIO (RC)",
"F324":"MONASTERACE (RC)",
"D746":"MONTEBELLO JONICO (RC)",
"F779":"MOTTA SAN GIOVANNI (RC)",
"G082":"OPPIDO MAMERTINA (RC)",
"G277":"PALIZZI (RC)",
"G288":"PALMI (RC)",
"G394":"PAZZANO (RC)",
"G729":"PLACANICA (RC)",
"G735":"PLATÌ (RC)",
"G791":"POLISTENA (RC)",
"G905":"PORTIGLIOLA (RC)",
"H224":"REGGIO DI CALABRIA (RC)",
"H265":"RIACE (RC)",
"H359":"RIZZICONI (RC)",
"H408":"ROCCAFORTE DEL GRECO (RC)",
"H456":"ROCCELLA IONICA (RC)",
"H489":"ROGHUDI (RC)",
"H558":"ROSARNO (RC)",
"H013":"SAMO (RC)",
"H889":"SAN G<NAME>ORGETO (RC)",
"H903":"SAN GIOVANNI DI GERACE (RC)",
"H959":"SAN LORENZO (RC)",
"H970":"SAN LUCA (RC)",
"I102":"SAN PIETRO DI CARIDÀ (RC)",
"I132":"SAN PROCOPIO (RC)",
"I139":"SAN ROBERTO (RC)",
"I176":"SANTA CRISTINA D'ASPROMONTE (RC)",
"I198":"SANT'AGATA DEL BIANCO (RC)",
"I214":"SANT'ALESSIO IN ASPROMONTE (RC)",
"I333":"SANT'EUFEMIA D'ASPROMONTE (RC)",
"I341":"SANT'IL<NAME> (RC)",
"I371":"SANTO STEFANO IN ASPROMONTE (RC)",
"I536":"SCIDO (RC)",
"I537":"SCILLA (RC)",
"I600":"SEMINARA (RC)",
"I656":"SERRATA (RC)",
"I725":"SIDERNO (RC)",
"I753":"SINOPOLI (RC)",
"I936":"STAITI (RC)",
"I955":"STIGNANO (RC)",
"I956":"STILO (RC)",
"L063":"TAURIANOVA (RC)",
"L127":"TERRANOVA SAPPO MINULIO (RC)",
"L673":"VARAPODIO (RC)",
"M018":"<NAME> (RC)",
"M277":"<NAME> (RC)",
"A772":"<NAME> (KR)",
"B319":"CACCURI (KR)",
"B771":"CARFIZZI (KR)",
"B857":"CASABONA (KR)",
"B968":"CASTELSILANO (KR)",
"C501":"CERENZIA (KR)",
"C725":"CIRÒ (KR)",
"C726":"CIRÒ MARINA (KR)",
"D123":"COTRONEI (KR)",
"D122":"CROTONE (KR)",
"D189":"CRUCOLI (KR)",
"D236":"CUTRO (KR)",
"E339":"ISOLA DI CAPO RIZZUTO (KR)",
"F108":"MELISSA (KR)",
"F157":"MESORACA (KR)",
"G278":"PALLAGORIO (KR)",
"G508":"PETILIA POLICASTRO (KR)",
"H383":"ROCCABERNARDA (KR)",
"H403":"ROCCA DI NETO (KR)",
"I026":"SAN MAURO MARCHESATO (KR)",
"I057":"<NAME>'ALTO (KR)",
"I308":"SANTA SEVERINA (KR)",
"I468":"SAVELLI (KR)",
"I494":"SCANDALE (KR)",
"I982":"STRONGOLI (KR)",
"L492":"UMBRIATICO (KR)",
"L802":"VERZINO (KR)",
"A043":"ACQUARO (VV)",
"A386":"ARENA (VV)",
"B169":"BRIATICO (VV)",
"B197":"BROGNATURO (VV)",
"B655":"CAPISTRANO (VV)",
"C581":"CESSANITI (VV)",
"D253":"DASÀ (VV)",
"D303":"DINAMI (VV)",
"D364":"DRAPIA (VV)",
"D453":"FABRIZIA (VV)",
"D587":"FILADELFIA (VV)",
"D589":"FILANDARI (VV)",
"D596":"FILOGASO (VV)",
"D762":"FRANCAVILLA ANGITOLA (VV)",
"D767":"FRANCICA (VV)",
"D988":"GEROCARNE (VV)",
"E321":"IONADI (VV)",
"E389":"JOPPOLO (VV)",
"E590":"LIMBADI (VV)",
"E836":"MAIERATO (VV)",
"F207":"MILETO (VV)",
"F364":"MONGIANA (VV)",
"F607":"MONTEROSSO CALABRO (VV)",
"F843":"NARDODIPACE (VV)",
"F893":"NICOTERA (VV)",
"G335":"PARGHELIA (VV)",
"G722":"PIZZO (VV)",
"G728":"PIZZONI (VV)",
"G785":"POLIA (VV)",
"H271":"RICADI (VV)",
"H516":"ROMBIOLO (VV)",
"H785":"SAN CALOGERO (VV)",
"H807":"SAN COSTANTINO CALABRO (VV)",
"H941":"SAN GREGORIO D'IPPONA (VV)",
"I058":"SAN NICOLA DA CRISSA (VV)",
"I350":"SANT'ONOFRIO (VV)",
"I639":"SERRA SAN BRUNO (VV)",
"I744":"SIMBARIO (VV)",
"I853":"SORIANELLO (VV)",
"I854":"SORIANO CALABRO (VV)",
"I884":"SPADOLA (VV)",
"I905":"SPILINGA (VV)",
"I945":"STEFANACONI (VV)",
"L452":"TROPEA (VV)",
"L607":"VALLELONGA (VV)",
"L699":"VAZZANO (VV)",
"F537":"VIBO VALENTIA (VV)",
"M138":"ZACCANOPOLI (VV)",
"M143":"ZAMBRONE (VV)",
"H867":"SAN GIACOMO DEGLI SCHIAVONI (CB)",
"H920":"SAN GIOVANNI IN GALDO (CB)",
"H928":"SAN GIULIANO DEL SANNIO (CB)",
"H929":"SAN GIULIANO DI PUGLIA (CB)",
"H990":"SAN MARTINO IN PENSILIS (CB)",
"I023":"SAN MASSIMO (CB)",
"I122":"SAN POLO MATESE (CB)",
"I181":"SANTA CROCE DI MAGLIANO (CB)",
"I289":"SANT'ANGELO LIMOSANO (CB)",
"I320":"SANT'ELIA A PIANISI (CB)",
"I618":"SEPINO (CB)",
"I910":"SPINETE (CB)",
"L069":"TAVENNA (CB)",
"L113":"TERMOLI (CB)",
"L215":"TORELLA DEL SANNIO (CB)",
"L230":"TORO (CB)",
"L435":"TRIVENTO (CB)",
"L458":"TUFARA (CB)",
"L505":"URURI (CB)",
"M057":"VINCHIATURO (CB)",
"A051":"ACQUAVIVA D'ISERNIA (IS)",
"A080":"AGNONE (IS)",
"A567":"BAGNOLI DEL TRIGNO (IS)",
"A761":"BELMONTE DEL SANNIO (IS)",
"B630":"CANTALUPO NEL SANNIO (IS)",
"B682":"CAPRACOTTA (IS)",
"B810":"CAROVILLI (IS)",
"B830":"CARPINONE (IS)",
"C082":"<NAME> (IS)",
"C246":"CASTELPETROSO (IS)",
"C247":"CASTELPIZZUTO (IS)",
"C270":"<NAME>INCENZO (IS)",
"C200":"CASTELVERRINO (IS)",
"C534":"CERRO AL VOLTURNO (IS)",
"C620":"CHIAUCI (IS)",
"C769":"CIVITANOVA DEL SANNIO (IS)",
"C878":"<NAME> (IS)",
"C941":"CON<NAME> (IS)",
"D595":"FILIGNANO (IS)",
"D703":"FORLÌ DEL SANNIO (IS)",
"D715":"FORNELLI (IS)",
"D811":"FROSOLONE (IS)",
"E335":"ISERNIA (IS)",
"E669":"LONGANO (IS)",
"E778":"<NAME>'ISERNIA (IS)",
"E779":"MACCHIAGODENA (IS)",
"F239":"MIRANDA (IS)",
"F429":"MONTAQUILA (IS)",
"F580":"MONTENERO VAL COCCHIARA (IS)",
"F601":"MONTERODUNI (IS)",
"G486":"PESCHE (IS)",
"G495":"PESCOLANCIANO (IS)",
"G497":"PESCOPENNATARO (IS)",
"G523":"PETTORANELLO DEL MOLISE (IS)",
"G606":"PIETRABBONDANTE (IS)",
"G727":"PIZZONE (IS)",
"B317":"POGGIO SANNITA (IS)",
"G954":"POZZILLI (IS)",
"H308":"RIONERO SANNITICO (IS)",
"H420":"ROCCAMANDOLFI (IS)",
"H445":"ROCCASICURA (IS)",
"H458":"ROCCHETTA A VOLTURNO (IS)",
"I096":"<NAME> (IS)",
"I189":"SANT'AGAPITO (IS)",
"I238":"S<NAME> MOLISE (IS)",
"I282":"SANT'ANGELO DEL PESCO (IS)",
"B466":"SANT'ELENA SANNITA (IS)",
"I507":"SCAPOLI (IS)",
"I679":"SESSANO DEL MOLISE (IS)",
"I682":"SESTO CAMPANO (IS)",
"L696":"VASTOGIRARDI (IS)",
"L725":"VENAFRO (IS)",
"A106":"AILANO (CE)",
"A200":"ALIFE (CE)",
"A243":"ALVIGNANO (CE)",
"A403":"ARIENZO (CE)",
"A512":"AVERSA (CE)",
"A579":"B<NAME> (CE)",
"A755":"BELLONA (CE)",
"B361":"CAIANELLO (CE)",
"B362":"CAIAZZO (CE)",
"B445":"<NAME> (CE)",
"B477":"CAMIGLIANO (CE)",
"B581":"<NAME> (CE)",
"B667":"CAPODRISE (CE)",
"B704":"<NAME> (CE)",
"B715":"CAPUA (CE)",
"B779":"CARINARO (CE)",
"B781":"CARINOLA (CE)",
"B860":"CASAGIOVE (CE)",
"B872":"<NAME> (CE)",
"B916":"CASALUCE (CE)",
"B935":"CASAPULLA (CE)",
"B963":"CASERTA (CE)",
"B494":"<NAME> (CE)",
"C097":"<NAME> (CE)",
"C178":"<NAME> (CE)",
"C211":"<NAME> (CE)",
"C291":"<NAME> (CE)",
"C558":"CERVINO (CE)",
"C561":"CESA (CE)",
"C716":"CIORLANO (CE)",
"C939":"<NAME> (CE)",
"D228":"CURTI (CE)",
"D361":"DRAGONI (CE)",
"D683":"FONTEGRECA (CE)",
"D709":"FORMICOLA (CE)",
"D769":"FRANCOLISE (CE)",
"D799":"FRIGNANO (CE)",
"D884":"GALLO MATESE (CE)",
"D886":"GALLUCCIO (CE)",
"E011":"GIANO VETUSTO (CE)",
"E039":"GIOIA SANNITICA (CE)",
"E158":"GRAZZANISE (CE)",
"E173":"GRICIGNANO DI AVERSA (CE)",
"E554":"LETINO (CE)",
"E570":"LIBERI (CE)",
"E754":"LUSCIANO (CE)",
"E784":"MACERATA CAMPANIA (CE)",
"E791":"MADDALONI (CE)",
"E932":"MARCIANISE (CE)",
"E998":"MARZANO APPIO (CE)",
"F203":"MIGN<NAME> (CE)",
"F352":"MONDRAGONE (CE)",
"G130":"ORTA DI ATELLA (CE)",
"G333":"PARETE (CE)",
"G364":"PASTORANO (CE)",
"G541":"PIANA DI MONTE VERNA (CE)",
"G596":"PIEDIMONTE MATESE (CE)",
"G620":"PIETRAMELARA (CE)",
"G630":"PIETRAVAIRANO (CE)",
"G661":"<NAME> (CE)",
"G849":"PONTELATONE (CE)",
"G903":"PORTICO DI CASERTA (CE)",
"G991":"PRATA SANNITA (CE)",
"G995":"PRATELLA (CE)",
"H045":"PRESENZANO (CE)",
"H202":"RAVISCANINA (CE)",
"H210":"RECALE (CE)",
"H268":"RIARDO (CE)",
"H398":"ROCCA D'EVANDRO (CE)",
"H423":"ROCCAMONFINA (CE)",
"H436":"ROCCAROMANA (CE)",
"H459":"ROCCHETTA E CROCE (CE)",
"H165":"RUVIANO (CE)",
"H798":"SAN CIPRIANO D'AVERSA (CE)",
"H834":"SAN FELICE A CANCELLO (CE)",
"H939":"SAN GREGORIO MATESE (CE)",
"H978":"SAN MARCELLINO (CE)",
"I056":"SAN NICOLA LA STRADA (CE)",
"I113":"SAN PIETRO INFINE (CE)",
"I130":"SAN POTITO SANNITICO (CE)",
"I131":"SAN PRISCO (CE)",
"I233":"S<NAME> A VICO (CE)",
"I234":"<NAME> (CE)",
"I247":"S<NAME> FOSSA (CE)",
"I261":"SAN TAMMARO (CE)",
"I273":"<NAME> (CE)",
"I306":"SANT'ARPINO (CE)",
"I676":"SESSA AURUNCA (CE)",
"I885":"SPARANISE (CE)",
"I993":"SUCCIVO (CE)",
"L083":"TEANO (CE)",
"L155":"TEVEROLA (CE)",
"L205":"TORA E PICCILLI (CE)",
"L379":"TRENTOLA-DUCENTA (CE)",
"L540":"VAIRANO PATENORA (CE)",
"L594":"VALLE AGRICOLA (CE)",
"L591":"VALLE DI MADDALONI (CE)",
"D801":"VILLA DI BRIANO (CE)",
"L844":"VILLA LITERNO (CE)",
"M092":"VITULAZIO (CE)",
"D471":"FALCIANO DEL MASSICO (CE)",
"M262":"CELLOLE (CE)",
"M260":"CASAPESENNA (CE)",
"F043":"SAN MARCO EVANGELISTA (CE)",
"A110":"AIROLA (BN)",
"A265":"AMOROSI (BN)",
"A328":"APICE (BN)",
"A330":"APOLLOSA (BN)",
"A431":"ARPAIA (BN)",
"A432":"ARPAISE (BN)",
"A696":"BASELICE (BN)",
"A783":"BENEVENTO (BN)",
"A970":"BONEA (BN)",
"B239":"BUCCIANO (BN)",
"B267":"BUONALBERGO (BN)",
"B444":"CALVI (BN)",
"B541":"CAMPOLATTARO (BN)",
"B542":"CAMPOLI DEL MONTE TABURNO (BN)",
"B873":"CASALDUNI (BN)",
"C106":"<NAME> MISCANO (BN)",
"C245":"CASTELPAGANO (BN)",
"C250":"CASTELPOTO (BN)",
"C280":"CASTELVENERE (BN)",
"C284":"CASTELVETERE IN VAL FORTORE (BN)",
"C359":"CAUTANO (BN)",
"C476":"CEPPALONI (BN)",
"C525":"CER<NAME>ANNITA (BN)",
"C719":"CIRCELLO (BN)",
"C846":"COL<NAME>ANNITA (BN)",
"D230":"<NAME> (BN)",
"D380":"DUGENTA (BN)",
"D386":"DURAZZANO (BN)",
"D469":"FAICCHIO (BN)",
"D644":"FOGLIANISE (BN)",
"D650":"FOIANO DI VAL FORTORE (BN)",
"D693":"FORCHIA (BN)",
"D755":"FRAGNETO L'ABATE (BN)",
"D756":"FRAGNETO MONFORTE (BN)",
"D784":"FRASSO TELESINO (BN)",
"E034":"GINESTRA DEGLI SCHIAVONI (BN)",
"E249":"GUARDIA SANFRAMONDI (BN)",
"E589":"LIMATOLA (BN)",
"F113":"MELIZZANO (BN)",
"F274":"MOIANO (BN)",
"F287":"MOLINARA (BN)",
"F494":"MONTEFALCONE DI VAL FORTORE (BN)",
"F636":"MONTESARCHIO (BN)",
"F717":"MORCONE (BN)",
"G227":"PADULI (BN)",
"G243":"PAGO VEIANO (BN)",
"G311":"PANNARANO (BN)",
"G318":"PAOLISI (BN)",
"G386":"PAUPISI (BN)",
"G494":"PESCO SANNITA (BN)",
"G626":"PIETRAROJA (BN)",
"G631":"PIETRELCINA (BN)",
"G827":"PONTE (BN)",
"G848":"PONTELANDOLFO (BN)",
"H087":"PUGLIANELLO (BN)",
"H227":"REINO (BN)",
"H764":"SAN BARTOLOMEO IN GALDO (BN)",
"H894":"SAN GIORGIO DEL SANNIO (BN)",
"H898":"SAN GIORGIO LA MOLARA (BN)",
"H953":"SAN LEUCIO DEL SANNIO (BN)",
"H955":"SAN LORENZELLO (BN)",
"H967":"SAN LORENZO MAGGIORE (BN)",
"H973":"SAN LUPO (BN)",
"H984":"SAN MARCO DEI CAVOTI (BN)",
"I002":"SAN MARTINO SANNITA (BN)",
"I049":"SAN NAZZARO (BN)",
"I062":"SAN NICOLA MANFREDI (BN)",
"I145":"SAN SALVATORE TELESINO (BN)",
"I179":"SANTA CROCE DEL SANNIO (BN)",
"I197":"SANT'AGATA DE' GOTI (BN)",
"I277":"SANT'ANGELO A CUPOLO (BN)",
"I455":"SASSINORO (BN)",
"I809":"SOLOPACA (BN)",
"L086":"TELESE TERME (BN)",
"L185":"TOCCO CAUDIO (BN)",
"L254":"TORRECUSO (BN)",
"M093":"VITULANO (BN)",
"F557":"SANT'ARCANGELO TRIMONTE (BN)",
"A024":"ACERRA (NA)",
"A064":"AFRAGOLA (NA)",
"A068":"AGEROLA (NA)",
"A268":"ANACAPRI (NA)",
"A455":"ARZANO (NA)",
"A535":"BACOLI (NA)",
"A617":"<NAME>'ISCHIA (NA)",
"B076":"BOSCOREALE (NA)",
"B077":"BOSCOTRECASE (NA)",
"B227":"BRUSCIANO (NA)",
"B371":"CAIVANO (NA)",
"B452":"CALVIZZANO (NA)",
"B565":"CAMPOSANO (NA)",
"B696":"CAPRI (NA)",
"B740":"CARBONARA DI NOLA (NA)",
"B759":"CARDITO (NA)",
"B905":"CASALNUOVO DI NAPOLI (NA)",
"B922":"CASAMARCIANO (NA)",
"B924":"CASAMICCIOLA TERME (NA)",
"B925":"CASANDRINO (NA)",
"B946":"CASAVATORE (NA)",
"B980":"CASOLA DI NAPOLI (NA)",
"B990":"CASORIA (NA)",
"C129":"CASTELLAMMARE DI STABIA (NA)",
"C188":"<NAME> (NA)",
"C495":"CERCOLA (NA)",
"C675":"CICCIANO (NA)",
"C697":"CIMITILE (NA)",
"C929":"COMIZIANO (NA)",
"D170":"CRISPANO (NA)",
"D702":"FORIO (NA)",
"D789":"FRATTAMAGGIORE (NA)",
"D790":"FRATTAMINORE (NA)",
"E054":"GIUGLIANO IN CAMPANIA (NA)",
"E131":"GRAGNANO (NA)",
"E224":"GRUMO NEVANO (NA)",
"E329":"ISCHIA (NA)",
"E396":"LACCO AMENO (NA)",
"E557":"LETTERE (NA)",
"E620":"LIVERI (NA)",
"E906":"MARANO DI NAPOLI (NA)",
"E954":"MARIGLIANELLA (NA)",
"E955":"MARIGLIANO (NA)",
"F030":"MASSA LUBRENSE (NA)",
"F111":"MELITO DI NAPOLI (NA)",
"F162":"META (NA)",
"F488":"MONTE DI PROCIDA (NA)",
"F799":"MUGNANO DI NAPOLI (NA)",
"F839":"NAPOLI (NA)",
"F924":"NOLA (NA)",
"G190":"OTTAVIANO (NA)",
"G283":"PALMA CAMPANIA (NA)",
"G568":"PIANO DI SORRENTO (NA)",
"G670":"PIMONTE (NA)",
"G762":"POGGIOMARINO (NA)",
"G795":"POLLENA TROCCHIA (NA)",
"G812":"POMIGLIANO D'ARCO (NA)",
"G813":"POMPEI (NA)",
"G902":"PORTICI (NA)",
"G964":"POZZUOLI (NA)",
"H072":"PROCIDA (NA)",
"H101":"QUALIANO (NA)",
"H114":"QUARTO (NA)",
"H243":"ERCOLANO (NA)",
"H433":"ROCCARAINOLA (NA)",
"H860":"SAN GENNARO VESUVIANO (NA)",
"H892":"SAN GIORGIO A CREMANO (NA)",
"H931":"SAN GIUSEPPE VESUVIANO (NA)",
"I073":"SAN PAOLO BEL SITO (NA)",
"I151":"SAN SEBASTIANO AL VESUVIO (NA)",
"I208":"SANT'AGNELLO (NA)",
"I262":"SANT'ANASTASIA (NA)",
"I293":"SANT'ANTIMO (NA)",
"I300":"SANT'ANTONIO ABATE (NA)",
"I391":"SAN VITALIANO (NA)",
"I469":"SAVIANO (NA)",
"I540":"SCISCIANO (NA)",
"I652":"SERRARA FONTANA (NA)",
"I820":"SOMMA VESUVIANA (NA)",
"I862":"SORRENTO (NA)",
"I978":"STRIANO (NA)",
"L142":"TERZIGNO (NA)",
"L245":"TORRE ANNUNZIATA (NA)",
"L259":"TORRE DEL GRECO (NA)",
"L460":"TUFINO (NA)",
"L845":"VICO EQUENSE (NA)",
"G309":"VILLARICCA (NA)",
"M072":"VISCIANO (NA)",
"M115":"VOLLA (NA)",
"M273":"<NAME> (NA)",
"M280":"TRECASE (NA)",
"M289":"<NAME> (NA)",
"A101":"<NAME> (AV)",
"A228":"ALTAVILLA IRPINA (AV)",
"A284":"ANDRETTA (AV)",
"A347":"AQUILONIA (AV)",
"A399":"ARIANO IRPINO (AV)",
"A489":"ATRIPALDA (AV)",
"A508":"AVELLA (AV)",
"A509":"AVELLINO (AV)",
"A566":"BAGNOLI IRPINO (AV)",
"A580":"BAIANO (AV)",
"A881":"BISACCIA (AV)",
"A975":"BONITO (AV)",
"B367":"CAIRANO (AV)",
"B374":"CALABRITTO (AV)",
"B415":"CALITRI (AV)",
"B590":"CANDIDA (AV)",
"B674":"CAPOSELE (AV)",
"B706":"CAPRIGLIA IRPINA (AV)",
"B776":"CARIFE (AV)",
"B866":"CASALBORE (AV)",
"B997":"CASSANO IRPINO (AV)",
"C058":"<NAME> (AV)",
"C105":"CASTELFRANCI (AV)",
"C283":"CASTELVETERE SUL CALORE (AV)",
"C557":"CERVINARA (AV)",
"C576":"CESINALI (AV)",
"C606":"CHIANCHE (AV)",
"C659":"<NAME>ENICO (AV)",
"C971":"CONTRADA (AV)",
"C976":"CONZA DELLA CAMPANIA (AV)",
"D331":"DOMICELLA (AV)",
"D638":"FLUMERI (AV)",
"D671":"FONTANAROSA (AV)",
"D701":"FORINO (AV)",
"D798":"FRIGENTO (AV)",
"D998":"GESUALDO (AV)",
"E161":"GRECI (AV)",
"E206":"GROTTAMINARDA (AV)",
"E214":"GROTTOLELLA (AV)",
"E245":"GUARDIA LOMBARDI (AV)",
"E397":"LACEDONIA (AV)",
"E448":"LAPIO (AV)",
"E487":"LAURO (AV)",
"E605":"LIONI (AV)",
"E746":"LUOGOSANO (AV)",
"A677":"BARRALI (CA)",
"A681":"BARUMINI (CA)",
"B274":"BURCEI (CA)",
"M288":"CASTIADAS (CA)",
"C882":"COLLINAS (CA)",
"D260":"DECIMOPUTZU (CA)",
"D323":"DOLIANOVA (CA)",
"D333":"DOMUS DE MARIA (CA)",
"D344":"DONORI (CA)",
"D430":"ESCALAPLANO (CA)",
"D431":"ESCOLCA (CA)",
"D443":"ESTERZILI (CA)",
"D827":"FURTEI (CA)",
"D968":"GENONI (CA)",
"D970":"GENURI (CA)",
"D982":"GERGEI (CA)",
"D994":"GESICO (CA)",
"D997":"GESTURI (CA)",
"E084":"GONI (CA)",
"E085":"GONNOSFANADIGA (CA)",
"E234":"GUAMAGGIORE (CA)",
"E252":"GUASILA (CA)",
"E270":"GUSPINI (CA)",
"E336":"ISILI (CA)",
"E464":"LAS PLASSAS (CA)",
"E742":"LUNAMATRONA (CA)",
"E877":"MANDAS (CA)",
"F333":"MONASTIR (CA)",
"F808":"MURAVERA (CA)",
"F981":"NURAGUS (CA)",
"F982":"NURALLAO (CA)",
"F983":"NURAMINIS (CA)",
"F986":"NURRI (CA)",
"G122":"ORROLI (CA)",
"G133":"ORTACESUS (CA)",
"G207":"PABILLONIS (CA)",
"G382":"PAULI ARBAREI (CA)",
"G669":"PIMENTEL (CA)",
"H659":"SADALI (CA)",
"H738":"SAMASSI (CA)",
"H739":"SAMATZAI (CA)",
"H766":"SAN BASILIO (CA)",
"H856":"SAN GAVINO MONREALE (CA)",
"G383":"SAN NICOLÒ GERREI (CA)",
"I166":"SAN SPERATE (CA)",
"I402":"SAN VITO (CA)",
"H974":"SANLURI (CA)",
"I271":"SANT'ANDREA FRIUS (CA)",
"I428":"SARDARA (CA)",
"I570":"SEGARIU (CA)",
"I582":"SELEGAS (CA)",
"I615":"SENORBÌ (CA)",
"I624":"SERDIANA (CA)",
"I647":"SERRAMANNA (CA)",
"I667":"SERRENTI (CA)",
"I668":"SERRI (CA)",
"I705":"SETZU (CA)",
"I706":"SEUI (CA)",
"I707":"SEULO (CA)",
"I724":"SIDDI (CA)",
"I734":"SILIQUA (CA)",
"I735":"SILIUS (CA)",
"I765":"SI<NAME> (CA)",
"I797":"SOLEMINIS (CA)",
"I995":"SUELLI (CA)",
"L154":"TEULADA (CA)",
"L463":"TUILI (CA)",
"L473":"TURRI (CA)",
"L512":"USSANA (CA)",
"L513":"USSARAMANNA (CA)",
"L613":"VALLERMOSA (CA)",
"L924":"VILLACIDRO (CA)",
"L966":"VILLAMAR (CA)",
"L992":"VILLANOVA TULO (CA)",
"L986":"VILLANOVAFORRU (CA)",
"L987":"VILLANOVAFRANCA (CA)",
"L998":"VILLAPUTZU (CA)",
"M016":"VILLASALTO (CA)",
"B738":"VILLASIMIUS (CA)",
"M025":"VILLASOR (CA)",
"M026":"VILLASPECIOSA (CA)",
"M204":"ZUNGRI (VV)",
"A176":"ALCAMO (TP)",
"B288":"BUSETO PALIZZOLO (TP)",
"B385":"CALATAFIMI-SEGESTA (TP)",
"B521":"<NAME> (TP)",
"C130":"<NAME> (TP)",
"C286":"CASTELVETRANO (TP)",
"D234":"CUSTONACI (TP)",
"D423":"ERICE (TP)",
"D518":"FAVIGNANA (TP)",
"E023":"GIBELLINA (TP)",
"E974":"MARSALA (TP)",
"F061":"MAZARA DEL VALLO (TP)",
"G208":"PACECO (TP)",
"G315":"PANTELLERIA (TP)",
"G347":"PARTANNA (TP)",
"G767":"POGGIOREALE (TP)",
"H688":"SALAPARUTA (TP)",
"H700":"SALEMI (TP)",
"I291":"SANTA NINFA (TP)",
"I407":"SAN VITO LO CAPO (TP)",
"L331":"TRAPANI (TP)",
"G319":"VALDERICE (TP)",
"M081":"VITA (TP)",
"M281":"PETROSINO (TP)",
"A195":"ALIA (PA)",
"A202":"ALIMENA (PA)",
"A203":"ALIMINUSA (PA)",
"A229":"ALTAVILLA MILICIA (PA)",
"A239":"ALTOFONTE (PA)",
"A546":"BAGHERIA (PA)",
"A592":"BALESTRATE (PA)",
"A719":"BAUCINA (PA)",
"A764":"BELMONTE MEZZAGNO (PA)",
"A882":"BISACQUINO (PA)",
"A946":"BOLOGNETTA (PA)",
"A958":"BOMPIETRO (PA)",
"A991":"BORGETTO (PA)",
"B315":"CACCAMO (PA)",
"B430":"CALTAVUTURO (PA)",
"B533":"CAMPOFELICE DI FITALIA (PA)",
"B532":"CAMPOFELICE DI ROCCELLA (PA)",
"B535":"CAMPOFIORITO (PA)",
"B556":"CAMPOREALE (PA)",
"B645":"CAPACI (PA)",
"B780":"CARINI (PA)",
"C067":"CASTELBUONO (PA)",
"C074":"CASTELDACCIA (PA)",
"C135":"CASTELLANA SICULA (PA)",
"C344":"CASTRONOVO DI SICILIA (PA)",
"C420":"CEFALÀ DIANA (PA)",
"C421":"CEFALÙ (PA)",
"C496":"CERDA (PA)",
"C654":"CHIUSA SCLAFANI (PA)",
"C696":"CIMINNA (PA)",
"C708":"CINISI (PA)",
"C871":"COLLESANO (PA)",
"C968":"CONTESSA ENTELLINA (PA)",
"D009":"CORLEONE (PA)",
"D567":"FICARAZZI (PA)",
"D907":"GANGI (PA)",
"D977":"GERACI SICULO (PA)",
"E013":"GIARDINELLO (PA)",
"E055":"GIULIANA (PA)",
"E074":"GODRANO (PA)",
"E149":"GRATTERI (PA)",
"E337":"ISNELLO (PA)",
"E350":"ISOLA DELLE FEMMINE (PA)",
"E459":"LASCARI (PA)",
"E541":"LERCARA FRIDDI (PA)",
"E957":"MARINEO (PA)",
"F184":"MEZZOJUSO (PA)",
"F246":"MISILMERI (PA)",
"F377":"MONREALE (PA)",
"F544":"MONTELEPRE (PA)",
"F553":"MONTEMAGGIORE BELSITO (PA)",
"G263":"PALAZZO ADRIANO (PA)",
"G273":"PALERMO (PA)",
"G348":"PARTINICO (PA)",
"G510":"PETRALIA SOPRANA (PA)",
"G511":"PETRALIA SOTTANA (PA)",
"G543":"PIANA DEGLI ALBANESI (PA)",
"G792":"POLIZZI GENEROSA (PA)",
"G797":"POLLINA (PA)",
"H070":"PRIZZI (PA)",
"H422":"ROCCAMENA (PA)",
"H428":"ROCCAPALUMBA (PA)",
"H797":"SAN CIPIRELLO (PA)",
"H933":"SAN GIUSEPPE JATO (PA)",
"I028":"<NAME> (PA)",
"I174":"SANTA CRIST<NAME>ELA (PA)",
"I188":"SANTA FLAVIA (PA)",
"I534":"SCIARA (PA)",
"I541":"SCL<NAME> (PA)",
"L112":"TERMINI IMERESE (PA)",
"L131":"TERRASINI (PA)",
"L282":"TORRETTA (PA)",
"L317":"TRABIA (PA)",
"L332":"TRAPPETO (PA)",
"L519":"USTICA (PA)",
"L603":"VALLEDOLMO (PA)",
"L740":"VENTIMIGLIA DI SICILIA (PA)",
"L837":"VICARI (PA)",
"L916":"VILLABATE (PA)",
"L951":"VILLAFRATI (PA)",
"I538":"SCILLATO (PA)",
"M268":"BLUFI (PA)",
"A177":"<NAME> (ME)",
"A194":"ALÌ (ME)",
"A201":"ALÌ TERME (ME)",
"A313":"ANTILLO (ME)",
"A638":"BARCELLONA POZZO DI GOTTO (ME)",
"A698":"BASICÒ (ME)",
"B198":"BROLO (ME)",
"B660":"CAPIZZI (ME)",
"B666":"<NAME>'ORLANDO (ME)",
"B695":"<NAME> (ME)",
"B804":"CARONIA (ME)",
"B918":"<NAME> (ME)",
"C094":"<NAME> (ME)",
"C051":"CASTELL'UMBERTO (ME)",
"C210":"CASTELMOLA (ME)",
"C347":"CASTROREALE (ME)",
"C568":"CESARÒ (ME)",
"C956":"CONDRÒ (ME)",
"D474":"FALCONE (ME)",
"D569":"FICARRA (ME)",
"D622":"FIUMEDINISI (ME)",
"D635":"FLORESTA (ME)",
"D661":"FONDACHELLI-FANTINA (ME)",
"D733":"FORZA D'AGRÒ (ME)",
"D765":"FRANCAVILLA DI SICILIA (ME)",
"D793":"FRAZZANÒ (ME)",
"D824":"FURCI SICULO (ME)",
"D825":"FURNARI (ME)",
"D844":"GAGGI (ME)",
"D861":"<NAME> (ME)",
"D885":"GALLODORO (ME)",
"E014":"GIARDINI-NAXOS (ME)",
"E043":"GIOIOSA MAREA (ME)",
"E142":"GRANITI (ME)",
"E233":"GUALTIERI SICAMINÒ (ME)",
"E374":"ITALA (ME)",
"E523":"LENI (ME)",
"E555":"LETOJANNI (ME)",
"E571":"LIBRIZZI (ME)",
"E594":"LIMINA (ME)",
"E606":"LIPARI (ME)",
"E674":"LONGI (ME)",
"E855":"MALFA (ME)",
"E869":"MALVAGNA (ME)",
"E876":"MANDANICI (ME)",
"F066":"MA<NAME> (ME)",
"F147":"MERÌ (ME)",
"F158":"MESSINA (ME)",
"F206":"MILAZZO (ME)",
"F210":"MILITELLO ROSMARINO (ME)",
"F242":"MIRTO (ME)",
"F251":"MISTRETTA (ME)",
"F277":"<NAME> (ME)",
"F359":"MONFORTE SAN GIORGIO (ME)",
"F368":"MONGIUFFI MELIA (ME)",
"F395":"MONTAGNAREALE (ME)",
"F400":"MONTALBANO ELICONA (ME)",
"F772":"MOTTA CAMASTRA (ME)",
"F773":"MOTTA D'AFFERMO (ME)",
"F848":"NASO (ME)",
"F901":"NIZZA DI SICILIA (ME)",
"F951":"NOVARA DI SICILIA (ME)",
"G036":"OLIVERI (ME)",
"G209":"PACE DEL MELA (ME)",
"G234":"PAGLIARA (ME)",
"G377":"PATTI (ME)",
"G522":"PETTINEO (ME)",
"G699":"PIRAINO (ME)",
"H151":"RACCUJA (ME)",
"H228":"REITANO (ME)",
"H405":"ROCCAFIORITA (ME)",
"H418":"ROCCALUMERA (ME)",
"H380":"ROCCAVALDINA (ME)",
"H455":"ROCCELLA VALDEMONE (ME)",
"H479":"RODÌ MILICI (ME)",
"H519":"ROMETTA (ME)",
"H842":"SAN FILIPPO DEL MELA (ME)",
"H850":"SAN FRATELLO (ME)",
"H982":"<NAME> (ME)",
"I084":"<NAME> (ME)",
"I086":"<NAME>TI (ME)",
"I147":"SAN SALVATORE DI FITALIA (ME)",
"I184":"SANTA DOMENICA VITTORIA (ME)",
"I199":"SANT'AGATA DI MILITELLO (ME)",
"I215":"SANT'ALESSIO SICULO (ME)",
"I220":"<NAME> (ME)",
"I254":"<NAME> (ME)",
"I283":"SANT'<NAME> (ME)",
"I311":"SANT<NAME> DI RIVA (ME)",
"I328":"SAN TEODORO (ME)",
"I370":"SAN<NAME> DI CAMASTRA (ME)",
"I420":"SAPONARA (ME)",
"I477":"SAVOCA (ME)",
"I492":"SCALETTA ZANCLEA (ME)",
"I747":"SINAGRA (ME)",
"I881":"SPADAFORA (ME)",
"L042":"TAORMINA (ME)",
"L271":"TORREGROTTA (ME)",
"L308":"TORTORICI (ME)",
"L431":"TRIPI (ME)",
"L478":"TUSA (ME)",
"L482":"UCRIA (ME)",
"L561":"VALDINA (ME)",
"L735":"VENETICO (ME)",
"L950":"VILLAFRANCA TIRRENA (ME)",
"M210":"TERME VIGLIATORE (ME)",
"M211":"ACQUEDOLCI (ME)",
"M286":"TORRENOVA (ME)",
"A089":"AGRIGENTO (AG)",
"A181":"AL<NAME> (AG)",
"A351":"ARAGONA (AG)",
"A896":"BIVONA (AG)",
"B275":"BURGIO (AG)",
"B377":"CALAMONACI (AG)",
"B427":"CALTABELLOTTA (AG)",
"B460":"CAMASTRA (AG)",
"B486":"CAMMARATA (AG)",
"B520":"CAMPOBELLO DI LICATA (AG)",
"B602":"CANICATTÌ (AG)",
"C275":"CASTELTERMINI (AG)",
"C341":"CASTROFILIPPO (AG)",
"C356":"CATTOLICA ERACLEA (AG)",
"C668":"CIANCIANA (AG)",
"C928":"COMITINI (AG)",
"D514":"FAVARA (AG)",
"E209":"GROTTE (AG)",
"E390":"J<NAME> (AG)",
"E431":"LAMPEDUSA E LINOSA (AG)",
"E573":"LICATA (AG)",
"E714":"LUCCA SICULA (AG)",
"F126":"MENFI (AG)",
"F414":"MONTALLEGRO (AG)",
"F655":"MONTEVAGO (AG)",
"F845":"NARO (AG)",
"G282":"PALMA DI MONTECHIARO (AG)",
"F299":"PORTO EMPEDOCLE (AG)",
"H148":"RACALMUTO (AG)",
"H159":"RAFFADALI (AG)",
"H194":"RAVANUSA (AG)",
"H205":"REALMONTE (AG)",
"H269":"RIBERA (AG)",
"H743":"SAMBUCA DI SICILIA (AG)",
"H778":"SAN BIAGIO PLATANI (AG)",
"H914":"SAN <NAME> (AG)",
"I185":"S<NAME> (AG)",
"I224":"<NAME> (AG)",
"I290":"<NAME> (AG)",
"I356":"SAN<NAME> (AG)",
"I533":"SCIACCA (AG)",
"I723":"SICULIANA (AG)",
"L944":"VILLAFRANCA SICULA (AG)",
"A049":"ACQUAVIVA PLATANI (CL)",
"A957":"BOMPENSIERE (CL)",
"B302":"BUTERA (CL)",
"B429":"CALTANISSETTA (CL)",
"B537":"CAMPOFRANCO (CL)",
"D267":"DELIA (CL)",
"D960":"GELA (CL)",
"E953":"MARIANOPOLI (CL)",
"F065":"MAZZARINO (CL)",
"E618":"MILENA (CL)",
"F489":"MONTEDORO (CL)",
"F830":"MUSSOMELI (CL)",
"F899":"NISCEMI (CL)",
"H245":"RESUTTANO (CL)",
"H281":"RIESI (CL)",
"H792":"SAN CATALDO (CL)",
"I169":"SANTA CATERINA VILLARMOSA (CL)",
"I644":"SERRADIFALCO (CL)",
"I824":"SOMMATINO (CL)",
"L016":"SUTERA (CL)",
"L609":"VALLELUNGA PRATAMENO (CL)",
"L959":"VILLALBA (CL)",
"A070":"AGIRA (EN)",
"A098":"AIDONE (EN)",
"A478":"ASSORO (EN)",
"A676":"BARRAFRANCA (EN)",
"B381":"CALASCIBETTA (EN)",
"C353":"CATENANUOVA (EN)",
"C471":"CENTURIPE (EN)",
"C480":"CERAMI (EN)",
"C342":"ENNA (EN)",
"D849":"<NAME> (EN)",
"E536":"LEONFORTE (EN)",
"F892":"NICOSIA (EN)",
"F900":"NISSORIA (EN)",
"G580":"<NAME> (EN)",
"G624":"PIETRAPERZIA (EN)",
"H221":"REGALBUTO (EN)",
"I891":"SPERLINGA (EN)",
"L448":"TROINA (EN)",
"L583":"<NAME> (EN)",
"M011":"VILLAROSA (EN)",
"A025":"AC<NAME> (CT)",
"A026":"ACI CASTELLO (CT)",
"A027":"ACI CATENA (CT)",
"A028":"ACIREALE (CT)",
"A029":"ACI SANT'ANTONIO (CT)",
"A056":"ADRANO (CT)",
"A766":"BELPASSO (CT)",
"A841":"BIANCAVILLA (CT)",
"B202":"BRONTE (CT)",
"B384":"CALATABIANO (CT)",
"B428":"CALTAGIRONE (CT)",
"B561":"CAMPOROTONDO ETNEO (CT)",
"C091":"CASTEL DI IUDICA (CT)",
"C297":"CASTIGLIONE DI SICILIA (CT)",
"C351":"CATANIA (CT)",
"D623":"FIUMEFREDDO DI SICILIA (CT)",
"E017":"GIARRE (CT)",
"E133":"GRAMMICHELE (CT)",
"E156":"GRAVINA DI CATANIA (CT)",
"E578":"LICODIA EUBEA (CT)",
"E602":"LINGUAGLOSSA (CT)",
"E854":"MALETTO (CT)",
"F004":"MASCALI (CT)",
"F005":"MASCALUCIA (CT)",
"F209":"MILITELLO IN VAL DI CATANIA (CT)",
"F214":"MILO (CT)",
"F217":"MINEO (CT)",
"F231":"MIRABELLA IMBACCARI (CT)",
"F250":"MISTERBIANCO (CT)",
"F781":"MOTTA SANT'ANASTASIA (CT)",
"F890":"NICOLOSI (CT)",
"G253":"PALAGONIA (CT)",
"G371":"PATERNÒ (CT)",
"G402":"PEDARA (CT)",
"G597":"PIEDIMONTE ETNEO (CT)",
"H154":"RADDUSA (CT)",
"H168":"RAMACCA (CT)",
"H175":"RANDAZZO (CT)",
"H325":"RIPOSTO (CT)",
"H805":"SAN CONO (CT)",
"H922":"SAN GIOVANNI LA PUNTA (CT)",
"H940":"SAN GREGORIO DI CATANIA (CT)",
"I035":"SAN MICHELE DI GANZARIA (CT)",
"I098":"SAN PIETRO CLARENZA (CT)",
"I202":"SANT'AGATA LI BATTIATI (CT)",
"I216":"SANT'ALFIO (CT)",
"I240":"SANTA MARIA DI LICODIA (CT)",
"I314":"SANTA VENERINA (CT)",
"I548":"SCORDIA (CT)",
"L355":"TRECASTAGNI (CT)",
"L369":"TREMESTIERI ETNEO (CT)",
"L659":"VALVERDE (CT)",
"L828":"VIAGRANDE (CT)",
"M100":"VIZZINI (CT)",
"M139":"ZAFFERANA ETNEA (CT)",
"M271":"MAZZARRONE (CT)",
"M283":"MANIACE (CT)",
"M287":"RAGALNA (CT)",
"A014":"ACATE (RG)",
"C612":"CHIARAM<NAME> (RG)",
"C927":"COMISO (RG)",
"E016":"GIARRATANA (RG)",
"E366":"ISPICA (RG)",
"F258":"MODICA (RG)",
"F610":"MONTEROSSO ALMO (RG)",
"G953":"POZZALLO (RG)",
"H163":"RAGUSA (RG)",
"I178":"SANTA CROCE CAMERINA (RG)",
"I535":"SCICLI (RG)",
"M088":"VITTORIA (RG)",
"A494":"AUGUSTA (SR)",
"A522":"AVOLA (SR)",
"B237":"BUCCHERI (SR)",
"B287":"BUSCEMI (SR)",
"B603":"CANICATTINI BAGNI (SR)",
"B787":"CARLENTINI (SR)",
"C006":"CASSARO (SR)",
"D540":"FERLA (SR)",
"D636":"FLORIDIA (SR)",
"D768":"FRANCOFONTE (SR)",
"E532":"LENTINI (SR)",
"F107":"MELILLI (SR)",
"F943":"NOTO (SR)",
"G211":"PACHINO (SR)",
"G267":"PALAZZOLO ACREIDE (SR)",
"H574":"ROSOLINI (SR)",
"I754":"SIRACUSA (SR)",
"I785":"SOLARINO (SR)",
"I864":"SORTINO (SR)",
"M257":"PORTOPALO DI CAPO PASSERO (SR)",
"M279":"PRIOLO GARGALLO (SR)",
"A069":"AGGIUS (SS)",
"A115":"ALÀ DEI SARDI (SS)",
"A192":"ALGHERO (SS)",
"A287":"ANELA (SS)",
"A379":"ARDARA (SS)",
"A453":"ARZACHENA (SS)",
"A606":"BANARI (SS)",
"A781":"BENETUTTI (SS)",
"A789":"BERCHIDDA (SS)",
"A827":"BESSUDE (SS)",
"A976":"BONNANARO (SS)",
"A977":"BONO (SS)",
"A978":"BONORVA (SS)",
"B063":"BORTIGIADAS (SS)",
"B064":"BORUTTA (SS)",
"B094":"BOTTIDDA (SS)",
"B246":"BUDDUSÒ (SS)",
"B264":"BULTEI (SS)",
"B265":"BULZI (SS)",
"B276":"BURGOS (SS)",
"B378":"CALANGIANUS (SS)",
"B772":"CARGEGHE (SS)",
"C272":"CASTELSARDO (SS)",
"C600":"CHEREMULE (SS)",
"C613":"CHIARAMONTI (SS)",
"C818":"CODRONGIANOS (SS)",
"D100":"COSSOINE (SS)",
"D441":"ESPORLATU (SS)",
"D637":"FLORINAS (SS)",
"E019":"GIAVE (SS)",
"E285":"ILLORAI (SS)",
"E376":"ITTIREDDU (SS)",
"E377":"ITTIRI (SS)",
"E401":"LAERRU (SS)",
"E425":"LA MADDALENA (SS)",
"E747":"LUOGOSANTO (SS)",
"E752":"LURAS (SS)",
"E902":"MARA (SS)",
"E992":"MARTIS (SS)",
"F542":"MON<NAME> DORIA (SS)",
"F667":"MONTI (SS)",
"F721":"MORES (SS)",
"F818":"MUROS (SS)",
"F975":"NUGHEDU SAN NICOLÒ (SS)",
"F976":"NULE (SS)",
"F977":"NULVI (SS)",
"G015":"OLBIA (SS)",
"G046":"OLMEDO (SS)",
"G153":"OSCHIRI (SS)",
"G156":"OSILO (SS)",
"G178":"OSSI (SS)",
"G203":"OZIERI (SS)",
"G225":"PADRIA (SS)",
"G258":"PALAU (SS)",
"G376":"PATTADA (SS)",
"G450":"PERFUGAS (SS)",
"G740":"PLOAGHE (SS)",
"G924":"PORTO TORRES (SS)",
"G962":"POZZOMAGGIORE (SS)",
"H095":"PUTIFIGARI (SS)",
"H507":"ROMANA (SS)",
"H848":"AGLIENTU (SS)",
"I312":"SANTA TERESA GALLURA (SS)",
"I452":"SASSARI (SS)",
"I565":"SEDINI (SS)",
"I598":"SEMESTENE (SS)",
"I614":"SENNORI (SS)",
"I732":"SILIGO (SS)",
"I863":"SORSO (SS)",
"L093":"TEMPIO PAUSANIA (SS)",
"L158":"THIESI (SS)",
"L180":"TISSI (SS)",
"L235":"TORRALBA (SS)",
"L428":"TRINITÀ D'AGULTU E VIGNOLA (SS)",
"L464":"TULA (SS)",
"L503":"URI (SS)",
"L509":"USINI (SS)",
"L989":"VILLANOVA MONTELEONE (SS)",
"L604":"VALLEDORIA (SS)",
"L088":"TELTI (SS)",
"M214":"BADESI (SS)",
"M259":"VIDDALBA (SS)",
"M274":"<NAME> (SS)",
"M275":"LOIRI PORTO SAN PAOLO (SS)",
"M276":"<NAME> (SS)",
"M282":"TERGU (SS)",
"M284":"SANTA M<NAME> (SS)",
"M292":"ERULA (SS)",
"M290":"STINTINO (SS)",
"M301":"PADRU (SS)",
"B248":"BUDONI (SS)",
"I329":"SAN TEODORO (SS)",
"A407":"ARITZO (NU)",
"A454":"ARZANA (NU)",
"A492":"ATZARA (NU)",
"A503":"AUSTIS (NU)",
"A663":"<NAME> (NU)",
"A722":"BAUNEI (NU)",
"A776":"BELVÌ (NU)",
"A880":"BIRORI (NU)",
"A895":"BITTI (NU)",
"A948":"BOLOTANA (NU)",
"B056":"BORORE (NU)",
"B062":"BORTIGALI (NU)",
"D287":"DESULO (NU)",
"D345":"DORGALI (NU)",
"D376":"DUALCHI (NU)",
"D395":"ELINI (NU)",
"D665":"FONNI (NU)",
"D842":"GADONI (NU)",
"D859":"GAIRO (NU)",
"D888":"GALTELLÌ (NU)",
"D947":"GAVOI (NU)",
"E049":"GIRASOLE (NU)",
"E283":"ILBONO (NU)",
"E323":"IRGOLI (NU)",
"E387":"JERZU (NU)",
"E441":"LANUSEI (NU)",
"E517":"LEI (NU)",
"E644":"LOCERI (NU)",
"E646":"LOCULI (NU)",
"E647":"LODÈ (NU)",
"E700":"LOTZORAI (NU)",
"E736":"LULA (NU)",
"E788":"MACOMER (NU)",
"E874":"MAMOIADA (NU)",
"F073":"ME<NAME> (NU)",
"F933":"NORAGUGUME (NU)",
"F979":"NUORO (NU)",
"G031":"OLIENA (NU)",
"G044":"OLLOLAI (NU)",
"G058":"OLZAI (NU)",
"G064":"ONANÌ (NU)",
"G070":"ONIFAI (NU)",
"G071":"ONIFERI (NU)",
"G084":"ORANI (NU)",
"G097":"ORGOSOLO (NU)",
"G119":"OROSEI (NU)",
"G120":"OROTELLI (NU)",
"G146":"ORTUERI (NU)",
"G147":"ORUNE (NU)",
"G154":"OSIDDA (NU)",
"G158":"OSINI (NU)",
"G191":"OTTANA (NU)",
"G201":"OVODDA (NU)",
"G445":"PERDASDEFOGU (NU)",
"G929":"POSADA (NU)",
"I448":"SARULE (NU)",
"I730":"SILANUS (NU)",
"I748":"SINDIA (NU)",
"I751":"SINISCOLA (NU)",
"I851":"SORGONO (NU)",
"L036":"TALANA (NU)",
"L140":"TERTENIA (NU)",
"L153":"TETI (NU)",
"L160":"TIANA (NU)",
"L202":"TONARA (NU)",
"L231":"TORPÈ (NU)",
"A355":"TORTOLÌ (NU)",
"L423":"TRIEI (NU)",
"L489":"ULASSAI (NU)",
"L506":"URZULEI (NU)",
"L514":"USSASSAI (NU)",
"L953":"VILLAGRANDE STRISAILI (NU)",
"M285":"CARDEDU (NU)",
"E649":"LODINE (NU)",
"A474":"ASSEMINI (CA)",
"B354":"CAGLIARI (CA)",
"B675":"CAPOTERRA (CA)",
"D259":"DECIMOMANNU (CA)",
"E903":"MARACALAGONIS (CA)",
"H088":"PULA (CA)",
"H118":"QUARTU SANT'ELENA (CA)",
"I443":"SARROCH (CA)",
"I580":"SELARGIUS (CA)",
"I695":"SESTU (CA)",
"I699":"SETTIMO SAN PIETRO (CA)",
"I752":"SINNAI (CA)",
"L521":"UTA (CA)",
"I118":"VILLA SAN PIETRO (CA)",
"H119":"QUARTUCCIU (CA)",
"D399":"ELMAS (CA)",
"F383":"MONSERRATO (CA)",
"A007":"ABBASANTA (OR)",
"A097":"AIDOMAGGIORE (OR)",
"A126":"ALBAGIARA (OR)",
"A180":"ALES (OR)",
"A204":"ALLAI (OR)",
"A357":"ARBOREA (OR)",
"A380":"ARDAULI (OR)",
"A477":"ASSOLO (OR)",
"A480":"ASUNI (OR)",
"A614":"BARADILI (OR)",
"A621":"BARATILI SAN PIETRO (OR)",
"A655":"BARESSA (OR)",
"A721":"BAULADU (OR)",
"A856":"BIDONÌ (OR)",
"A960":"BONARCADO (OR)",
"B055":"BORONEDDU (OR)",
"B281":"BUSACHI (OR)",
"B314":"CABRAS (OR)",
"D200":"CUGLIERI (OR)",
"D695":"FORDONGIANUS (OR)",
"E004":"GHILARZA (OR)",
"E087":"GONNOSCODINA (OR)",
"D585":"GONNOSNÒ (OR)",
"E088":"GONNOSTRAMATZA (OR)",
"E972":"MARRUBIU (OR)",
"F050":"MASULLAS (OR)",
"F208":"MILIS (OR)",
"F270":"MOGORELLA (OR)",
"F272":"MOGORO (OR)",
"F727":"MORGONGIORI (OR)",
"F840":"NARBOLIA (OR)",
"F867":"NEONELI (OR)",
"F934":"NORBELLO (OR)",
"F974":"NUGHEDU SANTA VITTORIA (OR)",
"F980":"NURACHI (OR)",
"F985":"NURECI (OR)",
"G043":"OLLASTRA (OR)",
"G113":"ORISTANO (OR)",
"G286":"PALMAS ARBOREA (OR)",
"G379":"PAU (OR)",
"G384":"PAULILATINO (OR)",
"G817":"POMPU (OR)",
"H301":"<NAME> (OR)",
"F271":"RUINAS (OR)",
"H756":"SAMUGHEO (OR)",
"A368":"SAN NICOLÒ D'ARCIDANO (OR)",
"I205":"S<NAME> (OR)",
"I298":"<NAME> (OR)",
"I374":"SANTU LUSSURGIU (OR)",
"I384":"SAN VERO MILIS (OR)",
"I503":"SCANO DI MONTIFERRO (OR)",
"I564":"SEDILO (OR)",
"I605":"SENEGHE (OR)",
"I609":"SENIS (OR)",
"I613":"SENNARIOLO (OR)",
"I717":"SIAMAGGIORE (OR)",
"I718":"SIAMANNA (OR)",
"I742":"SIMALA (OR)",
"I743":"SIMAXIS (OR)",
"I749":"SINI (OR)",
"I757":"SIRIS (OR)",
"I791":"SOLARUSSA (OR)",
"I861":"SORRADILE (OR)",
"L023":"TADASUNI (OR)",
"L122":"TERRALBA (OR)",
"L321":"TRAMATZA (OR)",
"L393":"TRESNURAGHES (OR)",
"L488":"ULÀ TIRSO (OR)",
"L496":"URAS (OR)",
"L508":"USELLUS (OR)",
"L991":"VILLANOVA TRUSCHEDU (OR)",
"M030":"VILLAURBANA (OR)",
"A609":"VILLA VERDE (OR)",
"M153":"ZEDDIANI (OR)",
"M168":"ZERFALIU (OR)",
"I721":"SIAPICCIA (OR)",
"D214":"CURCURIS (OR)",
"I778":"SODDÌ (OR)",
"B068":"BOSA (OR)",
"D640":"FLUSSIO (OR)",
"E400":"LACONI (OR)",
"E825":"MAGOMADAS (OR)",
"F261":"MODOLO (OR)",
"F698":"MONTRESTA (OR)",
"H661":"SAGAMA (OR)",
"L006":"SUNI (OR)",
"L172":"TINNURA (OR)",
"A359":"ARBUS (CA)",
"A419":"ARMUNGIA (CA)",
"B745":"CARBONIA (SU)",
"E281":"IGLESIAS (SU)",
"I294":"SANT'ANTIOCO (SU)",
"D334":"DOMUSNOVAS (SU)",
"B789":"CARLOFORTE (SU)",
"G287":"SAN GIOVANNI SUERGIU (SU)",
"G922":"PORTOSCUSO (SU)",
"E086":"GONNESA (SU)",
"L968":"VILLAMASSARGIA (SU)",
"I182":"SANTADI (SU)",
"F841":"NARCAO (SU)",
"B383":"CALASETTA (SU)",
"D639":"FLUMINIMAGGIORE (SU)",
"M209":"<NAME> (SU)",
"E022":"GIBA (SU)",
"F991":"NUXIS (SU)",
"F822":"MUSEI (SU)",
"G446":"PERDAXIUS (SU)",
"M270":"MASAINAS (SU)",
"M278":"VILLAPERUCCIO (SU)",
"B250":"BUGGERRU (SU)",
"L337":"TRATALIAS (SU)",
"M291":"PISCINAS (SU)",
"Z200":"AFGHANISTAN (EE)",
"Z100":"ALBANIA (EE)",
"Z301":"ALGERIA (EE)",
"Z101":"ANDORRA (EE)",
"Z302":"ANGOLA (EE)",
"Z529":"ANGUILLA (EE)",
"Z532":"ANTIGUA E BARBUDA (EE)",
"Z501":"ANTILLE OLANDESI (EE)",
"Z203":"ARABIA SAUDITA (EE)",
"Z600":"ARGENTINA (EE)",
"Z137":"ARMENIA (EE)",
"Z700":"AUSTRALIA (EE)",
"Z102":"AUSTRIA (EE)",
"Z141":"AZERBAIGIAN (EE)",
"Z502":"BAHAMAS (EE)",
"Z204":"BAHRAIN (EE)",
"Z249":"BANGLADESH (EE)",
"Z522":"BARBADOS (EE)",
"Z103":"BELGIO (EE)",
"Z512":"BELIZE (EE)",
"Z314":"BENIN (EE)",
"Z400":"BERMUDA (EE)",
"Z205":"BHUTAN (EE)",
"Z139":"BIELORUSSIA (EE)",
"Z206":"BIRMANIA (EE)",
"Z601":"BOLIVIA (EE)",
"Z153":"BOSNIA ED ERZEGOVINA (EE)",
"Z358":"BOTSWANA (EE)",
"Z602":"BRASILE (EE)",
"Z207":"BRUNEI (EE)",
"Z104":"BULGARIA (EE)",
"Z354":"BURKINA FASO (EE)",
"Z305":"BURUNDI (EE)",
"Z208":"CAMBOGIA (EE)",
"Z306":"CAMERUN (EE)",
"Z401":"CANADA (EE)",
"Z307":"CAPO VERDE (EE)",
"Z309":"CIAD (EE)",
"Z603":"CILE (EE)",
"Z210":"CINA (EE)",
"Z211":"CIPRO (EE)",
"Z106":"CITTÀ DEL VATICANO (EE)",
"Z604":"COLOMBIA (EE)",
"Z310":"COMORE (EE)",
"Z214":"COREA DEL NORD (EE)",
"Z213":"COREA DEL SUD (EE)",
"Z313":"COSTA D'AVORIO (EE)",
"Z503":"COSTA RICA (EE)",
"Z149":"CROAZIA (EE)",
"Z504":"CUBA (EE)",
"Z107":"DANIMARCA (EE)",
"Z526":"DOMINICA (EE)",
"Z605":"ECUADOR (EE)",
"Z336":"EGITTO (EE)",
"Z506":"EL SALVADOR (EE)",
"Z215":"EM<NAME> (EE)",
"Z368":"ERITREA (EE)",
"Z144":"ESTONIA (EE)",
"Z315":"ETIOPIA (EE)",
"Z108":"FÆ<NAME> (EE)",
"Z704":"FIGI (EE)",
"Z216":"FILIPPINE (EE)",
"Z109":"FINLANDIA (EE)",
"Z110":"FRANCIA (EE)",
"Z316":"GABON (EE)",
"Z317":"GAMBIA (EE)",
"Z254":"GEORGIA (EE)",
"Z112":"GERMANIA (EE)",
"Z318":"GHANA (EE)",
"Z507":"GIAMAICA (EE)",
"Z219":"GIAPPONE (EE)",
"Z113":"GIBILTERRA (EE)",
"Z361":"GIBUTI (EE)",
"Z220":"GIORDANIA (EE)",
"Z115":"GRECIA (EE)",
"Z524":"GRENADA (EE)",
"Z402":"GROENLANDIA (EE)",
"Z508":"GUADALUPA (EE)",
"Z706":"GUAM (EE)",
"Z509":"GUATEMALA (EE)",
"Z319":"GUINEA (EE)",
"Z321":"GUINEA EQUATORIALE (EE)",
"Z320":"GUINEA-BISSAU (EE)",
"Z606":"GUYANA (EE)",
"Z607":"GUYANA FRANCESE (EE)",
"Z510":"HAITI (EE)",
"Z511":"HONDURAS (EE)",
"Z221":"HONG KONG (EE)",
"Z222":"INDIA (EE)",
"Z223":"INDONESIA (EE)",
"Z224":"IRAN (EE)",
"Z225":"IRAQ (EE)",
"Z116":"IRLANDA (EE)",
"Z117":"ISLANDA (EE)",
"Z530":"ISOLE CAYMAN (EE)",
"Z212":"ISOLE COCOS E KEELING (EE)",
"Z703":"ISOLE COOK (EE)",
"Z702":"ISOLA DEL NATALE (EE)",
"Z609":"ISOLE FALKLAND (EE)",
"Z710":"ISOLE MARIANNE SETTENTRIONALI (EE)",
"Z711":"ISOLE MARSHALL (EE)",
"Z715":"ISOLA NORFOLK (EE)",
"Z722":"ISOLE PITCAIRN (EE)",
"Z724":"ISOLE SALOMONE (EE)",
"Z520":"ISOLE VERGINI AMERICANE (EE)",
"Z521":"ISOLE VERGINI BRITANNICHE (EE)",
"Z226":"ISRAELE (EE)",
"Z255":"KAZAKISTAN (EE)",
"Z322":"KENYA (EE)",
"Z256":"KIRGHIZISTAN (EE)",
"Z731":"KIRIBATI (EE)",
"Z227":"KUWAIT (EE)",
"Z228":"LAOS (EE)",
"Z359":"LESOTHO (EE)",
"Z145":"LETTONIA (EE)",
"Z229":"LIBANO (EE)",
"Z325":"LIBERIA (EE)",
"Z326":"LIBIA (EE)",
"Z119":"LIECHTENSTEIN (EE)",
"Z146":"LITUANIA (EE)",
"Z120":"LUSSEMBURGO (EE)",
"Z231":"MACAO (EE)",
"Z327":"MADAGASCAR (EE)",
"Z328":"MALAWI (EE)",
"Z232":"MALDIVE (EE)",
"Z230":"MALESIA (EE)",
"Z329":"MALI (EE)",
"Z121":"MALTA (EE)",
"Z330":"MAROCCO (EE)",
"Z513":"MARTINICA (EE)",
"Z331":"MAURITANIA (EE)",
"Z332":"MAURITIUS (EE)",
"Z360":"MAYOTTE (EE)",
"Z514":"MESSICO (EE)",
"Z140":"MOLDAVIA (EE)",
"Z233":"MONGOLIA (EE)",
"Z157":"MONTENEGRO (EE)",
"Z531":"MONTSERRAT (EE)",
"Z333":"MOZAMBICO (EE)",
"Z300":"NAMIBIA (EE)",
"Z713":"NAURU (EE)",
"Z234":"NEPAL (EE)",
"Z515":"NICARAGUA (EE)",
"Z334":"NIGER (EE)",
"Z335":"NIGERIA (EE)",
"Z714":"NIUE (EE)",
"Z125":"NORVEGIA (EE)",
"Z716":"NUOVA CALEDONIA (EE)",
"Z719":"NUOVA ZELANDA (EE)",
"Z235":"OMAN (EE)",
"Z126":"PAESI BASSI (EE)",
"Z236":"PAKISTAN (EE)",
"Z734":"PALAU (EE)",
"Z161":"STATO DI PALESTINA (EE)",
"Z516":"PANAMA (EE)",
"Z730":"PAPUA NUOVA GUINEA (EE)",
"Z610":"PARAGUAY (EE)",
"Z611":"PERÙ (EE)",
"Z723":"POLINESIA FRANCESE (EE)",
"Z127":"POLONIA (EE)",
"Z518":"PORTO RICO (EE)",
"Z128":"PORTOGALLO (EE)",
"Z123":"PRINCIPATO DI MONACO (EE)",
"Z237":"QATAR (EE)",
"Z114":"REGNO UNITO (EE)",
"Z156":"REPUBBLICA CECA (EE)",
"Z308":"REPUBBLICA CENTRAFRICANA (EE)",
"Z311":"REPUBBLICA DEL CONGO (EE)",
"Z312":"REPUBBLICA DEMOCRATICA DEL CONGO (EE)",
"Z148":"REPUBBLICA DI MACEDONIA (EE)",
"Z505":"REPUBBLICA DOMINICANA (EE)",
"Z324":"RÉUNION (EE)",
"Z129":"ROMANIA (EE)",
"Z338":"RUANDA (EE)",
"Z154":"RUSSIA (EE)",
"Z533":"SAINT KITTS E NEVIS (EE)",
"Z528":"SAINT VINCENT E GRENADINE (EE)",
"Z403":"SAINT-PIERRE E MIQUELON (EE)",
"Z726":"SAMOA (EE)",
"Z725":"SAMOA AMERICANE (EE)",
"Z130":"SAN MARINO (EE)",
"Z527":"SANTA LUCIA (EE)",
"Z340":"SANT'ELENA, ASCENSIONE E TRISTAN DA CUNHA (EE)",
"Z341":"SÃO TOMÉ E PRÍNCIPE (EE)",
"Z343":"SENEGAL (EE)",
"Z158":"SERBIA (EE)",
"Z342":"SEYCHELLES (EE)",
"Z344":"SIERRA LEONE (EE)",
"Z248":"SINGAPORE (EE)",
"Z240":"SIRIA (EE)",
"Z155":"SLOVACCHIA (EE)",
"Z150":"SLOVENIA (EE)",
"Z345":"SOMALIA (EE)",
"Z131":"SPAGNA (EE)",
"Z209":"SRI LANKA (EE)",
"Z701":"STATI FEDERATI DI MICRONESIA (EE)",
"Z404":"STATI UNITI D'AMERICA (EE)",
"Z347":"SUDAFRICA (EE)",
"Z348":"SUDAN (EE)",
"Z907":"SUDAN DEL SUD (EE)",
"Z608":"SURINAME (EE)",
"Z132":"SVEZIA (EE)",
"Z133":"SVIZZERA (EE)",
"Z349":"SWAZILAND (EE)",
"Z147":"TAGIKISTAN (EE)",
"Z217":"TAIWAN (EE)",
"Z357":"TANZANIA (EE)",
"Z241":"THAILANDIA (EE)",
"Z242":"TIMOR EST (EE)",
"Z351":"TOGO (EE)",
"Z727":"TOKELAU (EE)",
"Z728":"TONGA (EE)",
"Z612":"TRINIDAD E TOBAGO (EE)",
"Z352":"TUNISIA (EE)",
"Z243":"TURCHIA (EE)",
"Z258":"TURKMENISTAN (EE)",
"Z519":"TURKS E CAICOS (EE)",
"Z732":"TUVALU (EE)",
"Z138":"UCRAINA (EE)",
"Z353":"UGANDA (EE)",
"Z134":"UNGHERIA (EE)",
"Z613":"URUGUAY (EE)",
"Z143":"UZBEKISTAN (EE)",
"Z733":"VANUATU (EE)",
"Z614":"VENEZUELA (EE)",
"Z244":"VIETNAM (EE)",
"Z729":"WALLIS E FUTUNA (EE)",
"Z246":"YEMEN (EE)",
"Z355":"ZAMBIA (EE)",
"Z337":"ZIMBABWE (EE)"
};<file_sep>## First node.js Server Application
This is my first web-application made with *Node.js* <br>
To run this project, you need to install *Nodejs and npm (Node Package Manager)* <br>
### Linux Usage
To install Node you can use NVM (**Node Version Manager**) that permit to install multiple versions of Node and Npm on your machine
```bash
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
$ nvm install node
$ nvm use node
$ npm install
$ npm start # or npm run start-express
```
### Windows usage
To install Node.js and NPM on your Windows machine, you can go to https://nodejs.org/it and download the exe file to install this package.
After, you can open an cmd.exe and install all dependencies
```bash
> npm install body-parser express jade --save
> npm start # or npm run start-express
```
|
55d7f9b7e09d8ed91d67dca78ebda3e44edadf9c
|
[
"JavaScript",
"Markdown"
] | 4
|
JavaScript
|
vscalcione/nodejs-server
|
6ba9cefaf1ef9436c887de5ba3f892562f66460a
|
e654be000bf651d2ca337fb3cffe63fae08185af
|
refs/heads/master
|
<repo_name>iakov/api-extraction<file_sep>/Roslyn_Extract_Methods/MethodsCollector.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Win32;
using Octokit;
namespace Roslyn_Extract_Methods {
internal class MethodsCollector : CSharpSyntaxWalker {
public List<MethodDeclarationSyntax> MethodDecls { get; } = new List<MethodDeclarationSyntax>();
public override void VisitMethodDeclaration(MethodDeclarationSyntax node) {
// var syntaxTokenList = node.Modifiers;
// if (!syntaxTokenList.Select(t => t.Text.Equals("public")).Any()) return;
if (node.HasLeadingTrivia && node.HasStructuredTrivia && (node.Body != null)) MethodDecls.Add(node);
}
}
}<file_sep>/Roslyn_Extract_Methods/CommentExtractor.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn_Extract_Methods {
static class CommentExtractor {
public static Dictionary<MethodDeclarationSyntax, string> ExtractSummaryComments(
List<MethodDeclarationSyntax> methodDeclarations) {
Dictionary<MethodDeclarationSyntax, string> methodComments = new Dictionary<MethodDeclarationSyntax, string>();
foreach (var method in methodDeclarations) {
var xmlTrivia = method.GetLeadingTrivia()
.Select(i => i.GetStructure())
.OfType<DocumentationCommentTriviaSyntax>()
.FirstOrDefault();
if (xmlTrivia == null) continue;
var summary = xmlTrivia.ChildNodes()
.OfType<XmlElementSyntax>()
.FirstOrDefault(i => i.StartTag.Name.ToString().Equals("summary"));
if (summary == null) continue;
var stringComment = summary.Content.ToString();
stringComment = Regex.Replace(stringComment, @"\s+", " ", RegexOptions.Multiline).Replace("///", "").Trim();
stringComment = CleanUpTags(stringComment);
stringComment = RemoveStuffWithinSuchBrackets(stringComment, '(', ')');
stringComment = RemoveStuffWithinSuchBrackets(stringComment, '[', ']');
stringComment = RemoveStuffWithinSuchBrackets(stringComment, '{', '}');
// var sb = new StringBuilder();
// foreach (var xmlNodeSyntax in summary.Content) {
// if (xmlNodeSyntax is XmlElementSyntax) {
// var elementSyntax = (XmlElementSyntax) xmlNodeSyntax;
// var a = elementSyntax.Content;
//
// }
// }
if (stringComment.Length < 3) {
continue;
}
methodComments[method] = stringComment;
}
return methodComments;
}
public static string CleanUpTags(string input) {
int start = input.IndexOf('<');
while (start != -1) {
int end = input.IndexOf('>');
if (end != -1 && start < end) {
var tag = input.Substring(start, end - start + 1);
if (tag.Contains("see cref")) {
var startIndex = tag.IndexOf("cref=\"", StringComparison.Ordinal) + 6;
var lastIndexOf = tag.IndexOf("\"", startIndex, StringComparison.Ordinal);
if (lastIndexOf < startIndex) break;
input = input.Replace(tag, tag.Substring(startIndex, lastIndexOf - startIndex));
} else input = input.Remove(start, end - start + 1);
} else break;
start = input.IndexOf('<');
}
return input;
}
private static string RemoveStuffWithinSuchBrackets(string input, char leftChar, char rightChar) {
int lbracket = input.IndexOf(leftChar);
while (lbracket != -1) {
var rbracket = input.LastIndexOf(rightChar);
if (rbracket != -1 && lbracket < rbracket) {
input = input.Remove(lbracket, rbracket - lbracket + 1);
} else break;
lbracket = input.IndexOf(leftChar);
}
return input;
}
}
}
<file_sep>/DownloadRepositories/Program.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
using System.Text;
using NDesk.Options;
using Newtonsoft.Json;
using Octokit;
using FileMode = System.IO.FileMode;
using ProductHeaderValue = Octokit.ProductHeaderValue;
using Repository = LibGit2Sharp.Repository;
namespace DownloadRepositories {
class Program {
private static string _fileWithUrls = @"D:\DeepApiReps\reps_refactored_new.txt";
private static string _pathForCloning = @"D:\DeepApiReps\";
private static string _pathToSlnFile = @"D:\DeepApiReps\slns.txt";
private static readonly GitHubClient Client = new GitHubClient(new ProductHeaderValue("deep-api#"));
private static readonly string FileProcessedRepsCount = "rep_num.txt";
private static readonly string logFilePath = "exceptions.txt";
static void Main(string[] args) {
var p = new OptionSet() {
{ "urls=", "Path to input file with urls of repos", x => _fileWithUrls = x },
{ "clonepath=", "Path for cloning", x => _pathForCloning = x },
{ "slns=", "Path to output file with paths of .sln files", x => _pathToSlnFile = x },
};
try {
p.Parse(args);
}
catch (OptionException e) {
Console.WriteLine("Error when parsing input arguments");
Console.WriteLine(e.ToString());
return;
}
int toSkipNum;
int skippedCounter = 0;
using (var sr = new StreamReader(FileProcessedRepsCount)) {
toSkipNum = int.Parse(sr.ReadLine() ?? "0");
}
using (var urlFileReader = new StreamReader(_fileWithUrls)) {
var curRepUrlClone = urlFileReader.ReadLine();
var ownerAndNameStr = urlFileReader.ReadLine();
var curRepUrlApi = urlFileReader.ReadLine();
while (curRepUrlClone != null && curRepUrlApi != null) {
if (skippedCounter++ < toSkipNum) {
curRepUrlClone = urlFileReader.ReadLine();
ownerAndNameStr = urlFileReader.ReadLine();
curRepUrlApi = urlFileReader.ReadLine();
continue;
}
try {
var ownerAndName = ownerAndNameStr.Split('/');
var slnFileNames =
from filename in GetFileListOfRep(ownerAndName)
where filename.Contains(".sln")
select filename;
var fileNames = slnFileNames as IList<string> ?? slnFileNames.ToList();
if (fileNames.Any()) {
Console.WriteLine($"Working with {curRepUrlClone}. Contains sln file. Cloning...");
var repPath = _pathForCloning + ownerAndName[0] + "\\" + ownerAndName[1];
CloneRepository(curRepUrlClone, repPath);
var slnFile = File.Open(_pathToSlnFile, FileMode.Append, FileAccess.Write, FileShare.Read);
using (var slnFileWriter = new StreamWriter(slnFile)) {
slnFileWriter.AutoFlush = true;
foreach (var sln in fileNames) {
slnFileWriter.WriteLine(repPath + "\\" + sln);
}
}
}
}
catch (Exception e) when (
e is LibGit2Sharp.LibGit2SharpException ||
e is Octokit.ApiException ||
e is AggregateException) {
Console.WriteLine(e + "\n" + e.StackTrace);
using (var logFile = new StreamWriter(logFilePath, true))
logFile.WriteLine(3 + "\n" + e);
}
finally {
using (var processedRepsFile = new StreamWriter(FileProcessedRepsCount)) {
processedRepsFile.WriteLine(++toSkipNum);
}
}
curRepUrlClone = urlFileReader.ReadLine();
ownerAndNameStr = urlFileReader.ReadLine();
curRepUrlApi = urlFileReader.ReadLine();
}
}
}
private static void CloneRepository(string cloneUrl, string path) {
if (Directory.Exists(path)) return;
Repository.Clone(cloneUrl, path);
}
private static IEnumerable<string> GetFileListOfRep(string[] ownerAndName) {
var docs = Client.Repository.Content.GetAllContents(ownerAndName[0], ownerAndName[1]).Result;
return docs.Select(i => i.Path);
}
}
}
<file_sep>/Roslyn_Extract_Methods/ApiSequenceExtractor.cs
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn_Extract_Methods {
internal class ApiSequenceExtractor : CSharpSyntaxWalker {
private readonly SemanticModel _model;
private string _lastCalledMethod;
public ApiSequenceExtractor(SemanticModel model) {
_model = model;
}
public List<ApiCall> Calls { get; } = new List<ApiCall>();
// public override void VisitVariableDeclarator(VariableDeclaratorSyntax node) {
// var type = model.GetTypeInfo(node.Initializer.Value).Type;
// Calls.Add(ApiCall.ofConstructor(type.Name));
// }
public override void VisitObjectCreationExpression(ObjectCreationExpressionSyntax node) {
try {
var ctorSymbol = _model.GetTypeInfo(node).Type;
if (node.ArgumentList != null) {
foreach (var argumentSyntax in node.ArgumentList.Arguments) {
argumentSyntax.Accept(this);
}
}
Calls.Add(ApiCall.OfConstructor(ctorSymbol.Name));
}
catch (Exception e) {
Console.WriteLine(e.Message);
// node.Accept(this);
// Console.ReadLine();
}
}
public override void VisitInvocationExpression(InvocationExpressionSyntax node) {
foreach (var argumentSyntax in node.ArgumentList.Arguments) {
argumentSyntax.Accept(this);
}
if (node.Expression is IdentifierNameSyntax) {
var methodName = (IdentifierNameSyntax) node.Expression;
var method = _model.GetSymbolInfo(methodName).Symbol;
if (method == null || method.Name.StartsWith("_")) return;
Calls.Add(ApiCall.OfMethodInvocation(method.ContainingType.Name, method.Name));
UpdateLastCalledMethod(method);
}
else node.Expression.Accept(this);
UpdateLastCalledMethod(_model.GetSymbolInfo(node).Symbol);
}
public override void VisitIfStatement(IfStatementSyntax node) {
node.Condition.Accept(this);
node.Statement.Accept(this);
node.Else?.Accept(this);
}
public override void VisitWhileStatement(WhileStatementSyntax node) {
node.Condition.Accept(this);
node.Statement.Accept(this);
}
private void UpdateLastCalledMethod(ISymbol method) {
if (method == null) {
_lastCalledMethod = null;
return;
}
if (method is IMethodSymbol) {
_lastCalledMethod = GetProperTypeName(((IMethodSymbol) method).ReturnType);
return;
}
if (method is IPropertySymbol) {
_lastCalledMethod = GetProperTypeName(((IPropertySymbol) method).Type);
return;
}
if (method is IFieldSymbol) {
_lastCalledMethod = GetProperTypeName(((IFieldSymbol) method).Type);
return;
}
if (method is IEventSymbol) {
_lastCalledMethod = GetProperTypeName(((IEventSymbol) method).Type);
return;
}
if (method is IParameterSymbol) {
_lastCalledMethod = GetProperTypeName(((IParameterSymbol) method).Type);
return;
}
if (method is ILocalSymbol) {
_lastCalledMethod = GetProperTypeName(((ILocalSymbol) method).Type);
return;
}
throw new NotImplementedException("Function called is something unaccounted for.");
}
private string GetProperTypeName(ISymbol type) {
var symbolDisplayFormat = new SymbolDisplayFormat(
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces);
return type.ToDisplayString(symbolDisplayFormat);
}
public override void VisitMemberAccessExpression(MemberAccessExpressionSyntax node) {
var method = _model.GetSymbolInfo(node.Name).Symbol;
if (method == null) return;
//TODO: I don't know if there'a any PROPER way to differentiate between parameterless method call and property access.
if (method.Name.StartsWith("_")) return;
if (node.Expression is IdentifierNameSyntax) {
// The target is a simple identifier, the code being analysed is of the form
// "command.ExecuteReader()" and memberAccess.Expression is the "command"
// node
var variable = (IdentifierNameSyntax) node.Expression;
var variableTypeSymbol = _model.GetTypeInfo(variable).Type;
var variableType = GetProperTypeName(variableTypeSymbol);
if (variableTypeSymbol == null || variableType == null) return; //throw new ArgumentNullException(nameof(method));
Calls.Add(ApiCall.OfMethodInvocation(variableType, method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is InvocationExpressionSyntax) {
// The target is another invocation, the code being analysed is of the form
// "GetCommand().ExecuteReader()" and memberAccess.Expression is the
// "GetCommand()" node
var invocationSyntax = (InvocationExpressionSyntax) node.Expression;
invocationSyntax.Accept(this);
//TODO: DANGER! I assume that the true last called method is stored
if (_lastCalledMethod == null) return;
Calls.Add(ApiCall.OfMethodInvocation(_lastCalledMethod, method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is LiteralExpressionSyntax) {
var literalSyntax = (LiteralExpressionSyntax) node.Expression;
var literalType = _model.GetTypeInfo(literalSyntax).Type;
if (literalType == null) return;
Calls.Add(ApiCall.OfMethodInvocation(GetProperTypeName(literalType), method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is PredefinedTypeSyntax) {
var typeSyntax = (PredefinedTypeSyntax) node.Expression;
var typeName = GetProperTypeName(_model.GetTypeInfo(typeSyntax).Type);
Calls.Add(ApiCall.OfMethodInvocation(typeName, method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is MemberAccessExpressionSyntax) {
var memberSyntax = (MemberAccessExpressionSyntax) node.Expression;
var tryType = _model.GetTypeInfo(memberSyntax);
string type;
if (tryType.Equals(null)) {
memberSyntax.Accept(this);
type = _lastCalledMethod;
}
else type = GetProperTypeName(tryType.Type);
Calls.Add(ApiCall.OfMethodInvocation(type, method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is ObjectCreationExpressionSyntax) {
var objSyntax = (ObjectCreationExpressionSyntax) node.Expression;
var type = _model.GetTypeInfo(objSyntax).Type;
if (type == null) return;
Calls.Add(ApiCall.OfConstructor(GetProperTypeName(type)));
if (node.Name != null) {
Calls.Add(ApiCall.OfMethodInvocation(GetProperTypeName(type), method.Name));
}
objSyntax.ArgumentList?.Accept(this);
objSyntax.Initializer?.Accept(this);
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is InstanceExpressionSyntax) {
var instSyntax = (InstanceExpressionSyntax) node.Expression;
var type = _model.GetTypeInfo(instSyntax).Type;
if (type == null) return;
Calls.Add(ApiCall.OfMethodInvocation(GetProperTypeName(type), method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is ParenthesizedExpressionSyntax) {
var parenSyntax = (ParenthesizedExpressionSyntax) node.Expression;
parenSyntax.Expression.Accept(this);
//TODO: danger with last called method
var type = _lastCalledMethod;
Calls.Add(ApiCall.OfMethodInvocation(type, method.Name));
UpdateLastCalledMethod(method);
return;
}
if (node.Expression is TypeOfExpressionSyntax) {
var typeofSyntax = (TypeOfExpressionSyntax) node.Expression;
var type = _model.GetTypeInfo(typeofSyntax.Type).Type;
if (type == null) return;
Calls.Add(ApiCall.OfMethodInvocation(GetProperTypeName(type), method.Name));
UpdateLastCalledMethod(method);
return;
}
// if (node.Expression is ElementAccessExpressionSyntax) {
// var accessSyntax = (ElementAccessExpressionSyntax)node.Expression;
// var type = _model.GetTypeInfo(accessSyntax.).Type;
// var method = _model.GetSymbolInfo(node.Name).Symbol;
// Calls.Add(ApiCall.OfMethodInvocation(type.Name, method.Name));
// updateLastCalledMethod(method);
// return;
// }
if (node.Expression is ElementAccessExpressionSyntax) return;//not interested.
if (node.Expression is GenericNameSyntax) {
var genericSyntax = (GenericNameSyntax)node.Expression;
var type = _model.GetTypeInfo(genericSyntax).Type;
if (type == null) return;
Calls.Add(ApiCall.OfMethodInvocation(GetProperTypeName(type), method.Name));
UpdateLastCalledMethod(method);
return;
}
Console.WriteLine("Missed something!");
}
}
}<file_sep>/Roslyn_Extract_Methods/ProgramParseSolution.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.MSBuild;
using NDesk.Options;
using Roslyn_Extract_Methods.Properties;
namespace Roslyn_Extract_Methods {
internal class ProgramParseSolution {
public static List<ApiCall> ExtractApiSequence(MethodDeclarationSyntax method, SemanticModel model) {
var extractor = new ApiSequenceExtractor(model);
extractor.Visit(method);
return extractor.Calls;
}
private static Dictionary<MethodDeclarationSyntax, Tuple<string, List<ApiCall>>> ExtractMethodsFromSolution(
string solutionPath) {
var workspace = MSBuildWorkspace.Create();
Solution solution;
try {
solution = workspace.OpenSolutionAsync(solutionPath).Result;
}
catch (Exception e) {//this means that solution can't build for some reason.
using (var sw = new StreamWriter(LogFilePath, true)) {
sw.WriteLine(0);
sw.WriteLine(e.ToString());
}
return new Dictionary<MethodDeclarationSyntax, Tuple<string, List<ApiCall>>>();
}
var res = new Dictionary<MethodDeclarationSyntax, Tuple<string, List<ApiCall>>>();
foreach (var project in solution.Projects) {
foreach (var document in project.Documents) {
if (!File.Exists(document.FilePath)) continue;
Console.WriteLine("Working with " + document.FilePath);
var rootNode = document.GetSyntaxRootAsync().Result;
var methodCollector = new MethodsCollector();
methodCollector.Visit(rootNode);
var methodsAndComments = CommentExtractor.ExtractSummaryComments(methodCollector.MethodDecls);
var curMethods = methodsAndComments.Keys.ToList();
var model = document.GetSemanticModelAsync().Result;
foreach (var method in curMethods) {
var extractedApiSequences = ExtractApiSequence(method, model);
if (extractedApiSequences.Count == 0) continue;
res.Add(method,
new Tuple<string, List<ApiCall>>(methodsAndComments[method], extractedApiSequences));
}
}
}
return res;
}
private static string _pathToSlnFile = @"D:\DeepApiReps\slns.txt";
private static string _pathToExtractedDataFile = @"D:\DeepApiReps\res_3.txt";
private static readonly string FileProcessedSlnsCount = "sln_num.txt";
private static readonly string LogFilePath = "exceptions.txt";
private static void Main(string[] args) {
var p = new OptionSet() {
{ "output=", "Path to output file with comments and api calls", x => _pathToExtractedDataFile = x },
{ "slns=", "Path to input file with paths of .sln files", x => _pathToSlnFile = x },
};
try {
p.Parse(args);
}
catch (OptionException e) {
Console.WriteLine("Error when parsing input arguments");
Console.WriteLine(e.ToString());
return;
}
int skippedCnt = 0;
int processedNum;
using (var sr = new StreamReader(FileProcessedSlnsCount)) {
processedNum = int.Parse(sr.ReadLine()?? "0");
}
var slnFile = File.Open(_pathToSlnFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
using (var slnFileReader = new StreamReader(slnFile)) {
while (true) {
string slnPath;
while ((slnPath = slnFileReader.ReadLine()) != null) {
if (skippedCnt++ < processedNum) continue;
using (var sw = new StreamWriter(FileProcessedSlnsCount)) {
sw.WriteLine(++processedNum);
}
Console.WriteLine(slnPath);
var extractMethodsFromSolution = ExtractMethodsFromSolution(slnPath);
using (var extractedDataWriter = new StreamWriter(_pathToExtractedDataFile, true)) {
extractedDataWriter.WriteLine("**" + slnPath);
foreach (var keyValuePair in extractMethodsFromSolution) {
extractedDataWriter.WriteLine("//" + keyValuePair.Key.Identifier);
extractedDataWriter.WriteLine(keyValuePair.Value.Item1);
keyValuePair.Value.Item2.ForEach(i => extractedDataWriter.Write(i + " "));
extractedDataWriter.WriteLine();
}
}
}
Console.WriteLine("...Waiting for 100 seconds...");
Thread.Sleep(100000); //download is slower than extraction.
}
}
}
}
}
|
3a86931c805c8368d8fa19a585808e5ee861c6d6
|
[
"C#"
] | 5
|
C#
|
iakov/api-extraction
|
a6a7f7e7aaaf0f6be555a886ae4b76271d17adf0
|
da5cb959d12da3afbf3d876babae19f8891a6141
|
refs/heads/master
|
<file_sep><?php
/**
* @name EosAlpha BBS
* @copyright 2011 <NAME> silvercircle(AT)gmail(DOT)com
*
* This software is a derived product, based on:
*
* Simple Machines Forum (SMF)
* copyright: 2011 Simple Machines (http://www.simplemachines.org)
* license: BSD, See included LICENSE.TXT for terms and conditions.
*
* @version 1.0pre
*/
if (!defined('SMF'))
die('Hacking attempt...');
/* This file contains one humble function, which applauds or smites a user.
*/
// What's this? I dunno, what are you talking about? Never seen this before, nope. No siree.
function BookOfUnknown()
{
global $context;
if (strpos($_GET['action'], 'mozilla') !== false && !$context['browser']['is_gecko'])
redirectexit('http://www.getfirefox.com/');
elseif (strpos($_GET['action'], 'mozilla') !== false)
redirectexit('about:mozilla');
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
<title>The Book of Unknown, ', @$_GET['verse'] == '2:18' ? '2:18' : '4:16', '</title>
<style type="text/css">
em
{
font-size: 1.3em;
line-height: 0;
}
</style>
</head>
<body style="background-color: #444455; color: white; font-style: italic; font-family: serif;">
<div style="margin-top: 12%; font-size: 1.1em; line-height: 1.4; text-align: center;">';
if (@$_GET['verse'] == '2:18')
echo '
Woe, it was that his name wasn\'t <em>known</em>, that he came in mystery, and was recognized by none. And it became to be in those days <em>something</em>. Something not yet <em id="unknown" name="[Unknown]">unknown</em> to mankind. And thus what was to be known the <em>secret project</em> began into its existence. Henceforth the opposition was only <em>weary</em> and <em>fearful</em>, for now their match was at arms against them.';
else
echo '
And it came to pass that the <em>unbelievers</em> dwindled in number and saw rise of many <em>proselytizers</em>, and the opposition found fear in the face of the <em>x</em> and the <em>j</em> while those who stood with the <em>something</em> grew stronger and came together. Still, this was only the <em>beginning</em>, and what lay in the future was <em id="unknown" name="[Unknown]">unknown</em> to all, even those on the right side.';
echo '
</div>
<div style="margin-top: 2ex; font-size: 2em; text-align: right;">';
if (@$_GET['verse'] == '2:18')
echo '
from <span style="font-family: Georgia, serif;"><strong><a href="http://www.unknownbrackets.com/about:unknown" style="color: white; text-decoration: none; cursor: text;">The Book of Unknown</a></strong>, 2:18</span>';
else
echo '
from <span style="font-family: Georgia, serif;"><strong><a href="http://www.unknownbrackets.com/about:unknown" style="color: white; text-decoration: none; cursor: text;">The Book of Unknown</a></strong>, 4:16</span>';
echo '
</div>
</body>
</html>';
obExit(false);
}
?><file_sep><?php
/**
* @name EosAlpha BBS
* @copyright 2011 <NAME> silvercircle(AT)gmail(DOT)com
*
* This software is a derived product, based on:
*
* Simple Machines Forum (SMF)
* copyright: 2011 Simple Machines (http://www.simplemachines.org)
* license: BSD, See included LICENSE.TXT for terms and conditions.
*
* @version 1.0pre
*
* class Ratings contains all the core functionality for the content
* rating system.
*/
if (!defined('EOSA'))
die('No access');
Ratings::init();
class Ratings {
protected static $perm_can_see, $perm_can_give, $perm_can_see_details;
protected static $rate_bar = '';
protected static $is_valid;
protected static $show_repair_link;
protected static $user;
/**
* @var array reference to the ratings array in $modSettings
*/
protected static $_ratings;
const REFRESH = 1;
const UPDATE = 2;
const RETURN_POINTS = 4;
const POOL_REFRESH_INTERVAL = 86400;
const STATS_REFRESH_INTERVAL = 86400;
const RATING_RATE = 1;
const RATING_REMOVE = -1;
public static function init()
{
global $context, $modSettings, $txt;
$modSettings['ratings'] = !empty($modSettings['raw_ratings']) ? @unserialize($modSettings['raw_ratings']) : array();
loadLanguage('Ratings');
foreach($modSettings['ratings'] as &$rating)
$rating['text'] = sprintf(html_entity_decode($rating['format']), !empty($rating['localized']) && isset($txt[$rating['localized']]) ? $txt[$rating['localized']] : $rating['label']);
self::$is_valid = (isset($modSettings['ratings']) && count($modSettings['ratings']) > 0 ? true : false);
$context['can_see_like'] = self::$perm_can_see = (self::$is_valid ? allowedTo('like_see') : false);
$context['can_give_like'] = self::$perm_can_give = (self::$is_valid ? allowedTo('like_give') : false);
$context['can_see_like_details'] = self::$perm_can_see_details = (self::$is_valid ? allowedTo('like_details') : false);
self::$show_repair_link = !empty($modSettings['rating_show_repair']) ? true : false;
self::$rate_bar = '<a onclick="ratingWidgetInvoke($(this));return(false);" rel="nofollow" href="!#" class="widgetanchor">' . $txt['rate_this'] . '</a>';
self::$_ratings = &$modSettings['ratings'];
}
/**
* @static
* tell caller if ratings system is enabled
* @return mixed true if ratings are enabled and available.
*/
public static function isValid()
{
return self::$is_valid;
}
/**
* @static
* @param: $class_id int, the rating id we want to query
* @param: $board_id int, the board id
*
* determine whether the rating class id is allowed in the given board
* and for the current member's member groups.
*/
public static function isAllowed($class_id, $board_id)
{
global $user_info, $modSettings;
$board_allowed = $board_denied = $group_allowed = $group_denied = false;
$id = (int)$class_id;
if($user_info['is_admin'])
return true;
if(0 == $id || 0 == (int)$board_id)
return false;
if(isset($modSettings['ratings'][$id])) {
$rating = &$modSettings['ratings'][$id];
$board_allowed = (isset($rating['boards']) && !empty($rating['boards'])) ? in_array((int)$board_id, $rating['boards']) : true;
$board_denied = (isset($rating['boards_denied']) && !empty($rating['boards_denied'])) ? in_array((int)$board_id, $rating['boards_denied']) : false;
if(isset($rating['groups']) && !empty($rating['groups'])) {
$group_interset = array_intersect($rating['groups'], $user_info['groups']);
$group_allowed = !empty($group_interset) ? true : false;
}
else
$group_allowed = true;
if(isset($rating['groups_denied']) && !empty($rating['groups_denied'])) {
$group_interset = array_intersect($rating['groups_denied'], $user_info['groups']);
$group_denied = !empty($group_interset) ? true : false;
}
else
$group_denied = false;
return $board_allowed && !$board_denied && $group_allowed && !$group_denied ? true : false;
}
return false;
}
/**
* @param $row array, fully prepared message
* @param $can_give_like int, permission to use the ratings
* @param $can_see_details boolean, true for detailed output (like_details permission controls who can see
* how users rated a post).
*
* populates $row['likelink'] (all the links required to rate a post)
* and $row['likers'] (the result of the like cache)
* be used in a template. $can_give_like should be the result of a allowedTo('like_give') check.
*/
public static function addContent(&$row, $can_give_like, $can_see_details = true)
{
global $user_info, $txt;
$row['likers'] = '';
$have_liked_it = (int)$row['liked'] > 0 ? $row['liked'] : false;
if($can_give_like) {
if($have_liked_it)
$row['likelink'] = '<a rel="nofollow" class="givelike" data-fn="remove" href="#" data-id="'.$row['id'].'">'.$txt['unlike_label'].'</a>';
else if(!$user_info['is_guest']) {
if($row['id_member'] != $user_info['id'])
$row['likelink'] = self::$rate_bar;
else
$row['likelink'] = '';
}
}
else
$row['likelink'] = '';
// todo: admin gets a "repair likes" link (just a debugging tool, will probably go away...)
if($user_info['is_admin'] && self::$show_repair_link)
$row['likelink'] .= ' <a rel="nofollow" class="givelike" data-fn="repair" href="#" data-id="'.$row['id'].'">Repair ratings</a>';
// todo: make ctype dynamic (for different content types)
if(!empty($row['likelink']))
$row['likelink'] = '<div style="position:relative;"><span data-ctype="1" data-likebarid="'.$row['id'].'">'. $row['likelink'] . '</span></div>';
if($row['likes_count'] > 0)
self::generateOutput(unserialize($row['like_status']), $row['likers'], $row['id'], $have_liked_it, $can_see_details);
}
/**
* @static
* @param $mid - int. a valid message id
* @return array - 'status' => readable form of rating stats, 'count' => total number of ratings for this post
*
* this updates the ratings cache entry for a given content (=message) id.
* it is only executed when a new rating is added or removed.
*/
public static function updateForContent($mid)
{
global $modSettings;
$count = 0;
$likers = array();
$content_type = 1;
$request = smf_db_query('SELECT l.id_msg AS like_message, l.id_user AS like_user, l.rtype, m.real_name AS member_name FROM {db_prefix}likes AS l
LEFT JOIN {db_prefix}members AS m ON (m.id_member = l.id_user)
WHERE l.id_msg = {int:id_message} AND l.ctype = {int:ctype} AND m.id_member <> 0
ORDER BY l.updated DESC',
array('id_message' => $mid, 'ctype' => $content_type));
while ($row = mysql_fetch_assoc($request)) {
$rtypes = explode(',', $row['rtype']);
foreach($rtypes as $rtype) {
if(empty($row['member_name']) || !isset($modSettings['ratings'][$rtype]))
continue;
if(!isset($likers[$rtype]['count']))
$likers[$rtype]['count'] = 0;
$likers[$rtype]['count']++;
if(!isset($likers[$rtype]['members']))
$likers[$rtype]['members'][0] = array('name' => $row['member_name'], 'id' => $row['like_user']);
$count++;
}
}
mysql_free_result($request);
smf_db_query('INSERT INTO {db_prefix}like_cache(id_msg, likes_count, like_status, updated, ctype)
VALUES({int:id_msg}, {int:total}, {string:like_status}, {int:updated}, {int:ctype})
ON DUPLICATE KEY UPDATE updated = {int:updated}, likes_count = {int:total}, like_status = {string:like_status}',
array('id_msg' => $mid, 'total' => $count, 'updated' => time(), 'like_status' => serialize($likers), 'ctype' => $content_type));
$result['count'] = $count;
$result['status'] = $likers;
return($result);
}
/**
* @param $like_status array the cached like status (from like_cache table)
* @param $output string (ref) where to store the output
* @param $mid int. the message id
* @param $have_liked int. if the current user has rated the post, this contains
* his rating id (multiple ids, separated with commas are possible).
* @param $can_see_details bool show detailed output (like_details permission allowed)
*
* generate readable output from the cached like status
*/
public static function generateOutput($like_status, &$output, $mid, $have_liked, $can_see_detailed = true)
{
global $txt;
$parts = array();
$types = explode(',', $have_liked);
if(is_array($like_status)) {
foreach($like_status as $key => $the_like) {
if(isset(self::$_ratings[$key]) && isset($the_like['members'])) {
if($can_see_detailed || self::$_ratings[$key]['anon']) {
$parts[$key] = '<span data-rtype="'.$key.'" class="number">' . $the_like['count'] . '</span> ' . self::$_ratings[$key]['text'] . ' ';
if($the_like['count'] > 1)
$parts[$key] .= (in_array($key, $types) ? sprintf($the_like['count'] > 2 ? $txt['you_and_others'] : $txt['you_and_other'], $the_like['count'] - 1) : '(<a rel="nofollow" data-mid="'.$the_like['members'][0]['id'].'" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a> ' . sprintf($the_like['count'] > 2 ? $txt['and_others'] : $txt['and_other'], $the_like['count'] - 1));
else
$parts[$key] .= (in_array($key, $types) ? $txt['rated_you'] : '(<a rel="nofollow" data-mid="'.$the_like['members'][0]['id'].'" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a>)');
}
/*
* this outputs a "anonymized" version - only list the number of ratings, do not show who rated
* and don't allow the member to click the number to retrieve a detailed listing.
*/
else {
$parts[$key] = '<span data-rtype="'.$key.'" class="number_inactive">' . $the_like['count'] . '</span> ' . self::$_ratings[$key]['text'] . ' ';
if($the_like['count'] > 1)
$parts[$key] .= (in_array($key, $types) ? sprintf($the_like['count'] > 2 ? $txt['you_and_others'] : $txt['you_and_other'], $the_like['count'] - 1) : '');
else
$parts[$key] .= (in_array($key, $types) ? $txt['rated_you'] : '');
}
}
}
}
if(!empty($parts))
$output = '<span class="ratings" data-mid="'.$mid.'"><span class="title"></span> ' . implode(' | ', $parts) . '</span>';
}
/**
* @param $mid = int message (or content) id
*
* handle the ajax request for rating a post. Also handles deletion of ratings
* and (optionally) the repair action.
*
* TODO: remove likes from the database when a user is deleted
* TODO: make it work without AJAX and JavaScript
*/
public static function rateIt($mid)
{
global $context, $user_info, $sourcedir, $txt, $modSettings;
$total = array();
$content_type = 1; // > post content type, we should define them elsewhere later when we have more than just this one
$pool_avail = self::getPool();
if((int)$mid > 0) {
$rtypes = array();
$uid = $user_info['id'];
$remove_it = isset($_REQUEST['remove']) ? true : false;
$repair = isset($_REQUEST['repair']) && $user_info['is_admin'] ? true : false;
$is_xmlreq = $_REQUEST['action'] == 'xmlhttp' ? true : false;
$update_mode = false;
$like_type = ((isset($_REQUEST['r']) && (int)$_REQUEST['r'] > 0) ? $_REQUEST['r'] : '1');
$comment = isset($_REQUEST['comment']) ? strip_tags($_REQUEST['comment']) : '';
$rtypes_submitted = explode(',', $like_type);
foreach($rtypes_submitted as $rtype) {
if(!isset($modSettings['ratings'][$rtype]))
AjaxErrorMsg($txt['unknown_rating_type']);
if($modSettings['ratings'][$rtype]['enabled']) // only enabled types can be used
$rtypes[] = (int)$rtype;
}
if($user_info['is_guest'])
AjaxErrorMsg($txt['no_like_for_guests']);
if(empty($rtypes))
AjaxErrorMsg($txt['no_valid_rating_type']);
/*
* check whether we have enough points available
*/
$total_point_cost = self::getCosts($rtypes);
if(!$user_info['is_admin'] && !$remove_it && $total_point_cost > $pool_avail)
AjaxErrorMsg($txt['rating_not_enough_points']);
$request = smf_db_query('SELECT m.id_msg, m.id_member, m.id_board, m.id_topic, m.subject, l.id_msg AS like_message, l.rtype, l.id_user
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}likes AS l ON (l.id_msg = m.id_msg AND l.ctype = {int:content_type} AND l.id_user = {int:id_user})
WHERE m.id_msg = {int:id_msg} LIMIT 1',
array('content_type' => $content_type, 'id_msg' => $mid, 'id_user' => $uid));
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
$like_owner = $row['id_user'];
if($row['id_user'] > 0 && !$remove_it && !$repair) // duplicate like (but not when removing it)
AjaxErrorMsg($txt['like_verify_error']);
$like_receiver = $row['id_member'];
EoS_Smarty::loadTemplate('xml_blocks');
$context['template_functions'] = 'rating_response';
$context['ratings_output']['mid'] = $mid;
/*
* make sure all submitted ratings are allowed in the board
*/
if(!$remove_it) {
foreach($rtypes as $type) {
if(!self::isAllowed($type, $row['id_board']))
AjaxErrorMsg($txt['rating_type_not_allowed']);
}
}
/*
* this is a debugging feature and allows the admin to repair
* the likes for a post.
* it may go away at a later time.
*/
if($repair) {
if(!$user_info['is_admin'])
obExit(false);
$total = self::updateForContent($mid);
$output = '';
self::generateOutput($total['status'], $output, $mid, $row['id_user'] > 0 ? $row['rtype'] : 0);
// TODO: fix like stats for the like_giver and like_receiver. This might be a very slow query, but
// since this feature will most likely go away, right now I do not care.
invalidateMemberData(array($like_owner, $like_receiver));
if($is_xmlreq) {
$context['ratings_output']['output'] = $output;
$context['ratings_output']['likebar'] = '';
$context['postratings'] = json_encode($context['ratings_output']);
return;
}
else
redirectexit();
}
if($like_receiver == $uid)
AjaxErrorMsg($txt['cannot_like_own']);
if(!allowedTo('like_give', $row['id_board'])) // no permission to give likes in this board
AjaxErrorMsg($txt['like_no_permission']);
if($remove_it && $row['id_user'] > 0) {
global $memberContext;
// remove a rating
if($like_owner == $uid) {
if($like_receiver) {
loadMemberData($like_receiver, false, 'normal', true);
loadMemberContext($like_receiver);
}
$request = smf_db_query('SELECT rtype FROM {db_prefix}likes WHERE id_msg = {int:id_msg} AND id_user = {int:id_user} AND ctype = {int:ctype} LIMIT 1',
array('id_msg' => $mid, 'id_user' => $uid, 'ctype' => $content_type));
if(smf_db_affected_rows() > 0 && isset($memberContext[$like_receiver])) {
list($types) = mysql_fetch_row($request);
$rtypes = explode(',', $types);
mysql_free_result($request);
if(false === self::recordStats($rtypes, $like_receiver, self::RATING_REMOVE, $mid))
AjaxErrorMsg('Error recording stats');
smf_db_query('DELETE FROM {db_prefix}likes WHERE id_msg = {int:id_msg} AND id_user = {int:id_user} AND ctype = {int:ctype}',
array('id_msg' => $mid, 'id_user' => $uid, 'ctype' => $content_type));
// if we remove a like (unlike) a post, also delete the corresponding activity
smf_db_query('DELETE a.*, n.* FROM {db_prefix}log_activities AS a LEFT JOIN {db_prefix}log_notifications AS n ON(n.id_act = a.id_act)
WHERE a.id_member = {int:id_member} AND a.id_type = 1 AND a.id_content = {int:id_content}',
array('id_member' => $uid, 'id_content' => $mid));
$context['ratings_output']['likebar'] = self::$rate_bar;
/*
* record the stats
*/
$total_point_cost = self::getCosts($rtypes);
self::updatePool($total_point_cost, Ratings::UPDATE|Ratings::RETURN_POINTS);
}
}
}
else {
/* store the rating */
global $memberContext;
if($like_receiver) { // we do have a member, but still allow to like posts made by guests
loadMemberData($like_receiver, false, 'normal', true); // but banned users shall not receive likes
loadMemberContext($like_receiver);
}
if(($like_receiver && !$memberContext[$like_receiver]['is_banned']) || $like_receiver == 0) { // posts by guests can be liked
if(false === self::recordStats($rtypes, $like_receiver, self::RATING_RATE, $mid))
AjaxErrorMsg('Error recording stats');
smf_db_query('INSERT INTO {db_prefix}likes(id_msg, id_user, id_receiver, updated, ctype, rtype, comment)
VALUES({int:id_message}, {int:id_user}, {int:id_receiver}, {int:updated}, {int:ctype}, {string:rtype}, {string:comment})',
array('id_message' => $mid, 'id_user' => $uid, 'id_receiver' => $like_receiver, 'updated' => time(), 'ctype' => $content_type, 'rtype' => $like_type, 'comment' => $comment));
$update_mode = $like_type;
if($modSettings['astream_active']) {
@require_once($sourcedir . '/lib/Subs-Activities.php');
aStreamAdd($uid, ACT_LIKE,
array('member_name' => $context['user']['name'],
'topic_title' => $row['subject'],
'rtype' => $like_type),
$row['id_board'], $row['id_topic'], $mid, $like_receiver);
}
self::updatePool($total_point_cost, Ratings::UPDATE);
}
else
AjaxErrorMsg($txt['like_cannot_like']);
$context['ratings_output']['likebar'] = '<a rel="nofollow" class="givelike" data-fn="remove" href="#" data-id="'.$mid.'">'.$txt['unlike_label'].'</a>';
}
if($user_info['is_admin'] && self::$show_repair_link)
$context['ratings_output']['likebar'] .= ' <a rel="nofollow" class="givelike" data-fn="repair" href="#" data-id="'.$mid.'">Repair ratings</a>';
$total = self::updateForContent($mid);
$output = '';
self::generateOutput($total['status'], $output, $mid, $update_mode);
$context['ratings_output']['output'] = $output;
$context['postratings'] = json_encode($context['ratings_output']);
}
}
/**
* @param $mid array of message ids or a single message id.
*
* remove all rating data for one ore more message ids.
*/
public static function removeByPosts($mid, $ctype = 1)
{
$_mid = !is_array($mid) ? array($mid) : array_unique($mid);
smf_db_query('
DELETE FROM {db_prefix}likes WHERE id_msg IN ({array_int:id_msg}) AND ctype = {int:ctype}',
array('id_msg' => $_mid, 'ctype' => $ctype));
smf_db_query('
DELETE FROM {db_prefix}like_cache WHERE id_msg IN ({array_int:id_msg}) AND ctype = {int:ctype}',
array('id_msg' => $_mid, 'ctype' => $ctype));
}
/**
* @param $do_db boolean. if true, update the database.
*
* initialize or refresh a member's rating point pool
*/
public static function refreshPool($do_db = true)
{
global $user_info, $context;
$pool_avail = 0;
$request = smf_db_query('SELECT MAX(rating_pool) AS pool FROM {db_prefix}membergroups AS g WHERE g.id_group IN({array_int:groups})',
array('groups' => $user_info['groups']));
if(smf_db_affected_rows() > 0) {
$row = mysql_fetch_assoc($request);
$pool_avail = $row['pool'];
}
mysql_free_result($request);
$user_info['meta']['rating_pool']['points'] = $pool_avail;
$user_info['meta']['rating_pool']['refresh'] = $context['time_now'];
if($do_db)
updateMemberData($user_info['id'], array('meta' => @serialize($user_info['meta'])));
}
/**
* cleans the rating point pool
*/
public static function cleanPool()
{
global $user_info;
$user_info['meta']['rating_pool']['points'] = 0;
$user_info['meta']['rating_pool']['refresh'] = 0;
updateMemberData($user_info['id'], array('meta' => @serialize($user_info['meta'])));
}
/**
* @return int the number of available rating points in the member's pool
*
* get the member's rating pool points. If the pool has not been initialized yet, do it.
*/
public static function getPool()
{
global $user_info, $context;
if(!isset($user_info['meta']['rating_pool']['refresh']) || $context['time_now'] - $user_info['meta']['rating_pool']['refresh'] > Ratings::POOL_REFRESH_INTERVAL)
self::refreshPool();
//self::cleanPool();
return $user_info['meta']['rating_pool']['points'];
}
/**
* @param $points int points to subtract from the pool
* @param int $mode mode. defaults to update, can also be a bitwise OR of UPDATE | REFRESH
*
* update the member's pool of available rating points.
*/
public static function updatePool($points, $mode = Ratings::UPDATE)
{
global $user_info;
if($mode & Ratings::REFRESH)
self::refreshPool($mode & Ratings::UPDATE ? false : true); // avoid db update if we also do a update afterwards
if($mode & Ratings::UPDATE) {
/*
* return points to the member's pool (this happens when one removes a rating)
*/
if($mode & Ratings::RETURN_POINTS)
$user_info['meta']['rating_pool']['points'] += $points;
else {
/*
* make sure, we never get negative pool values
*/
if($points <= $user_info['meta']['rating_pool']['points'])
$user_info['meta']['rating_pool']['points'] -= $points;
else
$user_info['meta']['rating_pool']['points'] = 0;
}
updateMemberData($user_info['id'], array('meta' => @serialize($user_info['meta'])));
}
}
/**
* @param $rating_types array|int either a single rating id or an array of rating ids
*
* @return int cost in rating points. Can be 0 >= $cost
*
* calculate the cost (in points) for one or more ratings.
*/
public static function getCosts(&$rating_types)
{
$cost = 0;
$ids = is_array($rating_types) ? array_unique($rating_types) : array($rating_types);
foreach($ids as $id) {
if(isset(self::$_ratings[$id]))
$cost += self::$_ratings[$id]['cost'];
}
return $cost;
}
/**
* @param $stats array a rating stats array (either ratings_given or ratings_received)
*
* return a default stats record with everything cleared
*/
public static function initStats()
{
$stats = array(
'points_positive' => 0,
'points_negative' => 0,
'count_positive' => 0,
'count_negative' => 0,
'count_global' => 0,
'rtypes' => array()
);
return $stats;
}
/**
* @param $stats array - a member's rating stats array (part of meta)
*/
public static function validateStats(&$stats)
{
if($stats['points_positive'] < 0)
$stats['points_positive'] = 0;
if($stats['points_negative'] > 0)
$stats['points_negative'] = 0;
$stats['count_positive'] = $stats['count_positive'] >= 0 ? $stats['count_positive'] : 0;
$stats['count_negative'] = $stats['count_negative'] >= 0 ? $stats['count_negative'] : 0;
if(count($stats['rtypes'])) {
foreach($stats['rtypes'] as $key => &$type)
$stats['rtypes'][$key] = $stats['rtypes'][$key] >= 0 ? $stats['rtypes'][$key] : 0;
}
}
/**
* @param $stats array reference to a stats array (either ratings_given or ratings_received)
*
* recalculate points and rating counts.
*/
public static function recalcStats(&$stats)
{
global $context;
$stats['points_positive'] = $stats['points_negative'] = $stats['count_positive'] = $stats['count_negative'] = $stats['count_global'] = 0;
$stats['last_refresh'] = $context['time_now'];
if(!empty($stats['rtypes'])) {
foreach($stats['rtypes'] as $type => $count) {
if($count > 0 && isset(self::$_ratings[$type]) && !empty(self::$_ratings[$type]['enabled'])) {
$points = self::$_ratings[$type]['points'];
if($points > 0) {
$stats['count_positive']++;
$stats['points_positive'] += ($points * $count);
}
else if($points < 0) {
$stats['count_negative']++;
$stats['points_negative'] += ($points * $count);
}
$stats['count_global']++;
}
}
}
}
/**
* @param $id_member int the member id
* @param string $mode string which stats array to update
* @param bool $force boolean force a refresh when true
*
* refresh a member's rating stats (either ratings_received or ratings_given)
* it uses the $stats['rtypes'] array to recalculate the points and rating counts.
*/
public static function refreshStats($id_member, $mode = 'ratings_received', $force = false)
{
global $context, $memberContext;
if(!isset($memberContext[$id_member]))
return;
$stats = &$memberContext[$id_member][$mode];
if($force || !isset($stats['last_refresh']) || $context['time_now'] - $stats['last_refresh'] > self::STATS_REFRESH_INTERVAL) {
self::recalcStats($stats);
updateMemberData($id_member, array($mode => @serialize($stats)));
}
}
/**
* @param $rtypes array rating type IDs. Note that this function does NOT check permissions
* or enabled state for each of the rating types. The caller must make sure
* to pass only allowed rating types.
* @param $receiver int member id of the member who receives the rating
* @param $mode int either RATING_RATE or RATING_REMOVE
* @param $cid int the content id (message id). Not really needed, but passed for debugging and logging
*
* @return bool true = success
*
* $memberContext[$receiver] should be loaded and valid
* The rating member is always the active one ($user_info)
*
* record the stats for a rating in $user_info['ratings_given'] and $memberContext[$receiver]['ratings_received']
*/
public static function recordStats($rtypes, $receiver, $mode, $cid)
{
global $user_info, $memberContext;
$ratings_count = 0;
if(!isset($memberContext[$receiver])) {
if(loadMemberData($receiver) !== false)
loadMemberContext($receiver);
else {
log_error('Invalid or unknown rating receiver: ' . $receiver, __FILE__, __LINE__);
return false;
}
}
if(empty($user_info['ratings_given']))
$user_info['ratings_given'] = self::initStats();
if(empty($memberContext[$receiver]['ratings_received']))
$memberContext[$receiver]['ratings_received'] = self::initStats();
// shortcuts
$rater = &$user_info['ratings_given'];
$rated = &$memberContext[$receiver]['ratings_received'];
foreach($rtypes as $type) {
if(isset(self::$_ratings[$type])) {
$ratings_count++;
$points = self::$_ratings[$type]['points'];
if(!isset($rater['rtypes'][$type]))
$rater['rtypes'][$type] = 0;
if(!isset($rated['rtypes'][$type]))
$rated['rtypes'][$type] = 0;
$rater['rtypes'][$type] += ($mode == self::RATING_RATE ? 1 : -1);
$rated['rtypes'][$type] += ($mode == self::RATING_RATE ? 1 : -1);
self::recalcStats($rater);
self::recalcStats($rated);
}
}
if(0 === $ratings_count)
log_error('Invalid rating(s) for content ID ' . $cid . ' by member ' . $user_info['name'] . ', RTYPES = ' . implode(',', $rtypes), __FILE__, __LINE__);
else {
self::validateStats($rater);
self::validateStats($rated);
updateMemberData($user_info['id'], array('ratings_given' => @serialize($rater)));
updateMemberData($receiver, array('ratings_received' => @serialize($rated)));
}
// only return success if we had at least one valid rating
return $ratings_count > 0 ? true : false;
}
}
<file_sep><?php
/**
* Smarty plugin
* -------------------------------------------------------------
* File: function.hook.php
* Type: function
* Name: hook
* Purpose: display a template hook (a set of sub-templates registered under the given hook identifier).
* -------------------------------------------------------------
*/
/**
* @param $params array the parameters passed to the function.
* {hook name="foo"} would place "foo" into $params['name'].
* @param $smarty Smarty (our smarty object)
*/
function smarty_function_hook($params, &$smarty)
{
EoS_Smarty::getConfigInstance()->displayHook($params['name']);
}
<file_sep><?php
/**
* Related Topics
*
* @package RelatedTopics
* @version 1.4
*/
function RelatedTopicsAdmin()
{
global $context, $sourcedir, $user_info, $txt, $related_version, $backend_subdir;
require_once($sourcedir . '/Subs-Related.php');
require_once($sourcedir . '/' . $backend_subdir . '/ManageServer.php');
$related_version = '1.4';
loadTemplate('RelatedTopicsAdmin');
$context[$context['admin_menu_name']]['tab_data']['title'] = $txt['related_topics_admin_title'];
$context[$context['admin_menu_name']]['tab_data']['description'] = $txt['related_topics_admin_desc'];
$context['page_title'] = $txt['related_topics_admin_title'];
$subActions = array(
'settings' => array('RelatedTopicsAdminSettings'),
'methods' => array('RelatedTopicsAdminMethods'),
'buildIndex' => array('RelatedTopicsAdminBuildIndex'),
);
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'settings';
if (isset($subActions[$_REQUEST['sa']][1]))
isAllowedTo($subActions[$_REQUEST['sa']][1]);
$subActions[$_REQUEST['sa']][0]();
}
function RelatedTopicsAdminMain()
{
global $context, $smcFunc, $sourcedir, $scripturl, $user_info, $txt;
$context['sub_template'] = 'related_topics_admin_main';
}
function RelatedTopicsAdminSettings($return_config = false)
{
global $context, $smcFunc, $sourcedir, $scripturl, $user_info, $txt;
$config_vars = array(
array('check', 'relatedTopicsEnabled'),
array('int', 'relatedTopicsCount'),
);
if ($return_config)
return $config_vars;
if (isset($_GET['save']))
{
checkSession('post');
saveDBSettings($config_vars);
writeLog();
redirectexit('action=admin;area=relatedtopics;sa=settings');
}
$context['post_url'] = $scripturl . '?action=admin;area=relatedtopics;sa=settings;save';
$context['settings_title'] = $txt['related_topics_settings_title'];
$context['sub_template'] = 'show_settings';
prepareDBSettingContext($config_vars);
}
function RelatedTopicsAdminMethods()
{
global $context, $smcFunc, $modSettings, $scripturl, $user_info, $txt, $db_type;
initRelated();
$relatedIndexes = !empty($modSettings['relatedIndex']) ? explode(',', $modSettings['relatedIndex']) : array();
$context['related_methods'] = array(
'fulltext' => array(
'name' => $txt['relatedFulltext'],
'selected' => false,
'supported' => $db_type == 'mysql',
),
);
foreach ($context['related_methods'] as $id => $dummy)
$context['related_methods'][$id]['selected'] = in_array($id, $relatedIndexes);
if (isset($_GET['save']))
{
checkSession('post');
$methods = array();
if (isset($_POST['related_methods']))
{
foreach ($_POST['related_methods'] as $method)
{
if (isset($context['related_methods'][$method]) && $context['related_methods'][$method]['supported'])
$methods[] = $method;
}
}
updateSettings(array(
'relatedIndex' => implode(',', $methods),
'relatedIgnoredboards' => !empty($_POST['ignored_boards']) ? implode(',', $_POST['ignored_boards']) : '',
));
redirectexit('action=admin;area=relatedtopics;sa=methods');
}
$request = smf_db_query( '
SELECT b.id_board, b.name, c.id_cat, c.name AS cat_name
FROM {db_prefix}boards AS b
LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
WHERE b.redirect = {string:blank_redirect}'. (!empty($modSettings['recycle_enable']) && !empty($modSettings['recycle_board']) ? '
AND NOT b.id_board = {int:recyle_board}' : ''),
array(
'blank_redirect' => '',
'recyle_board' => $modSettings['recycle_board'],
)
);
$context['categories'] = array();
while ($row = mysql_fetch_assoc($request))
{
if (!isset($context['categories'][$row['id_cat']]))
$context['categories'][$row['id_cat']] = array(
'id' => $row['id_cat'],
'name' => $row['cat_name'],
'boards' => array(),
);
$context['categories'][$row['id_cat']]['boards'][$row['id_board']] = array(
'id' => $row['id_board'],
'name' => $row['name'],
'selected' => in_array($row['id_board'], $context['rt_ignore']),
);
}
mysql_free_result($request);
$context['sub_template'] = 'related_topics_admin_methods';
}
function RelatedTopicsAdminBuildIndex()
{
global $smcFunc, $scripturl, $modSettings, $context, $txt;
loadTemplate('Admin');
loadLanguage('Admin');
if (!isset($context['relatedClass']) && !initRelated())
fatal_lang_error('no_methods_selected');
$context['step'] = empty($_REQUEST['step']) ? 0 : (int) $_REQUEST['step'];
if ($context['step'] == 0)
{
// Clear caches
foreach ($context['relatedClass'] as $class)
$class->recreateIndexTables();
smf_db_query( '
DELETE FROM {db_prefix}related_topics'
);
}
$request = smf_db_query( '
SELECT MAX(id_topic)
FROM {db_prefix}topics');
list ($max_topics) = mysql_fetch_row($request);
mysql_free_result($request);
// How many topics to do per page load?
$perStep = 150;
$last = $context['step'] + $perStep;
// Search for topic ids between first and last which are not in ignored boards
$request = smf_db_query( '
SELECT t.id_topic
FROM {db_prefix}topics AS t
WHERE t.id_topic > {int:start}
AND t.id_topic <= {int:last}' . (!empty($context['rt_ignore']) ? '
AND t.id_board NOT IN({array_int:ignored})' : ''),
array(
'start' => $context['step'],
'last' => $last,
'ignored' => $context['rt_ignore'],
)
);
$topics = array();
while ($row = mysql_fetch_assoc($request))
$topics[] = $row['id_topic'];
mysql_free_result($request);
// Update topics
relatedUpdateTopics($topics, true);
if ($last >= $max_topics)
redirectexit('action=admin;area=relatedtopics;sa=methods');
$context['sub_template'] = 'not_done';
$context['continue_get_data'] = '?action=admin;area=relatedtopics;sa=buildIndex;step=' . $last;
$context['continue_percent'] = round(100 * ($last / $max_topics));
$context['continue_post_data'] = '';
$context['continue_countdown'] = '2';
obExit();
}
?>
|
4f7cafd6b09eb70f4917714f093d283384094495
|
[
"PHP"
] | 4
|
PHP
|
samozin/SMF
|
f59460b6f5dd050aa797ba97274b028ddc5f841f
|
ab33f34fdc47d5d7e90e9d1972719b6a00cbb2f7
|
refs/heads/master
|
<file_sep>pub mod faruledata;
pub mod farule;
pub mod dfarulebook;
pub mod dfa;
pub mod dfadesign;
pub mod nfarulebook;
pub mod nfa;
pub mod nfadesign;
#[cfg(test)]
mod tests {
use super::faruledata::*;
use super::farule::*;
use super::dfarulebook::*;
use super::dfa::*;
use super::dfadesign::*;
use super::nfarulebook::*;
use super::nfa::*;
use super::nfadesign::*;
use helper::*;
#[test]
fn test_dfa_rulebook() {
let rulebook = DFARulebook::new(
vec![
FARule::new_rulechar(&1, 'a', &2), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&2, 'a', &2), FARule::new_rulechar(&2, 'b', &3),
FARule::new_rulechar(&3, 'a', &3), FARule::new_rulechar(&3, 'b', &3)
]);
assert_eq!(2, rulebook.next_state(&1, 'a'));
assert_eq!(1, rulebook.next_state(&1, 'b'));
assert_eq!(3, rulebook.next_state(&2, 'b'));
}
#[test]
fn test_dfa() {
let rulebook = DFARulebook::new(
vec![
FARule::new_rulechar(&1, 'a', &2), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&2, 'a', &2), FARule::new_rulechar(&2, 'b', &3),
FARule::new_rulechar(&3, 'a', &3), FARule::new_rulechar(&3, 'b', &3)
]);
assert!(DFA::new(1, &vec![1, 3], &rulebook).accepting());
assert!(!DFA::new(1, &vec![3], &rulebook).accepting());
let mut dfa = DFA::new(1, &vec![3], &rulebook);
assert!(!dfa.accepting());
dfa.read_character('b');
assert!(!dfa.accepting());
dfa.read_character('b');
for _ in 0..3 {
dfa.read_character('a')
}
assert!(!dfa.accepting());
dfa.read_character('b');
assert!(dfa.accepting());
dfa = DFA::new(1, &vec![3], &rulebook);
assert!(!dfa.accepting());
dfa.read_string("baaab");
assert!(dfa.accepting());
}
#[test]
fn test_dfa_design() {
let rulebook = DFARulebook::new(
vec![
FARule::new_rulechar(&1, 'a', &2), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&2, 'a', &2), FARule::new_rulechar(&2, 'b', &3),
FARule::new_rulechar(&3, 'a', &3), FARule::new_rulechar(&3, 'b', &3)
]);
let dfa_design = DFADesign::new(1, &vec![3], &rulebook);
assert!(!dfa_design.accept("a"));
assert!(!dfa_design.accept("baa"));
assert!(dfa_design.accept("baba"));
}
#[test]
fn test_nfa_rulebook() {
let rulebook = NFARulebook::new(
vec![FARule::new_rulechar(&1, 'a', &1), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&1, 'b', &2), FARule::new_rulechar(&2, 'a', &3),
FARule::new_rulechar(&2, 'b', &3), FARule::new_rulechar(&3, 'a', &4),
FARule::new_rulechar(&3, 'b', &4)
]);
let result1 = rulebook.next_states(&to_hashset(&[1]), Some('b'));
let ans1 = to_hashset(&[1,2]);
let result2 = rulebook.next_states(&to_hashset(&[1,2]), Some('a'));
let ans2 = to_hashset(&[1,3]);
let result3 = rulebook.next_states(&to_hashset(&[1,3]), Some('b'));
let ans3 = to_hashset(&[1,2,4]);
assert!(hashset_eq(&result1, &ans1));
assert!(hashset_eq(&result2, &ans2));
assert!(hashset_eq(&result3, &ans3));
}
#[test]
fn test_nfa() {
let rulebook = NFARulebook::new(
vec![FARule::new_rulechar(&1, 'a', &1), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&1, 'b', &2), FARule::new_rulechar(&2, 'a', &3),
FARule::new_rulechar(&2, 'b', &3), FARule::new_rulechar(&3, 'a', &4),
FARule::new_rulechar(&3, 'b', &4)
]);
assert!(!NFA::new(&to_hashset(&[1]), &to_hashset(&[4]), &rulebook).accepting());
assert!(NFA::new(&to_hashset(&[1,2,4]), &to_hashset(&[4]), &rulebook).accepting());
let mut nfa = NFA::new(&to_hashset(&[1]), &to_hashset(&[4]), &rulebook);
assert!(!nfa.accepting());
nfa.read_character('b');
assert!(!nfa.accepting());
nfa.read_character('a');
assert!(!nfa.accepting());
nfa.read_character('b');
assert!(nfa.accepting());
nfa = NFA::new(&to_hashset(&[1]), &to_hashset(&[4]), &rulebook);
assert!(!nfa.accepting());
nfa.read_string("bbbbb");
assert!(nfa.accepting());
}
#[test]
fn test_nfadesign() {
let rulebook = NFARulebook::new(
vec![FARule::new_rulechar(&1, 'a', &1), FARule::new_rulechar(&1, 'b', &1),
FARule::new_rulechar(&1, 'b', &2), FARule::new_rulechar(&2, 'a', &3),
FARule::new_rulechar(&2, 'b', &3), FARule::new_rulechar(&3, 'a', &4),
FARule::new_rulechar(&3, 'b', &4)
]);
let nfa_design = NFADesign::new(&1, &to_hashset(&[4]), &rulebook);
assert!(nfa_design.accept("bab"));
assert!(nfa_design.accept("bbbbb"));
assert!(!nfa_design.accept("bbabb"));
}
#[test]
fn test_nfa_freemove() {
let rulebook = NFARulebook::new(
vec![FARule::new_rulefree(&1, &2), FARule::new_rulefree(&1, &4),
FARule::new_rulechar(&2, 'a', &3), FARule::new_rulechar(&3, 'a', &2),
FARule::new_rulechar(&4, 'a', &5), FARule::new_rulechar(&5, 'a', &6),
FARule::new_rulechar(&6, 'a', &4)]);
let result1 = rulebook.next_states(&to_hashset(&[1]), None);
let ans1 = to_hashset(&[2,4]);
let result2 = rulebook.follow_free_moves(&to_hashset(&[1]));
let ans2 = to_hashset(&[1,2,4]);
assert!(hashset_eq(&result1, &ans1));
assert!(hashset_eq(&result2, &ans2));
let nfa_design = NFADesign::new(&1, &to_hashset(&[2, 4]), &rulebook);
assert!(nfa_design.accept("aa"));
assert!(nfa_design.accept("aaa"));
assert!(!nfa_design.accept("aaaaa"));
assert!(nfa_design.accept("aaaaaa"));
}
#[test]
fn test_rule_any() {
let rulebook = DFARulebook::new(
vec![FARule::new_ruleany(&1, &2)]
);
let dfa_design = DFADesign::new(1, &vec![2], &rulebook);
assert!(dfa_design.accept("a"));
assert!(dfa_design.accept("z"));
assert!(dfa_design.accept("猛"));
}
#[test]
fn test_rule_set() {
let range = vec![FARuleData::range('a', 'z')];
let rulebook = NFARulebook::new(
vec![FARule::new_ruleset(&1, &2, &range, false)]
);
let nfa_design = NFADesign::new(&1, &to_hashset(&[2]), &rulebook);
assert!(nfa_design.accept("x"));
assert!(nfa_design.accept("j"));
assert!(!nfa_design.accept("猛"));
}
#[test]
fn test_rule_set_reverse() {
let range = vec![FARuleData::range('a', 'z')];
let rulebook = NFARulebook::new(
vec![FARule::new_ruleset(&1, &2, &range, true)]
);
let nfa_design = NFADesign::new(&1, &to_hashset(&[2]), &rulebook);
assert!(!nfa_design.accept("x"));
assert!(!nfa_design.accept("j"));
assert!(nfa_design.accept("猛"));
}
}
<file_sep>use super::faruledata::FARuleData;
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
#[derive(Debug,Clone)]
pub struct FARule<T> {
pub state: T,
pub next_state: T,
kind: FARuleType
}
#[derive(Debug,Clone,PartialEq)]
enum FARuleType {
RuleChar { character: char },
RuleFree,
RuleAny,
RuleSet { set: Vec<FARuleData>, reverse: bool },
}
impl<T: Eq + PartialEq + Clone> FARule<T> {
pub fn new_rulechar(state: &T, character: char, next_state: &T) -> Self {
FARule {
state: state.clone(),
next_state: next_state.clone(),
kind: FARuleType::RuleChar {
character: character
}
}
}
pub fn new_rulefree(state: &T, next_state: &T) -> Self {
FARule {
state: state.clone(),
next_state: next_state.clone(),
kind: FARuleType::RuleFree
}
}
pub fn new_ruleany(state: &T, next_state: &T) -> Self {
FARule {
state: state.clone(),
next_state: next_state.clone(),
kind: FARuleType::RuleAny
}
}
pub fn new_ruleset(state: &T, next_state: &T, set: &Vec<FARuleData>, reverse: bool) -> Self {
FARule {
state: state.clone(),
next_state: next_state.clone(),
kind: FARuleType::RuleSet {
set: set.clone(),
reverse: reverse
}
}
}
pub fn applies_to(&self, state: &T, c: Option<char>) -> bool {
self.state == *state && match c {
Some(c) => match self.kind {
FARuleType::RuleChar { character } => character == c,
FARuleType::RuleFree => false,
FARuleType::RuleAny => true,
FARuleType::RuleSet { ref set, reverse } => {
reverse ^ set.iter().any(|data| data.applies_to(&c))
}
}
None => self.kind == FARuleType::RuleFree
}
}
pub fn follow(&self) -> T {
self.next_state.clone()
}
}
impl<T: Display> Display for FARule<T> {
fn fmt(&self, f: &mut Formatter) -> Result {
let describe = match self.kind {
FARuleType::RuleChar { character } => character.to_string(),
FARuleType::RuleFree => "free".to_string(),
FARuleType::RuleAny => "any".to_string(),
FARuleType::RuleSet { ref set, reverse } => {
format!("[{}{}]", if reverse {"^"} else {""},
set.iter().map(|data| format!("{}", data)).collect::<Vec<String>>().join(""))
}
};
write!(f, "FARule {} --{}--> {}", self.state, describe, self.next_state)
}
}
<file_sep>nfa-regex
=========
A regex library implemented in NFA (Non-Deterministic Finite Automata).
The library and parser is an extension from implementation of
[computationbook-rust](https://github.com/yodalee/computationbook-rust).
The added features:
* Add any character rule.
* Add set character rule and reverse set character rule
* Support Optional (?) and Plus (+)
<file_sep>pub mod regex;
pub mod tonfa;
mod state;
#[cfg(test)]
mod tests {
use finite_automata::faruledata::{FARuleData};
use super::regex::*;
use super::tonfa::*;
#[test]
fn test_regex_pattern() {
let pattern = Regex::repeat(Regex::choose(Regex::concatenate(Regex::literal('a'), Regex::literal('b')), Regex::literal('a')));
assert_eq!("(ab|a)*", format!("{}", pattern));
}
#[test]
fn test_regex_empty() {
let pattern = Regex::empty();
println!("Regex '{}'", pattern);
assert!(pattern.matches(""));
assert!(!pattern.matches("a"));
}
#[test]
fn test_regex_literal() {
let pattern = Regex::literal('a');
println!("Regex '{}'", pattern);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
assert!(!pattern.matches("b"));
}
#[test]
fn test_regex_set() {
let range = vec![FARuleData::range('a', 'z')];
let pattern = Regex::set(&range, false);
println!("Regex '{}'", pattern);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("x"));
assert!(!pattern.matches("1"));
}
#[test]
fn test_regex_reverse_set() {
let range = vec![FARuleData::range('A', 'Z')];
let pattern = Regex::set(&range, false);
println!("Regex '{}'", pattern);
assert!(!pattern.matches(""));
assert!(pattern.matches("E"));
assert!(pattern.matches("Q"));
assert!(!pattern.matches("a"));
}
#[test]
fn test_regex_any() {
let pattern = Regex::any();
println!("Regex '{}'", pattern);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("潮"));
}
#[test]
fn test_regex_concatenate() {
let pattern = Regex::concatenate(Regex::literal('a'), Regex::literal('b'));
println!("Regex '{}'", pattern);
assert!(!pattern.matches("a"));
assert!(pattern.matches("ab"));
assert!(!pattern.matches("abc"));
}
#[test]
fn test_regex_choose() {
let pattern = Regex::choose(Regex::literal('a'), Regex::literal('b'));
println!("Regex '{}'", pattern);
assert!(pattern.matches("a"));
assert!(pattern.matches("b"));
assert!(!pattern.matches("c"));
}
#[test]
fn test_regex_repeat() {
let pattern = Regex::repeat(Regex::literal('a'));
println!("Regex '{}'", pattern);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("aaaa"));
assert!(!pattern.matches("b"));
}
#[test]
fn test_regex_plus() {
let pattern = Regex::plus(Regex::literal('a'));
println!("Regex '{}'", pattern);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("aaaa"));
assert!(!pattern.matches("b"));
}
#[test]
fn test_regex_optional() {
let pattern = Regex::optional(Regex::literal('a'));
println!("Regex '{}'", pattern);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(!pattern.matches("aaaa"));
assert!(!pattern.matches("b"));
}
#[test]
fn test_regex_complex() {
let pattern = Regex::repeat(Regex::concatenate(Regex::literal('a'), Regex::choose(Regex::empty(), Regex::literal('b'))));
println!("Regex '{}'", pattern);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("ab"));
assert!(pattern.matches("aba"));
assert!(pattern.matches("abab"));
assert!(pattern.matches("abaab"));
assert!(!pattern.matches("abba"));
}
#[test]
fn test_regex_complex_repeat() {
let pattern = Regex::repeat(Regex::any()); // match anything
println!("Regex '{}'", pattern);
assert!(pattern.matches(""));
assert!(pattern.matches("枯籐老樹昏鴉小橋流水人家古道西風瘦馬夕陽西下斷腸人卻在燈火闌珊處"));
}
}
<file_sep>pub mod finite_automata;
pub mod regular_expressions;
mod helper;
<file_sep>[package]
name = "nfa-regex"
version = "0.1.0"
authors = ["yodalee <<EMAIL>>"]
[dependencies]
pest = "^1.0"
pest_derive = "^1.0"
[[bin]]
name = "regex_parser"
path = "src/regex-parser.rs"
<file_sep>extern crate nfa_regex;
extern crate pest;
#[macro_use]
extern crate pest_derive;
use nfa_regex::finite_automata::faruledata::{FARuleData};
use nfa_regex::regular_expressions::regex::{Regex};
use nfa_regex::regular_expressions::tonfa::{ToNFA};
use pest::Parser;
use pest::iterators::{Pair};
use std::env;
#[cfg(debug_assertions)]
const _GRAMMER: &'static str = include_str!("regex.pest");
#[derive(Parser)]
#[grammar = "regex.pest"]
struct RegexParser;
pub fn main() {
let args : Vec<_> = env::args().collect();
if args.len() != 3 {
eprintln!("Usage: regex-parser \"pattern\" string");
eprintln!("Add double quote to prevent shell expand | and *");
}
let pair = RegexParser::parse(Rule::choose, &args[1])
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
if pattern.matches(&args[2]) {
println!("Pattern {} can matches {}", args[1], args[2]);
} else {
println!("Pattern {} cannot matches {}", args[1], args[2]);
}
}
fn build_set(pair: Pair<Rule>, reverse: bool) -> Box<Regex> {
let mut set = Vec::new();
let inner = pair.into_inner();
for pair in inner {
println!("rule: {:?}", pair.as_rule());
set.push(match pair.as_rule() {
Rule::range => {
let mut inner = pair.into_inner();
let start = inner.next().unwrap().into_span().as_str().chars().next().unwrap();
let end = inner.next().unwrap().into_span().as_str().chars().next().unwrap();
FARuleData::range(start, end)
}
Rule::character => {
let c = pair.into_span().as_str().chars().next().unwrap();
FARuleData::char(c)
}
_ => unreachable!("Unexpected rule: {}", pair),
})
}
Regex::set(&set, reverse)
}
fn build_regex(pair: Pair<Rule>) -> Box<Regex> {
println!("rule: {:?}", pair.as_rule());
match pair.as_rule() {
Rule::empty => Regex::empty(),
Rule::character => Regex::literal(pair
.into_span().as_str().chars().next().unwrap()),
Rule::reverse_set => {
let mut inner = pair.into_inner();
let may_op = inner.next().unwrap();
if may_op.as_rule() == Rule::op_not {
build_set(inner.next().unwrap(), true)
} else {
build_set(may_op, false)
}
}
Rule::repeat => {
let mut inner = pair.into_inner();
let regex = build_regex(inner.next().unwrap());
match inner.next() {
Some(pair) => match pair.as_rule() {
Rule::op_repeat => Regex::repeat(regex),
Rule::op_plus => Regex::plus(regex),
Rule::op_optional => Regex::optional(regex),
_ => unreachable!("Unexpected rule: {:?}", pair.as_rule()),
}
None => regex,
}
},
Rule::choose => {
let mut inner = pair.into_inner();
let fst = build_regex(inner.next().unwrap());
match inner.next() {
Some(rest) => {
Regex::choose(fst, build_regex(rest))
},
None => fst,
}
},
Rule::concat => {
let mut inner = pair.into_inner();
let fst = build_regex(inner.next().unwrap());
match inner.next() {
Some(rest) => Regex::concatenate(fst, build_regex(rest)),
None => fst,
}
},
_ => unreachable!("Unexpected rule: {}", pair),
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_regexparser_empty() {
let pair = RegexParser::parse(Rule::choose, "")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(pattern.matches(""));
assert!(!pattern.matches("a"));
}
#[test]
fn test_regexparser_literal() {
let pair = RegexParser::parse(Rule::choose, "a")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
}
#[test]
fn test_regexparser_set_char() {
let pair = RegexParser::parse(Rule::choose, "[aeiouAEIOU]")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(pattern.matches("e"));
assert!(!pattern.matches("r"));
assert!(!pattern.matches("AB"));
}
#[test]
fn test_regexparser_set_range() {
let pair = RegexParser::parse(Rule::choose, "[a-z]")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(pattern.matches("e"));
assert!(pattern.matches("r"));
assert!(!pattern.matches("A"));
assert!(!pattern.matches("ww"));
}
#[test]
fn test_regexparser_set_reverse() {
let pair = RegexParser::parse(Rule::choose, "[^a-z]")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(!pattern.matches("e"));
assert!(!pattern.matches("r"));
assert!(pattern.matches("A"));
assert!(pattern.matches("1"));
assert!(!pattern.matches("ww"));
}
#[test]
fn test_regexparser_repeat() {
let pair = RegexParser::parse(Rule::choose, "a*")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(!pattern.matches("b"));
assert!(pattern.matches("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"));
}
#[test]
fn test_regexparser_plus() {
let pair = RegexParser::parse(Rule::choose, "a*")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(!pattern.matches("b"));
assert!(pattern.matches("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"));
}
#[test]
fn test_regexparser_optional() {
let pair = RegexParser::parse(Rule::choose, "a?")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(pattern.matches(""));
assert!(pattern.matches("a"));
assert!(!pattern.matches("b"));
assert!(!pattern.matches("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"));
}
#[test]
fn test_regexparser_choose() {
let pair = RegexParser::parse(Rule::choose, "a|b")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(pattern.matches("a"));
assert!(pattern.matches("b"));
assert!(!pattern.matches("ab"));
}
#[test]
fn test_regexparser_concat() {
let pair = RegexParser::parse(Rule::choose, "abcd")
.unwrap_or_else(|e| panic!("{}", e))
.next().unwrap();
let pattern = build_regex(pair);
assert!(!pattern.matches(""));
assert!(!pattern.matches("a"));
assert!(!pattern.matches("b"));
assert!(pattern.matches("abcd"));
assert!(!pattern.matches("abcdefg"));
}
}
<file_sep>use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
#[derive(Debug,Clone,PartialEq)]
pub enum FARuleData {
Char {character: char},
Range {start: char, end: char},
}
impl FARuleData {
pub fn char(c: char) -> Self {
FARuleData::Char { character: c }
}
pub fn range(start: char, end: char) -> Self {
FARuleData::Range { start: start, end: end }
}
pub fn applies_to(&self, c: &char) -> bool {
match self {
FARuleData::Char { character } => character == c,
FARuleData::Range { start, end } => start <= c && c <= end
}
}
}
impl Display for FARuleData {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
FARuleData::Char { character } => write!(f, "{}", character),
FARuleData::Range { start, end } => write!(f, "{}-{}", start, end),
}
}
}
|
6d0bc3b5baf289be0ee3d12964edea5df9a248b3
|
[
"Markdown",
"Rust",
"TOML"
] | 8
|
Rust
|
yodalee/nfa_regex
|
647d3f0b7e253ce523794e669192074bb32dcd14
|
b84d528a10533e7a13642e0056be73a30c4d299d
|
refs/heads/master
|
<repo_name>iborgthrowaway123/reactor<file_sep>/src/Services/Auth.jsx
import { createStore } from "redux";
const initialState = {
isLogged: false,
token: "",
email: "",
};
export const AuthReducer = (state = initialState, action) => {
if (action.type === "SET_LOGGED_IN_STATE") {
return { ...state, isLogged: action.payload.value };
}
return state;
};
export const AuthStore = createStore(AuthReducer);
<file_sep>/src/routes.jsx
import Home from "./Components/Home/Home";
import Account from "./Components/Account/Account";
import Signup from "./Components/Signup/Signup";
const AppRoutes = [
{ path: "/", component: Home },
{ path: "/account", component: Account },
{ path: "/signup", component: Signup },
];
export default AppRoutes;
<file_sep>/src/Services/Http.jsx
const doRequest = (url, method, body, headers) =>
fetch(url, {
method,
body: body ? JSON.stringify(body) : undefined,
headers: headers || {
"Content-Type": "application/json",
},
}).then((response) => {
if (response.ok) {
return response.json();
}
throw new Error(`${response.status}: ${response.statusText}`);
});
const Http = {
post: (url, body = undefined, headers = undefined) =>
doRequest(url, "POST", body, headers),
get: (url, headers = undefined) => doRequest(url, "GET", undefined, headers),
};
export default Http;
<file_sep>/src/Components/Home/Home.jsx
import React from "react";
import "./Home.css";
import logo from "../Pictures/Logo.png"
const Home = () => (
<div className="Home" align="center">
<img
className="Logo"
src={logo}
alt=""
/>
</div>
);
export default Home;
<file_sep>/src/Components/Signup/Signup.jsx
import React, { useState } from "react";
import Http from "../../Services/Http";
import Snackbar from "@material-ui/core/Snackbar";
import TextField from '@material-ui/core/TextField';
import Card from '@material-ui/core/Card';
import Grid from '@material-ui/core/Grid';
import Box from '@material-ui/core/box';
const Signup = () => {
const [state, setState] = useState({
open: false,
email: "",
password: "",
});
const doSignup = (event) => {
event.preventDefault();
const { email, password } = state;
const url = "http://127.0.0.1:8080/api/users";
Http.post(url, { email, password })
.then((response) => {
setState({ ...state, open: true, message: response.message });
setTimeout(() => {
setState({ ...state, open: false, message: "" });
}, 6000);
})
.catch((error) => {
setState({ ...state, open: true, message: error.message });
setTimeout(() => {
setState({ ...state, open: false, message: "" });
}, 6000);
});
};
const handleEmailChange = (event) => {
setState({ ...state, email: event.target.value });
};
const handlePasswordChange = (event) => {
setState({ ...state, password: event.target.value });
};
const mystyle = {
backgroundColor: "#eeeeee",
padding: 20,
margin: 107,
};
return (
<div className="d-flex flex-column align-items-center justify-content-center">
<div className="card" style={mystyle}>
<div className="card-body">
<h5>Register</h5>
<Grid container direction ={"column"} spacing={5}>
<Grid item>
<div>
<TextField
id="standard-basic"
type="email"
value={state.email}
onChange={handleEmailChange}
className="form-control-sm"
label="Email"/>
</div>
</Grid>
<Grid item>
<div>
<TextField
id="standard-basic"
type="password"
value={state.password}
onChange={handlePasswordChange}
className="form-control-sm"
label="Password" />
</div>
</Grid>
<Grid item>
<div align="center">
<button onClick={doSignup} type="submit" class="btn btn-primary">Signup</button>
</div>
</Grid>
</Grid>
</div>
</div>
<Snackbar
autoHideDuration={6000}
open={state.open}
message={state.message}
/>
</div>
);
};
export default Signup;<file_sep>/src/Components/Header/Header.jsx
import React, { useState } from "react";
import Snackbar from "@material-ui/core/Snackbar";
import "./Header.css";
import { connect } from "react-redux";
import Http from "../../Services/Http";
import { Link } from "react-router-dom";
import logo from "../Pictures/Logo.png"
const Header = (props) => {
const { isLogged } = props;
const [state, setState] = useState({
open: false,
message: "",
email: "",
password: "",
});
const doLogin = () => {
const { email, password } = state;
const url = "http://127.0.0.1:8080/api/login";
Http.post(url, { email, password })
.then((response) => {
setState({ ...state, open: true, message: response.message });
props.setLoggedInState(true);
setTimeout(() => {
setState({ ...state, open: false, message: "" });
}, 6000);
})
.catch((error) => {
setState({ ...state, open: true, message: error.message });
setTimeout(() => {
setState({ ...state, open: false, message: "" });
}, 6000);
});
};
const handleEmailChange = (event) => {
setState({ ...state, email: event.target.value });
};
const handlePasswordChange = (event) => {
setState({ ...state, password: event.target.value });
};
return (
<div className="Header">
<div className="d-flex flex-row align-items-center justify-content-between">
<div className="d-flex">
<Link to="/">
<button type="button" className="homebutton">
<img className="Logo"
src={logo}
alt=""
/>
</button>
</Link>
</div>
{!isLogged ? (
<div>
<div className="d-flex justify-content-end">
<div className="ml-1">
<input
type="email"
value={state.email}
onChange={handleEmailChange}
className="form-control form-control-sm"
placeholder="Email Address"
/>
</div>
<div className="ml-1">
<input
type="password"
value={state.password}
onChange={handlePasswordChange}
className="form-control form-control-sm"
placeholder="<PASSWORD>"
/>
</div>
<div className="ml-1">
<button
type="submit"
disabled={state.email === "" || state.password === ""}
className="btn btn-sm btn-success"
onClick={doLogin}
>
Sign in
</button>
</div>
<div className="ml-1">
<Link to="/signup">
<button
type="button"
className="btn btn-sm btn-secondary"
>
Sign up
</button>
</Link>
</div>
</div>
<Snackbar
autoHideDuration={6000}
open={state.open}
message={state.message}
/>
</div>
) : (
<div>Logged In</div>
)}
</div>
</div>
);
};
const mapStateToProps = (storeState) => ({
isLogged: storeState.isLogged,
});
const mapDispatchToProps = (dispatch) => ({
setLoggedInState: (loggedInState) => {
dispatch({
type: "SET_LOGGED_IN_STATE",
payload: {
value: loggedInState,
},
});
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Header);
|
b6259c9253c148b02e67bc1af99381e7998fe034
|
[
"JavaScript"
] | 6
|
JavaScript
|
iborgthrowaway123/reactor
|
d00f8f59d1015df0d878fcf3786fa0be93328b4a
|
4bef4172c695139a27b0c66e2cc0b6c06effdc35
|
refs/heads/main
|
<repo_name>harshnakad/SupplyChainDapp<file_sep>/src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {AuthComponent} from './Components/Auth/auth.component';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {HttpClientModule} from '@angular/common/http';
import {HeaderComponent} from "./Components/Header/header.component";
import { FormsModule } from '@angular/forms';
import { OwnerComponent } from './Components/Owner/owner.component';
import {FarmerComponent} from "./Components/Farmer/farmer.component";
import { InspectorComponent } from './Components/Inspector/inspector.component';
import { ProducerComponent } from './Components/Producer/producer.component';
import { DistributorComponent } from './Components/Distributor/distributor.component';
import { ConsumerComponent } from './Components/Consumer/consumer.component';
@NgModule({
declarations: [
AppComponent,
AuthComponent,
HeaderComponent,
OwnerComponent,
FarmerComponent,
InspectorComponent,
ProducerComponent,
DistributorComponent,
ConsumerComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
<file_sep>/src/app/Services/connection.service.ts
import {Injectable} from '@angular/core';
import { BehaviorSubject} from 'rxjs';
import {environment} from "../../environments/environment";
import Web3 from "web3";
import {AccountModel} from "../Models/accountModel";
import supplyChainArtifact from "../../../../../App/build/contracts/SupplyChain.json";
import { RawItem } from '../Models/rawItemModel';
import { FinishedItem } from '../Models/finishedItemModel';
declare var window : any;
@Injectable({providedIn : "root"})
export class ConnectionService {
account : any;
accounts : any;
web3 : any;
status : string;
enable : any;
error : string;
balance : any;
networkId : any;
AccountData : BehaviorSubject<AccountModel> = new BehaviorSubject(new AccountModel(0,0));
contract : any;
deployedNetwork :any ;
private _rawItemsUpc :Array<number> = [];
private _finishedItemUpc : Array<number> = [];
private _rawItems : Array<RawItem> = [new RawItem(0,0)];
private _finishedItems : Array<FinishedItem> = [new FinishedItem(0,0)];
private _bookedRawItems : Array<number> = [];
rawItems : BehaviorSubject<RawItem>= new BehaviorSubject(new RawItem(0,0));
bookedRawItems : BehaviorSubject<number> = new BehaviorSubject(0);
finsihedItems : BehaviorSubject<FinishedItem> = new BehaviorSubject(new FinishedItem(0,0));
events = ["ItemCreated" , "ItemCertified" , "ItemProduced" , "ItemPackaged" , "ItemForSale" , "ItemPurchased"];
async walletDetect() {
try
{
this.attempConnection();
}
finally{
let networkType = 'ropsten';
this.networkId = await this.getAccountId();
console.log(this.networkId);
if (this.networkId != 3) throw Error('Login using Ropsten Network');
this.accounts = await this.getAccounts()
this.account = this.accounts[0];
await this.getBalance();
console.log(this.account);
this.updateData(this.account , this.balance);
this.contract = await this.loadContract();
console.log(this.contract);
this.getEvents();
if(this.account)
{
return true;
}
else{
return false;
}
}
}
async loadContract()
{
this.deployedNetwork = supplyChainArtifact.networks[this.networkId];
console.log(this.deployedNetwork);
return await new this.web3.eth.Contract(supplyChainArtifact.abi ,this.deployedNetwork.address);
}
updateData(address , balance){
this.AccountData.next(new AccountModel(address,balance));
}
async enableMetaMask() : Promise<any>{
let enable = false;
await new Promise((resolve , reject) => {
enable = window.ethereum.enable();
})
}
attempConnection()
{
this.web3 = new Web3(window.ethereum);
this.enable = this.enableMetaMask();
console.log(this.web3);
console.log(this.enable);
}
getEvents()
{
this.contract.events.allEvents({
fromBlock : 0,
toBlock: 'latest',
}, (err , event) => {
console.log(event.event);
this.processEvents(event);
}
);
}
processEvents(event : any)
{
if(event != null )
{
if (event.event.includes("RawItem"))
{
var upc = event.returnValues.rawUpc
var found : boolean = false ;
length = this._rawItemsUpc.length
console.log(length)
for (var i=0 ; i<=length ; i++)
{
console.log("here");
console.log(i);
if(this._rawItems[i].Upc === upc)
{
found = true;
if(this._rawItems[i].State == 4)
{
console.log("Already Processed")
this.rawItems.next(this._rawItems[i]);
}
else
{
this._rawItems[i].State = this._rawItems[i].State + 1
this.rawItems.next(this._rawItems[i]);
}
}
}
if(!found)
{
try{
console.log("here");
let item = new RawItem(upc , environment.rawItemState.Planted);
console.log(item);
this._rawItemsUpc.push(item.Upc);
console.log(this._rawItemsUpc);
this.rawItems.next(item);
this._rawItems.push(item);
}
catch(err)
{
console.log("Error Here "+err);
}
}
}
if(event.event.includes("ItemCreated"))
{
let upc = event.returnValues.finishedUpc;
console.log(upc);
this._bookedRawItems.push(upc);
this.bookedRawItems.next(upc);
let item = new FinishedItem(upc , environment.finishiedItemState.Booked);
console.log(item);
this._finishedItems.push(item);
this._finishedItemUpc.push(item.Upc);
}
if(event.event.match(/^(ItemCertified|ItemProduced|ItemPackaged|ItemForSale|ItemPurchased)$/))
{
console.log(event);
console.log("finished Item");
var found : boolean = false;
let upc = event.returnValues.finishedUpc;
console.log(upc);
for(var i=0 ; i < this._finishedItems.length ; i++)
{
if(this._finishedItems[i].Upc === upc)
{
found = true;
console.log(found);
if(this._finishedItems[i].State == 6)
{
console.log("Already for Sale");
this.finsihedItems.next(this._finishedItems[i]);
}
else
{
this._finishedItems[i].State = this._finishedItems[i].State + 1;
this.finsihedItems.next(this._finishedItems[i]);
}
}
}
if(!found)
{
console.log("Creating New Finished Item");
// let item = new FinishedItem(upc , environment.finishiedItemState.Produced);
// this._finishedItems.push(item);
// this._finishedItemUpc.push(item.Upc);
// this.finsihedItems.next(item);
}
}
}
}
async getBalance()
{
let balance;
console.log(this.accounts[0]);
await this.web3.eth.getBalance(this.accounts[0]).then((bal) => {
console.log(bal);
balance = this.web3.utils.fromWei(bal, 'ether');
})
this.balance = balance;
}
private async getAccountId()
{
let networkId = await this.web3.eth.net.getId();
return networkId;
}
private async getAccounts()
{
const accounts = await this.web3.eth.getAccounts();
console.log(accounts);
return accounts;
}
async addFarmer(address)
{
try{
this.contract.methods.addFarmer(address).send({from : this.account});
}
catch(err){
console.log(err);
}
// console.log(address);
}
async addConsumer(address)
{
try{
this.contract.methods.addConsumer(address).send({from : this.account});
}
catch(err){
console.log(err);
}
// console.log(address);
}
async addDistributor(address)
{
try{
this.contract.methods.addDistributor(address).send({from : this.account});
}
catch(err){
console.log(err);
}
// console.log(address);
}
async addAuditor(address)
{
try{
this.contract.methods.addAuditor(address).send({from : this.account});
}
catch(err){
console.log(err);
}
// console.log(address);
}
async addProducer(address)
{
try{
this.contract.methods.addProducer(address).send({from : this.account});
}
catch(err){
console.log(err);
}
// console.log(address);
}
async renounce()
{
try {
let response = await this.contract.methods.removeFarmert().send({from : this.account});
console.log(response);
}
catch(err)
{
console.log(err);
}
}
async plantRawItem(Upc : number, farmName, farmInfo ,Latitude : string , Longitude : string)
{
try{
console.log(Upc);
console.log(this.account);
// var BN = this.web3.utils.BN;
// let upc = new BN(Upc);
let account = this.account;
var response = await this.contract.methods.plantRawItem(
// this.web3.utils.toBN(Upc),
Upc,
account ,
farmName,
farmInfo ,
Latitude ,
Longitude ).
send({from : this.account});
}
catch(err)
{
console.log(err);
console.log(response);
}
}
async harvestRawItem(Upc : number , notes : string)
{
let response = await this.contract.methods.harvestRawItem(Upc , notes).send({from : this.account});
console.log(response);
}
async processRawItem (Upc : number)
{
let response = await this.contract.methods.proccessRawItem(Upc).send({from : this.account});
console.log(response);
}
async createFinishedProduct(Upc : number , productId : number)
{
try{
let response = await this.contract.methods.createFinishedProduct(Upc, productId).send({from : this.account});
}
catch(error)
{
console.log(this.error);
}
}
async produceFinishedProduct(productUpc : number, productNotes : string , productPrice : number )
{
let balance = this.web3.utils.toWei(productPrice , 'ether');
try{
let response = this.contract.methods.produceFinishedProduct(productUpc , productNotes ,balance ).send({from : this.account});
console.log(response);
}
catch(error){
console.log(error);
}
}
async auditRawItem(Upc : number , notes : string)
{
let response = await this.contract.methods.auditRawItem(Upc, notes).send({from : this.account});
console.log(response);
}
async auditFinishedItem(Upc : number , notes : string)
{
try{
let response = this.contract.methods.certifyFinishedProduct(Upc ,notes).send({from : this.account});
console.log(response);
}
catch(error)
{
console.log(error);
}
}
async packageFinishedProdcut(Upc : number)
{
try{
let response = this.contract.methods.packageFinishedProdcut(Upc).send({from : this.account});
}
catch(error)
{
console.log(error);
}
}
async setItemForSale(Upc : number)
{
try
{
let response = this.contract.methods.forSaleFinishedProduct(Upc).send({from : this.account});
}
catch(error)
{
console.log(error);
}
}
async buyItemForSale(Upc : number )
{
let price : number = 0.002;
const priceInWei = this.web3.utils.toWei(String(price) , 'ether');
console.log( priceInWei);
try{
let response = this.contract.methods.buyFinishedProduct(Upc).send({from : this.account , value : priceInWei});
}
catch(error)
{
console.log(error);
}
}
async tryGetData()
{
let rawItemUpc = 0;
try{
const data = this.contract.methods.fetchRawItemBufferData(rawItemUpc).send({from : this.account});
console.log(data);
}
catch(err)
{
console.log(err);
}
}
}<file_sep>/src/app/Components/Owner/owner.component.ts
import { Component } from "@angular/core";
import {ConnectionService} from "../../Services/connection.service";
@Component({
selector : "app-owner",
templateUrl : "./owner.component.html",
styleUrls : ['./owner.component.css']
})
export class OwnerComponent
{
constructor(private connectionService : ConnectionService){}
data : Array<Object> = [
{id : 0 , name : "Add Farmer"},
{id : 1 , name : "Add Consumer"},
{id : 2 , name : "Add Distributor"},
{id : 3 , name : "Add Auditor"},
{id : 4 , name : "Add Producer"},
]
selectedLevel: Object ;
selected(){
console.log(this.selectedLevel);
}
onSubmit(data)
{
for(let key in this.selectedLevel)
{
if (this.selectedLevel[key] === 0 )
{
console.log(data);
this.connectionService.addFarmer(data.address);
break;
}
if (this.selectedLevel[key] == 1)
{
this.connectionService.addConsumer(data.address);
break;
}
if (this.selectedLevel[key] == 2)
{
this.connectionService.addDistributor(data.address);
break;
}
if (this.selectedLevel[key] == 3)
{
this.connectionService.addAuditor(data.address);
break;
}
if (this.selectedLevel[key] == 4)
{
this.connectionService.addProducer(data.address);
break;
}
}
}
}<file_sep>/src/app/Models/userModel.ts
export class User {
constructor ( public email : string , public id : string , private _token : string , private _tokenExpiration : Date ) {};
get token()
{
if(!this._tokenExpiration || new Date() < this._tokenExpiration)
{
return null;
}
else{
return this._token;
}
}
}<file_sep>/src/app/Models/finishedItemModel.ts
export class FinishedItem
{
private state ;
constructor(private upc : number , state)
{
this.state = state;
}
get Upc()
{
return this.upc;
}
set State(number)
{
this.state = number;
}
get State()
{
return this.state
}
}<file_sep>/src/app/Guards/auth.guard.ts
import { Injectable } from "@angular/core";
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
import { Observable } from "rxjs";
import { AuthService } from "../Services/auth.service";
@Injectable({providedIn : "root"})
export class AuthGuard implements CanActivate
{
constructor(private _authService : AuthService , private router : Router)
{}
canActivate(next :ActivatedRouteSnapshot , state : RouterStateSnapshot ) : Observable<boolean> | Promise<boolean> | boolean
{
if (this._authService.isLoggedIn)
{
return true ;
}
this.router.navigate(["/"]);
return false;
}
}<file_sep>/src/app/Services/getItems.service.ts
import { Injectable, OnDestroy, OnInit } from "@angular/core";
import { Subscription } from "rxjs";
import { environment } from "src/environments/environment";
import { RawItem } from "../Models/rawItemModel";
import { ConnectionService } from "./connection.service";
@Injectable({providedIn : "root"})
export class GetItems implements OnDestroy
{
private subscription : Subscription ;
plantedRawItems : Array<number>;
harvestedRawItems : Array<number>;
inspectedRawItems : Array<number>;
processedRawItems : Array<number>;
_RawItems : Array<RawItem> ;
constructor(private connnectionService : ConnectionService)
{
console.log("Checking");
console.log("Here");
// this.subscription = this.connnectionService._rawItemsUpc.subscribe(Upc => {
// var index = this._RawItems.findIndex(Item => {
// Item.Upc == Upc;
// });
// if (index == -1)
// {
// this._RawItems.push(new RawItem(Upc , environment.rawItemState.Planted));
// this.plantedRawItems.push(Upc);
// }
// else
// {
// this._RawItems[index].State = this._RawItems[index].State + 1;
// }
// })
}
// filterRawItems()
// {
// this._RawItems.forEach((Item)=>{
// if(Item.State == 1)
// {
// this.plantedRawItems.push(Item);
// }
// if(Item.State == 2)
// {
// this.harvestedRawItems.push(Item);
// var index = this.plantedRawItems.findIndex(item => {
// Item.Upc == item.Upc
// });
// delete this.plantedRawItems[index];
// }
// if(Item.State == 3)
// {
// this.inspectedRawItems.push(Item);
// var index = this.harvestedRawItems.findIndex(item => {
// Item.Upc == item.Upc
// });
// delete this.harvestedRawItems[index];
// }
// if(Item.State == 4)
// {
// this.processedRawItems.push(Item);
// var index = this.inspectedRawItems.findIndex(item => {
// Item.Upc == item.Upc
// });
// delete this.inspectedRawItems[index];
// }
// })
// console.log(this.plantedRawItems);
// }
ngOnDestroy()
{
this.subscription.unsubscribe();
}
}<file_sep>/src/app/Services/auth.service.ts
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import {HttpClient} from '@angular/common/http'
import {AngularFireAuth} from "@angular/fire/auth";
import * as firebase from "firebase";
@Injectable({providedIn : "root"})
export class AuthService{
userData : Observable<firebase.User>;
constructor(private http : HttpClient , private angularFireAuth : AngularFireAuth)
{
this.userData = angularFireAuth.authState;
};
SignUp (email : string , password : string )
{
this.angularFireAuth.auth.createUserWithEmailAndPassword(email , password).then( res => {
console.log("Success" ,res);
}).catch(err => { console.log("Something is wrong", err.message) ;});
}
SignIn( email : string , password : string )
{
if (this.isLoggedIn){
return true
}
this.angularFireAuth.auth.signInWithEmailAndPassword(email , password)
.then(res => {
console.log("Success", res);
}).catch(err => {console.log("Problem", err.message);});
}
SignOut()
{
this.angularFireAuth.auth.signOut();
}
// Write the isAuthenticated Function for the Service then test whether it works or not
isAuthenticated()
{
this.angularFireAuth.authState.subscribe(user => {
if (user != null)
{
localStorage.setItem("User" , JSON.stringify(user));
}
else {
localStorage.setItem("User", null);
}
})
}
get isLoggedIn ()
{
const user = JSON.parse(localStorage.getItem("User"));
return user !== null;
}
passwordReset (email : string)
{
this.angularFireAuth.auth.sendPasswordResetEmail(email);
}
}<file_sep>/src/app/Components/Farmer/farmer.component.ts
import {Component, OnDestroy, OnInit} from "@angular/core";
import { Subscription } from "rxjs";
import { GetItems } from "src/app/Services/getItems.service";
import {ConnectionService} from "../../Services/connection.service";
@Component({
selector : "app-farmer",
templateUrl : "./farmer.component.html",
styleUrls : ["./farmer.component.css"]
})
export class FarmerComponent implements OnInit,OnDestroy{
constructor(private connectionService : ConnectionService, private getItems : GetItems){}
plant : boolean = false;
harvest : boolean = false;
process : boolean = false;
subscription : Subscription ;
selectedRaw : Object ;
selectedLevel : Object ;
selectedHarvestItem : number;
selectedProcessItem : number;
data : Array<Object> = [
{id : 0 , name : "Plant A Raw Item" , disabled : true},
{id: 1 , name : "Harvest A Raw Item" , disabled : true},
{id : 2 , name: "Process A Raw Item" , disabled : true}];
InspectedItems : Array<number> = [];
PlantedItems : Array<number> = [];
ngOnInit()
{
this.subscription = this.connectionService.rawItems.subscribe((rawItem) => {
var counter = 0;
console.log(counter);
console.log(rawItem);
if(rawItem.Upc === 0)
{
console.log("first Upc");
}
else
{
if(rawItem.State === 3)
{
this.InspectedItems.push(rawItem.Upc);
this.removePlanted(rawItem.Upc);
}
if(rawItem.State === 1)
{
this.PlantedItems.push(rawItem.Upc);
}
// var found : boolean = false;
// var length = this.PlantedItems.length
// for(var i=0;i<=length ; i++)
// {
// if(this.PlantedItems[i] == rawItem.Upc)
// {
// found = true;
// }
// }
// if(!found)
// {
// this.PlantedItems.push(rawItem.Upc);
// }
}
console.log(this.InspectedItems);
console.log(this.PlantedItems);
})
}
removePlanted(Upc)
{
for(var i = 0 ; i< this.PlantedItems.length ; i++)
{
if(this.PlantedItems[i] == Upc)
{
delete this.PlantedItems[i];
}
}
}
removeInspected(Upc)
{
for(var i = 0 ; i< this.InspectedItems.length ; i++)
{
if(this.InspectedItems[i] == Upc)
{
delete this.InspectedItems[i];
}
}
}
selectRaw()
{
console.log(this.selectedRaw)
}
selected()
{
console.log(this.getItems.plantedRawItems);
this.plant = false;
this.harvest = false;
this.process = false;
console.log(this.selectedLevel);
for(let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
this.plant = true;
this.harvest = false;
this.process = false;
break;
}
if(this.selectedLevel[key] == 1)
{
this.plant = false;
this.process = false;
this.harvest = true;
break;
}
if(this.selectedLevel[key] == 2)
{
this.process = true;
this.plant = false;
this.harvest = false;
break;
}
}
}
onSubmit(form)
{
for (let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
console.log("Adding A RawItem");
console.log(form);
this.connectionService.plantRawItem(form.upc , form.farmName , form.farmInformation ,form.Latitude , form.Longitude);
break;
}
if(this.selectedLevel[key] == 1)
{
console.log("Harvesting a Raw Item");
this.connectionService.harvestRawItem(this.selectedHarvestItem , form.harvestNotes)
this.removePlanted(this.selectedHarvestItem);
break;
}
if(this.selectedLevel[key] == 2)
{
console.log("Processing a Raw Item");
this.connectionService.processRawItem(this.selectedProcessItem);
this.removeInspected(this.selectedProcessItem);
break;
}
}
}
ngOnDestroy()
{
this.subscription.unsubscribe();
}
}<file_sep>/src/app/Models/rawItemModel.ts
export class RawItem{
private state;
constructor(private upc : number , state)
{
this.state = state;
}
set State(state)
{
this.state = state;
console.log("Changing State");
}
get State() {
return this.state
}
get Upc()
{
return this.upc
}
}<file_sep>/src/app/Components/Consumer/consumer.component.ts
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Subscription } from "rxjs";
import { ConnectionService } from "src/app/Services/connection.service";
@Component({
selector : "app-consumer",
templateUrl : "./consumer.component.html",
styleUrls : ["./consumer.component.css"]
})
export class ConsumerComponent implements OnInit , OnDestroy
{
finishedItemSubscription : Subscription ;
itemsForSale : Array<Number> = [];
finishedItemSelected ;
selectedItem ;
price = "0.002" ;
constructor(private connectionService : ConnectionService)
{}
ngOnInit()
{
this.finishedItemSubscription = this.connectionService.finsihedItems.subscribe(Item =>{
if(Item.Upc == 0){
console.log("First Item")
}
if(Item.State == 5)
{
this.itemsForSale.push(Item.Upc)
}
if(Item.State == 6)
{
this.removeItemFromSale(Item.Upc);
}
})
}
removeItemFromSale(Upc)
{
for(var i =0 ; i< this.itemsForSale.length ; i++)
{
if(this.itemsForSale[i] == Upc)
{
delete this.itemsForSale[i];
}
}
}
selectedFinished()
{
console.log(this.finishedItemSelected);
}
onSubmit()
{
this.connectionService.buyItemForSale(this.selectedItem);
}
ngOnDestroy()
{
this.finishedItemSubscription.unsubscribe();
}
}<file_sep>/src/app/app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {AuthComponent} from './Components/Auth/auth.component';
import {OwnerComponent} from './Components/Owner/owner.component';
import {FarmerComponent} from './Components/Farmer/farmer.component';
import { InspectorComponent } from './Components/Inspector/inspector.component';
import { ProducerComponent } from './Components/Producer/producer.component';
import {DistributorComponent } from "./Components/Distributor/distributor.component";
import { ConsumerComponent } from './Components/Consumer/consumer.component';
const routes: Routes = [
{path : "owner" , component : OwnerComponent},
{path : "farmer", component : FarmerComponent},
{path: "auditor" , component : InspectorComponent},
{path : "producer" , component : ProducerComponent},
{path : "distributor" , component: DistributorComponent},
{path : "consumer" , component:ConsumerComponent},
{ path: "" , component : AuthComponent },];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
<file_sep>/src/app/Components/Inspector/inspector.component.ts
import { templateJitUrl } from "@angular/compiler";
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Subscription } from "rxjs";
import { ConnectionService } from "src/app/Services/connection.service";
@Component({
selector : "app-inspector",
templateUrl : "./inspector.component.html",
styleUrls : ["./inspector.component.css"]
})
export class InspectorComponent implements OnInit , OnDestroy
{
selectedInspectedItem;
selectedLevel;
selectedAuditedItem;
inspect: boolean = false;
audit: boolean = false;
rawItemSubscription : Subscription;
finishedItemSubscription : Subscription;
rawItemToBeInspected : Array<number> = [] ;
finishedItemToBeAudited : Array<number> = [];
data : Array<Object> = [
{id : 0 , name : "Inspect Raw Item"},
{id : 1 , name : "Audit Finished Product"},
]
constructor(private connectionService : ConnectionService)
{}
ngOnInit()
{
this.rawItemSubscription = this.connectionService.rawItems.subscribe(Item => {
if(Item.Upc == 0)
{
console.log("First Item")
}
if(Item.State == 2) {
this.removeRawInspected(Item.Upc);
this.rawItemToBeInspected.push(Item.Upc);
}
if(Item.State == 3)
{
this.removeRawInspected(Item.Upc);
}
});
this.finishedItemSubscription = this.connectionService.finsihedItems.subscribe(Item=>{
if(Item.Upc == 0)
{
console.log("first Item");
}
if(Item.State == 2)
{
this.removeFinishedInspected(Item.Upc);
this.finishedItemToBeAudited.push(Item.Upc);
}
if(Item.State == 3)
{
this.removeFinishedInspected(Item.Upc);
}
})
}
selected()
{
this.audit = false ;
this.inspect = false;
for(let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
this.inspect = true;
this.audit = false;
break;
}
if(this.selectedLevel[key]==1)
{
this.inspect = false;
this.audit = true;
break;
}
}
}
onSubmit(form)
{
for(let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
this.connectionService.auditRawItem(this.selectedInspectedItem , form.inspectionNotes);
this.removeRawInspected(this.selectedInspectedItem);
}
if(this.selectedLevel[key] == 1)
{
// console.log("Finished Item");
this.connectionService.auditFinishedItem(this.selectedAuditedItem , form.auditNotes);
this.removeFinishedInspected(this.selectedAuditedItem);
}
}
}
removeFinishedInspected(Upc)
{
for(var i=0;i<this.finishedItemToBeAudited.length ; i++)
{
if(this.finishedItemToBeAudited[i] === Upc)
{
delete this.finishedItemToBeAudited[i];
}
}
}
removeRawInspected(Upc)
{
for(var i=0;i<this.rawItemToBeInspected.length ; i++)
{
if(this.rawItemToBeInspected[i] === Upc)
{
delete this.rawItemToBeInspected[i];
}
}
}
selectRaw()
{
console.log(this.selectedLevel);
}
ngOnDestroy()
{
this.rawItemSubscription.unsubscribe();
}
}<file_sep>/src/app/Components/Producer/producer.component.ts
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Subscription } from "rxjs";
import { connectableObservableDescriptor } from "rxjs/internal/observable/ConnectableObservable";
import { ConnectionService } from "src/app/Services/connection.service";
@Component({
selector : "app-producer",
templateUrl : "./producer.component.html",
styleUrls : ["./producer.component.css"]
})
export class ProducerComponent implements OnInit , OnDestroy
{
processedRawItem : Array<number> = [];
rawAndFinishedItem : Array<number> = [];
inspectedItem : Array<number> = [];
itemSelected ;
rawItemSelected;
finishedItemSelected;
rawItemSubscription : Subscription;
finishedItemSubscription : Subscription;
bookedRawItemSubscription : Subscription ;
booking : boolean = false ;
producing : boolean = false ;
packaging : boolean = false ;
selectedLevel ;
data : Array<Object> = [
{id : 0 , name : "Book a Raw Item for Finished Product" , disabled : true},
{id: 1 , name : "Produe a Finished Item" , disabled : true},
{id : 2 , name: "Package a Finished Product" , disabled : true}];
constructor(private connectionService : ConnectionService)
{}
ngOnInit()
{
this.rawItemSubscription = this.connectionService.rawItems.subscribe((rawItem)=> {
if(rawItem.Upc == 0)
{
console.log("First Item");
}
else
{
if(rawItem.State == 4)
{
this.processedRawItem.push(rawItem.Upc);
}
}
console.log(this.processedRawItem);
})
this.finishedItemSubscription = this.connectionService.finsihedItems.subscribe(finishedItem => {
if(finishedItem.Upc == 0)
{
console.log("First Item");
}
else
{
if(finishedItem.State == 2)
{
this.removeRawAndProduced(finishedItem.Upc);
}
if(finishedItem.State == 3)
{
this.inspectedItem.push(finishedItem.Upc);
console.log(this.inspectedItem);
}
if(finishedItem.State == 4)
{
this.removeInspectedItem(finishedItem.Upc);
}
}
})
this.bookedRawItemSubscription = this.connectionService.bookedRawItems.subscribe(Upc => {
if(Upc == 0)
{
console.log("first Item");
}
else{
this.removeProcessedItem(Upc);
this.rawAndFinishedItem.push(Upc);
}
})
}
removeRawAndProduced(Upc)
{
for(var i=0 ; i < this.rawAndFinishedItem.length ; i++)
{
if(this.rawAndFinishedItem[i] == Upc)
{
delete this.rawAndFinishedItem[i];
}
}
}
removeInspectedItem(Upc)
{
for(var i=0 ; i < this.inspectedItem.length ; i++)
{
if(this.inspectedItem[i] == Upc)
{
delete this.inspectedItem[i]
}
}
}
removeProcessedItem(Upc)
{
for(var i=0 ; i < this.processedRawItem.length ; i++)
{
if(this.processedRawItem[i] == Upc)
{
delete this.processedRawItem[i];
}
}
}
onSubmit(form)
{
for(let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
this.connectionService.createFinishedProduct(this.rawItemSelected, form.productId);
this.removeProcessedItem(form.upc);
break;
}
if(this.selectedLevel[key] == 1)
{
this.connectionService.produceFinishedProduct(this.itemSelected , form.productNotes , form.price);
this.removeRawAndProduced(form.upc);
break;
}
if(this.selectedLevel[key] == 2)
{
this.connectionService.packageFinishedProdcut(this.finishedItemSelected);
break;
}
}
}
selectedItem()
{
console.log(this.selectedItem);
}
selectedRaw()
{
console.log("Here");
}
selected()
{
console.log(this.selectedLevel);
for (let key in this.selectedLevel)
{
if(this.selectedLevel[key] == 0)
{
this.booking = true;
this.producing = false;
this.packaging = false;
break;
}
if(this.selectedLevel[key]==1)
{
this.booking = false;
this.producing = true;
this.packaging=false;
break;
}
if(this.selectedLevel[key]==2)
{
this.booking = false;
this.producing = false;
this.packaging = true;
break;
}
}
}
ngOnDestroy()
{
this.rawItemSubscription.unsubscribe();
this.finishedItemSubscription.unsubscribe();
this.bookedRawItemSubscription.unsubscribe();
}
}<file_sep>/src/app/Components/HomePage/homepage.component.ts
import { Component, OnInit } from "@angular/core";
import { AccountModel } from "src/app/Models/accountModel";
import {ConnectionService} from "../../Services/connection.service";
@Component({
selector : "app-homepage",
templateUrl : './homepage.component.html',
styleUrls : ['./homepage.component.css']
})
export class HomePage implements OnInit
{
Role : string;
account : AccountModel;
address : string;
constructor(private connectionService : ConnectionService)
{
this.account = this.connectionService.getAccount();
this.address = this.account.Address;
this.Role = this.account.Role;
}
ngOnInit()
{
if(this.account.Role == "owner")
{
}
}
}<file_sep>/src/app/Components/Auth/auth.component.ts
import {Component} from '@angular/core';
import { FormsModule, NgForm } from '@angular/forms';
import { Router } from '@angular/router';
import {AuthService} from "../../Services/auth.service";
@Component({
selector : 'app-auth',
templateUrl: './auth.component.html',
styleUrls: ['./auth.component.css']
})
export class AuthComponent
{
constructor(public router : Router , private AuthService : AuthService) {}
onSubmit(form : NgForm)
{
this.AuthService.SignIn( form.value.email ,form.value.password);
form.resetForm();
}
onSignUp()
{
this.router.navigateByUrl("/signup")
}
SignOut()
{
this.AuthService.SignOut();
}
}<file_sep>/src/app/Components/Distributor/distributor.component.ts
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Subscription } from "rxjs";
import { ConnectionService } from "src/app/Services/connection.service";
@Component({
selector : "app-distributor",
templateUrl : "./distributor.component.html",
styleUrls : ['./distributor.component.css']
})
export class DistributorComponent implements OnInit, OnDestroy
{
finishedItemSubscription : Subscription
selectedItem;
forSaleItems : Array<Number>=[];
constructor(private connectionService : ConnectionService)
{}
ngOnInit()
{
this.finishedItemSubscription = this.connectionService.finsihedItems.subscribe(Item => {
if(Item.Upc == 0)
{
console.log("First Item");
}
if(Item.State == 4)
{
this.forSaleItems.push(Item.Upc);
}
if(Item.State == 5)
{
this.removeForSaleItems(Item.Upc);
}
})
}
selected()
{
console.log(this.selectedItem);
}
removeForSaleItems(Upc)
{
for(var i=0 ; i< this.forSaleItems.length ; i++)
{
if(this.forSaleItems[i] == Upc)
{
delete this.forSaleItems[i];
}
}
}
onSubmit()
{
if(this.selectedItem !== 0)
{
this.connectionService.setItemForSale(this.selectedItem);
}
else{
alert("Select A Product")
}
}
ngOnDestroy()
{
this.finishedItemSubscription.unsubscribe();
}
}
|
547f350e12676d8f789d8dcabc6b26df414fea2c
|
[
"TypeScript"
] | 17
|
TypeScript
|
harshnakad/SupplyChainDapp
|
b406f5f95c7221f24e488dd01483c43cfcc2a32c
|
616f3e9a249d461ee3b7730e1e72919b55b1abdf
|
refs/heads/master
|
<repo_name>vasilhsscour/ContactApplication<file_sep>/app/src/main/java/gr/hua/android/contactapplication/MainActivity.java
package gr.hua.android.contactapplication;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final DBHelper helper = new DBHelper(this);
Button insertButton = (Button) findViewById(R.id.insertButton);
insertButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText nameET = (EditText) findViewById(R.id.nameInput);
EditText phoneET = (EditText) findViewById(R.id.phoneInput);
String name = nameET.getText().toString();
String phone = phoneET.getText().toString();
SQLiteDatabase db = helper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(DBHelper.KEY_NAME,name);
values.put(DBHelper.KEY_PHONE,phone);
db.insert(DBHelper.TABLE_NAME,null,values);
}
});
Button selectButton = (Button) findViewById(R.id.selectButton);
selectButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SQLiteDatabase db = helper.getReadableDatabase();
String[] cols = {DBHelper.KEY_NAME};
String selection = DBHelper.KEY_ID+"=?";
String[] selargs ={"6"};
Cursor c = db.query(DBHelper.TABLE_NAME,cols,selection,selargs,null,null,null);
if (c.moveToFirst()){
do{
String name = c.getString(0);
Toast.makeText(getApplicationContext(),name,Toast.LENGTH_LONG).show();
}while(c.moveToNext());
}
}
});
}
}
|
99ff1fb75106ecdac6b414e23be3607bb609d416
|
[
"Java"
] | 1
|
Java
|
vasilhsscour/ContactApplication
|
c3690f60c9838c0b3bf0ccdd98a141710828b417
|
276ef99fadf4c3cd20858076c7d90ebf7fc7d289
|
refs/heads/master
|
<file_sep>package com.distinct.tamyg.androidchat.addcontact;
/**
* Created by tamyg on 12/06/16.
*/
public interface AddContactInteractor {
void execute(String email);
}
<file_sep>package com.distinct.tamyg.androidchat.entities;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Created by tamyg on 12/06/16.
*/
@JsonIgnoreProperties({"sentByMe"})
public class ChatMessage {
String msg;
String sender;
boolean sentByMe;
public ChatMessage(){}
public ChatMessage(String sender, String msg){
this.msg = msg;
this.sender = sender;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getSender() {
return sender;
}
public void setSender(String sender) {
this.sender = sender;
}
public boolean isSentByMe() {
return sentByMe;
}
public void setSentByMe(boolean sentByMe) {
this.sentByMe = sentByMe;
}
@Override
public boolean equals(Object obj){
boolean equals = false;
if(obj instanceof ChatMessage){
ChatMessage msg = (ChatMessage)obj;
equals = this.sender.equals(msg.getSender()) && this.msg.equals(msg.getMsg())
&& this.sentByMe == msg.sentByMe;
}
return equals;
}
}
<file_sep>package com.distinct.tamyg.androidchat.chat;
/**
* Created by tamyg on 12/06/16.
*/
public class ChatSessionInteractorImpl implements ChatSessionInteractor {
private ChatRepository chatRepository;
public ChatSessionInteractorImpl() {
this.chatRepository = new ChatRepositoryImpl();
}
@Override
public void changeConnectionStatus(boolean online) {
chatRepository.changeConnectionStatus(online);
}
}
<file_sep>package com.distinct.tamyg.androidchat.addcontact;
/**
* Created by tamyg on 12/06/16.
*/
public interface AddContactRepository {
void addContact(String email);
}
<file_sep>package com.distinct.tamyg.androidchat.contactlist;
/**
* Created by tamyg on 12/06/16.
*/
public interface ContactListInteractor {
void subscribe();
void onsubscribe();
void destroyListener();
void removeContact(String email);
}
<file_sep>package com.distinct.tamyg.androidchat.contactlist;
import com.distinct.tamyg.androidchat.contactlist.event.ContactListEvent;
import com.distinct.tamyg.androidchat.contactlist.ui.ContactListView;
import com.distinct.tamyg.androidchat.contactlist.ui.adapters.ContactListAdapter;
import com.distinct.tamyg.androidchat.entities.User;
import com.distinct.tamyg.androidchat.lib.EventBus;
import com.distinct.tamyg.androidchat.lib.GreenRobotEventBus;
import org.greenrobot.eventbus.Subscribe;
/**
* Created by tamyg on 12/06/16.
*/
public class ContactListPresenterImpl implements ContactListPresenter{
private EventBus eventBus;
private ContactListView view;
private ContactListInteractor contactListInteractor;
private ContactListSessionInteractor contactListSessionInteractor;
public ContactListPresenterImpl(ContactListView view) {
this.view = view;
eventBus = GreenRobotEventBus.getInstance();
this.contactListInteractor = new ContactListInteractorImpl();
this.contactListSessionInteractor = new ContactListSessionInteractorImpl();
}
@Override
public void onCreate() {
eventBus.register(this);
}
@Override
public void onDestroy() {
eventBus.unregister(this);
contactListInteractor.destroyListener();
view = null;
}
@Override
public void onPause() {
contactListSessionInteractor.changeConnectionStatus(User.OFFLINE);
contactListInteractor.onsubscribe();
}
@Override
public void onResume() {
contactListSessionInteractor.changeConnectionStatus(User.ONLINE);
contactListInteractor.subscribe();
}
@Override
public void signOff() {
contactListSessionInteractor.changeConnectionStatus(User.OFFLINE);
contactListInteractor.onsubscribe();
contactListInteractor.destroyListener();
contactListSessionInteractor.signOff();
}
@Override
public String getCurrentUserEmail() {
return contactListSessionInteractor.getCurrentUserEmail();
}
@Override
public void removeContact(String email) {
contactListInteractor.removeContact(email);
}
@Override
@Subscribe
public void onEventMainThread(ContactListEvent event) {
User user = event.getUser();
switch (event.getEventType()) {
case ContactListEvent.onContactAdded:
onContactAdded(user);
break;
case ContactListEvent.onContactChanged:
onContactChanged(user);
break;
case ContactListEvent.onContactRemoved:
onContactRemoved(user);
break;
}
}
public void onContactAdded(User user) {
if (view != null) {
view.onContactAdded(user);
}
}
public void onContactChanged(User user) {
if (view != null) {
view.onContactChanged(user);
}
}
public void onContactRemoved(User user) {
if (view != null) {
view.onContactRemoved(user);
}
}
}
<file_sep>package com.distinct.tamyg.androidchat.contactlist.ui.adapters;
import com.distinct.tamyg.androidchat.entities.User;
/**
* Created by tamyg on 12/06/16.
*/
public interface OnItemClickListener {
void onItemClick(User user);
void onItemLongClick(User user);
}
<file_sep>package com.distinct.tamyg.androidchat.contactlist;
/**
* Created by tamyg on 12/06/16.
*/
public interface ContactListRepository {
void signOff();
String getCurrentUserEmail();
void removeContact(String email);
void destroyListener();
void subscribeToContactListEvent();
void onsubscribeToContactListEvent();
void changeConnectionStatus(boolean online);
}
|
ba24dbb1463e5ce07e9dc78cd741c797388849d8
|
[
"Java"
] | 8
|
Java
|
TAmyG/androidChatFirebase
|
9da4b9384d34c77f720dcf714870a852f34d3070
|
1007b09fe372a317d63a86238229ef7d5bd2a95e
|
refs/heads/master
|
<repo_name>olegzh7505/power_meter_cs5460a<file_sep>/power_meter_cs5460a.ino
/*
* generic CS5460A-based power plug monitor interfacing
*
* sniffs the SPI CLK and MISO from chip to read voltage, current, power, etc.
*
* based on Karl Hagstrom's initial reverse engineering:
* http://gizmosnack.blogspot.com/2014/10/power-plug-energy-meter-hack.html
* and CS5460A datasheet:
* http://www.cirrus.com/en/pubs/proDatasheet/CS5460A_F5.pdf
*
* <NAME> (c) 2016
*/
// ********* WARNING / DANGER *********
// Ground reference of PCB inside meter is tied to HOT (Line). It is at mains level.
// Use galvanic isolation, e.g. optocouplers, etc if you want to wire this up to something else.
// Be sure you know what your are doing around lethal mains-level voltages. Use at your own risk!
//
#include <SPI.h>
#include <stdint.h>
#include "CircularBuffer.h"
#include <RF24.h>
#include <printf.h>
#include <avr/wdt.h>
// pins from power monitor module
#define CLKPIN 2
#define SDOPIN 3 // should be on PORTD. Will need to change the ClockISR if different
#define BUFSIZE 20 // grab last 20 bytes of message
#define VOLTAGE_RANGE 0.250 // full scale V channel voltage
#define CURRENT_RANGE 0.050 // full scale I channel voltage (PGA 50x instead of 10x)
#define VOLTAGE_DIVIDER 450220.0/220.0 // input voltage channel divider (R1+R2/R2)
#define CURRENT_SHUNT 620 // empirically obtained multiplier to scale Vshunt drop to I
#define FLOAT24 16777216.0 // 2^24 (converts to float24)
#define POWER_MULTIPLIER 1 / 512.0 // Energy->Power divider; not sure why, but seems correct. Datasheet not clear about this.
#define VOLTAGE_MULTIPLIER (float) (1 / FLOAT24 * VOLTAGE_RANGE * VOLTAGE_DIVIDER)
#define CURRENT_MULTIPLIER (float) (1 / FLOAT24 * CURRENT_RANGE * CURRENT_SHUNT)
CircularBuffer <uint8_t, BUFSIZE> cbuf;
volatile uint8_t buf = 0;
volatile uint8_t count = 0;
volatile bool syncpulse = false;
#define TIMER_RESET 100 // T2 Counter reset value.
// Use 1 for Fosc = 16MHz and 100 for Fosc=8Mhz, goal to achieve about 10-30ms timer interval
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins CE, CSN
RF24 radio(9,10);
const uint8_t rfchan = 1;
const uint8_t txaddr[] = { 0x00, 0x53, 0x4E, 0x45, 0x4A }; // inverted from raspi
// simple message structure to simplify unpacking on other end
enum msgtype {
MSG_POWER_METER
};
struct msg_power_meter {
uint8_t msgtype = MSG_POWER_METER;
float voltage = 0;
float current = 0;
float true_power = 0;
float power_factor = 0;
};
msg_power_meter msg;
union {
uint8_t bytearray[4];
uint32_t uint32;
int32_t int32;
} array2int;
void setup() {
pinMode(SDOPIN, INPUT);
pinMode(CLKPIN, INPUT_PULLUP);
Serial.begin(9600);
Serial.println(F("CS5460A monitor start..."));
printf_begin();
// setup NRF24
radio.begin();
radio.setChannel(rfchan);
radio.setDataRate(RF24_250KBPS);
//radio.setPALevel(RF24_PA_LOW);
radio.openWritingPipe(txaddr);
radio.enableDynamicPayloads();
radio.printDetails();
radio.stopListening();
// setup Timer2 to filter for long pulses to reset sync
// prescaler = /1024, ~16ms per overflow @ Fosc 16MHz
TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20);
//wait for first long clock pulse
while (pulseIn(CLKPIN, HIGH, 60000) < 30000);
//setup watchdog timer to 8 seconds
wdt_enable(WDTO_8S);
}
// SPI interrupt routine
void ClockISR (void)
{
TCNT2 = TIMER_RESET; // reset T2 counter
// grab byte from spi, stuff into circular buffer
buf |= bitRead(PIND, SDOPIN) << (7 - count);
count++;
if (count == 8) {
cbuf.push(buf);
buf = 0;
count = 0;
}
}
ISR (TIMER2_OVF_vect)
{
// went ~16ms without a clock pulse, probably in an inter-frame period; reset sync
syncpulse = true;
}
void loop() {
uint8_t i;
// sniff spi from CS5460A
buf = 0;
count = 0;
syncpulse = false;
TIFR2 = _BV(TOV2); // clear T2 interrupts
TCNT2 = TIMER_RESET; // reset T2 counter
TIMSK2 = _BV(TOIE2); // enable T2 overflow interrupt
// setup interrupt to clock in data until we hit the sync pulse
attachInterrupt(digitalPinToInterrupt(CLKPIN), ClockISR, RISING);
// stop when we we hit the long pulse
while (! syncpulse);
detachInterrupt(digitalPinToInterrupt(CLKPIN));
TIMSK2 = 0; // disable T2 interrupt
// parse result
/*
We'll only care about the last 20 bytes of the previous frame before the long clock pulse
This contains the last status register where DRDY=1, followed by registers:
Vrms, Irms, E (true power)
*/
bool result_good = false;
cbuf.rp_front();
// get status register
for (i=0; i < 4; i++)
// read backwards, little-endian?
array2int.bytearray[3 - i] = cbuf.pop();
// check Status register is has conversion ready ( DRDY=1, ID=15 )
// if this doesnt match expected result, probably means the buffer has junk
if ( array2int.uint32 == 0x009003C1)
result_good = true;
// discard next 4 bytes
uint8_t b;
for (i=0; i < 4; i++)
b = cbuf.pop();
if (result_good) {
// read Vrms register
for (i=0; i < 4; i++)
// read backwards, little-endian?
array2int.bytearray[3 - i] = cbuf.pop();
uint32_t voltageraw = array2int.uint32;
float voltage = voltageraw * VOLTAGE_MULTIPLIER;
msg.voltage = voltage;
// read Irms register
for (i=0; i < 4; i++)
// read backwards, little-endian?
array2int.bytearray[3 - i] = cbuf.pop();
uint32_t currentraw = array2int.uint32;
float current = currentraw * CURRENT_MULTIPLIER;
msg.current = current;
// read E (energy) register
for (i=0; i < 4; i++)
// read backwards, little-endian?
array2int.bytearray[3 - i] = cbuf.pop();
if (array2int.bytearray[2] >> 7) {
// must sign extend int24 -> int32LE
array2int.bytearray[3] = 0xFF;
}
int32_t energyraw = array2int.int32;
float true_power = energyraw * POWER_MULTIPLIER;
msg.true_power = true_power;
float apparent_power = voltage * current;
float power_factor = true_power / apparent_power;
msg.power_factor = power_factor;
Serial.print("voltage: ");
Serial.print(voltage);
Serial.print(", current: ");
Serial.print(current, 4);
Serial.print(", true power: ");
Serial.print(true_power, 1);
Serial.print(", app. power: ");
Serial.print(apparent_power,1);
Serial.print(", PF: ");
Serial.print(power_factor);
Serial.println();
radio.write(&msg, sizeof(msg));
}
wdt_reset(); // service watchdog timer
}
<file_sep>/README.md
# power_meter_cs5460a
Arduino sketch for reading CS5460A-based digital power meter.
.jpg)
## Warning
Ground reference of PCB inside meter is tied to HOT (Line). It is at mains level.
Use galvanic isolation, e.g. optocouplers, etc if you want to wire this up directly to something else.
Be sure you know what your are doing around potentially lethal mains-level voltages. Use at your own risk!
## hardware
- [ CS5460A-based power monitor aka "watt" meter ](http://www.banggood.com/Energy-Meter-Watt-Volt-Voltage-Electricity-Monitor-Analyzer-p-907127.html?p=WX0407753399201409DA)
- [ Arduino Pro-Mini 3.3v 8Mhz ](http://www.banggood.com/3Pcs-3_3V-8MHz-ATmega328P-AU-Pro-Mini-Microcontroller-Board-For-Arduino-p-980290.html?p=WX0407753399201409DA)
- [ NRF24L01+ 2.4 GHz radio module ](http://www.banggood.com/2Pcs-10PINS-NRF24L01-2_4GHz-Wireless-Transceiver-Module-For-Arduino-p-948143.html?p=WX0407753399201409DA)
- Arduino pin 2 is connected to CLK
- Arduino pin 3 is connected to SDO
- Grounds are common to pcb and arduino inside the enclosure (see warning above!)
- Taking 5V from 78L05 regulator to arduino Vraw in.
- NRF24L01 taking vcc from arduino (3.3v regulated)
- using 10uF cap on both arduino Vraw and NRF24L01 VCC inputs to smooth transients.
## analysis
Analysis of SPI communication between oem mcu and CS5460A chip.
- Saleae Logic (highly recommended!) was used to analyze the communication between original mcu and CS5460A chip.
- Some captures of startup and running/recurring signals are in [logic_analyzer_captures](logic_analyzer_captures) folder.
- Refer to datasheet for complete understanding of registers and formatting of values.
- In annotations below mcu->cs5460 (SDI) is `>` while cs5460->mcu (SDO) is `<`
### startup
```
> A0 (power-up/halt)
> 00 (reg read: config)
< 00 00 01 (config reg: DCLK=MCLK/1)
> 40 01 00 61 (reg write: config. PGA Gain 50x, IHPF=1, VHPF=1)
> 44 4A 32 DF (reg write: Ign [current chan gain]. value: 1.15935)
> 48 3E 9B 5A (reg write: Vgn [voltage chan gain]. value: 0.97823)
> 00 (reg read: config)
< 01 00 61
> 04 (reg read: Ign)
< 4A 32 DF
> 08 (reg read: Vgn)
< 3E 9B 5A
> 0A (reg read: Cycle Count)
< 00 0F A0 (4000 = 1/sec)
> E8 (start conversion, continuous)
```
### repeating 1 second loop
```
> 1E (reg read: status)
< 10 03 C1 (DRDY=0)
```
... repeats query until conversion is done (DRDY=1)...
```
> 1E
< 90 03 C1 (DRDY=1)
> 5E 80 00 00 (reg write: status - clear DRDY)
> 18 (reg read: Vrms
< 2C CA 01
> 16 (reg read: Irms)
< 00 2B 7A
> 14 (reg read: E [energy])
< FF FE 26
```
## references
[<NAME>'s article](http://gizmosnack.blogspot.com/2014/10/power-plug-energy-meter-hack.html)
[CS5460A Datasheet](http://www.cirrus.com/en/pubs/proDatasheet/CS5460A_F5.pdf)
<file_sep>/power_monitor_rf24.py
#!/usr/bin/env python
# receive values from CS5460A power monitor via NRF24L01
# may need to run as sudo
# see https://github.com/zerog2k/power_meter_cs5460a for arduino transmitter code
import time as time
from RF24 import *
import RPi.GPIO as GPIO
import binascii
import struct
from datetime import datetime, date
MSGTYPES = [ "MSG_POWER_METER" ]
irq_gpio_pin = None
########### USER CONFIGURATION ###########
# See https://github.com/TMRh20/RF24/blob/master/RPi/pyRF24/readme.md
# CE Pin, CSN Pin, SPI Speed
#RPi B+
# Setup for GPIO 22 CE and CE0 CSN for RPi B+ with SPI Speed @ 8Mhz
radio = RF24(RPI_BPLUS_GPIO_J8_15, RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_1MHZ)
# Setup for connected IRQ pin, GPIO 24 on RPi B+; uncomment to activate
#irq_gpio_pin = RPI_BPLUS_GPIO_J8_18
#irq_gpio_pin = 24
pipes = [ 0x4A454E5300 ]
radio.begin()
radio.setChannel( 1 )
# set datarate
radio.setDataRate( RF24_250KBPS )
#radio.setPALevel(RF24_PA_MAX)
radio.enableDynamicPayloads()
radio.printDetails()
radio.openReadingPipe(1, pipes[0])
radio.startListening()
dt = datetime
pipenum = -1
# forever loop
while True:
try:
have_data, pipenum = radio.available_pipe()
if have_data:
len = radio.getDynamicPayloadSize()
if len > 0:
msgtype = radio.read(1);
receive_payload = radio.read(len)
if msgtype[0] == MSGTYPES.index("MSG_POWER_METER"):
(voltage, current, true_power, power_factor) = struct.unpack_from("ffff", receive_payload, 1)
print "%s pipe: %d, msgtype: %s, voltage: %0.1f, current: %0.2f, true_power: %0.1f, PF: %0.2f" \
% (dt.now(), pipenum, MSGTYPES[msgtype[0]], voltage, current, true_power, power_factor)
else:
print "%s got: pipe=%d size=%s raw=%s" % (dt.now(), pipenum, len, binascii.hexlify(receive_payload))
time.sleep(1)
except Exception as e:
print e.strerror
|
c73e934709fbcd95ae83b869c6a0ae55f4b63258
|
[
"Markdown",
"Python",
"C++"
] | 3
|
C++
|
olegzh7505/power_meter_cs5460a
|
41c850f2209b9596bc4ca80057fdf8709cf7605c
|
4beeffdf185bced5dbf2d7cdfbe0a4b46eb9ea23
|
refs/heads/master
|
<file_sep>version: "3"
services:
app:
build: app
expose:
- "8000"
proxy:
build: proxy
ports:
- "80:80"
volumes:
- "./proxy/nginx.conf:/etc/nginx/nginx.conf:ro"
- "./proxy/logs:/var/log/nginx"<file_sep>import com.sun.net.httpserver.HttpServer;
import java.net.InetSocketAddress;
import java.io.OutputStream;
import java.io.IOException;
public class SimpleHttpServer {
public static void main(String... args) throws IOException {
final HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0);
server.createContext("/tellme", t->{
final String query = t.getRequestURI().getQuery();
final String response = query.hashCode() % 2 == 0 ? "Yes" : "No";
t.sendResponseHeaders(200, response.length());
final OutputStream os = t.getResponseBody();
os.write(response.getBytes());
os.close();
System.out.printf("Question : %s%n", query);
System.out.printf("Answer : %s%n", response);
});
server.setExecutor(null);
server.start();
System.out.println("Server started.");
}
}<file_sep>FROM nginx
COPY .htpasswd /etc/nginx/<file_sep>FROM openjdk:8-alpine
RUN mkdir /usr/src
COPY src/* /usr/src
WORKDIR /usr/src
RUN javac SimpleHttpServer.java
EXPOSE 8000
CMD java SimpleHttpServer
|
75c446bfb3b6192b8e0a3a4f671315ae4e019c1b
|
[
"Java",
"YAML",
"Dockerfile"
] | 4
|
YAML
|
uphy/docker-practice
|
d271b70517013e84cf07e46272400b57ae4511b8
|
ea679cd3a6b00aff699307b5984abddc3781419f
|
refs/heads/master
|
<file_sep>package com.xzq.controller;
import com.xzq.entity.User;
import com.xzq.entity.UserVO;
import com.xzq.feign.UserFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-25 20:19
**/
@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserFeign userFeign;
@GetMapping("/findAll")
@ResponseBody
public UserVO findAll(@RequestParam("page") int page, @RequestParam("limit") int limit) {
int index = (page - 1) * limit;
return new UserVO(0, "", userFeign.count(), userFeign.findAll(index, limit));
}
@GetMapping("/deleteById/{id}")
public String deleteById(@PathVariable("id") int id) {
userFeign.deleteById(id);
return "redirect:/base/redirect/user_manage";
}
@PostMapping("/save")
public String save(User user) {
user.setRegisterDate(new Date());
userFeign.save(user);
return "redirect:/base/redirect/user_manage";
}
}
<file_sep>package com.xzq.controller;
import com.xzq.entity.Menu;
import com.xzq.entity.MenuVO;
import com.xzq.feign.MenuFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-25 20:19
**/
@Controller
@RequestMapping("/menu")
public class MenuController {
@Autowired
private MenuFeign menuFeign;
@GetMapping("/findAll")
@ResponseBody
public MenuVO findAll(@RequestParam("page") int page, @RequestParam("limit") int limit) {
return menuFeign.findAll(page, limit);
}
@GetMapping("/deleteById/{id}")
public String deleteById(@PathVariable("id") int id) {
menuFeign.deleteById(id);
return "redirect:/base/redirect/menu_manage";
}
@GetMapping("/types")
public String findTypes(Model model) {
model.addAttribute("list", menuFeign.findTypes());
return "menu_add";
}
@PostMapping("/save")
public String save(Menu menu) {
menuFeign.save(menu);
return "redirect:/base/redirect/menu_manage";
}
@PostMapping("/update")
public String update(Menu menu) {
menuFeign.update(menu);
return "redirect:/base/redirect/menu_manage";
}
@GetMapping("/findById/{id}")
public String findById(@PathVariable("id") int id, Model model) {
model.addAttribute("menu", menuFeign.findById(id));
model.addAttribute("list", menuFeign.findTypes());
return "menu_update";
}
}
<file_sep>package com.xzq.repository;
import com.xzq.entity.Admin;
import org.springframework.stereotype.Repository;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-26 15:06
**/
@Repository
public interface AdminRepository {
Admin login(String username, String password);
}
<file_sep>package com.xzq.repository;
import com.xzq.entity.Menu;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-25 19:12
**/
@Repository
public interface MenuRepository {
List<Menu> findAll(int index, int limit);
int count();
Menu findById(long id);
void save(Menu menu);
void update(Menu menu);
void deleteById(long id);
}
<file_sep>package com.xzq.entity;
import lombok.Data;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-26 15:05
**/
@Data
public class Admin extends Account {
}
<file_sep>package com.xzq;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @program: mircroservice-demo
* @description:
* @author: XZQ
* @create: 2019-12-25 17:15
**/
@SpringBootApplication
@MapperScan("com.xzq.repository")
public class MenuApplicaion {
public static void main(String[] args) {
SpringApplication.run(MenuApplicaion.class, args);
}
}
<file_sep>package com.xzq.feign;
import com.xzq.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @program: mircroservice-demo
* @description: 调用服用提供者
* @author: XZQ
* @create: 2019-12-25 20:16
**/
@FeignClient(value = "user")
public interface UserFeign {
@GetMapping("/user/findAll/{page}/{limit}")
List<User> findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);
@DeleteMapping("/user/deleteById/{id}")
void deleteById(@PathVariable("id") int id);
@PutMapping("/user/update")
void update(@RequestBody User user);
@PostMapping("/user/save")
void save(User user);
@GetMapping("/user/count")
int count();
@GetMapping("/user/findById/{id}")
User findById(@PathVariable("id") int id);
}
<file_sep>package com.xzq;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @program: mircroservice-demo
* @description: Order启动类
* @author: XZQ
* @create: 2019-12-25 16:32
**/
@SpringBootApplication
@MapperScan("com.xzq.repository")
public class OrderApplication {
public static void main(String[] args) {
SpringApplication.run(OrderApplication.class, args);
}
}
<file_sep># ordingsystem
基于springcloud的外卖点餐系统
|
8f5747bb3c769d39fec128a161731c2be658a594
|
[
"Markdown",
"Java"
] | 9
|
Java
|
Jiaru0314/ordingsystem
|
d3b9d8d3ddfcfe460af985a0777bd743b3bafcf5
|
07f01054f3cfcf12c3bdae156559405260a8eb66
|
refs/heads/master
|
<repo_name>nanshan-high-school/cs50-problem-set-1-cash-BrandonCheng666<file_sep>/錢包問題.cpp
#include <iostream>
using namespace std;
int main()
{
float dollars;
do {
cout << "輸入金額:";
cin >> dollars;
} while (dollars < 0);
int dimes = dollars * 10;
int number = 0;
number += dimes / 10000;
dimes = dimes % 10000;
number += dimes / 5000;
dimes = dimes % 5000;
number += dimes / 1000;
dimes = dimes % 1000;
number += dimes / 500;
dimes = dimes % 500;
number += dimes / 100;
dimes = dimes % 100;
number += dimes / 50;
dimes = dimes % 50;
number += dimes / 10;
dimes = dimes % 10;
number += dimes / 5;
number += dimes % 5;
cout << number;
}
|
4d84656b84cc126ee63496ddea5b9e1dbc449172
|
[
"C++"
] | 1
|
C++
|
nanshan-high-school/cs50-problem-set-1-cash-BrandonCheng666
|
a7fd3bfaed4b1f12e63589b6660d06f5fe22a0ec
|
50345867a2b59e24575a33a2190623b1b96e9796
|
refs/heads/master
|
<file_sep>/*
* $Id: calc.c,v 1.1.1.1 2006/07/22 15:26:25 aoyama Exp $
*
* Copyright (c) 2006 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* prototypes */
float calc_temp(unsigned int);
float calc_humid(unsigned int, float);
/*
* Based on:
* "SHTxx Humidity & Temperature Sensmitter Application Note Sample
* Code" by Sensirion AG.
*/
#define C1 -4.0
#define C2 0.0405
#define C3 -0.0000028
#define T1 0.01
#define T2 0.00008
float
calc_temp(unsigned int ticks)
{
return ((float)(ticks - 4000) / 100);
}
float
calc_humid(unsigned int ticks, float temp)
{
float h_linear, h_true;
h_linear = C3 * (float)ticks * (float)ticks + C2 * (float)ticks + C1;
h_true = (temp - 25.0) * (T1 + T2 * ticks) + h_linear;
return h_true;
}
<file_sep>usbrh
=====
usbrh - show temperature and humidity with Strawberry Linux's USBRH
-
Strawberry Linux Co.,Ltd.さんが販売しているUSB温度・湿度測定モジュール(USBRH)を*BSDで使うためのプログラムです。
元々2006年に作成したもので、その後ほとんどいじっていませんが、記録の意味でgithubへ持ってきました。
参考: http://www.nk-home.net/~aoyama/usbrh/
<file_sep>/*
* $Id: main.c,v 1.4 2007/01/10 13:11:30 aoyama Exp $
*
* Copyright (c) 2006 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/ioctl.h>
#include <sys/param.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
/* prototypes */
void usage(void);
int main(int, char *[]);
int check_device(char *);
#define USBRH_VENDOR 0x1774
#define USBRH_PRODUCT 0x1001
#define DEFAULT_DEVICE "/dev/uhid0"
extern char *__progname;
extern char *optarg;
extern int optind;
extern float calc_temp(unsigned int);
extern float calc_humid(unsigned int, float);
int vflag = 0;
int
main(int argc, char *argv[])
{
struct usb_ctl_report ucr;
int ch, fd, ret;
float t, h;
u_char buf[8];
char devname[MAXPATHLEN];
strlcpy(devname, DEFAULT_DEVICE, sizeof(devname));
while ((ch = getopt(argc, argv, "f:v")) != -1) {
switch(ch) {
case 'f':
strlcpy(devname, optarg, sizeof(devname));
break;
case 'v':
vflag = 1;
break;
default:
usage();
/* NOTREACHED */
}
}
argc -= optind;
argv += optind;
if (check_device(devname) != 1) {
fprintf(stderr, "%s: can not find USBRH device on %s\n",
__progname, devname);
exit(1);
}
if ((fd = open(devname, O_RDWR)) < 0) {
perror(devname);
exit(1);
}
/*
* XXX: If we issue SET_REPORT only once, read(2) sometimes
* blocks. So we issue SET_REPORT twice, with 1 second interval,
* that seems OK.
*/
ucr.ucr_report = UHID_OUTPUT_REPORT;
if (ioctl(fd, USB_SET_REPORT, &ucr) < 0) {
perror("USB_SET_REPORT");
exit(1);
}
sleep(1);
ucr.ucr_report = UHID_OUTPUT_REPORT;
if (ioctl(fd, USB_SET_REPORT, &ucr) < 0) {
perror("USB_SET_REPORT");
exit(1);
}
if ((ret = read(fd, buf, 7)) == -1) {
fprintf(stderr, "read error\n");
exit(1);
}
close(fd);
/*
* Now we got 7 bytes data from the device.
*
* buf[0] Humidity raw data (high byte)
* buf[1] Humidity raw data (low byte)
* buf[2] Temperature raw data (high byte)
* buf[3] Temperature raw data (low byte)
* buf[4] ???
* buf[5] ???
* buf[6] ???
*/
/* Calculate the real values */
t = calc_temp(buf[2] * 256 + buf[3]);
h = calc_humid(buf[0] * 256 + buf[1], t);
if (vflag) {
printf("Temperature = %.2f C\n", t);
printf("Humidity = %.1f %%\n", h);
} else
printf("%.2f\t%.1f\n", t, h);
return 0;
}
void
usage(void)
{
fprintf(stderr, "usage: %s [-v] [-f device]\n", __progname);
exit(1);
}
/*
* Check USBRH vendor ID and product ID on specified device.
* Return 1 if matches.
*/
int
check_device(char *devname)
{
int fd;
struct usb_device_info udi;
#if defined(__NetBSD__) || defined(__OpenBSD__)
/* On NetBSD/OpenBSD, /dev/uhid? can accept USB_GET_DEVICEINFO ioctl. */
if ((fd = open(devname, O_RDWR)) < 0) {
perror(devname);
exit(1);
}
if (ioctl(fd, USB_GET_DEVICEINFO, &udi) < 0) {
perror("USB_GET_DEVICEINFO");
exit(1);
}
close(fd);
/* vendor and product ID check */
if ((udi.udi_vendorNo == USBRH_VENDOR) &&
(udi.udi_productNo == USBRH_PRODUCT)) {
return 1;
}
return 0;
#else
/* Otherwise, walk through from /dev/usb? devices. */
int cnt, addr;
char buf1[MAXPATHLEN], buf2[MAXPATHLEN];
for (cnt = 0; cnt < 10; cnt++) { /* XXX: is this enough? */
snprintf(buf1, sizeof(buf1), "/dev/usb%d", cnt);
fd = open(buf1, O_RDONLY);
if (fd < 0)
continue;
for (addr = 1; addr < USB_MAX_DEVICES; addr++) {
udi.udi_addr = addr;
if (ioctl(fd, USB_DEVICEINFO, &udi) < 0)
continue;
strlcpy(buf2, "/dev/", sizeof(buf2));
strlcat(buf2, udi.udi_devnames[0], sizeof(buf2));
#ifdef DEBUG
printf("%s Addr %d, Vendor 0x%04x, Product 0x%04x, "
"%s, %s, %s, %s, %s\n",
buf1, addr, udi.udi_vendorNo, udi.udi_productNo,
udi.udi_devnames[0], udi.udi_devnames[1],
udi.udi_devnames[2], udi.udi_devnames[3],
buf2);
#endif
if ((strcmp(devname, buf2) == 0) &&
(udi.udi_vendorNo == USBRH_VENDOR) &&
(udi.udi_productNo == USBRH_PRODUCT)) {
return 1;
}
}
close(fd);
}
return 0;
#endif
}
<file_sep>#
# Makefile for usbrh
#
# $Id: Makefile,v 1.1.1.1 2006/07/22 15:26:25 aoyama Exp $
#
PREFIX ?= /usr/local
PROG = usbrh
SRCS = main.c calc.c
CFLAGS += -Wall
MAN = usbrh.1
BINDIR ?= ${PREFIX}/bin
MANDIR ?= ${PREFIX}/man
.include <bsd.prog.mk>
|
64394edcb2c143be30f294d25f3f40cdc14c61cf
|
[
"Markdown",
"C",
"Makefile"
] | 4
|
C
|
ao-kenji/usbrh
|
cf10abc7bcade2b3b1ee7dcb0944c270c9e89cee
|
8de00e74e3718b8c204b1fa38fa2dab466ba606f
|
refs/heads/master
|
<file_sep>package com.example.logica
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
btnSubmit.setOnClickListener {
check()
}
}
private fun check() {
if (textInput1.text.toString() == "T" && textInput2.text.toString() == "F" && textInput3.text.toString() == "F"
&& textInput4.text.toString() == "F") {
Toast.makeText(this, getString(R.string.correct), Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, getString(R.string.incorrect), Toast.LENGTH_SHORT).show()
}
}
}
|
3d836a7904a14b5d08f9d4c710f1a7c13a335c65
|
[
"Kotlin"
] | 1
|
Kotlin
|
thomscholtens/Logica
|
cea3be5369e6d4846536661fb18cf166236cb2c6
|
438b4c9a7d979c4f7314ece5b7be15a4f0970151
|
refs/heads/master
|
<file_sep># print('hi dat! 123')
# name = input('enter your name!')
# print('hi',name)
# hobby = input('enter your hobby: ')
# print("your hobby is",hobby)
# print(10 + 1)
# print(10 - 1)
# print(10 * 1)
# print(10 / 1)
# print(2**4)
# print(5%2)
# print(6//2)
# print(type(10))
# print(type("10"))
# print(type('10'))
# print('1'+'0')
# print(1+0)
# data = input('enter something: ')
# print(type(data))
#input nam sinh
#print tuoi
# year = int(input('enter your yob: '))
# # print(year)
# print(2019 - year)
|
df9f4d79f4e537dd134eb8dac4c657c4ba1c4f50
|
[
"Python"
] | 1
|
Python
|
hoanghuyen98/1st_repo
|
0e0ab630f9d905d34394fd2aea983484e137f2c2
|
daa06b8c529ddd9eee5f1fdbe1fadefcc21c7a50
|
refs/heads/main
|
<repo_name>zinghi99/HM2_Daniele_Zinghirino<file_sep>/Database HM2.sql
create database homework2;
use homework2;
CREATE TABLE Gyms(
ID integer primary key auto_increment,
name varchar(20));
CREATE TABLE Directors(
ID integer primary key auto_increment,
name varchar(20),
surname varchar(20),
birth date);
CREATE TABLE Offices(
ID integer primary key auto_increment,
gym_id integer,
city varchar(20),
address varchar(50),
director_id integer,
foreign key(gym_id) references Gyms(ID), foreign key(director_id) references Directors(ID));
CREATE TABLE Users(
ID varchar(20) primary key,
name varchar(20),
surname varchar(20),
birth date,
age integer,
Password varchar(255));
CREATE TABLE Subscriptions(
user_id varchar(20) primary key,
gym_id integer,
price float,
duration integer,
date_in date,
date_out date,
foreign key(user_id) references Users(ID),foreign key(gym_id) references Gyms(ID));
CREATE TABLE Cards(
ID integer primary key auto_increment,
duration integer,
difficulty integer,
type varchar(50));
CREATE TABLE PTs(
gym_id integer auto_increment,
ID integer primary key,
name varchar(20),
surname varchar(20),
birth date,
foreign key(gym_id) references Gyms(ID));
CREATE TABLE Trainings (
ID integer primary key auto_increment,
pt_id integer,
card_id integer,
user_id varchar(20),
foreign key (pt_id) references PTs(ID),foreign key (card_id) references Cards(ID),
foreign key (user_id) references Users(ID));
CREATE TABLE Courses(
ID integer primary key auto_increment,
name varchar(20),
time varchar(5),
day varchar(20),
image varchar(255),
description varchar(2555));
CREATE TABLE course_user(
ID integer primary key auto_increment,
user_id varchar(20),
course_id integer,
foreign key(user_id) references Users(ID), foreign key(course_id) references Courses(ID));
CREATE TABLE Comments(
ID integer primary key auto_increment,
text varchar(1000),
user_id varchar(20),
day date,
time varchar(5),
foreign key(user_id) references Users(ID));
INSERT INTO Gyms(ID, name)
VALUES (1,"BeFit");
INSERT INTO Users(ID, name, surname, birth, age, password)
VALUES ('ZNGDNL99H06C351F','Daniele','Zinghirino','1999-06-06',22,'aaaaaaaa'),
('SCADUTO','Mario','Rossi','1991-07-01',30,'aaaaaaaa'),
('PROVA','Maria','Verdi','2000-01-05',21,'aaaaaaaa');
INSERT INTO Subscriptions(user_id, gym_id, price, duration, date_in, date_out)
VALUES ('ZNGDNL99H06C351F',1,300,12,'2021-01-04','2022-01-04'),
('SCADUTO',1,120,3,'2021-03-10','2021-06-10'),
('PROVA',1,300,12,'2020-12-12','2021-12-12');
INSERT INTO PTs(gym_id, ID, name, surname, birth)
VALUES (1,1,'Giovanni','Longo','1980-08-08'),
(1,2,'Carlo','Rossi','1976-04-20'),
(1,3,'Giorgia','Bruni','1989-01-14'),
(1,4,'Federica','Bianchi','1992-12-21'),
(1,5,'Luigi','Verde','1984-07-02');
INSERT INTO Cards(ID, duration, difficulty, type)
VALUES(1,2,2,'Risveglio muscolare'),
(2,3,3,'Dimagrimento'),
(3,4,3,'Definizione'),
(4,4,4,'Aumento massa muscolare');
INSERT INTO Trainings(ID, pt_id, card_id, user_id)
VALUES(1,1,1,'ZNGDNL99H06C351F'),
(2,4,2,'SCADUTO'),
(3,3,4,'PROVA');
INSERT INTO Courses(ID, name, time, day, image, description)
VALUES(1,'PUGILATO',19.00,'Martedi','immagini/Pugilato.jpg',"L’allenamento comprende un veloce riscaldamento a cui seguono esercizi mirati alo sviluppo di coordinazione, forza, velocità e resistenza. Si passa poi alle tecniche e tattiche specifiche, che comprendono la tecnica pugilistica, la scelta di tempo e delle distanze. Il contatto tra gli atleti avviene sempre in sicurezza."),
(2,'WORKOUT',17.00,'Lunedi','immagini/Workout.jpg',"Il Total Body workout è un tipo di allenamento in cui si praticano esercizi che coinvolgono tutto il corpo. L’allenamento è composto da un mix di esercizi: statici, dinamici, di equilibrio funzionale, forza e definizione muscolare. Nel workout si usano grandi e piccoli attrezzi fitness, e macchine cardio fitness."),
(3,'AEROBICA',18.30,'Mercoledi','immagini/Aerobica.jpg',"Si tratta di ginnastica a corpo libero con elementi coreografici a ritmo di musica, il cui obiettivo è l’allenamento delle funzioni cardiovascolari e respiratorie, la tonificazione e il consumo calorico. La diversità delle tecniche usate, così come l’impiego di attrezzi (step, cavigliere, manubri, ecc.) permette ai partecipanti di diversificare l'allenamento cardiovascolare rendendolo vario e stimolante allo stesso tempo."),
(4,'KARATE',17.45,'Giovedi','immagini/Karate.jpg',"Al pari di altre arti marziali, il karate, è uno sport completo che coinvolge tutti i muscoli e le articolazioni del corpo. Per questa ragione è uno sport consigliato allo stesso modo per bambini, adolescenti e adulti, ai quali è offerta la possibilità di elevarsi, all'interno di questa disciplina, attraverso sette gradi culminanti nella cintura nera."),
(5,'YOGA',19.30,'Giovedi','immagini/Yoga.jpg',"Lo yoga ha diversi benefici: il corpo viene tonificato, reso flessibile e forte, ne giovano articolazioni, muscoli, organi interni, migliora l’elasticità della colonna vertebrale; la mente che diventa più calma, aperta e ricettiva, siamo più rilassati, migliora la qualità del sonno, del riposo e la concentrazione; il respiro viene migliorato perchè si impara a respirare correttamente e a fondo, usando tutta la propria capacità respiratoria, questo porta ad una migliore ossigenazione del sangue, con conseguenze positive su tutto il corpo e sulla mente"),
(6,'SPINNING',14.30,'Giovedi','immagini/Spinning.jpg',"Una pedalata di gruppo su una cyclette particolare (detta bike da indoor) e sotto la guida attenta di un istruttore, che usa una base musicale per impostare il lavoro");
INSERT INTO course_user(ID, user_id, course_id)
VALUES(1,'ZNGDNL99H06C351F',1),
(2,'ZNGDNL99H06C351F',3),
(3,'PROVA',3),
(4,'PROVA',4),
(5,'PROVA',6);
INSERT INTO Comments(ID,text,user_id,day,time)
VALUES (1,'Ottima struttura!','SCADUTO','2021-04-05','18.30'),
(2,'Un ambiente perfetto per allenarsi','PROVA','2021-06-12','15.13'),
(3,'Personale super competente!','ZNGDNL99H06C351F','2021-06-18','10.57');
INSERT INTO Directors(ID,name,surname,birth)
VALUES (1,'Orazio','Neri','1965-04-17'),
(2,'Carmela','Gialli','1976-11-01'),
(3,'Luisa','Viola','1982-03-30');
INSERT INTO Offices(ID,gym_id,city,address,director_id)
VALUES(1,1,'Catania','Via XXXI Maggio',1),
(2,1,'Palermo','Via Roma',2),
(3,1,'Roma','Via Flaminia',3);
|
251a83df399bb5d3eee87b537acfdac42979dcfa
|
[
"SQL"
] | 1
|
SQL
|
zinghi99/HM2_Daniele_Zinghirino
|
49443ac61a643c0b2f455acb6dd05959eacee7f3
|
e2917d3580d7fc1038a501ea6837750778626894
|
refs/heads/master
|
<repo_name>Nealsbo/Rope<file_sep>/Vector2D.h
#ifndef VECTOR3D_H
#define VECTOR3D_H
#include <math.h>
class Vector2D
{
public:
float x;
float y;
Vector2D ();
Vector2D ( float _x, float _y );
virtual ~Vector2D ();
Vector2D operator+ ( Vector2D v ) { return Vector2D( x + v.x, y + v.y ); }
Vector2D operator- ( Vector2D v ) { return Vector2D( x - v.x, y - v.y ); }
Vector2D operator* ( float value ) { return Vector2D( x * value, y * value ); }
Vector2D operator/ ( float value ) { return Vector2D( x / value, y / value ); }
Vector2D& operator+= ( Vector2D v ) { x += v.x; y += v.y; return *this; }
Vector2D& operator-= ( Vector2D v ) { x -= v.x; y -= v.y; return *this; }
Vector2D& operator*= ( float value ) { x *= value; y *= value; return *this; }
Vector2D& operator/= ( float value ) { x /= value; y /= value; return *this; }
Vector2D operator- () { return Vector2D ( -x, -y ); }
float length () { return sqrtf ( x*x + y*y ); }
void unitize () {
float length = this->length();
if ( length == 0 )
return;
x /= length;
y /= length;
}
Vector2D unit () {
float length = this->length();
if ( length == 0 )
return *this;
return Vector2D ( x / length, y / length );
}
};
Vector2D::Vector2D() {
x = 0;
y = 0;
}
Vector2D::Vector2D( float _x, float _y ) {
x = _x;
y = _y;
}
Vector2D::~Vector2D() {
}
#endif // VECTOR3D_H
<file_sep>/Physics2.h
#ifndef PHYSICS2_H_INCLUDED
#define PHYSICS2_H_INCLUDED
#include "Vector2D.h"
class Mass
{
public:
float m;
Vector2D pos;
Vector2D vel;
Vector2D force;
Mass( float m ) {
this->m = m;
}
void applyForce( Vector2D force ) {
this->force += force;
}
void init() {
force.x = 0;
force.y = 0;
}
void simulate( float dt ){
vel += (force / m) * dt;
pos += vel * dt;
}
};
class Simulation
{
public:
int numOfMasses;
Mass** masses;
Simulation( int numOfMasses, float m ) {
this->numOfMasses = numOfMasses;
masses = new Mass*[numOfMasses];
for ( int a = 0; a < numOfMasses; ++a )
masses[a] = new Mass(m);
}
virtual void release() {
for ( int a = 0; a < numOfMasses; ++a ) {
delete(masses[a]);
masses[a] = NULL;
}
delete( masses );
masses = NULL;
}
Mass* getMass( int index ) {
if ( index < 0 || index >= numOfMasses )
return NULL;
return masses[index];
}
virtual void init() {
for ( int a = 0; a < numOfMasses; ++a )
masses[a]->init();
}
virtual void solve(){
}
virtual void simulate( float dt ) {
for ( int a = 0; a < numOfMasses; ++a )
masses[a]->simulate(dt);
}
virtual void operate( float dt ) {
init();
solve();
simulate( dt );
}
};
class Spring
{
public:
Mass* mass1;
Mass* mass2;
float springConstant;
float springLength;
float frictionConstant;
Spring( Mass* mass1, Mass* mass2, float springConstant, float springLength, float frictionConstant ) {
this->springConstant = springConstant;
this->springLength = springLength;
this->frictionConstant = frictionConstant;
this->mass1 = mass1;
this->mass2 = mass2;
}
void solve() {
Vector2D springVector = mass1->pos - mass2->pos;
float r = springVector.length();
Vector2D force;
if ( r != 0 )
force += ( springVector / r ) * ( r - springLength ) * ( -springConstant );
force += -( mass1->vel - mass2->vel ) * frictionConstant;
mass1->applyForce( force );
mass2->applyForce( -force );
}
};
class RopeSimulation : public Simulation
{
public:
Spring** springs;
Vector2D gravitation;
Vector2D ropeConnectionPos;
Vector2D ropeConnectionVel;
float airFrictionConstant;
RopeSimulation(
int numOfMasses,
float m,
float springConstant,
float springLength,
float springFrictionConstant,
Vector2D gravitation,
float airFrictionConstant
) : Simulation( numOfMasses, m ) {
this->gravitation = gravitation;
this->airFrictionConstant = airFrictionConstant;
for ( int a = 0; a < numOfMasses; ++a ) {
masses[a]->pos.x = a * springLength;
masses[a]->pos.y = 0;
}
springs = new Spring*[numOfMasses - 1];
for ( int a = 0; a < numOfMasses - 1; ++a ) {
springs[a] = new Spring( masses[a], masses[a + 1],
springConstant, springLength, springFrictionConstant );
}
}
void release() {
Simulation::release();
for ( int a = 0; a < numOfMasses - 1; ++a ) {
delete( springs[a] );
springs[a] = NULL;
}
delete( springs );
springs = NULL;
}
void solve() {
for ( int a = 0; a < numOfMasses - 1; ++a ) {
springs[a]->solve();
}
for ( int a = 0; a < numOfMasses; ++a ) {
masses[a]->applyForce( gravitation * masses[a]->m );
masses[a]->applyForce( -masses[a]->vel * airFrictionConstant );
}
}
void simulate( float dt ) {
Simulation::simulate( dt );
ropeConnectionPos += ropeConnectionVel * dt;
masses[0]->pos = ropeConnectionPos;
masses[0]->vel = ropeConnectionVel;
}
void setRopeConnectionVel( Vector2D ropeConnectionVel ){
this->ropeConnectionVel = ropeConnectionVel;
}
};
#endif // PHYSICS2_H_INCLUDED
<file_sep>/README.md
# Rope
Simple rope physics simulation
<file_sep>/main.cpp
#include <stdio.h>
#include <SDL2/SDL.h>
#include "Physics2.h"
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_FPS = 60;
const int SCREEN_TICK_PER_FRAME = 1000 / SCREEN_FPS;
int tempx = SCREEN_WIDTH / 2;
int tempy = SCREEN_HEIGHT / 2;
class LTimer {
public:
LTimer();
void start();
void stop();
void pause();
void unpause();
Uint32 getTicks();
bool isStarted();
bool isPaused();
private:
Uint32 mStartTicks;
Uint32 mPausedTicks;
bool mPaused;
bool mStarted;
};
LTimer::LTimer() {
mStartTicks = 0;
mPausedTicks = 0;
mPaused = false;
mStarted = false;
}
void LTimer::start() {
mStarted = true;
mPaused = false;
mStartTicks = SDL_GetTicks();
mPausedTicks = 0;
}
void LTimer::stop() {
mStarted = false;
mPaused = false;
mStartTicks = 0;
mPausedTicks = 0;
}
void LTimer::pause() {
if( mStarted && !mPaused ) {
mPaused = true;
mPausedTicks = SDL_GetTicks() - mStartTicks;
mStartTicks = 0;
}
}
void LTimer::unpause() {
if( mStarted && mPaused ) {
mPaused = false;
mStartTicks = SDL_GetTicks() - mPausedTicks;
mPausedTicks = 0;
}
}
Uint32 LTimer::getTicks() {
Uint32 time = 0;
if( mStarted ) {
if( mPaused ) {
time = mPausedTicks;
} else {
time = SDL_GetTicks() - mStartTicks;
}
}
return time;
}
bool LTimer::isStarted() {
return mStarted;
}
bool LTimer::isPaused() {
return mPaused && mStarted;
}
RopeSimulation* ropeSimulation = new RopeSimulation ( 25, 0.01f, 2000.0f, 0.05f, 0.2f, Vector2D(0, 9.81f), 0.05f );
void SimUpdate( float ms, int mx, int my ){
//printf( "mouse: %d, %d mouset: %d, %d\n", mx, my, tempx, tempy );
Vector2D ropeConnectionVel;
if ( tempx != mx || tempy != my ){
ropeConnectionVel.x += ( mx - tempx ) / 4.0;
ropeConnectionVel.y += ( my - tempy ) / 4.0;
}
tempx = mx;
tempy = my;
ropeSimulation->setRopeConnectionVel( ropeConnectionVel );
float dt = ms / 1000.0f;
float maxPossible_dt = 0.002f;
int numOfIterations = (int)( dt / maxPossible_dt ) + 1;
if ( numOfIterations != 0 )
dt = dt / numOfIterations;
for ( int a = 0; a < numOfIterations; ++a )
ropeSimulation->operate(dt);
}
int main(int argc, char ** argv) {
LTimer fpsTimer;
LTimer capTimer;
int countedFrames = 0;
fpsTimer.start();
bool quit = false;
int mousePosX = 0;
int mousePosY = 0;
int stowConst = 250;
SDL_Event e;
SDL_Init ( SDL_INIT_VIDEO );
SDL_Window * window = SDL_CreateWindow ( "Spring Sim", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
SDL_Renderer * renderer = SDL_CreateRenderer ( window, -1, 0 );
SDL_SetRenderDrawColor( renderer, 255, 255, 255, 255 );
while ( !quit ) {
capTimer.start();
while( SDL_PollEvent( &e ) != 0 ) {
if( e.type == SDL_QUIT ) {
quit = true;
}
if( e.type == SDL_KEYDOWN ) {
if ( e.key.keysym.sym == SDLK_ESCAPE )
quit = true;
}
}
SimUpdate( float( SCREEN_TICK_PER_FRAME ), mousePosX, mousePosY );
/*
switch ( event.type ) {
case SDL_QUIT:
quit = true;
break;
case SDL_KEYDOWN:
switch ( event.key.keysym.sym ) {
case SDLK_ESCAPE:
quit = true;
break;
}
break;
}*/
float avgFPS = countedFrames / ( fpsTimer.getTicks() / 1000.f );
if( avgFPS > 2000000 ) {
avgFPS = 0;
}
SDL_SetRenderDrawColor( renderer, 0, 0, 0, 255 );
SDL_RenderClear( renderer );
SDL_GetMouseState( &mousePosX, &mousePosY );
SDL_SetRenderDrawColor( renderer, 255, 255, 255, 255 );
//SDL_RenderDrawLine( renderer, mousePosX, mousePosY, 320, 240 );
for ( int a = 0; a < ropeSimulation->numOfMasses - 1; ++a) {
Mass* mass1 = ropeSimulation->getMass(a);
Vector2D* pos1 = &mass1->pos;
Mass* mass2 = ropeSimulation->getMass(a + 1);
Vector2D* pos2 = &mass2->pos;
SDL_RenderDrawLine( renderer, SCREEN_WIDTH / 2 + pos1->x * stowConst,
-1 * SCREEN_HEIGHT / 2 + ( pos1->y + 1.92 ) * stowConst,
SCREEN_WIDTH / 2 + pos2->x * stowConst,
-1 * SCREEN_HEIGHT / 2 + ( pos2->y + 1.92 ) * stowConst );
//if (a == 0) printf( "pos: %f, %f;", pos1->x, -1*pos1->y );
}
SDL_RenderPresent( renderer );
++countedFrames;
int frameTicks = capTimer.getTicks();
if( frameTicks < SCREEN_TICK_PER_FRAME ) {
SDL_Delay( SCREEN_TICK_PER_FRAME - frameTicks );
}
}
SDL_DestroyRenderer ( renderer );
SDL_DestroyWindow ( window );
SDL_Quit ();
return 0;
}
|
e89491ad7d8536924d17eb4429d08e3386133cc3
|
[
"Markdown",
"C++"
] | 4
|
C++
|
Nealsbo/Rope
|
db4a7295b412f744d0fe6a9f88e856235c1152ba
|
6dfa36f21ff31c126e05c4d61cdf002f8d240682
|
refs/heads/main
|
<repo_name>SandaliSenarathne/Markdown_Viewer<file_sep>/settings.gradle
include ':app'
rootProject.name = "Markdown Viewer"<file_sep>/app/src/main/java/com/infinisolutions/markdownviewer/MainActivity.java
package com.infinisolutions.markdownviewer;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import br.tiagohm.markdownview.MarkdownView;
import br.tiagohm.markdownview.css.styles.Github;
public class MainActivity extends AppCompatActivity {
MarkdownView mMarkdownView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mMarkdownView = (MarkdownView)findViewById(R.id.markdown_view);
mMarkdownView.addStyleSheet(new Github());
mMarkdownView.loadMarkdown("**MarkdownView** is working");
}
}
|
a17cc1bb3f148f985e0f3ee96897abd5cc7d0300
|
[
"Java",
"Gradle"
] | 2
|
Gradle
|
SandaliSenarathne/Markdown_Viewer
|
51db87cac6c7c2ad93bc631c93d66455b8294d60
|
0a153ec739903ccc2febc3fcb2465614b7d43cd5
|
refs/heads/master
|
<repo_name>hadyh/edata-1<file_sep>/list_kelas_pengetahuan.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> E DATA </title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<?php
include "link_css.php";
?>
</head>
<body class="hold-transition skin-green sidebar-mini">
<div class="wrapper">
<?php
include "header.php";
?>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<?php include "sidebar.php"; ?>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<section class="content container-fluid">
<div class="box container">
<div class="box-header">
<h1> Data Kelas </h1>
</div>
<table class='table table-striped'>
<thead>
<tr>
<th> No </th>
<th> Nama Kelas </th>
<th> Lihat Siswa </th>
</tr>
</thead>
<tbody>
<?php
include "conf/conn.php";
$q = $db->select("*","data_kelas");
if ($db->getTableRows($q) === 0){
echo "tidak ada data";
} else {
$i = 0;
while ($row = $db->fetch($q)){
$i++;
echo "<tr>
<td>".$i."</td>
<td>".$row['nama_kelas']."</td>";
echo "<td><a href='pengetahuan.php?kode_kelas=".$row['kode_kelas']."&nama_kelas=".$row['nama_kelas']."' ><button class='btn btn-primary'>lihat siswa</button></a> </td>";
}
}
?>
</tbody>
</table>
</div>
</section>
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<?php
include "footer.php";
?>
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>
<script>
$(document).on("click", ".edit_kelas", function () {
var id = $(this).data('id');
var arr_id = id.split(",")
$('#val1').val(arr_id[1]);
$("#id_kelas").val( arr_id[0] );
$('#data_kelas').modal('show');
});
</script>
</body>
</html>
|
ef30c9928fc4ff79bf3d9d9183a1a80c976e071b
|
[
"PHP"
] | 1
|
PHP
|
hadyh/edata-1
|
98cb9bb4add2b7dbf38fb7f841ec850ca936c4e9
|
f2d477c886685bfc950d080ce9c3a564cd6826d8
|
refs/heads/master
|
<repo_name>archibate/toaruos<file_sep>/base/etc/startup.d/00_tmpfs.sh
#!/bin/sh
mount tmpfs tmp,777 /tmp
mount tmpfs var,755 /var
mkdir /var/run
<file_sep>/base/etc/startup.d/99_runstart.sh
#!/bin/sh
export-cmd START kcmdline -g start
# We haven't actually hit a login yet, so make sure these are set here...
export USER=root
export HOME=/home/root
if equals? "$START" "--vga" then exec /bin/terminal-vga -l
if equals? "$START" "--headless" then exec /bin/getty
if empty? "$START" then exec /bin/compositor else exec /bin/compositor $START
<file_sep>/base/etc/startup.d/98_qemu_login.sh
#!/bin/sh
if not qemu-fwcfg -q opt/org.toaruos.forceuser then exit 0
export-cmd TERM qemu-fwcfg opt/org.toaruos.term
export-cmd QEMU_USER qemu-fwcfg opt/org.toaruos.forceuser
/bin/petty -a "$QEMU_USER" "/dev/net/10.0.2.1:8090"
reboot
<file_sep>/apps/crc32.c
/* vim: tabstop=4 shiftwidth=4 noexpandtab
* This file is part of ToaruOS and is released under the terms
* of the NCSA / University of Illinois License - see LICENSE.md
* Copyright (C) 2018 <NAME>
*
* crc32 - Simple CRC32 calculator for verifying file integrity.
*/
#include <stdio.h>
#include <errno.h>
static unsigned int crctab[256] = {
0x00000000, 0x09073096, 0x120e612c, 0x1b0951ba,
0xff6dc419, 0xf66af48f, 0xed63a535, 0xe46495a3,
0xfedb8832, 0xf7dcb8a4, 0xecd5e91e, 0xe5d2d988,
0x01b64c2b, 0x08b17cbd, 0x13b82d07, 0x1abf1d91,
0xfdb71064, 0xf4b020f2, 0xefb97148, 0xe6be41de,
0x02dad47d, 0x0bdde4eb, 0x10d4b551, 0x19d385c7,
0x036c9856, 0x0a6ba8c0, 0x1162f97a, 0x1865c9ec,
0xfc015c4f, 0xf5066cd9, 0xee0f3d63, 0xe7080df5,
0xfb6e20c8, 0xf269105e, 0xe96041e4, 0xe0677172,
0x0403e4d1, 0x0d04d447, 0x160d85fd, 0x1f0ab56b,
0x05b5a8fa, 0x0cb2986c, 0x17bbc9d6, 0x1ebcf940,
0xfad86ce3, 0xf3df5c75, 0xe8d60dcf, 0xe1d13d59,
0x06d930ac, 0x0fde003a, 0x14d75180, 0x1dd06116,
0xf9b4f4b5, 0xf0b3c423, 0xebba9599, 0xe2bda50f,
0xf802b89e, 0xf1058808, 0xea0cd9b2, 0xe30be924,
0x076f7c87, 0x0e684c11, 0x15611dab, 0x1c662d3d,
0xf6dc4190, 0xffdb7106, 0xe4d220bc, 0xedd5102a,
0x09b18589, 0x00b6b51f, 0x1bbfe4a5, 0x12b8d433,
0x0807c9a2, 0x0100f934, 0x1a09a88e, 0x130e9818,
0xf76a0dbb, 0xfe6d3d2d, 0xe5646c97, 0xec635c01,
0x0b6b51f4, 0x026c6162, 0x196530d8, 0x1062004e,
0xf40695ed, 0xfd01a57b, 0xe608f4c1, 0xef0fc457,
0xf5b0d9c6, 0xfcb7e950, 0xe7beb8ea, 0xeeb9887c,
0x0add1ddf, 0x03da2d49, 0x18d37cf3, 0x11d44c65,
0x0db26158, 0x04b551ce, 0x1fbc0074, 0x16bb30e2,
0xf2dfa541, 0xfbd895d7, 0xe0d1c46d, 0xe9d6f4fb,
0xf369e96a, 0xfa6ed9fc, 0xe1678846, 0xe860b8d0,
0x0c042d73, 0x05031de5, 0x1e0a4c5f, 0x170d7cc9,
0xf005713c, 0xf90241aa, 0xe20b1010, 0xeb0c2086,
0x0f68b525, 0x066f85b3, 0x1d66d409, 0x1461e49f,
0x0edef90e, 0x07d9c998, 0x1cd09822, 0x15d7a8b4,
0xf1b33d17, 0xf8b40d81, 0xe3bd5c3b, 0xeaba6cad,
0xedb88320, 0xe4bfb3b6, 0xffb6e20c, 0xf6b1d29a,
0x12d54739, 0x1bd277af, 0x00db2615, 0x09dc1683,
0x13630b12, 0x1a643b84, 0x016d6a3e, 0x086a5aa8,
0xec0ecf0b, 0xe509ff9d, 0xfe00ae27, 0xf7079eb1,
0x100f9344, 0x1908a3d2, 0x0201f268, 0x0b06c2fe,
0xef62575d, 0xe66567cb, 0xfd6c3671, 0xf46b06e7,
0xeed41b76, 0xe7d32be0, 0xfcda7a5a, 0xf5dd4acc,
0x11b9df6f, 0x18beeff9, 0x03b7be43, 0x0ab08ed5,
0x16d6a3e8, 0x1fd1937e, 0x04d8c2c4, 0x0ddff252,
0xe9bb67f1, 0xe0bc5767, 0xfbb506dd, 0xf2b2364b,
0xe80d2bda, 0xe10a1b4c, 0xfa034af6, 0xf3047a60,
0x1760efc3, 0x1e67df55, 0x056e8eef, 0x0c69be79,
0xeb61b38c, 0xe266831a, 0xf96fd2a0, 0xf068e236,
0x140c7795, 0x1d0b4703, 0x060216b9, 0x0f05262f,
0x15ba3bbe, 0x1cbd0b28, 0x07b45a92, 0x0eb36a04,
0xead7ffa7, 0xe3d0cf31, 0xf8d99e8b, 0xf1deae1d,
0x1b64c2b0, 0x1263f226, 0x096aa39c, 0x006d930a,
0xe40906a9, 0xed0e363f, 0xf6076785, 0xff005713,
0xe5bf4a82, 0xecb87a14, 0xf7b12bae, 0xfeb61b38,
0x1ad28e9b, 0x13d5be0d, 0x08dcefb7, 0x01dbdf21,
0xe6d3d2d4, 0xefd4e242, 0xf4ddb3f8, 0xfdda836e,
0x19be16cd, 0x10b9265b, 0x0bb077e1, 0x02b74777,
0x18085ae6, 0x110f6a70, 0x0a063bca, 0x03010b5c,
0xe7659eff, 0xee62ae69, 0xf56bffd3, 0xfc6ccf45,
0xe00ae278, 0xe90dd2ee, 0xf2048354, 0xfb03b3c2,
0x1f672661, 0x166016f7, 0x0d69474d, 0x046e77db,
0x1ed16a4a, 0x17d65adc, 0x0cdf0b66, 0x05d83bf0,
0xe1bcae53, 0xe8bb9ec5, 0xf3b2cf7f, 0xfab5ffe9,
0x1dbdf21c, 0x14bac28a, 0x0fb39330, 0x06b4a3a6,
0xe2d03605, 0xebd70693, 0xf0de5729, 0xf9d967bf,
0xe3667a2e, 0xea614ab8, 0xf1681b02, 0xf86f2b94,
0x1c0bbe37, 0x150c8ea1, 0x0e05df1b, 0x0702ef8d,
};
#define RBUF_SIZE 10240
int main(int argc, char * argv[]) {
if (argc < 2) {
fprintf(stderr, "usage: %s FILE\n", argv[0]);
return 1;
}
FILE * f = fopen(argv[1], "r");
if (!f) {
fprintf(stderr, "%s: %s: %s\n", argv[0], argv[1], strerror(errno));
return 1;
}
char buf[RBUF_SIZE];
unsigned int crc32 = 0xffffffff;
while (!feof(f)) {
size_t r = fread(buf, 1, RBUF_SIZE, f);
for (size_t i = 0; i < r; ++i) {
int ind = (crc32 ^ buf[i]) & 0xFF;
crc32 = (crc32 >> 8) ^ (crctab[ind]);
}
}
crc32 ^= 0xffffffff;
fprintf(stdout, "0x%x\n", (unsigned int)crc32);
return 0;
}
|
8111431ac0fb8a4916d2768099b93779e060ed8b
|
[
"C",
"Shell"
] | 4
|
Shell
|
archibate/toaruos
|
dfb176abe579727f9e4ea1f7df16d1379f0873b3
|
40269a3f0a5e0c4099eaf98862b60649e1ca8be8
|
refs/heads/master
|
<repo_name>laisengui/smallioc<file_sep>/src/main/java/cn/lsg/smallioc/annotation/Member.java
package cn.lsg.smallioc.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 需要控制反转的成员.
*
* @author <NAME>
* @created 2017-12-23 下午7:49:44
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface Member {
//枚举
public enum field{id,single}
//被注解的类的id
public String id() default "";
//是否单例
public boolean single() default true;
}
<file_sep>/src/main/java/cn/lsg/smallioc/annotation/Inject.java
package cn.lsg.smallioc.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 依赖注入 注解
*
* @author <NAME>
* @created 2017-12-23 下午8:18:22
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD })
public @interface Inject {
// 注入的时候如果要根据类成员的id则填,否则直接根据类型自己寻找注入。未找到或找到多个抛异常
public String id() default "";
}
<file_sep>/src/main/java/cn/lsg/smallioc/model/FieldDefine.java
package cn.lsg.smallioc.model;
import java.lang.reflect.Field;
/**
* 属性的描述
* @author <NAME>
* @created 2017-12-24 上午9:57:42
*/
public class FieldDefine {
//ID
private String id;
//注入id
private boolean injectById;
//类型
private Class type;
//原始field类
private Field field;
public FieldDefine(String id, boolean injectById, Class type, Field field) {
super();
this.id = id;
this.injectById = injectById;
this.type = type;
this.field = field;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @return type
*/
public String getId() {
return id;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @return type
*/
public boolean isInjectById() {
return injectById;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @return type
*/
public Class getType() {
return type;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @param id
*/
public void setId(String id) {
this.id = id;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @param injectById
*/
public void setInjectById(boolean injectById) {
this.injectById = injectById;
}
/**
* @author <NAME>
* @created 2017-12-24 上午9:58:29
* @param type
*/
public void setType(Class type) {
this.type = type;
}
/**
* @author <NAME>
* @created 2017-12-24 上午10:03:55
* @return type
*/
public Field getField() {
return field;
}
/**
* @author <NAME>
* @created 2017-12-24 上午10:03:55
* @param field
*/
public void setField(Field field) {
this.field = field;
}
/**
* 描述
* @author <NAME>
* @created 2017-12-24 下午5:51:15
* @return
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "FieldDefine [id=" + id + ", injectById=" + injectById + ", type=" + type + ", field=" + field + "]";
}
}
<file_sep>/src/main/java/cn/lsg/smallioc/util/ClassAnalysis.java
package cn.lsg.smallioc.util;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import cn.lsg.smallioc.exception.SmalliocException;
/**
* 类解析
*
* @author <NAME>
* @created 2017-12-23 下午11:01:59
*/
public class ClassAnalysis {
/**
* 获取类下指定注解
* @author <NAME>
* @created 2017-12-24 下午5:54:51
* @param clazz
* @param annoClass
* @return
*/
public static Annotation getClassAnnotation(Class clazz, Class annoClass) {
return clazz.getAnnotation(annoClass);
}
/**
* 是否有指定的注解
*
* @author <NAME>
* @created 2017-12-23 下午11:20:49
* @param clazz
* @param annoClass
* @return
*/
public static boolean hasAnno(Class clazz, Class annoClass) {
return getClassAnnotation(clazz, annoClass) == null ? false : true;
}
/**
* 获取注解属性
* @author <NAME>
* @created 2017-12-24 上午12:22:47
* @param anno
* @param methodName
* @return
*/
public static Object getAnnoVal(Annotation anno, String methodName) {
Method m;
try {
m = anno.annotationType().getMethod(methodName);
if (!m.isAccessible()) {
m.setAccessible(true);
}
return m.invoke(anno);
} catch (Exception e) {
throw new SmalliocException("获取注解属性失败",e);
}
}
}
<file_sep>/README.md
微小型的IOC容器
======================================================
起因
--------------------------------------------------
起因是由于我在编写工作中需要的GUI小工具时候遇到了很多对象之间引用的麻烦,突然感觉到习惯了spring 带来的IOC的便利后很难回到原始的状态。<br>
我试图把spring中的IOC功能拆分开来,最后得到了将近3M的各种jar包,而我写的代码才100k。spring实在是太强大了,但他也越来越臃肿,而我只想要简单的IOC功能。<br>
最终我决定为自己写一个微型的纯粹的IOC框架,顺便学习下Spring。
设计
----------------------------------------------------
因为离开了AOP后其实Ioc的一些功能也会受到影响。所以这个工程只有很弱的基础IOC功能<br>
我想让工程往极简方向发展,所以取消了XML 和properties配置文件。<br>
支持的最简单的配置放在了初始化容器之前的静态方法里,包括日志记录<br>
所有代码加起来的大小只有50k,适用于自己练习小的project项目 或制作小工具等<br>
工程只是简单完成 并使用在了我自己的一个小工具上,未经过任何完整的测试<br>
代码里只有 cn路径下是源码,其他都是无效的测试类<br>
使用
---------------------------------------------------
核心包 cn.lsg.smallioc.core 内的ApplicationContext是 唯一入口<br>
```java
public class Test{
public static void main(String[] args) {
//设置默认日志记录器配置
ApplicationContext.setDefaultLoggerParams(true, false, LEVEL.debug, "C:/Users/Administrator/Desktop");
//获取容器对象 首次获取容器对象必须传入一个或多个扫描的包路径,
ApplicationContext app = ApplicationContext.getContext("com");
//或者
ApplicationContext app = ApplicationContext.getContext("com","cn.lsg","org.lsg");
//当容器初始化完成后 则可以传空参获取容器对象
ApplicationContext app = ApplicationContext.getContext();
//获取非注入的获取实例对象可以通过ApplicationContext内的方法
A a1=app.getbean(A.class);//根据类型
A a2=(A) app.getbean("aaa");//根据id 要强制转换
A a3=app.getbean("aaa",A.class);//根据id
}}
```
将类纳入容器管理目前只支持注解 这里的注解只有两个:<br>
inject(id) id不输则默认按类型注入,可以是根据接口类型注入但要保证接口下只有唯一的受管类,否则必须使用id <br>
member(id,single) id默认首字母小写的类名,默认单例<br>
```java
@Member(id="jijij")
public class A implements O{
@Inject
public B b;
}
```
```java
@Member(single=false)
public class B implements O {
@Inject(id="jijij")
public A a;
@Inject
public C c;
}
```
<file_sep>/src/main/java/cn/lsg/smallioc/util/SUtil.java
package cn.lsg.smallioc.util;
/**
* 字符串工具
* @author <NAME>
* @created 2017-12-23 下午10:30:27
*/
public class SUtil {
/**
* 如果字符串为null 或者长度为0返回 true
* @author <NAME>
* @created 2017-12-23 下午10:31:18
* @param str
* @return
*/
public static boolean isEmp(String str){
return str==null||str.length()==0;
}
/**
* 如果字符串不为null 且长度不为0返回 true
* @author <NAME>
* @created 2017-12-23 下午10:31:18
* @param str
* @return
*/
public static boolean isNotEmp(String str){
return !isEmp(str);
}
/**
* 将首字母小写
* @author <NAME>
* @created 2017-12-24 上午1:02:13
* @param str
* @return
*/
public static String firstLow(String str){
if (isEmp(str)) {
return str;
}
char c = str.charAt(0);
if (c>='A'&&c<='Z') {
c+=32;
}
char[] array = str.toCharArray();
array[0]=c;
return new String(array);
}
}
<file_sep>/src/main/java/cn/lsg/smallioc/core/ApplicationContext.java
package cn.lsg.smallioc.core;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cn.lsg.smallioc.exception.SmalliocException;
import cn.lsg.smallioc.log.Logger;
import cn.lsg.smallioc.log.LoggerImpl;
import cn.lsg.smallioc.model.BeanDefine;
import cn.lsg.smallioc.model.FieldDefine;
import cn.lsg.smallioc.model.MethodDefine;
import cn.lsg.smallioc.util.SUtil;
/**
* IOC容器
*
* @author <NAME>
* @created 2017-12-24 上午12:30:13
*/
public class ApplicationContext {
// 日志记录工具 默认使用自己的实现类,可以更换
private static Logger logUtil;
// 单例
private static ApplicationContext app;
// id---beandefine
private HashMap<String, BeanDefine> idContext;
// beandefine
private List<BeanDefine> beanDefine;
// class(inteface)---beandefine
private HashMap<Class, BeanDefine> typeContext;
// class----beandefine
private HashMap<Class, BeanDefine> class2BeanDefine;
/**
* 私有构造
*
* @author <NAME>
* @param packagePath
* @created 2017-12-24 上午12:30:43
*/
private ApplicationContext(String[] packagePath) {
super();
initContext(packagePath);
}
/**
* 如果不满意 不想用 默认的日志记录器 可以替换其他日志记录器.<br>
* 替换方法为 创建类实现Logger接口,并在接口方法内调用其他日志记录器的方法.只能是容器实例化前设置
*
* @author <NAME>
* @created 2017-12-24 下午5:02:30
* @param log
* @return 返回 替换是否成功
*/
public static boolean replaceLogger(Logger log) {
if (app == null && log != null) {
logUtil = log;
return true;
}
return false;
}
/**
* 设置默认日志记录器的参数 对自定义的日志记录器无效.如果只想设置其中一个或几个参数 其他参数 设置Null 即可.只能是容器实例化前设置
*
* @author <NAME>
* @created 2017-12-24 下午4:58:27
* @param print2Console
* 是否输出到控制台
* @param printFile
* 是否输出到文件
* @param logLevel
* 输出等级
* @param dirUrl
* 输出到文件到 文件夹路径 不填 默认 运行路径
* @return 返回日志配置是否更改成功
*/
public static boolean setDefaultLoggerParams(Boolean print2Console, Boolean printFile, Logger.LEVEL logLevel,
String dirUrl) {
if (app != null) {
return false;
}
if (printFile != null) {
LoggerImpl.setPrint2File(printFile);
}
if (print2Console != null) {
LoggerImpl.setPrint2Console(print2Console);
}
if (logLevel != null) {
LoggerImpl.setLogLevel(logLevel);
}
if (SUtil.isNotEmp(dirUrl)) {
LoggerImpl.setDirUrl(dirUrl);
}
return true;
}
/**
* 返回日志记录
*
* @author <NAME>
* @created 2017-12-24 下午5:07:39
* @return
*/
public static String retDefaultLoggerParams() {
return LoggerImpl.retParams();
}
/**
* 获取记录器
*
* @author <NAME>
* @created 2017-12-24 下午5:11:06
* @return
*/
public static Logger getLog() {
if (logUtil == null) {
logUtil = new LoggerImpl();
}
return logUtil;
}
/**
* 返回容器实例. 容器最多只能有一个,第一次调用必须传入至少一个有效的包路径
*
* @author <NAME>
* @created 2017-12-24 上午12:33:54
* @param packagePath
* 包路径 例:com.lsg.util 、com
* @return
*/
public static ApplicationContext getContext(String... packagePath) {
if (packagePath == null) {
if (app == null) {
throw new SmalliocException("容器未初始化,必须先传入扫描路径初始化");
}
return app;
}
app = new ApplicationContext(packagePath);
return app;
}
/**
* 根据类型获取bean
*
* @author <NAME>
* @created 2017-12-24 下午12:17:00
* @param clazz
* @return
*/
public <T> T getbean(Class<T> clazz) {
if (typeContext.containsKey(clazz)) {
return (T) checkBean(typeContext.get(clazz));
}
throw new SmalliocException("未找到对应类型的bean,或对应类型到bean有多个");
}
/**
* 根据id获取bean
*
* @author <NAME>
* @created 2017-12-24 下午12:17:11
* @param id
* @param clazz
* @return
*/
public <T> T getbean(String id, Class<T> clazz) {
if (idContext.containsKey(id)) {
return (T) checkBean(idContext.get(id));
}
throw new SmalliocException("未找到对应id的bean");
}
/**
* 根据id获取bean
*
* @author <NAME>
* @created 2017-12-24 下午12:17:11
* @param id
* @param clazz
* @return
*/
public Object getbean(String id) {
if (idContext.containsKey(id)) {
return checkBean(idContext.get(id));
}
throw new SmalliocException("未找到对应id的bean");
}
/**
* 提取出bean.如果是单例直接给 如果不是 先克隆再给
*
* @author <NAME>
* @param <T>
* @created 2017-12-24 下午12:22:05
* @param beanDefine2
* @return
*/
private Object checkBean(BeanDefine beanDefine) {
if (beanDefine.isSingle()) {
return beanDefine.getBean();
}
getLog().debug("根据原型克隆新实例: " + beanDefine.getClazz().getSimpleName());
return deepClone(beanDefine, null);
}
/**
* 深度克隆
*
* @author <NAME>
* @created 2017-12-24 下午12:39:02
* @param beanDefine
* @param classContext
* 深度克隆中 每个新建的多例 实例都会放入这里 而遇到同样的多例实例优先从这里取,这代表即使是多例
* 在一次深度克隆中也只会创建一个实例
* @throws InstantiationException
* @throws IllegalAccessException
*/
private Object deepClone(BeanDefine beanDefine, Map<Class, Object> classContext) {
try {
if (classContext == null) {
classContext = new HashMap<>();
}
Class clazz = beanDefine.getClazz();
Object bean = beanDefine.getBean();// 原始对象
Object newInst = clazz.newInstance();// 新对象
getLog().debug("#克隆实例: " + newInst);
classContext.put(clazz, newInst);
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
boolean staticOrFinal = Modifier.isStatic(field.getModifiers())
|| Modifier.isFinal(field.getModifiers());
if (staticOrFinal) {// 如果是静态或final 不管
continue;
}
if (!field.isAccessible()) {
field.setAccessible(true);
}
Object resoult = field.get(bean);
if (resoult == null) {// 如果为空 不管
continue;
}
if (!class2BeanDefine.containsKey(field.getType())) {
continue;// 如果不是受管类不管 因为克隆对象和原始对象都是刚newinstance出来的
// 不会有非受管对象方面的差异
}
BeanDefine targetBeanDefine = class2BeanDefine.get(field.getType());
Object targetBean = null;
if (targetBeanDefine.isSingle()) {
targetBean = targetBeanDefine.getBean();
} else {
if (classContext.containsKey(targetBeanDefine.getClazz())) {
targetBean = classContext.get(targetBeanDefine.getClazz());
} else {
targetBean = deepClone(targetBeanDefine, classContext);
}
}
getLog().debug("##注入属性: " + targetBean + " ===> " + field.getName());
field.set(newInst, targetBean);
}
return newInst;
} catch (Exception e) {
throw new SmalliocException("深度克隆多例bean异常", e);
}
}
/**
* 初始化容器
*
* @author <NAME>
* @created 2017-12-24 上午12:40:17
* @param packagePath
*/
private void initContext(String[] packagePath) {
getLog().debug("=================================初始化IOC容器【smallioc】===================================");
ClassCollection coll = new ClassCollection();
getLog().debug("扫描路径下所有类..............");
List<Class> scanClass = coll.scanClass(packagePath);
getLog().debug("扫描所有类下的被注解的类..............");
List<Class> needManage = coll.filterNeedManage(scanClass);
getLog().debug("创建beandefine..............");
beanDefine = coll.createBeanDefine(needManage);
// 对beandefine进行整理
buildContext();
// 初始化所有不管是否单例
getLog().debug("初始化bean..............");
for (BeanDefine b : beanDefine) {
b.initBean();
getLog().debug("初始化bean " + b.getBean());
}
// 对所有bean进行注入 此时多例的类也当成单例注入
getLog().debug("注入组装..............");
injectBean();
// 对多例的bean原型进行克隆过 斩断和 之前注入的bean的关系
getLog().debug("克隆生成多例bean原型..............");
for (BeanDefine b : beanDefine) {
if (!b.isSingle()) {
getLog().debug("生成原型: " + b.getClazz().getSimpleName());
b.setBean(deepClone(b, null));
}
}
getLog().debug("=================================IOC容器【smallioc】初始化完成===================================");
getLog().flush();
}
/**
* 注入组装
*
* @author <NAME>
* @created 2017-12-24 下午12:11:57
*/
private void injectBean() {
for (BeanDefine b : beanDefine) {
getLog().debug("#组装实例: " + b.getBean());
List<FieldDefine> fieldDefine = b.getFieldDefine();
for (FieldDefine f : fieldDefine) {
Field field = f.getField();
if (!field.isAccessible()) {
field.setAccessible(true);
}
BeanDefine target = findBeanDefine(f.isInjectById(), f.getId(), f.getType());
try {
getLog().debug("##注入属性: " + target.getBean() + " ===> " + field.getName());
field.set(b.getBean(), target.getBean());
} catch (IllegalArgumentException e) {
throw new SmalliocException("无效参数", e);
} catch (IllegalAccessException e) {
throw new SmalliocException("属性不可访问", e);
}
}
List<MethodDefine> methodDefine = b.getMethodDefine();
for (MethodDefine m : methodDefine) {
Method method = m.getMethod();
if (!method.isAccessible()) {
method.setAccessible(true);
}
BeanDefine target = findBeanDefine(m.isInjectById(), m.getId(), m.getType());
try {
getLog().debug("##注入方法 : " + target.getBean() + " ===> " + method.getName());
method.invoke(b.getBean(), target.getBean());
} catch (IllegalAccessException e) {
throw new SmalliocException("方法不可访问", e);
} catch (IllegalArgumentException e) {
throw new SmalliocException("无效参数", e);
} catch (InvocationTargetException e) {
throw new SmalliocException("底层异常", e);
}
}
}
}
/**
* 寻找对应id或类型的 bean定义
*
* @author <NAME>
* @created 2017-12-24 上午11:36:17
* @param isById
* @param id
* @param type
* @return
*/
private BeanDefine findBeanDefine(boolean isById, String id, Class type) {
BeanDefine target = null;
if (isById) {
if (!idContext.containsKey(id)) {
throw new SmalliocException("属性注入失败,未找到Id=" + id + "对应的bean");
}
target = idContext.get(id);
// 判断 属性所表示的类型是否 和 找到的实例的类型一致 或者至少是其上层类或接口
if (!type.isAssignableFrom(target.getClazz())) {
throw new SmalliocException("id所属实例的类型和属性不匹配: id=" + id + " 属性类型: " + type.getName() + " 实例类型: "
+ target.getClazz().getName());
}
} else {
if (!typeContext.containsKey(type)) {
throw new SmalliocException("根据类型找到类0个或多个实例:" + type.getName());
}
target = typeContext.get(type);
}
return target;
}
/**
* 整理结构
*
* @author <NAME>
* @created 2017-12-24 上午10:52:13
*/
private void buildContext() {
// 根据id进行整理
getLog().debug("初始化ID容器");
idContext = new HashMap<String, BeanDefine>();
for (BeanDefine b : beanDefine) {
if (idContext.containsKey(b.getId())) {
throw new SmalliocException("指定的Member id冲突");
}
getLog().debug("ID容器: 【 " + b.getId() + " <===>" + b.toString() + " 】");
idContext.put(b.getId(), b);
}
// 根据类型进行整理
// 类型对应 beandefine 不算接口的
getLog().debug("初始化类型容器");
class2BeanDefine = new HashMap<Class, BeanDefine>();
typeContext = new HashMap<Class, BeanDefine>();
List<Class> disableInterface = new ArrayList<>();// 这些接口不能根据类型注入,因为存在多个管理的实现类
for (BeanDefine b : beanDefine) {
class2BeanDefine.put(b.getClazz(), b);
typeContext.put(b.getClazz(), b);
Class[] interfaces = b.getInterfaces();
for (Class c : interfaces) {
if (typeContext.containsKey(c)) {
disableInterface.add(c);
continue;
}
typeContext.put(c, b);
}
getLog().debug("类型容器: 【 " + b.getClazz().getSimpleName() + " <===>" + b.toString() + " 】");
}
for (Class d : disableInterface) {
typeContext.remove(d);
getLog().debug(d.getSimpleName() + " 类型同时存在多个实例,不能根据类型寻找实例,将从类型容器删除");
}
}
}
|
c7909b492c8715c19b7ea3e059f40479b821a5d1
|
[
"Markdown",
"Java"
] | 7
|
Java
|
laisengui/smallioc
|
b9152809b8e655ab65ae92764f95e0254e4dcb7d
|
266ce3a5e49db452e647ad9c1aae203eb92dd248
|
refs/heads/master
|
<file_sep>from django.shortcuts import render
from items.models import Item
from rest_framework.generics import ListAPIView, RetrieveAPIView, DestroyAPIView, RetrieveUpdateAPIView
from rest_framework.filters import SearchFilter, OrderingFilter
from .serializers import ItemListSerializer, ItemDetailSerializer
from rest_framework.permissions import AllowAny, IsAuthenticated, IsAdminUser
from .permissions import IsOwnerOrStaff
class ItemListView(ListAPIView):
queryset = Item.objects.all()
serializer_class = ItemListSerializer
filter_backends = [OrderingFilter, SearchFilter,]
search_fields = ['name', 'description', 'image']
permission_classes = [AllowAny,]
class ItemDetailView(RetrieveAPIView):
queryset = Item.objects.all()
serializer_class = ItemDetailSerializer
lookup_field = 'id'
lookup_url_kwarg = 'item_id'
permission_classes = [IsOwnerOrStaff,]
<file_sep>from rest_framework import serializers
from items.models import Item, FavoriteItem
from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['first_name', 'last_name']
class UserFavoriteItemSerializer(serializers.ModelSerializer):
user = UserSerializer()
class Meta:
model = FavoriteItem
fields = ['user']
class ItemListSerializer(serializers.ModelSerializer):
detail = serializers.HyperlinkedIdentityField(
view_name = 'api-item-detail',
lookup_field = 'id',
lookup_url_kwarg = 'item_id'
)
favorited = serializers.SerializerMethodField()
added_by = UserSerializer()
def get_favorited(self, obj):
return obj.favs.count()
class Meta:
model = Item
fields = ['id', 'image', 'name', 'description', 'detail', 'added_by', 'favorited']
class ItemDetailSerializer(serializers.ModelSerializer):
favs = UserFavoriteItemSerializer(many=True)
class Meta:
model = Item
fields = ['id', 'image', 'name', 'description', 'added_by', 'favs']
<file_sep>
from rest_framework.permissions import BasePermission
class IsOwnerOrStaff(BasePermission):
message = 'You shall not pass'
def has_object_permission(self, request, view, obj):
if request.user == obj.added_by:
return True
return False
|
618e32c299a845fecc492daa19a1699fafe4c97d
|
[
"Python"
] | 3
|
Python
|
AymanAlshanqiti/wishlist-api
|
ef152da272153ec00e822a16880a07c9988df3bd
|
7f018879b661e4a6780bff54b5703e4b59e9673a
|
refs/heads/master
|
<repo_name>xjmeng001/GPU-accelerated-FDTD-based-SAR-Simulations<file_sep>/README.md
# GPU-accelerated-FDTD-based-SAR-Simulations
Parallel Specific Absorption Rate using 3D Finite-Difference Time-Domain algorithm on CUDA framework.
## Introduction
3D FDTD is computationally expensive due to its volumetric nature. Using CUDA, a GPU based implementation accelerates the algorithm. This faster implementation aids faster calculation of SAR for given frequency.
## Requirements
CUDA
Thrust library
Intel compilers
## src Modules
1. serial - serial C implementation of FDTD based SAR
2. parallel - FDTD based SAR accelerated using CUDA-C
## Compilation Guide
1. For serial implementation, use intel compilers and compile it using
icc -mcmodel="large" serial_fdtd.c
2. For parallel implementation, compile using
nvcc -arch=compute_35 -code=sm_35 parallelfdtd.cu
<file_sep>/src/serial/var.h
#include <math.h>
/*
#define NX 91
#define NY 91
#define NZ 131
#define NX1 NX-1
#define NY1 NY-1
#define NZ1 NZ-1
#define mdim1 2
#define nstop 2500
#define ntest 2
*/
const int NX=111, NY=111, NZ=231;
const int NX1=NX-1, NY1=NY-1, NZ1=NZ-1;
const int mdim1=2;
const int nstop=1000;
const int ntest=2;
int IOBS[ntest], JOBS[ntest], KOBS[ntest];
double EXS[NX][NY][NZ], EYS[NX][NY][NZ], EZS[NX][NY][NZ];
double HXS[NX][NY][NZ], HYS[NX][NY][NZ], HZS[NX][NY][NZ];
int IDONE[NX][NY][NZ], IDTWO[NX][NY][NZ], IDTHREE[NX][NY][NZ];
double EXSY1[NX1][4][NZ1], EXSY2[NX1][4][NZ1];
double EXSZ1[NX1][NY1][4], EXSZ2[NX1][NY1][4];
double EYSX1[4][NY1][NZ1], EYSX2[4][NY1][NZ1];
double EYSZ1[NX1][NY1][4], EYSZ2[NX1][NY1][4];
double EZSX1[4][NY1][NZ1], EZSX2[4][NY1][NZ1];
double EZSY1[NX1][4][NZ1], EZSY2[NX1][4][NZ1];
double ESCTC[mdim1], EINCC[mdim1], EDEVCN[mdim1], ECRLX[mdim1], ECRLY[mdim1], ECRLZ[mdim1];
int nxc, nyc, nzc;
double delx=6.0e-3, dely=6.0e-3, delz=6.0e-3;
double radius2=3.0e-2;
double c=3.0e8;
double freq=300e6;
int iden=1145;
double dt, period, off, amp=1.0;
double ampx, ampy, ampz;
double ethinc=1.0, ephinc=0.0;
double xdisp, ydisp, zdisp;
double EPS[mdim1], SIGMA[mdim1], Ep[mdim1];
double dtedx, dtedy, dtedz, dtmdx, dtmdy, dtmdz;
double delay;
double cxd, cxu, cyd, cyu, czd, czu;
double cxx, cyy, czz, cxfyd, cxfzd, cyfxd, cyfzd, czfxd, czfyd;
double thinc=270.0, phinc=0.0;
double eps0=8.8542e-12, xmu0=1.2566306e-6;
double alpha=0.0, beta=110.0;
int nec;
int N;
double tau,t;
double sar[NX][NZ], erms[NX][NZ], s[NX], erms1d[NX];
double nrms,sar_Total,sar_wb,wholevol;
int cont,cont2;
const int wbsar=1,onegsar=1;
<file_sep>/src/serial/serial_fdtd.c
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <string.h>
#include <time.h>
#include <malloc.h>
#include <math.h>
#include "var.h"
#define pi 4.0*atan(1.0)
/* Function Declarations */
void zero();
void build();
void dcube();
void setup();
void exsfld();
void eysfld();
void ezsfld();
void radeyx();
void radezx();
void radezy();
void radexy();
void radexz();
void radeyz();
void hxsfld();
void hysfld();
void hzsfld();
double EXI(int, int, int);
double EYI(int, int, int);
double EZI(int, int, int);
double source(double);
double DEXI(int, int, int);
double DEYI(int, int, int);
double DEZI(int, int, int);
double dsrce(double);
void datsav();
double *emax, *etimeavg;
long long offset(int i, int j, int k){
return (i*NY*NZ+j*NZ+k);
}
//FILE *fp1;
//FILE *radfp;
/* Main */
int main(){
float runtime=0;
clock_t start=0;
clock_t stop=0;
start=clock();
zero();
build();
setup();
int i,j,k;
/*fp2=fopen("build.txt","w");
for(i=0;i<NX;i++){
for(j=0;j<NY;j++){
for(k=0;k<NZ;k++){
if(IDONE[i][j][k]==2)
fprintf(fp2,"%d %d %d %d\n",i,j,k,IDONE[i][j][k]);
}
}
}*/
FILE *fp;
//fsar=fopen("eavg.txt", "w");
fp=fopen("time.txt", "ab+");
/*radfp=fopen("zsx2.txt","w");*/
//fp1=fopen("etimeavg.txt", "w");
emax=(double*)malloc(NX*NY*NZ*sizeof(double));
etimeavg=(double*)malloc(NX*NY*NZ*sizeof(double));
float e_runtime=0;
clock_t e_start=0;
clock_t e_stop=0;
float h_runtime=0;
clock_t h_start=0;
clock_t h_stop=0;
float rad_runtime=0;
clock_t rad_start=0;
clock_t rad_stop=0;
float sar_runtime=0;
clock_t sar_start=0;
clock_t sar_stop=0;
for(N=1;N<=nstop;N++){
printf("%d\n", N);
//advance scattered electric field
e_start=clock();
exsfld();
eysfld();
ezsfld();
e_stop=clock();
e_runtime+=((float)e_stop-e_start)/CLOCKS_PER_SEC;
//apply radiation boundary condition (second order)
rad_start=clock();
radeyx();
radezx();
radezy();
radexy();
radexz();
radeyz();
rad_stop=clock();
rad_runtime+=((float)rad_stop-rad_start)/CLOCKS_PER_SEC;
//advance time by 1/2 time step
t=t+(dt/2.0);
//fprintf(fp, " %.15lf %d %.25lf\n",t, N,EZS[50][50][50]);
//advance scattered magentic field
h_start=clock();
hxsfld();
hysfld();
hzsfld();
h_stop=clock();
h_runtime+=((float)h_stop-h_start)/CLOCKS_PER_SEC;
t=t+(dt/2.0);
sar_start=clock();
datsav();
sar_stop=clock();
sar_runtime+=((float)sar_stop-sar_start)/CLOCKS_PER_SEC;
}
free(emax);
free(etimeavg);
stop=clock();
runtime=((float)stop-start)/CLOCKS_PER_SEC;
// fprintf(fp,,
fprintf(fp,"size: %d time: %lf %lf %lf %lf %lf\n",NX,runtime,e_runtime,h_runtime,rad_runtime,sar_runtime);
//fclose(fp1);
fclose(fp);
//fclose(radfp);
return 0;
}
/* Function Definitions */
void zero(){
int i, j, k;
for(i = 0; i <NX; i++)
{
for(j = 0; j<NY; j++)
{
for(k = 0; k<NZ; k++)
{
EXS[i][j][k]=0.0;
EYS[i][j][k]=0.0;
EZS[i][j][k]=0.0;
HXS[i][j][k]=0.0;
HYS[i][j][k]=0.0;
HZS[i][j][k]=0.0;
IDONE[i][j][k]=0;
IDTWO[i][j][k]=0;
IDTHREE[i][j][k]=0;
}
}
}
for(i = 0; i <4; i++)
{
for(j = 0; j<NY1; j++)
{
for(k = 0; k<NZ1; k++)
{
EYSX1[i][j][k]=0.0;
EYSX2[i][j][k]=0.0;
EZSX1[i][j][k]=0.0;
EZSX2[i][j][k]=0.0;
}
}
}
for(i = 0; i <NX1; i++)
{
for(j = 0; j<4; j++)
{
for(k = 0; k<NZ1; k++)
{
EXSY1[i][j][k]=0.0;
EXSY2[i][j][k]=0.0;
EZSY1[i][j][k]=0.0;
EZSY2[i][j][k]=0.0;
}
}
}
for(i = 0; i <NX1; i++)
{
for(j = 0; j<NY1; j++)
{
for(k = 0; k<4; k++)
{
EYSZ1[i][j][k]=0.0;
EYSZ2[i][j][k]=0.0;
EXSZ1[i][j][k]=0.0;
EXSZ2[i][j][k]=0.0;
}
}
}
for(i = 0; i<mdim1; i++)
{
ESCTC[i]=0.0;
EINCC[i]=0.0;
EDEVCN[i]=0.0;
ECRLX[i]=0.0;
ECRLY[i]=0.0;
ECRLZ[i]=0.0;
}
}
void build(){
int mtype = 0;
int i,j,k;
double temp;
double r1,r2,r3;
r2=50.0e-2,r3=10.0e-2;
if(NX%2==0 && NY%2==0 && NZ%2==0){
printf("Enter odd value for NX, NY, NZ");
}
else{
nxc=((NX+1)/2)-1;
nyc=((NY+1)/2)-1;
nzc=((NZ+1)/2)-1;
// spherical geometry
//fp2=fopen("build.txt","w");
mtype=2;
for(i=0;i<NX;i++){
for(j=0;j<NY;j++){
for(k=0;k<NZ;k++){
temp=((pow((i-nxc)*delx,2)/pow(r3,2)) + (pow((j-nyc)*dely,2)/pow(r3,2)) + (pow((k-nzc)*delz,2)/pow(r2,2)));
//r1=sqrt(temp);
if(radius2<delx || radius2<dely ||radius2<delz){
printf("radius of sphere %f (%d, %d, %d) is less than cell size.\n",r1,i,j,k);
exit(-1);
}
if(temp>0.0 && temp<=1.0){
dcube(i,j,k,1,1,1,mtype);
//fprintf(fp2, "%d, %d, %d, %d\n", i, j, k, IDONE[i][j][k]);
}
}
}
}
//GEOMETRY OF METAL PLATE
/*mtype=1;
for(i=0;i<NX;i++){
for(j=0;j<NY;j++){
for(k=0;k<NZ;k++){
if((i==45) && (j>((nyc)-15) && j<((nyc)+15)) && (k>((nzc)-15) && k<((nzc)+15))){
dcube(i,j,k,1,1,1,mtype);
fprintf(fp2, "%f, %f, %f, %d\n", (i)*delx, (j)*dely, (k)*delz, IDONE[i][j][k]);
}
}
}
}*/
}
for(k=0;k<NZ;k++){
for(j=0;j<NY;j++){
for(i=0;i<NX;i++){
if(IDONE[i][j][k]>=10 || IDTWO[i][j][k]>=10 || IDTHREE[i][j][k]>=10){
printf("error occured. illegal value for IDONE-IDTHREE at %d, %d, %d\n",i,j,k);
exit(-1);
}
}
}
}
}
void dcube(int istart, int jstart, int kstart, int nxwide, int nywide, int nzwide, int mtype)
{
int imax, jmax, kmax;
int i, j, k;
imax = istart+nxwide-1;
jmax = jstart+nywide-1;
kmax = kstart+nzwide-1;
if(nxwide == 0)
{
for(k = kstart; k<=kmax; k++)
{
for(j = jstart; j<=jmax; j++)
{
IDTWO[istart][j][k] = mtype;
IDTWO[istart][j][k+1] = mtype;
IDTHREE[istart][j][k] = mtype;
IDTHREE[istart][j+1][k] = mtype;
}
}
}
else if(nywide == 0)
{
for(k = kstart; k<=kmax; k++)
{
for(i = istart; i<=imax; i++)
{
IDONE[i][jstart][k] = mtype;
IDONE[i][jstart][k+1] = mtype;
IDTHREE[i][jstart][k] = mtype;
IDTHREE[i+1][jstart][k] = mtype;
}
}
}
else if(nzwide == 0)
{
for(j = jstart; j<=jmax; j++)
{
for(i = istart; i<=imax; i++)
{
IDONE[i][j][kstart] = mtype;
IDONE[i][j+1][kstart] = mtype;
IDTWO[i][j][kstart] = mtype;
IDTWO[i+1][j][kstart] = mtype;
}
}
}
else
{
for(k = kstart; k<=kmax; k++)
{
for(j = jstart; j<=jmax; j++)
{
for(i = istart; i<=imax; i++)
{
IDONE[i][j][k] = mtype;
IDONE[i][j][k+1] = mtype;
IDONE[i][j+1][k+1] = mtype;
IDONE[i][j+1][k] = mtype;
IDTWO[i][j][k] = mtype;
IDTWO[i+1][j][k] = mtype;
IDTWO[i+1][j][k+1] = mtype;
IDTWO[i][j][k+1] = mtype;
IDTHREE[i][j][k] = mtype;
IDTHREE[i+1][j][k] = mtype;
IDTHREE[i+1][j+1][k] = mtype;
IDTHREE[i][j+1][k] = mtype;
}
}
}
}
}
void setup()
{
// THIS SUBROUTINE INITIALIZES THE COMPUTATIONS
double dtxi, dtyi, dtzi;
int i;
dtxi = c/delx;
dtyi = c/dely;
dtzi = c/delz;
// CALCULATE DT--THE MAXIMUM TIME STEP ALLOWED BY THE COURANT STABILITY CONDITION
//printf("inside: %f\n",sqrt(pow(dtxi, 2.0)+pow(dtyi, 2.0)+pow(dtzi, 2.0)));
dt = 1.0/sqrt(pow(dtxi, 2.0)+pow(dtyi, 2.0)+pow(dtzi, 2.0));
printf("dt----- %0.15lf\n", dt);
printf("%lf %lf %lf\n", delx, dely, delz);
/*
PARAMETER ALPHA IS THE DECAY RATE DETERMINED BY BETA.
C TO CHANGE THE GAUSSIAN PULSE BY SINE WAVE WE HAVE TO MODIFY THE
c CODE .WHERE EVER WE ARE USING THE ALPHA AND BETA WE HAVE
c TO REMOVE IT .AND ALSO WE HAVE TO CHANGE THE TIME DURATION
c ALSO TO EXIT THE SINE WAVE FOR THAT INTERVAL OF TIME.
*/
// in 3d fortran parameters.h
period = 1e-6;
// SET OFFSET FOR COMPUTING INCIDENT FIELDS
off = 10;
// THE FOLLOWING LINES ARE FOR SMOOTH COSINE INCIDENT FUNCTION
// FIND DIRECTION COSINES FOR INCIDENT FIELD
//printf("arg: %lf\n", pi*thinc/180.0);
double costh = cos(pi*thinc/180.0);
double sinth = sin(pi*thinc/180.0);
double cosph = cos(pi*phinc/180.0);
double sinph = sin(pi*phinc/180.0);
printf("costh, sinth, cosph, sinph\n%0.25lf, %.25lf, %.25lf, %.25lf\n", costh, sinth, cosph, sinph);
// FIND AMPLITUDE OF INCIDENT FIELD COMPONENTS
ampx = amp*(ethinc*cosph*costh - ephinc*sinph);
ampy = amp*(ethinc*sinph*costh + ephinc*cosph);
ampz = amp*(-ethinc*sinth);
printf("ampx, ampy, ampz %.15lf, %.15lf, %.15lf", ampx, ampy, ampz);
// FIND RELATIVE SPATIAL DELAY FOR X, Y, Z CELL DISPLACEMENT
xdisp = -cosph*sinth;
ydisp = -sinth*sinph;
zdisp = -costh;
printf("xdisp: %.15lf, ydisp: %.15lf, zdisp: %.25lf\n", xdisp, ydisp, zdisp);
for(i=1;i<mdim1;i++){
EPS[i] = 0.0;
SIGMA[i]=0.0;
}
for(i=1;i<mdim1;i++){
Ep[i]=57.0;
}
for(i = 1; i < mdim1; i++){
EPS[i] = Ep[i]*eps0;
SIGMA[i] =0.89;
printf("%.15lf\n",EPS[i]);
}
// FREE SPACE:
dtedx = dt/(eps0*delx);
dtedy = dt/(eps0*dely);
dtedz = dt/(eps0*delz);
dtmdx = dt/(xmu0*delx);
dtmdy = dt/(xmu0*dely);
dtmdz = dt/(xmu0*delz);
//printf("dtedx: %0.12lf, dtedy: %0.12lf, dtedz: %0.12lf, dtmdx: %0.12lf, dtmdy: %0.12lf, dtmdz: %0.12lf\n", dtedx, dtedy, dtedz, dtmdx, dtmdy, dtmdz);
// lossy dielectrics
for(i = 1; i < mdim1; i++)
{
ESCTC[i] = EPS[i]/(EPS[i]+SIGMA[i]*dt);
EINCC[i] = SIGMA[i] *dt/(EPS[i]+SIGMA[i]*dt);
EDEVCN[i] = dt*(EPS[i]-eps0)/(EPS[i]+SIGMA[i]*dt);
ECRLX[i] = dt/((EPS[i]+SIGMA[i]*dt)*delx);
ECRLY[i] = dt/((EPS[i]+SIGMA[i]*dt)*dely);
ECRLZ[i] = dt/((EPS[i]+SIGMA[i]*dt)*delz);
//printf("EPS %.15lf, SIGMA %.15lf, EP %.15lf\n", EPS[i],SIGMA[i], Ep[i]);
printf("ESCTC, EINCC, EDEVCN, ECRLX, ECRLY, ECRLZ\n%.15lf, %.15lf, %.15lf, %.15lf, %.15lf, %.15lf", ESCTC[i], EINCC[i], EDEVCN[i], ECRLX[i], ECRLY[i], ECRLZ[i]);
}
// FIND MAXIMUM SPATIAL DELAY TO MAKE SURE PULSE PROPAGATES INTO SPACE PROPERLY.
delay = 0.0;
if(xdisp < 0.0)
delay = delay-(xdisp*NX1*delx);
if(ydisp < 0.0)
delay = delay-(ydisp*NY1*dely);
if(zdisp < 0.0)
delay = delay-(zdisp*NZ1*delz);
printf("delay: %.15lf\n", delay);
// COMPUTE OUTER RADIATION BOUNDARY CONDITION (ORBC) CONSTANTS:
cxd =(c*dt-delx)/(c*dt+delx);
cyd =(c*dt-dely)/(c*dt+dely);
czd =(c*dt-delz)/(c*dt+delz);
printf("\ncxd, cyd, czd\n%.14lf,%.14lf,%.14lf\n", cxd, cyd, czd);
cxu = cxd;
cyu = cyd;
czu = czd;
// COMPUTE 2ND ORDER ORBC CONSTANTS
cxx = 2.0*delx/(c*dt+delx);
cyy = 2.0*dely/(c*dt+dely);
czz = 2.0*delz/(c*dt+delz);
printf("\ncxx, cyy, czz\n%.14lf,%.14lf,%.14lf\n", cxx, cyy, czz);
cxfyd = delx*c*dt*c*dt/(2.0*dely*dely*(c*dt+delx));
cxfzd = delx*c*dt*c*dt/(2.0*delz*delz*(c*dt+delx));
cyfzd = dely*c*dt*c*dt/(2.0*delz*delz*(c*dt+dely));
cyfxd = dely*c*dt*c*dt/(2.0*delx*delx*(c*dt+dely));
czfxd = delz*c*dt*c*dt/(2.0*delx*delx*(c*dt+delz));
czfyd = delz*c*dt*c*dt/(2.0*dely*dely*(c*dt+delz));
printf("\ncxfyd, cxfzd, cyfxd, cyfzd, czfxd, czfyd\n%.14lf,%.14lf,%.14lf,%.14lf,%.14lf,%.14lf\n", cxfyd, cxfzd, cyfxd, cyfzd, czfxd, czfyd);
}
void exsfld()
{
int i, j, k, ii,jj,kk;
for(k = 1; k<NZ1; k++)
{
kk=k;
for(j = 1; j<NY1; j++)
{
jj=j;
for(i = 0; i<NX1; i++)
{
if(IDONE[i][j][k] == 0)
{
EXS[i][j][k] = EXS[i][j][k]+(HZS[i][j][k]-HZS[i][j-1][k])*dtedy-(HYS[i][j][k]-HYS[i][j][k-1])*dtedz;
//if(EXS[i][j][k]>100)exit(0);
//fprintf(fp,"%d %d %d %d %.15lf\n",N,5,nyc,nzc,EXS[i][j][k]);
}
else if(IDONE[i][j][k] == 1)
{
ii=i;
EXS[i][j][k] = -EXI(ii,jj,kk);
//if(EXS[i][j][k]>100)exit(0);
//fprintf(fp3,"%d %d %d %d %.15lf\n",N,i,j,k,EXS[i][j][k]);
}
else if(IDONE[i][j][k] == 2 || IDONE[i][j][k] == 3 || IDONE[i][j][k] == 4 || IDONE[i][j][k] == 5)
{
ii=i;
//double exii = EXI(i, j, k);
EXS[i][j][k]=EXS[i][j][k]*ESCTC[IDONE[i][j][k]-1]-EINCC[IDONE[i][j][k]-1]*EXI(ii,jj,kk)-EDEVCN[IDONE[i][j][k]-1]*DEXI(ii,jj,kk)+(HZS[i][j][k]-HZS[i][j-1][k])*ECRLY[IDONE[i][j][k]-1]-(HYS[i][j][k]-HYS[i][j][k-1])*ECRLZ[IDONE[i][j][k]-1];
//if(EXS[i][j][k]>100)exit(0);
//fprintf(fp3,"%d %d %d %d %.15lf\n",N,i,j,k,EXS[i][j][k]);
}
}
}
}
}
void eysfld()
{
int i, j, k,ii,jj,kk;
for(k = 1; k<NZ1; k++)
{
kk=k;
for(j = 0; j<NY1; j++)
{
jj=j;
for(i = 1; i<NX1; i++)
{
if(IDTWO[i][j][k] == 0)
{
EYS[i][j][k] = EYS[i][j][k]+(HXS[i][j][k]-HXS[i][j][k-1])*dtedz-(HZS[i][j][k]-HZS[i-1][j][k])*dtedx;
}
else if(IDTWO[i][j][k] == 1)
{
ii=i;
EYS[i][j][k] = -EYI(ii,jj,kk);
}
else if(IDTWO[i][j][k] == 2 || IDTWO[i][j][k] == 3 || IDTWO[i][j][k] == 4 || IDTWO[i][j][k] == 5)
{
ii=i;
//double eyii = EYI(i, j, k);
EYS[i][j][k]=EYS[i][j][k]*ESCTC[IDTWO[i][j][k]-1]-EINCC[IDTWO[i][j][k]-1]*EYI(ii,jj,kk)-EDEVCN[IDTWO[i][j][k]-1]*DEYI(ii,jj,kk)+(HXS[i][j][k]-HXS[i][j][k-1])*ECRLZ[IDTWO[i][j][k]-1]-(HZS[i][j][k]-HZS[i-1][j][k])*ECRLX[IDTWO[i][j][k]-1];
}
}
}
}
}
void ezsfld()
{
int i, j, k,ii,jj,kk;
for(k = 0; k<NZ1; k++)
{
kk=k;
for(j = 1; j<NY1; j++)
{
jj=j;
for(i = 1; i<NX1; i++)
{
if(IDTHREE[i][j][k] == 0)
{
EZS[i][j][k] = EZS[i][j][k]+(HYS[i][j][k]-HYS[i-1][j][k])*dtedx-(HXS[i][j][k]-HXS[i][j-1][k])*dtedy;
//fprintf(fp,"%d %d %d %d %.25lf %.25lf %.25lf\n",N,5,nyc,nzc,EZS[5][nyc][nzc],(HYS[i][j][k]-HYS[i-1][j][k])*dtedx,-(HXS[i][j][k]-HXS[i][j-1][k])*dtedy);
}
else if(IDTHREE[i][j][k] == 1)
{
ii=i;
EZS[i][j][k] = -EZI(ii,jj,kk);
}
else if(IDTHREE[i][j][k] == 2 || IDTHREE[i][j][k] == 3 || IDTHREE[i][j][k] == 4 || IDTHREE[i][j][k] == 5)
{
ii=i;
//double ezii = EZI(i, j, k);
EZS[i][j][k]=EZS[i][j][k]*ESCTC[IDTHREE[i][j][k]-1]-EINCC[IDTHREE[i][j][k]-1]*EZI(ii,jj,kk)-EDEVCN[IDTHREE[i][j][k]-1]*DEZI(ii,jj,kk)+(HYS[i][j][k]-HYS[i-1][j][k])*ECRLX[IDTHREE[i][j][k]-1]-(HXS[i][j][k]-HXS[i][j-1][k])*ECRLY[IDTHREE[i][j][k]-1];
}
}
}
}
}
void radezx()
{
int k, j;
// DO EDGES WITH FIRST ORDER ORBC
for(k = 0; k<NZ1; k++)
{
j = 1;
EZS[0][j][k] = EZSX1[1][j][k]+ cxd*(EZS[1][j][k] - EZSX1[0][j][k]);
EZS[NX-1][j][k] = EZSX1[2][j][k] + cxu*(EZS[NX1-1][j][k] - EZSX1[3][j][k]);
j = NY1-1;
EZS[0][j][k] = EZSX1[1][j][k]+ cxd*(EZS[1][j][k] - EZSX1[0][j][k]);
EZS[NX-1][j][k] = EZSX1[2][j][k] + cxu*(EZS[NX1-1][j][k] - EZSX1[3][j][k]);
}
for(j = 2; j<NY1-1; j++)
{
k = 0;
EZS[0][j][k] = EZSX1[1][j][k]+ cxd*(EZS[1][j][k] - EZSX1[0][j][k]);
EZS[NX-1][j][k] = EZSX1[2][j][k] + cxu*(EZS[NX1-1][j][k] - EZSX1[3][j][k]);
k = NZ1-1;
EZS[0][j][k] = EZSX1[1][j][k]+ cxd*(EZS[1][j][k] - EZSX1[0][j][k]);
EZS[NX-1][j][k] = EZSX1[2][j][k] + cxu*(EZS[NX1-1][j][k] - EZSX1[3][j][k]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(k = 1; k<NZ1-1; k++)
{
for(j = 2; j<NY1-1; j++)
{
EZS[0][j][k] = -EZSX2[1][j][k]+cxd*(EZS[1][j][k]+EZSX2[0][j][k])+cxx*(EZSX1[0][j][k]+EZSX1[1][j][k])+cxfyd*(EZSX1[0][j+1][k]-2.0*EZSX1[0][j][k]+EZSX1[0][j-1][k]+EZSX1[1][j+1][k]-2.0*EZSX1[1][j][k]+EZSX1[1][j-1][k])+cxfzd*(EZSX1[0][j][k+1]-2.0*EZSX1[0][j][k]+EZSX1[0][j][k-1]+EZSX1[1][j][k+1]-2.0*EZSX1[1][j][k]+EZSX1[1][j][k-1]);
EZS[NX-1][j][k] = -EZSX2[2][j][k]+cxd*(EZS[NX1-1][j][k]+EZSX2[3][j][k])+cxx*(EZSX1[3][j][k]+EZSX1[2][j][k])+cxfyd*(EZSX1[3][j+1][k]-2.0*EZSX1[3][j][k]+EZSX1[3][j-1][k]+EZSX1[2][j+1][k]-2.0*EZSX1[2][j][k]+EZSX1[2][j-1][k])+cxfzd*(EZSX1[3][j][k+1]-2.0*EZSX1[3][j][k]+EZSX1[3][j][k-1]+EZSX1[2][j][k+1]-2.0*EZSX1[2][j][k]+EZSX1[2][j][k-1]);
}
}
// NOW SAVE PAST VALUES
for(k = 0; k<NZ1; k++)
{
for(j = 1; j<NY1; j++)
{
EZSX2[0][j][k]=EZSX1[0][j][k];
EZSX2[1][j][k]=EZSX1[1][j][k];
EZSX2[2][j][k]=EZSX1[2][j][k];
EZSX2[3][j][k]=EZSX1[3][j][k];
EZSX1[0][j][k]=EZS[0][j][k];
EZSX1[1][j][k]=EZS[1][j][k];
EZSX1[2][j][k]=EZS[NX1-1][j][k];
EZSX1[3][j][k]=EZS[NX-1][j][k];
}
}
//fprintf(radfp,"%d %.25lf\n",N,EZSX2[0][20][20]);
}
void radeyx()
{
int k, j;
// DO EDGES WITH FIRST ORDER ORBC
for(k = 1; k<NZ1; k++)
{
j = 0;
EYS[0][j][k] = EYSX1[1][j][k]+ cxd*(EYS[1][j][k] - EYSX1[0][j][k]);
EYS[NX-1][j][k] = EYSX1[2][j][k] + cxu*(EYS[NX1-1][j][k] - EYSX1[3][j][k]);
j = NY1-1;
EYS[0][j][k] = EYSX1[1][j][k]+ cxd*(EYS[1][j][k] - EYSX1[0][j][k]);
EYS[NX-1][j][k] = EYSX1[2][j][k] + cxu*(EYS[NX1-1][j][k] - EYSX1[3][j][k]);
}
for(j = 1; j<NY1-1; j++)
{
k = 1;
EYS[0][j][k] = EYSX1[1][j][k]+ cxd*(EYS[1][j][k] - EYSX1[0][j][k]);
EYS[NX-1][j][k] = EYSX1[2][j][k] + cxu*(EYS[NX1-1][j][k] - EYSX1[3][j][k]);
k = NZ1-1;
EYS[0][j][k] = EYSX1[1][j][k]+ cxd*(EYS[1][j][k] - EYSX1[0][j][k]);
EYS[NX-1][j][k] = EYSX1[2][j][k] + cxu*(EYS[NX1-1][j][k] - EYSX1[3][j][k]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(k = 2; k<NZ1-1; k++)
{
for(j = 1; j<NY1-1; j++)
{
EYS[0][j][k] = -EYSX2[1][j][k]+cxd*(EYS[1][j][k]+EYSX2[0][j][k])+cxx*(EYSX1[0][j][k]+EYSX1[1][j][k])+cxfyd*(EYSX1[0][j+1][k]-2.0*EYSX1[0][j][k]+EYSX1[0][j-1][k]+EYSX1[1][j+1][k]-2.0*EYSX1[1][j][k]+EYSX1[1][j-1][k])+cxfzd*(EYSX1[0][j][k+1]-2.0*EYSX1[0][j][k]+EYSX1[0][j][k-1]+EYSX1[1][j][k+1]-2.0*EYSX1[1][j][k]+EYSX1[1][j][k-1]);
EYS[NX-1][j][k] = -EYSX2[2][j][k]+cxd*(EYS[NX1-1][j][k]+EYSX2[3][j][k])+cxx*(EYSX1[3][j][k]+EYSX1[2][j][k])+cxfyd*(EYSX1[3][j+1][k]-2.0*EYSX1[3][j][k]+EYSX1[3][j-1][k]+EYSX1[2][j+1][k]-2.0*EYSX1[2][j][k]+EYSX1[2][j-1][k])+cxfzd*(EYSX1[3][j][k+1]-2.0*EYSX1[3][j][k]+EYSX1[3][j][k-1]+EYSX1[2][j][k+1]-2.0*EYSX1[2][j][k]+EYSX1[2][j][k-1]);
}
}
// NOW SAVE PAST VALUES
for(k = 1; k<NZ1; k++)
{
for(j = 0; j<NY1; j++)
{
EYSX2[0][j][k]=EYSX1[0][j][k];
EYSX2[1][j][k]=EYSX1[1][j][k];
EYSX2[2][j][k]=EYSX1[2][j][k];
EYSX2[3][j][k]=EYSX1[3][j][k];
EYSX1[0][j][k]=EYS[0][j][k];
EYSX1[1][j][k]=EYS[1][j][k];
EYSX1[2][j][k]=EYS[NX1-1][j][k];
EYSX1[3][j][k]=EYS[NX-1][j][k];
}
}
}
void radezy()
{
int k, i;
// DO EDGES WITH FIRST ORDER ORBC
for(k = 0; k<NZ1; k++)
{
i = 1;
EZS[i][0][k] = EZSY1[i][1][k]+ cyd*(EZS[i][1][k] - EZSY1[i][0][k]);
EZS[i][NY-1][k] = EZSY1[i][2][k] + cyd*(EZS[i][NY1-1][k] - EZSY1[i][3][k]);
i = NX1-1;
EZS[i][0][k] = EZSY1[i][1][k]+ cyd*(EZS[i][1][k] - EZSY1[i][0][k]);
EZS[i][NY-1][k] = EZSY1[i][2][k] + cyd*(EZS[i][NY1-1][k] - EZSY1[i][3][k]);
}
for(i = 2; i<NX1-1; i++)
{
k = 0;
EZS[i][0][k] = EZSY1[i][1][k]+ cyd*(EZS[i][1][k] - EZSY1[i][0][k]);
EZS[i][NY-1][k] = EZSY1[i][2][k] + cyd*(EZS[i][NY1-1][k] - EZSY1[i][3][k]);
k = NZ1-1;
EZS[i][0][k] = EZSY1[i][1][k]+ cyd*(EZS[i][1][k] - EZSY1[i][0][k]);
EZS[i][NY-1][k] = EZSY1[i][2][k] + cyd*(EZS[i][NY1-1][k] - EZSY1[i][3][k]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(k = 1; k<NZ1-1; k++)
{
for(i = 2; i<NX1-1; i++)
{
EZS[i][0][k] = -EZSY2[i][1][k]+cyd*(EZS[i][1][k]+EZSY2[i][0][k])+cyy*(EZSY1[i][0][k]+EZSY1[i][1][k])+cyfxd*(EZSY1[i+1][0][k]-2.0*EZSY1[i][0][k]+EZSY1[i-1][0][k]+EZSY1[i+1][1][k]-2.0*EZSY1[i][1][k]+EZSY1[i-1][1][k])+cyfzd*(EZSY1[i][0][k+1]-2.0*EZSY1[i][0][k]+EZSY1[i][0][k-1]+EZSY1[i][1][k+1]-2.0*EZSY1[i][1][k]+EZSY1[i][1][k-1]);
EZS[i][NY-1][k] = -EZSY2[i][2][k]+cyd*(EZS[i][NY1-1][k]+EZSY2[i][3][k])+cyy*(EZSY1[i][3][k]+EZSY1[i][2][k])+cyfxd*(EZSY1[i+1][3][k]-2.0*EZSY1[i][3][k]+EZSY1[i-1][3][k]+EZSY1[i+1][2][k]-2.0*EZSY1[i][2][k]+EZSY1[i-1][2][k])+ cyfzd*(EZSY1[i][3][k+1]-2.0*EZSY1[i][3][k]+EZSY1[i][3][k-1]+EZSY1[i][2][k+1]-2.0*EZSY1[i][2][k]+EZSY1[i][2][k-1]);
}
}
// NOW SAVE PAST VALUES
for(k = 0; k<NZ1; k++)
{
for(i = 1; i<NX1; i++)
{
EZSY2[i][0][k]=EZSY1[i][0][k];
EZSY2[i][1][k]=EZSY1[i][1][k];
EZSY2[i][2][k]=EZSY1[i][2][k];
EZSY2[i][3][k]=EZSY1[i][3][k];
EZSY1[i][0][k]=EZS[i][0][k];
EZSY1[i][1][k]=EZS[i][1][k];
EZSY1[i][2][k]=EZS[i][NY1-1][k];
EZSY1[i][3][k]=EZS[i][NY-1][k];
}
}
}
void radexy()
{
int k, i;
// DO EDGES WITH FIRST ORDER ORBC
for(k = 1; k<NZ1; k++)
{
i = 0;
EXS[i][0][k] = EXSY1[i][1][k]+ cyd*(EXS[i][1][k] - EXSY1[i][0][k]);
EXS[i][NY-1][k] = EXSY1[i][2][k] + cyd*(EXS[i][NY1-1][k] - EXSY1[i][3][k]);
i = NX1-1;
EXS[i][0][k] = EXSY1[i][1][k]+ cyd*(EXS[i][1][k] - EXSY1[i][0][k]);
EXS[i][NY-1][k] = EXSY1[i][2][k] + cyd*(EXS[i][NY1-1][k] - EXSY1[i][3][k]);
}
for(i = 1; i<NX1-1; i++)
{
k = 1;
EXS[i][0][k] = EXSY1[i][1][k]+ cyd*(EXS[i][1][k] - EXSY1[i][0][k]);
EXS[i][NY-1][k] = EXSY1[i][2][k] + cyd*(EXS[i][NY1-1][k] - EXSY1[i][3][k]);
k = NZ1-1;
EXS[i][0][k] = EXSY1[i][1][k]+ cyd*(EXS[i][1][k] - EXSY1[i][0][k]);
EXS[i][NY-1][k] = EXSY1[i][2][k] + cyd*(EXS[i][NY1-1][k] - EXSY1[i][3][k]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(k = 2; k<NZ1-1; k++)
{
for(i = 1; i<NX1-1; i++)
{
EXS[i][0][k] = -EXSY2[i][1][k]+cyd*(EXS[i][1][k]+EXSY2[i][0][k])+cyy*(EXSY1[i][0][k]+EXSY1[i][1][k])+cyfxd*(EXSY1[i+1][0][k]-2.0*EXSY1[i][0][k]+EXSY1[i-1][0][k]+EXSY1[i+1][1][k]-2.0*EXSY1[i][1][k]+EXSY1[i-1][1][k])+cyfzd*(EXSY1[i][0][k+1]-2.0*EXSY1[i][0][k]+EXSY1[i][0][k-1]+EXSY1[i][1][k+1]-2.0*EXSY1[i][1][k]+EXSY1[i][1][k-1]);
EXS[i][NY-1][k] = -EXSY2[i][2][k]+cyd*(EXS[i][NY1-1][k]+EXSY2[i][3][k])+cyy*(EXSY1[i][3][k]+EXSY1[i][2][k])+cyfxd*(EXSY1[i+1][3][k]-2.0*EXSY1[i][3][k]+EXSY1[i-1][3][k]+EXSY1[i+1][2][k]-2.0*EXSY1[i][2][k]+EXSY1[i-1][2][k])+cyfzd*(EXSY1[i][3][k+1]-2.0*EXSY1[i][3][k]+EXSY1[i][3][k-1]+EXSY1[i][2][k+1]-2.0*EXSY1[i][2][k]+EXSY1[i][2][k-1]);
}
}
// NOW SAVE PAST VALUES
for(k = 1; k<NZ1; k++)
{
for(i = 0; i<NX1; i++)
{
EXSY2[i][0][k]=EXSY1[i][0][k];
EXSY2[i][1][k]=EXSY1[i][1][k];
EXSY2[i][2][k]=EXSY1[i][2][k];
EXSY2[i][3][k]=EXSY1[i][3][k];
EXSY1[i][0][k]=EXS[i][0][k];
EXSY1[i][1][k]=EXS[i][1][k];
EXSY1[i][2][k]=EXS[i][NY1-1][k];
EXSY1[i][3][k]=EXS[i][NY-1][k];
}
}
}
void radexz()
{
int j, i;
// DO EDGES WITH FIRST ORDER ORBC
for(j = 1; j<NY1; j++)
{
i = 0;
EXS[i][j][0] = EXSZ1[i][j][1]+ czd*(EXS[i][j][1] - EXSZ1[i][j][0]);
EXS[i][j][NZ-1] = EXSZ1[i][j][2] + czd*(EXS[i][j][NZ1-1] - EXSZ1[i][j][3]);
i = NX1-1;
EXS[i][j][0] = EXSZ1[i][j][1]+ czd*(EXS[i][j][1] - EXSZ1[i][j][0]);
EXS[i][j][NZ-1] = EXSZ1[i][j][2] + czd*(EXS[i][j][NZ1-1] - EXSZ1[i][j][3]);
}
for(i = 1; i<NX1-1; i++)
{
j = 1;
EXS[i][j][0] = EXSZ1[i][j][1]+ czd*(EXS[i][j][1] - EXSZ1[i][j][0]);
EXS[i][j][NZ-1] = EXSZ1[i][j][2] + czd*(EXS[i][j][NZ1-1] - EXSZ1[i][j][3]);
j = NY1-1;
EXS[i][j][0] = EXSZ1[i][j][1]+ czd*(EXS[i][j][1] - EXSZ1[i][j][0]);
EXS[i][j][NZ-1] = EXSZ1[i][j][2] + czd*(EXS[i][j][NZ1-1] - EXSZ1[i][j][3]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(j = 2; j<NY1-1; j++)
{
for(i = 1; i<NX1-1; i++)
{
EXS[i][j][0] = -EXSZ2[i][j][1]+czd*(EXS[i][j][1]+EXSZ2[i][j][0])+czz*(EXSZ1[i][j][0]+EXSZ1[i][j][1])+czfxd*(EXSZ1[i+1][j][0]-2.0*EXSZ1[i][j][0]+EXSZ1[i-1][j][0]+EXSZ1[i+1][j][1]-2.0*EXSZ1[i][j][1]+EXSZ1[i-1][j][1])+czfyd*(EXSZ1[i][j+1][0]-2.0*EXSZ1[i][j][0]+EXSZ1[i][j-1][0]+EXSZ1[i][j+1][1]-2.0*EXSZ1[i][j][1]+EXSZ1[i][j-1][1]);
EXS[i][j][NZ-1] = -EXSZ2[i][j][2]+czd*(EXS[i][j][NZ1-1]+EXSZ2[i][j][3])+czz*(EXSZ1[i][j][3]+EXSZ1[i][j][2])+czfxd*(EXSZ1[i+1][j][3]-2.0*EXSZ1[i][j][3]+EXSZ1[i-1][j][3]+EXSZ1[i+1][j][2]-2.0*EXSZ1[i][j][2]+EXSZ1[i-1][j][2])+czfyd*(EXSZ1[i][j+1][3]-2.0*EXSZ1[i][j][3]+EXSZ1[i][j-1][3]+EXSZ1[i][j+1][2]-2.0*EXSZ1[i][j][2]+EXSZ1[i][j-1][2]);
}
}
// NOW SAVE PAST VALUES
for(j = 1; j<NY1; j++)
{
for(i = 0; i<NX1; i++)
{
EXSZ2[i][j][0]=EXSZ1[i][j][0];
EXSZ2[i][j][1]=EXSZ1[i][j][1];
EXSZ2[i][j][2]=EXSZ1[i][j][2];
EXSZ2[i][j][3]=EXSZ1[i][j][3];
EXSZ1[i][j][0]=EXS[i][j][0];
EXSZ1[i][j][1]=EXS[i][j][1];
EXSZ1[i][j][2]=EXS[i][j][NZ1-1];
EXSZ1[i][j][3]=EXS[i][j][NZ-1];
}
}
}
void radeyz()
{
int i, j;
// DO EDGES WITH FIRST ORDER ORBC
for(j = 0; j<NY1; j++)
{
i = 1;
EYS[i][j][0] = EYSZ1[i][j][1]+ czd*(EYS[i][j][1] - EYSZ1[i][j][0]);
EYS[i][j][NZ-1] = EYSZ1[i][j][2] + czd*(EYS[i][j][NZ1-1] - EYSZ1[i][j][3]);
i = NX1-1;
EYS[i][j][0] = EYSZ1[i][j][1]+ czd*(EYS[i][j][1] - EYSZ1[i][j][0]);
EYS[i][j][NZ-1] = EYSZ1[i][j][2] + czd*(EYS[i][j][NZ1-1] - EYSZ1[i][j][3]);
}
for(i = 2; i<NX1-1; i++)
{
j = 0;
EYS[i][j][0] = EYSZ1[i][j][1]+ czd*(EYS[i][j][1] - EYSZ1[i][j][0]);
EYS[i][j][NZ-1] = EYSZ1[i][j][2] + czd*(EYS[i][j][NZ1-1] - EYSZ1[i][j][3]);
j = NY1-1;
EYS[i][j][0] = EYSZ1[i][j][1]+ czd*(EYS[i][j][1] - EYSZ1[i][j][0]);
EYS[i][j][NZ-1] = EYSZ1[i][j][2] + czd*(EYS[i][j][NZ1-1] - EYSZ1[i][j][3]);
}
// NOW DO 2ND ORDER ORBC ON REMAINING PORTIONS OF FACES
for(j = 1; j<NY1-1; j++)
{
for(i = 2; i<NX1-1; i++)
{
EYS[i][j][0] = -EYSZ2[i][j][1]+ czd*(EYS[i][j][1]+EYSZ2[i][j][0])+ czz*(EYSZ1[i][j][0]+EYSZ1[i][j][1])+ czfxd*(EYSZ1[i+1][j][0]- 2*EYSZ1[i][j][0]+EYSZ1[i-1][j][0]+EYSZ1[i+1][j][1]- 2*EYSZ1[i][j][1]+EYSZ1[i-1][j][1])+ czfyd*(EYSZ1[i][j+1][0]- 2*EYSZ1[i][j][0]+EYSZ1[i][j-1][0]+EYSZ1[i][j+1][1]- 2*EYSZ1[i][j][1]+EYSZ1[i][j-1][1]);
EYS[i][j][NZ-1] = -EYSZ2[i][j][2]+czd*(EYS[i][j][NZ1-1]+EYSZ2[i][j][3])+czz*(EYSZ1[i][j][3]+EYSZ1[i][j][2])+czfxd*(EYSZ1[i+1][j][3]-2.0*EYSZ1[i][j][3]+EYSZ1[i-1][j][3]+EYSZ1[i+1][j][2]-2.0*EYSZ1[i][j][2]+EYSZ1[i-1][j][2])+czfyd*(EYSZ1[i][j+1][3]-2.0*EYSZ1[i][j][3]+EYSZ1[i][j-1][3]+EYSZ1[i][j+1][2]-2.0*EYSZ1[i][j][2]+EYSZ1[i][j-1][2]);
}
}
// NOW SAVE PAST VALUES
for(j = 0; j<NY1; j++)
{
for(i = 1; i<NX1; i++)
{
EYSZ2[i][j][0]=EYSZ1[i][j][0];
EYSZ2[i][j][1]=EYSZ1[i][j][1];
EYSZ2[i][j][2]=EYSZ1[i][j][2];
EYSZ2[i][j][3]=EYSZ1[i][j][3];
EYSZ1[i][j][0]=EYS[i][j][0];
EYSZ1[i][j][1]=EYS[i][j][1];
EYSZ1[i][j][2]=EYS[i][j][NZ1-1];
EYSZ1[i][j][3]=EYS[i][j][NZ-1];
}
}
}
void hxsfld()
{
int i, j, k;
for(k = 0; k<NZ1; k++)
{
for(j = 0; j<NY1; j++)
{
for(i = 1; i<NX1; i++)
{
HXS[i][j][k]=HXS[i][j][k]-(EZS[i][j+1][k]-EZS[i][j][k])*dtmdy+(EYS[i][j][k+1]-EYS[i][j][k])*dtmdz;
//printf("%.11f\n", EZS[i][j+1][k]);
}
}
}
}
void hysfld()
{
int i, j, k;
for(k = 0; k<NZ1; k++)
{
for(j = 1; j<NY1; j++)
{
for(i = 0; i<NX1; i++)
{
HYS[i][j][k]=HYS[i][j][k]-(EXS[i][j][k+1]-EXS[i][j][k])*dtmdz+(EZS[i+1][j][k]-EZS[i][j][k])*dtmdx;
}
}
}
}
void hzsfld()
{
int i, j, k;
for(k = 1; k<NZ1; k++)
{
for(j = 0; j<NY1; j++)
{
for(i = 0; i<NX1; i++)
{
HZS[i][j][k]=HZS[i][j][k]-(EYS[i+1][j][k]-EYS[i][j][k])*dtmdx+(EXS[i][j+1][k]-EXS[i][j][k])*dtmdy;
}
}
}
}
double EXI(int i, int j, int k)
{
// THIS FUNCTION COMPUTES THE X COMPONENT OF THE INCIDENT ELECTRIC FIELD
//if(i == 0 && j == 0 && k == 0)
//printf("\ndist = %.11f\n", t);
double dist;
// First calc. the distance to the specified cell (i,j,k):
dist = ((i)*delx+0.5*delx*off)*xdisp+((j)*dely)*ydisp+((k)*delz)*zdisp + delay;
//printf("\ndist = %.11f\n", t);
double s = source(dist);
//printf("\nsource = %.11f\n", s);
return ampx*s;
}
double EYI(int i, int j, int k)
{
// THIS FUNCTION COMPUTES THE Y COMPONENT OF THE INCIDENT ELECTRIC FIELD
double dist;
// First calc. the distance to the specified cell (i,j,k):
dist = ((i)*delx)*xdisp+((j)*dely+0.5*dely*off)*ydisp+((k)*delz)*zdisp + delay;
return ampy*source(dist);
}
double EZI(int i, int j, int k)
{
double dist;
dist = ((i)*delx)*xdisp+((j)*dely)*ydisp+((k)*delz+0.5*delz*off)*zdisp + delay;
return ampz*source(dist);
}
double DEXI(int i, int j, int k)
{
double dist;
dist = ((i)*delx+0.5*delx*off)*xdisp+((j)*dely)*ydisp+((k)*delz)*zdisp + delay;
return ampx*dsrce(dist);
}
double DEYI(int i, int j, int k)
{
// THIS FUNCTION COMPUTES THE Y COMPONENT OF THE INCIDENT ELECTRIC FIELD
double dist;
// First calc. the distance to the specified cell (i,j,k):
dist = ((i)*delx)*xdisp+((j)*dely+0.5*dely*off)*ydisp+((k)*delz)*zdisp+delay;
return ampy*dsrce(dist);
}
double DEZI(int i, int j, int k)
{
// THIS FUNCTION COMPUTES THE Z COMPONENT OF THE INCIDENT ELECTRIC FIELD
double dist;
// First calc. the distance to the specified cell (i,j,k):
dist = ((i)*delx)*xdisp+((j)*dely*off)*ydisp+((k)*delz+0.5*delz*off)*zdisp+delay;
return ampz*dsrce(dist);
}
double source(double dist)
{
double sourcev=0.0;
tau=t-dist/c;
if(tau<0.0)
return sourcev;
if(tau>period)
return sourcev;
double omega=2.0*pi*freq;
sourcev=sin(omega*tau);
return sourcev;
}
double dsrce(double dist)
{
double dsrcev;
dsrcev=0.0;
tau=t-dist/c;
if(tau<0.0)
return dsrcev;
if(tau>period)
return dsrcev;
double omega=2.0*pi*freq;
dsrcev=cos(omega*tau)*omega;
return dsrcev;
}
void datsav(){
//printf("in datsav\n");
int i,j,k;
double exc,eyc,ezc,exin,eyin,ezin,temp,r1,esq,sarx,r2,r3;
nrms=(1.0/(freq*dt));
//printf("nrms: %lf\n",nrms);
r2=50.0e-2,r3=10.0e-2;
if(N==1){
for(i=0;i<NX;i++){
s[i]=0.0;
erms1d[i]=0.0;
}
}
for(i=0;i<NX;i++){
for(j=0;j<NZ;j++){
sar[i][j]=0.0;
erms[i][j]=0.0;
}
}
if(N==1){
memset(etimeavg,0,sizeof(double)*NX*NY*NZ);
memset(emax,0,sizeof(double)*NX*NY*NZ);
sar_Total=0.0;
sar_wb=0.0;
}
cont=0;
if(N>=(nstop-nrms) && N<=(nstop-1)){
for(i=0;i<NX-2;i++){
for(j=0;j<NY-2;j++){
for(k=0;k<NZ-2;k++){
esq=0.0;
t=t-dt;
exc=0.0;
eyc=0.0;
ezc=0.0;
exin=EXI(i,j,k)+EXI(i,j,k+1)+EXI(i,j+1,k)+EXI(i,j+1,k+1);
eyin=EYI(i,j,k)+EYI(i+1,j,k)+EYI(i,j,k+1)+EYI(i+1,j,k+1);
ezin=EZI(i,j,k)+EZI(i+1,j,k)+EZI(i+1,j+1,k)+EZI(i,j+1,k);
t=t+dt;
exc=(exin+EXS[i][j][k]+EXS[i][j][k+1]+EXS[i][j+1][k]+EXS[i][j+1][k+1])*(0.25);
eyc=(eyin+EYS[i][j][k]+EYS[i+1][j][k]+EYS[i][j][k+1]+EYS[i+1][j][k+1])*(0.25);
ezc=(ezin+EZS[i][j][k]+EZS[i+1][j][k]+EZS[i+1][j+1][k]+EZS[i][j+1][k])*(0.25);
esq=((exc*exc)+(eyc*eyc)+(ezc*ezc));
(etimeavg[offset(i,j,k)])=(etimeavg[offset(i,j,k)])+(esq/nrms);
if(N==(nstop-nrms)) (emax[offset(i,j,k)])=esq;
if(esq>(emax[offset(i,j,k)])) (emax[offset(i,j,k)])=esq;
cont=cont+1;
}
}
}
//printf("done cal\n");
//fprintf(fsar,"%d %.15lf\n",N,emax[offset(50,50,50)]);
}
//fprintf(fsar,"%d %.15lf\n",N,etimeavg[offset(100,100,100)]);
if(N==(nstop-1)){
printf("Number of cells: %d\n",cont);
j=nyc;
k=nzc;
for(i=0;i<NX-2;i++){
s[i]=(0.5)*SIGMA[IDONE[i][j][k]-1]*(emax[offset(i,j,k)])*(1.0/iden);
erms1d[i]=sqrt(etimeavg[offset(i,j,k)])*(0.707);
}
}
//FILE *fp1;
//fp1=fopen("etimeavg.txt", "w");
if(N==(nstop-1)){
j=nyc;
for(k=0;k<NZ-2;k++){
for(i=0;i<NX-2;i++){
sar[i][k]=(0.5)*SIGMA[IDONE[i][j][k]-1]*(emax[offset(i,j,k)])*(1.0/iden);
erms[i][k]=sqrt(etimeavg[offset(i,j,k)])*(0.707);
//fprintf(fp1,"%d %d %.15lf\n",i,k,erms[i][k]);
}
}
}
//fclose(fp1);
if(N==(nstop-1)){
cont2=0;
temp=0.0;
sarx=0.0;
wholevol=0.0;
if(wbsar==1){
for(i=0;i<NX-2;i++){
for(j=0;j<NY-2;j++){
for(k=0;k<NZ-2;k++){
//temp=((((i-nxc)*delx)*((i-nxc)*delx))+(((j-nyc)*dely)*((j-nyc)*dely))+(((k-nzc)*delz)*((k-nzc)*delz)));
temp=((pow((i-nxc)*delx,2)/pow(r3,2)) + (pow((j-nyc)*dely,2)/pow(r3,2)) + (pow((k-nzc)*delz,2)/pow(r2,2)));
// r1=sqrt(temp);
//if(r1<=radius2){
if(temp>0.0 && temp<=1.0){
cont2++;
sarx=sarx+((0.5)*SIGMA[IDONE[i][j][k]-1]*(emax[offset(i,j,k)])*(delx*dely*delz));
wholevol+=(delx*dely*delz);
}
}
}
}
printf("number of cell in whole body sar calculation: %d\n",cont2);
printf("sarx: %.15lf\n wholevol: %.15lf\n",sarx,wholevol);
sar_wb=sarx/(wholevol*iden);
printf("total power: %lf\nsar_wb: %lf\n",sarx,sar_wb);
}
}
/* t=t-dt; */
/* dum1=EXI(IOBS[0],JOBS[0],KOBS[0]); */
/* t=t+dt; */
return;
}
<file_sep>/src/parallel/parallel_var.h
const int NX=295, NY=295, NZ=1159;
const int NX1=NX-1, NY1=NY-1, NZ1=NZ-1;
const int mdim1=2;
const int nstop=2500;
const int ntest=2;
__device__ double ESCTC[mdim1], EINCC[mdim1], EDEVCN[mdim1], ECRLX[mdim1], ECRLY[mdim1], ECRLZ[mdim1];
__device__ int nxc, nyc, nzc;
__device__ double delx=0.9e-3, dely=0.9e-3, delz=0.9e-3;
double h_delx=0.9e-3, h_dely=0.9e-3, h_delz=0.9e-3;
__device__ double radius2=3.0e-2;
__device__ double c=3.0e8;
__device__ double freq=2400e6;
double frequency=2400e6;
int h_iden=1145;
__device__ int iden=1145;
__device__ double period, off, amp=1.0;
__device__ double ampx, ampy, ampz;
__device__ double ethinc=1.0, ephinc=0.0;
__device__ double xdisp, ydisp, zdisp;
__device__ double EPS[mdim1], SIGMA[mdim1], Ep[mdim1];
__device__ double dtedx, dtedy, dtedz, dtmdx, dtmdy, dtmdz;
__device__ double delay;
__device__ double cxd, cxu, cyd, cyu, czd, czu;
__device__ double cxx, cyy, czz, cxfyd, cxfzd, cyfxd, cyfzd, czfxd, czfyd;
__device__ double thinc=270.0, phinc=0.0;
__device__ double eps0=8.8542e-12, xmu0=1.2566306e-6;
__device__ double alpha=0.0, beta=110.0;
int nec;
int N;
double t;
double dt;
__device__ double tau;
__device__ int wbsar=1;
__device__ int onegsar=1;
|
868c724a00216a2e114c1faf070dca4ea0b44b79
|
[
"Markdown",
"C"
] | 4
|
Markdown
|
xjmeng001/GPU-accelerated-FDTD-based-SAR-Simulations
|
17176711cf9132a32b151309234497c04c553551
|
b332a8aa4f6d083fba20150b0abe48e4d8a4db90
|
refs/heads/master
|
<file_sep>package com.example.lloydfinch.studytest;
import android.app.Activity;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends Activity {
private Button button;
private SQLiteDatabase mDB;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button) this.findViewById(R.id.button_click);
button.setOnClickListener((v) -> {
this.test();
Toast.makeText(this, "this is lambda expression", Toast.LENGTH_LONG).show();
});
}
private void test() {
testSqLite();
testInsert();
testQuery();
testUpdate();
testDelete();
}
private void testLoader() {
}
private void testSqLite() {
MySQLiteOpenHelper openHelper = new MySQLiteOpenHelper(this, "students.db", null, 3);
mDB = openHelper.getWritableDatabase();
}
private void testInsert() {
ContentValues values = new ContentValues();
values.put("name", "finch");
values.put("address", "beijing");
mDB.insert("Student", null, values);
values.clear();
values.put("name", "lloyd");
values.put("address", "shanghai");
mDB.insert("Student", null, values);
//mDB.close();
}
private void testUpdate() {
ContentValues values = new ContentValues();
values.put("address", "wuhan");
mDB.update("Student", values, "name = ?", new String[]{"finch"});
//mDB.close();
}
private void testDelete() {
mDB.delete("Student", "name = ?", new String[]{"lloyd"});
}
private void testQuery() {
Cursor cursor = mDB.query("Student", null, null, null, null, null, null);
if (cursor.moveToFirst()) {
do {
int id = cursor.getInt(cursor.getColumnIndex("id"));
String name = cursor.getString(cursor.getColumnIndex("name"));
String address = cursor.getString(cursor.getColumnIndex("address"));
Log.d("SQL", "id:" + id + ", name:" + name + ", address:" + address);
} while (cursor.moveToNext());
}
cursor.close();
cursor = null;
//mDB.close();
}
}
|
6e0d8c035eb56f1d2fd38b40fd5a0d8bd4894f9c
|
[
"Java"
] | 1
|
Java
|
LloydFinch/ST
|
0c53fa0e88f7fb62a1c4da7b159600b1f96a9c29
|
58f868050e1dce4d1651f43d370e857053c90a5e
|
refs/heads/master
|
<file_sep>import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--verbose', '-v', action='store_true', help='If set, print more details')
args = parser.parse_args()
print "directory: ", args.directory
print "verbose: ", args.verbose
if args.verbose:
print "Verbose is set"
<file_sep>
# coding: utf-8
# # Applied Python (Python in practice)
# #### The Python Standard Library
#
# https://docs.python.org/2/library/
# In[2]:
import datetime
#from datetime import date
print(datetime.date.today())
day_today = datetime.date.today().strftime("%A")
print("Today is {day}".format(day=day_today))
print("Today is {}".format(day_today))
# In[3]:
# IF/ELSE
print("Monday" == "Friday")
bool_value = True
print("here", bool_value is not False)
if day_today == "Friday":
print("Today is Friday!!")
else:
print("Today is {day}".format(day=day_today))
l = [1,2,3]
if len(l) > 0: # NOT PYTHONIC WAY
print("-------> ok")
print(bool(l))
print(bool({}))
if l: # PYTHONIC WAY
print("ok")
# In[15]:
# IN operator
month_today = datetime.date.today().strftime("%B")
print(month_today)
month_today = "May"
day_today = "Saturday"
# not Pythonic
if day_today == "Saturday" or day_today == "Sunday":
if month_today == "June":
print("Today is {day}! Hurray! The weekend has landed!".format(day=day_today))
else:
print("Nope. It isn't weeked. Today is {day}".format(day=day_today))
# Pythonic
if day_today in ['Saturday', 'Sunday']:
print("Today is {day}! Hurray! The weekend has landed!".format(day=day_today))
else:
print("Nope. It isn't weeked. Today is {day}".format(day=day_today))
# In[23]:
# FOOR LOOP
# multiply each number by 2
numbers = [1, 2, 3, 4, 5, 6, 7]
for number in numbers:
print(number * 2)
print([(number, number * 2) for number in numbers])
L_TEMP = []
for number in numbers:
if number % 2 == 0:
L_TEMP.append(number * number)
print(L_TEMP)
# LIST COMPREHENSION (with filter)
L_TEMP = [number * number for number in numbers if number % 2 == 0] # VERY PYTHONIC
print(L_TEMP)
# In[ ]:
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# numbers = range(1, 11)
for number in numbers:
if number % 2 == 0:
print("Number {} is even".format(number))
elif number % 2 == 1:
print("Number {} is odd".format(number))
else:
print("is it number: {}?".format(number))
# In[ ]:
# List comprehension - Pythonic way of doing stmh
# modulo (%) operation finds the remainder after division of one number by another
# Even numbers always end with a digit of 0, 2, 4, 6 or 8
even_numbers = [number for number in range(1,11) if number % 2 == 0]
print("Even numbers: ", even_numbers)
# Odd numbers always end with a digit of 1, 3, 5, 7, or 9
odd_numbers = [number for number in range(1,11) if number % 2 == 1]
print("Odd numbers:", odd_numbers)
# In[25]:
# SETS
s = set([1, 2, 3, 2 ,4, 5, 5])
print("s: ", s)
numbers = range(1, 11)
even_numbers = [number for number in range(1,11) if number % 2 == 0]
even_numbers = set(even_numbers)
print(even_numbers)
numbers = set(numbers)
print(numbers)
# difference (-) -> new set with elements in numbers but not in even_numbers
# so we can get odd_numbers
odd_numbers = list(numbers - even_numbers)
print("Odd numbers: ", odd_numbers)
# In[ ]:
# WHILE LOOP, BREAK
while True:
number = input("Please provide number: ")
if number % 2 == 0:
print("Number {} is even".format(number))
elif number % 2 == 1:
print("Number {} is odd".format(number))
else:
print("is it number: {}?".format(number))
break
# In[ ]:
# DEF, RETURN
def is_number_even(number):
if number % 2 == 0:
print("Number {} is even".format(number))
return True
elif number % 2 == 1:
print("Number {} is odd".format(number))
else:
print("is it number: {}?".format(number))
return False
while True:
number = input("Please provide number: ")
is_number_even(number)
break
# In[ ]:
# TRY/EXCEPT
def fn():
number = input("Please provide number: ")
try:
number = int(number)
print(number)
except ValueError as exc:
print("Do we have number or not?)
try:
is_number_even(number)
except Exception as exc:
print(exc)
fn()
# In[ ]:
# very, very, very ... simple calc
def add_numbers(n1, n2):
return n1 + n2
def multiply_numbers(n1, n2):
return n1 * n2
def subtract_numbers(n1, n2):
return n1 - n2
def divide_numbers(n1, n2):
return n1 / n2
actions = {
'add': add_numbers,
'multiply': multiply_numbers,
'subtract': subtract_numbers,
'divide': divide_numbers,
}
action = raw_input("Choose one action [add|multiply|subtract|divide|]:")
number1 = raw_input("Provide first number: ")
number2 = raw_input("Provide second number: ")
# convert to int
number1 = int(number1)
number2 = int(number2)
print("You will {action} two numbers {number1} and {number2}".format(**locals()))
result = actions[action](number1, number2)
#result = actions.get(action)(number1, number2)
print("Result is: ", result)
# In[ ]:
class SimpleCalc(object):
def __init__(self, number1, number2):
self.n1 = number1
self.n2 = number2
def add(self):
return self.n1 + self.n2
def multiply(self):
return self.n1 * self.n2
def subtract(selt):
return self.n1 - self.n2
def divide(self):
return self.n1 / self.n2
action = raw_input("Choose one action [add|multiply|subtract|divide|]:")
number1 = raw_input("Provide first number: ")
number2 = raw_input("Provide second number: ")
# convert to int
number1 = int(number1)
number2 = int(number2)
simple_calc = SimpleCalc(number1, number2)
action = getattr(simple_calc, action)
result = action()
print(result)
# ## Let's practice
# In[26]:
import os
list_of_dirs = os.listdir('/tmp')
print(list_of_dirs)
for file_or_dir in list_of_dirs:
if os.path.isfile("/tmp/" + file_or_dir):
print("File: ", file_or_dir)
elif os.path.isdir("/tmp/" + file_or_dir):
print("Directory: ", file_or_dir)
# https://docs.python.org/2/library/os.path.html
# In[29]:
import os
file = '/etc/passwd'
print(os.path.isfile(file))
print(os.path.isdir(file))
print(os.path.exists(file))
print(os.path.dirname(file))
print("/tmp" + "/dir1" + "/dir2" + '/file')
print(os.path.join('/tmp', 'dir1', 'dir2', 'file'))
print(os.sep)
# In[28]:
for root, dirs, files in os.walk('/tmp/'):
print(root, dirs, files, "\n")
# In[ ]:
import os
root, dirs, files, aaaa = ('root', ['d1', 'd2'], ['f1'], 1)
a, b = 1, 2
print(a, b)
a, b = b, a
print(a, b)
for root, dirs, files in os.walk('/tmp/'):
print(root, dirs, files)
# In[ ]:
import os
for root, dirs, files in os.walk('/tmp'):
for file in files:
print(os.path.join(root, file))
# In[ ]:
import os
list_of_file_names = []
for root, dirs, files in os.walk('/etc'):
for file in files:
list_of_file_names.append(os.path.join(root, file))
print(list_of_file_names)
# In[1]:
d = {'key1': 1, 'key2':2}
print(d.items())
e = dict(d.items())
print(e)
# ### Exercise:
#
# Using previous example, please create python dictionary
# that will contain information about file name and its size.
# You can use /etc as source directory.
#
# - Hint 1: remember to check if file exists, `os.path.isfile(path_to_file)`
# - Hint 2: use file path as dictionary key, ` files_size[file_path] = file_size`
# - Hint 3: to create dictionary you can use list of tuples e.g: `dict( [ (key1, value), (key2, value), ...] )`
# - Hint 4: to create path to file, you can concatenate dir path and file name, `os.path.join( directory, file_name )`
# - Hint 5: to get file size: `os.path.getsize(path)`
#
#
# Your output should be similar to:
# ```python
# {
# '/etc/sane.d/stv680.conf': 178,
# '/etc/redhat-release': 33,
# '/etc/pam.d/cups': 146,
# '/etc/X11/xinit/Xclients': 2317
# ...
# }
# ```
# In[31]:
# SOLUTION
import os
list_of_files = []
for root, dirs, files in os.walk('/etc'):
for file in files:
path_to_file = os.path.join(root, file) # root + "/" + file
if os.path.isfile(path_to_file):
list_of_files.append((path_to_file, os.path.getsize(path_to_file)))
files_size = dict(list_of_files)
print(files_size)
# In[ ]:
# SECOND SOLUTION
import os
files_size = {}
for root, dirs, files in os.walk('/etc'):
for file in files:
path_to_file = os.path.join(root, file)
try:
files_size[path_to_file] = os.path.getsize(path_to_file)
except IOError as exc:
print(exc)
except OSError as exc:
print(exc)
print(files_size)
# #### How to sort data structures
# In[36]:
item = None
n = [1, 3, 2, 5, 0]
print(n.sort(), n)
n = [1, 3, 2, 5, 0]
n_sorted = sorted(n)
print(n_sorted, n)
# In[34]:
L = [3, 1, 2]
output = L.sort()
print(output)
print(L)
for item in output:
print(item)
# In[37]:
list_of_tuples = [('file1', 100), ('testfile', 2), ('testfile', 3000), ('password', 450)]
dict(list_of_tuples)
# In[39]:
# EXAMPLES
list_of_tuples = [('a', 100), ('b', 2), ('c', 3000), ('d', 450)]
list_of_tuples.sort(reverse=False)
print(list_of_tuples)
# first approach
from operator import itemgetter
list_of_tuples.sort(reverse=True, key=itemgetter(1))
print(list_of_tuples)
print(itemgetter(1)('ABCDEFG'))
print(itemgetter(0)([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))
print(itemgetter(0, 2, 4)([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))
# second approach
list_of_tuples.sort(reverse=True, key=lambda item: item[1])
print(list_of_tuples)
# In[ ]:
# To clarify conversion between dict and list of tuples
d = {'key2': 2, 'key1': 1, 'key3': 3} # Dictionary
# How to convert dictionary to list of tuples
list_of_tuples = d.items() # List of tuples: [ (k1, v), (k2, v), (k3, v), ... (kn, v)]
print(list_of_tuples)
# How to convert list of tuples to dictionary
d = dict(list_of_tuples)
print(d)
# #### Lamda expression
#
# - Lambdas are a shorthand to create anonymous functions in Python (functions without names)
# - are used when for example you want to pass function as argument
#
# For example you can create function in the 'normal way' using `def` keyword:
# ```python
# def square_root(x):
# return math.sqrt(x)
#
# square_root(2)
# ```
# or you can use lambda:
#
# ```python
# square_root = lambda x: math.sqrt(x)
# square_root(2)
# ```
#
# Another example:
#
# ```python
# def name(arguments):
# return expression
# ```
# can be translated to
# ```python
# name = lambda arguments: expression
# ```
#
# Source:
# - https://docs.python.org/2/reference/expressions.html
# - https://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/
# In[44]:
d = {'key2': 2, 'key1': 1, 'key3': 3}
print(d)
print(sorted(d))
for key in d:
print(d[key])
print(sorted(d, key=d.get))
for key in sorted(d, key=d.get, reverse=True):
print(key, d[key])
# ### Exercise:
#
# Sort dictionary from previous exercise by file size.
# Largest files should go first.
#
# - Hint 1: Booth sort and sorted method accept a reverse parameter with a boolean value.
# This is using to flag descending sorts.
#
# `d.sort(reverse=True)`
# In[ ]:
# SOLUTION
for key in sorted(files_size, key=files_size.get, reverse=True):
print(key, files_size[key])
b
# SOLUTION 2
print(sorted(files_size, key=files_size.get, reverse=True))
# In[ ]:
#import collections
#collections.OrderedDict
from collections import OrderedDict
d = {'key2': 2, 'key1': 1, 'key3': 3}
od = OrderedDict(d.items())
# second way to create sorted dict by value not ket
print(sorted(d.items(), key=d.get, reverse=True))
print(OrderedDict(sorted(d.items(), key=d.get, reverse=True)))
# ### Exercise:
#
# Create a function: get_files_size that will take two arguments:
#
# 1. `directory` - string, directory name, e.g.: /etc, by default use '/tmp' directory
# 2. `reverse` - boolean, if True use descending sorts, by default should be set as False
#
# Function should return python dictionary that will contain information about file name and its size.
#
# Please use solutions from previous exercises.
#
# Example: how to invoke this function?
#
# ```python
# get_files_size('/etc/', reverse=True)
# ```
#
# Additionally: try to execute this function as follows:
# - ```print(get_files_size())```
# - ```print(get_files_size('/etc'))```
# - ```print(get_files_size('/etc', reverse=True))```
#
#
# Hit 1: use OrderedDict
# ```python
# from collections import OrderedDict
# ```
#
# Hint 2: use itemgetter or lambda notation to get second element from tuple
# In[ ]:
# SOLUTION
import os
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
dir(os)
list_of_files = []
for root, dirs, files in os.walk(directory):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
list_of_files.append((path_to_file, os.path.getsize(path_to_file)))
return OrderedDict(sorted(list_of_files, key=itemgetter(1), reverse=reverse))
print(get_files_size('/etc'))
# In[ ]:
# SECOND SOLUTION
import os
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
files_size = {}
for root, dirs, files in os.walk('/etc'):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
files_size[path_to_file] = os.path.getsize(path_to_file)
return OrderedDict(sorted(files_size.items(), key=itemgetter(1), reverse=reverse))
print(get_files_size('/etc'))
# #### User input
#
# You can choose one of the following methods:
#
# 1. Function ```input``` or ```raw_input```
# 2. Attribute (dictionary) ```argv``` from module ```sys```
# 3. Dedicated user-friendly command line interface like ```argparse```
# - https://docs.python.org/3/library/argparse.html
#
#
# In[45]:
your_input = raw_input('Please provide file name: ')
print(your_input)
# In[ ]:
# python your_script.py argument1 argument2
import sys
# $0 - script name, $1 .. $9 - args
script_name = sys.argv[0] # script name, e.g.: your_script
arg1 = sys.argv[1] # first argument, e.g.: argument1
arg2 = sys.argv[2] # second argument, e.g.: argument2
# In[ ]:
import argparse # since 2.7, or optparse, click (py3)
# python script.py --directory /etc
# python script.py -d /etc
# python script.py -d /etc --verbose
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--verbose', '-v', action='store_true', help='If set, print more details')
args = parser.parse_args()
print("directory: ", args.directory)
print("verbose: ", args.verbose)
# #### Python file as standalone program
#
# https://docs.python.org/3/library/__main__.html
#
# - `'__main__'` is the name of the scope in which top-level code executes
# - A module’s `__name__` is set equal to `'__main__'` when read from standard input, a script, or from an interactive prompt.
#
#
# ```python
# def func1():
# print("func1")
#
# def func2():
# print("func2")
#
# if __name__ == '__main__':
# # execute only if run as a script
# # good place to use argparse module to catch user input
# func1()
# func2()
#
# ```
# In[ ]:
def do_something(directory, verbose):
print("directory: ", directory)
print("verbose: ", verbose)
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--verbose', '-v', action='store_true', help='If set, print more details')
args = parser.parse_args()
do_something(directory=args.directory, verbose=args.verbose)
# ### Exercise:
#
# Using previous exercises create a script that will ask user to provide directory name and sorting order.
# List out each file from provided directory and its size.
#
# You can use function get_files_size.
#
# Input arguments:
# 1. `directory` - string, directory name, e.g.: /etc, by default use '/tmp' directory
# 2. `reverse` - boolean, if True use descending sorts, by default should be set as False
#
# In[ ]:
# SOLUTION
# How to run this script:
# python get_files_size.py --directory /etc
# python get_files_size.py --directory /etc --reverse
import os
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
files_size = {}
for root, dirs, files in os.walk('/etc'):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
files_size[path_to_file] = os.path.getsize(path_to_file)
return OrderedDict(sorted(files_size.items(), key=itemgetter(1), reverse=reverse))
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--reverse', '-r', action='store_true', help='If set, use descending order')
args = parser.parse_args()
print(get_files_size(directory=args.directory, reverse=args.reverse))
# ### Exercise
#
# Modify previously created script to write output (list of files and theirs sizes) to file.
#
# Allow user to provide path to file. Remember that you should have access to this file.
#
# By default (if no file path specified) write output to /tmp directory and name file as follows:
# `<TIMESTAMP>`_files.out
#
# where `<TIMESTAMP>` is the current unix timestamp (seconds since Jan 01 1970. (UTC))
#
# Hint 1:
# To get unix timestamp:
# ```python
# import time
# timestamp = int(time.time())
# ```
#
# Hint 2: You can write your own function to write output to file
#
# Input arguments:
# 1. `directory` - string, directory name, e.g.: /etc, by default use '/tmp' directory
# 2. `reverse` - boolean, if True use descending sorts, by default should be set as False
# 3. `file_path` - string, specifies the path of output file on disk
# In[ ]:
# How to write to file
f = open('/tmp/file', 'w')
f.write('first line\n')
f.write('second line\n')
f.write('third line\n')
f.close()
# In[ ]:
# How to write to file
with open('/tmp/file', 'w') as f:
f.write('first line\n')
f.write('second line\n')
f.write('third line\n')
# In[ ]:
list_of_lines = ['line1', 'line2', 'line3']
with open('/tmp/file', 'w') as f:
for line in lines:
f.write("{} \n".format(line))
# or even better
list_of_lines = ["{} \n".format(line) for line in list_of_lines]
with open('/tmp/file', 'w') as f:
f.writelines(list_of_lines)
# In[ ]:
# SOLUTION
# How to run this script:
# python get_files_size.py --directory /etc
# python get_files_size.py --directory /etc --reverse
# python get_files_size.py --directory /etc --file_path /tmp/output
import sys
import os
import time
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
files_size = {}
for root, dirs, files in os.walk('/etc'):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
files_size[path_to_file] = os.path.getsize(path_to_file)
return OrderedDict(sorted(files_size.items(), key=itemgetter(1), reverse=reverse))
def get_timestamp():
return int(time.time())
def write_to_file(file_path, dict_to_write):
if not file_path:
file_path = os.path.join(os.sep, 'tmp', "{}_files.out".format(get_timestamp()))
try:
with open(file_path, 'w') as f:
for key, value in dict_to_write.items():
f.write("{} {}\n".format(key, value))
except IOError as exc:
print "Cannot write output to file, ", exc
sys.exit(1)
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--reverse', '-v', action='store_true', help='If set, use descending order')
parser.add_argument('--file_path', '-o', help='Output file path')
args = parser.parse_args()
files_size_dict = get_files_size(directory=args.directory, reverse=args.reverse)
write_to_file(file_path=args.file_path, dict_to_write=files_size_dict)
# #### How to execute external commands in python
#
# To execute external commands (shell commands) you can choose one of the following methods:
# 1. `os.system("command")`
# 2. `stream = os.popen("command")`
# 3. `subprocess.call("command")` - recommended, it replaces above-mentioned commands
#
# Sources:
# - https://docs.python.org/2/library/subprocess.html#module-subprocess
# - https://docs.python.org/2/library/subprocess.html#subprocess-replacements
# - https://pymotw.com/2/subprocess/
# In[48]:
import subprocess
print(subprocess.call("uname -a", shell=True)) # returns only exit code
# In[ ]:
import subprocess
output = subprocess.check_output("cat /etc/passwd | grep /sbin/nologin | cut -f 1 -d:", shell=True)
for item in output.split(" "):
print(item)
# In[ ]:
# list out all account names with /sbin/nologin shell (politely refuse a login)
# from /etc/passwd file
# equivalent to:
# cat /etc/passwd | grep /sbin/nologin | cut -f 1 -d:
import subprocess
cat = subprocess.Popen(['cat', '/etc/passwd'],
stdout=subprocess.PIPE)
grep = subprocess.Popen(['grep', '/sbin/nologin'],
stdin=cat.stdout,
stdout=subprocess.PIPE)
cut = subprocess.Popen(['cut', '-f', '1', '-d:'],
stdin=grep.stdout,
stdout=subprocess.PIPE)
nologin_accounts = cut.stdout
print(nologin_accounts)
nologin_accounts = [account.strip() for account in nologin_accounts]
print(nologin_accounts)
# ### Exercise
#
# Create a script that will execute "ps -aux" command. Collect first 10 lines only.
# In[65]:
s = "item\n item2\n item3"
s.split("\n")
# In[61]:
# SOLUTION
import subprocess
output = subprocess.check_output("ps -aux", shell=True)
output_list = output.split('\n')
for index, line in enumerate(output_list[:10]):
print("{}) {}".format(index, line))
# In[60]:
# ALTERNATIVE SOLUTION
import subprocess
ps_aux = subprocess.Popen(['ps', '-aux'],
stdout=subprocess.PIPE)
head = subprocess.Popen(['head', '-n10'],
stdin=ps_aux.stdout,
stdout=subprocess.PIPE)
processes = head.stdout
for index, line in enumerate(processes):
print("{}) {} \n".format(index, line))
# #### Data persistence
# In[72]:
import json
# import simplejson
data = {'int': 100, 'string': 'string', 'bool': True, 'list': [1, 2, 3, 4], 'dict': {'key1': 1, 'key2': 2}}
print(type(data), data)
data_json = json.dumps(data, indent=4)
print(type(data_json), data_json)
data2 = json.loads(data_json)
print(data2)
print(json.dumps({"msg": "error"}))
# #### HTTP for Humans
#
# http://docs.python-requests.org/en/master/
# In[73]:
import requests
r = requests.get('http://date.jsontest.com/')
print(r.text)
print(r.json())
# In[74]:
import requests
r = requests.get('http://date.jsontest.com/')
data = r.json()
print("Date: ", data['date'])
print("Timestamp: ", data['milliseconds_since_epoch'])
print("Time: ", data['time'])
# In[ ]:
import os
import requests
from BeautifulSoup import BeautifulSoup
url = "https://www.python.org/ftp/python/"
r = requests.get(url)
print(r.text)
# In[75]:
import requests
payload = {'key1': 'value1', 'key2': 'value2'}
r = requests.get('http://httpbin.org/get', params=payload)
print(r.url)
print(r.json())
# In[80]:
import os
import requests
from BeautifulSoup import BeautifulSoup
url = "https://www.python.org/ftp/python/"
r = requests.get(url)
soup = BeautifulSoup(r.text)
links = soup.findAll('a', href=True)
for link in links:
python_version = link['href']
r = requests.get(os.path.join(url, python_version))
soup = BeautifulSoup(r.text)
links = soup.findAll('a', href=True)
for link in links:
if link['href'].endswith('exe'):
print(os.path.join(url, python_version, link['href']))
# ### Exercise
#
# List out all url to '.exe' files from this site https://www.python.org/ftp/python/3.5.1/
#
# Hint:
# - pip install requests
# - pip install BeautifulSoup
# - https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html
# In[ ]:
import os
import requests
from BeautifulSoup import BeautifulSoup
url = "https://www.python.org/ftp/python/3.5.1/"
r = requests.get(url)
soup = BeautifulSoup(r.text)
links = soup.findAll('a', href=True)
for link in links:
if link['href'].endswith('exe'):
print(os.path.join(url, link['href']))
# #### The ElementTree XML API
#
# https://docs.python.org/2/library/xml.etree.elementtree.html
# In[82]:
country_data = """<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank>1</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
<rank>4</rank>
<year>2011</year>
<gdppc>59900</gdppc>
<neighbor name="Malaysia" direction="N"/>
</country>
<country name="Panama">
<rank>68</rank>
<year>2011</year>
<gdppc>13600</gdppc>
<neighbor name="Costa Rica" direction="W"/>
<neighbor name="Colombia" direction="E"/>
</country>
</data>
"""
# In[83]:
import xml.etree.ElementTree as ET
# if you want to read XML data from file
#tree = ET.parse('country_data.xml')
#root = tree.getroot()
root = ET.fromstring(country_data)
countries = root.findall('country')
for country in countries:
print("Country: ", country.get('name'))
country_neighbours = country.findall('neighbor')
for neighbor in country_neighbours:
print("Neigbor: ", neighbor.get('name'))
print("-" * 30)
# In[ ]:
python -m SimpleHTTPServer
# ### Databases
#
# https://docs.python.org/2/library/sqlite3.html
# http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html
#
# #### SQLite
# In[6]:
import sqlite3
conn = sqlite3.connect('example.db')
c = conn.cursor()
# Create table
c.execute('''CREATE TABLE stocks
(date text, trans text, symbol text, qty real, price real)''')
# Insert a row of data
c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")
c.execute("INSERT INTO stocks VALUES ('2006-02-05','BUY','RHAT2',101,40.24)")
# Save (commit) the changes
conn.commit()
conn.close()
# In[7]:
import sqlite3
conn = sqlite3.connect('example.db')
c = conn.cursor()
for row in c.execute('SELECT * FROM stocks ORDER BY price'):
print(row)
# #### SQLAlchemy
# In[19]:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String)
fullname = Column(String)
password = Column(String)
def __init__(self, name, fullname, password):
self.name = name
self.fullname = fullname
self.password = <PASSWORD>
def __repr__(self):
return "<User('%s','%s', '%s')>" % (self.name, self.fullname, self.password)
engine = create_engine('sqlite:///:memory:', echo=True)
Base.metadata.create_all(engine)
user1 = User('Vincent', 'Vega', 'aaaa1')
user2 = User('Butch', 'Coolidge', 'watch22')
print(user1, user2)
Session = sessionmaker(bind=engine)
session = Session()
session.add_all([user1, user2])
session.commit()
print("-->", session.query(User).filter_by(name='Vincent').first())
# In[ ]:
<file_sep>def exc_lists():
"""
Create following lists:
- List A: numbers from 0 to 100, hint: help(range)
- List B: only even numbers from list A
- List C: numbers from list A sorted in descent order
- List D: all numbers from list B should be squared (number ^ 2)
- List E: only numbers from 20 to 60 from list A
- List F: only numbers from 100 to 70 from list A
- List G: sum of list E and F
- List H: list G plus number 1000
- List I: copy of list H
- List J: from list H remove smallest number
- List K: list H extended with list ['A', 'B', 'C']
Create following variables:
- v1: sum of numbers from list B
- v2: maximum number from list H
- v3: minimum number from list H
- v4: average number from list G
"""
#List A: numbers from 0 to 100, hint: help(range)
A = list(range(0, 101))
#List B: only even numbers from list A
#B = list(range(0, 100, 2))
B = [number for number in range(0, 101) if number % 2 == 0]
B1 = []
for number in range(0, 101):
if number % 2 == 0:
B1.append(number)
#List C: numbers from list A sorted in descent order
C = sorted(B, reverse=True)
#List D: all numbers from list B should be squared (number ^ 2)
D = [pow(number, 2) for number in B]
D1 = []
for number in B:
D1.append(number ** 2)
#List E: only numbers from 20 to 60 from list A
E = A[20:60]
#List F: only numbers from 100 to 70 from list A
F = list(reversed(A[70:101]))
#F = A[100:70:-1]
#List G: sum of list E and F
G = E + F
#List H: list G plus number 1000
H = G.copy()
H.append(1000)
#List I: copy of list H
I = H.copy()
#List J: from list H remove smallest number
J = H.copy()
J.remove(min(J))
#List K: list H extended with list ['A', 'B', 'C']
K = H.copy()
K.extend(['A', 'B', 'C'])
print(A)
print(B)
print(C)
print(D)
print(E)
print(F)
print(G)
print(H)
print(I)
print(J)
print(K)
# v1: sum of numbers from list B
v1 = sum(B)
print(v1)
# v2: maximum number from list H
# v3: minimum number from list H
# v4: average number from list G
print(sum(G)/len(G))
def exc_dictionaries():
"""
Create three dictionaries that will contain following information from premier league table:
postion, club, played, won, drawn, lost, points
1 Leicester City 25 15 8 2 53
2 Tottenham Hotspur 25 13 9 3 48
3 Arsenal 25 14 6 5 48
1) print each dictionary in given order as you have in premier league table: postion, club, played, won, drawn, lost, points
expected output:
1 - Leicester City - 25 - 15 - 8 - 2 - 53
2 - Tottenham Hotspur - 25 - 13 - 9 - 3 - 48
3 - Arsenal - 25 - 14 - 6 - 5 - 48
2) create list PREMIER_LEAGUE_POINTS and put these three dictionaries inside this list
and then sort by club points (Leicester should be first on this list)
"""
leicester = {'club': 'Leicester City', 'position': 1, 'played': 25, 'won': 15, 'drawn': 15, 'lost': 2, 'points': 53}
totenham = {'club': 'Toteham Hotspur', 'position': 2, 'played': 25, 'won': 13, 'drawn': 9, 'lost': 3, 'points': 48}
arsenal = {'club': 'Arsenal', 'position': 2, 'played': 25, 'won': 14, 'drawn': 6, 'lost': 5, 'points': 48}
to_print = "{d[position]} - {d[club]} - {d[played]} - {d[won]} - {d[drawn]} - {d[lost]} - {d[points]}"
print(to_print.format(d=leicester))
print(to_print.format(d=totenham))
print(to_print.format(d=arsenal))
PREMIER_LEAGUE_POINTS = [leicester, totenham, arsenal]
print(PREMIER_LEAGUE_POINTS)
# from PREMIER_LEAGUE_POINTS select clubs with losts number not higher than 3 (lost <= 3) and print its names
for club in PREMIER_LEAGUE_POINTS:
if club['lost'] >= 3:
print(club['club'])
# create new list of dictionaries CLUB_POINTS from PREMIER_LEAGUE_POINTS, new dictionary should contain only club name and points number
CLUB_POINTS = []
for club in PREMIER_LEAGUE_POINTS:
new_dict = {club['club']: club['points']}
CLUB_POINTS.append(new_dict)
print(CLUB_POINTS)
def number_input():
numbers = []
while True:
number = input("Provide number: ")
numbers.append(number)
if sum(numbers) >= 100:
print "Stop"
break;
## Example 1: Using looping technique
n = input("Limit: ")
def fib(n):
a,b = 1,1
for i in range(n-1):
a,b = b,a+b
print a,
fib(n)
## Example 2: Using recursion
def fibR(n):
if n==1 or n==2:
return 1
return fib(n-1)+fib(n-2)
print fibR(5)
import string
import random
def generate_password(length):
letters = string.ascii_letters
digits = string.digits
special = string.punctuation
password_chars = []
password_chars.extend(letters)
password_chars.extend(digits)
password_chars.extend(special)
print(password_chars)
return ''.join(random.choice(password_chars) for _ in range(length))
def exc_functions_2():
"""
Create function that will generate random string (pseudo password) of size N.
Our password should contains upper and lower letters + digits + special characters (only . , : are allowed)
"""
password = <PASSWORD>(50)
print(password)
def exc_files():
# 1. create random.dat file - to file insert random string of size 512 characters
f = open('random.dat', 'w')
#with open('random.dat', 'w') as f:
f.write(generate_password(512))
with open('random.dat', 'r') as f:
content = f.read()
LETTERS_LIST = []
NUMBERS_LIST = []
for char in line:
if char in list(string.ascii_letters):
LETTERS_LIST.append(char)
if char in list(string.digits):
NUMBERS_LIST.append(char)
print(LETTERS_LIST)
print(NUMBERS_LIST)
# create unique_data.dat file that will contain unique data from random.dat file
with open('unique.dat', 'w') as f:
f.write(''.join(set(sorted(content))))
class PremierLeagueClub(object):
def __init__(self, position, club, won, drawn, lost):
self.position = position
self.club = club
self.__won = won
self.drawn = drawn
self.lost = lost
self.played = self.won + self.drawn + self.lost
self.points = self.won * 3 + self.drawn
def get_points(self):
self.points = self.won * 3 + self.drawn
return self.points
def get_games_played(self):
return self.won + self.drawn + self.lost
def get_magic_formula(self):
#played = self.get_games_played()
return self.points * self.played
def get_info(self):
to_print = "{o.position}- {o.club} - {o.played} - {o.won} - {o.drawn} - {o.lost} - {o.points}"
return to_print.format(o=self)
def set_won_game(self, number_of_won_games=1):
self.played = self.played + number_of_won_games
self.won = self.won + number_of_won_games
self.points = self.points + number_of_won_games * 3
def set_lost_game(self, number_of_lost_games=1):
self.played = self.played + number_of_lost_games
self.lost = self.lost + number_of_lost_games
def __eq__(self, other):
return self.get_magic_formula() == other.get_magic_formula()
def __lt__(self,other):
return self.get_magic_formula() < other.get_magic_formula()
def __gt__(self,other):
return self.get_magic_formula() > other.get_magic_formula()
def __str__(self):
"""
it will print "3 - Arsenal - 27 - 15 - 6 - 6 - 51" for example
:return:
"""
return self.get_info()
def exc_classes():
"""
1. Create class PremierLeagueClub with following attributes: postion, club, played, won, drawn, lost, points
2. class should have following methods:
- get_points() - to recalculate points use formula (won * 3 + drawn)
- get_games_played() - use formula (won + drawn + lost)
- get_magic_formula() should return played multiplyed by points, e.g: (played * points)
- get_info() - should return string with all club information joined by '-' e.g: "1 - Leicester City - 25 - 15 - 8 - 2 - 53"
- set_won_game() - should update played, won and points -
- set_lost_game() - should update played, lost
"""
# arsenal = PremierLeagueClub(postion=3, club="Arsenal", won=14, drawn=6, lost=5)
arsenal = PremierLeagueClub(position=3, club="Arsenal", won=14, drawn=6, lost=5)
arsenal.get_games_played() # should return 25
points = arsenal.get_points() # should return 48
print(points)
arsenal.set_lost_game()
arsenal.get_games_played() # should return 26
points = arsenal.get_points() # should return 48
print(points)
arsenal.set_won_game()
arsenal.get_games_played() # should return 27
points = arsenal.get_points() # should return 51
print(points)
print(arsenal)
manchester = PremierLeagueClub(position=1, club="Manchester", won=14, drawn=6, lost=5)
liverpool = PremierLeagueClub(position=1, club="Liverpool", won=13, drawn=6, lost=5)
print manchester
L = [manchester, liverpool]
L.sort()
print L
print(manchester.ge_magic_formula())
print(liverpool.get_magic_formula())
print("Compare clubs by magic_formula:", manchester > liverpool)
if __name__ == "__main__":
exc_lists()
exc_dictionaries()
exc_functions_2()
exc_files()
exc_classes()
<file_sep># How to run this script:
# python get_files_size.py --directory /etc
# python get_files_size.py --directory /etc --reverse
import os
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
list_of_files = []
for root, dirs, files in os.walk(directory):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
list_of_files.append((path_to_file, os.path.getsize(path_to_file)))
return OrderedDict(sorted(list_of_files, key=itemgetter(1), reverse=reverse))
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--reverse', '-v', action='store_true', help='If set, use descending order')
args = parser.parse_args()
print get_files_size(directory=args.directory, reverse=args.reverse)
<file_sep>Bulbasaur = {'CP': 100, 'HP': 20 }
Rattata = {'CP': 30, 'HP': 10}
Pikachu = {'CP': 120, 'HP': 120}
Raichu = {'CP': 150, 'HP':160}
pokeball = {
'pokemons_count': 3,
'pokemons': {
'Bulbasaur': Bulbasaur,
'Rattata': Rattata,
'Pikachu': Pikachu,
'Raichu': Raichu,
},
'points': 100,
}
print(pokeball)
# list all pokemons' names
print(pokeball['pokemons'].keys())
# remove ratta
pokeball['pokemons'].pop('Rattata')
print(pokeball)
# Create new Raichu pokemon with stats: CP = 150, HP = 160
print(pokeball)
# Find pokemon with highest CP parameter
# first basic solution, not pythonic
curr_max_cp = 0
pokemon_max_cp = None
for pokemon, stats in pokeball['pokemons'].items():
if stats['CP'] > curr_max_cp:
curr_max_cp = stats['CP']
pokemon_max_cp = pokemon
print(pokemon_max_cp)
# second solution, pythonic way
from operator import itemgetter
print(max(pokeball['pokemons'].iteritems(), key=lambda (k,v): itemgetter('CP')(v)))
# Update points in pokeball, points it is just sum of all CP parameters divide by pokemons count
points = 0
for pokemon, stats in pokeball['pokemons'].items():
points += stats['CP']
pokeball['points'] = points/len(pokeball['pokemons'])
print(points)
print(pokeball)
<file_sep># SOLUTION
# How to run this script:
# python get_files_size.py --directory /etc
# python get_files_size.py --directory /etc --reverse
# python get_files_size.py --directory /etc --file_path /tmp/output
import sys
import os
import time
from collections import OrderedDict
from operator import itemgetter
def get_files_size(directory='/tmp', reverse=False):
list_of_files = []
for root, dirs, files in os.walk(directory):
for file in files:
path_to_file = os.path.join(root, file)
if os.path.isfile(path_to_file):
list_of_files.append((path_to_file, os.path.getsize(path_to_file)))
return OrderedDict(sorted(list_of_files, key=itemgetter(1), reverse=reverse))
def get_timestamp():
return int(time.time())
def write_to_file(file_path, dict_to_write):
if not file_path:
file_path = os.path.join('/tmp', "{}_files.out".format(get_timestamp()))
try:
with open(file_path, 'w') as f:
for key, value in dict_to_write.items():
f.write("{} {}\n".format(key, value))
except IOError as exc:
print "Cannot write output to file, ", exc
sys.exit(1)
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(description='Script to list out files from given directory')
parser.add_argument('--directory', '-d', required=True, help='Source directory')
parser.add_argument('--reverse', '-v', action='store_true', help='If set, use descending order')
parser.add_argument('--file_path', '-o', help='Output file path')
args = parser.parse_args()
files_size_dict = get_files_size(directory=args.directory, reverse=args.reverse)
write_to_file(file_path=args.file_path, dict_to_write=files_size_dict)
<file_sep>
# coding: utf-8
# # Python Training - Basic Level
# ### Overview
#
# ##### What is Python:
#
# - an interpreted (byte code compilation) object-oriented programming language
# - dynamic typing (run time type checking), very high level dynamic data types and classes
# - strong typing (variables are bound to a particular data type)
# - very clear syntax - Python Style Guide: https://www.python.org/dev/peps/pep-0008/
# - portable: it runs on many Unix variants, on the Mac, and on PCs under MS-DOS, Windows, Windows NT, and OS/2
# - easily extensible with C/C++/Java code, and easily embeddable in applications
# - free to use, even for commercial products, because of open source license
#
# >
# The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code -- not in reams of trivial code that bores the reader to death - <NAME>
#
#
#
# Sources:
# - https://docs.python.org/2/faq/general.html
# - https://www.python.org/download/releases/2.7/license/
# - http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html - programming lanugages trends
# - https://github.com/blog/2047-language-trends-on-github - gitub trends
# - https://www.python.org/doc/essays/comparisons/ - comparing python to other languages
# ### What is Python good for
#
# - text processing & web scraping (reqgular expressions, LXML, Beautiful Soup, ...)
# - integration with operating systems (system calls, filesystems, TCP/IP sockets)
# - supprort for all known internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, SOAP, ...)
# - data science (NumPy, SciPy, and matplotlib)
# - writing Web Applications (Django, Flask, Pyramid, ...)
# - glue together large software components
# - GUI programming (Tk, Qt, GNOME, KDE, Kivy ...)
#
# Sources:
# - https://wiki.python.org/moin/WebFrameworks
# - https://www.python.org/doc/essays/omg-darpa-mcc-position/ - Glue It All Together With Python
# - http://scikit-learn.org/stable/
# - https://wiki.python.org/moin/GuiProgramming
# ### Python strenghts - comparing to other languages
#
# - Easy to learn
# - Application prototyping
# - Program development using Python is 5-10 times faster than using C/C++ and 3-5 times faster than using Java
# - In many cases, a prototype of an application can be written in Python without writing any C/C++/Java code
# - Supports multiple programming paradigms
# - procedural (statement based)
# - object-oriented (polymorphism, operator overloading and multiple inheritance)
# - functional (generators, comprehensions, closures, maps, decorators, lambdas, first-class function objects)
# - Portability
# - Automatic memory management
# - objects are automatically allocated and reclaimed (“garbage collects”)
# - Third-party utilities
# - more than 70k packages
# - https://pypi.python.org/pypi
#
#
# Sources:
# - https://www.python.org/doc/essays/omg-darpa-mcc-position/
# #### Software that makes use of Python
#
# - Applications: Dropbox, Youtube, Instagram, Reddit, Spotify, Blender 3D, ...
# - Games: Civilization IV, Eve Online
# - Tools: Ansible, Mercurial
#
# Sources:
# - https://www.python.org/about/success/
# - https://wiki.python.org/moin/OrganizationsUsingPython
# - https://wiki.python.org/moin/Applications
# ### History of Python
#
#
# - Python was created in the early 1990s by <NAME> at the National Research Institute for Mathematics and Computer Science in the Netherlands
#
# - Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, and Unix shell and other scripting languages.
#
# - The language was named after the BBC show “Monty Python’s Flying Circus”
#
# - Python 2.7.y from 2010 - most common used Python version but legacy
# - Python 3.x.y from 2008 - recommended version
#
#
# Sources:
# - http://python-history.blogspot.com/
# - https://docs.python.org/2.7/faq/design.html
# - https://www.python.org/download/releases/2.7/license/
# - https://www.python.org/downloads/ - here you can find all Python version and release dates
# - https://www.python.org/~guido/interviews.html - interviews with python creator
# ### Python 2.x or Python 3.x
#
# - Official statement: **Python 2.x is legacy, Python 3.x is the present and future of the language**
# - But in practice:
# - Python 2.7.x has been standard for a long time
# - Python 2.7.x will receive necessary security updates until 2020
#
# Major differences:
# - print is a function not statement
# - Better Unicode support
# - Memory-efficient iterable returns by default
# - Integers can handle any size, no longer limited to the machine's word size
#
#
# Sources:
# - https://wiki.python.org/moin/Python2orPython3
# - http://docs.python-guide.org/en/latest/starting/which-python/#the-state-of-python-2-vs-3
# - https://docs.python.org/3/whatsnew/3.0.html - What is new in Python 3.x
# - http://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html - Python 3 Q&A
# - http://getpython3.com/ - How to port from 2.x to 3.x
# - https://python3wos.appspot.com/ - List of packages supported in Python 3.x, Most useful and not yet supported (January 2016): Fabric, Ansible, suds, protobuf, M2Crypto
# ### Python implementations
#
# - Python is actually a specification for a language that can be implemented in many different ways
# - You can find Python Grammar specification here: https://docs.python.org/2/reference/grammar.html
#
# Python implementations:
#
# - CPython
# - reference implementation of Python, written in C
# - it compiles Python code to intermediate bytecode which is then interpreted by a virtual machine
#
# - PyPy
# - interpreter implemented in a restricted statically-typed subset of the Python language
# - Python performance was improved - it is 5 times faster than CPython
#
# - Jython
# - implementation that compiles Python code to Java bytecode which is then executed by the JVM
# - it is possible to import and use any Java class like a Python module
# - examples: https://wiki.python.org/jython/LearningJython
# - http://www.jython.org/jythonbook/en/1.0/SimpleWebApps.html
#
# - IronPython
# - implementation of Python for the .NET framework
# - it is possible to import and use any .NET framework libraries
# ### Interpreter
#
# - A kind of program that executes other programs
# - Reads your program and carries out the instructions it contains
#
#
# http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html
# ### Code compilation and interpreting
#
# #### Byte code
#
# - When you execute a script, Python compiles your source code into a format known as byte code
# - it creates binary file with .pyc extension
# - in python 3.x, .pyc files are stored in ```__pycache__``` directory
# - byte code can be also generated in memory in case have no write permission in filesystem
# - compilation is simply a translation step
# - Byte code is a lower-level, platform-independent representation of your source code
# - Byte code translation is performed to speed execution
#
# > Byte code is an implementation detail of the CPython interpreter
#
# - Byte code example:
#
# ```python
# 0 LOAD_GLOBAL 0 (len)
# 3 LOAD_FAST 0 (alist)
# 6 CALL_FUNCTION 1
# 9 RETURN_VALUE
# ```
#
# #### Byte code interpretation
#
# - Byte code instructions are interpreted by python interpreter
# - interpreter reads the binary file (.pyc) and executes the instructions one at a time
#
#
# #### Compilation and interpretation steps
#
# For example:
#
# ```python
# python your_program.py
# ```
#
# 1. Lexical analysis (break text to find tokens - keywords, operators, literals)
# 2. Parsing - based on the rules from grammar, produces Abstract Syntax Tree (AST)
# 3. Code generation produces PyCodeObject (bytecode)
# 4. Code execution by bytecode interpreter (stack-based virtual machine)
#
# Sources:
# - http://security.coverity.com/blog/2014/Nov/understanding-python-bytecode.html
# - http://tomlee.co/wp-content/uploads/2012/11/108_python-language-internals.pdf
# ### How to install Python
#
# For Windows, Mac OS X, Sources:
#
# - download Python interpreter from https://www.python.org/downloads/
# - detailed instruction for Windows: http://www.howtogeek.com/197947/how-to-install-python-on-windows/
#
# For Linux:
# - just use your package manager like apt, yum
# - for RedHat like systems: yum install python
# - for Debian like systems: apt-get install python
# ### Interactive mode
#
# What is interactive mode and why it should be used:
# - command line shell for Python
# - immediate feedback for each statement you type
# - it is faster to check Python documentation than using Web Browser, just type
# ```python
# help(antyhing)
# ```
#
# How to run interactive mode:
#
# - Just invoke the interpreter without passing a script file as a parameter
#
# - To enter the interactive mode type **python** command in your Shell (windows/linux)
# - You should be able to see prompt **>>>**
#
# For example:
#
# ```python
# Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32
# Type "help", "copyright", "credits" or "license" for more information.
# >>>
# ```
#
# Sources:
# - http://stackoverflow.com/questions/2664785/why-use-python-interactive-mode
# ### Script mode
#
# - Python program/script is just a text file containing Python statements
#
# - Invoking the interpreter with a script parameter begins execution of the script and continues until the script is finished
# - Python files have extension .py, for example: hello_world.py
# - How to run? (you should have python interpreter set in PATH environment variable)
#
# ```bash
# python your_script.py
# ```
#
# - You can also run your python script as follows:
#
# ```bash
# ./your_script.py
# ```
#
# - but you need to add path to your python interpreter directly inside your script
#
# ```python
# #!/usr/bin/python
# print "Hello world"
# ```
# ### Syntax
#
# #### Code structure
#
# - Remember: A Python program is read by a parser
# - A Python program is divided into a number of logical lines
# - The end of a logical line is represented by the token NEWLINE
# - A logical line is constructed from one or more physical lines
# - A physical line is a sequence of characters terminated by an end-of-line sequence
# - Two or more physical lines may be joined into logical lines using backslash characters (\)
#
# #### Indentation
#
# - Indentation = white spaces (tabs or spaces - never mixed!)
# - Indentation level of your statements is significant
# - Everywhere else, whitespace is not significant and can be used as you like, just like in any other language
# - The exact amount of indentation doesn't matter at all, but only the relative indentation of nested blocks (relative to each other)
#
# - Python uses indentation to indicate blocks of code
# - https://www.python.org/dev/peps/pep-0008/
#
# ```python
# def function(args):
# do_something() # Indentation
# do_something_else() # Indentation
# return # Indentation
#
# def function2(condition):
# if condition == 0: # Indentation
# do_something() # Indentation
# if condition == 1: # Indentation
# do_something_else() # Indentation
# else: # Indentation
# print('do nothing') # Indentation
# else: # Indentation
# do_something() # Indentation
#
# # two empty lines - does not matter
# return # Indentation
#
# function()
# function2()
#
# ```
#
#
# #### Keywords (reserved words)
#
# - Important: all the Python keywords contain lowercase letters only
# - These names below cannot be used as ordinary identifiers:
#
# ```
# and del from not while
# as elif global or with
# assert else if pass yield
# break except import print
# class exec in raise
# continue finally is return
# def for lambda try
# ```
#
#
# #### Operators
#
# - The following tokens are operators:
#
# ```
# + - * ** / // % @
# << >> & | ^ ~
# < > <= >= == !=
# ```
#
# #### Comments
#
# - Represented by a hash sign(#) that is not inside a string literal
# - Represented by quotation - you can use single ('), double (") and triple (''' or """) quotes
#
#
# Sources:
# - https://docs.python.org/2/reference/lexical_analysis.html
# - https://docs.python.org/3/reference/lexical_analysis.html
# In[30]:
# comment
# comment
a = 3 #comment
'''
comment
comment
comment
'''
# ### Variables are labels, not boxes
#
# - So it’s better to think of them as labels (names) attached to objects
#
# - Always read the right-hand side first: that’s where the object is created or retrieved
# - After that, the variable on the left is bound to the object, like a label stuck to it
#
# - A variable is simply a value bound to a name
# - The value has a type -- like "integer" or "string" or "list" -- but the label (variable) itself doesn't
#
#
# - Created when they are first assigned values (dynamic typing)
# - Replaced with their values when used in expressions
# - Must be assigned before they can be used in expressions
# - Refer to objects and are never declared ahead of time
#
# #### Labeling object - example
#
# ```python
# >>> A = 1 # Assign a name to an object
# ```
#
# 1. Create an object to represent the VALUE 1
# 2. Create the LABEL A, **if it does not yet exist**
# 3. Link the LABEL A to the new object 1
#
# ### Dynamic & strong typing
#
# > Once you create an object, you bind its operation set for all time
# — you can perform only string operations on a string and list operations on a list
#
# - Type checks are performed mostly at run time
# - Interpreter tracks of the kinds of objects your program uses when it runs
# - Dynamic typing means there is less code for you to write
#
# - Sort of type-dependent behavior is known as polymorphism
# - Every operation is a polymorphic operation in Python:
#
# > Polymorphic behavior has in recent years come to also be known as duck typing—the essential idea being that your code is not supposed to care if an object is a duck, only that it quacks. Anything that quacks will do, duck or not, and the implementation of quacks is up to the object,
# In[2]:
# Dynamic programming traps via Python
important_variable = 10
for i in range(1000):
important_varaible = important_variable + 10 # TYPO in important_VarAible
print(important_variable)
# In[3]:
2 + "a"
# ### Built-in types
#
# - All build-in types listed in documentation: https://docs.python.org/3/library/stdtypes.html
# - Of course you may create your own types (class)
#
#
# #### Boolean
# - True: 1, all numbers without 0, non empty strings, non empty collections
# - False: [], {}, 0, None, ''
# - you can use bool() function to check if object has True or False value
#
# #### Numeric
# - int(signed integers), float (floating point real values), complex (complex numbers)
# - Number data types store numeric values
# - Of course it is possible to convert between types: int(), float()
#
# #### Strings
# - Python’s strings also come with full Unicode support required for processing text in internationalized character sets
# - You can find common string operations in 'string' module: https://docs.python.org/2/library/string.html
#
# > The string module contains a number of useful constants, methods and classes
#
# Useful contastants in string module:
# - string.ascii_letters -> 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
# - string.digits -> '0123456789'
# - string.punctuation -> ```'!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'``
#
#
# Useful string methods:
# - str.capitalize() -> only first character capitalized and the rest lowercased in string
# - str.encode(encoding="utf-8") -> return an encoded version of the string as a bytes object
# - str.decode()
# - str.format() -> perform a string formatting operation
# - str.split(sep) -> return a list of the words in the string, using sep as the delimiter string
# - str.join()
#
# #### Data structures
# - list, tuples, dictionaries
# - You can find high-performance container datatypes in collections module: https://docs.python.org/2/library/collections.html
#
# In[31]:
print(0, ' -> ', bool(0)) # False
print(1, ' -> ', bool(1)) # True
print('', ' -> ', bool('')) # False
print('not empty', ' -> ', bool('not empty')) # True
print([], ' -> ', bool([])) # False
print([1, 2, 3], ' -> ', bool([1, 2, 3])) # True
# #### String formatting operation
#
# str.format()
# - Perform a string formatting operation
# - The string on which this method is called can contain literal text or replacement fields delimited by braces {}
# - Each replacement field contains either the numeric index of a positional argument, or the name of a keyword argument
# - Returns a copy of the string where each replacement field is replaced with the string value of the corresponding argument
#
#
# Sources:
# - http://www.diveintopython.net/native_data_types/formatting_strings.html
# - https://pyformat.info/
# - https://mkaz.github.io/2012/10/10/python-string-format/
# In[32]:
'{} {}'.format('one', 'two')
# In[33]:
'{1} {0}'.format('one', 'two')
# In[34]:
print('{:>30}'.format('align right'))
print('{:30}'.format('align left'))
print('{:^30}'.format('center'))
# In[35]:
print('{:.3f}'.format(3.141592653589793)) # 3 decimal places
# In[36]:
person = {'name': 'Guido', 'surname': '<NAME>'}
print('{p[name]} {p[surname]}'.format(p=person))
data = [4, 8, 15, 16, 23, 42]
print('{d[0]} {d[2]}'.format(d=data))
# In[37]:
print("The sum of {} + {} is {}".format(1, 2, 3))
a = 1
b = 2
c = a + b
print("The sum of {a} + {b} is {c}".format(a=a, b=b, c=c))
# #### Unicodes
# Python 3:
# - In Python 3.X, the normal str string handles Unicode text (including ASCII, which is just a simple kind of Unicode)
# - a distinct bytes string type represents raw byte values (including media and encoded text)
# - 2.X Unicode literals are supported in 3.3 and later for 2.X compatibility (they are treated the same as normal 3.X str strings)
#
# ```python
# >>> 'sp\xc4m' # 3.X: normal str strings are Unicode text
# 'spÄm'
# >>> b'a\x01c' # bytes strings are byte-based data
# b'a\x01c'
# ```
#
# Python 2:
# - In Python 2.X, the normal str string handles both 8-bit character strings (including ASCII text) and raw byte values
# - a distinct unicode string type represents Unicode text; and 3.X bytes literals are supported in 2.6 and later for 3.X compatibility (they are treated the same as normal 2.X str strings)
#
# ```python
# >>> print u'sp\xc4m' # 2.X: Unicode strings are a distinct type
# spÄm
# >>> 'a\x01c' # Normal str strings contain byte-based text/data
# 'a\x01c'
# >>> b'a\x01c' # The 3.X bytes literal works in 2.6+: just str
# 'a\x01c'
#
# >>> string = 'SPAM'
# >>> a, b, c, d = string # Same number on both sides
# >>> a, d
# ('S', 'M')
# ```
#
#
# Sources:
# - https://docs.python.org/3/library/stdtypes.html
# ### Boolean operations (AND, OR, NOT)
#
# OR
# - ```x or y``` if x is false, then y, else y
# - For or tests, Python evaluates the operand objects from left to right and returns the first one that is true
# - Moreover, Python stops at the first true operand it finds. This is usually called short-circuit evaluation, as determining a result short-circuits (terminates) the rest of the expression as soon as the result is known
#
# ```python
# >>> 2 or 3, 3 or 2 # Return left operand if true
# (2, 3) # Else, return right operand (true or false)
# >>> [] or 3
# 3
# >>>[] or {}
# {}
# ```
#
# AND
# - ```x and y``` if x is false, then x, else y
# - Python and operations also stop as soon as the result is known; however, in this case Python evaluates the operands from left to right and stops if the left operand is a false object because it determines the result—falseand anything is always false
#
# Example 1:
# ```python
# >>> 2 and 3, 3 and 2 # Return left operand if false
# (3, 2) # Else, return right operand (true or false)
# >>> [] and {}
# []
# >>> 3 and []
# []
# ```
#
# Example2:
# ```python
# X = A or B or C or None # assigns X to the first nonempty (that is, true) object
# ```
#
# NOT
# - ```not x ``` if x is false, then True, else False
#
# Example:
# ```
# not True # False
# ```
#
# #### Operator precedences
#
# - or operator has lower precedense that and operator
# - True and False or True # True
#
# https://docs.python.org/2/reference/expressions.html#operator-precedence
# In[38]:
a = 3
b = 2.7
c = 'A'
d = [1, 2.1, [1,2], 'python']
e = 'python'
f = (1,2,)
g = {'key1': 1, 'key2': 'two'}
true_or_false = True
no_value_here = None
# define new type
class YourNewType(object):
def __init__(self, a, b):
self.a = a
self.b = b
your_type_instance = YourNewType(1, 'string')
# define new function
def do_something(param1, param2):
return param1 * param2
function_obj = do_something
value_returned_from_function = do_something(1, 2)
value_returned_from_function = function_obj(1, 2)
# print types and value
print(type(a), a)
print(type(b), b)
print(type(c), c)
print(type(d), d)
print(type(e), e)
print(type(f), f)
print(type(g), g)
print(type(true_or_false), true_or_false)
print(type(no_value_here), no_value_here)
print(type(your_type_instance), your_type_instance)
print(type(function_obj), function_obj)
print(type(value_returned_from_function), value_returned_from_function)
# Use http://www.pythontutor.com/ to visualize how Python works. It executes step-by-step all instructions.
#
# Our example with "Dynamic Types": http://goo.gl/5RTtnU
# 
# ### Strong Typing
#
# - the interpreter keeps track of all variables types
# - you can't perform operations inappropriate to the type of the object
# - attempting to add numbers to strings will fail
#
# In[39]:
# Example: 1
a = 3
b = 5
c = a + b
# Example: 2
a = 'A'
b = 'B'
c = a + b
# Example: 3
[1, 2, 3] + [4, 5]
[1,2, 3] * 3
# In[40]:
# trying to change type
a = 3
b = 'A'
c = a + b
# #### How to "fix" this example?
#
# Just use one of the available conversion method
# In[41]:
float(2) # from integer to float
# In[42]:
int(3.4) # from float to integer
# In[43]:
str(3) # from integer to string
# In[44]:
str(4.2) # from float to integer
# In[45]:
list((1,2,)) # from tuple to list
# In[46]:
# just use one of the conversion method, to convert between types
a = 10
b = "cats"
str(a) + b
# if you want to only print, just print without any conversion
print(a, 'funny', b)
# **Remember**:
# > Don’t check whether it is-a duck: check whether it quacks-like-a duck, walks-like-a duck, etc, etc,
# depending on exactly what subset of duck-like behavior you need to play your language-games with. - (comp.lang.python, Jul. 26, 2000) — <NAME>
# In[47]:
help(dir)
# In[48]:
dir(1)
# ### Built-in functions
#
# - The Python interpreter has a number of functions and types built into it that are always available
# - List of all built-int functions: https://docs.python.org/3/library/functions.html
# In[2]:
import __builtin__ # import builtins - Python 3
dir(__builtin__)
# In[50]:
(1).to_bytes(2, 'big')
# ### The Python Conceptual Hierarchy
#
# 1. Programs are composed of modules.
# 2. Modules contain statements.
# 3. Statements contain expressions.
# 4. Expressions create and process objects.
#
# ### Everything in python is an object
#
# - What is object in general?
# > objects are essentially just pieces of memory, with values and sets of associated operations
#
# - every object has an identity, a type and a value
#
# - an object’s identity never changes once it has been created
# - you may think of it as the object’s address in virtual memory
#
# - the 'is' operator compares the identity of two objects
#
# - the id() function returns an integer representing its identity
# - in CPython, id() returns the memory address of the object
#
# https://docs.python.org/3/reference/datamodel.html#objects-values-and-types
# In[3]:
obj_1 = [1, 2]
obj_2 = [1, 2]
print(id(obj_1))
print(id(obj_2))
print("id(obj_1) == id(obj_2): ", id(obj_1) == id(obj_2))
print("obj_1 == obj_2: ", obj_1 == obj_2)
print("obj_1 is obj_2:", obj_1 is obj_2)
# In[4]:
obj_1 = [1, 2]
obj_2 = obj_1
print(id(obj_1))
print(id(obj_2))
print("id(obj_1) == id(obj_2): ", id(obj_1) == id(obj_2))
print("obj_1 == obj_2: ", obj_1 == obj_2)
print("obj_1 is obj_2:", obj_1 is obj_2)
# **Remember**:
# > The == operator compares the values of objects (the data they hold), while 'is' compares their identities
# ### Python objects - mutables vs immutable
#
# #### mutable:
# - mutable objects can change their value but keep their id().
#
# #### immutable:
# - an object with a fixed value
# - immutable objects include numbers, strings and tuples
# - such an object cannot be altered
# - a new object has to be created if a different value has to be stored
# - they play an important role in places where a constant hash value is needed, for example as a key in a dictionary
# - important advantage - performance
#
# >knowing that a object is immutable means we can allocate space for it at creation time,
# and the storage requirements are fixed and unchanging.
#
# Example: http://goo.gl/N6Rw4P
# In[6]:
# mutable example
l1 = [1, 2, 3]
print(id(l1))
l2 = l1
print(id(l2))
l2.append(4)
print(id(l2))
print(l1)
print(l2)
print(l1 is l2)
# 
# In[7]:
# immutable example
x = 5
print(id(x))
y = x
print(id(y))
x = x + 1
print(id(x))
print(x)
print(y)
print(x is y)
# ### Data Structures
#
# Basic data structures (most common used):
#
# #### lists
#
# > [1, 2, 'python', obj1, obj2]
#
# - sequence type - you can iterate
# - lists are mutable - can be modified in place by assignment to offsets as well as a variety of list method calls
# - can change their value but keep their ID (address in memory) - holds references to objects
# - the list type is a container
# - holds a number of other objects, in a given order
# - no fixed size - they can grow and shrink on demand, in response to list-specific operations like append. remove, ...
# - you can put into list all kind of objects - list object is the most general sequence
#
# #### tuples
#
# > (1, 2, 'python', obj1, obj2)
#
# - like a list that cannot be changed
# - are immutable
# - are used for grouping data
# - cant add/remove elements
# - are faster than list
# - can be used as keys in dictionary
# - functionally, they’re used to represent fixed collections of items
#
#
# #### dictionaries
#
# > {'key1': value1, 'key2': value2}
#
# - are mutable
# - unordered collection of key-values pairs
# - no duplicate keys
# - implemented using hash table (hash value calculated from the key value)
# - keys shoud be immutable
#
# #### sets
#
# > {1, 2, 'python', obj1, obj2}
#
# - are mutable
# - unordered collection
# - no duplicate elements
# - implemented using hash table (hash value calculated from the set's item)
# - support mathematical operations: union, intersection, difference, and symmetric difference
# - fast membership testing
# - slower than lists when it comes to iterating over their contents
#
# - time complexity: https://wiki.python.org/moin/TimeComplexity
# In[55]:
# lists playground
# Example 1: slicing
L = [1, 2, 3, 4, 5, 6]
print(L[1:])
print(L[3:5])
print(L[:-1])
print(L[-1])
# Example 2: memebership checking
print(4 in L)
print(43 in L)
# Example 3: add and remove elements
L.append(7)
L.remove(5)
print(L)
# Example 4: sorting
L.sort() # sort a list in place, without making a copy, returns None
L2 = sorted(L) # creates new sorted list and returns it, L list is not sorted
# In[56]:
# Dictionaries plaground
d = {'name': 'James', 'surname': 'Bond', 'code': 7}
name = d['name']
surname = d.get('surname', 'no_name')
# In[6]:
# Sets playground
# Example 1
s1 = {4,3,3,2,1,4,5,1}
print(s1)
# Example 2
s2 = set("abbbbbaaaaacccccddddeeee")
print(s2)
# Example 3
set_1 = {1, 2, 3}
set_2 = {3, 4, 5}
print("union: ", set_1 | set_2)
print("intersection: ", set_1 & set_2)
print("difference: ", set_2 - set_1)
print("symetric difference: ", set_1 ^ set_2)
# ### Flow control
#
# #### if, elif, else
#
# ```python
#
# if CONDITION:
# do something
# elif CONDITION:
# do something different
# elif CONDITION:
# do something different
# else:
# do yet something else
# ```
#
# #### Loops
#
# #### for loops
#
# ```python
# for value in iterable:
# # do things
# ```
#
# Example:
# ```python
# items_list = [1, 'A', 'B', 3, [], [1,2,3]]
# for item in items_list:
# print(item)
# ```
#
# #### while loops
#
# ```python
# x = 3
# while x > 0:
# print(x) #all the print statement must be in parenthesis for version 3.4.0
# x = x - 1 #the algebra need not be done within the parenthesis
# ```
#
# In[58]:
user_input = None
if user_input:
print(user_input)
elif user_input == 'END':
print("END")
else:
print("NO USER INPUT")
# In[8]:
numbers = [1, 2, 3, 4, 5]
number_to_find = 8
print(number_to_find in numbers)
if number_to_find in numbers:
print("Number {} found in {}".format(number_to_find, numbers))
else:
print("Cannot find number {} in {}".format(number_to_find, numbers))
# ### Functions
#
# In simple terms, a function is a device that groups a set of statements so they can be run more than once in a program—a packaged procedure invoked by name. Functions also can compute a result value and let us specify parameters that serve as function inputs and may differ each time the code is run.
#
# ```python
#
# def function(arguments):
# # do something
# return
# ```
# In[10]:
def add_numbers(num1, num2):
return num1 + num2
number = add_numbers(1, 2)
print number
# In[11]:
def add_numbers(*numbers):
return sum(numbers)
print("1 + 2 = ", add_numbers(1, 2))
print("1 + 2 + 3 = ", add_numbers(1, 2, 3))
print("1 + 2 + 3 + 4 = ", add_numbers(1, 2, 3, 4))
# In[11]:
def multiple_params_test(param1=None, param2=0, *args, **kwargs):
if kwargs.get('param', None):
pass
print(param1)
print(param2)
print(args)
print(kwargs)
#print(param1, param2, args, kwargs)
multiple_params_test(1, 2, 3, 4, 5, param3=3, param4=4)
# In[63]:
def add_numbers(a=0, b=0, c=None): # default values for attributes
"""
Function add numbers
"""
if c:
pass
return a + b
print(add_numbers())
print(add_numbers(2, 2))
# ### Functions in Python are first-class objects
#
# - created at runtime
# - assigned to a variable or element in a data structure
# - passed as an argument to a function
# - returned as the result of a function
#
# - integers, strings, and dictionaries are other examples of first-class objects in Python
# In[64]:
def do_something(param1):
return param1
# remember: functions are object
print("function name: ", do_something.__name__)
value_returned_by_function = do_something(param1=1) # call function
function_object = do_something # Notice: there is no braces '()', just function name
dir(function_object)
objects_storage = [1, 'python', do_something, function_object]
for obj in objects_storage:
print(obj)
# In[65]:
dir(do_something)
# In[66]:
def print_a(): print('a')
def print_b(): print('b')
def print_c(): print('c')
function_storage = [print_a, print_b, print_c]
for fn in function_storage:
fn() # run each function from 'function_storage' list
# In[67]:
def run_function(function):
return function()
def function_to_run(): print("do something")
run_function(function_to_run)
# In[68]:
# swtich
user_actions = {
'click_button_a': print_a,
'click_button_b': print_b,
'click_button_c': print_c}
user_choose = 'click_button_a'
user_actions[user_choose]()
# ### Function parameters: call by value or by reference?
#
# - it is called “object reference” or "by sharing"
#
# - call by sharing means that each formal parameter of the function gets a copy of each reference in the arguments
# - the parameters inside the function become aliases of the actual arguments
#
# - the result of this scheme is that a function may change any mutable object passed as a parameter
# - but it cannot change the identity of those objects (i.e., it cannot altogether replace an object with another).
#
# - best example: http://goo.gl/uWjZuT
#
# - good explanation:
# - http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-dick/
# - http://effbot.org/zone/call-by-object.htm
# - https://jeffknupp.com/blog/2012/11/13/is-python-callbyvalue-or-callbyreference-neither/
# In[69]:
def f(a, b):
a = a + b
return a
x = [1,2]
y = [3,4]
result = f(x, y)
print("result: ", result)
# what happend with x value?
print(x)
print(y)
# 
# How to "fix" this? What you should do to keep this x list without modification?
# In[70]:
def f(a, b):
new_obj_a = a
new_obj_b = b
new_obj_a = new_obj_a + new_obj_b
return new_obj_a
x = [1,2]
y = [3,4]
result = f(x, y)
print("result: ", result)
# what happend with x value?
print(x)
print(y)
# 
# In[71]:
def f(a, b):
new_obj_a = a[:]
new_obj_b = b[:]
a.append(2)
new_obj_a = new_obj_a + new_obj_b
return new_obj_a
x = [1,2]
y = [3,4]
result = f(x, y)
# http://goo.gl/VO153U
# 
# ### Copying objects in Python
#
# - copies are shallow by default!
#
# - using the constructor or [:] produces a shallow copy
# - the copy is filled with references to the same items held by the original container
# - this saves memory and causes no problems if all the items are immutable
# - if there are mutable items, this may lead to unpleasant surprises
#
#
# * Example 1: http://goo.gl/P3wj4O
# * Example 2: http://goo.gl/nIOz1U
# In[17]:
l1 = [3, [66, 55, 44], (7, 8, 9)]
l2 = list(l1)
print("AFTER COPY:")
print('l1:', l1)
print('l2:', l2)
print("\nAFTER L1 updates:")
l1.append(100)
l1[1].remove(55)
print('l1:', l1)
print('l2:', l2)
print("\nAFTER L2 updates:")
l2[1] += [33, 22]
l2[2] += (10, 11)
print('l1:', l1)
print('l2:', l2)
# 
# In[19]:
# Solution is to use deepcopy
from copy import deepcopy
l1 = [3, [66, 55, 44], (7, 8, 9)]
l2 = deepcopy(l1)
print("AFTER COPY:")
print('l1:', l1)
print('l2:', l2)
print("\nAFTER L1 updates:")
l1.append(100)
l1[1].remove(55)
print('l1:', l1)
print('l2:', l2)
print("\nAFTER L2 updates:")
l2[1] += [33, 22]
l2[2] += (10, 11)
print('l1:', l1)
print('l2:', l2)
# ### Reading and writing files
#
# We have four basic operations:
#
# - Open
# - returns a file object
# - open modes: r (read), w (write), r+ (read and write), a (append)
#
# ```python
# f = open('filename', 'r+')
# ```
#
# - Read
# - read strings from file
# - open returns file object (interator) so we can use file object like sequence
#
# Example 1:
# ```python
# f = open('filename', 'r')
# f.read()
# f.close()
# ```
#
# Example 2:
# ```python
# f = open('filename', 'r')
# for line in f:
# print line
# ```
#
# - Write
#
# ```python
# f = open('filename', 'w')
# f.write('first line\n')
# f.close()
# ```
#
# - Close
# - close and free up any system resources taken up by the open file
# - file object cannot be used after closing operation
# In[73]:
f = open('file_to_write', 'w')
print('f.mode ->', f.mode) # access mode
print('f.closed ->', f.closed) # is file closed
print('f.name ->', f.name) # file name
f.close()
print('-> closing file')
print('f.close ->', f.closed) # is file closed
# In[74]:
# Example: writing to file
# need to open file -> open(file_name, mode)
f = open('test_file', 'w')
f.write('write first line to file\n')
f.write('write second line to file\n')
# writelines expects a list of strings, while write expects a single string
save_to_file = [
'third line\n',
'fourth line \n'
]
f.writelines(save_to_file)
# remember to close file
f.close()
# In[75]:
# Example: reading from file
f = open('test_file', 'r')
print(f.read())
f.close()
# In[76]:
# Example: reading from file using for loop
f = open('test_file', 'r')
for line in f:
print(line)
# In[77]:
# Ezample: context managers for handling file I/O operations
with open('test_file', 'w') as f:
f.write('one\n')
f.write('two\n')
with open('test_file', 'r') as f:
print(f.read())
# ### Exceptions
#
# > Easier to ask for forgiveness than permission
#
# #### What is exception?
# - events that can modify the flow of control through a program
# - are triggered automatically on errors
# - what is error?
# - syntax error -> parsing error, syntactically incorrect
# - exception - statement or expression syntactically correct, errors detecting during execution
#
#
# #### How to handle with exceptions?
#
# - Use try/except block to catch and recover from exceptions
# ```python
# try:
# # code that will break (will throw exception)
# x = 1/0
# except EXCEPTION as E:
# #do something with exception
# print E
# ```
#
# - Use try/finally block to perform cleanup actions, whether exception occurs or not
# ```python
# try:
# f = open('file', 'r')
# # do something with file
# finally:
# f.close() # always invoke close
# ```
#
# - Use raise statement to raise exception manually
# ```python
# raise RuntimeError()
# ```
#
# #### Built-in Exceptions (most common)
#
# - ImportError -> raised when an import statement fails to find the module definition
# - IndexError -> raised when a sequence subscript is out of range, e.g: index[1000]
# - StopIteration -> signal that there are no further items produced by the iterator e.g: for loop
# - SyntaxError -> raised when the parser encounters a syntax error
# - IOError -> raised when input or output fails, for example if a disk fills up or an input file does not exist
# - KeyError -> raised when a value is not found as a key of a dictionary
#
# #### Assertions
#
# - used to verify program conditions during development
# - assert statements may be removed from a compiled program’s byte code - need to execute python program with -O flag
#
# ```python
# def f(x):
# assert x < 0, 'x must be negative' # if not it will raise AssertionError
# return x ** 2
# ```
#
#
# Source:
# - https://docs.python.org/3/tutorial/errors.html
# - https://docs.python.org/3/library/exceptions.html
# - https://pymotw.com/2/exceptions/
# In[18]:
try:
import module_does_not_exist
except ImportError as exc:
print("Cannot find such module")
import math
# In[20]:
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # We have 10 elements in this list
try:
print(numbers[11]) # ask for 11th element
except IndexError:
print("error")
# In[80]:
my_dictionary = {
'key_one': 1,
'key_two': 2,
}
my_dictionary['key_one'] # prints 1
my_dictionary['key_two'] # prints 2
my_dictionary['key_not_exist'] # error
# In[81]:
try:
x = 1/0
except ZeroDivisionError as err:
print(err)
# In[82]:
raise ZeroDivisionError('division by zero, oh no!')
# In[83]:
try:
raise ZeroDivisionError('division by zero, oh no!')
except ZeroDivisionError as err:
print(err)
# In[84]:
f = open("not_exist", 'r')
# In[85]:
try:
f = open("not_exist", 'r')
except FileNotFoundError as err:
print("File not found:", err)
except IOError as err:
print("IOError:", err)
finally:
print("Finally executed")
f.close()
# In[86]:
def fn():
try:
return
print(1)
except:
pass
finally:
print("finally")
fn()
# ### Modules
#
# - Every file of Python source code whose name ends in a .py extension is a module
# - Other files can access the items a module defines by importing that module
# - Import operation essentially loads another file (module)
# - imports must find files, compile them to byte code, and run the code
#
# - More specifically, modules have at least three roles:
# 1. Code reuse
# 2. System namespace partitioning
# 3. Implementing shared services or data (e.g: global object)
#
# > modules provide an easy way to organize components into a system by serving as self-contained packages of variables known as namespaces
#
#
# #### Import operation
#
# - Import operations essentially load another file and grant access to that file’s contents
# - Python searches for imported modules in every directory listed in sys.path
#
# > imports are not just textual insertions of one file into another. They are really runtime operations that perform three distinct steps the first time a program imports a given file:
# Python does this by storing loaded modules in a table named sys.modules and checking there at the start of an import operation. If the module is not present, a three-step process begins:
# 1. Find the module’s file.
# 2. Compile it to byte code (if needed).
# 3. Run the module’s code to build the objects it defines.
#
#
# ##### Import search path
#
# The Module Search Path:
# 1. The home directory of the program (automatic)
# 2. PYTHONPATH directories (if set)
# 3. Standard library directories
# 4. The contents of any .pth files (if present)
# 5. The site-packages home of third-party extensions
#
#
# ##### Python modules - examples:
#
# - my_lib.py
#
# ```python
#
# ATTRIBUTE_ONE = "attribute_one"
# LIST_OF_NUMBERS = [1, 2, 3, 4]
#
# def do_something(*args):
# return *args
#
# def do_something_complicated(*args):
# return 2 + 2
#
# if __name__ == "__main__":
# do_something(1, 2, 3)
#
# ```
#
# - my_script.py
#
# ```python
#
# from my_lib import do_something
#
# do_something(5, 6, 7)
#
# print my_lib.ATTRIBUTE_ONE
# ```
# In[87]:
import collections
from collections import OrderedDict
from collections import OrderedDict as ordered_dict
# In[88]:
import math
from imp import reload
reload(math)
# In[89]:
from A import func
from B import func # This overwrites function we fetched from A
func() # It calls A.func() only
# How to fix this?
from A import func as afunc # Rename uniquely with "as"
from B import func as bfunc
afunc()
bfunc()
# ### Garbage collector
#
# Python has a feature known as garbage collection that cleans up unused memory as your program runs and frees you from having to manage such details in your code.
#
#
# - When we lose the last reference to the object by assigning its variable to something else, all of the memory space occupied by that object’s structure is automatically cleaned up for us
#
# - Technically speaking, Python’s garbage collection is based mainly upon reference counters
#
#
# ##### How to check pointers to object (number of references)?
#
# ```python
# >>> import sys
# >>> sys.getrefcount(1) # 647 pointers to this shared piece of memory
# ```
#
# ### Better to know ...
#
# - Python cannot run programms in parallel - there is a global mutex (Global Interperer Lock)
# - GIL ensures that only one thread runs in the interperter at once
# - sources:
# - https://wiki.python.org/moin/GlobalInterpreterLock
# - http://www.dabeaz.com/python/UnderstandingGIL.pdf
# - we have GIL only in CPython implementaion
# - you can use others python implemention: Jython, IronPython, PyPy
#
# ### How to learn Python?
#
#
# - first, master the fundamentals
#
# - python official documentation: https://docs.python.org/3/
# - well writen python tutorial: https://docs.python.org/3/tutorial/index.html
# - coding standard, style guide - pep8: https://www.python.org/dev/peps/pep-0008/
# - visualize execution of code: http://www.pythontutor.com/
# In[90]:
import this
# ### Fetching data from web
#
# > The Requests package is recommended for a higher-level http client interface
#
# > Requests allow you to send HTTP/1.1 requests. You can add headers, form data, multipart files, and parameters with simple Python dictionaries, and access the response data in the same way. It’s powered by httplib and urllib3
#
# - Remember to install requests package, because it is 3rd party library
#
# ```bash
# pip install requests
# ```
#
# Sources:
# - https://docs.python.org/2/library/urllib.html
# - http://docs.python-requests.org/en/master/
# In[91]:
import requests
r = requests.get('https://api.github.com/events')
r.content
# #### For advanced users
#
# - python enhancement proposals: https://www.python.org/dev/peps/
# - let's look into Full Python Grammar specification: https://docs.python.org/3.1/reference/grammar.html
# - python official repository: https://hg.python.org/
#
# ### How to install 3rd party libraries
#
# - PyPI - the Python Package Index (repository of python non-standard libraries), currently ~ 75 k libraries
# - to install additional libraries you need to use additional program:
# - easy_install - very basic lib installer
# - pip - is the preferred installer program
#
# Examples:
# ```bash
# $ pip install SomePackage
# ```
#
# ```bash
# python -m pip install SomePackage
# ```
#
# ```bash
# pip install SomePackage==1.0.4 # specific version
# ```
#
# ```bash
# $ pip show --files SomePackage
# Name: SomePackage
# Version: 1.0
# Location: /my/env/lib/pythonx.x/site-packages
# Files:
# ../somepackage/__init__.py
# [...]
# ```
#
# Sources:
# - https://pypi.python.org/pypi/pip
# - https://docs.python.org/dev/installing/
# - https://pypi.python.org/pypi
# - https://pip.pypa.io/en/stable/installing/
# - http://python-packaging-user-guide.readthedocs.org/en/latest/pip_easy_install/
# ### Virtual environments
#
# > a virtual environment is a semi-isolated Python environment that allows packages to be installed for use by a particular application, rather than being installed system wide
#
#
# Steps to create virtual environment:
# - Install virtual environment
# ```
# $ pip install virtualenv
# ```
#
# - Create a virtual environment for a project
#
# ```
# $ mkdir lab_env
# $ cd lab_env
# $ virtualenv lab_env
# ```
#
# - You can use your virtual python interpreter
#
# ```
# $ source venv/bin/activate
# (lab_env) $ pip install requests
# ```
#
#
# Sources:
# - http://docs.python-guide.org/en/latest/dev/virtualenvs/
# ### Scopes - local vs global
#
# ```python
# X = 1 # Global scope
#
# def fn1(): # Local scope inside function fn1
# X = 2
# fn1 = 1
#
# def fn2(): # Local scope inside function fn2
# X = 3
# fn2 = 3
#
# # Global scope
#
# Y = 3
# fn1 = fn1()
# fn2 = fn2()
#
# ```
#
# #### Scope
# - The places where variables are defined and looked up
# - Help prevent name clashes across your program’s code
#
# - Names assigned inside a def can only be seen by the code within that def
# - Names assigned inside a def do not clash with variables outside the def, even if the same names are used elsewhere
#
# - If a variable is assigned inside a def, it is local to that function.
# - If a variable is assigned outside all defs, it is global to the entire file
#
# #### Scopes in Python
#
# local namespace
# - specific to the current function or class method. If the function defines a local variable x, or has an argument x, Python will use this and stop searching.
#
# global namespace
# - specific to the current module. If the module has defined a variable, function, or class called x, Python will use that and stop searching.
#
# built-in namespace
# - global to all modules. As a last resort, Python will assume that x is the name of built-in function or variable.
#
# #### Global
#
# - By default, all names assigned in a function are local to that function
# - Global declares module-level variables that are to be assigned
# - Global names are variables assigned at the top level of the enclosing module file
#
# - "global" statement tells that a function plans to change one or more global names
# In[92]:
X = 1 # Global scope
def fn1(): # Local scope inside function fn1
X = 2
fn1 = 1
def fn2(): # Local scope inside function fn2
X = 3
fn2 = 3
# Global scope
Y = 3
fn1 = fn1()
# In[93]:
# locals() functions returns all names from local scope
def print_locals():
a = 1
b = 2
print(locals())
print_locals()
# In[94]:
# __builtins__ in Python 2.x
import builtins # in Python 3.x
dir(builtins)
# In[1]:
# Trap !
def trap():
print = "Print something" # Redefine built-in name "print"
print("function local scope")
print("module global scope")
trap()
# In[5]:
# in Python 2.X you could say __builtin__.True = False, to reset True to False for the entire Python process
print bool(1)
True = False
if True:
print "a"
# In[ ]:
X = 1 # Global scope
def increment():
X = 3 # Local scope - inside function
X = X + 1
print('X inside function: ', X)
increment()
print('X outside function:', X)
# In[ ]:
X = 1 # Global scope
def increment():
X = X + 1 # UnboundLocalError: local variable 'X' referenced before assignment
print('X inside function: ', X)
increment()
print('X outside function:', X)
# In[ ]:
X = 1
def increment():
global X # we are using X from global scope
X = X + 1
print('X inside function: ', X)
increment()
print('X outside function:', X)
# In[ ]:
# Global scope
X = 99 # X and func assigned in module: global
def func(Y): # Y and Z assigned in function: locals
# Local scope
Z = X + Y # X is a global
return Z
func(1) # func in module: result=100
# In[ ]:
X = 99 # Global scope name: not used
def f1():
X = 88 # Enclosing def local
def f2():
print(X) # Reference made in nested def
f2()
f1()
# ### Creating own types - classes
#
# #### Class
#
# - A user-defined prototype for an object that defines a set of attributes that characterize any object of the class
# - The attributes are data members (class variables and instance variables) and methods, accessed via dot notation
# - Simply speaking: A coding structure used to implement new kinds of objects in Python
# - Classes are a kind of factory for generating instances
# - Classes are created with a new statement: the ```class```
#
# ```python
# class MyClass:
# #class body
# ```
#
#
# #### Class variable
#
# - A variable that is shared by all instances of a class
# - Class variables are defined within a class but outside any of the class's methods
# - Class variables aren't used as frequently as instance variables are
#
# ```python
# class MyClass:
# shared_value = 100
#
# MyClass.shared_value
# ```
#
#
# #### Data member
#
#
#
#
#
#
#
#
#
#
#
#
# - A class variable or instance variable that holds data associated with a class and its objects
#
# ```python
# class MyClass:
# shared_value = 100
# def __init__(self, a, b):
# self.a = a
# self.b = b
#
# def get_a(self):
# return self.a
# ```
#
#
# #### Function overloading
#
# - The assignment of more than one behavior to a particular function
# - The operation performed varies by the types of objects (arguments) involved
#
# ```python
# class MyClass:
#
# def __init__(self, a, b):
# self.a = a
# self.b = b
#
# def __init__(self, a, b, c): # python will invoke only this method
# self.a = a
# self.b = b
# self.c = c
#
# ```
#
# #### Instance variable (attribute)
#
# - A variable that is defined inside a method and belongs only to the current instance of a class
# - Assignments inside class statements make class attributes
#
# ```python
#
# class MyClass:
#
# def __init__(self, a, b):
# self.a = a
# self.b = b
#
# obj = MyClass(1, 2)
# obj.a
# obj.__dict__['a']
# ```
#
#
#
# #### Inheritance
#
# - The transfer of the characteristics of a class to other classes that are derived from it
# - Inheritance is based on attribute lookup in Python (in X.name expressions)
# - Multiple inheritance allowed (class may have more than one superclass above it in the class tree)
#
# Key ideas:
# - Superclasses are listed in parentheses in a class header e.g MyClass(A, B, C)
# - Classes inherit attributes from their superclasses
# - Instances inherit attributes from all accessible classes
#
# ```python
# class A(object):
# pass
#
# class B(A):
# pass
#
# ```
#
# #### Instance
#
# - An individual object of a certain class
# - Instance objects are concrete items
# - Calling a class object like a function makes a new instance object
# - Each instance object inherits class attributes and gets its own namespace
# - Assignments to attributes of self in methods make per-instance attributes
#
# ```python
# my_class_obj = MyClass(1, 2)
#
# my_class_obj.new_attribute = 3 # create (assign) new attribute to this particular instance only
#
# ```
#
#
# #### Instantiation
#
# - The creation of an instance of a class
#
#
# #### Method
#
# - A special kind of function that is defined in a class definition
#
# ```python
# class MyClass:
#
# def method_1(self, a, b):
# print(a, b)
#
# def method_2(self, a, b, c):
# print(a, b, c)
# ```
#
#
# #### Object
#
# - A unique instance of a data structure that's defined by its class
# - An object comprises both data members (class variables and instance variables) and methods
#
#
# #### Operator overloading
#
# - The assignment of more than one function to a particular operator
#
#
# Sources:
# - https://docs.python.org/2/tutorial/classes.html
# In[42]:
class Person(object):
label = 'Person'
def __init__(self, name, surname):
self.name = name
self.surname = surname
def name_surname(self):
print "iside method", self.name + " " + self.surname
def __str__(self):
return self.name + " " + self.surname
def __eq__(self, other):
return self.name > other.name
def __hash__(self):
return hash(self.name)
p = Person(name="Guido", surname="<NAME>")
print(p.name)
print(p.surname)
print(p.label)
print(Person.label)
p.name_surname()
print p
#print(p.__dict__['name'])
# In[43]:
p1 = Person(name="Guido", surname="<NAME>")
p2 = Person(name="Maciej", surname="Python")
p1 > p2
s = set([p1, p2])
print s
# ### Privacy
#
# - In Python, there is no way to create private variables like there is with the private modifier in Java
# - What we have in Python is a simple mechanism to prevent accidental overwriting of a “private” attribute
# In[26]:
class Employer(object):
def __init__(self, bonus):
self.job_grade = 10
self.salary = 1500 + (bonus * self.job_grade)
employer_1 = Employer(bonus=1500)
print employer_1.salary
#employer_1.job_grade = 100
print("job grade :", employer_1.job_grade)
#print employer_1.__salary
#print("salary :", employer_1.__salary)
# In[19]:
print dir(employer_1)
salary = employer_1._Employer__salary
print(salary)
# ### Special methods
#
# - Methods named with double underscores (__X__) are special hooks
# - Such methods are called automatically when instances appear in built-in operations
# - Special methods are meant to be called by the Python interpreter, and not by you
# - Don't write obj.\__len\__(), but len(obj) - Python will call \__len\__() method behind the scenes
# - Classes may override most built-in type operations
#
# Some examples:
#
# * \__init\__()
# * \__new\__()
# * \__repr\__()
# * \__len\__()
# * \__str\__()
# * \__eq\__()
# * \__hash\__()
# * \__getitem\__()
# * \__add\__()
#
# and many many more. Visit http://www.rafekettler.com/magicmethods.html to get more information.
# In[ ]:
class NewStyle(object): pass
class OldStyle: pass
# In[ ]:
class Employee(object):
static_counter = 0
def __init__(self, name, surname):
self.name = name
self.surname = surname
self.salary = 1500
self.__job_grade = 1
Employee.static_counter += 1
def get_name(self):
return self.name
def get_salary(self):
return self.salary
def __str__(self):
return "{name}{surname} get {salary} PLN".format(
name=self.name, surname=self.surname, salary=self.salary)
@classmethod
def get_counter(cls):
return cls.static_counter
employee = Employee('Lucky', 'Boy')
employee.name = "a"
employee.surname = "b"
employee.new_attribute = "new attribute"
print(employee.new_attribute)
print(employee.get_name())
print(employee.get_salary())
print(employee)
print(employee.get_counter())
print(Employee.get_counter())
# In[ ]:
class B(object): pass
class A(object):
def __init__(self): # first init
print("A")
def __init__(self): # second init
print("B")
a = A() # second init was used
# In[ ]:
class Figure(object):
__slots__ = ['width', 'height']
f = Figure()
f.width = 10
print(f.width)
f.size = 10 # AttributeError: 'Figure' object has no attribute 'size'
# In[ ]:
# Class inheritance
class Pet(object):
def __init__(self, name, species):
self.name = name
self.species = species
def get_name(self):
return self.name
def get_species(self):
return self.species
class Dog(Pet):
def __init__(self, name, hates_cat=True):
Pet.__init__(self, name, 'Dog')
#super(Dog, self).__init__(name, 'Dog')
self.hates_cat = hates_cat
def hates_cat(self):
return self.hates_cat
def get_species(self):
return 'Doggggg'
pet = Pet('Mister', 'Cat')
print(pet.get_species())
dog = Dog('Mister', hates_cat=True)
print(dog.get_species())
# In[ ]:
# In[ ]:
text = """
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
"""
import re # find more information here: https://docs.python.org/2/library/re.html
regex = re.compile('^\w+', re.MULTILINE) # regular expression
class TextFilter(object):
def __init__(self, text):
self.words = regex.findall(text)
def __getitem__(self, index):
return self.words[index]
def __repr__(self):
return str(self.words)
def __len__(self):
return len(self.words)
filtered_text = TextFilter(text)
print(filtered_text)
print("number of list elements: ", len(filtered_text))
print("word in list: ", 'Simple' in filtered_text)
print("slicing: ", filtered_text[2:4])
for word in filtered_text:
print(word)
# In[ ]:
# We can do it even much simpler ...
filtered_text = regex.findall(text)
print(filtered_text)
# In[ ]:
<file_sep>import sys
script_name = sys.argv[0] # script name, e.g.: your_script
arg1 = sys.argv[1] # first argument, e.g.: argument1
arg2 = sys.argv[2] # second argument, e.g.: argument2
print script_name, arg1, arg2
<file_sep>import datetime
day_today = datetime.date.today().strftime("%A")
print "Today is {day}".format(day=day_today)
if day_today is "Friday":
print "Today is Friday!!"
else:
print "Today is {day}".format(day=day_today)
# ------------------------
# multiply each number by 2
numbers = [1, 2, 3, 4, 5, 6, 7]
for number in numbers:
print number ** 2
# ------------------------
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# numbers = range(1, 11)
for number in numbers:
if number % 2 == 0:
print "Number {} is even".format(number)
elif number % 2 == 1:
print "Number {} is odd".format(number)
else:
print "is it number: {}?".format(number)
# ----------------------
# List comprehension
even_numbers = [number for number in range(1,11) if number % 2 == 0]
odd_numbers = [number for number in range(1,11) if number % 2 == 1]
print "Even numbers: ", even_numbers
print "Odd numbers:", odd_numbers
# -- sets
numbers = range(1, 30)
even_numbers = [number for number in range(1,11) if number % 2 == 0]
even_numbers = set(even_numbers)
numbers = set(numbers)
# difference (-) -> new set with elements in numbers but not in even_numbers
# so we can get odd_numbers
odd_numbers = list(numbers - even_numbers)
print "Odd numbers: ", odd_numbers
# ----------------------
while True:
number = input("Please provide number: ")
if number % 2 == 0:
print "Number {} is even".format(number)
elif number % 2 == 1:
print "Number {} is odd".format(number)
else:
print "is it number: {}?".format(number)
break
def is_number_even(number):
if number % 2 == 0:
print "Number {} is even".format(number)
return True
elif number % 2 == 1:
print "Number {} is odd".format(number)
else:
print "is it number: {}?".format(number)
return False
while True:
number = input("Please provide number: ")
is_number_even(number)
break
while True:
number = input("Please provide number: ")
try:
number = int(number)
except ValueError as exc:
print "Do we have number or not?"
break
is_number_even(number)
break
# ---------------
# very simple calc
def add_numbers(n1, n2):
return n1 + n2
def multiply_numbers(n1, n2):
return n1 * n2
def subtract_numbers(n1, n2):
return n1 - n2
def divide_numbers(n1, n2):
return n1 / n2
actions = {
'add': add_numbers,
'multiply': multiply_numbers,
'subtract': subtract_numbers,
'divide': divide_numbers,
}
action = raw_input("Choose one action [add|multiply|subtract|divide|]:")
number1 = raw_input("Provide first number: ")
number2 = raw_input("Provide second number: ")
# convert to int
number1 = int(number1)
number2 = int(number2)
print "You will {action} two numbers {number1} and {number2}".format(**locals())
result = actions[action](number1, number2)
print "Result is: ", result
# ----------------------------
class SimpleCalc(object):
def __init__(self, number1, number2):
self.n1 = number1
self.n2 = number2
def add(self):
return self.n1 + self.n2
def multiply(self):
return self.n1 * self.n2
def subtract(selt):
return self.n1 - self.n2
def divide(self):
return self.n1 / self.n2
simple_calc = SimpleCalc(number1, number2)
action = getattr(simple_calc, action)
result = action()
print result
|
939f648f05120b9a37c10b06446864de7e8fedaa
|
[
"Python"
] | 9
|
Python
|
hopsmdev/trainings
|
7399e1f7fc80e0a6fb55adf3c34cbe1f1085fdfa
|
c2c85501999a0e0f2e919adbd3bc459aa20dd544
|
refs/heads/master
|
<file_sep>import java.util.HashSet;
import java.util.Scanner;
public class FindNumber {
public int singleNumber(int[] nums) {
HashSet<Integer> h = new HashSet<Integer>();
for (int i : nums) {
if (!h.add(i)) {
h.remove(i);
}
}
return h.iterator().next();
}
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String sint = s.nextLine();
String[] nums = sint.split(",");
int array[] = new int[nums.length];
for (int i = 0; i < nums.length; i++) {
array[i] = Integer.parseInt(nums[i]);
}
FindNumber f = new FindNumber();
int n = f.singleNumber(array);
System.out.println(n);
}
}
<file_sep>
public class Person implements Comparable<Person> {
private String firstName;
private String lastName;
private int age;
public String getfirstName() {
return this.firstName;
}
public String getlastName() {
return this.lastName;
}
public void setfirstName(String firstName) {
this.firstName = firstName;
}
public void setlastName(String lastName) {
this.lastName = lastName;
}
@Override
public int compareTo(Person o) {
Person p = (Person) o;
if (age == p.age) {
return 0;
} else if (age > p.age) {
return 1;
} else {
return -1;
}
}
@Override
public boolean equals(Object o) {
Person p = (Person) o;
if (age == p.age) {
return true;
} else {
return false;
}
}
public int hashcode() {
return age;
}
public String toString() {
String str = "FirstName" + firstName + " LastName:" + lastName + " Age:" + age;
return str;
}
}
<file_sep>import static org.junit.Assert.*;
import org.junit.Test;
public class ValidStringTest {
@Test
public void test() {
ValidString vs=new ValidString();
boolean result1=vs.isValid("()[]{}");
assertEquals(true,result1);
boolean result2=vs.isValid("([)]{}");
assertEquals(false,result2);
boolean result3=vs.isValid("()22");
assertEquals(false,result3);
}
}
|
8dac22f0807bfc0a30b0f1ead5b6895665bb86bb
|
[
"Java"
] | 3
|
Java
|
kristinechiang/Assignment5
|
2cccbdef3773e42bfad11171ff27827fb90d113b
|
19e5f6c697d325b33fe7f56a94561c226a1bbb70
|
refs/heads/master
|
<file_sep># == Schema Information
#
# Table name: events
#
# id :integer not null, primary key
# title :string
# start_date :datetime
# end_date :datetime
# location :string
# agenda :text
# address :text
# organizer_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# slug :string
#
class Event < ActiveRecord::Base
extend FriendlyId
friendly_id :slug_candidates, use: :slugged
belongs_to :organizers, class_name: "User"
has_many :taggings
has_many :tags, through: :taggings
def slug_candidates
[
:title,
[:title, :location],
]
end
def all_tags=(names)
#code
self.tags = names.split(",").map do |t|
Tag.where(name: t.strip).first_or_create!
end
end
def all_tags
#code
tags.map(&:name).join(", ")
end
end
|
c71805df4e698da8d9e6880a68b9b68a8a8bef60
|
[
"Ruby"
] | 1
|
Ruby
|
malprax/conference_sample
|
1799b8518675790ab47aeee714a8e7b75729bef3
|
0255dd6ee5f1bb9aecfe38c0a47f9b9d814de52d
|
refs/heads/master
|
<repo_name>1405043-kd/chhobighor<file_sep>/cv.py
import numpy as np
import cv2
from matplotlib import pyplot as plt
from numpy.core.tests.test_mem_overlap import xrange
img = cv2.imread('for_science10.jpg')
def ancuti_journal(im):
# img1 = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
img = im.copy()
avg_b = np.average(img[:, :, 0])
avg_g = np.average(img[:, :, 1])
avg_r = np.average(img[:, :, 2])
# print (avg_b)
# print (avg_g)
# print (avg_r)
img[:, :, 2] = img[:, :, 2] + (1 * (avg_g - avg_r) * (1 - img[:, :, 2] / 255) * img[:, :, 1] / 255)
# img[:, :, 0] = img[:, :, 0] + (1 * (avg_g - avg_b) * (np.sum(img[:, :, 0]) - img[:, :, 0]) * img[:, :, 1])
img[:, :, 0] = img[:, :, 0] + (1 * (avg_g - avg_b) * (1 - img[:, :, 0] / 255) * img[:, :, 1] / 255)
# avg_b = np.average(img[:, :, 0])
# avg_g= np.average(img[:, :, 1])
# avg_r = np.average(img[:, :, 2])
#
# print (avg_b)
# print (avg_g)
# print (avg_r)
return img
def white_balance_with_ancuti(img):
img_red_blue_compensated = ancuti_journal(img)
result = grey_world_assumption(img_red_blue_compensated)
return result
def grey_world_assumption(img):
# img_red_compensated = ancuti_journal(img)
result = cv2.cvtColor(img, cv2.COLOR_BGR2LAB)
avg_a = np.average(result[:, :, 1])
avg_b = np.average(result[:, :, 2])
result[:, :, 1] = result[:, :, 1] - ((avg_a - 128) * (result[:, :, 0] / 255.0) * 1.1)
result[:, :, 2] = result[:, :, 2] - ((avg_b - 128) * (result[:, :, 0] / 255.0) * 1.1)
result = cv2.cvtColor(result, cv2.COLOR_LAB2BGR)
return result
def adjust_gamma(image, gamma):
img = image.copy()
invGamma = 1.0 / gamma
table = np.array([((i / 255.0) ** invGamma) * 255
for i in np.arange(0, 256)]).astype("uint8")
return cv2.LUT(img, table)
def unsharp_masking(img):
image = img.copy()
# norm_mask = image.copy()
gaussian_blur = cv2.GaussianBlur(image, (3, 3), 3) # taking the blur image
g_mask = cv2.addWeighted(image, 1, gaussian_blur, -1, 0) # subtracting from image to achieve mask
# histrogram stretching of the mask
img_yuv = cv2.cvtColor(g_mask, cv2.COLOR_BGR2YUV)
# equalize the histogram of the Y channel
img_yuv[:, :, 0] = cv2.equalizeHist(img_yuv[:, :, 0])
# convert the YUV image back to RGB format
g_mask_norm = cv2.cvtColor(img_yuv, cv2.COLOR_YUV2BGR)
# cv2.normalize(g_mask, norm_mask, alpha=0, beta=255, norm_type=cv2.NORM_MINMAX)
image = cv2.addWeighted(image, 1, g_mask_norm, .15, 0) # adding to initial image to get masked data
# as per paper, this normalized addition should again be divided by 2(but that seems a loss to me, so avoiding it for now)
# image = cv2.addWeighted(img, 1, g_mask, 1, 0)
# cv2.normalize(image, image, alpha=0, beta=255, norm_type=cv2.NORM_MINMAX)
# return unsharp_image
#
# f = np.hstack((img, image, g_mask, norm_image))
# plt.imshow(f)
# plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
# plt.show()
return image
def laplacian_weight(img):
image = img.copy()
# image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image = cv2.Laplacian(image, cv2.CV_16S)
cv2.convertScaleAbs(image, image)
# image = cv2.addWeighted(image, 1, img, -1, 0)
return image
def saliency_weight(img):
# #as per equation 7 described in achantay a
# image = img.copy()
# gaussian_blur = cv2.GaussianBlur(image, (3, 3), 3)
# #image_lab = cv2.cvtColor(image, cv2.COLOR_BGR2Lab)
# #image_lab_blur = cv2.cvtColor(gaussian_blur, cv2.COLOR_BGR2LAB)
#
# avg_b = np.average(image[:, :, 0])
# avg_g = np.average(image[:, :, 1])
# avg_r = np.average(image[:, :, 2])
#
# image[:, :, 0] = abs(avg_b-gaussian_blur[:, :, 0])
# image[:, :, 1] = abs(avg_g-gaussian_blur[:, :, 1])
# image[:, :, 2] = abs(avg_r-gaussian_blur[:, :, 2])
#
# #image_lab_blur = cv2.cvtColor(gaussian_blur, cv2.COLOR_LAB2BGR)
#
# return image
# as per equation 8 described in achantay et al.
image = img.copy()
gaussian_blur = cv2.GaussianBlur(image, (3, 3), 3)
# image_lab = cv2.cvtColor(image, cv2.COLOR_BGR2Lab)
# image_lab_blur = cv2.cvtColor(gaussian_blur, cv2.COLOR_BGR2Lab)
image_lab = image
image_lab_blur = gaussian_blur
cv2.transpose(image_lab, image_lab)
avg_l = np.average(image_lab[:, :, 0])
avg_a = np.average(image_lab[:, :, 1])
avg_b = np.average(image_lab[:, :, 2])
image_lab[:, :, 0] = (abs((avg_l) - (image_lab_blur[:, :, 0])))
image_lab[:, :, 1] = (abs((avg_a) - (image_lab_blur[:, :, 1])))
image_lab[:, :, 2] = (abs((avg_b) - (image_lab_blur[:, :, 2])))
# image_lab = cv2.cvtColor(image_lab, cv2.COLOR_Lab2BGR)
return image_lab
def saturation_weight(img):
image = img.copy()
lab_image = cv2.cvtColor(image, cv2.COLOR_BGR2YCrCb)
lab_image[:, :, 0] = (((image[:, :, 0] - lab_image[:, :, 0]) ** 2 + (image[:, :, 1] - lab_image[:, :, 0]) ** 2 + (
image[:, :, 2] - lab_image[:, :, 0]) ** 2) * (0.33)) ** (.5)
image = cv2.cvtColor(lab_image, cv2.COLOR_YCrCb2BGR)
return image
def weight_adder(input):
weight_sum = input.copy()
input1 = input.copy()
lap = laplacian_weight(input1)
sal = saliency_weight(input1)
sat = saturation_weight(input1)
# weight_sum=cv2.add(lap, sal)
# weight_sum = cv2.add(weight_sum, sat, weight_sum.type())
#
weight_sum[:, :, 0] = (lap[:, :, 0] + sal[:, :, 0] + sat[:, :, 0])
weight_sum[:, :, 1] = (lap[:, :, 1] + sal[:, :, 1] + sat[:, :, 1])
weight_sum[:, :, 2] = (lap[:, :, 2] + sal[:, :, 2] + sat[:, :, 2])
# weight_sum=cv2.addWeighted(lap, 1.0, sal, 1.0)
# weight_sum=cv2.addWeighted(weight_sum, 1, sat, 1)
# cv2.divide(input1, weight_sum, input1)
# input1[:, :, 0] = (input1[:, :, 0])
# input1[:, :, 1] = (input1[:, :, 1])
# input1[:, :, 2] = (input1[:, :, 2])
# cv2.normalize(weight_sum, weight_sum, 0, 255, cv2.NORM_L1)
return weight_sum
def adder(image1, image2):
src = image1.copy()
dst = image2.copy()
# dst[:, :, 0]=dst[:, :, 0]+src[:, :, 0]
# dst[:, :, 1]=dst[:, :, 1]+src[:, :, 1]
# dst[:, :, 2] = dst[:, :, 2] + src[:, :, 2]
cv2.add(src, dst, dst)
return dst
def normal_fusion(gamma, gamma_w, unsharp, unsharp_w):
# basic_fusion
im1 = cv2.multiply(gamma, gamma_w)
im2 = cv2.multiply(unsharp, unsharp_w)
res = cv2.add(im1, im2)
return res
#/////////////////////////////////////////////////////////////////////////////attempt failed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#
# def gaussian_pyramid(image):
# # generate Gaussian pyramid
# G = image.copy()
# gpB = [G]
# for i in xrange(3):
# G = cv2.pyrDown(G)
# gpB.append(G)
# return gpB
#
#
# def laplacian_pyramid(image):
# gpB = gaussian_pyramid(image)
# # generate Laplacian Pyramid
# lpB = [gpB[2]]
# for i in xrange(2, 0, -1):
# GE = cv2.pyrUp(gpB[i])
# L = cv2.subtract(gpB[i - 1], GE)
# lpB.append(L)
# return lpB
#
#
# def pyr_reconstruct(LS):
# # now reconstruct
# ls_ = LS[0]
# for i in xrange(1, 3):
# ls_ = cv2.pyrUp(ls_)
# ls_ = cv2.add(ls_, LS[i])
#
#
# def fusion_multi(image1, w1, image2, w2):
# # #lap_1=laplacian_weight(image1)
# # gau_1=gaussian_pyramid(w1)
# # #lap_2=laplacian_weight(image2)
# # gau_2=gaussian_pyramid(w2)
# #
# # b1, g1, r1 = cv2.split(image1)
# # b2, g2, r2 = cv2.split(image2)
# #
# #
# #
# # #
# # lap_b1=laplacian_weight(b1)
# # lap_g1=laplacian_weight(g1)
# # lap_r1 = laplacian_weight(r1)
# #
# # lap_b2 = laplacian_weight(b2)
# # lap_g2 = laplacian_weight(g2)
# # lap_r2 = laplacian_weight(r2)
# #
# #
# # f_b1 = lap_b1[0] * gau_1[0][:, :, 0]+ lap_b2[0] * gau_2[0][:, :, 0]
# # f_b2 = lap_b1[1] * gau_1[0][:, :, 0] + lap_b2[1] * gau_2[0][:, :, 0]
# # f_b3 = lap_b1[2] * gau_1[0][:, :, 0] + lap_b2[2] * gau_2[0][:, :, 0]
# #
# # f_g1 = (lap_g1[0] * gau_1[0][:, :, 1] + lap_g2[0] * gau_2[0][:, :, 1])
# # #f_g2 = (lap_g1[1] * gau_1[0][:, :, 1]+ lap_g2[1] * gau_2[0][:, :, 1])
# # #f_g3 = (lap_g1[2] * gau_1[0][:, :, 1]+ lap_b2[2] * gau_2[0][:, :, 1])
# #
# # f_r1 = (lap_r1[0] * gau_1[0][:, :, 2]+ lap_r2[0] * gau_2[0][:, :, 2])
# # #f_r2 = (lap_g1[1] * gau_1[0][:, :, 2]+ lap_g2[1] * gau_2[0][:, :, 2])
# # #f_r3 = (lap_g1[2] * gau_1[0][:, :, 2]+ lap_b2[2] * gau_2[0][:, :, 2])
# #
# # bf= f_b1 #+f_b2+f_b3
# # gf= f_g1 #+f_g2+f_g3
# # rf= f_r1 #+f_r2+f_r3
# #
# # foo = cv2.merge((bf, gf, rf))
#
# w2 = cv2.GaussianBlur(w2, (3, 3), 3)
# w1 = laplacian_weight(w1)
#
# w2 = np.uint8(w2)
# w1 = np.uint8(w1)
#
# foo = w1 * image1
# bar = w2 * image2
#
# # G = lap_2[0]*gau_2[0]
# # im2 = G.copy()
# # for i in xrange(1,3):
# # G = lap_2[i]*gau_2[i]
# # im2 =cv2.add(G, im2)
# #
# # return lap_2[0][:, :, 0]
# return foo + bar
#/////////////////////////////////////////////////////////////////////////////attempt failed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#/////////////////////////////////////////////////////////////////////////////attempt failed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# def filter_mask(im):
# h = [1.0 / 16.0, 4.0 / 16.0, 6.0 / 16.0, 4.0 / 16.0, 1.0 / 16.0]
# print(h)
# image = np.zeros((h.__len__(), h.__len__()), im.dtype)
# for i in range(h.__len__()):
# for j in range(h.__len__()):
# image[i][j] = h[i] * h[j]
#
# return image
#
#
# def build_gaussian_p(image, level):
# mask = filter_mask(image)
# tmp = cv2.filter2D(image, -1, mask)
# gauss_pyr = [tmp]
# tmp_img = image.copy()
#
# for i in xrange(1, level):
# #print(i)
# cv2.resize(tmp_img, (0, 0), tmp_img, 0.5, 0.5, cv2.INTER_LINEAR)
#
# tmp = cv2.filter2D(tmp_img, -1, mask)
# gauss_pyr.append(tmp.copy())
#
# return gauss_pyr
#
#
# def build_lap_pyramid(image, level):
# lap_pyr = [image.copy()]
# tmp_img = image.copy()
#
# for i in xrange(1, level):
# cv2.resize(tmp_img, (0, 0), tmp_img, 0.5, 0.5, cv2.INTER_LINEAR)
# lap_pyr.append(tmp_img.copy())
#
# for i in xrange(level - 1):
# # print(i)
# tmp_pyr = tmp_img
# cv2.resize(lap_pyr[i + 1], lap_pyr[i].shape[:2], tmp_pyr, 0, 0, cv2.INTER_LINEAR)
# cv2.subtract(lap_pyr[i], tmp_pyr, lap_pyr[i])
# return lap_pyr
#
#
# def reconstruct_laplacian_pyr(pyramid):
# level = len(pyramid)
#
# for i in xrange(level - 1, 0, -1):
# tmp_pyr = pyramid[i]
# cv2.resize(pyramid[i], pyramid[i - 1].shape[:2], tmp_pyr, 0, 0, cv2.INTER_LINEAR)
# cv2.add(pyramid[i - 1], tmp_pyr, pyramid[i - 1])
#
# return pyramid[0]
#
#
# def fuse_two_image(wa1, im1, wa2, im2, level):
# img1 = im1.copy()
# img2 = im2.copy()
# w1 = wa1.copy()
# w2 = wa2.copy()
# weight1 = build_gaussian_p(w1, level)
# weight2 = build_gaussian_p(w2, level)
#
# # img1 = np.float32(img1)
# # img2 = np.float32(img2)
#
# b, g, r = cv2.split(img1)
# blue_channel_1 = build_lap_pyramid(b, level)
# green_channel_1 = build_lap_pyramid(g, level)
# red_channel_1 = build_lap_pyramid(r, level)
#
# b2, g2, r2 = cv2.split(img2)
#
# blue_channel_2 = build_lap_pyramid(b2, level)
# green_channel_2 = build_lap_pyramid(g2, level)
# red_channel_2 = build_lap_pyramid(r2, level)
#
# blue_channel = []
# green_channel = []
# red_channel = []
# # ans= blue_channel_1[0]* weight1[0][:, :, 0]
# for i in xrange(level):
# cn = cv2.add(blue_channel_1[i] * weight1[i][:, :, i], blue_channel_2[i] * weight2[i][:, :, i])
# blue_channel.append(cn.copy())
# cn = cv2.add(green_channel_1[i] * weight1[i][:, :, i], green_channel_2[i] * weight2[i][:, :, i])
# green_channel.append(cn.copy())
# cn = cv2.add(red_channel_1[i] * weight1[i][:, :, i], red_channel_2[i] * weight2[i][:, :, i])
# red_channel.append(cn.copy())
#
# b_c = reconstruct_laplacian_pyr(blue_channel)
# g_c = reconstruct_laplacian_pyr(green_channel)
# r_c = reconstruct_laplacian_pyr(red_channel)
#
# fin = cv2.merge((b_c, g_c, r_c))
#
#
# return fin
#/////////////////////////////////////////////////////////////////////////////attempt failed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
def fuse_two_image_too_naive(wa1, im1, wa2, im2):
img1 = im1.copy()
img2 = im2.copy()
w1 = wa1.copy()
w2 = wa2.copy()
cv2.addWeighted(img1, 1, w1, 1, .25, img1)
cv2.addWeighted(img2, 1, w2, 1, .25, img2)
cv2.addWeighted(img1, 1, img2, .25, 0.25, img1)
return img1
white_balanced = white_balance_with_ancuti(img)
gamma_adjusted = adjust_gamma(white_balanced, gamma=0.5)
unsharp_masked = unsharp_masking(white_balanced)
image_and_white_balanced = np.hstack((img, white_balanced))
two_input = np.hstack((white_balanced, unsharp_masked, gamma_adjusted))
gamma_weights = np.hstack((gamma_adjusted, laplacian_weight(gamma_adjusted), saliency_weight(gamma_adjusted),
saturation_weight(gamma_adjusted)))
unsharp_weights = np.hstack((unsharp_masked, laplacian_weight(unsharp_masked), saliency_weight(unsharp_masked),
saturation_weight(unsharp_masked)))
weighted_gamma = weight_adder(gamma_adjusted)
weighted_unsharped = weight_adder(unsharp_masked)
added_ga_un = cv2.addWeighted(weighted_gamma, 1, weighted_unsharped, 1, 0.1)
first_w = cv2.divide(weighted_gamma, added_ga_un)
second_w = cv2.divide(weighted_unsharped, added_ga_un)
nor_f = normal_fusion(gamma_adjusted, first_w, unsharp_masked, second_w)
weighted_singular = np.hstack((weighted_gamma, weighted_unsharped, added_ga_un))
#mul_f = fuse_two_image(first_w, gamma_adjusted, second_w, unsharp_masked, 3)
mul_f = fuse_two_image_too_naive(first_w, gamma_adjusted, second_w, unsharp_masked)
# mul_f = build_lap_pyramid(unsharp_masked, 3)
#m = reconstruct_laplacian_pyr(mul_f)
merging_final = np.hstack((img, mul_f))
# final = white_balance(img)
# cv2.imshow("WhiteBalanced",white_balance(img))
# cv2.waitKey(0)
# cv2.destroyAllWindows()
image_and_white_balanced = image_and_white_balanced[:, :, ::-1]
two_input = two_input[:, :, ::-1]
gamma_weights = gamma_weights[:, :, ::-1]
unsharp_weights = unsharp_weights[:, :, ::-1]
weighted_singular = weighted_singular[:, :, ::-1]
merging_final = merging_final[:, :, ::-1]
plt.figure('Step 6: merged weight adjusted two inputs')
plt.imshow(merging_final)
plt.title('Original Image, Processed Final Image')
plt.xticks([]), plt.yticks([])
plt.figure('Step 1: image to white balanced version')
plt.imshow(image_and_white_balanced)
plt.title('Original Image, White Balanced Imaage')
plt.xticks([]), plt.yticks([])
plt.figure('Step 2: generate two input')
plt.imshow(two_input)
plt.title('White Balanced, Unsharp Masked, Gamma Corrected')
plt.xticks([]), plt.yticks([])
plt.figure('Step 3: gamma input weighted')
plt.imshow(gamma_weights)
plt.title('Gamma Corrected, Laplacian Weight, Saliency Weight, Saturation Weight')
plt.xticks([]), plt.yticks([])
plt.figure('Step 4: unsharp input weighted')
plt.imshow(unsharp_weights)
plt.title('Unsharp Masked, Laplacian Weight, Saliency Weight, Saturation Weight')
plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
plt.figure('Step 5: weighted into one image')
plt.imshow(weighted_singular)
plt.title('Gamma Weighted, Unsharp Weighted, Total Weighted')
plt.xticks([]), plt.yticks([])
plt.show()
# img[:, :, 0] = 0 #setting green channel to zero
# img[:, :, 1] = 0
# b,g,r = cv2.split(img)
# img2 = cv2.merge([r,g,b])
# img2 = img[:,:,::-1]
# print(img2.shape)
# cv2.namedWindow('image', cv2.WINDOW_NORMAL)
# cv2.imshow('image',img)
# cv2.waitKey(0)
# cv2.destroyAllWindows()
# plt.subplot(121);plt.imshow(img) # expects distorted color
# plt.subplot(122);plt.imshow(img2) # expect true color
# plt.show()
<file_sep>/README.md
# Underwater Image Enhancement
cv.py file contains the coding portion. Sample images are also provided. To run the cv.py in your local machine give an underwater image path as input at 6th line.
# this is an almost similar implementation of this paper, https://ieeexplore.ieee.org/document/8058463/
The whole process contains roughly 5 major steps.
In step 1, the underwater image is white balanced by compensating red and blue channels.
In step 2, two images are generated from this white balanced version. One image is unsharp masked and another is gamma adjusted. Thus
one generated image ensures details of images and another adjusts contrasts.
In step 3, three weights are generated from each of two inputs. First one is Laplacian weight, second one is saliency weight and the
third one is saturation weight. To generate saliency weight, according to the paper,
##<NAME>, <NAME>, <NAME>, and <NAME>, “Frequencytuned salient region detection,” in Proc. IEEE CVPR, Jun. 2009
is used. However, here the naive equation described in Achatay et al. has been implemented.
In step 4, Aggregated weight of these three weights is generated for each of the two images from step 2. Then average weight is generated for
each of the two aggregated weights.
In step 5, according to the paper multi-scale pyramid based fusion is used. However, to reduce complexity, here a weighted sum of the inputs and generated
weights has been implemented.
Some sample outputs,



|
60d34f1a7df694a47b4d3699d3c2317a7cf439e5
|
[
"Markdown",
"Python"
] | 2
|
Python
|
1405043-kd/chhobighor
|
c236ea8017e0d32174abd04450e19c47457b0342
|
7e3d5f902d0b0b427b3886e3d27dcec274456ed4
|
refs/heads/master
|
<repo_name>suwenyu/Online-Judge-Lesson-script<file_sep>/Lesson/test.sh
#/bin/bash
file="Lesson0.txt"
while read line
do
echo "$line"
done <"$file"
<file_sep>/Trip/picture.sh
echo '<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>The trip to Hualian</h2>'
echo '<table class="table table-hover">
<thead>
<tr>
<th>Picture</th>
<th>Number</th>
</tr>
</thead>
<tbody>'
for var in 1 2 3 4 5 6 7 8
do
echo ' <tr>'
echo '<td><img src="'$var'.jpg" class="img-rounded" alt="<NAME>" width="304" height="236">'
echo '<td> picture'$var'</td>'
echo '</tr>'
done
echo '
</tbody>
</table>
</div>
</body>
</html>'
<file_sep>/Transtime/test.sh
# -----------------------------------------------
# Script: htmlfmt
# Usage: htmlfmt inputfile
# -----------------------------------------------
echo "<Table border=1>" #產生table header 輸出於 STDOUT
head -1 $1 | sed -e "s/^/<TR bgcolor=Orchid><TH>" -e "s/,/<TD>/g" #Convert 第一行
odd="<TR bgcolor=lightblue><TH bgcor=#c7e19e>" #將奇數行的 row header 存入變數 $odd
even="<TR bgcolor=pink><TH bgcor=#c7e19e>" #將偶數行的 row header 存入變數 $even
#刪除第一行後,取奇數行,將逗點改成<TD>,再於前面插入變數$odd
sed "1d" $1 | odd | sed -e 's/,/<TD>/g' -e "s/^/$odd/" > odd.o
#刪除第一行後,取偶數行,將逗點改成<TD>,再於前面插入變數$even
sed "1d" $1 | even | sed -e 's/,/<TD>/g' -e "s/^/$even/" > even.o
paste odd.o even.o #將奇數行與偶數行左右並排輸出於STDOUT
rm odd.o even.o
#註: odd 及 even 是自製指令,請參考第X章
<file_sep>/README.md
# ShellScript
I set a simple website that want to teach c++.
write some shell script to record the travel to Hualien.
<file_sep>/Mail/mail.php
<?php
$Email = $_POST['mail'];
$Password = $_POST['<PASSWORD>'];
exec("./mail.sh $Email");
echo "
<!DOCTYPE html>
<html>
<head>
<title>Mail</title>
<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<link rel=\"stylesheet\" href=\"http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css\">
<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"></script>
<script src=\"http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js\"></script>
</head>
<body>
<div class=\"container\">
<h2>Success</h2>
<div class=\"alert alert-success\">
<strong>Success!</strong> The mail has sent to your Email.
</div>
</div>
</body>
</html>";
?>
<file_sep>/Transtime/test1.sh
echo "<table border=1>" ;
print_header=true
while read INPUT ; do
# if $print_header;then
# echo "<tr><th>$INPUT" | sed -e 's/:[^,]*\(,\|$\)/<\/th><th>/g'
# print_header=false
# fi
echo "<tr><td>${INPUT//,/</td><td>}</td></tr>" ;
done < train.csv ;
echo "</table>";
}
<file_sep>/Lesson/Lesson0.php
<?php
echo $_POST["code"];
$text = $_POST["code"];
# $answer = exec("echo Hello > Lesson0.cpp");
$file = fopen("Lesson0.txt","w") or die("Unalbe to open file!");
fwrite($file, $text);
fclose($file);
exec("./test2.sh < Lesson0.txt > Lesson.cpp");
exec("g++ Lesson.cpp");
exec("./a.out > Hello");
// $answer = exec("gcc Lesson0.cpp");
// echo "檔案名稱: " . $_FILES["file"]["name"]."<br/>";
// echo "檔案類型: " . $_FILES["file"]["type"]."<br/>";
// echo "檔案大小: " . ($_FILES["file"]["size"] / 1024)." Kb<br />";
// echo "暫存名稱: " . $_FILES["file"]["tmp_name"];
// move_uploaded_file($_FILES["file"]["tmp_name"],"upload/".$_FILES["file"]["name"]); //移動檔案
?>
<file_sep>/Lesson/test2.sh
#!/bin/bash
#filename='upLoad.cpp'
# exec < $filename
while read line
do
echo $line
done
<file_sep>/Transtime/test2.sh
#!/bin/bash
#filename='upLoad.cpp'
# exec < $filename
while read line
do
echo $line | sed -e 's/"\""//g'
done
<file_sep>/Mail/mail.sh
cat /home1/student/stud102/s10230/public_html/Mail/mail.txt | mail -s "your subject" $1
<file_sep>/Lesson/table.sh
echo '<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<title>Hello C++</title>
<body>
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<p class="pull-right visible-xs">
<button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Toggle nav</button>
</p>
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is the Website that I want to use the easiest way to teach the C++ code. Hoping can help the everyone who want to learn coding.</p>
</div>
</div><!--/.col-xs-12.col-sm-9-->
<table class="table table-striped">
<thead>
<tr>
<th>Week</th>
<th>Lesson</th>
</tr>
</thead>
<tbody>'
for var in 0 1 2 3 4 5 6
do
echo '<tr>'
echo '<td> Week'$var' </td>'
echo '<td><a href="Lesson'$var'.html"> Lesson'$var'</a></td>'
echo '</tr>'
done
echo '</tbody>
</table>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="offcanvas.js"></script>
</body>
</html>'
|
1f5032400b2acc969600f7fbe4415bbbaf33ff65
|
[
"Markdown",
"PHP",
"Shell"
] | 11
|
Shell
|
suwenyu/Online-Judge-Lesson-script
|
2598b0169a0d14ae1a337b178d4314dd66733d03
|
6c72c40e7767834710e41ea3b7fa092ff795cb2e
|
refs/heads/master
|
<file_sep>package com.retwis.controller;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.retwis.User;
import com.retwis.service.IStatusService;
import com.retwis.service.StatusServiceImpl;
/**
*
* @author yongboy
* @date 2011-4-4
* @version 1.0
*/
@WebServlet("/post")
public class StatusSaveAction extends HttpServlet {
private static final long serialVersionUID = 1L;
private IStatusService statusService = new StatusServiceImpl();
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String content = request.getParameter("content");
String postingError = null;
if (content == null || content.length() == 0) {
postingError = "You didn't enter anything.";
}
content = iso2UTF8(content);
if (content.length() > 140) {
postingError = "Keep it to 140 characters please!";
}
if (postingError != null) {
request.setAttribute("postingError", postingError);
request.getRequestDispatcher(request.getContextPath() + "/").forward(request, response);
return;
}
User user = (User) request.getSession().getAttribute("user");
String ip = request.getRemoteAddr();
statusService.save(user.getId(), content, ip);
response.sendRedirect(request.getContextPath() + "/");
}
private static String iso2UTF8(String str){
try {
return new String(str.getBytes("ISO-8859-1"), "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
}<file_sep>package com.retwis.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.retwis.User;
import com.retwis.service.IStatusService;
import com.retwis.service.IUserService;
import com.retwis.service.StatusServiceImpl;
import com.retwis.service.UserServiceImpl;
/**
*
* @author yongboy
* @date 2011-4-3
* @version 1.0
*/
@WebServlet("/home")
public class HomeAction extends HttpServlet {
private static final long serialVersionUID = 1L;
private IStatusService statusService = new StatusServiceImpl();
private IUserService userService = new UserServiceImpl();
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
User user = (User) request.getSession().getAttribute("user");
if(user == null){
request.getRequestDispatcher("login").forward(request, response);
return;
}
request.setAttribute("posts", statusService.timeline(user.getId(), 1));
request.setAttribute("followees", userService.getFollowees(user.getId()));
request.setAttribute("followers", userService.getFollowers(user.getId()));
request.getRequestDispatcher("/WEB-INF/html/home.html").forward(request, response);
}
}<file_sep>package com.retwis.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.retwis.User;
import com.retwis.service.IUserService;
import com.retwis.service.UserServiceImpl;
/**
*
* @author yongboy
* @date 2011-4-2
* @version 1.0
*/
@WebServlet("/signup")
public class SignupAction extends HttpServlet {
private static final long serialVersionUID = 1L;
private IUserService userService = new UserServiceImpl();
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String username = request.getParameter("username");
String password = request.getParameter("password");
String password_confirmation = request
.getParameter("password_confirmation");
String signupError = null;
if (!username.matches("^\\w+")) {
signupError = "Username must only contain letters, numbers and underscores.";
} else if (userService.checkExistByName(username)) {
signupError = "That username is taken.";
} else if (username.length() < 4) {
signupError = "Username must be at least 4 characters";
} else if (password.length() < 6) {
signupError = "Password must be at least 6 characters!";
} else if (!password.equals(password_confirmation)) {
signupError = "Passwords do not match!";
}
if (signupError != null) {
request.setAttribute("signupError", signupError);
request.getRequestDispatcher("login").forward(request, response);
return;
}
User user = new User();
user.setName(username);
user.setPass(password);
userService.save(user);
request.getSession().setAttribute("user", user);
response.sendRedirect(request.getContextPath() + "/");
}
}<file_sep>package com.retwis.service.base;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.List;
import java.util.Properties;
import redis.clients.jedis.Jedis;
/**
*
* @author yongboy
* @date 2011-4-4
* @version 1.0
* @param <V>
*/
public abstract class BaseServiceImpl<V extends Serializable> implements
IBaseService<V> {
private static final String REDIS_HOST;
static {
Properties prop = new Properties();
try {
prop.load(BaseServiceImpl.class
.getResourceAsStream("/config.properties"));
} catch (IOException e) {
e.printStackTrace();
throw new NullPointerException("/config.propertis is not found !");
}
REDIS_HOST = prop.getProperty("redis");
}
public Jedis jedis = new Jedis(REDIS_HOST);
public V get(String key) {
return byte2Object(jedis.get(getKey(key)));
}
public void save(String key, V value) {
jedis.set(getKey(key), object2Bytes(value));
}
public void remove(String key) {
jedis.del(getKey(key));
}
public String getStr(String key) {
return this.jedis.get(key);
}
public void saveStr(String key, String value) {
this.jedis.set(key, value);
}
public void updateStr(String key, String value) {
saveStr(key, value);
}
public List<String> find(int pageNum, int pageSize) {
return null;
}
public void removeStr(String key) {
this.jedis.del(key);
}
private byte[] getKey(String key) {
return key.getBytes();
}
public Long incr(String key) {
return this.jedis.incr(key);
}
public void addHeadList(String key, String oneValue) {
this.jedis.lpush(key, oneValue);
}
@SuppressWarnings("unchecked")
private V byte2Object(byte[] bytes) {
if (bytes == null || bytes.length == 0)
return null;
try {
ObjectInputStream inputStream;
inputStream = new ObjectInputStream(new ByteArrayInputStream(bytes));
Object obj = inputStream.readObject();
return (V) obj;
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
private byte[] object2Bytes(V value) {
if (value == null)
return null;
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream outputStream;
try {
outputStream = new ObjectOutputStream(arrayOutputStream);
outputStream.writeObject(value);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
arrayOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return arrayOutputStream.toByteArray();
}
}<file_sep>package com.retwis.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.retwis.service.IUserService;
import com.retwis.service.UserServiceImpl;
/**
*
* @author yongboy
* @date 2011-4-4
* @version 1.0
*/
@WebServlet({ "/follow", "/unfollow" })
public class FollowAction extends HttpServlet {
private static final long serialVersionUID = 1L;
private IUserService userService = new UserServiceImpl();
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String currUserName = request.getParameter("curr");
String targetUserName = request.getParameter("target");
String servletPath = request.getServletPath();
if (servletPath.contains("/follow")) {
userService.addFollowee(currUserName, targetUserName);
} else {
userService.removeFollowee(currUserName, targetUserName);
}
response.sendRedirect(request.getContextPath() + "/" + targetUserName + "/");
}
}<file_sep> </div>
<div class="span-24 last">
<hr />
Retwis-JAVA is a simple Twitter clone written in JAVA and Servlet 3.0 to show off
the <a href="http://code.google.com/p/redis/">Redis key-value database</a>.
Thanks to the <a href="http://github.com/danlucraft/retwis-rb">Retwis-RB</a>.
</div>
</div>
</body>
</html><file_sep>package com.retwis.service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.retwis.User;
import com.retwis.service.base.BaseServiceImpl;
import com.retwis.util.MD5;
/**
*
* @author yongboy
* @date 2011-4-4
* @version 1.0
*/
public class UserServiceImpl extends BaseServiceImpl<User> implements
IUserService {
public void save(User user) {
user.setId(getNextUid());
user.setPass(MD5.encode(user.getPass()));
super.save(getId(user.getId()), user);
super.saveStr(String.format(USER_NAME_FORMAT, user.getName()),
Long.toString(user.getId()));
super.addHeadList(GLOBAL_USER_FORMAT, Long.toString(user.getId()));
}
public User load(long id) {
return super.get(getId(id));
}
private String getId(long id) {
return String.format(USER_ID_FORMAT, id);
}
private String getName(String name) {
return String.format(USER_NAME_FORMAT, name);
}
private long getNextUid() {
return super.incr(GLOBAL_USER_ID);
}
public void init() {
String currUserId = getStr(GLOBAL_USER_ID);
long currUid = 0L;
if (currUserId == null || currUserId.length() == 0)
currUid = -1L;
if (currUid < 1000L) {
saveStr(GLOBAL_USER_ID, Long.toString(1000L));
}
}
public long loadIdByName(String userName) {
String id = super.getStr(getName(userName));
if (id == null || id.equals(""))
return -1L;
return Long.valueOf(id);
}
public boolean checkExistByName(String userName) {
return loadIdByName(userName) > 0L;
}
public User checkLogin(String username, String password) {
long userId = loadIdByName(username);
if (userId < 1L)
return null;
return this.load(userId);
}
public void addFollowee(long targetUserId, long followeeUserId) {
if (targetUserId == followeeUserId)
return;
super.jedis.sadd(String.format(FOLLOWEES_FORMAT, targetUserId),
Long.toString(followeeUserId));
super.jedis.sadd(String.format(FOLLOWERS_FORMAT, followeeUserId),
Long.toString(targetUserId));
}
public Set<String> getFollowers(long userId) {
return getFollowUserNames(FOLLOWERS_FORMAT, userId);
}
public Set<String> getFollowees(long userId) {
return getFollowUserNames(FOLLOWEES_FORMAT, userId);
}
public Set<String> getFollowUserNames(String targetId, long userId) {
String followerId = String.format(targetId, userId);
Set<String> idSet = super.jedis.smembers(followerId);
if (idSet.isEmpty())
return idSet;
Set<String> nameSet = new HashSet<String>(idSet.size());
for (String uid : idSet) {
User user = load(Long.valueOf(uid));
if (user == null)
continue;
nameSet.add(user.getName());
}
return nameSet;
}
public List<String> getNewUsers(int page) {
int start = (page - 1) * 10;
int end = page * 10;
List<String> idList = super.jedis
.lrange(GLOBAL_USER_FORMAT, start, end);
if (idList.isEmpty())
return idList;
List<String> nameSet = new ArrayList<String>(idList.size());
for (String uid : idList) {
User user = load(Long.valueOf(uid));
if (user == null)
continue;
nameSet.add(user.getName());
}
return nameSet;
}
public User loadByName(String userName) {
long userId = loadIdByName(userName);
if (userId < 1L)
return null;
return load(userId);
}
public boolean checkFlollowing(long currUserId, long targeUserId) {
return super.jedis.sismember(
String.format(FOLLOWEES_FORMAT, currUserId),
Long.toString(targeUserId));
}
public void addFollowee(String currUserName, String targetUserName) {
if (currUserName == null || targetUserName == null
|| currUserName.equals(targetUserName))
return;
long currUserId = loadIdByName(currUserName);
long targetUserId = loadIdByName(targetUserName);
if (currUserId < 1L || targetUserId < 1L)
return;
addFollowee(currUserId, targetUserId);
}
public void removeFollowee(String currUserName, String targetUserName) {
if (currUserName == null || targetUserName == null
|| currUserName.equals(targetUserName))
return;
long currUserId = loadIdByName(currUserName);
long targetUserId = loadIdByName(targetUserName);
if (currUserId < 1L || targetUserId < 1L)
return;
super.jedis.srem(String.format(FOLLOWEES_FORMAT, currUserId),
Long.toString(targetUserId));
super.jedis.srem(String.format(FOLLOWERS_FORMAT, targetUserId),
Long.toString(currUserId));
}
private static final String GLOBAL_USER_ID = "global:nextUserId";
private static final String USER_ID_FORMAT = "user:id:%s";
private static final String USER_NAME_FORMAT = "user:name:%s";
private static final String FOLLOWERS_FORMAT = "user:id:%s:followers";
private static final String FOLLOWEES_FORMAT = "user:id:%s:followees";
private static final String GLOBAL_USER_FORMAT = "users";
}<file_sep>package com.retwis.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.retwis.service.IStatusService;
import com.retwis.service.IUserService;
import com.retwis.service.StatusServiceImpl;
import com.retwis.service.UserServiceImpl;
/**
*
* @author yongboy
* @date 2011-4-4
* @version 1.0
*/
@WebServlet("/timeline")
public class TimelineActioin extends HttpServlet {
private static final long serialVersionUID = 1L;
private IStatusService statusService = new StatusServiceImpl();
private IUserService userService = new UserServiceImpl();
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.setAttribute("posts", statusService.timeline(1));
request.setAttribute("users", userService.getNewUsers(1));
request.getRequestDispatcher("/WEB-INF/html/timeline.html").forward(
request, response);
}
}<file_sep>package com.retwis;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author yongboy
* @date 2011-4-3
* @version 1.0
*/
public class Status implements Serializable {
private static final long serialVersionUID = 1L;
private long id;
private String content;
private long time = System.currentTimeMillis();
private long uid;
private String ip;
private transient User user;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Date getSaveDate() {
return new Date(time);
}
public String getTimeAgoInWords() {
long leftTime = System.currentTimeMillis() - time;
if (leftTime >= 0 && leftTime < 10) {
return "just now";
} else if (leftTime >= 10 && leftTime <= 60) {
return "less than a minute ago";
}
long leftMin = leftTime / 60L;
if (leftMin >= 0 && leftMin <= 1) {
return "a minute ago";
} else if (leftMin >= 2 && leftMin <= 45) {
return leftMin + " minutes ago";
} else if (leftMin >= 46 && leftMin <= 89) {
return "about an hour ago";
} else if (leftMin >= 90 && leftMin <= 1439) {
return (leftMin / 60L) + " hours ago";
} else if (leftMin >= 1440 && leftMin <= 2879) {
return "about a day ago";
} else if (leftMin >= 2880 && leftMin <= 43199) {
return (leftMin / 1440L) + " days ago";
} else if (leftMin >= 43200 && leftMin <= 86399) {
return "about a month ago";
} else if (leftMin >= 86400 && leftMin <= 525599) {
return (leftMin / 43200L) + " months ago";
} else if (leftMin >= 525600 && leftMin <= 1051199) {
return "about a year ago";
} else {
return "over " + (leftMin / 525600L) + " years ago";
}
}
}
|
0239f20d10ad12b7599ddb38b0d7b25ffc3baad3
|
[
"Java",
"HTML"
] | 9
|
Java
|
longle255/retwis-java
|
1297af6f6f6ea430730cdf83cb174b6b8e67f66a
|
d5274a9da98c551aec65646a710b4b8df538bd5b
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.