Skip to content

Instantly share code, notes, and snippets.

@Ushiosan23
Ushiosan23 / suma_letras_palabra.cpp
Last active December 1, 2022 06:24
Suma de los caracteres en una palabra
#include <iostream>
int main() {
// Variables temporales
std::string palabra{};
// El total donde se guardará la suma de las letras
unsigned int total{0};
// Realizamos la pregunta de la palabra deseada
std::cout << "Inserte una palabra: ";
@Ushiosan23
Ushiosan23 / VirtualMethod.cs
Last active April 1, 2020 14:55
Virtual method example
using System;
using System.Collections.Generic;
namespace MyBestNamespace {
public class VirtualMethod {
/// <sumary>
/// Constructor
/// </sumary>
@Ushiosan23
Ushiosan23 / Person.cs
Created November 17, 2019 22:44
Write file with binary data. C#.
using System;
namespace ConsoleApp1.Company {
/// <summary>
/// Person.
/// </summary>
[Serializable]
public class Person {
@Ushiosan23
Ushiosan23 / program.go
Created November 17, 2019 22:33
Write file with binary data. Golang.
package main
import (
"bytes"
"encoding/gob"
"fmt"
"io/ioutil"
"os"
"path/filepath"
)
@Ushiosan23
Ushiosan23 / Pixel.java
Created November 17, 2019 22:26
Write file with binary object data.
package render;
import java.io.Serializable;
public class Pixel implements Serializable {
private int X;
private int Y;
private short R;
@Ushiosan23
Ushiosan23 / glass-view.markdown
Last active August 22, 2019 15:04
Glass view
@Ushiosan23
Ushiosan23 / NotNull.java
Created May 1, 2019 21:40
NotNullAnnotation
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
public @interface NotNull {
@Ushiosan23
Ushiosan23 / powershellRegister.reg
Last active April 15, 2019 08:45
Add powershell to context menu
Windows Registry Editor Version 5.00
; Open files
; Default Powershell Location C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[HKEY_CLASSES_ROOT\*\shell\Open Powershell Bash]
@="Open Powershell Here"
"Icon"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\*\shell\Open Powershell Bash\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\""
@Ushiosan23
Ushiosan23 / scp_button.gml
Created December 27, 2018 00:11
Game maker studio 2 button creation
_x = argument0; // position x
_y = argument1; // position y
_fnt = argument2; // font
_txt = argument3; // text
_padd = argument4; // padding xy
_b_c = argument5; // background color
_b_h = argument6; // background hover
_f_c = argument7; // text color
_call = argument8; // return value if click over there