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
# -*- coding: utf-8 -*- | |
import pygame | |
import Image | |
from pygame.locals import * | |
import sys | |
import opencv | |
#this is important for capturing/displaying images | |
from opencv import highgui |
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
/** | |
* Display video from webcam | |
* | |
* Author Nash | |
* License GPL | |
* Website http://nashruddin.com | |
*/ | |
#include <stdio.h> | |
#include <stdlib.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
unsigned hamdist(unsigned x, unsigned y) | |
{ | |
unsigned dist = 0, val = x ^ y; | |
// Count the number of set bits (Knuth's algorithm) | |
while(val) | |
{ | |
++dist; | |
val &= val - 1; | |
} |
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
i=0; | |
q=0; | |
for a=1:10 | |
for b=1:5 | |
if i>3 q=1; break; end | |
end | |
if q==1; q=0; break; end | |
i=i+1 | |
end |
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
for i=1:length(Bmec) | |
if abs(Bmec(i))>=2 | |
for j=1:(length(Bfou)) | |
if abs(Bfou(j))>=2 | |
while abs((Bfou(j)-Bmec(i))./Bmec(i)) > 0.05 %hata payi yuksek | |
g=g+g*0.1;%hava araligini arttir %10 | |
[reg]=Fourier_open_circuit(g,delta_z,Rout_stat,Rin_stat,La,h_mag,h_rot_tooth,ts_y,Nr,Ns,rpm,mu_mr,Br,N,I); | |
Bfou=reg(6).Bp; | |
end | |
elseif (abs(Bfou(j)-Bmec(i))./Bmec(i)<=0.05) %hata payi uygun if dongusunden cikip bir sonraki Bmec degerine bak |
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
#include<iostream> | |
using namespace std; | |
void f(int x) | |
{ | |
x=5; | |
} | |
int main(int argc, char *argv[]) | |
{ | |
int i; |
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
bool init(Screen *scr) | |
{ | |
scr = new Screen(...); | |
... | |
} | |
int main() | |
{ | |
Screen *screen; |
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
#include<iostream> | |
int main() | |
{ | |
hebele; | |
std::cout << hubele<< "nanik << std:endl; | |
return 31; | |
} |
NewerOlder