Skip to content

Instantly share code, notes, and snippets.

diff --git a/libs/taxes/hub/ui-components/src/lib/Result/ResultElement.stories.tsx b/libs/taxes/hub/ui-components/src/lib/Result/ResultElement.stories.tsx
new file mode 100644
index 000000000..bfb85f74d
--- /dev/null
+++ b/libs/taxes/hub/ui-components/src/lib/Result/ResultElement.stories.tsx
@@ -0,0 +1,38 @@
+import { Meta, StoryFn } from '@storybook/react'
+
+import { Result, ResultType } from "./ResultElement";
+import { Provider as DesignSystemProvider } from '@cash-design-system/react'
@minostro
minostro / Connection.java
Created April 24, 2023 14:53
Sentry Connection Sentry Connection
public interface Connection extends Closeable {
/**
* Sends an event to the Sentry server.
*
* @param event captured event to add in Sentry.
* @throws ConnectionException Thrown when an Event send fails.
*/
void send(Event event) throws ConnectionException;
/**
public boolean isValidTx(Transaction tx) {
boolean areInputsInUTXOPool = !tx.getInputs().stream()
.filter(i -> !utxoPool.contains(new UTXO(i.prevTxHash, i.outputIndex)))
.findFirst()
.isPresent();
boolean areOutputValuesNonNegative = !tx.getOutputs().stream()
.filter(o -> o.value < 0)
.findFirst()
.isPresent();
double inputsValue = tx.getInputs().stream()
@minostro
minostro / script.py
Created October 4, 2017 17:02
Create a Documento Contable
from facturacion.models import DocumentoContable
from utils.nubox import actions as nubox_actions
from settings import FACTURACION_CSV_DIR, FACTURACION_PDF_DIR
from utils.nubox.client import Client
documento_contable = DocumentoContable.objects.get(id=1/0)
documento_map = documento_contable.print_repr()
extended_document = nubox_actions.create_extended_document(documento_map)
@minostro
minostro / script.py
Created September 27, 2017 13:36
Generate Nubox Document
from facturacion.models import DocumentoContable
from utils.nubox import actions as nubox_actions
from settings import FACTURACION_CSV_DIR, FACTURACION_PDF_DIR
from utils.nubox.client import Client
documento_contable = DocumentoContable.objects.get(id=1/0)
documento_map = documento_contable.print_repr()
extended_document = nubox_actions.create_extended_document(documento_map)
@minostro
minostro / AbstractGrammar.java
Last active May 30, 2017 22:02
Join Point Interfaces
JPITypeDecl : TypeDecl ::=
ReturnType:Access Parameters:ParameterDeclaration* Exception:Access*; SuperTypeName:Access SuperArgumentName:Access*;
ExhibitBodyDecl : BodyDecl ::=
ReturnType:Access JPIName:Access Parameter:ParameterDeclaration* Pointcut:PointcutExpr;
CJPAdviceDecl : AdviceDecl;
CJPPointcutExpr: PointcutExpr;
CJPBeforeSpec : BeforeSpec ::= JPIName:Access;
/*the rest of the advice specifications are omitted from this listing*/
-module(queue_adt).
-export([empty_queue/0,
enqueue/2,
dequeue/1,
current/1]).
empty_queue() ->
{[], []}.
enqueue({[Value], []}, Element) ->
#include <stdio.h>
#include <stdlib.h>
int* initialize_array(int n) {
int* array = (int *) malloc(n * sizeof(int)); //allocate memory in the Heap
for(int i=0; i<n; i=i+1){
array[i] = i+1;
}
return array;
}
#include <stdio.h>
int* initialize_array(int n) {
int array[n];
for(int i=0; i<n; i=i+1){
array[i] = i+1;
}
return array;
}
application:start(inets).
SoapBody = "<soap:Body><GetWeather xmlns=\"http://www.webserviceX.NET\"><CityName>Chicago</CityName><CountryName>United States</CountryName></GetWeather></soap:Body>".
SoapEnvelope = lists:append([
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">",
SoapBody,
"</soap:Envelope>"]
).
{ok, {{_, _, _}, _, ResponseBody}} = httpc:request(post, {"http://www.webservicex.net/globalweather.asmx", [], "text/xml", SoapEnvelope}, [], []).
{Xml, _} = xmerl_scan:string(ResponseBody).
{_, _, [{_, _, [{_, _, [{_, [], Data}]}]}]} = xmerl_lib:simplify_element(Xml).