Skip to content

Instantly share code, notes, and snippets.

View luzemma's full-sized avatar

Luzemma luzemma

  • Mexico City
View GitHub Profile
var query1 = "INSERT INTO tempoPerson (nombre, paterno) VALUES ('Jorge', 'Toribio');";
var query2 = "INSERT INTO tempoPerson (nombre, paterno) VALUES ('David', 'Lalane');";
var query3 = "INSERT INTO tempoPerson (nombre, paterno) VALUES ('Robert', 'Bloom');";
using (SqlConnection connection = new SqlConnection(strConn))
{
connection.Open();
SqlTransaction transaction = connection.BeginTransaction();
<!-- https://stackoverflow.com/questions/5197892/add-shadow-to-custom-shape-on-android -->
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- "background shadow" -->
<item>
<shape android:shape="rectangle" >
<solid android:color="#000000" />
<corners android:radius="15dp" />
</shape>
@luzemma
luzemma / main.dart
Last active August 22, 2024 17:55
Calcula el digito verificador (homoclave) de los 10 prímeros dígitos del RFC
void main() {
final taxId = ''; // Escribe los 10 primeros caracteres del RFC
final lastDigit = calculateVerifierDigit(taxId);
print('El último dígito debe ser $lastDigit');
}
String calculateVerifierDigit(String taxId) {
const dictionary = '0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ Ñ';
final index = taxId.length + 1;
var sum = 0;