What do you want to save?
Add Code snippet
New code examples
-
Java 2022-02-05 09:20:07
serialization of object in java
public class someClass { //your lcode and logic... ObjectMapper mapper = new ObjectMapper(); SimpleModule module = new SimpleModule(); module.addSerializer(MyAwesomeClass.class, new MyAwesomeSerializer()); mapper.registerModule(module); jsonNode = mapper... Add solution -
-
PHP 2022-02-03 09:40:30
php array_walk_recursive
Flatten multidimensional associative array to array function flatten(array $array, $prefix="") { $result = Array(); array_walk($array, function ($value, $key) use ($array, $prefix, &$result) { $path = $prefix ? "$prefix... Add solution -
Other 2022-02-02 21:11:25
get dates between two dates using specific interval using carbon
$period = CarbonPeriod::since('2021-06-01')->days(3)->until('2021-06-30')->toArray(); $period2 = CarbonInterval::days(3)->toPeriod('2021-06-01', '2021-06-30')->toArray(); foreach($period as $val){ echo $val; ... Add solution -
-
Other 2022-02-02 17:50:17
hwo to convert list of custom class to a byte
using System.IO; using System.Runtime.Serialization.Formatters.Binary; byte[] bytes = null; BinaryFormatter bf = new BinaryFormatter(); using (MemoryStream ms = new MemoryStream()) { //categoryList is where you put the list that you want to convert ... Add solution -
Other 2022-02-01 13:45:13
array_walk_recursive get return value
Flatten multidimensional associative array to array function flatten(array $array, $prefix="") { $result = Array(); array_walk($array, function ($value, $key) use ($array, $prefix, &$result) { $path = $prefix ? "$prefix... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5