homm 2021-03-30T10:06:15.935Z Like 0 Likes 0 Comments golang ldr q0, [x19] // Sx4 = vld1q_u8(&Srgba[0])
ldr q1, [x20] // Dx4 = vld1q_u8(&Drgba[0])
movi v17.2d, #0xffffffffffffffff
mov x9, xzr // i = 0
.LBB0_3:
tbl v5.16b, { v0.16b }, v16.16b // vqtbl1q_u8(Sx4, v16)
mvn v5.16b, v5.16b // Sax4 = vsubq_u8(vdupq_n_u8(255), v5)
add x10, x9, #16 // x10 = i + 16
umull v3.8h, v0.8b, v17.8b // Rx2lo = vmull_u8(Sx4, 0xff);
umull2 v4.8h, v0.16b, v17.16b // Rx2hi = vmull_high_u8(Sx4, 0xff)
ldr q0, [x19, x10] // Sx4 = vld1q_u8(&Srgba[i + 16])
umlal v3.8h, v1.8b, v5.8b // vmlal_u8(Rx2lo, Dx4, Sax4)
umlal2 v4.8h, v1.16b, v5.16b // vmlal_high_u8(Rx2hi, Dx4, Sax4)
ldr q1, [x20, x10] // Dx4 = vld1q_u8(&Drgba[i + 16])
ursra v3.8h, v3.8h, #8 // vrsraq_n_u16(Rx2lo, Rx2lo, 8)
ursra v4.8h, v4.8h, #8 // vrsraq_n_u16(Rx2hi, Rx2hi, 8)
uqrshrn v2.8b, v3.8h, #8 // Rx4 = vqrshrn_n_u16(Rx2lo, 8)
uqrshrn2 v2.16b, v4.8h, #8 // vqrshrn_high_n_u16(Rx4, Rx2hi, 8)
cmp x10, #3972
str q2, [x21, x9] // vst1q_u8(&Rrgba[i], Rx4)
mov x9, x10
b.lo .LBB0_3 kevinl7778 2021-02-23T18:17:17.459Z Like 0 Likes 0 Comments c_cpp #include <Wire.h>
int ledB[]{13,12,11,10,9,8,7,6,5};
int ledA[]{4,3,2, 1, 0, A0, A1, A2, A3};
int DelayTime = 50;
int comm1 = 4;
void setup()
{
for (int i; i<9; i++)
{pinMode(ledB[i], OUTPUT); pinMode(ledA[i], OUTPUT);}
for (int i = 0; i <= 8; i++) {digitalWrite(ledB[i], HIGH);}//remove for real world
for (int i = 0; i <= 8; i++) {digitalWrite(ledA[i], HIGH);}//remove for real world
Wire.begin(comm1);
Wire.onReceive(receiveEvent);
Serial.begin(9600);
}
void loop()
{
}
void receiveEvent(int howMany)
{int x = Wire.read(); Serial.println(x);
if (x==0)
{digitalWrite(ledB[0],LOW);}
else{digitalWrite(ledB[0],HIGH);}
}
//{for (int i=0; i<=9; i++)
// {a[i]= Wire.read(); Serial.println(a[i]); (a[i]==1){digitalWrite(ledB[i],LOW);}} kevinl7778 2021-02-23T17:59:32.487Z Like 0 Likes 0 Comments c_cpp ////////////////////////////////////////////////////////Include default libraries
#include <Wire.h>
////////////////////////////////////////////////////////Set up constants
int comm1 = 4;
int comm2 = 5;
int DelayTime = 250;
int FS[]{13,12,11,10,9,8,7,6,5};
int Knb[18];
int led[]{4,3,2,A2,A3};
int Group = 1;
int GroupLastState = 0;
int Knob = 0;
int comm = comm1;
////////////////////////////////////////////////////////Start ini proccess
void setup(){
init1(); //Set pinmode for foot switches and leds
ledSet(); //Sweep through leds and set 0 on
Wire.begin();
Serial.begin(9600);}
////////////////////////////////////////////////////////////Set var's :Need to change to 0-17 all set to 0
int x = 0;
int y = 0;
////////////////////////////////////////////////////////////Main loop
void loop()
{
Wire.beginTransmission(comm);
//for (int i = 0; i <= 8; i++)
//{digitalRead(FS[i]); if (digitalRead(FS[i]) == LOW)
//{Serial.println(String("x = ")+ x);Serial.println(String("Bingo ") +FS[i]);};}
Grouping();
Switch();
Knobs();
x=digitalRead(FS[0]);
Wire.write(x);
Wire.endTransmission(comm);
delay(100);
// Wire.beginTransmission(comm);
//y=digitalRead(FS[1]);
//Wire.write(y);
//Serial.println(String("y = ")+ y);
//Wire.endTransmission(comm);
delay(100);
}
//////////////////////////////////////////////////////////Init buttons and outputs
void init1(){
for (int i=0; i<9; i++){pinMode(FS[i], INPUT_PULLUP);}
for (int j=0; j<5; j++){pinMode(led[j],OUTPUT);}}
//////////////////////////////////////////////////////////////////////////////////////////////////////////Init Knight Rider lights
void ledSet(){
for (int j = 0; j <= 4; j++) {digitalWrite(led[j], HIGH); delay(DelayTime);digitalWrite(led[j], LOW);Serial.println(String("J++") +j);}
for (int j = 4; j >= 0; j--) {digitalWrite(led[j], HIGH); delay(DelayTime);digitalWrite(led[j], LOW);Serial.println(String("J--") +j);}
digitalWrite(led[0], HIGH);}
//////////////////////////////////////////////////////////////////////////////////////////////////////Changing Comunication group
void Switch(){
if (Group != GroupLastState){
switch (Group) {
case 1:
comm = comm1;
digitalWrite(led[1], HIGH);
Serial.println(String("Group = ") +Group);
Serial.println(String("comm = ") +comm);
GroupLastState =1;
break;
case 2:
comm = comm1;
digitalWrite(led[2], HIGH);
Serial.println(String("Group = ") +Group);
Serial.println(String("comm = ") +comm);
GroupLastState =2;
break;
case 3:
comm = comm2;
digitalWrite(led[3], HIGH);
Serial.println(String("Group = ") +Group);
Serial.println(String("comm = ") +comm);
GroupLastState =3;
break;
case 4:
comm = comm2;
digitalWrite(led[4], HIGH);
Serial.println(String("Group = ") +Group);
Serial.println(String("comm = ") +comm);
GroupLastState =4;
break;}}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////Switching groups
void Grouping(){if (digitalRead(FS[1]) == LOW && digitalRead(FS[0]) == LOW) {Group += 1;if (Group > 4) {Group = 1;}for (int i=1; i<5; i++){digitalWrite(led[i], LOW);};}
if (digitalRead(FS[8]) == LOW && digitalRead(FS[7]) == LOW) {Group -= 1;if (Group < 1) {Group = 4;}for (int i=1; i<5; i++){digitalWrite(led[i], LOW);};}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////Turning Knobs
void Knobs(){if (digitalRead(FS[0,3,6]) == LOW){Knob += 1; Serial.println(String("Knob = ") +Knob);}
else {Knob = 0;}
}
phillc 2019-08-09T17:15:08.620Z Like 0 Likes 0 Comments python s='s=%r;print s%%s...';print s%s... other019 2019-05-31T10:43:14.943Z Like 0 Likes 0 Comments javascript class GameAi{
constructor(){
//initcall
//minimax (currentPos,3,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,true);
}
gameAssesState(position){
//algorytm oceniania stanug gry
//wyższa ocena im bliżej do celu
//prawdopodbne poziomy inteligencji
// 8**3 = 512 liści
// 8**5 = 32768 liści
// 8**7 = 2097152 liści
}
isGameOver(position){
}
minimax(position,depth,alpha,beta,maximizingPlayer){
if (depth == 0 || isGameOver(position))
return gameAssesState(position);
if (maximizingPlayer){
var maxEval = Number.NEGATIVE_INFINITY;
var childs = getChilds(position);
child.forEach(
function(child){
var eval = minimax(child,depth-1,alpha,beta,false);
maxEval = Math.max(maxEval,eval);
alpha = Math.max(alpha,eval);
if (beta<=alpha){
break;
}
}
);
return maxEval;
}
else{
var minEval =
}
}
}
ihowarth 2019-05-28T19:56:45.219Z Like 0 Likes 0 Comments javascript const Kim = {
size: "XS",
hotness: "∞"
}; abemassry 2018-06-04T03:13:25.693Z Like 0 Likes 0 Comments golang package main
import "fmt"
func main() {
fmt.Println("Hello World")
} mparke 2017-04-27T21:41:53.699Z Like 0 Likes 0 Comments javascript <script>alert('hello world');</script> abemassry 2017-04-26T17:54:04.128Z Like 0 Likes 0 Comments sh for i in `bc <<< "obase = 16 ; $(seq 0 65536)" | tr '\n' ' '`; do printf "$i:"; printf "\u$i"; printf '\n'; done | rs -e | less Dorthu 2017-04-07T18:58:37.335Z Like 0 Likes 0 Comments python >>> def captcha(challenge=None, answer=None):
... def _dec(f):
... @wraps(f)
... def _inner(*args, **kwargs):
... if not challenge in kwargs or not kwargs[challenge] == answer:
... raise ValueError('captcha failed!')
... del kwargs[challenge]
... return f(*args, **kwargs)
... return _inner
... return _dec
...
>>> @captcha(challenge='two_plus_three', answer=5)
... def foo(bar):
... print("bar is {}".format(bar))
...
>>> foo('test')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 6, in _inner
ValueError: captcha failed!
>>> foo('test', two_plus_three=5)
bar is test