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
rem example version : 21.2.5 | |
rem output version: 21.02.05 | |
setlocal enabledelayedexpansion | |
set /p version="Enter a version number: " | |
for /f "tokens=1-3 delims=." %%a in ("%version%") do ( | |
set "major=%%a" | |
set "minor=%%b" | |
set "patch=%%c" | |
) | |
if "!patch:~1,1!"=="" set "patch=0!patch:~0,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
Echo TopMost.bat | |
@Echo Off | |
Echo This file compiles TopMost.vb to TopMost.exe | |
Echo TopMost.exe set a window on top or not | |
Echo To use | |
Echo TopMost Top ^<windowtitle^> | |
Echo TopMost Not ^<windowtitle^> | |
Echo E.G. | |
Echo TopMost Top Untitled - Notepad | |
Echo ----------------------------------------------------- |
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
// Example program | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
int getAction() | |
{ | |
int action = 0; |
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
# copy this codes to the Main flow in PAD. you may need to create the "theInput" input variable | |
Text.ToNumber Text: theNumber Number=> number | |
CALL compute_factorial | |
Display.ShowMessage Title: $'''Result''' Message: $'''Factorial = %result%''' Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed |
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> | |
#include <math.h> | |
using namespace std; | |
bool isDivisible(double number, double divisor); | |
int main() | |
{ | |
// generate 20 random numbers and checkif div by 10 | |
for (int i = 0; i < 20; 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
# count the number of mouse in list of devices | |
devices = ['laptop','mouse', 'charger', 'mouse', 'keyboard', 'mouse'] | |
mouse_count = 0 | |
for device in devices: | |
if device.upper() == 'MOUSE': | |
mouse_count += 1 | |
print(f"mouse count : {mouse_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
import ibm_db | |
dsn_hostname = "dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net" # e.g.: "dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net" | |
dsn_uid = "121a1we" # e.g. "abc12345" | |
dsn_pwd = "xfgfdg121212" # e.g. "7dBZ3wWt9XN6$o0J" | |
dsn_driver = "{IBM DB2 ODBC DRIVER}" | |
dsn_database = "BLUDB" # e.g. "BLUDB" | |
dsn_port = "50000" # e.g. "50000" | |
dsn_protocol = "TCPIP" # i.e. "TCPIP" |
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
Imports System.IO | |
Imports System.Collections.Generic | |
Imports System.Xml | |
Module Module1 | |
Sub Main() | |
' Read the sample file and populate list | |
Dim taxes As List(Of Tax) = GetData("xDataSample.txt") |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import csv | |
import sys | |
import time | |
import socket | |
import datetime |
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
@echo off | |
ECHO ********************************************************** | |
ECHO NOTE : | |
ECHO Code Analysis is enabled by default and for a good reason | |
ECHO Use this script at your own risk | |
ECHO ********************************************************** | |
ECHO . | |
ECHO Starting Visual Studio 2013 with Code Analysis OFF | |
set DevDivCodeAnalysisRunType=Disabled | |
devenv |
NewerOlder