Skip to content

Instantly share code, notes, and snippets.

@N-Ibrahimi
N-Ibrahimi / list.md
Created March 13, 2022 09:48 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@N-Ibrahimi
N-Ibrahimi / jpa-cheatsheet.java
Created December 27, 2019 00:51 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();
@N-Ibrahimi
N-Ibrahimi / media-queries.css
Created October 5, 2019 16:05 — forked from hemantajax/media-queries.css
Very useful media queries snippets
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
=begin class String
def initial
self[0,1]
end
end
=end
text =gets.chomp.scan /./
b = text.collect! { |x| x.succ.succ.succ }
b = b.join.to_s
c = b.tr("#"," ")