Skip to content

Instantly share code, notes, and snippets.

View Bruno125's full-sized avatar

Bruno Aybar Bruno125

View GitHub Profile
@Bruno125
Bruno125 / compile error: kotlin.js target = "es2015"
Last active August 9, 2024 19:08
Error logs when trying to compile a Kobweb site enabling compilerOptions.target = "es2015" + K2
> Task :site:compileProductionExecutableKotlinJs FAILED
e: file:///mnt/agent/work/5b4bef35b35b9f12/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/SubcomposeLayout.kt:585:1 org.jetbrains.kotlin.backend.common.CompilationException: Back-end: Please report this problem https://kotl.in/issue
/mnt/agent/work/5b4bef35b35b9f12/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/SubcomposeLayout.kt:585:1
Problem with `@OptIn(markerClass = [ExperimentalComposeUiApi::class])
internal class LayoutNodeSubcompositionsState {
constructor(root: LayoutNode, slotReusePolicy: SubcomposeSlotReusePolicy, /* var */ $box: LayoutNodeSubcompositionsState?) /* primary */ {
super/*Any*/()
{ // BLOCK
<this>.#root = root
<this>.#compositionContext = null
import android.R
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.material.RadioButton
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@Bruno125
Bruno125 / CalculadoraScreen.test.tsx
Last active April 11, 2022 04:56
Test cases para el ejercicio de Calculadora del curso de RN de Fernando Herrera
import * as React from 'react';
import { CalculadoraScreen } from "../CalculadoraScreen";
import {render, fireEvent} from '@testing-library/react-native'
describe('<CalculadoraScreen />', () => {
describe('results', () => {
it('inits main result with zero', () => {
const {assertResult} = renderCalculadora()
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.graphics.Color
/**
* // This is the HtmlParser's API interface.
* // You should not implement it, or speculate about its implementation
* interface HtmlParser {
* public List<String> getUrls(String url) {}
* }
*/
import java.util.LinkedList;
import java.util.LinkedHashSet;
import androidx.compose.animation.RectPropKey
import androidx.compose.animation.core.FloatPropKey
import androidx.compose.animation.core.keyframes
import androidx.compose.animation.core.transitionDefinition
import androidx.compose.animation.core.tween
import androidx.compose.animation.transition
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.Image
import androidx.compose.foundation.Text
import androidx.compose.foundation.background
package com.test
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import androidx.viewbinding.ViewBinding
import com.test.databinding.ActivityMainBinding
abstract class BindingActivity<T: ViewBinding>(val name: String): AppCompatActivity(){
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Privacy Policy</title> <style>body{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:1em;}</style></head> <body><h2>Privacy Policy</h2> <p> UPC Devs built the UPC Location app as a Free app. This SERVICE is provided by UPC Devs at no cost and is intended for use as is.
</p> <p>This page is used to inform website visitors regarding my policies with the collection, use, and
disclosure of Personal Information if anyone decided to use my Service.
</p> <p>If you choose to use my Service, then you agree to the collection and use of information in relation
to this policy. The Personal Information that I collect is used for providing and improving the
Service. I will not use or share your information with anyone except as described
in this Privacy Policy.
</
package com.example.pack.two;
// some imports
import com.example.pack.one.MyClass;
import com.example.pack.one.MyClass.Listener;
public final class MainActivity extends AppCompatActivity {
package com.example.pack.two
// some imports
import com.example.pack.one.MyClass
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)