What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-20 05:45:14
tab controller
class MyTabbedPage extends StatefulWidget { const MyTabbedPage({ Key? key }) : super(key: key); @override _MyTabbedPageState createState() => _MyTabbedPageState(); } class _MyTabbedPageState extends State<MyTabbedPage> with SingleTickerPro... Add solution -
Javascript 2022-03-17 16:55:10
polkadot UnhandledPromiseRejectionWarning: Error: Api needs to be initialized before using, listen on 'ready'
import { ApiRx } from '@polkadot/api'; // initialise via static create const api = await ApiRx.create().toPromise(); // make a call to retrieve the current network head api.rpc.chain.subscribeNewHeads().subscribe((header) => { console.log(`Chain is... Add solution -
Java 2022-03-11 09:20:22
spring tcp inbound-outbound channel adapter example
@Configuration() @EnableIntegration @IntegrationComponentScan public class ServerConfiguration implements ApplicationListener<TcpConnectionEvent> { private final int port = SocketUtils.findAvailableServerSocket(5000); @MessagingGateway(defaultRequ... Add solution -
TypeScript 2022-03-06 00:05:30
typescript static class equivalent
//Example of Typescript static class equivalent export abstract class Tools { public static truncate(str, length) { var ending = '...'; if (str.length > length) { return str.substring(0, length - ending.length) + ending; } el... Add solution -
C 2022-03-03 05:50:38
how to compress a file in c
#include <stdio.h> #include <string.h> //comp() void Compress(unsigned char *szOut, const char *szMessage) { unsigned long long nBuffer = 0; //This is enough to store 8 uncompressed characters or 9 compressed. We will only use 8 tho. char n... Add solution -
Other 2022-02-24 22:00:15
static vs instance
static or class method 1) A method that is declared as static is known as the static method 2) We don't need to create the objects to call the static methods 3) Non-static (instance) members cannot be accessed in static context (static method, static blo... Add solution -
Other 2022-02-20 05:10:24
dynamic attribute in selenium
When you refresh the page, if the attribute value is changing to new value, it means it is dynamic, which means YOU CANNOT USE IT. HOW DO YOU HANDLE DYNAMIC WEB ELEMENTS? -I use xpath methods to handle them -There are 4 ways of handling. #1... Add solution -
C 2022-02-19 19:25:05
esp32 dhcp server
WiFiServer server(80); static const char *ap_ssid = "ESP32-001"; static const char *ap_pass = "temp_pass"; void setup() { Serial.begin(115200); WiFi.softAP(ap_ssid, ap_pass); Serial.print("Access point running. IP address... Add solution