-
Что такое
полиморфизм
? -
Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?
-
Чем
абстрактный
класс отличается отинтерфейса
? -
Расскажите о
паттерне MVC
. Чем отличаетсяпассивная
модель отактивной
?
I've been interested in computer vision for a long time, but I haven't had any free time to make any progress until this holiday season. Over Christmas and the New Years I experimented with various methodologies in OpenCV to detect road signs and other objects of interest to OpenStreetMap. After some failed experiments with thresholding and feature detection, the excellent /r/computervision suggested using the dlib C++ module because it has more consistently-good documentation and the pre-built tools are faster.
After a day or two figuring out how to compile the examples, I finally made some progress:
- Clone
dlib
from Github to your local machine:
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
#=============================================================================== | |
# Filename: boost.sh | |
# Author: Pete Goodliffe | |
# Copyright: (c) Copyright 2009 Pete Goodliffe | |
# Licence: Please feel free to use this, with attribution | |
# Modified version | |
#=============================================================================== | |
# | |
# Builds a Boost framework for iOS, iOS Simulator, and OSX. | |
# Creates a set of universal libraries that can be used on an iOS and in the |
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
(function() { | |
var ua = /iPhone|iP[oa]d/.test(navigator.userAgent) ? 'iOS' : /Android/.test(navigator.userAgent) ? 'Android' : 'PC'; | |
document.addEventListener('DOMContentLoaded', function(event) { | |
if(ua === 'PC') { | |
return; | |
} | |
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
#define SAMPLE_COUNT {{ sampleCount }} | |
#define USE_ACTUAL_NORMALS {{ useActualNormals }} | |
uniform sampler2D sGBuffer; | |
uniform sampler2D sNoise; | |
uniform float uSampleRadius; | |
uniform float uIntensity; | |
uniform vec2 uNoiseScale; | |
uniform vec3 uKernel[SAMPLE_COUNT]; |
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
# requires android ndkr8b or above | |
.PHONY: check-ndk clean | |
LIBOBJC2_MAKEFILE := libobjc2-1.6.1/Makefile | |
X86SYSROOT := $(shell pwd)/androidtoolchain-x86 | |
ARMSYSROOT := $(shell pwd)/androidtoolchain-arm | |
GCC_X86 := $(X86SYSROOT)/bin/i686-android-linux-gcc | |
GCC_ARM := $(ARMSYSROOT)/bin/arm-linux-androideabi-gcc | |
LLVM_CONFIGURE := llvm/configure |
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
(lldb) po NSStringFromCGRect(self.frame) | |
error: property 'frame' not found on object of type 'SLComposeCardView *' | |
error: 1 errors parsing expression | |
(lldb) po NSStringFromCGRect([self frame]) | |
error: no known method '-frame'; cast the message send to the method's return type | |
error: 1 errors parsing expression | |
(lldb) po NSStringFromCGRect((CGRect)[self frame]) | |
error: 'NSStringFromCGRect' has unknown return type; cast the call to its declared return type | |
error: 1 errors parsing expression | |
(lldb) po (NSString *)NSStringFromCGRect((CGRect)[self frame]) |
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 <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
NSRunLoop * runLoop; | |
CLIMain * main; // replace with desired class | |
@autoreleasepool | |
{ | |
// create run loop |
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
typedef struct FontHeader { | |
int32_t fVersion; | |
uint16_t fNumTables; | |
uint16_t fSearchRange; | |
uint16_t fEntrySelector; | |
uint16_t fRangeShift; | |
}FontHeader; | |
typedef struct TableEntry { | |
uint32_t fTag; |
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
void renderSphere(float cx, float cy, float cz, float r, int p) | |
{ | |
float theta1 = 0.0, theta2 = 0.0, theta3 = 0.0; | |
float ex = 0.0f, ey = 0.0f, ez = 0.0f; | |
float px = 0.0f, py = 0.0f, pz = 0.0f; | |
GLfloat vertices[p*6+6], normals[p*6+6], texCoords[p*4+4]; | |
if( r < 0 ) | |
r = -r; | |