For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
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 <stdio.h> | |
#define SUM(x, y) (x + y) | |
int main(int argc, char *argv[]) | |
{ | |
int a = 5; | |
int b = 10; | |
int sum = SUM(a, b); | |
printf("%d\n", sum); |
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
/* Preprocessed code omitted */ | |
int main(int argc, char *argv[]) | |
{ | |
int a = 5; | |
int b = 10; | |
int sum = (a + b); | |
printf("%d\n", sum); | |
} |
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 <stdio.h> | |
void bar() | |
{ | |
int var = 10; | |
printf("var in bar: %d\n", var); | |
} | |
void foo() | |
{ |
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 <stdio.h> | |
#define bar() \ | |
int var = 10;\ | |
printf("var in bar: %d\n", var) | |
void foo() | |
{ | |
int var = 5; | |
printf("var in foo: %d\n", var); |
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 printError(int errorCode, string msg = "No message") | |
{ | |
cerr << "Error code: " << errorCode << " (" << msg << ")\n"; | |
} | |
int main(int argc, char *argv[]) |
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 <stdio.h> | |
#define printErrord(errorCode) printError(errorCode, "No message") | |
void printError(int errorCode, char *msg) | |
{ | |
printf("Error code: %d (%s)\n", errorCode, msg); | |
} | |
int main(int argc, char *argv[]) |
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
#ifndef MACROS_IN_C_H | |
#define MACROS_IN_C_H | |
/* Function prototypes */ | |
#endif // MACROS_IN_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
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := game_shared | |
LOCAL_MODULE_FILENAME := libgame | |
LOCAL_SRC_FILES := hellocpp/main.cpp \ | |
../../Classes/AppDelegate.cpp \ |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script> | |
<script> | |
// used to obfuscate and encrypt the credentials | |
const saltCredentials = "jf02heg9u64a{%m<83#@;Pxrjg17uyr#@&*%^Y"; | |
// encode credentials before storing | |
function encodeCredentials(crds){ | |
// json object expected e.g. {'api-id':'K0xf56g', 'pwd':'Some.Pa$$w0rd'} | |
const crd = JSON.stringify(crds); |
OlderNewer