This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import gi | |
| from gst.caps import CapsRegistry | |
| from gst.pipe_loader import PipelineLoader | |
| from gst.pipeline import Pipeline | |
| gi.require_version('Gst', '1.0') | |
| gi.require_version('GstRtspServer', '1.0') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.fidesmo.javacard.example; | |
| import javacard.framework.*; | |
| import javacard.security.*; | |
| public abstract class BaseCardlet extends Applet implements ISO7816 { | |
| KeyPair kp; | |
| Signature sig; | |
| BaseCardlet(byte[] buffer, short offset, byte length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| //import org.bouncycastle.jce.ECPointUtil; | |
| import javax.smartcardio.CardChannel; | |
| import javax.smartcardio.CardException; | |
| import javax.smartcardio.CommandAPDU; | |
| import javax.smartcardio.ResponseAPDU; | |
| import java.math.BigInteger; | |
| import java.nio.ByteBuffer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gst-launch-1.0 videotestsrc ! vaapih264enc ! matroskamux ! fakesink | |
| # Gstreamer 14.0 on Baytrail | |
| Setting pipeline to PAUSED ... | |
| error: XDG_RUNTIME_DIR not set in the environment. | |
| Pipeline is PREROLLING ... | |
| Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1"; | |
| ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error. | |
| Additional debug info: | |
| ../libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.fidesmo.javacard.example; | |
| import javacard.framework.*; | |
| import javacard.security.*; | |
| public class ExampleCardlet extends Applet | |
| { | |
| private static final short MAX_LENGTH = 256; | |
| private static final byte[] hello = {'p','k','i','t','c','h'}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Make sure you have py-gst installed (on OSX: brew install py-gst) | |
| # export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/ # this will be the folder containing the "python" directory | |
| # You must put this script in a directory called "python" for this to work :) | |
| # | |
| # Example usage: | |
| # GST_DEBUG=python:4 gst-launch-1.0 videotestsrc ! jpegenc ! ftpsink | |
| import ftplib | |
| import io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Camera { | |
| public: | |
| vec4 eye; // Specifies the position of the eye point. | |
| vec4 center; // Specifies the position of the reference point. | |
| vec4 up; // For tilting the camera | |
| float fov; // Field of view | |
| float near, far; // Near and far clipping plane | |
| Camera() { | |
| eye = vec4(0, 0, 2); | |
| center = vec4(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.6) | |
| project(grafika) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
| set(SOURCE_FILES main.cpp) | |
| find_package(OpenGL REQUIRED) | |
| find_package(GLUT REQUIRED) | |
| include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Első feladat | |
| Fekete háttér előtt a gömb alakú, 0.2 1/sec fordulatszámmal forgó, 40 ezer km kerületű földet látjuk a képernyőn, amelynek sziluettjét fehérrel, 30 fokonként a hosszúsági és szélességi köreit szürkével rajzoljuk fel. A virtuális kameránk merőleges vetítést használ, a megjelenítés huzalváz jellegű. A földgömb kép 90%-át foglalja el függőleges irányban, a földgömb közepe a kép közepén van. Egérrel a bal gombbal ráklikkelve a föld elülső felületére repülőgépeket indíthatunk és azok útvonalát jelölhetjük ki egészen addig, amíg a jobb gombbal a célállomást megadjuk. A kiindulási reptér, közbenső pontok és a célreptér között a repülő a legrövidebb úton halad 10 km magasságban, állandó körív menti (Rodriguez vagy SLERP) 5 ezer km/sec sebességgel (most ne foglalkozzunk a szökési sebességgel). A repülő az orrát követi, a szárnyai pedig a gravitáció irányára merőlegesek. A repülési pályát piros vonal mutatja. A repülőt Catmull-Rom spline-nal definiált zöld színű kitöltött konkáv területtel jelenítjük meg, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| startDir=$(pwd) | |
| echo "Updating ANT+ driver..." | |
| cd /home/pi/libant/ | |
| git reset --hard HEAD | |
| git pull | |
| sudo python3 setup.py install | |
| echo "Done!" |