Skip to content

Instantly share code, notes, and snippets.

View carloswm85's full-sized avatar
🎯
.NET Developing...

Carlos W. Mercado carloswm85

🎯
.NET Developing...
View GitHub Profile
@carloswm85
carloswm85 / vwap-custom.js
Last active September 23, 2023 13:49
For PineScript, at TradingView
View vwap-custom.js
float vwap_mainValue = na
float vwap_upperBand_one = na
float vwap_lowerBand_one = na
float vwap_upperBand_two = na
float vwap_lowerBand_two = na
float vwap_upperBand_three = na
float vwap_lowerBand_three = na
// === RESOLUTION
var vwap_anchor_resolution = input.string(defval = 'Session', title = 'VWAP & pVWAP Anchor Period', options = ['Session', 'Week', 'Month', 'Quarter', 'Year', 'Decade', 'Century', 'Earnings', 'Dividends', 'Splits'], inline = '1', group = vwap_group)
View listViewBuilderDuplication.dart
import 'package:flutter/material.dart';
import 'package:miningtrackerapp/domain/entities/prueba.dart';
import 'package:miningtrackerapp/presentation/providers/pruebas/providers_pruebas.dart';
import 'package:miningtrackerapp/presentation/widgets/drawers/side_menu.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class TrackerHomeView extends ConsumerStatefulWidget {
const TrackerHomeView({super.key});
@carloswm85
carloswm85 / datatables-example.js
Created June 16, 2023 12:21
Datatables code in Spanish.
View datatables-example.js
$(document).ready(function () {
// DataTables integration
var dataTableSpa = {
"processing": "Procesando...",
"lengthMenu": "Mostrar _MENU_ registros",
"zeroRecords": "No se encontraron resultados",
"emptyTable": "Ningún dato disponible en esta tabla",
"infoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
@carloswm85
carloswm85 / Running-transformation-NullReferenceException.md
Last active June 1, 2023 13:00
Running transformation: System.NullReferenceException: Object reference not set to an instance of an object. Possible solution.
View Running-transformation-NullReferenceException.md

The problem seems to be related to Visual Studio 2022 versions higher than 17.5.5

See the problem at: https://developercommunity.visualstudio.com/t/Cannot-import-anymore-tables-into-edmx/10368835 or https://developercommunity.visualstudio.com/t/Create-or-recreate-a-Model-does-not-work/10318478

Solutions:

The problem:

View videos-docker.md
@carloswm85
carloswm85 / Product.cs
Created May 16, 2023 11:51
Example of a model class using C# based on domain-driven design principles, including attributes and behaviors.
View Product.cs
public class Product
{
// The attributes have private setters, meaning they can only be modified from within the class itself.
public int Id { get; private set; }
public string Name { get; private set; }
public decimal Price { get; private set; }
public DateTime CreatedAt { get; private set; }
public DateTime? UpdatedAt { get; private set; }
public Product(string name, decimal price)
@carloswm85
carloswm85 / GetNextExpirationDate.cs
Last active May 2, 2023 17:27
GetNextExpirationDate
View GetNextExpirationDate.cs
public DateTime? GetNextExpirationDate()
{
DateTime year = new DateTime(DateTime.Now.Year, 1, 1);
DateTime today = DateTime.Now;
IQueryable<ConfiguracionWeb> dates = _unitOfWork.WebConfigurationRepository.GetAll();
DateTime firstDate = DateTime
.Parse(dates
.First(u => (WebConfigEnumerations)u.enumeracion == WebConfigEnumerations.PrimerVencimiento)