JSF*ck π€¦π»ββοΈ
It's a programming style based on the atomic parts of JavaScript.
It uses only 6 different characters to write and execute code.
Try it one time π€£
http://www.jsfuck.com/
#Fun #JavaScript
@ProgrammingTip
It's a programming style based on the atomic parts of JavaScript.
It uses only 6 different characters to write and execute code.
Try it one time π€£
http://www.jsfuck.com/
#Fun #JavaScript
@ProgrammingTip
Jsfuck
JSFuck - Write any JavaScript with 6 Characters: []()!+
JSFuck is an esoteric and educational programming style based on the atomic parts of JavaScript. It uses only six different characters to execute code.
Visual Studio Code treasures π
A list of Visual Studio Code extensions i canβt live without them.
http://bit.do/vscode
#Extensions #VSCode
@ProgrammingTip
A list of Visual Studio Code extensions i canβt live without them.
http://bit.do/vscode
#Extensions #VSCode
@ProgrammingTip
Medium
π Visual Studio Code treasures
a list of Visual Studio Code extensions I canβt live without
Measuring Time π°
Many applications require a very precise time measurement. For this purpose, Java provides static methods in System class. π
1οΈβ£ - currentTimeMillis(): Returns current time in MilliSeconds since Epoch Time, in Long.
view sourceprint?
2οΈβ£ - nanoTime(): Returns the current value of the most precise available system timer, in NanoSeconds, in long.
nanoTime() is meant for measuring relative time interval instead of providing absolute timing.
#java #time
@ProgrammingTip
Many applications require a very precise time measurement. For this purpose, Java provides static methods in System class. π
1οΈβ£ - currentTimeMillis(): Returns current time in MilliSeconds since Epoch Time, in Long.
view sourceprint?
long startTime = System.currentTimeMillis();
long estimatedTime = System.currentTimeMillis() - startTime;
2οΈβ£ - nanoTime(): Returns the current value of the most precise available system timer, in NanoSeconds, in long.
nanoTime() is meant for measuring relative time interval instead of providing absolute timing.
long startTime = System.nanoTime();
long estimatedTime = System.nanoTime() - startTime;
#java #time
@ProgrammingTip
Android Asset Studio π
A web-based set of tools for generating graphics and other assets that would eventually be in an Android application's res/ directory.
βLauncher icons
βAction bar icons
βNotification icons
βGeneric square icons
βSimple nine-patches
https://jgilfelt.github.io/AndroidAssetStudio/
#Android #Tools
@ProgrammingTip
A web-based set of tools for generating graphics and other assets that would eventually be in an Android application's res/ directory.
βLauncher icons
βAction bar icons
βNotification icons
βGeneric square icons
βSimple nine-patches
https://jgilfelt.github.io/AndroidAssetStudio/
#Android #Tools
@ProgrammingTip
This media is not supported in your browser
VIEW IN TELEGRAM
Expodal π₯
The Most Explosive Modal on the Web
Demo : https://jessekorzan.github.io/expodal/
Source : https://github.com/jessekorzan/expodal
#Modal
@ProgrammingTip
The Most Explosive Modal on the Web
Demo : https://jessekorzan.github.io/expodal/
Source : https://github.com/jessekorzan/expodal
#Modal
@ProgrammingTip
HTML5UP π
Attractive HTML5 Templates for Free π―
https://html5up.net/
#Theme #Template
@ProgrammingTip
Attractive HTML5 Templates for Free π―
https://html5up.net/
#Theme #Template
@ProgrammingTip
A.W.E.S.O.M.O π€
A big list of really interesting open source projects, for more than 18 programming languages.
https://github.com/lk-geimfari/awesomo
#OpenSource
@ProgrammingTip
A big list of really interesting open source projects, for more than 18 programming languages.
https://github.com/lk-geimfari/awesomo
#OpenSource
@ProgrammingTip
JavaScript Clean Code π
Use meaningful and pronounceable variable names π‘
Bad :
Good :
#JSTips #CleanCode
@ProgrammingTip
Use meaningful and pronounceable variable names π‘
Bad :
const yyyymmdstr = moment().format('YYYY/MM/DD');Good :
const currentDate = moment().format('YYYY/MM/DD');#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code π
Use default arguments instead of short circuiting or conditionals π‘
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
Use default arguments instead of short circuiting or conditionals π‘
Bad :
function createMicrobrewery(name) {
const breweryName = name || 'Hipster Brew Co.';
// ...
}Good :
function createMicrobrewery(breweryName = 'Hipster Brew Co.') {
// ...
}ββββββ
#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code π
Use explanatory variables π‘
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
Use explanatory variables π‘
Bad :
const address = 'One Infinite Loop, Cupertino 95014';
const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;
saveCityZipCode(address.match(cityZipCodeRegex)[1], address.match(cityZipCodeRegex)[2]);
Good :
const address = 'One Infinite Loop, Cupertino 95014';
const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;
const [, city, zipCode] = address.match(cityZipCodeRegex) || [];
saveCityZipCode(city, zipCode);
ββββββ
#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code π
We will read more code than we will ever write. It's important that the code we do write is readable and searchable.π‘
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
We will read more code than we will ever write. It's important that the code we do write is readable and searchable.π‘
Bad :
// What the heck is 86400000 for?
setTimeout(blastOff, 86400000);
Good :
// Declare them as capitalized `const` globals.
const MILLISECONDS_IN_A_DAY = 86400000;
setTimeout(blastOff, MILLISECONDS_IN_A_DAY);
ββββββ
#JSTips #CleanCode
@ProgrammingTip
JavaScript Clean Code π
Don't add unneeded context π‘
If your class/object name tells you something, don't repeat that in your variable name.
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
Don't add unneeded context π‘
If your class/object name tells you something, don't repeat that in your variable name.
Bad :
const Car = {
carMake: 'Honda',
carModel: 'Accord',
carColor: 'Blue'
};
function paintCar(car) {
car.carColor = 'Red';
}Good :
const Car = {
make: 'Honda',
model: 'Accord',
color: 'Blue'
};
function paintCar(car) {
car.color = 'Red';
}ββββββ
#JSTips #CleanCode
@ProgrammingTip
πΌ Rescale Image In Java πΌ
An image can rescaled using AffineTransform. First of all, Image Buffer of input image is created and then scaled image is rendered. βοΈ
#java #image
@ProgrammingTip
An image can rescaled using AffineTransform. First of all, Image Buffer of input image is created and then scaled image is rendered. βοΈ
BufferedImage imgSource =
ImageIO.read(new File("myImage.jpg"));
BufferedImage imgDest =
new BufferedImage(100, 100,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = imgDest.createGraphics();
AffineTransform affinetransformation =
AffineTransform.getScaleInstance(2, 2);
g2d.drawRenderedImage(imgSource,
affinetransformation);
ImageIO.write(imgDest, "JPG",
new File("outImage.jpg"));
#java #image
@ProgrammingTip
JavaScript Clean Code π
Functions should do one thing π‘
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
Functions should do one thing π‘
Bad :
function emailClients(clients) {
clients.forEach((client) => {
const clientRecord = database.lookup(client);
if (clientRecord.isActive()) {
email(client);
}
});
}Good :
function emailActiveClients(clients) {
clients
.filter(isActiveClient)
.forEach(email);
}
function isActiveClient(client) {
const clientRecord = database.lookup(client);
return clientRecord.isActive();
}ββββββ
#JSTips #CleanCode
@ProgrammingTip
Media is too big
VIEW IN TELEGRAM
C# Events & Delegates βοΈ
Instructor : Mosh Hamedani π₯
#CSharp #Events #Delegates
@ProgrammingTip
Instructor : Mosh Hamedani π₯
#CSharp #Events #Delegates
@ProgrammingTip
π¦ Macro To Get Array Size Of Any Data Type In C π¦
The following macro will help you in getting the size of an array of any data type. It works by dividing the length of the array to the size of its field. π‘
Code:
Output:
#c #cpp #array
@ProgrammingTip
The following macro will help you in getting the size of an array of any data type. It works by dividing the length of the array to the size of its field. π‘
Code:
#define num(x) (sizeof (x) / sizeof (*x))
int _tmain() {
int numbers[10] =
{1,1,1,1,1,1};
char *chars[20] =
{"","","","","","","","",""};
printf("Size of numbers[10] is %d\n",
num(numbers));
printf("Size of chars[20] is %d\n",
num(chars));
}
Output:
Size of numbers[10] is 10
Size of chars[20] is 20
Press any key to continue . . .
#c #cpp #array
@ProgrammingTip
JavaScript Clean Code π
Don't use flags as function parameters π‘
Bad :
Good :
ββββββ
#JSTips #CleanCode
@ProgrammingTip
Don't use flags as function parameters π‘
Bad :
function createFile(name, temp) {
if (temp) {
fs.create(`./temp/${name}`);
} else {
fs.create(name);
}
}Good :
function createFile(name) {
fs.create(name);
}
function createTempFile(name) {
createFile(`./temp/${name}`);
}ββββββ
#JSTips #CleanCode
@ProgrammingTip