Skip to content

Instantly share code, notes, and snippets.

View Pavel-Shulepov's full-sized avatar
🤦

Pavel Shulepov Pavel-Shulepov

🤦
View GitHub Profile
@Pavel-Shulepov
Pavel-Shulepov / gist:4153eb776e13cfdbb9368ec8e5b0940d
Created July 25, 2020 04:19 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@Pavel-Shulepov
Pavel-Shulepov / index.php
Created June 20, 2018 14:36 — forked from vvv3/index.php
WordPress | Выборка постов и страниц по произвольным полям
<!--Выборка постов и страниц по произвольным полям-->
<?php $args = array( 'post_type' => array('post', 'page'),
'meta_key' => 'order',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'posts_per_page' => 3 ); ?>
<?php $page_index = new WP_Query($args); ?>
<?php if ( $page_index->have_posts() ) : while ( $page_index->have_posts() ) : $page_index->the_post(); ?>