text stringlengths 232 16.3k | domain stringclasses 1
value | difficulty stringclasses 3
values | meta dict |
|---|---|---|---|
<|fim_suffix|>
render() {
return (
<div className='box' >
<div className={this.state.slide}>
<div className='logInTitle'>
<h1>Edit</h1>
</div>
<form className='loginForm' onSubmit={this.handleSubmit}>
... | code_fim | hard | {
"lang": "javascript",
"repo": "MikeEddards/Growth",
"path": "/src/Components/ChildEdit.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
schema.add(
schema.KarmaRed,
definition,
{
Mutation: {
signString
}
}
)<|fim_prefix|>// repo: karmared/graphql-backend path: /src/schemas/KarmaRed/mutations/transaction/signString.js
import schema from "/graphql-schema"
import { chainFetch } from "/transport"
const definition = /... | code_fim | hard | {
"lang": "javascript",
"repo": "karmared/graphql-backend",
"path": "/src/schemas/KarmaRed/mutations/transaction/signString.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>const signString = async (root, { input }) => {
const response = await chainFetch(payloadFromInput(input))
return {
status: response.status,
string: response.data.signed_string,
}
}
schema.add(
schema.KarmaRed,
definition,
{
Mutation: {
signString
}
}
)<|fim_prefix|>... | code_fim | hard | {
"lang": "javascript",
"repo": "karmared/graphql-backend",
"path": "/src/schemas/KarmaRed/mutations/transaction/signString.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: karmared/graphql-backend path: /src/schemas/KarmaRed/mutations/transaction/signString.js
import schema from "/graphql-schema"
import { chainFetch } from "/transport"
const definition = /* GraphQL */`
input SignStringInput {
string: String!
privateKey: String!
}
type SignStringP... | code_fim | medium | {
"lang": "javascript",
"repo": "karmared/graphql-backend",
"path": "/src/schemas/KarmaRed/mutations/transaction/signString.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <div style={{ marginTop: "2em" }}>
<Form.Field>
<Grid stackable>
<Grid.Column width={8}>
<label
style={
({ fontWeight: "bold" },
{ fontSize:... | code_fim | hard | {
"lang": "javascript",
"repo": "EmreKurt/HrmsFrontend",
"path": "/src/pages/Job/AddJobAdvertisement.jsx",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <div style={{ marginTop: "2em" }}>
<Form.Field>
<label
style={
({ fontWeight: "bold" },
{ fontSize: "1em" },
{ fontFamily: "cursive" })
}
... | code_fim | hard | {
"lang": "javascript",
"repo": "EmreKurt/HrmsFrontend",
"path": "/src/pages/Job/AddJobAdvertisement.jsx",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: EmreKurt/HrmsFrontend path: /src/pages/Job/AddJobAdvertisement.jsx
ice();
const JobAdvertAddSchema = Yup.object().shape({
applicationDeadline: Yup.date()
.nullable()
.required("Bu alanın doldurulması zorunludur"),
jobDescription: Yup.string().required("Bu alanın doldurulmas... | code_fim | hard | {
"lang": "javascript",
"repo": "EmreKurt/HrmsFrontend",
"path": "/src/pages/Job/AddJobAdvertisement.jsx",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: fsticza/skeleton-api path: /api/src/auth/token/router.js
const Router = require('koa-router')
const actions = require(<|fim_suffix|> .delete('/', jwt(), actions.destroy)
module.exports = router<|fim_middle|>'./actions')
const jwt = require('@root/middlewares/jwt')
const router = new Router()
r... | code_fim | medium | {
"lang": "javascript",
"repo": "fsticza/skeleton-api",
"path": "/api/src/auth/token/router.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> .delete('/', jwt(), actions.destroy)
module.exports = router<|fim_prefix|>// repo: fsticza/skeleton-api path: /api/src/auth/token/router.js
const Router = require('koa-router')
const actions = require('./actions')
const jwt = require('@root/middlewares/jwt')
cons<|fim_middle|>t router = new Router()
r... | code_fim | medium | {
"lang": "javascript",
"repo": "fsticza/skeleton-api",
"path": "/api/src/auth/token/router.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: nawelmohamed/hippo path: /hippo-app/screens/Screen2Reportdata.js
import React from 'react';
import Images from '../config/Images';
import {
Container,
Icon,
Row,
ScreenContainer,
Touchable,
withTheme,
} from '@draftbit/ui';
import { Image, ScrollView, StyleSheet, Text, View } from 'r... | code_fim | hard | {
"lang": "javascript",
"repo": "nawelmohamed/hippo",
"path": "/hippo-app/screens/Screen2Reportdata.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <Touchable style={styles.Touchable_4m}>
<View style={styles.Viewhb}>
<Icon
name="AntDesign/appstore-o"
color={theme.colors.error}
size={30}
/>
<Text style={{ color: theme.colors.... | code_fim | hard | {
"lang": "javascript",
"repo": "nawelmohamed/hippo",
"path": "/hippo-app/screens/Screen2Reportdata.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: rajkiran7117/ConnectBot path: /modules/SetTemplate.js
"use strict";
var bodyParser = require('body-parser');
var formatAccountPrivate = function(privateAccount){
console.log('private contact in set tempaltes'+privateAccount);
if(privateAccount.length == 0){
return {"msg":"Your data is not fo... | code_fim | hard | {
"lang": "javascript",
"repo": "rajkiran7117/ConnectBot",
"path": "/modules/SetTemplate.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>var setTheAccountPrivate = function(prvAccount){
console.log("updated results is"+prvAccount);
return 'Success';
}
var formatInformation = function(infos){
console.log(infos);
var mess ="";
if(infos.length == 0 ){
mess ={"text":"No Information Available"};
}else {
mess = infos;
}
return mess;... | code_fim | hard | {
"lang": "javascript",
"repo": "rajkiran7117/ConnectBot",
"path": "/modules/SetTemplate.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> toggle = () => {
this.setState({
collapsed: !this.state.collapsed,
});
}
onSelectChange = (selectedRowKeys) => {
console.log('selectedRowKeys changed: ', selectedRowKeys);
console.log(selectedRowKeys.length)
this.setState({
selectedRowKeys,
keylist: selectedRowK... | code_fim | hard | {
"lang": "javascript",
"repo": "youndoldman/yzwaters",
"path": "/src/parameter/parameter.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: youndoldman/yzwaters path: /src/parameter/parameter.js
<FormItem style={{ margin: 0 }}>
{getFieldDecorator(dataIndex, {
rules: [{
required: true,
message: `Please Input ${title}!`,
}]... | code_fim | hard | {
"lang": "javascript",
"repo": "youndoldman/yzwaters",
"path": "/src/parameter/parameter.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
cancel = () => {
this.setState({ editingKey: '' });
};
componentWillMount = () => {
document.title = "设备基本信息";
function showTime() {
let nowtime = new Date();
let year = nowtime.getFullYear();
let month = nowtime.getMonth() + 1;
let date = nowtime.getDate();
... | code_fim | hard | {
"lang": "javascript",
"repo": "youndoldman/yzwaters",
"path": "/src/parameter/parameter.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>(item), 1);
}
this.amount = 0;
this.cartItems.forEach((item) => {
this.amount += item.price * item.quantity;
});
});
}
},
},
mounted()... | code_fim | hard | {
"lang": "javascript",
"repo": "Vertenz/shopJSVue",
"path": "/public/script/CartComp.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: Vertenz/shopJSVue path: /public/script/CartComp.js
Vue.component('cart', {
data() {
return {
//TODO counter актуальный
// cartUrl: '/cart',
cartItems: [],
amount: 0
}
},
methods: {
// addProduct(product) {
... | code_fim | hard | {
"lang": "javascript",
"repo": "Vertenz/shopJSVue",
"path": "/public/script/CartComp.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <a href="single.html"><img src="images/purchases1.jpg" alt="#" class="purchases__img"></a>
</div>
<div class="purchases__description-box">
<h4 class="purc... | code_fim | hard | {
"lang": "javascript",
"repo": "Vertenz/shopJSVue",
"path": "/public/script/CartComp.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>export const fetchMoviesReducer = (state = initialState, action) => {
switch (action.type) {
case FETCH_MOVIES_BEGIN:
return { ...state, loading: true, error: null };
case FETCH_MOVIES_SUCCESS:
return { ...state, loading: false, movies: action.payload };
case FETCH_MOVIES_FAILURE... | code_fim | medium | {
"lang": "javascript",
"repo": "abhishekakade/flickk",
"path": "/src/reducers/MoviesReducer.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: abhishekakade/flickk path: /src/reducers/MoviesReducer.js
// import { fetchMoviesBegin, fetchMoviesSuccess, fetchMoviesFailure, FETCH_MOVIES_BEGIN, FETCH_MOVIES_SUCCESS, FETCH_MOVIES_FAILURE } from "../actions";
import {
FETCH_MOVIES_BEGIN,
FETCH_MOVIES_SUCCESS,
FETCH_MOVIES_FAILURE
// C... | code_fim | medium | {
"lang": "javascript",
"repo": "abhishekakade/flickk",
"path": "/src/reducers/MoviesReducer.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>let lastnumber=null;
BackgroundJob.register({
jobKey: 'aaa',
job: ()=>
{
CallLogs.show((status)=> {
const js= JSON.parse(status)
const phNum = js[0].phoneNumber
if(lastnumber !== phNum && phnumb.includes(phNum.toString())){
PushNotification.localNotification({
messa... | code_fim | medium | {
"lang": "javascript",
"repo": "wscodelabs/callLOg",
"path": "/src/CallNotification.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: wscodelabs/callLOg path: /src/CallNotification.js
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity,
AsyncStorage
} from 'react-native';
import PushNotification from 'react-native-push-notification'
import BackgroundJob from 'react-native-backg... | code_fim | hard | {
"lang": "javascript",
"repo": "wscodelabs/callLOg",
"path": "/src/CallNotification.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
render() {
return (
<View style={styles.container}>
<TouchableOpacity>
<Text>ggh</Text>
</TouchableOpacity>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'cen... | code_fim | hard | {
"lang": "javascript",
"repo": "wscodelabs/callLOg",
"path": "/src/CallNotification.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: garajo/react-advanced path: /src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { ThemedTable } from './ThemedTable'
import {
Header as HocHeader,
RowCells as HocCells,
} from './Hoc'
<|fim_suffix|>ReactDOM.render(
(<div>
{title}
<ThemedTable
H... | code_fim | medium | {
"lang": "javascript",
"repo": "garajo/react-advanced",
"path": "/src/index.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <ThemedTable
Header={ HocHeader }
headings={['id', 'name', 'value']}
values={
[
{ id: 'fee', name: 'fee_name', value: 1},
{ id: 'fi', name: 'fi_name', value: 2},
{ id: 'fo', name: 'fo_name', value: 3},
{ id: 'fum', name: 'fum_name', v... | code_fim | medium | {
"lang": "javascript",
"repo": "garajo/react-advanced",
"path": "/src/index.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> //取年
year = s_time_src.getFullYear()
//取月
if ((s_time_src.getMonth() + 1) < 10)
month = "0" + (s_time_src.getMonth() + 1)
else
month = "" + (s_time_src.getMonth() + 1)
//取日
if (s_time_src.getDate() < 10)
day = "0" + s_time_src.getDate()
else
day = ""... | code_fim | hard | {
"lang": "javascript",
"repo": "flyeaglet/MyFirstNodeJs",
"path": "/src/showStockPrice.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: flyeaglet/MyFirstNodeJs path: /src/showStockPrice.js
import React, { Component } from 'react'
import './App.css'
import ReactEcharts from 'echarts-for-react';
import axios from 'axios'
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Select from 'react-select';
im... | code_fim | hard | {
"lang": "javascript",
"repo": "flyeaglet/MyFirstNodeJs",
"path": "/src/showStockPrice.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>ng === 'zh-CN'){
langObj = zh;
}
return langObj[id];
};
export {
$tWrapper,
$t
};<|fim_prefix|>// repo: qianxiaoning/mpa-react16.7.0 path: /src/common/utils/lang.js
let en = {};
let zh = {};
const $tWrapper = (enReal, zhReal) => {
en = enReal;
zh = zhReal;
};
const $t = ... | code_fim | medium | {
"lang": "javascript",
"repo": "qianxiaoning/mpa-react16.7.0",
"path": "/src/common/utils/lang.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: qianxiaoning/mpa-react16.7.0 path: /src/common/utils/lang.js
let en = {};
let zh = {};
const $tWrapper = (enReal, zhReal) => {
en = enReal;
zh = zhReal;
};
const $t = (id) => {
const storageLang = localStorage.lang;
const lang = storageLang === 'zh-CN' ?<|fim_suffix|>ng === 'zh-... | code_fim | medium | {
"lang": "javascript",
"repo": "qianxiaoning/mpa-react16.7.0",
"path": "/src/common/utils/lang.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> <View style={styles.chevronContainer}>
<Icon
name={iconName}
size={CHEVRON_SIZE}
color={colors.subtleText}
style={styles.chevron}
/>
</View>
</View>
</TouchableHighlight>
);
};
export default ListItem;<|fim_pr... | code_fim | hard | {
"lang": "javascript",
"repo": "piumimaheshika/React-Native-Sample",
"path": "/app/components/ListItem/ListItem.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: piumimaheshika/React-Native-Sample path: /app/components/ListItem/ListItem.js
import React from 'react';
import {View, Text, Image, TouchableHighlight, Platform} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import styles, {CHEVRON_SIZE} from './styles';
import {cap... | code_fim | hard | {
"lang": "javascript",
"repo": "piumimaheshika/React-Native-Sample",
"path": "/app/components/ListItem/ListItem.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>const [ , city, state = 'New York'] = address;
console.log(`You are in ${city} ${state}.`);
const item = ['Coffee (iced)', '$3.00', '$3.50', '$3.75'];
const [itemName, ,mediumPrice] = item;
console.log(`A medium ${itemName} costs ${mediumPrice}`);<|fim_prefix|>// repo: luisbilecki/react_web_developer ... | code_fim | medium | {
"lang": "javascript",
"repo": "luisbilecki/react_web_developer",
"path": "/expensify-app/src/playground/destructuring.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>const book = {
title: 'The Da Vinci Code',
author: 'Dan Brown',
publisher: {
//name: 'Doubleday'
}
}
const { name: publisherName = 'Self-Published' } = book.publisher
console.log(publisherName);
*/
//
// Array destructuring
//
const address = ['1299 S Juniper Street', 'Philadel... | code_fim | medium | {
"lang": "javascript",
"repo": "luisbilecki/react_web_developer",
"path": "/expensify-app/src/playground/destructuring.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: luisbilecki/react_web_developer path: /expensify-app/src/playground/destructuring.js
// Object Destructuring
/*
const person = {
age: 24,
location: {
city: 'Rio Negrinho',
temp: 23
}
}
const { firstName:name = 'Anonymous', age } = person;
// const name = person.name... | code_fim | medium | {
"lang": "javascript",
"repo": "luisbilecki/react_web_developer",
"path": "/expensify-app/src/playground/destructuring.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>export default connect(mapStateToProps)(RouteMap)
// https://openmaptiles.github.io/osm-bright-gl-style/style-cdn.json
// mapbox://styles/mapbox/streets-v9?optimize=true<|fim_prefix|>// repo: bgoonz/UsefulResourceRepo2.0 path: /MY_REPOS/a-whole-bunch-o-gatsby-templates/pantry-for-good/client/modules/dr... | code_fim | hard | {
"lang": "javascript",
"repo": "bgoonz/UsefulResourceRepo2.0",
"path": "/MY_REPOS/a-whole-bunch-o-gatsby-templates/pantry-for-good/client/modules/driver/components/route/mapbox/RouteMap.js",
"mode": "spm",
"license": "MIT",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: khaleddse/Client_Enchere_Project path: /src/axios-ordres.js
import axios from 'axios';
<|fim_suffix|>export default instance;<|fim_middle|>const instance = axios.create({
baseURL: 'http://localhost:5000'
});
export const setToken = (token) => {
axios.defaults.headers.common["Authorizati... | code_fim | medium | {
"lang": "javascript",
"repo": "khaleddse/Client_Enchere_Project",
"path": "/src/axios-ordres.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>export default instance;<|fim_prefix|>// repo: khaleddse/Client_Enchere_Project path: /src/axios-ordres.js
import axios from 'axios';
<|fim_middle|>const instance = axios.create({
baseURL: 'http://localhost:5000'
});
export const setToken = (token) => {
axios.defaults.headers.common["Authorizati... | code_fim | medium | {
"lang": "javascript",
"repo": "khaleddse/Client_Enchere_Project",
"path": "/src/axios-ordres.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: frkntplglu/rick-and-morty-graphql path: /src/components/CharacterDetail/CharacterDetail.js
import { useQuery, gql } from '@apollo/client';
import React from 'react'
import { useParams } from 'react-router'
import PageHead from '../PageHead/PageHead';
import "./characterdetail.scss"
import spinne... | code_fim | hard | {
"lang": "javascript",
"repo": "frkntplglu/rick-and-morty-graphql",
"path": "/src/components/CharacterDetail/CharacterDetail.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> const {id} = useParams();
const GET_CHARACTERS = gql`
query getCharacters($id: ID!){
character(id: $id){
id
name
status
species
location{
id
name
}
image
episode{
id
name
}
}
}... | code_fim | medium | {
"lang": "javascript",
"repo": "frkntplglu/rick-and-morty-graphql",
"path": "/src/components/CharacterDetail/CharacterDetail.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: goddessting/space path: /src/separators.js
function addCommaArrary(numArrays) {
var count = 0;
var commaArray = [];
numArrays.forEach(function (numArray) {
commaArray.push(numArray);
count++;
if (count % 3 === 0 && count < numArrays.length) {
comma... | code_fim | hard | {
"lang": "javascript",
"repo": "goddessting/space",
"path": "/src/separators.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> var arrays = num.toString().split(".");
if (arrays.length === 1) {
arrays.push('0');
}
var arrayElement = arrays[0].toString().split("");
var sortNumber = returnSortNumber(arrayElement);
var commaArray = addCommaArrary(sortNumber);
var numberArray = sortNumberArray(com... | code_fim | hard | {
"lang": "javascript",
"repo": "goddessting/space",
"path": "/src/separators.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>=void 0!==n.attr("contenteditable")&&"false"!==n.attr("contenteditable");return"radio"===r||"checkbox"===r?this.findByName(e.name).filter(":checked").val():"number"===r&&void 0!==e.validity?e.validity.badInput?"NaN":n.val():(i=a?n.text():n.val(),"file"===r?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(s... | code_fim | hard | {
"lang": "javascript",
"repo": "stv74/runsmart",
"path": "/dist/js/script.min.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: stv74/runsmart path: /dist/js/script.min.js
items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=thi... | code_fim | hard | {
"lang": "javascript",
"repo": "stv74/runsmart",
"path": "/dist/js/script.min.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: stv74/runsmart path: /dist/js/script.min.js
n().eq(this.previous),n=this.core.$stage.children().eq(this.next),r=this.core.settings.animateIn,a=this.core.settings.animateOut;this.core.current()!==this.previous&&(a&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.s... | code_fim | hard | {
"lang": "javascript",
"repo": "stv74/runsmart",
"path": "/dist/js/script.min.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>url: 'http://localhost:3000/register/parent',
cName: 'nav-links'
},
{
title: 'Parent Login',
url: 'http://localhost:3000/login/parent',
cName: 'nav-links'
},
{
title: 'Administrator Login',
url: 'http://localhost:3000/login/admin',
... | code_fim | medium | {
"lang": "javascript",
"repo": "NingjiaHuang/CSDS393",
"path": "/client/src/components/Navbar/MenuItems.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>',
cName: 'nav-links'
},
{
title: 'Administrator Login',
url: 'http://localhost:3000/login/admin',
cName: 'nav-links'
}
]<|fim_prefix|>// repo: NingjiaHuang/CSDS393 path: /client/src/components/Navbar/MenuItems.js
export const MenuItems = [
{
title... | code_fim | medium | {
"lang": "javascript",
"repo": "NingjiaHuang/CSDS393",
"path": "/client/src/components/Navbar/MenuItems.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: NingjiaHuang/CSDS393 path: /client/src/components/Navbar/MenuItems.js
export const MenuItems = [
{
title: 'Breeder Register',
url: 'http://localhost:3000/register/breeder',
cName: 'nav-links'
},
{
title: 'Breeder Login',
url: 'http://localhost... | code_fim | medium | {
"lang": "javascript",
"repo": "NingjiaHuang/CSDS393",
"path": "/client/src/components/Navbar/MenuItems.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: adriennem76/aws-react-native path: /App.js
import React from 'react';
import Amplify from 'aws-amplify'
import config from './aws-exports'
Amplify.configure(config)
import { SafeAreaView, StyleSheet, Text, View, TextInput, Button} from 'react-native';
import { withAuthenticator } from 'aws-ampl... | code_fim | hard | {
"lang": "javascript",
"repo": "adriennem76/aws-react-native",
"path": "/App.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> state = {
name: '', description: '', city: '', restaurants: []
}
async componentDidMount() {
try {
const restaurantData = await API.graphql(graphqlOperation(listRestaurants))
console.log('restaurantData:', restaurantData)
this.setState({
restaurants: restaurantData.... | code_fim | hard | {
"lang": "javascript",
"repo": "adriennem76/aws-react-native",
"path": "/App.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>=0,bp="borderFill",bq=0xFFFFFF,br="'微软雅黑'",bs=0xFFD7D7D7,bt="imageOverrides",bu="c3bce252bdbc49cd8e8970a59cbbbc96",bv="isContained",bw="richTextPanel",bx="paragraph",by="images",bz="normal~",bA="images/s-我的成绩单_1/u1246.png",bB="generateCompound",bC="c3e6e0ba4c14411db0194a8479f0b95b",bD=393,bE=292,bF=127,bG... | code_fim | hard | {
"lang": "javascript",
"repo": "wind641727121/NEU-SE-17",
"path": "/软件工程/软件工程导论/第三章需求分析/成绩单+报告原型演示 - 最终版/files/p-董一鸣的成绩单_1/data.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: wind641727121/NEU-SE-17 path: /软件工程/软件工程导论/第三章需求分析/成绩单+报告原型演示 - 最终版/files/p-董一鸣的成绩单_1/data.js
(U,cF,W,X,Y,cw,n,cx,bb,cx,bc,bd,s,_(bW,bX,bk,_(bl,bo,bn,cz),be,_(bf,cy,bh,cz),t,cA,bp,_(y,z,A,cn),N,cd,ce,cB,x,_(y,z,A,cC)),Q,_(),bt,_(),T,[_(U,cG,W,X,Y,null,bv,bd,n,bw,bb,bx,bc,bd,s,_(bW,bX,bk,_(bl,bo,... | code_fim | hard | {
"lang": "javascript",
"repo": "wind641727121/NEU-SE-17",
"path": "/软件工程/软件工程导论/第三章需求分析/成绩单+报告原型演示 - 最终版/files/p-董一鸣的成绩单_1/data.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: wind641727121/NEU-SE-17 path: /软件工程/软件工程导论/第三章需求分析/成绩单+报告原型演示 - 最终版/files/p-董一鸣的成绩单_1/data.js
,cx,bc,bd,s,_(bk,_(bl,cV,bn,cz),be,_(bf,cM,bh,cz),t,cA,bp,_(y,z,A,cn),N,br,ce,cB),Q,_(),bt,_(),T,[_(U,cZ,W,X,Y,null,bv,bd,n,bw,bb,bx,bc,bd,s,_(bk,_(bl,cV,bn,cz),be,_(bf,cM,bh,cz),t,cA,bp,_(y,z,A,cn),N,b... | code_fim | hard | {
"lang": "javascript",
"repo": "wind641727121/NEU-SE-17",
"path": "/软件工程/软件工程导论/第三章需求分析/成绩单+报告原型演示 - 最终版/files/p-董一鸣的成绩单_1/data.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
/**
* @swagger
* /login:
* post:
* tags:
* - Users
* description: User login testing
* produces:
* - application/json
* consumes:
* - application/x-www-form-urlencoded
* parameters:
* - name: username
* in: formData
* type: string
* required: true
* ... | code_fim | hard | {
"lang": "javascript",
"repo": "bethebikash/node-firstproject",
"path": "/index.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: bethebikash/node-firstproject path: /index.js
const express = require('express')
const parcer = require('body-parser')
const User = require('./models/User')
const UserController = require('./controllers/UserController')
const AuthController = require('./controllers/AuthController')
const multer... | code_fim | hard | {
"lang": "javascript",
"repo": "bethebikash/node-firstproject",
"path": "/index.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>d.
</p>
<button>
Get to Know us
</button>
</div>
</div>
);
};
export default Hero;<|fim_prefix|>// repo: tborsa/ontractors path: /src/Hero.jsx
import React, {useEffect, useRef} from 'react';
import './Pane.css';... | code_fim | hard | {
"lang": "javascript",
"repo": "tborsa/ontractors",
"path": "/src/Hero.jsx",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
</div>
<p>
We are a community focsed Vancouver based web development shop looking to help get your next idea off the ground.
</p>
<button>
Get to Know us
</button>
</div>
... | code_fim | hard | {
"lang": "javascript",
"repo": "tborsa/ontractors",
"path": "/src/Hero.jsx",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: tborsa/ontractors path: /src/Hero.jsx
import React, {useEffect, useRef} from 'react';
import './Pane.css';
const Hero = () => {
return (
<div className="pane container white flex row ParallaxContainer<|fim_suffix|>
</div>
<p>
We ... | code_fim | hard | {
"lang": "javascript",
"repo": "tborsa/ontractors",
"path": "/src/Hero.jsx",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>e
src={mongodb}
alt="MongoDb"
className="size"
width={200}
height={200}
/>
<h2>MongoDb</h2>
<p>+-1 year</p>
</span>
</div>
</span>
</div>
<sty... | code_fim | hard | {
"lang": "javascript",
"repo": "Cryafonic/Nextjs-resume",
"path": "/pages/index.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: Cryafonic/Nextjs-resume path: /pages/index.js
import indexStyles from "../styles/index.module.css";
import Image from "next/image";
import html5 from "../static/images/HTML5.png";
import css3 from "../static/images/css3.png";
import javaScript from "../static/images/javascript.png";
import react... | code_fim | hard | {
"lang": "javascript",
"repo": "Cryafonic/Nextjs-resume",
"path": "/pages/index.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: adamjoseph/FullStackToDo path: /app/ToDo.Factory.js
(function() {
'use strict';
angular
.module('myApp')
.factory('ToDoFactory', ToDoFactory);
ToDoFactory.$inject = ['$http', '$q'];
/* @ngInject */
function ToDoFactory($http, $q) {
var service = {
... | code_fim | hard | {
"lang": "javascript",
"repo": "adamjoseph/FullStackToDo",
"path": "/app/ToDo.Factory.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>
return $http({
method: 'DELETE',
url: 'https://localhost:/api/ToDoEntries/' + id
})
}
function UpdateToDo(id, todo) {
return $http.put('http://localhost:/api/ToDoEntries/'+id, todo);
}
}
})();<|fim_prefix|>// repo: adamjoseph/... | code_fim | hard | {
"lang": "javascript",
"repo": "adamjoseph/FullStackToDo",
"path": "/app/ToDo.Factory.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>export function patch(url, data, config) {
const source = CancelToken.source()
const request = _girderClient.patch(url, data, { ...config, cancelToken: source.token })
request[CANCEL] = () => source.cancel()
return request
}
export function girderClient() {
return _girderClient;
}
export funct... | code_fim | hard | {
"lang": "javascript",
"repo": "ayushshivani/mongochemclient",
"path": "/src/rest/index.js",
"mode": "spm",
"license": "BSD-3-Clause",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: tsamat23/senior_project path: /frontend/src/containers/Results/Results.js
import React, {Component, Fragment} from "react";
import {connect} from "react-redux";
import ResultsTable from "../../components/ResultsTable/ResultsTable";
import {fetchAllBlock} from "../../store/actions/blocksActions"... | code_fim | hard | {
"lang": "javascript",
"repo": "tsamat23/senior_project",
"path": "/frontend/src/containers/Results/Results.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> componentDidMount() {
this.props.onFetchResults();
};
render() {
const {classes} = this.props;
console.log(this.props.results);
return (
this.props.results ?
<Fragment>
<Paper>Ваш балл за тестирование: {this.props... | code_fim | medium | {
"lang": "javascript",
"repo": "tsamat23/senior_project",
"path": "/frontend/src/containers/Results/Results.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> expect(Crypt.decrypt(encryptedText)).to.be.equal(text);
});
});<|fim_prefix|>// repo: mr-dxdy/myTV path: /src/js/crypt-test.js
import { expect } from '../../test/helpers.js'
<|fim_middle|>import Settings from './settings.js'
import Crypt from './crypt.js'
describe('Crypt', () => {
xit('encrypt ... | code_fim | hard | {
"lang": "javascript",
"repo": "mr-dxdy/myTV",
"path": "/src/js/crypt-test.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: mr-dxdy/myTV path: /src/js/crypt-test.js
import { expect } from '../../test/helpers.js'
<|fim_suffix|> expect(Crypt.decrypt(encryptedText)).to.be.equal(text);
});
});<|fim_middle|>import Settings from './settings.js'
import Crypt from './crypt.js'
describe('Crypt', () => {
xit('encrypt ... | code_fim | hard | {
"lang": "javascript",
"repo": "mr-dxdy/myTV",
"path": "/src/js/crypt-test.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: jusheng/school path: /template/module/classmanage/studentclass/listcontroller.js
'use strict';
angular.module('app')
.controller('listController', [ '$rootScope', '$scope', '$http', '$state','Upload','ngDialog','API',
function($rootScope, $scope, $http, $state,... | code_fim | hard | {
"lang": "javascript",
"repo": "jusheng/school",
"path": "/template/module/classmanage/studentclass/listcontroller.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> temp.length > 0 && API.post("/classes/student/delete", {
"id": temp.join(",")
}, success, error);
}
}
$scope.s_all = 0; //全选标记
$scope.select_all = function() {
$scope.s_all = !$scope.s_all;
for (var i = 0; i < $scope.pageInfo.l... | code_fim | hard | {
"lang": "javascript",
"repo": "jusheng/school",
"path": "/template/module/classmanage/studentclass/listcontroller.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> var initialInput = React.DOM.table(
{
className: "combatTable"
}, React.DOM.tbody(
{}, rows));
var cancelButton = React.DOM.button(
{
key: "cancelButton",
onClick: self.cancel
}, "Cancel");
var okBu... | code_fim | hard | {
"lang": "javascript",
"repo": "jmthompson2015/vizzini",
"path": "/game/starfightersquadrons/src/main/js/process/ui/WeaponAndDefenderChooser.js",
"mode": "spm",
"license": "MIT",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: gsellator/Lotofoot path: /src/pages/InitActions.js
// Actions to run when the router matches a route. Used in app/routes.js
import Actions from "../constants/Actions";
import MeAction from "../actions/Pages/MeAction";
import ApiAction from "../actions/Pages/ApiAction";
const getRef = (context, ... | code_fim | hard | {
"lang": "javascript",
"repo": "gsellator/Lotofoot",
"path": "/src/pages/InitActions.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> games(context, route, done) {
getRef(context, route)
.then(() => {
return getModal(context, route);
})
.then(() => {
return Promise.all([
context.executeAction(ApiAction.getApi, { route, view: 'Games', action: Actions.APIOK_GAMES }),
context.executeAction(ApiA... | code_fim | hard | {
"lang": "javascript",
"repo": "gsellator/Lotofoot",
"path": "/src/pages/InitActions.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> help(context, route, done) {
getRef(context, route)
.then(() => {
return getModal(context, route);
})
.then(() => {
done();
}, (err) => {
done();
console.log('InitActions Error : ', err.message);
});
},
account(context, route, done) {
getRef(conte... | code_fim | hard | {
"lang": "javascript",
"repo": "gsellator/Lotofoot",
"path": "/src/pages/InitActions.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> var params="";
params+="&event_type=WEB_FORM";
params+="&event_action=Uploaded "+ $(selector).text();
params+="&extract=true";
if(showReason && frm.event_reason.value!=""){
params+="&event_reason="+frm.event_reason.value;
}else{
params+="&event_reason=standard upload";
}
... | code_fim | hard | {
"lang": "javascript",
"repo": "NrgXnat/xnat-reboot",
"path": "/src/main/webapp/scripts/uploaders/ConfiguredResourceUploader.js",
"mode": "spm",
"license": "BSD-2-Clause-Views",
"source": "the-stack-v2"
} |
<|fim_suffix|>妇开始吃药后,这段时日我怕她嘴馋,都陪着她忌口,多久没涮火锅啦!”<br \/> <br \/> “那就去呀,还磨蹭啥呢?”杨若晴道。<br \/> <br \/> 万庆春摇头:“算了,我涮了火锅回家去,她那狗鼻子肯定能嗅出来,到时候她忍不住破功了,药性没了,我儿子也就没啦,我还是忍忍吧,往后有的是机会!”<br \/> <br \/> 听到万庆春这番话,杨若晴竖起了大拇指:“好男人,疼媳妇,不错不错,那你先回去吧!”<br \/> <br \/> “等到你媳妇能涮火锅了,到时候我另外单独请你们两口子涮!”她道。<br \/> <br \/> “好,就等着大姐头这句话呢,那我先走了!”... | code_fim | hard | {
"lang": "javascript",
"repo": "biqugeniubi/resource",
"path": "/books/2213/962452.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: biqugeniubi/resource path: /books/2213/962452.js
renderContent({"book":{"id":2213,"name":"丑女种田:山里汉宠妻无度","keywords":"丑女种田:山里汉宠妻无度,丑女种田:山里汉宠妻无度最新章节","description":"丑女种田:山里汉宠妻无度最新章节由网友提供,《丑女种田:山里汉宠妻无度》情节跌宕起伏、扣人心弦,是一本情节与文笔俱佳的玄幻小说,爱看小说免费提供丑女种田:山里汉宠妻无度最新清爽干净的文字章节在线阅读。","author":"巅峰小雨","brief":"又胖又傻的丑女... | code_fim | hard | {
"lang": "javascript",
"repo": "biqugeniubi/resource",
"path": "/books/2213/962452.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: hernancete/adventofcode path: /day12/puzzle1.js
const Moon = require('./utils').Moon;
// <x=-5, y=6, z=-11>
// <x=-8, y=-4, z=-2>
// <x=1, y=16, z=4>
// <x=11, y=11, z=-4>
const input = [
[-5, 6, -11],
[-8, -4, -2],
[1, 16, 4],
[11, 11, -4],
];
const Io = new Moon(input[0][0], input[0]... | code_fim | hard | {
"lang": "javascript",
"repo": "hernancete/adventofcode",
"path": "/day12/puzzle1.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>console.log('Io', Io.getPos(), Io.getVel(), ioE);
console.log('Europa', Europa.getPos(), Europa.getVel(), europaE);
console.log('Ganymede', Ganymede.getPos(), Ganymede.getVel(), ganymedeE);
console.log('Callisto', Callisto.getPos(), Callisto.getVel(), callistoE);
Rta = ioE + europaE + ganymedeE + callisto... | code_fim | hard | {
"lang": "javascript",
"repo": "hernancete/adventofcode",
"path": "/day12/puzzle1.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>aderText:"About Us"}),a.a.createElement("p",null,"Sobre os desenvolvedores"))}},LbRr:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI"),a=n.n(r);function o(e){return a.a.createElement("h1",null,e.headerText)}}}]);
//# sourceMappingURL=component---src-pages-about-js-c8fb1b996033... | code_fim | medium | {
"lang": "javascript",
"repo": "aluiziodeveloper/gatsby-starter",
"path": "/public/component---src-pages-about-js-c8fb1b9960333a47ab2a.js",
"mode": "spm",
"license": "0BSD",
"source": "the-stack-v2"
} |
<|fim_suffix|>exports.logout = async (ctx, next) => {
ctx.session.user = {}
ctx.redirect('/')
}
exports.list = async (ctx, next) => {
let userList = await User.find({})
console.log(userList)
await ctx.render('pages/userlist.pug', {
title: '用户列表页面',
userList
})
}
exports.s... | code_fim | hard | {
"lang": "javascript",
"repo": "FateCycle/wechatAccount",
"path": "/app/controller/user.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: FateCycle/wechatAccount path: /app/controller/user.js
const User = require('../database/schema/user')
exports.showSignin = async (ctx, next) => {
await ctx.render('pages/signin.pug', {
title: '登录页面'
})
}
exports.showSignup = async (ctx, next) => {
await ctx.render('pages/... | code_fim | hard | {
"lang": "javascript",
"repo": "FateCycle/wechatAccount",
"path": "/app/controller/user.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>}
exports.signup = async (ctx, next) => {
let {
email,
password,
nickname
} = ctx.request.body.user
let user = await User.findOne({
email
})
if (user) return ctx.redirect('/user/signin')
user = new User({
email,
password,
nickname... | code_fim | hard | {
"lang": "javascript",
"repo": "FateCycle/wechatAccount",
"path": "/app/controller/user.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>a().latitude, $('#agregar_marcador').data().longitude);
map.panTo(position);
map.setZoom(15);
})
});<|fim_prefix|>// repo: gabrielfagundez/mepaseaste path: /app/assets/javascripts/home.js
$(function(){
$('#agregar_marcador').click(function(){
createMarkerGivenLatLng($('#agregar_marcador')... | code_fim | medium | {
"lang": "javascript",
"repo": "gabrielfagundez/mepaseaste",
"path": "/app/assets/javascripts/home.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>'close');
// Zoom al punto ingresado
var position = new google.maps.LatLng($('#agregar_marcador').data().latitude, $('#agregar_marcador').data().longitude);
map.panTo(position);
map.setZoom(15);
})
});<|fim_prefix|>// repo: gabrielfagundez/mepaseaste path: /app/assets/javascripts/home.... | code_fim | medium | {
"lang": "javascript",
"repo": "gabrielfagundez/mepaseaste",
"path": "/app/assets/javascripts/home.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: gabrielfagundez/mepaseaste path: /app/assets/javascripts/home.js
$(function(){
$('#agregar_marcador').click(function(){
createMarkerGivenLatLng($('#agregar_marcador').data().latitude, $('#agregar_marcador').data().longitude);
$('#modalDestinosUsuales').foundation('reveal', <|fim_suffix... | code_fim | medium | {
"lang": "javascript",
"repo": "gabrielfagundez/mepaseaste",
"path": "/app/assets/javascripts/home.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>BucketListView.prototype.createHeading = function (textContent) {
const heading = document.createElement('h3');
heading.textContent = textContent;
return heading;
};
BucketListView.prototype.createDetail = function (label, text) {
const detail = document.createElement('p');
detail.textContent =... | code_fim | medium | {
"lang": "javascript",
"repo": "mark-mackay/week_08_day3_bucketList_lab",
"path": "/client/src/views/bucket_list_view.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: mark-mackay/week_08_day3_bucketList_lab path: /client/src/views/bucket_list_view.js
const PubSub = require('../helpers/pub_sub.js');
const BucketListView = function (container) {
this.container = container;
};
BucketListView.prototype.render = function (bucketList) {
const bucketListContain... | code_fim | medium | {
"lang": "javascript",
"repo": "mark-mackay/week_08_day3_bucketList_lab",
"path": "/client/src/views/bucket_list_view.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> //获取最新文章列表
let newestList = await this.model("article").where({
ispublished: 1
}).order("createtime DESC").limit(5).select();
this.assign("newestList", newestList);
}
async getConfig() {
let sysdata = await this.model('system').where({
... | code_fim | hard | {
"lang": "javascript",
"repo": "fxjs/qqbw",
"path": "/src/home/controller/base.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: fxjs/qqbw path: /src/home/controller/base.js
'use strict';
export default class extends think.controller.base {
/**
* some base method in here
*/
async __before() {
await this.getConfig();
//设置CSRF值
let csrf = await this.session("__CSRF__");
thi... | code_fim | hard | {
"lang": "javascript",
"repo": "fxjs/qqbw",
"path": "/src/home/controller/base.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> }
async getConfig() {
let sysdata = await this.model('system').where({
id: 1
}).find();
this.assign('_web', sysdata);
}
}<|fim_prefix|>// repo: fxjs/qqbw path: /src/home/controller/base.js
'use strict';
export default class extends think.controller.base {
... | code_fim | hard | {
"lang": "javascript",
"repo": "fxjs/qqbw",
"path": "/src/home/controller/base.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> //主界面-批量停用
$(document).on("click", "#bgitems-main-unactive", function (e) {
var flag=false;
for(i=0;i<$('#bgItems-data tbody tr').length;i++){
if($('#bgItems-data tbody tr').eq(i).hasClass('selected')){
flag=true
}
}
if(flag){
ufma.confirm('要停用选择的指标要素吗?', func... | code_fim | hard | {
"lang": "javascript",
"repo": "luguofei123/agla-fe",
"path": "/pf/bg/bgItems/bgItems.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: luguofei123/agla-fe path: /pf/bg/bgItems/bgItems.js
Item/checkUseBgItemTxts" //6
];
var initMainTbl = function (result) {
ufma.isShow(reslist);
var tblHeight = parseFloat($("#workspaceBody").height()) - parseFloat($("#workspaceBody_Top").outerHeight()) - 35;
var toolb... | code_fim | hard | {
"lang": "javascript",
"repo": "luguofei123/agla-fe",
"path": "/pf/bg/bgItems/bgItems.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> var initForm = function () {
var i = parseFloat($("#workspaceBody").outerHeight());
var i_top = parseFloat($("#workspaceBody_Top").outerHeight());
var i_bottom = parseFloat($("#workspaceBody_Bottom").outerHeight());
// $("#workspaceBody_Center").css("max-height", (i - i_top - i_bottom) ... | code_fim | hard | {
"lang": "javascript",
"repo": "luguofei123/agla-fe",
"path": "/pf/bg/bgItems/bgItems.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> if (index < 0) {
$scope.breadlist.push(data);
} else {
$scope.breadlist.length = ++index;
}
});
}
});<|fim_prefix|>// repo: suarezoscar/vetClinic-App path: /public/app/modules/breadcrumbs-modul... | code_fim | hard | {
"lang": "javascript",
"repo": "suarezoscar/vetClinic-App",
"path": "/public/app/modules/breadcrumbs-module/breadcrumbs-module.component.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> $scope.breadlist.forEach(function (d) {
if (d.name == data.name)
index = $scope.breadlist.indexOf(d);
});
if (index < 0) {
$scope.breadlist.push(data);
} else {
... | code_fim | hard | {
"lang": "javascript",
"repo": "suarezoscar/vetClinic-App",
"path": "/public/app/modules/breadcrumbs-module/breadcrumbs-module.component.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: suarezoscar/vetClinic-App path: /public/app/modules/breadcrumbs-module/breadcrumbs-module.component.js
'use strict';
angular.module('breadcrumbsModule', [])
.component('breadcrumbsModule', {
templateUrl: '/app/modules/breadcrumbs-module/breadcrumbs-module.html',
controller:... | code_fim | hard | {
"lang": "javascript",
"repo": "suarezoscar/vetClinic-App",
"path": "/public/app/modules/breadcrumbs-module/breadcrumbs-module.component.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|>$('#action-btn').click(function (e) {
e.preventDefault();
if (action == 'add') {
$.ajax({
type: 'POST',
url: 'books',
data: {
_token: $('input[name="_token"]').val(),
title: $('#title').val(),
author: $('#... | code_fim | hard | {
"lang": "javascript",
"repo": "gjvpaet/laravel-project-library",
"path": "/public/js/crud.js",
"mode": "spm",
"license": "MIT",
"source": "the-stack-v2"
} |
<|fim_suffix|> $('#success-alert').removeClass('hidden');
$('#alert-message').text('You successfully added a new book.');
//$('#my-modal').modal('hide');
}
},
error: function (xhr, ajaxOptions, thrownError) {
... | code_fim | hard | {
"lang": "javascript",
"repo": "gjvpaet/laravel-project-library",
"path": "/public/js/crud.js",
"mode": "spm",
"license": "MIT",
"source": "the-stack-v2"
} |
<|fim_prefix|>// repo: andela/ah-shakas-frontend path: /src/reducers/following.reducer.js
import constants from '../constants';
import initialState from './initialState';
<|fim_suffix|> case `${FOLLOWING}_FULFILLED`:
return {
...state,
following: payload.data,
loading: false,
... | code_fim | hard | {
"lang": "javascript",
"repo": "andela/ah-shakas-frontend",
"path": "/src/reducers/following.reducer.js",
"mode": "psm",
"license": "unknown",
"source": "the-stack-v2"
} |
<|fim_suffix|> case `${FOLLOWING}_FULFILLED`:
return {
...state,
following: payload.data,
loading: false,
success: true,
};
case `${FOLLOWING}_REJECTED`:
return {
...state,
loading: false,
errors: payload.data,
success: false,
... | code_fim | hard | {
"lang": "javascript",
"repo": "andela/ah-shakas-frontend",
"path": "/src/reducers/following.reducer.js",
"mode": "spm",
"license": "unknown",
"source": "the-stack-v2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.