What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-06 09:35:38
c# visitor pattern
using System; using System.Collections.Generic; namespace RefactoringGuru.DesignPatterns.Visitor.Conceptual { // The Component interface declares an `accept` method that should take the // base visitor interface as an argument. public interfa... Add solution -
Python 2022-03-05 19:00:29
Python Program to Count the Occurrences of a Word in a Text File
#get file object reference to the file file = open("C:\workspace\python\data.txt", "r") #read content of file to string data = file.read() #get number of occurrences of the substring in the string occurrences = data.count("python&... Add solution -
Objective-C 2022-03-03 11:45:10
objective c encrypt decrypt string
NSString *const IV = @"AEE0515D0B08A4E4"; NSString *const KEY = @"9336565521E5F082BB5929E8E033BC69"; #import "SecurityUtils.h" @implementation SecurityUtils + (NSString *)encrypt:(NSString *)plainText error:(NSError **... Add solution -
TypeScript 2022-03-03 08:25:04
remove products in checkout page woocommerce
/** * Allows to remove products in checkout page. * * @param string $product_name * @param array $cart_item * @param string $cart_item_key * @return string */ function lionplugins_woocommerce_checkout_remove_item( $product_name, $cart_item, $ca... Add solution -
C++ 2022-03-03 02:35:02
c++ string to vector int
#include <sstream> #include <vector> #include <string> std::string myString = "10 15 20 23"; std::stringstream iss( myString ); int number; std::vector<int> myNumbers; while ( iss >> number ) myNumbers.push_back... Add solution -
Dart 2022-03-03 02:10:01
Flutter make widget based on dio
import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; Future<Album> fetchAlbum() async { final response = await http.get('https://jsonplaceholder.typicode.com/albums/1'... Add solution