text stringlengths 7 3.69M |
|---|
import React from "react";
//import "./styles.css";
import Card from "./Card";
import { Grid } from "@material-ui/core";
import { makeStyles } from "@material-ui/core";
const useStyles = makeStyles({
gridContainer: {
paddingLeft: "20px",
paddingRight: "20px"
},
textColor: {
color: "white"
},
card1: {backgroundColor: "#4791db"},
card2: {backgroundColor: "#ffcd38"},
card3: {backgroundColor: "#4caf50"},
card4: {backgroundColor: "#ff4569"},
// card1: {backgroundColor: "#4791db","#ffeb3b","#76ff03","#ff1744"}
});
export default function ListCard() {
const classes = useStyles();
return (
<Grid
container
spacing={4}
className={classes.gridContainer}
justify="center"
>
<Grid item xs={12} sm={6} md={3}>
<Card name="Do" task="15" className={classes.card1} />
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Card name="Progress" task="20" className={classes.card2}/>
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Card name="Done" task="250" className={classes.card3}/>
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Card name="Cancel" task="50" className={classes.card4}/>
</Grid>
</Grid>
);
}
|
import { NavLink } from "react-router-dom";
import appLogo from '../../assets/branding/logo.png';
import useWindowDimensions from '../windowSizeHook/windowSize.js';
import BurgerMenu from '../BurgerMenu/Burger.js';
import './MainHeader.css';
const Header = () => {
const { width } = useWindowDimensions();
return (
<div className="mainPage-header">
{width > 1010
? <>
<NavLink to='/' >
<img
className="ourMain-icon"
src={appLogo}
alt="logo"/>
</NavLink>
<div className="main-header-background">
<ul className="nav-main-header">
<li className='nav-button-main-header'>
<NavLink to='/about' activeClassName='active-header'>О проекте</NavLink>
</li>
<li className='nav-button-main-header'>
<NavLink to='/departments' activeClassName='active-header'>Кафедры</NavLink>
</li>
<li className='nav-button-main-header'>
<NavLink to='/login' activeClassName='active-header'>Вход</NavLink>
</li>
<li className='round-button-main-header'>
<NavLink to='/sign/up' activeClassName='active-header'>Регистрация</NavLink>
</li>
</ul>
</div>
</>
: <BurgerMenu pageWrapId={"page-wrap"} />
}
</div>
);
}
export default Header; |
class Stack {
constructor(sizeArg) {
this.size = sizeArg;
this.top = -1;
this.arr = new Array(this.size);
}
isEmpty() {
if (this.top == -1) {
return true;
} else {
return false;
}
}
isFull() {
if (this.top == this.size - 1) {
return true;
} else {
return false;
}
}
push(element) {
if (this.isFull()) {
console.log("\nStack Overflow\n");
} else {
this.top = this.top + 1;
this.arr[this.top] = element;
}
}
pop() {
if (this.isEmpty()) {
console.log("\nStack Underflow\n");
} else {
console.log(`\nThe removed element is:\t${this.arr[this.top]}`);
this.top = this.top - 1;
}
}
}
const readline = require('readline-sync');
let size = readline.question("Please enter size of the Stack:\t?");
let objStack = new Stack(size);
objStack.push(1);
objStack.push(2);
objStack.push(3);
objStack.pop();
objStack.pop();
objStack.pop(); |
import React, { useState } from 'react';
import Sidebar from '../Dashboard/Sidebar/Sidebar';
const AddServices = () => {
const [serviceInfo, setServiceInfo] = useState({});
const [file, setFile] = useState(null);
const handleBlur = e => {
const newServiceInfo = { ...serviceInfo };
newServiceInfo[e.target.name] = e.target.value;
setServiceInfo(newServiceInfo);
}
const handleFileChange = (e) => {
const newFile = e.target.files[0];
setFile(newFile);
}
const handleSubmit = (e) => {
const formData = new FormData()
console.log(serviceInfo);
e.preventDefault()
formData.append('file', file);
formData.append('title', serviceInfo.title);
formData.append('description', serviceInfo.description);
formData.append('charge', serviceInfo.charge);
fetch('https://obscure-coast-47733.herokuapp.com/addAService', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
console.log(data)
})
.catch(error => {
console.error(error)
})
}
return (
<section className="container-fluid row">
<Sidebar></Sidebar>
<div className="col-md-10 p-4 pr-5 no-gutter" style={{ position: "absolute", right: 0, backgroundColor: "#F4FDFB" , height: '100vh'}}>
<h5 className="text-primary">Add a New Service</h5>
<form onSubmit={handleSubmit} >
<div className="form-group">
<label htmlFor="exampleInputServiceTitle">Service Title</label>
<input onBlur={handleBlur} type="text" className="form-control" name="title" placeholder="Service Title" />
</div>
<div className="form-group">
<label htmlFor="exampleInputDescription">Description</label>
<input style={{height: '100px'}} onBlur={handleBlur} type="text" className="form-control" name="description" placeholder="" />
</div>
<div className="form-group">
<label htmlFor="exampleInputCharge">Service Charge</label>
<input onBlur={handleBlur} type="text" className="form-control" name="charge" placeholder="Service Charge" />
</div>
<div className="form-group">
<label htmlFor="serviceImage">Upload a image</label>
<input onChange={handleFileChange} type="file" className="form-control" id="exampleInputPassword1" placeholder="Upload Picture" />
</div>
<button type="submit" className="btn btn-primary">Submit</button>
</form>
</div>
</section>
);
};
export default AddServices; |
import React, { Component } from 'react'
class Header extends React.Component {
constructor () {
super()
}
render() {
return (
<header className='header'>
<img src='https://www.clipartmax.com/png/full/105-1055632_google-chrome-logo-png-portrait-of-a-man.png' />
Header
</header>
)
}
}
export default Header |
import React, { Component } from "react";
import {
View,
Text,
StyleSheet
} from "react-native";
import { createMaterialTopTabNavigator } from 'react-navigation';
import Ionicons from 'react-native-vector-icons/Ionicons'
import ScreenOne from '../Screens/TabNavigator/ScreenOne';
import ScreenTwo from '../Screens/TabNavigator//ScreenTwo';
import MemoScreen from '../Screens/TabNavigator/MemoScreen';
export default class AppTabNavigator extends Component {
static navigationOptions = ({ navigation }) => {
//console.log(navigation);
return {
headerLeft: (
<View style={{ padding: 10 }}>
<Ionicons name="md-menu" size={24} onPress={() => navigation.openDrawer()} />
</View>
)
}
}
render() {
return (
<HomeScreenTabNavigator screenProps={{ navigation: this.props.navigation }} />
)
}
}
const HomeScreenTabNavigator = createMaterialTopTabNavigator({
Memo: {
screen: MemoScreen,
navigationOptions: {
tabBarLabel: "Memo",
tabBarIcon: ({tintColor}) => (
<Ionicons name="ios-home" color={tintColor} size={24} />
)
}
},
ScreenOne: {
screen: ScreenOne,
navigationOptions: {
tabBarLabel: 'Feed',
tabBarIcon: ({tintColor}) => (
<Ionicons name="md-compass" color={tintColor} size={24} />
)
}
},
ScreenTwo: {
screen: ScreenTwo,
navigationOptions: {
tabBarLabel: 'Feed',
tabBarIcon: ({tintColor}) => (
<Ionicons name="md-compass" color={tintColor} size={24} />
)
}
},
}, {
// route config
initialRouteName: 'Memo',
swipeEnabled: true,
animationEnabled: true,
navigationOptions: {
tabBarVisible: true
},
tabBarOptions: {
activeTintColor: 'red',
inactiveTintColor: 'grey',
style: {
backgroundColor: 'white',
borderTopWidth: 0.5,
borderTopColor: 'grey'
},
indicatorStyle: {
height: 0
},
showIcon: true,
showLabel: true
},
})
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
}
}); |
const _ = require('lodash');
const express = require('express');
const router = express.Router();
const puzzles = require('../lib/puzzles.json');
/* GET a new puzzle, selected randomly from a json */
router.get('/', function(req, res, next) {
const puzzle = _.sample(puzzles);
console.log(puzzle, 'puzzle');
res.json(puzzle);
});
module.exports = router;
|
import axios from 'axios'
import sha1 from 'sha-1'
import setHeaders from './setHeaders'
import repsonseSideEffect from './repsonseSideEffect'
import repsonseFilters from './repsonseFilters'
import * as httpCache from './httpCache'
import * as httpQueue from './httpQueue'
// 创建axios实例
const service = axios.create({
timeout: 3 * 1000, // 请求超时时间
withCredentials: true,
headers: {
// connection: 'keep-alive',
// 'x-requested-with': 'XMLHttpRequest',
common: {
'X-Requested-With': 'XMLHttpRequest'
}
}
})
// request拦截器
service.interceptors.request.use((config) => {
const { options = {} } = config
// 重设超时时间
config.timeout = options.timeout || config.timeout
// context default action
if (/^(post)|(put)|(delete)$/i.test(config.method)) { // 处理POST请求默认行为
if (typeof config.data === 'object' && options.type === 'formData') {
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
// 处理formdata格式
config.transformRequest = [(data) => {
let ret = ''
for (const it in data) {
ret += `${encodeURIComponent(it)}=${encodeURIComponent(data[it])}&`
}
return ret
}]
} else {
config.headers['Content-Type'] = 'application/json'
}
// 拦截器 - 开始状态
repsonseSideEffect('start', config)
}
return config
}, (error) => {
const errorInfo = {
status: error.request.status,
options: error.config.options,
error,
message: error.message
}
// 过滤器处理数据
repsonseFilters(error.config.options, errorInfo)
// 成功处理队列回调
httpQueue.handleCallbackQueue({
key: error.config.key,
error: errorInfo,
type: 'reject'
})
return Promise.reject(errorInfo)
})
// response拦截器
service.interceptors.response.use(
(res) => {
const { options = {} } = res.config
try {
const resolveData = repsonseFilters(res.config, res)
// 成功处理队列回调
httpQueue.handleCallbackQueue({
key: res.config.key,
data: resolveData,
type: 'resolve'
})
// 需要缓存
if (options.cache) {
httpCache.setCacheData(res.config.key, res.data, options.cache)
}
repsonseSideEffect('complete', {
options: options,
data: resolveData
})
return resolveData
} catch (error) {
console.log(error)
// 错误处理
repsonseSideEffect('filterError', {
options: error.response.config.options,
data: error.response.data,
error
})
// 销毁进行队列
httpQueue.handleCallbackQueue({
key: res.config.key,
error,
type: 'reject'
})
return Promise.reject(error)
}
},
/**
* 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
* 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
*/
(error) => {
const errorInfo = {
status: error.request.status,
options: error.config.options,
error,
message: error.message
}
repsonseFilters(error.config.options, errorInfo)
// 成功处理队列回调
httpQueue.handleCallbackQueue({
key: error.config.key,
error: errorInfo,
type: 'reject'
})
return Promise.reject(errorInfo)
}
)
const httpCore = async (config) => {
const { options = {} } = config
// 初始化headers
config.headers = config.headers || {}
// 设置headers
Object.assign(config.headers, await setHeaders())
// 生成唯一id
config.key = sha1(`${config.url}${JSON.stringify(config.params)}${JSON.stringify(config.data)}`)
// 判断需要缓存
if (options.cache) {
// 根据key查找缓存
const data = httpCache.getCacheData(config.key)
if (data) {
return new Promise((resolve) => {
setTimeout(() => {
httpCache.clearCacheData()
}, 0)
resolve({
data: JSON.parse(window.httpCache[config.key].data).data,
response: config
})
})
}
}
if (options.quque !== false) {
// 存在正在进行中的相同接口
if (httpQueue.hasQueue(config.key)) {
return new Promise((resolve, reject) => {
httpQueue.addQueue({
key: config.key,
config,
resolve,
reject
})
})
}
// 创建正在请求的队列
httpQueue.newQueue(config.key)
}
return service(config)
}
export default httpCore
|
let selector = document.getElementById('function');
let input = document.getElementById('input');
let button = document.getElementById('button');
button.onclick = run;
function toggleInput() {
if (selector.value == "postWhitelist") {
input.style.display = "block";
}
else {
input.style.display = "none";
}
}
toggleInput()
async function run() {
let response;
switch(selector.value) {
case "getBlacklist":
response = await fetch('http://localhost:5000/blacklist');
postResult(response);
break;
case "getWhitelist":
response = await fetch('http://localhost:5000/whitelist');
postResult(response);
break;
case "postWhitelist":
response = await fetch('http://localhost:5000/whitelist/' + input.value, {method: 'POST'})
break;
case "getFilter":
response = await fetch('http://localhost:5000/filtro');
postResult(response);
break
}
}
async function postResult(response) {
const myJson = await response.json(); //extract JSON from the http response
document.getElementById("output").innerHTML = JSON.stringify(myJson, undefined, 2);
} |
const serviceModel = require('../services');
const proxy = require('../../lib/http-proxy');
const {logger} = require('@ucd-lib/fin-node-utils');
const AUTHENTICATION_SERVICE_CHAR = '/auth';
/**
* @description handle a AuthenticationService request. Find the service from the service
* model, create the X-FIN-ORIGINAL-PATH and X-FIN-SERVICE-PATH headers, proxy request
* with new headers
*
* @param {Object} req Express request
* @param {Object} res http-proxy response
*/
module.exports = (req, res) => {
// find the service name and lookup service in service model
let parts = req.originalUrl.replace(AUTHENTICATION_SERVICE_CHAR+'/', '').split('/');
let serviceName = parts.shift();
let service = serviceModel.services[serviceName];
// no service found
if( !service ) {
return res.status(404).send();
}
// strip /auth/[service-name] from request path. This new path is where we will
// send proxy request
let path = req.originalUrl;
if( path.match(/^http/i) ) {
let urlInfo = new URL(path);
path = urlInfo.pathname;
}
path = path.replace(AUTHENTICATION_SERVICE_CHAR+'/'+service.id, '');
logger.info(`AuthenticationService proxy request: ${req.originalUrl} -> ${service.url+path}`);
// send proxy request to new path, including reference headers to original request path
proxy.web(req, res, {
target : service.url+path,
headers : {
'X-FIN-ORIGINAL-PATH' : req.originalUrl,
'X-FIN-SERVICE-PATH' : AUTHENTICATION_SERVICE_CHAR+'/'+service.id,
[serviceModel.SIGNATURE_HEADER] : serviceModel.createServiceSignature(service.id)
},
ignorePath : true
});
} |
import React, { useState, useContext } from 'react';
import { ShowContext } from '../contexts/ShowContext';
const NewShowForm = () => {
const { addShow } = useContext(ShowContext);
const [ title, setTitle ] = useState('');
const handleSubmit = (e) => {
e.preventDefault();
addShow(title);
setTitle('');
};
return (
<form onSubmit={handleSubmit}>
<input
type="text"
value={title}
required
placeholder="New Show"
onChange={(e) => setTitle(e.target.value)}
/>
<input type="submit" value="Add Show" />
</form>
);
};
export default NewShowForm;
|
const Services = require('./services');
module.exports = {
async search(req, res) {
try {
const result = await Services.search();
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({ status_code: 200, success: true, data: data, message: "Cars data successfully fetched!" });
} catch (err) {
res.json({ status_code: 500, success: false, data: [], message: err});
}
},
async filterCarsByYearMade(req, res) {
let {year} = req.query;
try {
const result = await Services.filterCarsByYearMade(year);
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({ status_code: 200, success: true, data: data, message: "Filter Cars by year made data fetched successfully" });
} catch (err) {
res.json({ status_code: 500, success: false, data: [], message: err});
}
},
async filterCarsByName(req,res) {
let param = req.query.Name;
try {
const result = await Services.filterCarsByName(param);
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({status_code: 200, success: true, data:data , message: "Filter cars by name data fetched successfully!" });
} catch (err) {
res.json({ status_code: 500, success: false, data: [], message: err});
}
},
async filterCarByName(req,res) {
const param = req.query.Name;
try {
const result = await Services.fetchCarByName(param);
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({ status_code: 200, success: true, data: data , message: "Filter a car by name query data fetched successfully!"});
} catch (err) {
res.json({ status_code: 500, success: false, data: [], message: err});
}
},
async fetchMatchMultipleQuery(req,res) {
const param2 = req.query.Origin;
const param1 = req.query.Name;
const param3 = req.query.Weight_in_lbs;
try {
const result = await Services.fetchMatchMultipleQuery(param2, param1, param3);
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({status_code: 200, success: true, data: data, messsage: "fetch match query for multiple requests successful!" });
} catch (err) {
res.json({status_code: 500, success: false, data: [], message: err});
}
},
async aggregateQuery(req,res) {
const param1 = req.query.Origin;
const param2 = req.query.Cylinder;
const param3 = req.query.Name;
const param4 = req.query.Horsepower;
try {
const result = await Services.aggregateQuery(param1, param2, param3, param4);
const data = result.body.hits.hits.map((car)=>{
return {
id: car._id,
data: car._source
}
})
res.json({ status_code: 200, success: true, data: data, message: "Data successfully fetched!" });
} catch (err) {
res.json({ status_code: 500, success: false, data: [], message: err});
}
},
}
|
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import reducer from './reducers/reducer';
const stringEnhancer = (createStore) => (...args) => {
const store = createStore(...args);
const originalDispatch = store.dispatch;
store.dispatch = (action) => {
if (typeof action === 'string') {
return originalDispatch({
type: action
});
}
originalDispatch(action);
};
return store;
};
const logEnhancer = (createStore) => (...args) => {
const store = createStore(...args);
const originalDispatch = store.dispatch;
store.dispatch = (action) => {
console.log(action.type);
return originalDispatch(action);
};
return store;
};
const store = createStore(reducer, applyMiddleware(thunkMiddleware));
export default store;
|
import { html, LitElement } from "@polymer/lit-element";
import bulmaStyles from "../style/bulma-styles";
import { connect } from "pwa-helpers/connect-mixin.js";
// This element is connected to the Redux store.
import { store } from "../store/store";
/*
วิธีใช้
<my-breadcrumb value=${brk}></my-breadcrumb>
และสร้างฟั่งชั้น เพิ่งเพิ่ม value
this.brk.push({
href: "/",
name: "คนเดียว"
});
this.brk = this.brk.slice(0)
*/
class MyBreadcrumb extends connect(store)(LitElement) {
static get properties() {
return {
value: Array
};
}
constructor() {
super();
this.value = [];
// is-active
}
render() {
return html`
${bulmaStyles(this)}
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
${this.value.map(({ href, title ,last}) => {
return html`
<li .class="${(last ? 'is-active' : '')}">
<a href="${href}" .aria-current="${(last ? 'page' : '')}">${title}</a>
</li>
`;
})}
<!-- <li><a href="/">Bulma</a></li>
<li><a href="/renew">renew</a></li>
<li><a href="/index">index</a></li>
<li class="is-active"><a href="#" aria-current="page">Breadcrumb</a></li> -->
</ul>
</nav>
`;
}
_stateChanged(state) {
// console.log("state my-breadcrumb", state.myBreadcrumbs.myBreadcrumbs);
this.value = state.myBreadcrumbs.myBreadcrumbs
this.value = this.value.slice(0)
// this.count = state.data.count;
// console.log('this.value',this.value);
}
_shouldRender(props, changedProps, prevProps) {
let lengthValue = this.value.length || 0;
this.value.forEach((e, index) => {
// ต้องเป็นค่าสุดท้าย
if (index === lengthValue - 1) {
e = Object.assign(e, { classname: "is-active" ,last: true});
} else {
e = Object.assign(e, { classname: "",last: false });
}
});
return true;
}
}
customElements.define("my-breadcrumb", MyBreadcrumb);
|
import React from 'react';
import { View, Text } from 'react-native';
const googleApiKey = 'my_google_api_key';
class Maps extends React.Component {
constructor(props) {
super(props);
this.state = {
country: null
}
}
componentDidMount() {
navigator.geolocation.getCurrentPosition(
(position) => {
this.getLocationDetails(position.coords.latitude,position.coords.longitude)
},
(error) => { console.log(error); },
{ enableHighAccuracy: true, timeout: 30000 }
)
}
getLocationDetails(latitude, longitude) {
const location = [];
url='https://maps.googleapis.com/maps/api/geocode/json?address='+ latitude + ',' +longitude + '&key=' + googleApiKey
fetch(url)
.then((response) => response.json())
.then((responseJson) => {
location = responseJson;
location.results[0].address_components.forEach(component => {
if (component.types.indexOf('country') !== -1) {
this.setState({ country: component.long_name });
}
});
});
}
render() {
return (
<View>
<Text>{this.state.country}</Text>
</View>
)
}
}
export default Maps; |
// Object property shorthand
const name = 'Andrew'
const userAge = 27
const user = {
name,
age: userAge,
location: 'Philadelphia'
}
// Object destructuring
const product = {
label: {
id: 1,
name: 'Red Notebook'
},
price: 3,
stock: 201,
salePrice: undefined,
rating: 4.2
}
// const {label:productLabel, stock, rating = 5} = product
// console.log(productLabel)
// console.log(stock)
// console.log(rating)
const transaction = (type, {label:{name, id} = {name: 'None', id: 'WithoutId'}, stock = 0} = {}) => {
console.log(type, name, id, stock)
}
transaction('order', product) |
import React from 'react'
import Router from 'next/router'
import IndexPage from './index'
import ApiContext from '../components/ApiContext'
import api from '../lib/api'
class IdPage extends React.PureComponent {
static contextType = ApiContext
static async getInitialProps({ req, res, query }) {
const path = query.id
const parameter = path.length >= 19 && path.indexOf('.') < 0 ? path : null
let snippet
if (parameter) {
const host = req ? req.headers.host : undefined
snippet = await api.snippet.get(parameter, { host })
if (snippet) {
return { snippet }
}
// 404 Not found
if (res) {
res.writeHead(302, {
Location: '/'
})
res.end()
} else {
Router.push('/')
}
}
return {}
}
render() {
return <IndexPage {...this.props} />
}
}
export default IdPage
|
var storedPlates = localStorage["Plates2"]
let regNumbers2 = [];
if (storedPlates) {
regNumbers2 = JSON.parse(storedPlates)
}
const regNumFunc = RegNumber(regNumbers2);
const btnAdd = document.querySelector(".btnAdd-2");
const regEntered = document.querySelector(".regNumber-2");
const townSelected = document.getElementById("townSelect-2");
const msg2 = document.querySelector(".msg-2");
const regNum = document.querySelector(".registrationsList");
function filtering() {
regNum.innerHTML = "";
var townVal2 = townSelected.options[townSelected.selectedIndex].value;
//loop over a list of reg numbers
regNumbers2 = regNumFunc.filter(townVal2);
for (var i = 0; i < regNumbers2.length; i++) {
const currentReg2 = regNumbers2[i];
var node2 = document.createElement("li");
regNum.appendChild(node2);
node2.innerHTML = currentReg2;
node2.classList.add("plateStyle")
}
}
function append() {
var textVal2 = (regEntered.value).toUpperCase();
msg2.innerHTML = regNumFunc.checkText(textVal2);
msg2.classList.add(regNumFunc.classAdd(textVal2))
if (regNumFunc.checkExists(textVal2, regNumFunc.plateStorage())) {
var node2 = document.createElement("li");
regNum.appendChild(node2);
node2.innerHTML = textVal2;
node2.classList.add("plateStyle")
}
regNumFunc.addRegNumber(textVal2);
var storingPlates2 = regNumFunc.plateStorage();
var regPlates2 = JSON.stringify(storingPlates2);
localStorage['Plates2'] = regPlates2;
regEntered.value = ""
setTimeout(function () {
msg2.innerHTML = "";
msg2.classList.remove("success");
msg2.classList.remove("failed");
}, 4000)
}
filtering()
btnAdd.addEventListener("click", append)
townSelected.addEventListener("change", filtering) |
import autoBind from 'auto-bind';
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';
import parisBounds from './paris-bounds';
class Animation {
constructor(element) {
this.element = element;
this.tileLayer =
L.tileLayer('https://api.mapbox.com/styles/v1/claisne/cj4pbpalh9j9z2speseu4tkby/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiY2xhaXNuZSIsImEiOiJjajRpOWowemgwNW15MndtcWVtM3c3bjMxIn0.Cg5Lr8gOtg-k6EJpn2Gu4g');
autoBind(this);
}
launch() {
this.map = L.map(this.element, {
zoomControl: false,
});
this.map.fitBounds(parisBounds);
this.map.attributionControl.setPrefix('');
this.tileLayer.addTo(this.map);
}
}
export default Animation;
|
import { combineReducers } from 'redux';
import { reducer as formReducer } from "redux-form";
import AuthReducer from './AuthReducer';
import SignUpReducer from './SignUpReducer';
import ForgotReducer from './ForgotPassReducer';
import VerificationReducer from './VerificationCodeReducer';
import ContactUsReducer from './ContactUsReducers';
import ChangePasswordReducer from './ChangePasswordReducers';
import ResetPasswordReducers from './ResetPasswordReducers';
import EditProfile from './EditProfileReducer';
import Catalog from './CatalogReducer';
import StaticPage from './StaticPageReducer';
import Home from './HomeReducer';
import ProductDetail from './ProductReducer';
import Comments from './CommentReducer';
export default combineReducers({
auth: AuthReducer,
signUp: SignUpReducer,
forgotpassword: ForgotReducer,
verification: VerificationReducer,
contactus: ContactUsReducer,
changepassword: ChangePasswordReducer,
resetpassword: ResetPasswordReducers,
editprofile: EditProfile,
staticpage: StaticPage,
home: Home,
catalog:Catalog,
productdetail: ProductDetail,
comment: Comments,
form: formReducer
}); |
'use strict';
var _ = require('lodash');
var fs = require('fs');
var config = require('../../config/environment');
// config.highriseUrl is the base highrise url
var Client = require('node-rest-client').Client;
var parser = require('xml2json');
// Get Highrise deal
exports.deal = function(req, res) {
var reqparam = req.query;
//console.log("parsedData",reqparam.dealurl)
var options = {
headers:{"Accept":"application/xml"},
user: reqparam.token,
password:"X"
};
var client = new Client(options);
var apireq = client.get(reqparam.dealurl + ".xml", options, function(data, response){
var jsonData = parser.toJson(data);
var parsedData = data ? JSON.parse(jsonData) : null;
res.json({ data: parsedData});
});
//it's usefull to handle request errors to avoid, for example, socket hang up errors on request timeouts
apireq.on('error', function(err){
return res.json({ error: err, data: null});
});
};
// Update Highrise deal
exports.updateDeal = function(req, res) {
var reqparams = req.body;
//console.log(reqparams);
var subjData = "";
if(reqparams.name)
subjData += "<name>" + reqparams.name + "</name>";
if(reqparams.responsiblePartyId)
subjData += "<responsible-party-id>" + reqparams.responsiblePartyId + "</responsible-party-id>";
if(reqparams.categoryId)
subjData += "<category-id>" + reqparams.categoryId + "</category-id>";
if(reqparams.customFields && reqparams.customFields.length){
subjData += '<subject_datas type="array">';
reqparams.customFields.forEach(function(sf){
subjData += '<subject_data>' +
'<subject_field_id>' + sf.subject_field_id["$t"] + '</subject_field_id>' +
'<value>' + sf.value + '</value>' +
'</subject_data>';
});
subjData += '</subject_datas>';
}
if(!subjData.length)
return res.status(500).json({ msg: "No fields to update" });
var options = {
headers:{"Content-Type" : "application/xml"},
user: reqparams.token,
password:"X",
data: "<deal>" + subjData + "</deal>"
};
var client = new Client(options);
if(reqparams.country !== 'ITA' && reqparams.country !== 'SWI')
res.json({ error: "Invalid Parameter [Azienda]=" + reqparams.country, data: null});
else{
var updUrl = (reqparams.country === 'ITA' ? config.itaHighriseUrl : config.swiHighriseUrl) + "/deals/" + reqparams.id + ".xml?reload=true"
//console.log("update url ",updUrl);
//console.log("Options",options);
var apireq = client.put(updUrl, options, function(data, response){
var jsonData = parser.toJson(data);
var parsedData = data ? JSON.parse(jsonData) : null;
//console.log("parsedData for update",parsedData)
res.json({ error: null, data: parsedData});
});
//it's usefull to handle request errors to avoid, for example, socket hang up errors on request timeouts
apireq.on('error', function(err){
res.json({ error: err, data: null});
});
}
}
/*
curl -u 0b7bc01934a438ff224d9f0be9da7c29:X -X PUT -H 'Content-Type: application/xml' \
-d '<deal><name>Prova Curl</name></deal>' https://swissgalimbertisa.highrisehq.com/deals/4557047.xml
*/ |
define([
'app',
'text!views/gallery.html',
'directives/ImageLoadDirective'
], function(app, GalleryHtml) {
'use strict';
app.create.directive('gallery', [ '$window', function($window) {
return {
restrict: 'EC',
template: GalleryHtml,
scope: {
images: '=collection'
},
link: function(scope, el, attrs) {
var mainImage = el[0].querySelector('figure img'),
$mainImage = angular.element(mainImage);
el.on('click', function(event) {
el.addClass('expanded');
scope.$emit('gallery.expand', mainImage);
});
el.on('mouseout', function(event) {
el.removeClass('expanded');
scope.$emit('gallery.minimise', mainImage);
});
scope.$watch('images', function(images) {
if (!scope.currentImage && Array.isArray(images) && images.length > 0) {
scope.currentImage = images[0];
}
});
scope.openImage = function(image) {
scope.currentImage = image;
};
scope.$on('$routeChangeStart', function(next, current) {
$mainImage.off();
el.off();
});
scope.$on('post.expand', function() {
if (el.hasClass('expanded')) {
el.removeClass('expanded');
}
});
}
};
}]);
}); |
DefaultScript.operate = function (scopes, step, stepName, leftValue, operation, right, onException) {
if (typeof onException !== 'function') {
throw new TypeError('onException must be provided');
}
if (step === END) {
throw new Error('Cannot provide END as step to operate()');
}
// DEBUG
//DefaultScript.global.console.log('Operate left, operation, right:');
//DefaultScript.global.log(leftValue, operation, right);
if (DefaultScript.global.type(leftValue) === 'logic' && leftValue.name === '$trap$') {
return transformPossiblePause(DefaultScript.resolve(scopes, step, stepName, right, false, onException), function (rightValue) {
return leftValue(scopes, step, stepName, rightValue, onException);
});
}
var leftType = DefaultScript.global.type(leftValue);
var resolveRight = function (fn) {
return transformPossiblePause(DefaultScript.resolve(scopes, step, stepName, right, false, onException), function (rightValue) {
var rightType = DefaultScript.global.type(rightValue);
return fn(rightType, rightValue);
});
};
var afterRightResolution = function (combinedOperator, rightType, rightValue) {
if (combinedOperator === '+') {
return leftValue + rightValue;
}
else if (combinedOperator === '-') {
//console.log(leftValue, rightValue)
return leftValue - rightValue;
}
else if (combinedOperator === '*') {
return leftValue * rightValue;
}
else if (combinedOperator === '/') {
return leftValue / rightValue;
}
else if (combinedOperator === '=') {
return leftValue === rightValue;
}
else if (combinedOperator === '<>') {
return leftValue !== rightValue;
}
else if (combinedOperator === '>>') {
var current = leftValue;
var arr = [current];
while (++current <= rightValue) {
arr.push(current);
}
return arr;
}
else if (combinedOperator === '<<') {
var current = leftValue;
var arr = [current];
while (--current >= rightValue) {
arr.push(current);
}
return arr;
}
else if (combinedOperator === '&') {
/**
* Rules:
* {& foo} .............. evaluate logic foo in context
* {foo &} .............. merge context into foo
* foo {&} .............. evaluate logic foo (@it) in context
* {bar & foo} .......... evaluate logic foo in bar
* foo {bar &} .......... evaluate logic foo (@it) in bar
* foo {& bar} .......... evaluate logic bar in context, providing foo as @it to bar
* foo [1, 2, &, 4] ..... concat array foo in context
* [1, 2, & foo, 4] ..... concat array foo in context
* [1, 2, foo &, 4] ..... append context values to foo
* foo & [1, 2, 3] ...... concat context onto foo
* [1, 2, 3] & foo ...... concat foo into context
*/
if (leftType === 'empty') {
leftValue = scopes[0];
leftType = DefaultScript.global.type(leftValue);
}
var merge = function (mergeValue, mergeType) {
if (leftType === 'array') {
if (mergeType !== 'array') {
throw new Error('& merge: value must be of type array, not ' + mergeType);
}
leftValue.push.apply(leftValue, mergeValue);
return EMPTY;
}
else if (leftType === 'object') {
if (mergeType !== 'logic') {
throw new Error('& merge: value must be of type logic, not ' + mergeType);
}
return mergeValue([leftValue].concat(scopes), step, stepName, undefined, onException);
}
else {
throw new Error;
}
};
if (rightType === 'empty') {
return transformPossiblePause(DefaultScript.get(scopes, step, stepName, '@it', onException), function (value) {
return merge(value, DefaultScript.global.type(value));
});
}
return merge(rightValue, rightType);
}
else {
throw new Error('Operation ' + combinedOperator + ' not implemented');
}
};
if (operation.length > 0 && operation[0][SOURCE] === '!') {
leftValue = !leftValue;
operation.shift();
}
if (operation.length === 0) {
if (right.length === 0) {
return leftValue;
}
return resolveRight(function (rightType, rightValue) {
// DefaultScript.global.log('Operate:', leftValue, operation, rightValue)
if (rightType === 'logic') {
return rightValue(scopes, step, stepName, leftValue, onException);
}
else if (rightType === 'array' && leftType === 'number') {
return rightValue[leftValue];
}
else if (rightType === 'function') {
return rightValue(leftValue);
}
else if (leftType === 'string') {
if (rightType !== 'string') {
return leftValue + DefaultScript.global.format(rightValue);
}
return leftValue + rightValue;
}
else {
DefaultScript.global.log('Left:', leftValue);
DefaultScript.global.log('Right:', rightValue);
throw new Error('Invalid combination, ' + leftType + ' and ' + rightType);
}
});
}
else {
var combinedOperator = operation.map(function (op) {
return op[SOURCE];
}).join('');
if (combinedOperator.length > 1 && combinedOperator[combinedOperator.length - 1] === '-') {
combinedOperator = combinedOperator.substr(0, combinedOperator.length - 1);
return resolveRight(function (rightType, rightValue) {
if (rightType !== 'number') {
throw new Error('Cannot negate a value of type ' + rightType);
}
return afterRightResolution(combinedOperator, rightType, -1 * rightValue);
});
}
return resolveRight(function (rightType, rightValue) {
return afterRightResolution(combinedOperator, rightType, rightValue);
});
}
};
|
import React, { useState } from 'react';
import {
View,
Text,
TouchableOpacity,
TextInput,
Keyboard,
} from 'react-native';
import globalStyles from './GlobalStyles';
export default function PaoDeQueijo({ navigation }) {
const [qtd, setQtd] = useState('');
const [ingredientes, setIngredientes] = useState({});
function handleSubmit() {
setIngredientes({
polvilho: Math.round((qtd / 30) * 100) / 100,
agua: Math.round(((qtd * 0.5) / 30) * 100) / 100,
leiteFrio: Math.round(((qtd * 0.5) / 30) * 100) / 100,
leite: Math.round(((qtd * 1) / 30) * 100) / 100,
agua2: Math.round(((qtd * 1) / 30) * 100) / 100,
oleo: Math.round(((qtd * 1) / 30) * 100) / 100,
sal: Math.round(((qtd * 1) / 30) * 100) / 100,
ovo: Math.round(((qtd * 3) / 30) * 100) / 100,
queijo: Math.round(((qtd * 100) / 30) * 100) / 100,
});
Keyboard.dismiss();
}
return (
<View style={globalStyles.container}>
<TextInput
style={globalStyles.input}
value={qtd}
onChangeText={value => setQtd(value)}
keyboardType="numeric"
placeholder="Digite a quantidade desejada..."
placeholderTextColor="#999"
onSubmitEditing={handleSubmit}
/>
<TouchableOpacity
onPress={handleSubmit}
style={globalStyles.primaryButton}>
<Text style={globalStyles.primaryButtonText}>Calcular</Text>
</TouchableOpacity>
{ingredientes.polvilho && (
<View style={globalStyles.ingredientes}>
<Text style={globalStyles.ingredientesTitle}>Ingredientes: </Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.polvilho}kg de polvilho azedo
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.agua} copo de água
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.leiteFrio} leite frio
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.leite} copo e meio de leite
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.agua2} copo e meio de agua
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.oleo} copo de óleo
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.sal} colher de sopa de sal
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.ovo} ovos
</Text>
<Text style={globalStyles.ingredientesText}>
{ingredientes.queijo}g de queijo ralado
</Text>
</View>
)}
</View>
);
}
PaoDeQueijo.navigationOptions = {
title: 'Pão de Queijo',
};
|
import React from 'react';
import { Form } from 'react-bootstrap';
import { useDispatch } from 'react-redux';
import { uploadFile } from '../../../containers/profile/file-upload-action';
import ArrowIconDownGray from '../../../../images/icons/arrowIcondownGray.png';
import CloseIconGray from '../../../../images/icons/closeIconGray.svg';
const FileUpload = ({
closeUploadDocumentPopup,
docType,
setDocType,
docFront,
setDocFront,
docBack,
setDocBack,
setFrontDocumentId,
setBackDocumentId,
handleUploadFile,
showFrontSide,
setShowFrontSide,
showBackSide,
setShowBackSide,
markValid,
setMarkValid,
verifyDocNumber,
setVerifyDocNumber,
}) => {
const dispatch = useDispatch();
const uploadDocsCallBack = (profilePicId, side) => {
if (side === 'front-side') {
setFrontDocumentId(profilePicId);
} else if (side === 'back-side') {
setBackDocumentId(profilePicId);
}
};
const handleFileSelect = (e) => {
if (e.target.name === 'front-side') {
setDocFront(e.target.files[0]);
const formData = new FormData();
formData.append('file', e.target.files[0]);
uploadFile(
{ formData, side: 'front-side', uploadDocsCallBack },
dispatch
);
setShowFrontSide(true);
} else if (e.target.name === 'back-side') {
setDocBack(e.target.files[0]);
const formData = new FormData();
formData.append('file', e.target.files[0]);
uploadFile({ formData, side: 'back-side', uploadDocsCallBack }, dispatch);
setShowBackSide(true);
}
};
return (
<div className="upload-doc">
<h1>UPLOAD DOCUMENT</h1>
<Form>
<div className="upload-doc-input-container">
<div className="filter-select-value">
<label className="filter-input-title">Document Type</label>
<Form.Control
as="select"
value={docType}
onChange={(e) => setDocType(e.target.value)}
>
<option>Aadhaar Card</option>
<option>Pan Card</option>
<option>Passport</option>
<option>Driving Licence</option>
<option>Voter Card</option>
<option>Bank Statement</option>
<option>Salary Slip</option>
<option>Appointment Letter</option>
<option>Profile Picture</option>
</Form.Control>
<div className="downarrow-img">
<img alt="forget-password" src={ArrowIconDownGray} />
</div>
</div>
</div>
<div className="upload-doc-input-container upload-doc-text-container">
<label className="filter-input-title">Upload Front Side</label>
<Form.Control
type="file"
name="front-side"
id="file-front"
className="upload-doc-file-input"
onChange={(e) => handleFileSelect(e)}
/>
<label htmlFor="file-front" className="upload-doc-text">
<p>
<span className="upload-doc-browse-file">Browse file</span> or
drop file here
</p>
Only <span className="upload-doc-file-type">.jpg, .png</span> file
allowed
</label>
</div>
<div className="upload-doc-input-container upload-doc-text-container">
<label className="filter-input-title">Upload Back Side</label>
<Form.Control
type="file"
name="back-side"
id="file-back"
className="upload-doc-file-input"
onChange={(e) => handleFileSelect(e)}
/>
<label htmlFor="file-back" className="upload-doc-text">
<p>
<span className="upload-doc-browse-file">Browse file</span> or
drop file here
</p>
Only <span className="upload-doc-file-type">.jpg, .png</span> file
allowed
</label>
</div>
{showFrontSide && (
<div className="uploaded-doc-message">
<ul className="uploaded-doc-details">
<li>{docFront.name}</li>
<li>{`${Math.ceil(docFront.size / 1024)}kb`}</li>
<li>
<img
src={CloseIconGray}
onClick={() => setShowFrontSide(false)}
/>
</li>
<li style={{ visibility: 'hidden' }}>Retry</li>
</ul>
</div>
)}
{showBackSide && (
<div>
<ul className="uploaded-doc-details">
<li>{docBack.name}</li>
<li>{`${Math.ceil(docBack.size / 1024)}kb`}</li>
<li>
<img
src={CloseIconGray}
onClick={() => setShowBackSide(false)}
/>
</li>
<li style={{ visibility: 'hidden' }}>Retry</li>
</ul>
</div>
)}
{markValid && (
<div className="fliter-input-value">
<label className="filter-input-title">{`${
docType.split(' ')[0]
} Number`}</label>
<Form.Control
required
type="text"
placeholder={`Enter Your ${docType.split(' ')[0]} Number`}
value={verifyDocNumber}
onChange={(e) => setVerifyDocNumber(e.target.value)}
/>
<Form.Control.Feedback type="invalid">
{`Please enter ${docType.split(' ')[0]} Number.`}
</Form.Control.Feedback>
</div>
)}
</Form>
<div className="upload-doc-buttons">
<button
className="black-border-btn file-upload-btn"
onClick={() => setMarkValid(!markValid)}
>
SUBMIT WITH MARK VALID
</button>
<button
className="cancel-btn file-upload-btn"
onClick={closeUploadDocumentPopup}
>
Cancel
</button>
<button
className="black-border-btn file-upload-btn"
onClick={(e) => handleUploadFile(e)}
>
SUBMIT
</button>
</div>
</div>
);
};
export default FileUpload;
|
function coinChange(int){
var dollar = 0;
var quarter = 0;
var dime = 0;
var nickel = 0;
var penny = 0;
var newInt = 0;
while(int >= 100){
int -= 100;
dollar++;
}
while(int >= 25){
int -= 25;
quarter++;
}
while(int >= 10){
int -= 10;
dime++;
}
while(int >= 5){
int -= 5;
nickel++;
}
while(int >= 1){
int -= 1;
penny++;
}
var denom = "Dollars: " + dollar + " Quarters: " + quarter + " Dimes: " + dime + " Nickels: " + nickel + " Pennies: " + penny;
return denom;
}
coinChange(247) |
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const baseConfig = require('./base.config.js');
module.exports = merge(baseConfig, {
entry: {
index: './src/index',
},
output: {
path: path.resolve(__dirname, '../build'),
filename: '[name].js',
libraryTarget: 'umd'
},
plugins: [
// Minify JS
new UglifyJsPlugin({
sourceMap: false,
}),
// Minify CSS
new webpack.LoaderOptionsPlugin({
minimize: true,
}),
],
});
|
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
var app = getApp();
var api = require("../api.js");
var collegeId = void 0;
Page({
data: {
scrollH: 0,
collegeList: [],
matchMajorList: [],
matchMajorLoading: true,
matchMajorFlag: false,
collegeUp: false,
colleges: "",
pn: 1,
sort: true,
//true从大到小fasle从小到大
chooseSubjectType: app.globalData.chooseSubject.provinceType
},
onLoad: function onLoad(options) {
this.setData({
chooseSubjectType: app.globalData.chooseSubject.provinceType
});
this.selectComponent("#navigationcustom").setNavigationAll("院校匹配 " + options.rate + "%", true);
this.getScrollH();
this.rateColleges();
},
// 计算dom高度
getScrollH: function getScrollH() {
var that = this;
var item = wx.createSelectorQuery();
item.select("#nav").boundingClientRect();
item.exec(function(res) {
that.setData({
scrollH: app.globalData.systemInfo.windowHeight - res[0].height
});
});
},
//获取匹配院校
rateColleges: function rateColleges() {
var _this = this;
api.getMajorMatchRate("ChooseSubject/Colleges/QueryMajorMatchRate", "POST", {
majorCodes: app.globalData.chooseSubject.majorCodes,
pageIndex: this.data.pn,
pageSize: 20,
provinceId: app.globalData.chooseSubject.provinceId,
sortFiledType: 2,
sortType: this.data.sort ? 2 : 1,
subject: app.globalData.chooseSubject.subject,
year: app.globalData.chooseSubject.year
}).then(function(res) {
var data = void 0;
if (_this.data.pn > 1) {
data = _this.data.colleges;
data.colleges = [].concat(_toConsumableArray(_this.data.colleges.colleges), _toConsumableArray(res.result.colleges));
} else {
data = res.result;
}
_this.setData({
colleges: data
});
});
},
sort: function sort() {
this.setData({
pn: 1,
sort: !this.data.sort,
intoView: 0
});
this.rateColleges();
},
// 匹配专业
collegeUp: function collegeUp(e) {
var _this2 = this;
var that = this;
var _e$currentTarget$data = e.currentTarget.dataset, ucode = _e$currentTarget$data.ucode, collegeid = _e$currentTarget$data.collegeid;
collegeId = collegeid;
api.getCollegeResult("ChooseSubject/Colleges/Get", "POST", {
uCode: ucode,
collegeId: collegeid,
subject: app.globalData.chooseSubject.subject,
provinceId: app.globalData.chooseSubject.provinceId,
year: app.globalData.chooseSubject.year
}).then(function(res) {
_this2.setData({
collegeInfo: res.result
});
});
that.setData({
matchMajorFlag: true,
collegeUp: "major-animate",
matchMajorLoading: false
});
},
collegeClose: function collegeClose() {
this.setData({
matchMajorFlag: false,
collegeUp: "major-animate-out"
});
},
//查看院校详情
collegeDetail: function collegeDetail() {
wx.navigateTo({
url: "/packages/findUniversity/collegeDetail/collegeDetail?numId=" + collegeId
});
},
//加载更多
getMore: function getMore() {
this.setData({
pn: this.data.pn + 1
});
this.rateColleges();
}
}); |
import React from 'react';
import { Link, Redirect } from 'react-router-dom';
import { signout } from '../helpers/auth';
import { isAuth } from '../helpers/auth';
import { toast } from 'react-toastify';
import { useState } from 'react';
import './script';
import './styles.css';
function Navbar({ history }) {
const [navStyle, setNav] = useState({
});
//when burger is clciked
const burger = () => {
setNav({
display:'flex',
position:'fixed',
transform:'translateX(-100vw)'
});
};
//when cross is clicked
const cross = () => {
setNav({
display:'none',
position:'unset',
transform:'translateX(0vw)'
});
};
const resizedHandler = ()=>{
if(window.innerWidth>1023){
console.log(window.innerWidth);
setNav({
display:'block',
position:'initial',
transform:'translateX(0vw)'
});
}
}
window.addEventListener('resize', resizedHandler);
return (
<div className="nav">
<Link to='/'><h1>NESTO/Fin.</h1></Link>
<ul style={navStyle}>
<li className="others"><a href="/investing">Investing</a></li>
<li className="others"><a href="/borrowing">Borrowing</a></li>
<li className="others"><a href="/planning">Planning</a></li>
<li className="others"><a href="/learnmore">Learn More</a></li>
{!isAuth() && <Link to='/login'><li className="log">Login</li></Link>}
{!isAuth() && <Link to='/register'><li className="log">Sign Up</li></Link>}
{isAuth() && <li onClick={() => {
signout(() => {
toast.error('Signout Successfully');
// history.push('/login');
});
}} className="log">Sign Out</li>}
<li className="gets"><a href='/getstarted'>Get Started</a></li>
<div className="cross" onClick={cross}>X</div>
</ul>
<div className="hamburger" onClick={burger}>
<div className="bun"></div>
<div className="bun"></div>
<div className="bun"></div>
</div>
</div>
);
}
export default Navbar; |
import Controller from "../controllers/model";
const Model = new Controller();
export default (app, passport) => {
/* CRUD endpoints */
app.post(
'/model',
passport.authenticate('jwt', {session: false }),
Model.create
); // Create
app.get('/model/:handle', Model.read); // Read
app.put(
'/model/:handle',
passport.authenticate('jwt', {session: false }),
Model.update
); // Update
app.delete('/model/:handle', Model.delete); // Delete
// Delete multiple
app.post(
'/remove/models',
passport.authenticate('jwt', {session: false }),
Model.deleteMultiple
);
// Clone model
app.post('/clone/model/:handle', Model.clone);
}
|
import React, { Component } from 'react'
import { t } from 'core'
import { prop, classprop } from 'core/decorators/react'
export class Input extends Component {
@prop() id
@prop() label
@prop() value
// validation
@prop() pattern
@prop() error
// events
@prop([
'onChange', 'onClick', 'onFocus', 'onBlur',
'onKeyUp', 'onKeyPress', 'onKeyDown'
]) inputEvents
@classprop(true, 'mdl-textfield mdl-js-textfield mdl-textfield--floating-label')
containerClassName
@classprop('inputClassName', 'mdl-textfield__input')
inputClassName
@classprop('labelClassName', 'mdl-textfield__label')
labelClassName
@classprop('errorClassName', 'mdl-textfield__error')
errorClassName
componentDidUpdate () {
window.componentHandler.upgradeDom()
this.refs.input.dispatchEvent(new Event('input'))
}
render () {
return (
<span className={ this.containerClassName() } ref="inputContainer">
<input
className={ this.inputClassName() }
type={this.type}
id={this.id}
pattern={this.pattern}
value={this.value}
ref="input"
{ ...this.inputEvents }
/>
<label
className={ this.labelClassName() }
for={this.id}
>
{ t(this.label) }
</label>
<span
className={ this.errorClassName() }
>
{ t(this.error) }
</span>
</span>
)
}
}
|
//= require vendor/modernizr
//= require vendor/jquery
//= require vendor/jquery.easing
//= require vendor/jquery.appear
//= require vendor/jquery.cookie
//= require vendor/bootstrap
//= require vendor/owl-carousel/owl.carousel
//= require plugins
//= require views/view.home
//= require theme
//= require theme.init |
import React,{Component} from 'react';
import {Link} from 'react-router-dom';
import {NavbarToggler,Navbar,Collapse,Nav,NavItem,UncontrolledDropdown,DropdownMenu,DropdownItem,DropdownToggle} from 'reactstrap';
export default class Header extends Component{
constructor(props) {
super(props);
this.state = {
isNavOpen: false
};
this.toggleNav = this.toggleNav.bind(this);
}
toggleNav() {
this.setState({
isNavOpen: !this.state.isNavOpen
});
}
render(){
return(
<div>
<div className="TopBar">
<div className="box1">
<div className="container">
<div className="row">
<div className="col-lg-2 col-sm-3">
<select className="dropdown1">
<option href="/" selected value="1">EN</option>
<option href="/" value="2">GR</option>
<option href="/" value="3">FR</option>
</select>
|
<select className="dropdown1">
<option href="/" selected value="1">USD</option>
<option href="/" value="2">EURO</option>
<option href="/" value="3">JYP</option>
</select>
</div>
<div className="col-lg-2 col-sm-6">
<p>Call Us at : +1 123456789</p>
</div>
<div className="col-lg-4 col-md-3 col-sm-6">
<p className="d-none d-sm-block">Send us email : contact@gmail.com</p>
</div>
<div className="col-md-3 col-6">
<p><i class="fas fa-truck"></i> Order Tracking</p>
</div>
<div className="col-md-2 col-6">
<p><i class="far fa-heart"></i> Wishlist</p>
</div>
</div>
</div>
</div>
<hr></hr>
<div className="box2">
<div className="container">
<div className="row">
<div className="col-md-3 col-sm-12">
<Link to={"/"}>
<img className="top-logo" src="assets/images/logo.png" alt="Ibid" height="37" width="90"></img>
</Link>
<br></br>
</div>
<div className="col-md-6 col-sm-12" >
<form>
<div className="search">
<select className="dropdown-top">
<option selected value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option3</option>
</select>
<input className="search-txt" placeholder="Search Products" />
<Link className="search-btn" to={"#"} >
<i class="fas fa-search"></i>
</Link>
</div>
</form>
</div>
<div className="col-md-3 col-12 mycart">
<h6>My Cart <i class="fas fa-shopping-basket"></i></h6>
<p>0 items -$0.0</p>
</div>
</div>
</div>
</div>
<Navbar className="navbar" expand="md">
<div className="container">
<NavbarToggler className="toggle" onClick={this.toggleNav} />
<Collapse isOpen={this.isNavOpen} navbar>
<Nav className="mr-auto ml-auto" navbar>
<UncontrolledDropdown className="nav-dropdown" nav inNavbar>
<DropdownToggle style={{ color: '#000000' }} nav caret>
CATEGORIES
</DropdownToggle>
<DropdownMenu right>
<DropdownItem>
Option 1
</DropdownItem>
<DropdownItem>
Option 2
</DropdownItem>
<DropdownItem>
Reset
</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#Home"}>Home</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#auction"}>Auctions</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#vendors"}>Vendors</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#shortcodes"}>Shortcodes</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#blog"}>Blog</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"#media"}>Media</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"/"}>About</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"/"}>Contact</Link>
</NavItem>
<NavItem className=" links">
<Link className="nav-link" style={{ color: '#FFF' }} to={"/"}>Pages</Link>
</NavItem>
</Nav>
</Collapse>
<button type="button" style={{ color: '#FFF',textDecoration: 'none' }} className="btn btn-link"><b>Sign-in</b></button>
</div>
</Navbar>
<div className="herosection">
<div className="container">
<div className="row">
<div className="col-sm-12 col-md-6">
<h1>Audi Q5 Premium</h1>
<p>Capitalize on low hanging fruit to identify a ballpark.</p>
<p>Current bid: $5550</p>
<button className="btn-blue"><Link style={{ color: '#FFF',textDecoration: 'none' }} className="btn-link" type="btn">Place Bid Now</Link></button>
</div>
<div className="col-md-4 col-12">
<img src="assets/images/car.png" className="car" alt="car" height="80%"></img>
</div>
</div>
</div>
</div>
<div>
<div class="container" data-aos="fade-up">
<div class="row">
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div className="icon-box" data-aos="fade-up" data-aos-delay="100">
<h4 className="title" ><i class="fas fa-headphones-alt"></i><Link to="/" style={{textDecoration: 'none',color: '#000000' }}> Call Center</Link></h4>
<p className="description">Completely Synegize</p>
</div>
</div>
<div class="col-md-6 col-12 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div className="icon-box" data-aos="fade-up" data-aos-delay="100">
<h4 className="title" ><i class="fas fa-globe-asia"></i><Link to="/" style={{textDecoration: 'none',color: '#000000' }}> Order Tracking</Link></h4>
<p className="description">Objectively empowered</p>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div className="icon-box" data-aos="fade-up" data-aos-delay="100">
<h4 className="title" ><i class="fas fa-truck"></i><Link to="/" style={{textDecoration: 'none',color: '#000000' }}> Fastest delivery</Link></h4>
<p className="description">Efficiently unleash media</p>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div className="icon-box" data-aos="fade-up" data-aos-delay="100">
<h4 className="title" ><i class="fas fa-hand-holding-usd"></i><Link to="/" style={{textDecoration: 'none',color: '#000000' }}> Instant Buying</Link></h4>
<p className="description">Podacasting operational</p>
</div>
</div>
</div>
</div>
</div>
<br></br>
<div>
<div className="container">
<h2 class="text-center">LATEST AUCTIONS </h2>
<hr></hr>
</div>
</div>
</div>
</div>
);
}
} |
/*
* excelUploadConfirmationController.js
*
* Copyright (c) 2017 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*/
'use strict';
/**
* The controller to handle the layout of the excel Upload Confirmation.
*
* @author vn70529
* @since 2.12
*/
(function() {
angular.module('productMaintenanceUiApp')
.controller('BatchUploadConfirmationController', batchUploadConfirmationController)
.directive('batchUploadConfirmation', batchUploadConfirmation);
batchUploadConfirmation.$inject = ['$uibModal', 'ModalFactory'];
/**
* Batch upload confirmation directive for batch upload.
*
* @param $uibModal
* @param ModalFactory modal factory is used to show notification.
* @returns {{restrict: string, priority: number, link: link}}
*/
function batchUploadConfirmation($uibModal, modalFactory) {
return {
restrict: 'A',
priority: -1,
link: function (scope, element, attrs) {
element.bind('click', function () {
var isEmptyUploadFile = attrs.isEmptyUploadFile;
if (isEmptyUploadFile == 'true') {
modalFactory.showNotificationModal({title: 'Upload', message: 'Please select file to upload.'});
} else {
$uibModal.open({
templateUrl: 'src/batchUpload/utils/batchUploadConfirmation.html',
backdrop: 'static',
windowClass: 'modal',
controller: 'BatchUploadConfirmationController',
controllerAs: 'batchUploadConfirmationController',
size: 'md',
resolve: {}
});
}
});
}
};
}
batchUploadConfirmationController.$inject = ['$rootScope', '$uibModalInstance'];
/**
* Constructs the controller.
*
* @param $rootScope the root Scope
* @param $uibModalInstance the Modal Instance.
*/
function batchUploadConfirmationController($rootScope, $uibModalInstance) {
var self = this;
/**
* Holds the description of upload file.
*
* @type {string}
*/
self.description = '';
/**
* Upload template to server.
*/
self.ok = function(){
/**
* Notify to controller that user click on ok button to agree upload file.
*/
$rootScope.$broadcast("okButtonClicked", {
description: self.description
});
/**
* Hide confirm dialog.
*/
self.close();
}
/**
* Close this dialog
*/
self.close = function() {
$uibModalInstance.dismiss('cancel');
};
}
})();
|
import React , { useEffect, useState }from "react";
import { Row, Col } from "react-bootstrap";
import { Link } from "react-router-dom";
import Sidebar from "./Sidebar";
import "../Project_Information.css";
import { makeStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField";
import FormControl from "@material-ui/core/FormControl";
import MenuItem from "@material-ui/core/MenuItem";
import InputLabel from "@material-ui/core/InputLabel";
import Select from "@material-ui/core/Select";
import Icon from "@material-ui/core/Icon";
import Button from "@material-ui/core/Button";
// import react, { useEffect, useState } from "react";
import axios from "axios";
import {
Form,
// Button
} from "reactstrap";
export const TestTestTest = () => {
const [groupList2, setgroupList2] = useState([]);
const [groupname, setGroupname] = useState("");
const [membername, setmembername] = useState("");
const [advisorname, setadvisorname] = useState("");
const addGroup2 = () => {
axios
.post("http://localhost:5001/groups/add2", {
groupname: groupname,
membername: membername,
advisorname: advisorname
})
.then(() => {
setgroupList2([
...groupList2,
{
groupname: groupname,
membername: membername,
advisorname: advisorname
},
]);
});
};
return (
<div className="App container">
<h1>Create Group</h1>
<div className="creategroup"></div>
<from action="">
<div className="mb-3">
<label htmlFor="group" className="form-label">
Group:
</label>
<input
type="text"
className="from-control"
placeholder="Enter Groupname"
onChange={(event)=>{
setGroupname(event.target.value);
}}
></input>
</div>
<div className="mb-3">
<label htmlFor="member" className="form-label">
Member:
</label>
<input
type="text"
className="from-control"
placeholder="Enter Member"
onChange={(event)=>{
setmembername(event.target.value);
}}
></input>
</div>
<div className="mb-3">
<label htmlFor="advisor" className="form-label">
Advisor:
</label>
<input
type="text"
className="from-control"
placeholder="Enter Advisor"
onChange={(event)=>{
setadvisorname(event.target.value);
}}
></input>
</div>
<button className="btn btn-succes" onClick={addGroup2()}>Submit</button>
</from>
</div>
);
};
|
define(['require', 'schema', 'page'], function (require, schemaLib, pageLib) {
/**
* BasesrvSigninRecord
* srvSigninApp
* srvSigninRound
* srvSigninRecord
*/
var BasesrvSigninRecord = function (
$q,
http2,
tmsSchema,
noticebox,
$uibModal
) {
this._oApp = null
this._oPage = null
this._oCriteria = null
this._aRecords = null
this._mapOfRoundsById = {}
this.init = function (oApp, oPage, oCriteria, oRecords) {
this._oApp = oApp
// schemas
if (this._oApp._schemasById === undefined) {
var schemasById = {}
this._oApp.dataSchemas.forEach(function (schema) {
schemasById[schema.id] = schema
})
this._oApp._schemasById = schemasById
}
// pagination
this._oPage = oPage
angular.extend(this._oPage, {
at: 1,
size: 30,
orderBy: 'time',
joinParams: function () {
var p
p = '&page=' + this.at + '&size=' + this.size
p += '&orderby=' + this.orderBy
p += '&rid=' + (this.byRound ? this.byRound : 'all')
return p
},
setTotal: function (total) {
var lastNumber
this.total = total
this.numbers = []
lastNumber = this.total > 0 ? Math.ceil(this.total / this.size) : 1
for (var i = 1; i <= lastNumber; i++) {
this.numbers.push(i)
}
},
})
// criteria
this._oCriteria = oCriteria
angular.extend(this._oCriteria, {
record: {
verified: '',
},
tags: [],
data: {},
keyword: '',
})
// records
this._aRecords = oRecords
}
this._bSearch = function (url) {
var that = this,
defer = $q.defer()
http2.post(url, that._oCriteria).then(function (rsp) {
var records
if (rsp.data) {
records = rsp.data.records ? rsp.data.records : []
rsp.data.total && (that._oPage.total = rsp.data.total)
that._oPage.setTotal(rsp.data.total)
} else {
records = []
}
records.forEach(function (record) {
that._bConvertRecord4Table(record)
record._signinLate = {}
if (that._oApp.rounds) {
that._oApp.rounds.forEach(function (round) {
if (record.signin_log && record.signin_log[round.rid]) {
record._signinLate[round.rid] =
round.late_at &&
round.late_at < record.signin_log[round.rid] - 60
}
})
}
that._aRecords.push(record)
})
defer.resolve(records)
})
return defer.promise
}
this._bBatchVerify = function (rows, url) {
var eks = [],
selectedRecords = [],
that = this
for (var p in rows.selected) {
if (rows.selected[p] === true) {
eks.push(that._aRecords[p].enroll_key)
selectedRecords.push(that._aRecords[p])
}
}
if (eks.length) {
http2
.post(url, {
eks: eks,
})
.then(function (rsp) {
selectedRecords.forEach(function (record) {
record.verified = 'Y'
})
noticebox.success('完成操作')
})
}
}
this._bGet = function (oSigninApp, method) {
oSigninApp.tags =
!oSigninApp.tags || oSigninApp.tags.length === 0
? []
: oSigninApp.tags.split(',')
method(oSigninApp)
oSigninApp.pages.forEach(function (page) {
pageLib.enhance(page, oSigninApp._schemasById)
})
}
this._bFilter = function () {
var defer = $q.defer(),
that = this
$uibModal
.open({
templateUrl:
'/views/default/pl/fe/matter/signin/component/recordFilter.html?_=3',
controller: 'ctrlSigninFilter',
windowClass: 'auto-height',
backdrop: 'static',
resolve: {
dataSchemas: function () {
return that._oApp.dataSchemas
},
criteria: function () {
return angular.copy(that._oCriteria)
},
},
})
.result.then(function (criteria) {
defer.resolve()
angular.extend(that._oCriteria, criteria)
that.search(1).then(function () {
defer.resolve()
})
})
return defer.promise
}
this._bConvertRecord4Table = function (record) {
var round,
signinAt,
signinLate = {},
that = this
tmsSchema.forTable(record, that._oApp._assocSchemasById)
// signin log
for (var roundId in that._mapOfRoundsById) {
round = that._mapOfRoundsById[roundId]
if (record.signin_log && round.late_at > 0) {
signinAt = parseInt(record.signin_log[roundId])
if (signinAt) {
// 忽略秒的影响
signinLate[roundId] = signinAt > parseInt(round.late_at) + 59
}
}
}
record._signinLate = signinLate
return record
}
}
angular
.module('service.signin', ['ui.bootstrap', 'ui.xxt', 'service.matter'])
.provider('srvSigninApp', function () {
function _fnMapAssocEnrollApp(oApp) {
var enrollDataSchemas = []
if (oApp.enrollApp && oApp.enrollApp.dataSchemas) {
oApp.enrollApp.dataSchemas.forEach(function (item) {
if (oApp._assocSchemasById[item.id] === undefined) {
item.assocState = ''
oApp._assocSchemasById[item.id] = item
enrollDataSchemas.push(item)
} else if (
oApp._assocSchemasById[item.id].fromApp === oApp.enrollApp.id
) {
item.assocState = 'yes'
} else {
item.assocState = 'no'
}
})
}
oApp._schemasFromEnrollApp = enrollDataSchemas
}
function _fnMapAssocGroupApp(oApp) {
var groupDataSchemas = []
if (oApp.groupApp && oApp.groupApp.dataSchemas) {
oApp.groupApp.dataSchemas.forEach(function (item) {
if (oApp._assocSchemasById[item.id] === undefined) {
item.assocState = ''
oApp._assocSchemasById[item.id] = item
groupDataSchemas.push(item)
} else if (
oApp._assocSchemasById[item.id].fromApp === oApp.groupApp.id
) {
item.assocState = 'yes'
} else {
item.assocState = 'no'
}
})
}
oApp._schemasFromGroupApp = groupDataSchemas
}
function _fnMapSchemas(oApp) {
var mapOfAppSchemaById = {},
mapOfSchemaByType = {},
mapOfSchemaById = {},
canFilteredSchemas = []
oApp.dataSchemas.forEach(function (schema) {
mapOfSchemaByType[schema.type] === undefined &&
(mapOfSchemaByType[schema.type] = [])
mapOfSchemaByType[schema.type].push(schema.id)
mapOfAppSchemaById[schema.id] = schema
mapOfSchemaById[schema.id] = schema
if (false === /image|file/.test(schema.type)) {
canFilteredSchemas.push(schema)
}
})
oApp._schemasByType = mapOfSchemaByType
oApp._schemasById = mapOfAppSchemaById
oApp._assocSchemasById = mapOfSchemaById
oApp._schemasCanFilter = canFilteredSchemas
_fnMapAssocEnrollApp(oApp)
_fnMapAssocGroupApp(oApp)
}
var siteId,
appId,
app,
_oApp,
defaultInputPage,
pages4NonMember = [],
pages4Nonfan = [],
_getAppDeferred = false
this.app = function () {
return app
}
this.config = function (site, app, access) {
siteId = site
appId = app
accessId = access
}
this.$get = [
'$q',
'http2',
'noticebox',
'srvSite',
'$uibModal',
function ($q, http2, noticebox, srvSite, $uibModal) {
var _ins = new BasesrvSigninRecord()
return {
get: function () {
var url
if (_getAppDeferred) {
return _getAppDeferred.promise
}
_getAppDeferred = $q.defer()
url =
'/rest/pl/fe/matter/signin/get?site=' + siteId + '&id=' + appId
http2.get(url).then(function (rsp) {
_oApp = app = rsp.data
_ins._bGet(app, _fnMapSchemas)
_getAppDeferred.resolve(app)
})
return _getAppDeferred.promise
},
renew: function (props) {
if (_oApp) {
http2
.get(
'/rest/pl/fe/matter/signin/get?site=' +
siteId +
'&id=' +
appId
)
.then(function (rsp) {
var oNewApp = rsp.data
if (props && props.length) {
props.forEach(function (prop) {
_oApp[prop] = oNewApp[prop]
})
} else {
http2.merge(_oApp, oNewApp)
}
_ins._bGet(app, _fnMapSchemas)
})
}
},
update: function (names) {
var defer = $q.defer(),
modifiedData = {},
url
angular.isString(names) && (names = [names])
names.forEach(function (name) {
if (name === 'data_schemas' || name === 'dataSchemas') {
modifiedData.data_schemas = _oApp.dataSchemas
} else if (
name === 'recycle_schemas' ||
name === 'recycleSchemas'
) {
modifiedData.recycle_schemas = _oApp.recycleSchemas
} else if (name === 'tags') {
modifiedData.tags = _oApp.tags.join(',')
} else {
modifiedData[name] = _oApp[name]
}
})
url =
'/rest/pl/fe/matter/signin/update?site=' +
siteId +
'&app=' +
appId
http2.post(url, modifiedData).then(function (rsp) {
defer.resolve(rsp.data)
})
return defer.promise
},
changeUserScope: function (ruleScope, sns) {
this.update('entryRule')
},
assignMission: function () {
var _this = this
srvSite
.openGallery({
matterTypes: [
{
value: 'mission',
title: '项目',
url: '/rest/pl/fe/matter',
},
],
singleMatter: true,
})
.then(function (missions) {
var matter
if (missions.matters.length === 1) {
matter = {
id: appId,
type: 'signin',
}
http2
.post(
'/rest/pl/fe/matter/mission/matter/add?site=' +
siteId +
'&id=' +
missions.matters[0].id,
matter
)
.then(function (rsp) {
var mission = rsp.data,
updatedFields = ['mission_id']
_oApp.mission = mission
_oApp.mission_id = mission.id
if (!_oApp.pic || _oApp.pic.length === 0) {
_oApp.pic = mission.pic
updatedFields.push('pic')
}
if (!_oApp.summary || _oApp.summary.length === 0) {
_oApp.summary = mission.summary
updatedFields.push('summary')
}
_this.update(updatedFields)
})
}
})
},
quitMission: function () {
var _this = this,
matter = {
id: appId,
type: 'signin',
title: _oApp.title,
}
http2
.post(
'/rest/pl/fe/matter/mission/matter/remove?site=' +
siteId +
'&id=' +
_oApp.mission_id,
matter
)
.then(function (rsp) {
delete _oApp.mission
_oApp.mission_id = null
_this.update(['mission_id'])
})
},
remove: function () {
var defer = $q.defer(),
url
url =
'/rest/pl/fe/matter/signin/remove?site=' +
siteId +
'&app=' +
appId
http2.get(url).then(function (rsp) {
defer.resolve()
})
return defer.promise
},
jumpPages: function () {
var defaultInput,
inapp = [],
pages = _oApp.pages,
pages4NonMember = [
{
name: '$memberschema',
title: '填写联系人信息',
},
],
pages4Nonfan = [
{
name: '$mpfollow',
title: '提示关注',
},
]
pages.forEach(function (page) {
var newPage = {
name: page.name,
title: page.title,
}
inapp.push(newPage)
pages4NonMember.push(newPage)
pages4Nonfan.push(newPage)
page.type === 'I' && (defaultInput = newPage)
})
return {
inapp: inapp,
nonMember: pages4NonMember,
nonfan: pages4Nonfan,
defaultInput: defaultInput,
}
},
}
},
]
})
.provider('srvSigninRound', function () {
var siteId, appId
this.setSiteId = function (id) {
siteId = id
}
this.setAppId = function (id) {
appId = id
}
this.$get = [
'$q',
'http2',
'noticebox',
'$uibModal',
function ($q, http2, noticebox, $uibModal) {
return {
batch: function (app) {
var defer = $q.defer()
$uibModal
.open({
templateUrl: 'batchRounds.html',
backdrop: 'static',
resolve: {
app: function () {
return app
},
},
controller: [
'$scope',
'$uibModalInstance',
'app',
function ($scope2, $mi, app) {
var params = {
timesOfDay: 2,
overwrite: 'Y',
}
/*设置阶段的缺省起止时间*/
;(function () {
var nextDay = new Date()
nextDay.setTime(nextDay.getTime() + 86400000)
params.start_at = nextDay.setHours(0, 0, 0, 0) / 1000
params.end_at = nextDay.setHours(23, 59, 59, 0) / 1000
})()
$scope2.params = params
$scope2.cancel = function () {
$mi.dismiss()
}
$scope2.ok = function () {
$mi.close($scope2.params)
}
},
],
})
.result.then(function (params) {
http2
.post(
'/rest/pl/fe/matter/signin/round/batch?site=' +
siteId +
'&app=' +
appId,
params
)
.then(function (rsp) {
if (params.overwrite === 'Y') {
app.rounds = rsp.data
} else {
app.rounds = rounds.concat(rsp.data)
}
defer.resolve(app.rounds)
})
})
return defer.promise
},
add: function (rounds) {
var newRound = {
title: '轮次' + (rounds.length + 1),
start_at: Math.round(new Date().getTime() / 1000),
end_at: Math.round(new Date().getTime() / 1000) + 7200,
}
http2
.post(
'/rest/pl/fe/matter/signin/round/add?site=' +
siteId +
'&app=' +
appId,
newRound
)
.then(function (rsp) {
rounds.push(rsp.data)
})
},
update: function (round, prop) {
var url = '/rest/pl/fe/matter/signin/round/update',
posted = {}
url += '?site=' + siteId
url += '&app=' + appId
url += '&rid=' + round.rid
posted[prop] = round[prop]
http2.post(url, posted).then(function (rsp) {
noticebox.success('完成保存')
})
},
remove: function (round, rounds) {
var url
if (window.confirm('确定删除:' + round.title + '?')) {
url = '/rest/pl/fe/matter/signin/round/remove'
url += '?site=' + siteId
url += '&app=' + appId
url += '&rid=' + round.rid
http2.get(url).then(function (rsp) {
rounds.splice(rounds.indexOf(round), 1)
})
}
},
qrcode: function (app, sns, round, appUrl) {
$uibModal.open({
templateUrl: 'roundQrcode.html',
backdrop: 'static',
controller: [
'$scope',
'$timeout',
'$uibModalInstance',
function ($scope2, $timeout, $mi) {
var popover = {
title: round.title,
url: appUrl + '&round=' + round.rid,
}
popover.qrcode =
'/rest/site/fe/matter/signin/qrcode?site=' +
siteId +
'&url=' +
encodeURIComponent(popover.url)
$scope2.popover = popover
$scope2.app = app
$scope2.sns = sns
$scope2.downloadQrcode = function (url) {
$(
'<a href="' +
url +
'" download="' +
app.title +
'_' +
round.title +
'_签到二维码.png"></a>'
)[0].click()
}
$scope2.createWxQrcode = function () {
var url,
params = {
round: round.rid,
}
url =
'/rest/pl/fe/site/sns/wx/qrcode/create?site=' + siteId
url += '&matter_type=signin&matter_id=' + appId
//url += '&expire=864000';
http2
.post(url, {
params: params,
})
.then(function (rsp) {
$scope2.qrcode = rsp.data
})
}
$scope2.downloadWxQrcode = function () {
$(
'<a href="' +
$scope2.qrcode.pic +
'" download="' +
app.title +
'_' +
round.title +
'_签到二维码.jpeg"></a>'
)[0].click()
}
if (app.entryRule.scope === 'sns' && sns.wx) {
if (sns.wx.can_qrcode === 'Y') {
http2
.get(
'/rest/pl/fe/matter/signin/wxQrcode?site=' +
siteId +
'&app=' +
appId +
'&round=' +
round.rid
)
.then(function (rsp) {
var qrcodes = rsp.data
$scope2.qrcode = qrcodes.length ? qrcodes[0] : false
})
}
}
$scope2.cancel = function () {
$mi.dismiss()
}
$scope2.ok = function () {
$mi.dismiss()
}
},
],
})
},
}
},
]
})
.provider('srvSigninRecord', function () {
var siteId, appId
this.config = function (site, app) {
siteId = site
appId = app
}
this.$get = [
'$q',
'$uibModal',
'$sce',
'http2',
'noticebox',
'pushnotify',
'CstApp',
'tmsSchema',
function (
$q,
$uibModal,
$sce,
http2,
noticebox,
pushnotify,
CstApp,
tmsSchema
) {
var _ins = new BasesrvSigninRecord(
$q,
http2,
tmsSchema,
noticebox,
$uibModal
)
_ins.search = function (pageNumber) {
var url
this._aRecords.splice(0, this._aRecords.length)
pageNumber && (this._oPage.at = pageNumber)
url = '/rest/pl/fe/matter/signin/record/list'
url += '?site=' + this._oApp.siteid
url += '&app=' + this._oApp.id
url += this._oPage.joinParams()
return _ins._bSearch(url)
}
_ins.filter = function () {
return _ins._bFilter()
}
_ins.get = function (ek) {
var defer = $q.defer()
http2
.get('/rest/pl/fe/matter/signin/record/get?ek=' + ek)
.then(function (rsp) {
defer.resolve(rsp.data)
})
return defer.promise
}
_ins.add = function (newRecord) {
http2
.post(
'/rest/pl/fe/matter/signin/record/add?site=' +
siteId +
'&app=' +
appId,
newRecord
)
.then(function (rsp) {
var record = rsp.data
_ins._bConvertRecord4Table(record)
_ins._aRecords.splice(0, 0, record)
})
}
_ins.update = function (record, updated) {
http2
.post(
'/rest/pl/fe/matter/signin/record/update?site=' +
siteId +
'&app=' +
appId +
'&ek=' +
record.enroll_key,
updated
)
.then(function (rsp) {
angular.extend(record, rsp.data)
_ins._bConvertRecord4Table(record)
})
}
_ins.editRecord = function (record) {
$uibModal
.open({
templateUrl:
'/views/default/pl/fe/matter/signin/component/recordEditor.html?_=4',
controller: 'ctrlSigninEdit',
backdrop: 'static',
windowClass: 'auto-height middle-width',
resolve: {
record: function () {
if (record === undefined) {
return {
aid: appId,
tags: '',
data: {},
}
} else {
record.aid = appId
return angular.copy(record)
}
},
},
})
.result.then(function (updated) {
if (record) {
_ins.update(record, updated[0])
} else {
_ins.add(updated[0])
}
})
}
_ins.batchTag = function (rows) {
$uibModal
.open({
templateUrl:
'/views/default/pl/fe/matter/enroll/component/batchTag.html?_=1',
controller: [
'$scope',
'$uibModalInstance',
function ($scope2, $mi) {
$scope2.appTags = angular.copy(_ins._oApp.tags)
$scope2.data = {
tags: [],
}
$scope2.ok = function () {
$mi.close({
tags: $scope2.data.tags,
appTags: $scope2.appTags,
})
}
$scope2.cancel = function () {
$mi.dismiss()
}
$scope2.$on(
'tag.xxt.combox.done',
function (event, aSelected) {
var aNewTags = []
for (var i in aSelected) {
var existing = false
for (var j in $scope2.data.tags) {
if (aSelected[i] === $scope2.data.tags[j]) {
existing = true
break
}
}
!existing && aNewTags.push(aSelected[i])
}
$scope2.data.tags = $scope2.data.tags.concat(aNewTags)
}
)
$scope2.$on('tag.xxt.combox.add', function (event, newTag) {
$scope2.data.tags.push(newTag)
$scope2.appTags.indexOf(newTag) === -1 &&
$scope2.appTags.push(newTag)
})
$scope2.$on(
'tag.xxt.combox.del',
function (event, removed) {
$scope2.data.tags.splice(
$scope2.data.tags.indexOf(removed),
1
)
}
)
},
],
backdrop: 'static',
})
.result.then(function (result) {
var record,
selectedRecords = [],
selectedeks = [],
posted = {}
for (var p in rows.selected) {
if (rows.selected[p] === true) {
record = _ins._aRecords[p]
selectedeks.push(record.enroll_key)
selectedRecords.push(record)
}
}
if (selectedeks.length) {
posted = {
eks: selectedeks,
tags: result.tags,
appTags: result.appTags,
}
http2
.post(
'/rest/pl/fe/matter/signin/record/batchTag?site=' +
siteId +
'&app=' +
appId,
posted
)
.then(function (rsp) {
var m, n, newTag
n = result.tags.length
selectedRecords.forEach(function (record) {
if (!record.tags || record.length === 0) {
record.tags = result.tags.join(',')
} else {
for (m = 0; m < n; m++) {
newTag = result.tags[m]
;(',' + record.tags + ',').indexOf(newTag) === -1 &&
(record.tags += ',' + newTag)
}
}
})
_ins._oApp.tags = result.appTags
})
}
})
}
_ins.remove = function (record) {
if (window.confirm('确认删除?')) {
http2
.get(
'/rest/pl/fe/matter/signin/record/remove?site=' +
siteId +
'&app=' +
appId +
'&key=' +
record.enroll_key
)
.then(function (rsp) {
var i = _ins._aRecords.indexOf(record)
_ins._aRecords.splice(i, 1)
_ins._oPage.total = _ins._oPage.total - 1
})
}
}
_ins.empty = function () {
var vcode
vcode = prompt('是否要删除所有登记信息?,若是,请输入活动名称。')
if (vcode === _ins._oApp.title) {
http2
.get(
'/rest/pl/fe/matter/signin/record/empty?site=' +
siteId +
'&app=' +
appId
)
.then(function (rsp) {
_ins._aRecords.splice(0, _ins._aRecords.length)
_ins._oPage.total = 0
_ins._oPage.at = 1
})
}
}
_ins.verifyAll = function () {
if (
window.confirm(
'确定审核通过所有记录(共' + _oPage.total + '条)?'
)
) {
http2
.get(
'/rest/pl/fe/matter/signin/record/verifyAll?site=' +
siteId +
'&app=' +
appId
)
.then(function (rsp) {
_ins._aRecords.forEach(function (record) {
record.verified = 'Y'
})
noticebox.success('完成操作')
})
}
}
_ins.batchVerify = function (rows) {
var url
url = '/rest/pl/fe/matter/signin/record/batchVerify'
url += '?site=' + siteId
url += '&app=' + appId
return _ins._bBatchVerify(rows, url)
}
_ins.notify = function (rows) {
var options = {
matterTypes: cstApp.notifyMatter,
sender: 'signin:' + appId,
}
_ins._oApp.mission && (options.missionId = _ins._oApp.mission.id)
pushnotify.open(
siteId,
function (notify) {
var url,
targetAndMsg = {}
if (notify.matters.length) {
if (rows) {
targetAndMsg.users = []
Object.keys(rows.selected).forEach(function (key) {
if (rows.selected[key] === true) {
var rec = _ins._aRecords[key]
targetAndMsg.users.push({
userid: rec.userid,
enroll_key: rec.enroll_key,
})
}
})
} else {
targetAndMsg.criteria = _oCriteria
}
targetAndMsg.message = notify.message
url = '/rest/pl/fe/matter/signin/notice/send'
url += '?site=' + siteId
url += '&app=' + appId
url += '&tmplmsg=' + notify.tmplmsg.id
url += _ins._oPage.joinParams()
http2.post(url, targetAndMsg).then(function (data) {
noticebox.success('发送成功')
})
}
},
options
)
}
_ins.export = function () {
var url,
params = {
criteria: _ins._oCriteria,
}
url = '/rest/pl/fe/matter/signin/record/export'
url += '?site=' + siteId + '&app=' + appId
window.open(url)
}
_ins.exportImage = function () {
var url,
params = {
criteria: _ins._oCriteria,
}
url = '/rest/pl/fe/matter/signin/record/exportImage'
url += '?site=' + siteId + '&app=' + appId
window.open(url)
}
_ins.chooseImage = function (imgFieldName) {
var defer = $q.defer()
if (imgFieldName !== null) {
var ele = document.createElement('input')
ele.setAttribute('type', 'file')
ele.addEventListener(
'change',
function (evt) {
var i, cnt, f, type
cnt = evt.target.files.length
for (i = 0; i < cnt; i++) {
f = evt.target.files[i]
type = {
'.jp': 'image/jpeg',
'.pn': 'image/png',
'.gi': 'image/gif',
}[f.name.match(/\.(\w){2}/g)[0] || '.jp']
f.type2 = f.type || type
var reader = new FileReader()
reader.onload = (function (theFile) {
return function (e) {
var img = {}
img.imgSrc = e.target.result.replace(
/^.+(,)/,
'data:' + theFile.type2 + ';base64,'
)
defer.resolve(img)
}
})(f)
reader.readAsDataURL(f)
}
},
false
)
ele.click()
}
return defer.promise
}
_ins.syncByEnroll = function (record) {
var _this = this,
defer = $q.defer(),
url
url = '/rest/pl/fe/matter/signin/record/matchEnroll'
url += '?site=' + siteId
url += '&app=' + appId
http2.post(url, record.data).then(function (rsp) {
var matched
if (rsp.data && rsp.data.length === 1) {
matched = rsp.data[0]
_ins._oApp._schemasFromEnrollApp.forEach(function (col) {
if (matched[col.id]) {
_this.convertRecord4Edit(col, matched)
}
})
angular.extend(record.data, matched)
} else {
alert('没有找到匹配的记录,请检查数据是否一致')
}
})
}
_ins.convertRecord4Edit = function (col, data) {
tmsSchema.forEdit(col, data)
return data
}
_ins.importByEnrollApp = function () {
var defer = $q.defer(),
url
url = '/rest/pl/fe/matter/signin/record/importByEnrollApp'
url += '?site=' + siteId + '&app=' + appId
http2.get(url).then(function (rsp) {
noticebox.info('更新了(' + rsp.data + ')条数据')
defer.resolve(rsp.data)
})
return defer.promise
}
_ins.absent = function (rid) {
var defer = $q.defer(),
url
url =
'/rest/pl/fe/matter/signin/record/absent?site=' +
siteId +
'&app=' +
appId
if (rid) url += '&rid=' + rid
http2.get(url).then(function (rsp) {
defer.resolve(rsp.data)
})
return defer.promise
}
_ins.editCause = function (user) {
var defer = $q.defer()
$uibModal.open({
templateUrl: 'editCause.html',
controller: [
'$scope',
'$uibModalInstance',
'http2',
function ($scope2, $mi, http2) {
$scope2.cause = ''
$scope2.cancel = function () {
$mi.dismiss()
}
$scope2.ok = function () {
var url,
params = {}
params[user.userid] = $scope2.cause
url =
'/rest/pl/fe/matter/signin/update?site=' +
siteId +
'&app=' +
appId
http2
.post(url, { absent_cause: params })
.then(function (rsp) {
$mi.close()
defer.resolve($scope2.cause)
})
}
},
],
backdrop: 'static',
})
return defer.promise
}
return _ins
},
]
})
.provider('srvSigninNotice', function () {
this.$get = [
'$q',
'http2',
function ($q, http2) {
return {
detail: function (batch) {
var defer = $q.defer(),
url
url = '/rest/pl/fe/matter/signin/notice/logList?batch=' + batch.id
http2.get(url).then(function (rsp) {
defer.resolve(rsp.data)
})
return defer.promise
},
}
},
]
})
.controller('ctrlSigninEdit', [
'$scope',
'$uibModalInstance',
'record',
'srvSigninApp',
'srvSigninRecord',
function ($scope, $mi, record, srvSigninApp, srvSigninRecord) {
srvSigninApp.get().then(function (app) {
if (record.data) {
app.dataSchemas.forEach(function (col) {
if (record.data[col.id]) {
srvSigninRecord.convertRecord4Edit(col, record.data)
}
})
app._schemasFromEnrollApp.forEach(function (col) {
if (record.data[col.id]) {
srvSigninRecord.convertRecord4Edit(col, record.data)
}
})
}
$scope.app = app
$scope.enrollDataSchemas = app._schemasFromEnrollApp
$scope.record = record
$scope.record.aTags =
!record.tags || record.tags.length === 0
? []
: record.tags.split(',')
$scope.aTags = app.tags
})
$scope.ok = function () {
var record = $scope.record,
p = {}
p.data = record.data
p.verified = record.verified
p.tags = record.tags = record.aTags.join(',')
p.comment = record.comment
p.signin_log = record.signin_log
$mi.close([p, $scope.aTags])
}
$scope.cancel = function () {
$mi.dismiss()
}
$scope.chooseImage = function (fieldName) {
var data = $scope.record.data
srvSigninRecord.chooseImage(fieldName).then(function (img) {
!data[fieldName] && (data[fieldName] = [])
data[fieldName].push(img)
})
}
$scope.removeImage = function (imgField, index) {
imgField.splice(index, 1)
}
$scope.$on('tag.xxt.combox.done', function (event, aSelected) {
var aNewTags = []
for (var i in aSelected) {
var existing = false
for (var j in $scope.record.aTags) {
if (aSelected[i] === $scope.record.aTags[j]) {
existing = true
break
}
}
!existing && aNewTags.push(aSelected[i])
}
$scope.record.aTags = $scope.record.aTags.concat(aNewTags)
})
$scope.$on('tag.xxt.combox.add', function (event, newTag) {
if (-1 === $scope.record.aTags.indexOf(newTag)) {
$scope.record.aTags.push(newTag)
if (-1 === $scope.aTags.indexOf(newTag)) {
$scope.aTags.push(newTag)
}
}
})
$scope.$on('tag.xxt.combox.del', function (event, removed) {
$scope.record.aTags.splice($scope.record.aTags.indexOf(removed), 1)
})
$scope.$on('xxt.tms-datepicker.change', function (event, data) {
if (data.state === 'signinAt') {
!record.signin_log && (record.signin_log = {})
record.signin_log[data.obj.rid] = data.value
}
})
$scope.syncByEnroll = function () {
srvSigninRecord.syncByEnroll($scope.record)
}
},
])
.controller('ctrlSigninFilter', [
'$scope',
'$uibModalInstance',
'dataSchemas',
'criteria',
function ($scope, $mi, dataSchemas, lastCriteria) {
var canFilteredSchemas = []
dataSchemas.forEach(function (schema) {
if (false === /image|file/.test(schema.type)) {
canFilteredSchemas.push(schema)
}
if (/multiple/.test(schema.type)) {
var options = {}
if (lastCriteria.data[schema.id]) {
lastCriteria.data[schema.id].split(',').forEach(function (key) {
options[key] = true
})
}
lastCriteria.data[schema.id] = options
}
$scope.schemas = canFilteredSchemas
$scope.criteria = lastCriteria
})
$scope.clean = function () {
var criteria = $scope.criteria
if (criteria.record) {
if (criteria.record.verified) {
criteria.record.verified = ''
}
}
if (criteria.data) {
angular.forEach(criteria.data, function (val, key) {
criteria.data[key] = ''
})
}
}
$scope.ok = function () {
var criteria = $scope.criteria,
optionCriteria
// 将单选题/多选题的结果拼成字符串
canFilteredSchemas.forEach(function (schema) {
var result
if (/multiple/.test(schema.type)) {
if ((optionCriteria = criteria.data[schema.id])) {
result = []
Object.keys(optionCriteria).forEach(function (key) {
optionCriteria[key] && result.push(key)
})
criteria.data[schema.id] = result.join(',')
}
}
})
$mi.close(criteria)
}
$scope.cancel = function () {
$mi.dismiss('cancel')
}
},
])
})
|
var App;
window.dhtmlHistory.create({
toJSON: function(o) {
return JSON.stringify(o);
}
, fromJSON: function(s) {
return JSON.parse(s);
}
});
(function(window){
"use strict";
var Bioteksa = function(){
var t = this;
this.initialize(function(r){
t.setupApp(r);
});
}
Bioteksa.prototype.initialize = function(callback) {
new Vi({url:'config.json', response: 'object'}).server(function(r){
if(typeof callback === 'function'){
callback(r);
}
});
};
Bioteksa.prototype.setupApp = function(r) {
var modules = r.modules;
var lang = this.browserLanguage();
var j = {modules: {}, name: 'Bioteksa', div: '#main', currentLang: lang};
for(var m in modules){
if(modules.hasOwnProperty(m)){
j.modules[m] = {nombre: m, url:r.modules_path};
}
}
App = new AppSystem(j);
App._original = {div: App.div};
this.a = App;
this.a._data = r;
var t = this;
dhtmlHistory.initialize();
dhtmlHistory.addListener(t.handleHistory);
this.buildMenu();
this.a.init(function(){
t.backgroundGenerator();
t.loadSystem();
var alogo = document.getElementById('a-logo');
if(alogo !== null){
alogo.addEventListener('click', function(){
t.loadCategory('inicio');
}, false);
}
});
};
Bioteksa.prototype.loadSystem = function() {
var initialModule = dhtmlHistory.getCurrentLocation();
if(initialModule.length <= 1){
initialModule = 'inicio';
}
this.loadCategory(initialModule);
};
Bioteksa.prototype.loadCategory = function(location) {
var url = this.handleURL(location);
dhtmlHistory.add(location, {message: "Module " +url[0]});
this.activeMenuCategory(url[0]);
switch(url[0]){
case 'home','nosotros':
this.cleanMenuCategory();
this.automaticTransition();
break;
default:
this.disableAutomaticTransition();
break;
}
var banned = {inicio: '', nosotros:''};
this.a.getModule(url[0]);
this.a.current._url = url;
if(!banned.hasOwnProperty(url[0])){
this.containerHandler(url[0]);
}else{
this.a.div = this.a._original.div;
var parent = document.querySelector(this.a._original.div);
var t = this;
$(parent).fadeOut('fast', function(){
t.a.current.start(function(){
$(parent).fadeIn('fast');
});
});
}
};
Bioteksa.prototype.automaticTransition = function(time) {
if(typeof this.automatic !== 'undefined'){
this.disableAutomaticTransition();
}
time = (typeof time !== 'number') ? 10000 : time;
var t = this;
this.automatic = setInterval(function(){
t.getNextImage();
}, time);
};
Bioteksa.prototype.disableAutomaticTransition = function() {
clearInterval(this.automatic);
};
Bioteksa.prototype.containerHandler = function(category) {
var parent = document.querySelector(this.a._original.div);
var t = this;
$(parent).fadeOut('fast', function(){
var container = t.createContainer(parent, category);
t.a.div = '#'+container.id;
t.a.current.start(function(){
$(parent).fadeIn('fast');
});
});
};
Bioteksa.prototype.createContainer = function(parent, category) {
parent.innerHTML = '';
var container = document.createElement('div');
container.id = 'bio-container';
parent.appendChild(container);
var menuHolder = document.createElement('div');
menuHolder.id = 'menuHolder';
//menuHolder.className = 'navbar navbar-default';
container.appendChild(menuHolder);
var menu = this.subMenuCreator(category);
menuHolder.appendChild(menu);
//console.log("miau2");
var contentHolder = document.createElement('div');
contentHolder.id = 'contentHolder';
container.appendChild(contentHolder);
return contentHolder;
};
Bioteksa.prototype.subMenuCreator = function(module) {
var mod = this.a._data.modules[module];
var ul = document.createElement('ul');
ul.id = 'sub-menu';
ul.className = 'nav nav-justified';
for(var sub in mod){
if(mod.hasOwnProperty(sub)){
var li = document.createElement('li');
var a = document.createElement('a');
var tag = sub;
a.setAttribute('data-ltag', tag);
li.appendChild(a);
ul.appendChild(li);
}
}
return ul;
};
Bioteksa.prototype.handleURL = function(url) {
url = url.match(/([^/]+)/gi);
return url;
};
Bioteksa.prototype.handleHistory = function(newLocation, historyData) {
if(typeof bio.a.current === 'object'){
bio.loadCategory(newLocation);
}
};
Bioteksa.prototype.backgroundGenerator = function() {
var imgs = this.a._data.images;
this.a._data.imgs = {};
this.background = document.getElementById('background');
for(var i in imgs){
if(imgs.hasOwnProperty(i)){
var el = document.createElement('div');
this.a._data.imgs[i] = {dom: el, img: imgs[i]};
el.className = 'background-img';
$(el).css('background-image', 'url('+imgs[i].src+')');
this.background.appendChild(el);
}
}
this.images = this.a._data.imgs;
};
Bioteksa.prototype.buildMenu = function() {
this.menu = document.querySelectorAll('ul.main-menu');
for(var k = 0, len2 = this.menu.length; k < len2; k++){
var menu = this.menu[k];
menu.innerHTML = '';
var modules = Object.keys(this.a._data.modules);
var banned = {};
if(menu.id === 'side-menu'){
var menuWidth = $(menu).outerWidth();
var aWidth = menuWidth - 40 - 6; // El 50 corresponde al icono
}
for(var i = 0, len = modules.length; i < len; i++){
var m = modules[i];
if(banned.hasOwnProperty(m) === false){
var li = this.buildMenuCategory(m, menu);
var a = li.getElementsByTagName('a')[0];
if(menu.id === 'side-menu'){
$(a).css('width', aWidth+'px');
}
menu.appendChild(li);
}
}
}
};
Bioteksa.prototype.buildMenuCategory = function(module, menu) {
var helperPull = '';
if(menu.id === 'side-menu'){
helperPull = 'pull-left';
}
var li = document.createElement('li');
li.setAttribute('data-module', module);
var iconHolder = document.createElement('div');
iconHolder.className = helperPull+' hidden-xs';
var icon = document.createElement('div');
icon.className = 'menu-icon';
icon.id = 'ico-'+module;
iconHolder.appendChild(icon);
li.appendChild(iconHolder);
var a = document.createElement('a');
a.setAttribute('data-module', module);
a.className = helperPull;
var textHolder = document.createElement('span');
textHolder.setAttribute('data-ltag', module);
a.appendChild(textHolder);
li.appendChild(a);
var clear = document.createElement('div');
clear.className = 'clearfix';
li.appendChild(clear);
a.t = this;
a.addEventListener('click', function(){
var category = this.getAttribute('data-module');
this.t.loadCategory(category);
}, false);
return li;
};
Bioteksa.prototype.cleanMenuCategory = function() {
var lis = document.querySelectorAll('.main-menu>li');
for(var i = 0, len = lis.length; i < len; i++){
var li = lis[i];
li.className = '';
}
};
Bioteksa.prototype.activeMenuCategory = function(category) {
var elms = document.querySelectorAll('li[data-module="'+category+'"]');
this.cleanMenuCategory();
for(var i = 0, len = elms.length; i < len; i++){
var el = elms[i];
el.className = 'active';
}
};
Bioteksa.prototype.browserLanguage = function() {
var lang = navigator.language || navigator.userLanguage;
lang = lang.match(/([a-z]+)/gi);
if(lang !== null){
lang = lang[0];
}
var l = '';
switch(lang){
case 'en':
case 'de':
case 'es':
l = lang;
break;
default:
l = 'en';
break;
}
return l;
};
var bio = new Bioteksa();
window.bio = bio;
})(window); |
// membuat object angkot
function Angkot(supir, trayek, penumpang, kas) {
this.supir = supir;
this.trayek = trayek;
this.penumpang = penumpang;
this.kas = kas;
this.penumpangNaik = namaPenumpang => {
this.penumpang.push(namaPenumpang);
return this.penumpang;
}
this.penumpangTurun = (namaPenumpang, bayar) => {
if (this.penumpang.length == 0) {
alert('angkot masih kosong');
return false;
}
for (let i = 0; i < this.penumpang.length; i++) {
if (this.penumpang[i] == namaPenumpang) {
this.penumpang[i] == undefined;
this.kas += bayar
return penumpang;
}
}
}
}
var angkot1 = new Angkot('juang', ['madang', 'citeureup'], [], 0);
var angkot2 = new Angkot('david luise', ['cibinong', 'sentul'], [], 0); |
var searchData=
[
['reset_5fqueue',['reset_queue',['../queue_8h.html#a102cb1b6c86c407b2abd802ba0f8a323',1,'queue.c']]]
];
|
/**
* Created by christy on 2018/9/28.
*/
module.exports = app => {
const DataTypes = app.Sequelize;
const Model = app.model.define('teacher', {
id: {
type: DataTypes.INTEGER(11).UNSIGNED.ZEROFILL,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
name: {
type: DataTypes.STRING(50),
allowNull: true
},
}, {
tableName: 'teacher'
});
Model.associate = function() {
// Model.belongsTo(app.model.User, { as: 'operator' });
// Model.belongsTo(app.model.Area, { as:'parent_area' });
}
return Model;
};
|
import { EncryptionManager } from '../encryption-manager';
export class FileManager {
constructor(storage) {
this.storage = storage;
}
getKeyName(username, password) {
const encryptionString = EncryptionManager.getEncryptionString();
return EncryptionManager.encryptString(`${encryptionString}:${username}:${password}`);
}
savePrivateKey(privateKey) {
this.storage.setItem('privateKey', privateKey);
}
saveItem(itemName, item) {
this.storage.setItem(itemName, item);
}
getItem(itemName) {
return this.storage.getItem(itemName) || null;
}
getPrivateKey() {
return this.storage.getItem('privateKey') || null;
}
// fetch DB file on localStorage given username
getDatabaseFile(username, password) {
return this.storage.getItem(this.getKeyName(username, password)) || null;
}
// removes DB file on localStorage
removeDatabaseFile(username, password) {
const keyName = this.getKeyName(username, password);
if (this.storage.getItem(keyName) !== null) {
this.storage.removeItem(keyName);
}
}
// stores DB file on localStorage given username
storeDatabaseFile(username, password, dbFile) {
this.storage.setItem(this.getKeyName(username, password), dbFile);
}
}
|
/**
* @author Vadim Semenov <i@sedictor.ru>
* @date 10/12/12
* @time 1:24 PM
* @description LogLog algorithm implementation
* @url http://algo.inria.fr/flajolet/Publications/DuFl03-LNCS.pdf
* @license MIT, see LICENSE-MIT.md
*/
function generateWords(count) {
var result = [];
while (count > 0) {
var word = '';
for (var j = 0; j < (parseInt(Math.random() * (8 - 1)) + 1); j++) { // from 1char to 8chars
word += String.fromCharCode(parseInt(Math.random() * (122 - 97)) + 97); // a-z
}
for (var i = 0; i < Math.random() * 100; i++) {
result.push(word);
count--;
}
}
return result;
}
function cardinality(arr) {
var t = {}, r = 0;
for (var i = 0, l = arr.length; i < l; i++) {
if (!t.hasOwnProperty(arr[i])) {
t[arr[i]] = 1;
r++;
}
}
return r;
}
function LogLog(arr) {
var HASH_LENGTH = 32, // bites
HASH_K = 5; // HASH_LENGTH = 2 ^ HASH_K
/**
* Jenkins hash function
*
* @url http://en.wikipedia.org/wiki/Jenkins_hash_function
*
* @param {String} str
* @return {Number} Hash
*/
function hash(str) {
var hash = 0;
for (var i = 0, l = str.length; i < l; i++) {
hash += str.charCodeAt(i);
hash += hash << 10;
hash ^= hash >> 6;
}
hash += hash << 3;
hash ^= hash >> 6;
hash += hash << 16;
return hash;
}
/**
* Offset of first 1-bit
*
* @example 00010 => 4
*
* @param {Number} bites
* @return {Number}
*/
function scan1(bites) {
if (bites == 0) {
return HASH_LENGTH - HASH_K;
}
var offset = parseInt(Math.log(bites) / Math.log(2));
offset = HASH_LENGTH - HASH_K - offset;
return offset;
}
/**
* @param {String} $bites
* @param {Number} $start >=1
* @param {Number} $end <= HASH_LENGTH
*
* @return {Number} slice of $bites
*/
function getBites(bites, start, end) {
var r = bites >> (HASH_LENGTH - end);
r = r & (Math.pow(2, end - start + 1) - 1);
return r;
}
var M = [];
for (i = 0, l = arr.length; i < l; i++) {
var h = hash(arr[i]),
j = getBites(h, 1, HASH_K) + 1,
k = getBites(h, HASH_K + 1, HASH_LENGTH);
k = scan1(k);
if (typeof M[j] == 'undefined' || M[j] < k) {
M[j] = k;
}
}
var alpha = 0.77308249784697296; // (Gamma(-1/32) * (2^(-1/32) - 1) / ln2)^(-32)
var E = 0;
for (var i = 1; i <= HASH_LENGTH; i++) {
if (typeof M[i] != 'undefined') {
E += M[i];
}
}
E /= HASH_LENGTH;
E = alpha * HASH_LENGTH * Math.pow(2, E);
return parseInt(E);
}
var words = generateWords(1000000);
console.log("Number of words");
console.log(words.length);
console.log("------\nPrecision")
var s = (new Date()).getTime();
console.log(cardinality(words));
console.log('time:', (new Date()).getTime() - s + 'ms');
console.log("------\nLogLog")
var s = (new Date()).getTime();
console.log(LogLog(words));
console.log('time:', (new Date()).getTime() - s + 'ms');
|
var vt = vt = vt || {};
vt.LogicClass_500275 = cc.Class.extend({
m_view: null,
ctor: function () {},
setTableView: function (view) {
this.m_view = view;
},
refreshTableView: function () {
//this.m_view.reloadData();
},
setVar: function (key, value) {
this[key] = value;
},
run: function (context, targetObject) {
var _this = this;
var localVar={}; //add by wang_dd
var logicName = "";
(function () {
var httpHead = window.G_dizhi;
var httpParse = (function () {
var arr = [];
var eleValue = "aid";
arr.push(eleValue);
var eleValue = "3";
arr.push(eleValue);
var eleValue = "mid";
arr.push(eleValue);
var eleValue = "1";
arr.push(eleValue);
var eleValue = "userId";
arr.push(eleValue);
var eleValue = window.G_shuizuid;
arr.push(eleValue);
return arr;
})()
;
var http = httpHead + "?";
for(var i = 0;i < httpParse.length;i ++){
http += httpParse[i];
if(i < httpParse.length - 1 && ((i - 1) % 2) === 0){
http += "&";
}
if((i % 2) === 0){
http += "=";
}
}
var xhr = cc.loader.getXMLHttpRequest();
xhr.open("GET", http, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status <= 207)) {
var httpStatus = xhr.responseText;
var httpRequestData = JSON.parse(httpStatus);
var funData = (function () {
var data;
if(httpRequestData) {
data = httpRequestData;
}
return data;
})()
if(200000===LogicParObj.var_member) {
if(typeof(context.window.G_yuku) != "undefined") {
context.window.G_yuku = funData;
}
}
else if (200000===LogicParObj.var_global) {
var gettype=Object.prototype.toString;
var isString=false,
isUserVar=false;
var varValue;
if(typeof (funData)==='undefined') {
varValue=funData;
window.G_yuku = varValue;
isUserVar=true;
}
if(!isUserVar) {
var temp=funData;
if(gettype.call(temp)==='[object String]'){
window.G_yuku = temp;
isString=true;
}
if(!isString) {
if(typeof temp ==='undefined') {
window.G_yuku = temp;
}
}
if (!isString) {
if(!(gettype.call(temp)=='[object Null]')) {
window.G_yuku = temp;
}
}
}
}
else {
window.G_yuku = funData;
}if(100000===LogicParObj.id) {
NotifyCenter.getInstance().publish("水族接口");
}
else {
NotifyCenter.getInstance().unsubscribeByToptic("水族接口");
}context.a = -1;(function () {
for (var i = 0; i < 4; i++) {
var funData = (function(){
var value;
var arg0=Number(context.a);
var arg2=Number(1);
if('+'==='+') {
value = arg0 + arg2;
}
else if('+'==='-') {
value=arg0 - arg2;
}
else if ('+'==='/') {
value=arg0 / arg2;
}
else {
value=arg0 * arg2;
}
return value;
})()
if(100000===LogicParObj.var_member) {
if(typeof(context.a) != "undefined") {
context.a = funData;
}
}
else if (100000===LogicParObj.var_global) {
var gettype=Object.prototype.toString;
var isString=false,
isUserVar=false;
var varValue;
if(typeof (funData)==='undefined') {
varValue=funData;
a = varValue;
isUserVar=true;
}
if(!isUserVar) {
var temp=funData;
if(gettype.call(temp)==='[object String]'){
a = temp;
isString=true;
}
if(!isString) {
if(typeof temp ==='undefined') {
a = temp;
}
}
if (!isString) {
if(!(gettype.call(temp)=='[object Null]')) {
a = temp;
}
}
}
}
else {
a = funData;
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 15
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400073", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400073;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 16
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400074", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400074;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 27
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400085", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400085;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 28
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400086", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400086;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 29
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400087", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400087;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 30
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400088", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400088;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 31
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400089", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400089;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 32
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400090", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400090;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 33
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400091", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400091;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 34
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400092", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400092;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 17
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400075", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400075;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 18
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400076", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400076;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 19
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400077", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400077;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 20
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400078", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400078;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 21
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400079", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400079;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 24
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400082", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400082;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 25
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400083", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400083;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 26
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400084", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400084;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 41
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400099", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400099;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 42
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400100", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400100;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 43
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400104", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400104;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 44
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400101", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400101;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 45
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400102", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400102;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 46
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400103", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400103;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 47
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400105", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400105;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 48
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400106", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400106;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 49
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400107", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400107;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 22
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400080", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400080;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 23
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400081", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400081;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 35
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400093", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400093;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 36
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400094", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400094;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 37
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400095", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400095;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 38
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400097", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400097;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 39
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400096", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400096;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 40
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400098", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400098;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 1
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400059", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400059;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 2
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400060", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400060;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 3
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400061", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400061;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 4
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400062", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400062;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 5
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400063", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400063;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 6
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400064", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400064;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 7
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400065", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400065;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 8
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400066", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400066;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 9
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400067", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400067;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 10
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400068", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400068;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 11
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400069", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400069;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 12
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400070", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400070;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 13
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400071", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400071;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}if((function(){
var list = (function(){
var separator = ',';
var str = (function(){
//add by wang_dd
var memberVar = "fishes";
var tempVar = memberVar.substr(8,memberVar.length-8);
if(targetObject && targetObject[tempVar] != undefined) {
return targetObject[tempVar];
}
else {
var data = "";
var datas = window.G_yuku[context.a]
;
var parse = "fishes";
data = datas[parse];
return data;
}
})();
var result = str.split(separator);
return result;
})()
var tmp = 14
var len = list.length;
for(var i = 0; i<list.length;++i){
if(tmp == list[i]) {
return true;
}
}
return false;
}())){
function AddWrapper(wraArray,wrapperArray,parent) {
if( typeof(wraArray)=="undefined") {
if(wrapperArray && wrapperArray.length!=0) {
for (var i = 0; i < wrapperArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
parent.addChild(childWrapper);
newCloneWrapper(childWrapper,wrapperArray[i]);
if(wrapperArray[i].children && wrapperArray[i].children.length!=0) {
arguments.callee.call(childWrapper,wrapperArray[i].children,childWrapper);
}
}
}
}
else if( typeof(wraArray)=="object"){
for (var i = 0; i < wraArray.length; i++) {
var childWrapper = new vt.ObjectWrapper();
wrapperArray.addChild(childWrapper);
newCloneWrapper(childWrapper,wraArray[i]);
if(wraArray[i].children && wraArray[i].children.length!=0) {
arguments.callee.call( childWrapper,wraArray[i].children,childWrapper);
}
}
}
};
function newCloneWrapper(childWrapper,data) {
childWrapper.ParseComponents(data);
childWrapper.setName(data.wraperName);
var m_pTransform=data.components.Transform;
var m_pPositoins=m_pTransform[0].propertys.transform.Position;
childWrapper.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
var _physicsBox=childWrapper.getChildByName("PhysicsBox");
if(_physicsBox) {
_physicsBox.setPosition(cc.p(m_pPositoins.x,m_pPositoins.y));
}
};
vt.resourceCache.getPropertyForKey("400072", function (data) {
var parent = vt.sceneManager.getCurrentScene();
var wrapper = new vt.ObjectWrapper();
var pos=data.components.Transform[0].propertys.transform.Position;
var wraArray;
parent.addChild(wrapper);
wrapper.ParseComponents(data);
wrapper.setName(data.wraperName);
wrapper.setPosition(cc.p(parseInt(pos.x),parseInt(pos.y)));
wrapper.ID=400072;
var _physicsBox=wrapper.getChildByName("PhysicsBox");
var m_Position=wrapper.getPosition();
if(_physicsBox && m_Position) {
_physicsBox.setPosition(m_Position);
}
var wrapperArray=data.children;
if(wrapperArray && wrapperArray.length!=0) {
AddWrapper(wraArray,wrapperArray,wrapper);
}
});
}
}
})();
}
};
xhr.send();
})();
}
});
|
import React, { Component, Fragment } from 'react'
import { connect } from 'react-redux'
import productActions from '../redux/actions/product.actions'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCartPlus } from '@fortawesome/free-solid-svg-icons';
import image from '../styles/images/h.jpg'
import '../styles/css/productCard.css'
import Spinner from './common/spinner';
import { addToCartAction } from '../redux/actions/addToCart';
class ProductPage extends Component {
constructor(props) {
super(props);
this.state = {
currentPage: 1,
productsPerPage: 12
}
this.props.productActions()
}
handleClick = event => {
this.setState({
currentPage: Number(event.target.id),
});
};
addToCart = (product_id) => {
let cartID = localStorage.getItem('cartID')
if (cartID === undefined || cartID === null) {
cartID = Math.floor(Math.random() * 1000) + 1000;
localStorage.setItem('cartID', cartID)
}
this.props.addToCartAction(product_id)
console.log(product_id, parseInt(cartID))
}
mapProducts(products) {
const elements = products;
const { currentPage, productsPerPage } = this.state;
const indexOfLastProduct = currentPage * productsPerPage;
const indexOfFirstProduct = indexOfLastProduct - productsPerPage;
const currentProduct = elements.slice(
indexOfFirstProduct,
indexOfLastProduct,
);
const productElements = currentProduct.map(item => (
<div className='card' key={item.id}>
<img className='product-image' src={image} alt={item.name} />
<div className='product-details'>
<p>{item.name}</p>
<span className='product-description'>{item.description.substring(0, 100)}...</span>
<p className='action'><span className='price-strike'>{item.price * 2}</span><span className='current-price'>${item.price}</span><span>
<button className='cart-btn' type='button' onClick={() => this.addToCart(item.id)}><FontAwesomeIcon icon={faCartPlus} /></button></span></p>
</div>
</div>
))
return productElements;
}
render() {
const { products } = this.props.products;
if (products !== undefined) {
const pageNumbers = [];
for (
let i = 1;
i <= Math.ceil(products.length / this.state.productsPerPage);
i += 1
) {
pageNumbers.push(i);
}
const renderPageNumbers = pageNumbers.map(number => {
return (
<a
key={number}
id={number}
href="javascript:;"
onClick={this.handleClick}
>
{number}
</a>
);
});
return (
<Fragment>
<div className='cardholder'>
{this.mapProducts(products)}
</div>
<div className="paginate-section">
<div className="center">
<div className="pagination">{renderPageNumbers}</div>
</div>
</div>
</Fragment>
);
}
return (
<div>
<Spinner />
</div>
)
}
} const mapStateToProps = state => ({
products: state.products
})
export default connect(
mapStateToProps,
{ productActions, addToCartAction }
)(ProductPage);
|
import Mock from 'mockjs';
Mock.mock(
'/api/login/account',{
'code': 1,
'data':{
'username':'zisu',
'authority':[{
'icon': null,
'id': 126,
'key': "test",
'name': "客户管理",
'path': null,
'type': "MENU",
}]
},
}
); |
'use strict';
var githubHelper = require('../helpers/GithubHelper');
var config = require('config-node')();
module.exports = {
get: function(req, res) {
var github = githubHelper.init();
var data = {
user: config.github.user
}
github.user.get(data, function(err, response) {
res.render('profile_basic', response);
});
}
}; |
'use strict';
var CONFIG = arguments[0] || {};
function navigateProfile() {
var navigate = CONFIG.navigation.navigate;
navigate('Profile');
}
exports.navigationOptions = {
window: {
title: 'Main'
},
navBar: {
title: 'Main'
}
};
|
import React from "react";
import CameraImg from "../Imgs/CameraImg";
import CompassImg from "../Imgs/CompassImg";
import HeartImg from "../Imgs/HeartImg";
import SearchImg from "../Imgs/SearchImg";
import UserImg from "../Imgs/UserImg";
import LogoImg from "../Imgs/LogoImg";
import {WrapperDiv, InputStyles, ContainerDiv} from "../Styles";
import PropTypes from "prop-types";
const SearchBar = props => {
return (
<WrapperDiv searchBar>
<ContainerDiv logo className="logo">
<CameraImg />
<LogoImg />
</ContainerDiv>
<ContainerDiv search>
<SearchImg />
<InputStyles
type="text"
name="search"
value={props.input}
onChange={props.handleSearch}
placeholder="Search"
/>
</ContainerDiv>
<ContainerDiv icons>
<CompassImg />
<HeartImg />
<UserImg />
</ContainerDiv>
</WrapperDiv>
);
};
SearchBar.propTypes = {
value: PropTypes.string
};
export default SearchBar; |
/**
* Created by vedi on 25/12/2016.
*/
import ajv from 'ajv';
export default { svk: ajv };
|
import * as actions from '../constants'
const initialState = {
categories: [],
}
export default function faq(state = initialState, { type, categories = {} }) {
switch (type) {
case actions.load:
return {
categories: Object.keys(categories).map(id => categories[id]),
}
case actions.clear:
return initialState
default:
return state
}
}
|
// Creacion del dialogo
$("#capaFrmAltaCliente").dialog({
title: "Alta cliente",
autoOpen: true, // Es el valor por defecto
modal:true,
close: function () {
$("#formAltaCliente")[0].reset();
},
closeOnEscape: false, // No se cierra con ESCAPE
hide: {
effect: "blind",
duration: 1000
},
show: "blind",
buttons: [{
text: "Aceptar",
click: procesoAltaCliente
}, {
text: "Cancelar",
click: function() {
$(this).dialog("close");
}
}]
});
function procesoAltaCliente(){
// Validacion del formulario
if (validarAltaCliente()){
//Creo un objeto
var oCli = new Cliente(formAltaCliente.txtDNI.value,formAltaCliente.txtNombre.value,formAltaCliente.txtTelefono.value, formAltaCliente.txtEmail.value, formAltaCliente.txtDireccion.value );
// Formateo de parametro POST
var sParametroPOST = "datos=" + JSON.stringify(oCli);
// Codifico para envio
sParametroPOST = encodeURI(sParametroPOST);
// Script de envio
var sURL = encodeURI("php/altaCliente.php");
llamadaAjaxAltaCliente(sURL,sParametroPOST);
}
}
/* LLAMADAS AJAX */
function llamadaAjaxAltaCliente(sURL,sParametroPOST){
oAjaxAltaCliente = objetoXHR();
oAjaxAltaCliente.open("POST",sURL,true);
// Para peticiones con metodo POST
oAjaxAltaCliente.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
oAjaxAltaCliente.onreadystatechange = respuestaAltaCliente;
oAjaxAltaCliente.send(sParametroPOST);
}
function respuestaAltaCliente(){
if(oAjaxAltaCliente.readyState == 4 && oAjaxAltaCliente.status ==200) {
var oArrayRespuesta = JSON.parse(oAjaxAltaCliente.responseText);
$("#capaMensajes").dialog("open");
if (oArrayRespuesta[0] == true){
$("#capaMensajes").dialog("option","title","Error");
$("#mensaje").text(oArrayRespuesta[1]);
} else {
$("#capaMensajes").dialog("option","title","OK");
$("#mensaje").text(oArrayRespuesta[1]);
$("#capaFrmAltaCliente").dialog('close');
}
}
}
function validarAltaCliente() {
var bValido = true;
//dni
var sDni = formAltaCliente.txtDNI.value.trim();
formAltaCliente.txtDNI.value = formAltaCliente.txtDNI.value.trim();
var oExpReg =/^\d{8}[a-zA-Z]{1}$/;
var oExpReg2 = /^[a-zA-Z]{1}[0-9]{7}[0-9a-zA-Z]{1}$/;
if (oExpReg.test(sDni) == false && oExpReg2.test(sDni) == false){
if(bValido == true){
bValido = false;
//Este campo obtiene el foco
formAltaCliente.txtDNI.focus();
}
//Marcar error
formAltaCliente.txtDNI.classList.add("error");
}
else {
//Desmarcar error
formAltaCliente.txtDNI.classList.remove("error");
}
//Nombre
var sNombre = formAltaCliente.txtNombre.value.trim();
formAltaCliente.txtNombre.value = formAltaCliente.txtNombre.value.trim();
var oExpReg =/^[a-zA-Z]+\s*/;
if (oExpReg.test(sNombre) == false){
if(bValido == true){
bValido = false;
//Este campo obtiene el foco
formAltaCliente.txtNombre.focus();
}
//Marcar error
formAltaCliente.txtNombre.classList.add("error");
}
else {
//Desmarcar error
formAltaCliente.txtNombre.classList.remove("error");
}
//Direccion
var sDireccion = formAltaCliente.txtDireccion.value.trim();
formAltaCliente.txtDireccion.value = formAltaCliente.txtDireccion.value.trim();
if (oExpReg.test(sDireccion) == false){
if(bValido == true){
bValido = false;
//Este campo obtiene el foco
formAltaCliente.txtNombre.focus();
}
//Marcar error
formAltaCliente.txtDireccion.classList.add("error");
}
else {
//Desmarcar error
formAltaCliente.txtDireccion.classList.remove("error");
}
//telefono
var sTelefono = formAltaCliente.txtTelefono.value.trim();
formAltaCliente.txtTelefono.value = formAltaCliente.txtTelefono.value.trim();
var oExpReg =/^\d{9}$/;
if (oExpReg.test(sTelefono) == false){
if(bValido == true){
bValido = false;
//Este campo obtiene el foco
formAltaCliente.txtTelefono.focus();
}
//Marcar error
formAltaCliente.txtTelefono.classList.add("error");
}
else {
//Desmarcar error
formAltaCliente.txtTelefono.classList.remove("error");
}
//emails
var sEmail = formAltaCliente.txtEmail.value.trim();
formAltaCliente.txtEmail.value = formAltaCliente.txtEmail.value.trim();
var oExpReg =/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/;
if (oExpReg.test(sEmail) == false){
if(bValido == true){
bValido = false;
//Este campo obtiene el foco
formAltaCliente.txtEmail.focus();
}
//Marcar error
formAltaCliente.txtEmail.classList.add("error");
}
else {
//Desmarcar error
formAltaCliente.txtEmail.classList.remove("error");
}
return bValido;
} |
exports.dois = (id, A187, tampilTanggal, whatsapp, youtube, tampilWaktu, instagram, nomer, aktif) => {
return `
❉──────────❉
*${A187}*
❉──────────❉
📆 *${tampilTanggal}*
📌STATUS BOT MK: *${aktif}*
━━━━━━━━━━━━━━━━━━━━━
╔══════════════╗
✯ MK MODS ✯
╚══════════════╝
━━━━━━━━━━━━━━━━━━━━━
*Aqui é o @bot* 🤳⚡
Não manda áudio, não baixa video,não baixa fotos e nem status...
Assista:https://youtu.be/3HZCrI4fEd4
Para chamar o Menu digite: *.Bot*
╠════════════════════
║ MAIKON
╚════════════════════`
}
|
import HomeSection from './sections/Home/index/Home';
import PositionSection from './sections/Position/index/Position';
import BlogSection from './sections/Blog/index/Blog';
import PostcardSection from './sections/Postcard/index/Postcard';
import PodcastsSection from './sections/Podcasts/index/Podcasts';
import BooksSection from './sections/Books/index/Books';
import BoardSection from './sections/Board/index/Board';
import WeatherSection from './sections/Weather/index/Weather';
import PostsSection from './sections/Posts/index/Posts';
import NoMatchSection from './sections/NoMatch/index/NoMatch';
export const Home = HomeSection;
export const Position = PositionSection;
export const Blog = BlogSection;
export const Postcard = PostcardSection;
export const Podcasts = PodcastsSection;
export const Books = BooksSection;
export const Board = BoardSection;
export const Weather = WeatherSection;
export const Posts = PostsSection;
export const NoMatch = NoMatchSection;
|
import selectpicker from 'bootstrap-select';
const select = $('.js-select');
select.selectpicker()
.on('loaded.bs.select', function() {
const buttonToggle = $(this).parents('.js-select').find('.dropdown-toggle');
const icon = '<svg class="icon icon-arrow-down"><use xlink:href="img/sprite.svg#icon-arrow-down"></use></svg>';
buttonToggle.append(icon);
});
|
/**
* Copyright (c), 2013-2014 IMD - International Institute for Management Development, Switzerland.
*
* See the file license.txt for copying permission.
*/
require.config({
// Dev only for Mobile Safari to stop it caching the JS.
// urlArgs: "bust=" + (new Date()).getTime(),
paths: {
jquery: 'lib/jquery-1.10.2',
rangy: 'lib/rangy-core',
textrange: 'lib/rangy-textrange',
Underscore: 'lib/underscore'
},
shim: {
'Underscore': {
exports: '_'
},
'rangy': {
exports: 'rangy'
},
'textrange': [ 'rangy' ]
}
});
require([
'App'
], function (App) {
'use strict';
App.init();
});
|
export const SET_FORM_VALUE = 'login/SET_FORM_VALUE'
export const LOGIN_WITH_PASSWORD_REQUEST = 'login/LOGIN_WITH_PASSWORD_REQUEST'
export const LOGIN_WITH_PASSWORD_SUCCESS = 'login/LOGIN_WITH_PASSWORD_SUCCESS'
export const LOGIN_WITH_PASSWORD_FAIL = 'login/LOGIN_WITH_PASSWORD_FAIL'
export const LOGOUT_REQUEST = 'login/LOGOUT_REQUEST'
export const LOGOUT_SUCCESS = 'login/LOGOUT_SUCCESS'
export const LOGOUT_FAIL = 'login/LOGOUT_FAIL'
export const WRITE_TOKEN_TO_STORAGE = 'login/WRITE_TOKEN_TO_STORAGE'
export const READ_TOKEN_FROM_STORAGE = 'login/READ_TOKEN_FROM_STORAGE'
export const CLEAR_TOKEN_FROM_STORAGE = 'login/CLEAR_TOKEN_FROM_STORAGE'
export const SET_TOKEN = 'login/SET_TOKEN'
|
const sequelize = require('../../database/database')
const models = {
usuario: require('./usuario'),
ponto: require('./ponto'),
sequelize: sequelize
}
module.exports = models |
import React from "react";
import {
Card,
CardFooter,
Container,
Row,
} from "reactstrap";
// core components
import Header from "components/Headers/Header.js";
import TableProducts from "components/Components/Table";
import "./styleProductsUser.css";
// const MapWrapper = () => {
// return (
// <>
// <div className="map-canvas">
// <h1> Products Page User</h1>
// </div>
// </>
// );
// };
const Products = () => {
return (
<>
<Header />
<Container className="mt--7" fluid>
{/* Table */}
<Row>
<div className="col">
<h3 className="mb-0">Products</h3>
<p>
<i className="fas fa-long-arrow-alt-down"></i> import {" "}
<i className="fas fa-long-arrow-alt-up"></i> export
More Actions <i className="fas fa-sort-down"></i>
</p>
<button className="AddProductBTN"> Add Products</button>
<Card className="shadow">
<h1 className="ALL">ALL </h1>
<hr className="hr"
style={{
marginBottom: "70px",
}} />
{/* <div className="container small my-5"> */}
<div>
<div>
{/* <div className="row d-flex justify-content-between mx-auto mt-4 mb-3"> */}
<div id="Filter-Serach">
{/* <div className="col-lg-8 col-md-12"> */}
<div className="row justify-content-end">
<i
className="fa fa-search"
id="iconSearch"
aria-hidden="true"
></i>
<div className="input-group col-lg-10 col-md-12 SearchProducts">
<div className="input-group-append">
<select
className="form-control rounded-0 text-capitalize"
id="search-filter"
name="search-filter"
>
<option value="listitem">Filter</option>
<option value="Type">Type</option>
<option value="Vendor">Vendor</option>
</select>
</div>
<div className="input-group-prepend ">
{/* <i className="fa fa-search" aria-hidden="true" ></i> */}
<input
className="form-control"
id="search-box"
type="text"
name="search"
placeholder="Search Products "
required="required"
/>
</div>
</div>
</div>
</div>
</div>
</div>
{/* TableProducts */}
<TableProducts />
<CardFooter className="py-4">
</CardFooter>
</Card>
</div>
</Row>
</Container>
</>
);
};
export default Products;
|
// 实现一个 HTML5 音乐播放器
var log = function(){
console.log.apply(console, arguments)
}
var a = document.querySelector("#id-audio-player")
var playlist = document.querySelector(".playlist")
// 绑定按钮事件
var bindButtons = function() {
var playButton = document.querySelector("#id-button-play")
playButton.addEventListener('click', function(){
if (a.paused) {
a.play()
playButton.classList.remove("play")
playButton.classList.add("pause")
duration.innerHTML = secondToMinute(a.duration)
} else {
a.pause()
playButton.classList.remove("pause")
playButton.classList.add("play")
}
})
var nextButton = document.querySelector("#id-button-next")
nextButton.addEventListener('click', function(){
play(1)
})
var previousButton = document.querySelector("#id-button-previous")
previousButton.addEventListener('click', function(){
play(-1)
})
}
// 时间处理函数,把播放秒数转为分秒显示
var secondToMinute = function(time) {
var time = Math.round(time)
var minute = Math.floor(time / 60)
var second = time - minute * 60
if (second < 10) {
second = '0' + second
}
var res = `${minute}:${second}`
return res
}
var duration = document.querySelector("#id-span-duration")
// 绑定播放列表事件,点击列表切换歌曲
var bindList = function() {
var songs = document.querySelectorAll(".song")
for (var i = 0; i < songs.length; i++) {
var song = songs[i]
song.addEventListener('click', function(event){
// 获取点击 ID
var self = event.target
var index = self.id.slice(5)
// 切换音乐和封面
a.src = list[index]
playlist.dataset.active = index
var cover = document.querySelector(".cover")
cover.src = coverList[index]
})
}
// 加载音乐文件后,播放音乐,显示总时长,显示标题
a.addEventListener('canplay', function(event){
a.play()
duration.innerHTML = secondToMinute(a.duration)
changeTitle()
var playButton = document.querySelector("#id-button-play")
playButton.classList.remove("play")
playButton.classList.add("pause")
})
}
// 播放列表数组, 存储文件路径
var list = [
"http://oih6hf7qs.bkt.clouddn.com/music/1.mp3",
"http://oih6hf7qs.bkt.clouddn.com/music/2.mp3",
"http://oih6hf7qs.bkt.clouddn.com/music/3.mp3",
]
var coverList = [
"images/1.jpg",
"images/2.jpg",
"images/3.jpg",
]
var play = function(offset) {
var number = list.length
var index = parseInt(playlist.dataset.active)
var nextIndex = (index + offset + number) % number
a.src = list[nextIndex]
var cover = document.querySelector(".cover")
cover.src = coverList[nextIndex]
playlist.dataset.active = nextIndex
}
// 播放下一首
var playNext = function() {
play(1)
}
// 播放上一首
var playPrevious = function() {
play(-1)
}
// 歌曲结束后自动播放下一首
var binPlayRepeat = function() {
a.addEventListener('ended', function(event){
playNext()
})
}
// 改变播放歌曲标题
var changeTitle = function() {
var title = document.querySelector('#id-h3-title')
var index = playlist.dataset.active
var songs = document.querySelectorAll('.song')
var song = songs[index]
var songName = song.innerHTML
title.innerHTML = songName
}
// 绑定音量控制
var bindVolume = function() {
var volumeInput = document.querySelector("#id-input-volume")
volumeInput.addEventListener('change', function(event){
var value = event.target.value
a.volume = value / 100
})
}
var bindProgress = function() {
// 拖动进度条控制播放进度
var progressInput = document.querySelector("#id-input-progress")
progressInput.addEventListener('change', function(event){
var value = event.target.value
var duration = a.duration
a.currentTime = value * duration / 100
})
// 进度条随着播放进度滚动
var currentTime = document.querySelector("#id-span-currentTime")
var duration = document.querySelector("#id-span-duration")
setInterval(function(){
currentTime.innerHTML = secondToMinute(a.currentTime)
progressInput.value = a.currentTime / a.duration * 100
}, 1000)
}
var init = function() {
a.src = list[0]
}
var __main = function() {
init()
bindButtons()
bindList()
binPlayRepeat()
bindVolume()
bindProgress()
}
__main()
|
import axios from "axios";
import * as actions from "Redux/actions";
import { toast } from "react-toastify";
const errorNotice = () =>
toast.error(
"The request couldn't be processed. Some server issue has occured."
);
export const fetchContacts = () => (dispatch) => {
dispatch(actions.fetchContactsRequest());
axios
.get("http://localhost:4000/contacts")
.then((response) => {
dispatch(actions.fetchContactsSuccess(response.data));
})
.catch(() => {
errorNotice();
dispatch(actions.fetchContactsError());
});
};
export const postContact = (contact) => (dispatch) => {
dispatch(actions.fetchContactsRequest());
axios
.post("http://localhost:4000/contacts", {
...contact,
})
.then(function (response) {
if (response.status === 201) {
dispatch(fetchContacts());
}
})
.catch(function () {
errorNotice();
dispatch(actions.fetchContactsError());
});
};
export const deleteContact = (id) => (dispatch) => {
dispatch(actions.fetchContactsRequest());
axios
.delete(`http://localhost:4000/contacts/${id}`)
.then(function (response) {
if (response.status === 200) {
dispatch(fetchContacts());
}
})
.catch(function () {
errorNotice();
dispatch(actions.fetchContactsError());
});
};
|
var searchData=
[
['key',['Key',['../class_key.html#a26feef290360ca3bba9b5bb6831de445',1,'Key']]],
['keyboardhookprocedure',['keyboardHookProcedure',['../class_recorder.html#a3f6a34174b2adab522364a5a1dc2b72e',1,'Recorder']]]
];
|
(window.webpackJsonp = window.webpackJsonp || []).push([[1], {
46: function (e, t, n) {},
47: function (e, t, n) {
"use strict";
n.r(t);
var r = n(0),
a = n.n(r),
o = n(44),
c = n.n(o),
i = n(1),
l = n(8),
u = n(45),
s = n.n(u),
d = function (e) {
var t = e.error;
return a.a.createElement("div", {
className: "skeleton__video"
}, t ? "" : a.a.createElement("div", {
className: "skeleton__video--loading"
}, a.a.createElement(s.a, null)))
};
n(46);
function f(e, t) {
return function (e) {
if (Array.isArray(e)) return e
}(e) || function (e, t) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return;
var n = [],
r = !0,
a = !1,
o = void 0;
try {
for (var c, i = e[Symbol.iterator](); !(r = (c = i.next()).done) && (n.push(c.value), !t || n.length !== t); r = !0);
} catch (e) {
a = !0, o = e
} finally {
try {
r || null == i.return || i.return()
} finally {
if (a) throw o
}
}
return n
}(e, t) || function (e, t) {
if (!e) return;
if ("string" == typeof e) return m(e, t);
var n = Object.prototype.toString.call(e).slice(8, -1);
"Object" === n && e.constructor && (n = e.constructor.name);
if ("Map" === n || "Set" === n) return Array.from(e);
if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return m(e, t)
}(e, t) || function () {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}()
}
function m(e, t) {
(null == t || t > e.length) && (t = e.length);
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
return r
}
var p = Object(i.g)((function (e) {
var t = e.history,
n = f(Object(r.useState)(!1), 2),
o = n[0],
i = n[1],
u = f(Object(r.useState)(!1), 2),
s = u[0],
m = u[1],
p = f(Object(r.useState)(0), 2),
v = p[0],
b = p[1],
y = f(Object(r.useState)(null), 2),
h = y[0],
E = y[1],
g = function (e) {
c.a.stop(), "not-found" === e ? t.push("/product/".concat(e, "?code=").concat(h)) : t.push("/product/".concat(e))
},
_ = function e(t) {
c.a.offDetected(e), fetch("https://world.openfoodfacts.org/api/v0/product/".concat(t.codeResult.code, ".json")).then((function (e) {
return e.json()
})).then((function (e) {
return w(e)
}))
},
w = function (e) {
var t = e.status,
n = e.code;
E(n), b((function (e) {
return e + 1
})), 1 === t ? g(n) : c.a.onDetected(_)
};
return Object(r.useEffect)((function () {
navigator.mediaDevices && navigator.mediaDevices.getUserMedia && (c.a.init({
inputStream: {
name: "Live",
type: "LiveStream",
target: document.querySelector("#video")
},
numOfWorkers: 1,
locate: !0,
decoder: {
readers: ["ean_reader", "ean_8_reader", "upc_reader", "code_128_reader"]
}
}, (function (e) {
e ? m(!0) : (c.a.start(), i(!0))
})), c.a.onDetected(_))
}), []), Object(r.useEffect)((function () {
v > 3 && g("not-found")
}), [v]), a.a.createElement("div", null, a.a.createElement("div", {
className: "video__explanation"
}, a.a.createElement("p", null, "Scan a product's barcode and get its nutritional values ", a.a.createElement("span", {
role: "img",
"aria-label": "apple"
}, "🍎"))), a.a.createElement("div", {
className: "video__container"
}, s ? a.a.createElement("div", {
className: "skeleton__unsopported"
}, a.a.createElement("div", null, a.a.createElement("p", null, "Your device does not support camera access or something went wrong ", a.a.createElement("span", {
role: "img",
"aria-label": "thinking-face"
}, "🤔")), a.a.createElement("p", null, "You can enter the barcode below"), a.a.createElement(l.a, null))) : a.a.createElement("div", null, a.a.createElement("div", {
className: "video",
id: "video"
}), o ? "" : a.a.createElement(d, null))))
}));
t.default = p
}
}]);
|
$(document).ready(function () {
$('.city').click(function () {
$('.select_city').removeClass('hidden');
$(document).mouseup(function (e) {
var container = $(".select_city");
if (container.has(e.target).length === 0){
container.addClass('hidden');
}
});
});
$('.sel_city-item').click(function () {
let inside = $(this).text();
//inside.replace(/\s/g, '');
console.log(inside);
$('.city').val(inside);
});
}); |
function LibraryPresenter({view, libraryRepository}){
return {
loadLibrary: loadLibrary
};
async function loadLibrary(){
let library = await libraryRepository.getAll();
library.length > 0
? view.renderLibrary({library: library})
: view.renderEmptyLibrary();
}
}
module.exports = LibraryPresenter;
|
import React from 'react';
import Container from 'react-bootstrap/Container'
import Row from 'react-bootstrap/Row'
import Col from 'react-bootstrap/Col'
import PhoneInfo from "./phone-info";
import SocialIcons from '../commons/social-icons';
import './pre-header.css';
const PreHeader = ({conf}) => {
return (
<div className={"black-section"}>
<Container>
<Row className={"align-items-center justify-content-end app-header"}>
<Col sm={9} xs={6}>
<PhoneInfo text={conf.phoneText}/>
</Col>
<Col sm={3} xs={6}>
<SocialIcons floatStyle={{float: 'right', color: 'white'}}/>
</Col>
</Row>
</Container>
{/*<div className={"container"}>*/}
{/*<div className={"row align-items-center justify-content-end app-header"}>*/}
{/*<div className={"col col-sm-9 col-xs-6"}>*/}
{/*<PhoneInfo text={conf.phoneText}/>*/}
{/*</div>*/}
{/*<div className={"col col-sm-3 col-xs-6"}>*/}
{/*<SocialIcons/>*/}
{/*</div>*/}
{/*</div>*/}
{/*</div>*/}
</div>
);
};
export default PreHeader; |
(() => {
'use strict';
angular
.module('radarApp')
.component('author', {
bindings: {
name: '@',
href: '@'
},
templateUrl: 'common/components/templates/author-template.html'
});
})(); |
import React, { Component } from 'react'
import { Text, View, StyleSheet, FlatList, AppState, StatusBar } from 'react-native'
import { connect } from 'react-redux'
import { updateLastSeen } from '../store/userData/userData.actions'
import NotificationCard from '../components/NotificationCard'
class Notify extends Component {
renderItem = ({ item }) => {
return <NotificationCard
data={ item }
press={ () => this.props.navigation.navigate('FullView', { description: item }) }
/>
}
keyExtractor = (item, index) => `notif-${item.createdAt}`
render() {
return (
<View style={styles.body}>
<StatusBar
hidden={true}
/>
<FlatList
data={ this.props.logs }
keyExtractor={ this.keyExtractor }
renderItem={ this.renderItem }
/>
</View>
)
}
handleAppStateChange = (appState) => {
if (appState.match(/inactive|background/)) {
this.props.navigation.navigate('Logout')
}
}
componentDidMount() {
updateLastSeen(this.props.userData.deviceId)
AppState.addEventListener('change', this.handleAppStateChange)
}
}
const styles = StyleSheet.create({
body: {
flex: 1,
backgroundColor: '#d3d3d3'
},
infoCard: {
borderWidth: 1,
borderColor: '#00a819',
marginTop: 1,
marginHorizontal: 2,
marginBottom: 2,
backgroundColor: '#fff',
padding: 10,
borderRadius: 4,
},
notifTitle: {
fontSize: 22,
fontWeight: '300',
color: '#006ac6',
textAlign: 'center',
paddingBottom: 3,
},
titleBorder: {
borderBottomWidth: 1,
borderBottomColor: '#d3d3d3',
},
time: {
fontSize: 14,
fontWeight: '300',
color: '#333333',
paddingVertical: 8
},
descText: {
fontSize: 18,
fontWeight: '200',
color: '#333333'
},
footerBorder: {
marginTop: 8,
borderTopWidth: 1,
borderTopColor: '#d3d3d3',
paddingTop: 10,
paddingBottom: 4,
justifyContent: 'center',
alignItems: 'center'
},
footerText: {
color: '#fff',
padding: 8,
},
box: {
backgroundColor: 'red',
borderRadius: 3,
borderRightWidth: 3,
borderBottomWidth: 3,
borderRightColor: '#a80000',
borderBottomColor: '#a80000'
}
})
function mapStateToProps (state) {
return {
userData: state.UserData,
logs: state.NotificationLogs.logs
}
}
// function mapDispatchToProps (dispatch) {
// return {
// getSensorStatus: () => dispatch(getSensorStatus())
// }
// }
export default connect(mapStateToProps, null)(Notify)
|
(function ($,X) {
X.prototype.controls.widget("WebUpload",function (controlType) {
var BaseControl = X.prototype.controls.getControlClazz("BaseControl");
//上传图片
function WebUpload(elem, options){
BaseControl.call(this,elem,options);
this.Size = this.options.size;
this.type = this.options.type;
this.maxNum = this.options.maxNum;
this.downloadType = this.options.downloadType;
this.extensions = this.options.extensions;
this.server = this.options.server;
this.downUrl = this.options.downUrl;
this.width = this.options.width ? this.options.width : '';
this.height = this.options.height ? this.options.height : '';
this.upload();
}
X.prototype.controls.extend(WebUpload,"BaseControl");
WebUpload.prototype.constructor = WebUpload;
/**
@method init webuploader初始化设置
*/
WebUpload.prototype.upload = function () {
var that = this;
that.wrapData = that.elem.find(".js-wrapData");
var error = that.elem.find('.js-error');
// WebUploader实例
var id = this.options["filePicker"];
var label = this.options["filePickerLabel"] || "选择文件";
var pick;
if(id && label){
pick = {id:id,label:label,multiple:true}
}
// 实例化
this.uploader = WebUploader.create({
pick:pick,
formData: {
fileType: that.type, //上传type后端区分文件
width: that.width, //图片压缩后的宽
height: that.height //图片压缩后的高
},
auto:that.options.auto === undefined || that.options.auto === true? true: false,
swf: 'js/lib/webuploader/Uploader.swf',
sendAsBinary:true, //指明使用二进制的方式上传文件
duplicate:true,
chunked: false,
crop: that.options.crop,
chunkSize: 512 * 1024,
server: that.server || X.prototype.config.PATH_FILE.path.rootImg, //上传服务接口
fileSizeLimit: that.Size * 1024 * 1024,
fileSingleSizeLimit: that.Size * 1024 * 1024,
accept :{
extensions : that.extensions || "doc,docx,xls,xlsx,ppt,pptx,pdf,jpg,jpeg,gif,png" //接受文件类型
}
});
that.duplicate();
// 文件上传成功
this.uploader.on( 'uploadSuccess', function( file,response) {
if(response.data){
error.html('');
var uploadUrl = X.prototype.config.PATH_FILE.path.rootUploadUrl;
var a = '';
if(X.prototype.isFunction(that.options["uploadSuccessPageShow"])){
a = that.options["uploadSuccessPageShow"](response,that.wrapData);
}else{
if (response.data.url) {
a = '<div class="wrapUpload disib"><img src="'+ response.data.url +'"/><span class="cancel">X</span><p class="mt10 tac contract-word-cut">'+response.data.fileName+'</p></div>'
} else {
a = '<div class="wrapUpload"><a href="'+uploadUrl+'?fileType='+ that.options.downloadType+'&filePath='+response.data.path+'&fileName='+response.data.fileName+'" class="accessory white-block">'+response.data.fileName+'</a><span class="redFont cancel curp">X</span></div>';
}
}
$(that.wrapData).append(a);
that.cancel();
that.maxNumber();
if(X.prototype.isFunction(that.options["uploadSuccess"])){
that.options["uploadSuccess"](response,that.wrapData);
}
that.trigger("uploadSuccess");
}
});
this.uploader.on( 'error', function( type ) {
var text;
switch( type ) {
case 'Q_EXCEED_SIZE_LIMIT':
text = that.options.Q_EXCEED_SIZE_LIMIT || '请上传大小在'+ that.Size +'M以内的文件';
break;
case 'Q_EXCEED_NUM_LIMIT':
text = that.options.Q_EXCEED_NUM_LIMIT || '文件数量超出最大值';
break;
case 'F_DUPLICATE':
text = that.options.F_DUPLICATE || '文件不能重复上传';
break;
case 'Q_TYPE_DENIED':
text = that.options.Q_TYPE_DENIED_TEXT || '请上传右侧支持的文件格式';
break;
}
error.text(text);
});
};
WebUpload.prototype.addButton = function (buttons) {
if(!X.prototype.isArray(buttons)){
buttons = [buttons];
}
for(var i = 0; i < buttons.length; i++){
this.uploader.addButton(buttons[i]);
}
};
/**
@method init 重复上传文件
*/
WebUpload.prototype.duplicate = function(){
var that = this,
_this = that.uploader,
mapping = {};
function hashString( str ) {
var hash = 0,
i = 0,
len = str.length,
_char;
for ( ; i < len; i++ ) {
_char = str.charCodeAt( i );
hash = _char + (hash << 6) + (hash << 16) - hash;
}
return hash;
}
_this.on( 'beforeFileQueued', function( file ) {
var hash = file.__hash || (file.__hash = hashString( file.name +
file.size + file.lastModifiedDate ));
// 已经重复了
if ( mapping[ hash ] ) {
var nameArr = [];
if(X.prototype.isFunction(that.options["duplicate"])){
nameArr = that.options["duplicate"](that.elem.find(".js-wrapData"));
}else{
var namewrapArr = that.elem.find(".js-wrapData").find("a");
$.each(namewrapArr,function(i,item){
nameArr.push($(namewrapArr[i]).html());
});
}
var has = function (){
var hasName;
$.each(nameArr,function(i,item){
if(nameArr[i] == file.name){
hasName = true;
}
});
return hasName;
};
if(has()){
_this.trigger( 'error', 'F_DUPLICATE', file );
return false;
}
}
});
_this.on( 'fileQueued', function( file ) {
var hash = file.__hash;
hash && (mapping[ hash ] = true);
});
_this.on( 'fileDequeued', function( file ) {
var hash = file.__hash;
hash && (delete mapping[ hash ]);
});
_this.on( 'reset', function() {
mapping = {};
});
};
/**
@method init 删除上传文件
*/
WebUpload.prototype.cancel = function(){
var that = this;
var cancel = that.elem.find(".cancel");
that.wrapData = that.elem.find(".js-wrapData");
cancel.on('click',function(event){
var fatherDiv = $(event.target).parent();
fatherDiv.remove();
that.maxNumber(true);
if(X.prototype.isFunction(that.options["cancelSuccessAfter"])){
that.options["cancelSuccessAfter"](that.wrapData);
}
});
};
/**
@method init 获取上传文件
@param value {string} 获取上传文件值
*/
WebUpload.prototype.getValue = function(type){
var that = this;
var value = that.wrapData.children();
var arr = [];
function getArgStr(value){
var argStr='';
argStr = value.split('&')[1].split('=')[1];
return argStr;
}
if(X.prototype.isFunction(that.options["getValueData"])){
arr = that.options["getValueData"](value,type);
}else{
$.each(value,function(i,item){
var me = $(item),
filePath, fileName;
if (me.children('img').length) {
filePath = me.children('img').attr("src");
fileName = me.children('p').html();
} else {
filePath = me.children('a').attr("href");
fileName = me.children('a').html();
}
var tar = $(item).find('a' || 'img');
arr.push({attachmentType:type,filePath:filePath, fileName:fileName});
});
}
return arr;
};
/**
@method init 设置上传文件
@param value {string} 设置上传文件值
*/
WebUpload.prototype.setValue = function(arr){
var that = this;
var wrap = that.elem.find(".js-wrapData");
if(arr){
var uploadUrl = that.downUrl || X.prototype.config.PATH_FILE.path.rootUploadUrl;
$.each(arr,function(i,item){
var filename = item.filename || item.fileName,
filePath = item.filepath || item.filePath;
var a = '';
if(X.prototype.isFunction(that.options["setValuePageShow"])){
a = that.options["setValuePageShow"](item,wrap);
}else{
if (/png|jpeg|jpg|gif|bmp/.test(filePath)) {
var url = item.url || item.filePath;
a = '<div class="wrapUpload disib pt20"><img src="'+ url +'" class="upload-imgage"/><span class="cancel">X</span><p class="mt10 tac contract-word-cut">'+filename+'</p></div>'
} else {
a = '<div class="wrapUpload"><a href="'+uploadUrl+'?fileType='+ that.downloadType+'&filePath='+item.filePath+'&fileName='+item.filename+'" class="accessory white-block">'+item.filename+'</a><span class="redFont cancel">X</span></div>';
}
}
$(wrap).append(a);
if(X.prototype.isFunction(that.options["setValueSuccess"])){
that.options["setValueSuccess"](item,wrap);
}
});
that.cancel();
}else{
wrap.html("");
}
};
/**
@method init 设置上传文件数量
@param value {string} 设置上传文件最大数量
*/
WebUpload.prototype.maxNumber = function(data){
var that = this;
var wrap = that.elem.find(".wrapUpload");
var input = that.elem.find("input[type=file]");
var error = that.elem.find('.js-error');
if(that.options.hiddenBtn){
if(wrap.length >= that.maxNum){
input.parent().parent().addClass("nonei");
}else{
input.parent().parent().removeClass("nonei");
}
}else{
if (wrap.length > that.maxNum) {
var text = that.options.Q_EXCEED_NUM_LIMIT || "上传附件不能超过" + that.maxNum + "张";
error.text(text);
input.attr("disabled", true);
} else {
input.attr("disabled", false);
error.text("");
}
}
};
/**
@method init 重置上传附件展示
*/
WebUpload.prototype.reset = function () {
this.setValue("");
};
return WebUpload;
});
})(jQuery,this.Xbn); |
Ext.ns('App');
App.store = new Ext.data.JsonStore({
autoDestroy: true,
url: 'data.txt',
root: 'root',
fields: ['name', {name:'visits', type: 'int'}, {name:'views', type:'int'}]
});
App.store.load();
App.createColumnChart = function() {
App.columnChart = {
xtype: 'panel',
frame: true,
width: 500,
height: 300,
closable: false,
items: [{
xtype: 'columnchart',
store: App.store,
url: './scripts/ext-3.0-rc1.1/resources/charts.swf',
xField: 'name',
yField: 'visits',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Visits',
labelRenderer: Ext.util.Format.numberRenderer('0.0')
}),
tipRenderer: function() {
return Ext.util.Format.number(record.data.visits, '0.0') + ' visit in ' + record.data.name
},
chartStyle: {
padding: 10,
animationEnabled: true,
font: {
name: 'Tahoma',
color: 0x444444,
size: 11
},
dataTip: {
padding: 5,
border: {
color: 0x99bbe8,
size:1
},
background: {
color: 0xDAE7F6,
alpha: .9
},
font: {
name: 'Tahoma',
color: 0x15428B,
size: 10,
bold: true
}
},
xAxis: {
color: 0x69aBc8,
majorTicks: {color: 0x69aBc8, length: 4},
minorTicks: {color: 0x69aBc8, length: 2},
majorGridLines: {size: 1, color: 0xeeeeee}
},
yAxis: {
color: 0x69aBc8,
majorTicks: {color: 0x69aBc8, length: 4},
minorTicks: {color: 0x69aBc8, length: 2},
majorGridLines: {size: 1, color: 0xdfe8f6}
}
},
series: [{
type: 'column',
displayName: 'Page Views',
yField: 'views',
style: {
image:'bar.gif',
mode: 'stretch',
color:0x99BBE8
}
},{
type:'line',
displayName: 'Visits',
yField: 'visits',
style: {
color: 0x15428B
}
}]
}]
};
App.createPieChart();
App.chartPanel = new Ext.Panel ({
id: 'ViewChart',
title: 'chart',
iconCls: 'metricsAndStats',
layout: 'absolute',
items: [App.columnChart, {
title: 'About Chart',
iconCls: 'aboutProcessDefinition',
x: 550,
y: 20,
width: 250,
height: 200,
html: 'Process definitions are the base classes for any process instance. They act as an execution template for BPM engine.'
}, {
title: 'Most Active Process',
iconCls: 'metricsAndStats',
x: 550,
y: 250,
width: 250,
height: 200,
layout:'fit',
items:[App.pieChart],
bbar: new Ext.Toolbar([
'->',
'More Metrics'
])
}]
});
return App.chartPanel;
};
App.createPieChart = function() {
App.pieChart = {
iconCls:'chart',
frame:true,
layout:'fit',
items: {
xtype: 'piechart',
store: App.store,
url: './scripts/ext-3.0-rc1.1/resources/charts.swf',
xField: 'name',
yField: 'visits',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Visits',
labelRenderer : Ext.util.Format.numberRenderer('0,0')
}),
tipRenderer : function(chart, record){
return Ext.util.Format.number(record.data.visits, '0,0') + ' visits in ' + record.data.name;
}
}
};
return App.pieChart;
}; |
const express = require("express");
const bp = require("body-parser");
const mongoose = require("mongoose");
var alert = require("alert");
const app = express();
app.set('view engine', 'ejs');
app.use(bp.urlencoded({
extended: true
}));
app.use(express.static(__dirname));
var firstname = "";
var symp = "";
var cty = "";
var username="";
var doci = "";
//----------------- DataBases -----------------//
mongoose.connect("mongodb+srv://admin:qsvQjmPPnADSp83d@pawhelper.5qct4.mongodb.net/profileDB", {
useNewUrlParser: true,
useUnifiedTopology: true
});
const profileSchema = {
fname: String,
lname: String,
phoneNumber: Number,
phoneNumber: {
type: String,
required: true,
maxLength: 10,
minLength: 10
},
email: String,
password: String,
adress: String,
city: String,
state: String,
zip: Number
}
const doctorSchema = {
f_name: String,
l_name: String,
phone_number: Number,
email: String,
clinic_address: String,
city : String,
degrees: String,
rating: Number,
specialisation: String
}
const Profile = mongoose.model("Profile", profileSchema);
const Doctor = mongoose.model("Doctor", doctorSchema);
//-----------------login page-----------------//
app.get("/", function (req, res) {
res.render("login");
})
app.post("/", function (req, res) {
username = req.body.login;
var password = req.body.password;
Profile.findOne({
email: username
}, function (err, foundUser) {
if (err) {
console.log(err);
} else {
if (foundUser) {
if (foundUser.password === password) {
res.render("homepage");
} else {
alert('Helo');
res.redirect("/home");
}
}
}
});
});
//----------------- sign up page-----------------//
app.get('/signup',function(req,res){
res.render("signup")
})
app.post('/signup', function (req, res) {
const fname = req.body.fname;
const lname = req.body.lname;
const phone = req.body.phone;
const email = req.body.email;
const password = req.body.password;
const address = req.body.address;
const city = req.body.city;
const state = req.body.state;
const zip = req.body.zip;
const details = new Profile({
fname: fname,
lname: lname,
phoneNumber: phone,
email: email,
password: password,
adress: address,
city: city,
state: state,
zip: zip
})
details.save(function (err) {
if (err) {
console.log(err);
} else {
res.render("homepage");
}
})
})
//----------------- sign up doctor page-----------------//
app.get('/doctorregistration',function(req, res){
res.render("doctor");
})
app.post('/doctorregistration', function (req, res) {
const fname = req.body.f_name;
const lname = req.body.l_name;
const phone = req.body.phone_number;
const address = req.body.address;
const city = req.body.clinic_city;
const degree = req.body.degree;
const specialisation = req.body.specialisation;
const doctor = new Doctor({
f_name: fname,
l_name: lname,
phone_number: phone,
clinic_address: address,
city: city,
degrees: degree,
specialisation: specialisation
})
doctor.save(function (err) {
if (err) {
console.log(err);
} else {
res.render("homepage");
}
})
})
//----------------- profile -----------------//
app.get("/profile", function (req, res) {
const fname = req.body.fname;
const lname = req.body.lname;
const phone = req.body.phone;
const email = req.body.email;
const password = req.body.password;
const address = req.body.address;
const city = req.body.city;
const state = req.body.state;
const zip = req.body.zip;
Profile.find({
email: ema
}, function (err, profiles) {
if (err) {
console.log(err);
} else {
res.render("profile", {
profile: profiles[0]
});
}
})
})
app.post("/profile", function (req, res) {
ema = req.body.email;
firstname = req.body.fname;
res.redirect("/profile");
})
//----------------- search -----------------//
app.get("/search", function(req,res){
if(symp === "fever" || symp === "headache" || symp==="cold"){
doci = "General Physician";
}
else if(symp ==="toothache" || symp ==="cavity" || symp==="bad breath"){
doci = "Dentist";
}
Doctor.find({
city: cty,
specialisation: doci
}, function(err , doctors){
if(err){
console.log(err);
} else {
res.render("results", { doctor: doctors});
}
})
})
app.post("/search", function(req,res){
symp = req.body.problem;
cty = req.body.city;
res.redirect("/search");
})
let port = process.env.PORT;
if(port == null || port==""){
port = 3000;
}
app.listen(port, function () {
console.log("----Server Started----");
})
//----------------- search -----------------//
app.get("/sugartesting", function(req,res){
res.render("sugartesting")
})
app.get("/home", function(req,res){
res.render("homepage");
})
//Cardiologist
//General Physician
//Dentist
//General Surgeon
//Dermatologist |
var fs = require('fs');
var privated = {};
var Logger = function () {
self = this;
self.__private = privated;
// fs.open('logs/account.txt', 'w+', function (err, fd) {
// if (err) {
// return console.error(err);
// }
// privated.fdList.account = fd;
// });
// fs.open('logs/log.txt', 'w+', function(err, fd) {
// if (err) {
// return console.error(err);
// }
// privated.fdList.log = fd;
// });
// fs.open('logs/stat.txt', 'w+', function(err, fd) {
// if (err) {
// return console.error(err);
// }
// privated.fdList.stat = fd;
// console.log(privated.fdList);
// });
privated.fdList.account = fs.openSync('logs/account.txt', 'w+')
privated.fdList.log = fs.openSync('logs/log.txt', 'w+')
privated.fdList.stat = fs.openSync('logs/stat.txt', 'w+')
privated.fdList.wallet = fs.openSync('logs/wallet.json', 'w+')
console.log(privated.fdList);
}
privated.fdList = {
account: "",
log: "",
stat: "",
wallet: ""
};
// Public methods
Logger.prototype.saveAccount = function (wallet) {
for (i=0; i < wallet.length ; i++) {
data = wallet[i].address + ' ' + wallet[i].privateKey + '\n';
fs.write(privated.fdList.account, data, (err) => {
if (err) throw err;
console.log('The "data to append" was appended to file!');
});
}
fs.write(privated.fdList.wallet, wallet, (err) => {
if (err) throw err;
console.log('The "data to append" was appended to file!');
});
}
module.exports = Logger; |
import MenuTop from "../../components/MenuTop/MenuTop";
function Layout({children}) {
return (
<>
<MenuTop></MenuTop>
{children}
</>
);
}
export default Layout; |
import React from "react";
import APIClient from '../Actions/apiClient';
import { withTranslation } from 'react-i18next';
import i18n from "i18next";
class Home extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
async componentDidMount() {
this.apiClient = new APIClient();
}
render () {
const { t } = this.props;
return (
<div className="container">
<div className="container-fluid">
<p>Welcome</p>
<p>{t('home.explanation')}</p>
</div>
</div>
);
}
}
export default withTranslation()(Home); |
'use strict';
angular.module('blipApp')
.controller('SettingsPannel', ['$scope', '$http', 'NationalityService', '$rootScope', function($scope, $http, NationalityService, $rootScope) {
$scope.userName = $rootScope.userNameCookie;
$scope.userCountry = $rootScope.userCountryCookie;
$scope.nationalities = {};
$scope.userPic = $rootScope.userPic;
function loadNationalities(){
if(localStorage.getItem("cacheNat") === null) {
NationalityService.getNationalities().then(function(data){
$scope.nationalities = JSON.parse(data)
});
}
else { $scope.nationalities = JSON.parse(localStorage.cacheNat) };
};
$scope.init = loadNationalities();
}]);
|
// Dependencies
import React, { Component } from "react";
import { Fragment } from "react";
import { Route, Switch } from "react-router";
import { PrivateRoute } from "./security/PrivateRoute";
// Material UI
import Paper from "@material-ui/core/Paper";
/* START MY VIEWS IMPORT */
import DoctorEdit from "./pages/DoctorEdit";
import DoctorList from "./pages/DoctorList";
import PatientEdit from "./pages/PatientEdit";
import PatientList from "./pages/PatientList";
import ReportEdit from "./pages/ReportEdit";
import ReportList from "./pages/ReportList";
/* END MY VIEWS IMPORT */
// CUSTOM VIEWS
import Login from "./pages/Login";
import Home from "./pages/Home";
import Profile from "./pages/Profile";
import UserEdit from "./pages/UserEdit";
import UserList from "./pages/UserList";
class Routes extends Component {
render() {
return (
<Switch>
<Fragment>
<Paper>
<div className="main-cointainer">
<Route exact path="/login" component={Login} />
<PrivateRoute exact path="/" component={Home} />
<PrivateRoute exact path="/profile" component={Profile} />
<PrivateRoute exact path="/users/:id" component={UserEdit} roles={["ADMIN"]}/>
<PrivateRoute exact path="/users" component={UserList} roles={["ADMIN"]}/>
{/* CUSTOM VIEWS */}
<PrivateRoute exact path="/home" component={Home} />
{/* START MY VIEWS */}
<PrivateRoute exact path="/doctors/:id" component={ DoctorEdit } />
<PrivateRoute exact path="/doctors" component={ DoctorList } />
<PrivateRoute exact path="/patients/:id" component={ PatientEdit } />
<PrivateRoute exact path="/patients" component={ PatientList } />
<PrivateRoute exact path="/reports/:id" component={ ReportEdit } />
<PrivateRoute exact path="/reports" component={ ReportList } />
{/* END MY VIEWS */}
</div>
</Paper>
</Fragment>
</Switch>
);
}
}
export default Routes; |
import React, { Component } from 'react';
import './App.css';
import Movies from '../Movies/Movies.js';
import MovieDetails from '../MovieDetails/MovieDetails';
import Nav from '../Nav/Nav.js';
import Error from '../Error/Error';
import { getMovies } from '../apiCalls';
import { Route, Switch } from 'react-router-dom';
class App extends Component {
constructor() {
super();
this.state = {
movies: [],
singleMovie: {},
isSingleMovie: false,
error: '',
};
}
componentDidMount() {
getMovies()
.then((data) =>
this.setState({ movies: [...this.state.movies, ...data.movies] })
)
.catch((error) => this.setState({ error: error.message }));
}
render() {
{
this.state.error && <Error message={this.state.error} />;
}
{
!this.state.movies && !this.state.error && (
<div className="loading-movie">
<h1>We are retrieving your movie...</h1>
</div>
);
}
return (
<div className="app">
<Nav />
<Switch>
<Route
exact
path="/"
component={() => <Movies movies={this.state.movies} />}
/>
<Route
exact
path="/movies/:movie_id"
component={({ match }) => {
const { params } = match;
return <MovieDetails id={parseInt(params.movie_id)} />;
}}
/>
</Switch>
</div>
);
}
}
export default App;
|
// practice-problems.js
// Practice Problem 1
// What is the return value of the filter method call below? Why?
console.log([1, 2, 3].filter(num => 'hi'));
// Practice Problem 2
// What is the return value of map in the following code? Why?
// Returns [ undefined, undefined, undefined ] because there is
// no explicit return statement.
let result = [1, 2, 3].map(num => {
num * num;
});
console.log(result);
// Practice Problem 3
// The following code differs slightly from the above code.
// What is the return value of map in this case? Why?
// Returns [1, 4, 9]
result = [1, 2, 3].map(num => num * num);
console.log(result);
// Practice Problem 4
// What is the return value of the following statement? Why?
// 11 because it actually returns the length of the word caterpillar
result = ['ant', 'bear', 'caterpillar'].pop().length
console.log(result);
// Practice Problem 5
// What is the callback's return value in the following code?
// Also, what is the return value of every in this code?
result = [1, 2, 3].every(num => {
return num = num * 2;
});
console.log(result);
// Practice Problem 6
// How does Array.prototype.fill work? Is it destructive? How can we find out?
// Yes it is destructive. It will fill an array with x from postion a to
// postion b array.fill(x, a, b)
let arr = [1, 2, 3, 4, 5]
console.log(arr.fill(1, 1, 5));
// Practice Problem 7
// What is the return value of map in the following code? Why?
// [undefined, bear]
result = ['ant', 'bear'].map(elem => {
if (elem.length > 3) {
return elem;
}
});
console.log(result);
// Practice Problem 8
// Write a program that use this array to create an object where the names
// are the keys and the values are the positions in the array.
let flintstones = ["Fred", "Barney", "Wilma", "Betty", "Pebbles", "Bambam"];
let newObj = {};
flintstones.forEach((element, index) => newObj[element] = index);
console.log(newObj);
// Practice Problem 9
// Add up all of the ages from the Munster family object
let ages = {
Herman: 32,
Lily: 30,
Grandpa: 5843,
Eddie: 10,
Marilyn: 22,
Spot: 237
};
let total = Object.values(ages).reduce((accum, curr) => {
return accum + curr;
}, 0);
console.log(total);
// Practice Problem 10
// Pick out the minimum age from our current Munster family object.
ages = {
Herman: 32,
Lily: 30,
Grandpa: 5843,
Eddie: 10,
Marilyn: 22,
Spot: 237
};
// My solution
let youngest = Object.values(ages).sort((a, b) => {
return a - b;
})[0];
console.log(youngest);
// Provided solution
let agesArr = Object.values(ages);
console.log(Math.min(...agesArr));
// Practice Problem 11
// Create an object that expresses the requency with which
// each letter occurs in this string
let statement = "The Flintstones Rock";
// My solution
obj = {};
statement.split('').forEach(element => {
if (obj.hasOwnProperty(element)) {
obj[element] += 1;
} else if (!(obj.hasOwnProperty(element)) && element !== ' ') {
obj[element] = 1;
}
});
console.log(obj);
// Provided Solution
// I feel the filter method may be a better way to pull out the space.
let charsInStatment = statement.split('').filter(char => char !== ' ');
result = {};
charsInStatment.forEach(char => {
result[char] = result[char] || 0;
result[char] += 1;
});
console.log(result);
|
$(document).ready(inicio);
$(document).keydown(capturaTeclado);
var x = 120;
var y = 120;
var angulo = 0;
function capturaTeclado(event) {
//alert(event.which);
if (event.which == 38)
y -= 10;
if (event.which == 40)
y += 10;
if (event.which == 39)
x += 10;
if (event.which == 37)
x -= 10;
x = (1200 + x) % 1200;
y = (700 + y) % 700;
if (event.which == 87)
angulo =1/2;
if (event.which == 83)
angulo =3/2;
if (event.which == 68)
angulo =2;
if (event.which == 65)
angulo =1;
}
function inicio() {
var lienzo = $("#lienzo")[0];
var contexto = lienzo.getContext("2d");
var buffer = document.createElement("canvas");
contextoBuffer = buffer.getContext("2d");
buffer.width = lienzo.width;
buffer.height = lienzo.height;
contexto.clearRect(0, 0, 700, 500);
contexto.drawImage(buffer, 0, 0);
run();
}
function Tanque() {
this.img = $("#tanque");
this.dibujar = function (ctx, i) {
var img = this.img[i];
ctx.translate(x, y);
ctx.rotate(Math.PI*angulo);
ctx.drawImage(img, -img.width/2, -img.height/2);
ctx.save();
ctx.restore();
}
}
function run() {
var lienzo = $("#lienzo")[0];
var contexto = lienzo.getContext("2d");
var buffer = document.createElement("canvas");
buffer.width = lienzo.width;
buffer.height = lienzo.height;
contextoBuffer = buffer.getContext("2d");
contextoBuffer.fillStyle = "#ffffff";
var objnave = new Tanque();
objnave.dibujar(contextoBuffer, 0);
contexto.clearRect(0, 0, 1200, 700);
contexto.drawImage(buffer, 0, 0);
setTimeout("run()", 20);
} |
angular.module('app').directive('taskList',['tasks', function(tasks) {
return {
scope: {}, // use a new isolated scope
restrict: 'E',
replace: 'true',
templateUrl: 'tasks/task_list.html',
link: function(scope){
scope.searchInput = '';
scope.order = 'title';
scope.tasks = [];
scope.newTask = {};
scope.addTask = function() {
scope.newTask.id = tasks.getMaxID()+1;
scope.tasks.push(scope.newTask);
scope.newTask = {};
//alert("created new task");
tasks.setTasks(scope.tasks);
};
scope.removeTask = function(id){
for(var i = scope.tasks.length - 1; i >= 0; i--) {
if(scope.tasks[i].id === id) {
scope.tasks.splice(i, 1);
}
}
tasks.setTasks(scope.tasks);
};
scope.loadData = function(){
scope.tasks = {};
scope.tasks = tasks.getTasks();
};
scope.loadData();
}
};
}]);
|
// 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 'vue2-animate/dist/vue2-animate.min.css';
import Vue from 'vue';
import ElementUI from 'element-ui';
import App from './App';
import router from './router/index';
import axios from './http';
import store from './store/store';
// eslint-disable-next-line import/first
import 'element-ui/lib/theme-chalk/index.css';
import './assets/main.css';
import './assets/ele-custom-theme/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = true;
Vue.prototype.axios = axios;
Vue.prototype.calculateAge = (birthday) => { // birthday is a date
const ageDifMs = Date.now() - birthday.getTime();
const ageDate = new Date(ageDifMs); // miliseconds from epoch
return Math.abs(ageDate.getUTCFullYear() - 1970);
};
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
router,
axios,
render: h => h(App),
});
|
import "./style.css"
import React, { useState } from "react"
export default function Home({ moveTo }) {
const [word, setWord] = useState("Know more")
return (
<>
<div id="hero">
<div id="knowMore" className="row">
<div className="col-7 col-xl-11">
<h2>Faisal Nour</h2>
<p>
A Front-end Developer and Certified Professional in Accessibility Core Competencies
</p>
<button to="/about" onClick={moveTo} id="btnKnowMore" type="button" className="btn btn-primary" onMouseLeave={() => { setWord("Know more") }} onMouseEnter={() => { setWord("Know more >") }}>{word}</button>
</div>
</div>
</div>
</>
)
} |
var gulp = require( 'gulp' ),
connect = require('gulp-connect'),
minifyCss = require( 'gulp-minify-css' ),
less = require( 'gulp-less' );
gconcat = require( 'gulp-concat' );
uglify = require( 'gulp-uglify' );
gulp.task( 'webserver', function() {
connect.server({
livereload: true,
// port: 80,
// host: ''
});
});
gulp.task( 'less', function () {
return gulp.src( './assets/less/*.less' )
.pipe( less() )
.pipe( minifyCss() )
.pipe( gulp.dest( './assets/css' ) )
.pipe( connect.reload() );
});
gulp.task( 'minify', function() {
return gulp.src( './assets/css/*.css' )
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe( gulp.dest( './assets/css/' ));
});
gulp.task( 'concat-js', function() {
return gulp.src([
'./build/react.js',
'./build/react-dom.js',
'./bower-components/routie/dist/routie.min.js',
'./bower-components/jquery/dist/jquery.min.js'
])
.pipe( gconcat( './assets/js/dist.js' ) )
.pipe( uglify() )
.pipe( gulp.dest( './' ) );
});
gulp.task( 'watch', function() {
gulp.watch( './assets/less/*/*.less', [ 'less' ]);
})
gulp.task( 'default', [ 'less', 'minify', 'concat-js', 'webserver', 'watch' ]); |
/*global describe:true, it:true, before:true, after:true */
'use strict';
var
_ = require('lodash'),
demand = require('must'),
redis = require('redis'),
fs = require('fs')
;
var RedisAdapter = require('../lib/redis');
var testFeatures = require('./mocks/features.json');
describe('RedisAdapter', function()
{
before(function(done)
{
var r = redis.createClient();
var chain = r.multi();
var features = [];
_.each(testFeatures.features, function(item)
{
features.push(item.name);
chain.hmset('reflip:' + item.name, item);
});
chain.set('reflip:ttl', testFeatures.ttl);
chain.sadd('reflip:features', features);
chain.exec(function(err, replies)
{
done();
});
});
it('requires an options object', function(done)
{
function shouldThrow() { var r = new RedisAdapter(); }
shouldThrow.must.throw();
done();
});
it('requires client or host/port in options', function(done)
{
function shouldThrow() { var r = new RedisAdapter({}); }
shouldThrow.must.throw();
done();
});
it('respects the host/port options', function(done)
{
var r = new RedisAdapter({ host: 'localhost', port: 6379 });
r.must.have.property('client');
r.client.must.be.an.object();
done();
});
it('respects the client option', function(done)
{
var client = redis.createClient();
var r = new RedisAdapter({ client: client });
r.must.have.property('client');
r.client.must.be.an.object();
r.client.must.equal(client);
client.end();
done();
});
it('respects the namespace option', function(done)
{
var client = redis.createClient();
var r = new RedisAdapter({ client: client, namespace: 'foozles:' });
var t = r.makeKey('features');
t.must.match(/^foozles:/);
client.end();
done();
});
it('read() returns a promise', function(done)
{
var client = redis.createClient();
var r = new RedisAdapter({ client: client, namespace: 'foozles:' });
var result = r.read();
result.must.be.truthy();
result.must.be.an.object();
result.must.have.property('then');
result.then.must.be.a.function();
done();
});
it('read() reads the hashes', function(done)
{
var client = redis.createClient();
var r = new RedisAdapter({ client: client });
r.read()
.then(function(result)
{
result.must.be.truthy();
result.must.be.an.object();
result.must.have.property('ttl');
result.ttl.must.equal(testFeatures.ttl);
result.must.have.property('features');
result.features.must.be.an.array();
result.features.length.must.equal(testFeatures.features.length);
done();
}, function(err)
{
demand(err).be.undefined();
}).done();
});
after(function(done)
{
var r = redis.createClient();
var chain = r.multi();
chain.del('reflip:ttl');
chain.del('reflip:features');
_.each(Object.keys(testFeatures.features), function(k)
{
chain.del('reflip:' + k);
});
chain.exec(function(err, replies)
{
done();
});
});
});
|
const express = require('express');
const router = express.Router(); // Construimos un router con el constructor de express
const authHttpHandler = require('./auth.http');
// Definimos la ruta como una entidad
router.route('/login')
.post(authHttpHandler.login);
router.route('/signUp')
.post(authHttpHandler.signup);
exports.router = router; |
function StatsObject ()
{
this.money = 5;
this.xKills = 0;
this.moneyId = "money";
this.xKillsId = "xKills";
this.subscribers = [];
//
this.changeMoney = function (addMoney)
{
this.money += addMoney;
this.updateStats();
};
this.changeXKills = function (addXKills)
{
this.xKills += addXKills;
this.updateStats();
};
this.changeMoneyAndXKills = function (addMoney, addXKills)
{
this.money += addMoney;
this.xKills += addXKills;
this.updateStats();
}
this.updateStats = function (saveData)
{
if (typeof(saveData) == "boolean")
{
updateStats(this, saveData);
}
else
{
updateStats(this, true);
}
}
this.addSubscriber = function (newSubscriber)
{
this.subscribers.push(newSubscriber);
}
this.updateStats(false);
}
function updateStats(statsObject, saveData)
{
document.getElementById(statsObject.moneyId)
.innerHTML = "$ " + statsObject.money;
document.getElementById(statsObject.xKillsId)
.innerHTML = "x kills: " + statsObject.xKills;
for (var i = 0; i < statsObject.subscribers.length; i++)
{
statsObject.subscribers[i].statsUpdated(saveData);
}
}
/*function changeMoney(statsObject, addMoney)
{
statsObject.money += addMoney;
//document.getElementById(statsObject.moneyId).innerHTML = "$ " + statsObject.money;
}
function changeXKills(statsObject, addXKills)
{
statsObject.xKills += addXKills;
document.getElementById(statsObject.xKillsId)
.innerHTML = "x kills: " + statsObject.xKills;
}*/
|
//Make sure SW are supported
if ("serviceWorker" in navigator) {
// Locate the service worker on github pages since its under the <repo-name> and not top-level.
// Example of service-worker URL on github-pages
// https://{username}.github.io/{repo-name}/sw.js
const resolveServiceWorker = () =>
window.location.href.includes("github.io")
? `${window.location.href}sw.js`
: "/sw.js";
window.addEventListener("load", () => {
navigator.serviceWorker
.register(resolveServiceWorker())
.then(reg => console.log("Service Worker: Registered"))
.catch(err => console.log(`Service Worker: Error: ${err}`));
});
} |
// MODIFIED
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var dataCacheName = 'flooditPWACache';
var cacheName = 'flooditPWA';
var filesToCache = [
'/',
'/index.html',
'/js/ai.js',
'/js/ui.js',
'/js/animations.js',
'/js/render.js',
'/js/game.js',
'/js/materialize.min.js',
'/css/mod.css',
'/css/materialize.min.css',
'/img/github-logo.png',
'/manifest.json'
];
self.addEventListener('install', function (e) {
console.log('[ServiceWorker] Install');
e.waitUntil(
caches.open(cacheName).then(function (cache) {
console.log('[ServiceWorker] Caching app shell');
return cache.addAll(filesToCache);
})
);
});
self.addEventListener('activate', function (e) {
console.log('[ServiceWorker] Activate');
e.waitUntil(
caches.keys().then(function (keyList) {
return Promise.all(keyList.map(function (key) {
if (key !== cacheName && key !== dataCacheName) {
console.log('[ServiceWorker] Removing old cache', key);
return caches.delete(key);
}
}));
})
);
return self.clients.claim();
});
self.addEventListener('fetch', function (e) {
console.log('[Service Worker] Fetch', e.request.url);
e.respondWith(
caches.match(e.request).then(function (response) {
return response || fetch(e.request);
})
);
}); |
const { baseResolver } = require('../../../libaries/apollo-resolver-creator')
const properties = baseResolver.createResolver(
async (category, args, context) => {
return context.models.categoryProp.getByCategoryId(category._id)
}
)
const subCategories = baseResolver.createResolver(
async (category, args, context) => {
return context.models.subCategory.getByCategoryId(category._id)
}
)
module.exports = {
Category: {
properties,
subCategories,
},
}
|
import React, {useState, useEffect} from 'react'
import ToDoItem from './todoItem'
import './toDoList.css'
const ToDoList = () => {
const [input, setInput] = useState('');
const [filter, setFilter] = useState('all');
const [toDoItems, setToDoItems] = useState([]);
useEffect(() => {
if (localStorage.getItem('toDoItems') !== null)
setToDoItems(JSON.parse(localStorage.getItem('toDoItems')));
},[])
useEffect(() => {
localStorage.setItem('toDoItems',JSON.stringify(toDoItems))
}, [toDoItems])
const addTodo = (e) => {
e.preventDefault();
if (input.trim() !== '') {
setToDoItems(toDoItems => [...toDoItems, input]);
setInput('')
}
else window.alert("Please fill out a to-do item");
// localStorage.setItem('toDoItems',JSON.stringify(toDoItems));
// console.log(toDoItems);
// console.log(JSON.parse(localStorage.getItem('toDoItems')));
}
const deleteToDo = (index) => {
setToDoItems(toDoItems.filter((item, i) => i !== index));
localStorage.setItem('toDoItems',JSON.stringify(toDoItems));
}
const changeFilter = (e) => {
setFilter(e.target.value)
};
return (
<>
<form action="">
<input type="text" className="todo-input" placeholder="Add to do" onChange={(e) => setInput(e.target.value)} value={input}/>
<button className="todo-button" type="submit" onClick={addTodo}>
<i className="fas fa-plus-square"></i>
</button>
<div className="select">
<select name="todos" className="filter-to-do" onChange={changeFilter} value={filter}>
<option value="all">All</option>
<option value="complete">Completed</option>
<option value="not-complete">Not Complete</option>
</select>
</div>
</form>
<div className="todo-container">
<ul className="todo-list">
{[...toDoItems]?.map((item, index) =>
<ToDoItem handleDelete={() => deleteToDo(index)} filter={filter} item={item} index={index} key={index} />
)}
</ul>
</div>
</>
)
}
export default ToDoList; |
import { useSelector } from 'react-redux';
import { IMAGE_URL } from '../../../services/movie';
import LazyImage from '../../lazy-image/LazyImage';
import Rating from '../rating/Rating';
import { Link } from 'react-router-dom';
import '../grid/Grid.scss'
import './SearchResult.scss';
import { Fragment } from 'react';
import { v4 as uuidv4 } from "uuid";
import { formatMovieTitle } from '../../../util';
const SearchResult = () => {
const { searchResult, searchQuery } = useSelector(state => state.movies);
return (
<div className="searchKeyword" >
<div className="grid-search-title" >
<div className="grid-text1" >Your search keyword:</div>{' '}
<div className="grid-text2" >{searchQuery}</div>
</div>
<div className="grid">
{searchResult.length > 0 ? searchResult.map((image, i) => {
return (
<Fragment key={uuidv4()}>
{image.poster_path && <LazyImage
className="grid-cell"
src={`${IMAGE_URL}${image.poster_path}`}
alt="placeholder"
>
<div className="grid-read-more">
<button className="grid-cell-button"> <Link to={`/${image.id}/${formatMovieTitle(image.title)}/details`} >Read more</Link></button>
</div>
<div className="grid-detail">
<span className="grid-detail-title">{image.title}</span>
<div className="grid-detail-rating">
<Rating
rating={image.vote_average}
totalStars={10}
></Rating>
<div className="grid-vote-average">
{image.vote_average}
</div>
</div>
</div>
</LazyImage>}
</Fragment>
);
}) : <h2 style={{ textAlign: 'center', color: 'aqua' }} >No result is found ((:
</h2>}
</div>
</div>
);
};
export default SearchResult;
|
var SESSION_STATUS = Flashphoner.constants.SESSION_STATUS;
var STREAM_STATUS = Flashphoner.constants.STREAM_STATUS;
var remoteVideo;
var resolution_for_wsplayer;
var stream;
var currentVolumeValue = 100;
var resolution = getUrlParam("resolution");
var mediaProvider = getUrlParam("mediaProvider") || null;
var f;
function init_page() {
//init api
try {
Flashphoner.init({
flashMediaProviderSwfLocation: '/media-provider.swf',
receiverLocation: '/dependencies/websocket-player/WSReceiver2.js',
decoderLocation: '/dependencies/websocket-player/video-worker2.js',
preferredMediaProvider: mediaProvider,
forceFlashForWebRTCBrowser: true,
maxBitRate: 100
});
} catch(e) {
$("#notifyFlash").text("Your browser doesn't support Flash or WebRTC technology necessary for work of an example");
return;
}
//video display
remoteVideo = document.getElementById("remoteVideo");
start();
}
function start() {
if (Flashphoner.getMediaProviders()[0] == "WSPlayer") {
Flashphoner.playFirstSound();
}
// load balancer
//var host = 'rainbow.whenspeak.ru';
var host = 'pikachu.whenspeak.ru';
if(urlParams.room === 6700 ||urlParams.room === '6700'){
host = 'rainbow.whenspeak.ru';
}
if(urlParams.room === 1769 ||urlParams.room === '1769'){
host = 'integrity.whenspeak.ru';
}
if(urlParams.room === 4527 ||urlParams.room === '4527'){
host = 'ohaio.whenspeak.ru';
}
if(urlParams.room === 4864 ||urlParams.room === '4864'){
host = 'sirenity.whenspeak.ru';
}
if(urlParams.room === 8743 ||urlParams.room === '8743'){
host = 'pony.whenspeak.ru';
}
/*
$.get( "//pikachu.whenspeak.ru/?op=getRoom&room=" + urlParams.room, function( data ) {
var response = JSON.parse(data);
var node = response.server;
*/
var node = host;
console.log('Connection to node: ' + node);
//var url = 'wss://' + node + ':8443';
var url = 'wss://' + host + ':8443';
//check if we already have session
if (Flashphoner.getSessions().length > 0) {
var session = Flashphoner.getSessions()[0];
if (session.getServerUrl() == url) {
plays(session);
return;
} else {
//remove session DISCONNECTED and FAILED callbacks
session.on(SESSION_STATUS.DISCONNECTED, function(){});
session.on(SESSION_STATUS.FAILED, function(){});
session.disconnect();
}
}
//create session
console.log("Create new session with url " + url);
Flashphoner.createSession({urlServer: url}).on(SESSION_STATUS.ESTABLISHED, function(session){
setStatus(session.status());
//session connected, start playback
playStream(session);
}).on(SESSION_STATUS.DISCONNECTED, function(){
setStatus(SESSION_STATUS.DISCONNECTED);
onStopped();
}).on(SESSION_STATUS.FAILED, function(){
setStatus(SESSION_STATUS.FAILED);
onStopped();
});
/*
});
*/
}
function playStream(session) {
var streamName = urlParams.room;
var options = {
name: streamName,
display: remoteVideo
};
var resolution = calculate_video_size();
options.playWidth = resolution.width;
options.playHeight = resolution.height;
stream = session.createStream(options).on(STREAM_STATUS.PLAYING, function(stream) {
document.getElementById(stream.id()).addEventListener('resize', function(event){
var streamResolution = stream.videoResolution();
if (Object.keys(streamResolution).length === 0) {
resizeVideo(event.target);
} else {
// Change aspect ratio to prevent video stretching
var ratio = streamResolution.width / streamResolution.height;
var newHeight = Math.floor(options.playWidth / ratio);
resizeVideo(event.target, options.playWidth, newHeight);
}
});
stream.setVolume(currentVolumeValue);
setStatus(stream.status());
}).on(STREAM_STATUS.STOPPED, function() {
setStatus(STREAM_STATUS.STOPPED);
}).on(STREAM_STATUS.FAILED, function() {
setStatus(STREAM_STATUS.FAILED);
}).on(STREAM_STATUS.NOT_ENOUGH_BANDWIDTH, function(stream){
console.log("Not enough bandwidth, consider using lower video resolution or bitrate. Bandwidth " + (Math.round(stream.getNetworkBandwidth() / 1000)) + " bitrate " + (Math.round(stream.getRemoteBitrate() / 1000)));
});
stream.play();
/*
setInterval(function(){
console.log(stream)
console.log("Bandwidth " + (Math.round(stream.getNetworkBandwidth() / 1000)) + " bitrate " + (Math.round(stream.getRemoteBitrate() / 1000)));
}, 1000);
*/
}
function calculate_video_size(){
var ratio = 320 / 240;
var dpt = window.devicePixelRatio;
var windowHeight = window.innerHeight;
var windowWidth = window.innerWidth;
var width = 0;
var height = 0;
var dpt = window.devicePixelRatio;
if(windowHeight > windowWidth){
width = windowWidth;
height = parseInt(windowWidth / ratio);
} else {
width = parseInt(windowHeight * ratio);
height = windowHeight;
}
$('#remoteVideo').height(height);
$('#remoteVideo').width(width);
return {width: width, height: height};
}
//show connection or remote stream status
function setStatus(status) {
var statusField = $("#status");
statusField.text(status).removeClass();
if (status == "PLAYING") {
statusField.attr("class","text-success");
} else if (status == "DISCONNECTED" || status == "ESTABLISHED" || status == "STOPPED") {
statusField.attr("class","text-muted");
} else if (status == "FAILED") {
statusField.attr("class","text-danger");
}
}
var urlParams;
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
urlParams = {};
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);
console.log("urlParams", urlParams);
urlParams["room"] = 4212;
})(); |
//運用FOR迴圈
let scores = [10, 20, 30, 40, 50, 60, 70, 80, 90]; //分數陣列
let arrayLength = scores.length;//陣列中的資料項目
let roundNumber = 0; //目前回合數
let msg = ''; //訊息
//let i; //計時器
//巡訪陣列中的項目
for(let i =0;i<arrayLength;i++){
//陣列索引值自0開始(因此0是代表第一回合)
//將目前回合數加1
roundNumber = (i + 1);
//分數陣列中取得分數
msg +='Round' + roundNumber + ': ';
//Get the score from the scores array(從分數數組中獲取分數)
msg += scores[i] + '<br />';
}
document.getElementById('answer').innerHTML = msg; |
import React, { Component } from "react";
import PropTypes from 'prop-types'
class TodoItem extends Component{
//子组件如果想和父组件通信,要调用父组件传递过来的方法
constructor(props){
super(props);
this.handleDelete = this.handleDelete.bind(this);
}
handleDelete(){
// console.log(this.props.index);
this.props.delete(this.props.index);
}
render() {
const {content, test} = this.props;
return (
<li onClick={this.handleDelete}>{test}-{content}</li>
)
}
}
TodoItem.propTypes = {
test: PropTypes.string.isRequired,
content: PropTypes.string,
delete: PropTypes.func,
index: PropTypes.number
}
TodoItem.defaultProps = {
test: 'hello world'
}
export default TodoItem; |
import React from 'react'
import { Upload, Button, Icon, message } from 'antd';
class UploadFile extends React.Component {
state = {
fileList: [],
}
componentDidMount() {
if (this.props.url) {
this.setState({
fileList: [{
uid: -1,
name: '微信证书',
status: 'done',
url: this.props.url,
}]
})
}
}
componentWillUnmount() {
this.setState({
fileList: []
})
}
beforeUpload = (file) => {
const isp12 = file.type === 'application/x-pkcs12'
if (!isp12) {
message.error('上传格式有误')
}
return isp12;
}
handleChange = ({ file, fileList }) => {
let url;
if (file.status === 'done') {
if (file.response.rel) {
url = file.response.msg
} else {
message.error('上传失败')
}
} else if (file.status === 'removed') {
url = ''
} else if (file.status === 'error') {
message.error(file.error.message)
}
this.props.onChange(url)
fileList = fileList.slice(-1);
this.setState({ fileList })
}
render() {
const props = {
accept: "application/x-pkcs12",
action: '/back/accepagent/fileUpload',
name: 'book',
fileList: this.state.fileList,
beforeUpload: this.beforeUpload,
onChange: this.handleChange,
};
return (
<Upload {...props} >
<Button>
<Icon type="upload" /> upload
</Button>
</Upload>
);
}
}
export default UploadFile |
import React, { useState } from 'react';
import Header from './Header';
import Items from './Items';
import { connect } from 'react-redux';
import { Container, Row } from 'react-bootstrap';
import Sidebar from './Sidebar';
import { getCategory } from '../../actions';
function Collection(props) {
// state yang berisi data dari item yang ditampilan di collection
const [state] = useState({
categories: ['Photograph', 'Drawing'],
});
const { categories } = state;
const { items, category, getCategory } = props;
console.log(category);
return (
<Container>
<Header category="All" />
<Row>
<Sidebar categories={categories} />
<Items items={items} getCategory={getCategory} />
</Row>
</Container>
);
}
const mapStateToProps = (state) => ({
items: state.collections.items,
category: state.collections.category,
});
const mapDispatchToProps = {
getCategory,
};
export default connect(mapStateToProps, mapDispatchToProps)(Collection);
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class CubicModelRendererConfig extends SupCore.Data.Base.ComponentConfig {
constructor(pub) { super(pub, CubicModelRendererConfig.schema); }
static create() {
const emptyConfig = {
cubicModelAssetId: null // , animationId: null,
// horizontalFlip: false, verticalFlip: false,
// castShadow: false, receiveShadow: false,
// color: "ffffff",
// overrideOpacity: false, opacity: null,
// materialType: "basic", shaderAssetId: null
};
return emptyConfig;
}
restore() {
if (this.pub.cubicModelAssetId != null)
this.emit("addDependencies", [this.pub.cubicModelAssetId]);
// if (this.pub.shaderAssetId != null) this.emit("addDependencies", [ this.pub.shaderAssetId ]);
}
destroy() {
if (this.pub.cubicModelAssetId != null)
this.emit("removeDependencies", [this.pub.cubicModelAssetId]);
// if (this.pub.shaderAssetId != null) this.emit("removeDependencies", [ this.pub.shaderAssetId ]);
}
setProperty(path, value, callback) {
let oldDepId;
if (path === "cubicModelAssetId")
oldDepId = this.pub.cubicModelAssetId;
// if (path === "shaderAssetId") oldDepId = this.pub.shaderAssetId;
super.setProperty(path, value, (err, actualValue) => {
if (err != null) {
callback(err);
return;
}
if (path === "cubicModelAssetId" || path === "shaderAssetId") {
if (oldDepId != null)
this.emit("removeDependencies", [oldDepId]);
if (actualValue != null)
this.emit("addDependencies", [actualValue]);
}
// if (path === "overrideOpacity") this.pub.opacity = null;
callback(null, actualValue);
});
}
}
CubicModelRendererConfig.schema = {
cubicModelAssetId: { type: "string?", min: 0, mutable: true },
};
exports.default = CubicModelRendererConfig;
},{}],2:[function(require,module,exports){
"use strict";
/// <reference path="../../scene/ComponentConfig.d.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
const CubicModelRendererConfig_1 = require("./CubicModelRendererConfig");
SupCore.system.registerPlugin("componentConfigs", "CubicModelRenderer", CubicModelRendererConfig_1.default);
},{"./CubicModelRendererConfig":1}]},{},[2]);
|
const express = require('express');
const router = express.Router();
const Controllers = require('../../../controllers');
router.get('/', Controllers.orders.allAction);
router.post('/', Controllers.orders.createAction);
router.get('/:id', Controllers.orders.singleAction);
router.put('/:id', Controllers.orders.updateAction);
router.delete('/:id', Controllers.orders.deleteAction);
module.exports = router; |
import throttle from 'lodash/throttle';
export default class FullPageScroll {
constructor() {
this.THROTTLE_TIMEOUT = 2000;
this.screenElements = document.querySelectorAll(`.slider__item`);
this.slider = document.querySelector('.slider');
this.width = (document.body.clientWidth > 1600) ? document.body.clientWidth : 1600;
this.leafs = document.querySelectorAll('.leaf');
this.menuElements = document.querySelectorAll(`.menu-nav .main-menu__main-text`);
this.activeScreen = 0;
this.onScrollHandler = this.onScroll.bind(this);
this.onUrlHashChengedHandler = this.onUrlHashChanged.bind(this);
}
init() {
document.addEventListener(`wheel`, throttle(this.onScrollHandler, this.THROTTLE_TIMEOUT, {trailing: true}));
window.addEventListener(`popstate`, this.onUrlHashChengedHandler);
this.onUrlHashChanged();
this.addListener();
}
onScroll(evt) {
const currentPosition = this.activeScreen;
this.reCalculateActiveScreenPosition(evt.deltaY);
if (currentPosition !== this.activeScreen) {
this.changePageDisplay();
}
this.scrollAnimation(currentPosition)
}
scrollAnimation(currentPosition) {
this.slider.style.transform = `translate(${-this.width*this.activeScreen}px)`;
//Animation for leafs
Array.from(this.leafs).forEach((elem) => {
elem.style.transform = `translate(${-40*this.activeScreen}px)`
});
//Animation for video button
const play_button = document.querySelector('.slider__video-icon');
if (this.screenElements[this.activeScreen].id === 'my-greenfield') {
play_button.style.left = `50%`
} else if (this.screenElements[this.activeScreen].id === 'philosophy') {
play_button.style.left = `100%`
}
//Animation for text appearance
const current_content = this.screenElements[this.activeScreen].querySelector('.slider__content');
current_content.style.transform = `translate(0px)`;
//Animation for text
const prev_text = this.screenElements[currentPosition].querySelector('.slider__text');
if (prev_text && this.activeScreen > currentPosition) {
prev_text.style.transform= `translate(-200px)`;
setTimeout(() => {
prev_text.style.transform= `translate(0)`
}, 2000)
}
//Animation for last screen
const finish_animation = document.querySelectorAll('.slider__item--animation');
if (this.screenElements[this.activeScreen].id === 'new') {
Array.from(finish_animation).forEach((item) => {
item.style.transform = `translate(0px)`
})
} else {
Array.from(finish_animation).forEach((item) => {
item.style.transform = `translate(200px)`
})
}
}
onUrlHashChanged() {
const newIndex = Array.from(this.screenElements).findIndex((screen) => location.hash.slice(1) === screen.id);
this.activeScreen = (newIndex < 0) ? 0 : newIndex;
this.changePageDisplay();
this.slider.style.width = this.width * this.screenElements.length + 'px';
}
changePageDisplay() {
this.changeVisibilityDisplay();
this.changeActiveMenuItem();
this.emitChangeDisplayEvent();
const $svg = document.querySelector('.main-logo');
if (this.screenElements[this.activeScreen].id === 'intro') {
$svg.classList.add('active')
} else {
if ($svg.classList.contains('active')) {
$svg.classList.remove('active')
}
}
}
changeVisibilityDisplay() {
this.screenElements.forEach((screen) => {
screen.classList.add(`slider__item--hidden`);
screen.classList.remove(`active`);
});
this.screenElements[this.activeScreen].classList.remove(`slider__item--hidden`);
this.screenElements[this.activeScreen].classList.add(`active`);
}
changeActiveMenuItem() {
const activeItem = Array.from(this.menuElements).find((item) => item.dataset.href === this.screenElements[this.activeScreen].id);
if (activeItem) {
this.menuElements.forEach((item) => item.classList.remove(`active`));
activeItem.classList.add(`active`);
}
}
emitChangeDisplayEvent() {
const event = new CustomEvent(`screenChanged`, {
detail: {
'screenId': this.activeScreen,
'screenName': this.screenElements[this.activeScreen].id,
'screenElement': this.screenElements[this.activeScreen]
}
});
document.body.dispatchEvent(event);
}
reCalculateActiveScreenPosition(delta) {
if (delta > 0) {
this.activeScreen = Math.min(this.screenElements.length - 1, ++this.activeScreen);
} else {
this.activeScreen = Math.max(0, --this.activeScreen);
}
}
addListener() {
window.addEventListener(`resize`, () => {
this.width = (document.body.clientWidth > 1600) ? document.body.clientWidth : 1600;
this.slider.style.width = this.width * this.screenElements.length + 'px';
})
}
}
|
import { combineReducers } from 'redux';
import { reducer as formReducer } from 'redux-form'
import FireBaseUserReducer from './firebase_user_reducer';
import FireBaseRestaurantsReducer from './firebase_restaurants_reducer';
import FireBaseProductsReducer from './firebase_products_reducer';
const rootReducer = combineReducers({
currentUser: FireBaseUserReducer,
restaurants: FireBaseRestaurantsReducer,
products: FireBaseProductsReducer,
form: formReducer,
});
export default rootReducer;
|
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
import logFileViewTemplate from './logFileView.html';
import './logFileView.css';
export default {
template: logFileViewTemplate,
bindings: {
fileName: '<'
}
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.