What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-10 19:44:01
java serializer
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 -
Other 2021-09-09 18:36:03
iterate through names of columns in result set pdo
//Connect to MySQL using PDO. $pdo = new PDO("mysql:host=$host;dbname=$database", $user, $password); //Create our SQL query. $sql = "SELECT * FROM my_table_name LIMIT 20"; //Prepare our SQL query. $statement = $pdo->prepare($sql);... Add solution -
PHP 2021-09-09 17:02:02
pagination in codeigniter with example
// Controller End $config = array(); $config["base_url"] = base_url() . "index.php/StudentPagination_Controller/index"; $config["total_rows"] = $this->StudentPagination_Model->get_count(); $config["per_page"] ... Add solution -
Javascript 2021-09-09 10:36:02
export mongo to csv node
const json2csv = require('json2csv').parse; //For unique file name const dateTime = new Date().toISOString().slice(-24).replace(/\D/g, '').slice(0, 14); const filePath = path.join(__dirname, "../../../", "public", "exports&quo... Add solution -
Java 2021-09-09 09:47:02
how to calculate min, max and average and write the output into into a text file in java
package TrialPrograms; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.In... Add solution -
Java 2021-09-09 05:31:03
displaying an arraylist in java
Arrays.toString(list.toArray()) Add solution -
Javascript 2021-09-09 04:51:02
wp_enqueue_script jquery
function wpdocs_theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); /* enqueues style.css */ /* if you want to enqueue other styles use: */ /* wp_enqueue_style( 'style-name', get_template_directory_uri() . '/css/your... Add solution -
Other 2021-09-08 22:46:03
remove empty values from array unity
GameObject[] gameObjectArray = new GameObject[] { new GameObject(), new GameObject(), new GameObject() }; // example GameObject Array List<GameObject> gameObjectList = new List<GameObject>(gameObjectArray); gameObjectList .RemoveAll(x => x... Add solution