Skip to content

Instantly share code, notes, and snippets.

View pstricks-fans's full-sized avatar
💭
I am hungry of knowledge!

pstricks-fans pstricks-fans

💭
I am hungry of knowledge!
View GitHub Profile

Folks, I am a newbie and learning Angular in a random order.

I have a question: Is it possible to retrieve a collection of query string values and assign them to a property of type Filter in a service component class?

interface Filter{
    title?: string;
    genreId?: number;
    inCinemas?: boolean;
    upcomingReleases?: boolean;
@pstricks-fans
pstricks-fans / gist:98edb23a762994d5f119ac10cb93a905
Created November 27, 2021 14:57
Why do we modify function parameters?
# Python3 code to implement iterative Binary
# Search.
# It returns location of x in given array arr
# if present, else returns -1
def binarySearch(arr, l, r, x):
while l <= r:
mid = l + (r - l) // 2;
@pstricks-fans
pstricks-fans / MyActor.cpp
Created October 18, 2021 21:41
Why does ZAxis get aligned with YAxis?
#include "MyActor.h"
#include "Components/ArrowComponent.h"
void AMyActor::Initializer()
{
Root = CreateDefaultSubobject<USceneComponent>(TEXT("Root"));
XAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("XAxis"));
YAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("YAxis"));
ZAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("ZAxis"));
@pstricks-fans
pstricks-fans / MyActor.cpp
Created October 18, 2021 21:20
My Template
#include "MyActor.h"
#include "Components/ArrowComponent.h"
void AMyActor::Initializer()
{
Root = CreateDefaultSubobject<USceneComponent>(TEXT("Root"));
XAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("XAxis"));
YAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("YAxis"));
ZAxis = CreateDefaultSubobject<UArrowComponent>(TEXT("ZAxis"));
package com.company.chapter02b;
import android.os.Bundle;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
@pstricks-fans
pstricks-fans / dissecting-event-handler
Created July 13, 2021 16:12
Dissecting Event Handler
@FunctionalInterface
interface onClickListener
{
void apply();
}
class View
{
private onClickListener onClick;
public void setOnClickListener(onClickListener onclick)
cmake_minimum_required(VERSION 3.4.1)
# TODO please change me!
set(OPENCV_BASE_DIR "TODO PLEASE PUT YOUR DIR HERE!!!")
set(OPENCV_INCLUDE_DIR "${OPENCV_BASE_DIR}/sdk/native/jni/include/")
set(OPENCV_STATIC_LIB_DIR "${OPENCV_BASE_DIR}/sdk/native/staticlibs/${ANDROID_ABI}")
set(OPENCV_3RDPARTY_STATIC_LIB_DIR "${OPENCV_BASE_DIR}/sdk/native/3rdparty/libs/${ANDROID_ABI}")
include_directories(${OPENCV_INCLUDE_DIR})