This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add the values you want | |
rsi = ta.rsi(close,14) | |
// Define the function | |
// With one call, you'll get back 9 values | |
fGetImported(_timeframe) => | |
request.security(symbol = syminfo.tickerid, timeframe = _timeframe, expression = [open, high, low, close, rsi, open[1], high[1], low[1], close[1]], gaps = barmerge.gaps_off) | |
// Implement the function for different timeframes | |
// 3 timeframes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { body, validationResult } = require('express-validator'); | |
// Validation docs: | |
// - https://www.npmjs.com/package/express-validator | |
// - https://express-validator.github.io/docs | |
// A validation chain has three kinds of methods: validators, sanitizers and modifiers. - https://express-validator.github.io/docs/guides/validation-chain#features | |
/** USER */ | |
// TODO Login - https://stackoverflow.com/questions/62630504/express-validator-isdate-and-isiso8601-are-always-false | |
const userValidationRules = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const users = express.Router(); | |
const usersController = require('../controllers/users'); | |
const { userValidationRules, validate } = require('../middleware/validate'); | |
/** USERS */ | |
// List | |
users.get('/', usersController.getData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// By Markham, Michelle | |
/* global module */ | |
//To create a new controller, you only need to copy this code and change 2 items: | |
//1. dbTitle = new collection name | |
//2. dbFieldsArray = fields in the new collection | |
const mongodb = require('../db/connect'); | |
const ObjectId = require('mongodb').ObjectId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { MongoClient, ObjectId } = require('mongodb'); | |
describe('insert', () => { | |
let connection; | |
let db; | |
beforeAll(async () => { | |
connection = await MongoClient.connect(globalThis.__MONGO_URI__, { | |
useNewUrlParser: true, | |
useUnifiedTopology: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.facebook.com/groups/flutter.dart.spanish/permalink/7282244618524827/ | |
import 'package:flutter/material.dart'; | |
import 'package:incidencias/src/providers/student_form_provider.dart'; | |
import 'package:provider/provider.dart'; | |
import 'package:qr_bar_code_scanner_dialog/qr_bar_code_scanner_dialog.dart'; | |
class QrBarCodeScannerDialogView extends StatelessWidget { | |
final _qrBarCodeScannerDialogPlugin = QrBarCodeScannerDialog(); | |
QrBarCodeScannerDialogView({super.key}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StackTrace 1: | |
at System.Data.Entity.Core.EntityClient.EntityConnection.Open() | |
at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) | |
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) | |
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) | |
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) | |
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) | |
at System.Data.Entity.Internal.InternalContext.SaveChanges() | |
at MiningTracker.Repository.UnitOfWork.Save() in C:\Users\carlo\source\repos\guiaminera\MiningTracker\MiningTracker.Repository\UnitOfWork\UnitOfWork.cs:line 74 | |
at MiningTracker.Serv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable node/no-unpublished-require */ | |
const swaggerAutogen = require('swagger-autogen')(); | |
const dotenv = require('dotenv'); | |
dotenv.config(); | |
const isLocalHost = true; | |
const PORT = process.env.PORT || 8080; | |
// eslint-disable-next-line no-console | |
console.log(`Is localhost: ${isLocalHost}`); |