Skip to content

Instantly share code, notes, and snippets.

@RashidJorvee
RashidJorvee / SassMeister-input.scss
Created October 15, 2019 15:03
Generated by SassMeister.com.
// ----
// Sass (vundefined)
// Compass (vundefined)
// dart-sass (v1.18.0)
// ----
div {
bottom: rem(5);
color: ww;
font-family: as;
@RashidJorvee
RashidJorvee / SassMeister-input.scss
Created October 15, 2019 14:55
Generated by SassMeister.com.
// ----
// Sass (vundefined)
// Compass (vundefined)
// dart-sass (v1.18.0)
// ----
a.show-on-focus {
position: absolute;
left: -125rem;
width: 1px;
@RashidJorvee
RashidJorvee / SCSS_basic-syntax.css
Last active October 15, 2019 14:54
Generated by SassMeister.com.
h1, h2, h3 {
bottom: rem(5);
color: as;
font-family: asa;
left: 0;
font-size: rem(36);
position: absolute;
right: 0;
text-align: center;
}
function third(val, callback){
callback(val*2, false);
}
function second(val, callback){
callback(val*2, false);
}
function first(val, callback){
callback(val*2, false);
}
@RashidJorvee
RashidJorvee / executeAProcedure
Last active June 12, 2019 07:12
Create a simple procedure in Oracle
BEGIN
procedureName;
END;
Get all the pages which have property
SELECT * from [cq:Page] AS t
where ISDESCENDANTNODE('/content') and
contains(t.*, 'componentName or URL')
SELECT * FROM [cq:Page] AS parent
INNER JOIN [nt:base] AS child ON ISDESCENDANTNODE(child, parent)
WHERE ISDESCENDANTNODE(parent, '/content/') AND child.[jcr:title]='config'
@RashidJorvee
RashidJorvee / FizzBuzzProgram.java
Created January 7, 2019 04:45
Write a function that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
package rashidjorvee;
public class FizzBuzzProgram {
public static void main(String[] args) {
for(int i=1; i<=100; i++){
if(i%3 == 0){
System.out.println("Fizz");
}
else if (i%5 == 0){
@RashidJorvee
RashidJorvee / GenerateThreeDigitsRandomNumber.java
Created January 7, 2019 04:34
How to generate three digits random number in java
package rashid.jorvee;
import java.lang.Math;
import java.util.ArrayList;
import java.util.Collections;
public class GenerateThreeDigitsRandomNumber {
public static void main(String[] args) {
int random = (int )(Math.random()* 900 + 000);
@RashidJorvee
RashidJorvee / ComponentContext.java
Last active January 6, 2019 16:32
How to read configuration from Apache Felix console?
@Activate
protected void activate(final ComponentContext componentContext) throws Exception {
final Map<String, String> properties = (Map<String, String>) componentContext.getProperties();
if (properties != null) {
String uName = PropertiesUtil.toString(properties.get("userName"), "");
int age = PropertiesUtil.toInteger(properties.get("age"), "");
String[] hobbies = PropertiesUtil.toStringArray(properties.get("hobbies"), "");
}
}
@RashidJorvee
RashidJorvee / GenerateRandomNumber.java
Created January 5, 2019 17:02
How to generate and get a random number in Java?
package rashid.jorvee;
import java.lang.Math;
import java.util.ArrayList;
import java.util.Collections;
public class GenerateRandomNumber {
public static void main(String[] args) {
ArrayList<Integer> list = new ArrayList<Integer>();