function isDigit(s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}
//Verify login name: only 5-20 characters starting with letters and numbers can be entered. Strings of "_" and "."
function isRegisterUserName(s)
{
var patrn=/^[a-zA-Z]{1}([a-zA-Z0 -9]|[._]){4,19}$/;
if (!patrn.exec(s)) return false
return true
}
//proof Verify user name: You can only enter 1-30 strings starting with letters
function isTrueName(s)
{
var patrn=/^[a-zA-Z]{1, 30}$/;
if (!patrn.exec(s)) return false
return true
}
//Verify password: only 6-20 letters can be entered, Numbers, underscores
function isPasswd(s)
{
var patrn=/^(w){6,20}$/;
if (!patrn.exec(s)) return false
return true
}
//Verify ordinary telephone and fax numbers: it can start with " ", and in addition to numbers, it can contain "-"
function isTel( s)
{
//var patrn=/^[ ]{0,1}(d){1,3}[ ]?([-]?(d){1,12}) $/ ;
var patrn=/^[ ]{0,1}(d){1,3}[ ]?([-]?((d)|[ ]){1,12}) $/;
if (!patrn.exec(s)) return false
return true
}
//Verification mobile phone number: must start with a number, in addition to numbers, it can contain "-"
function isMobil(s)
{
var patrn=/^[ ]{0,1}(d){1,3}[ ]?([-]?((d) |[ ]){1,12}) $/;
if (!patrn.exec(s)) return false
return true
}
//Verify postal code
function isPostalCode(s)
{
//var patrn=/^[a-zA-Z0-9]{3,12}$/;
var patrn=/^[a-zA-Z0- 9 ]{3,12}$/;
if (!patrn.exec(s)) return false
return true
}
//Verify search keywords
function isSearch( s)
{
var patrn=/^[^`~!@#$%^&*() =|\][]{}:;',./?]{1} [^`~!@$%^&() =|\][]{}:;',.?]{0,19}$/;
if (!patrn.exec(s) ) return false
return true
}
function isIP(s) //by zergling
{
var patrn=/^[0-9.]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}
/*********************************************************************************
* FUNCTION: isBetween
* PARAMETERS: val AS any value
* lo AS Lower limit to check
* hi AS Higher limit to check
* CALLS: NOTHING
* RETURNS: TRUE if val is between lo and hi both inclusive, otherwise false.
***************
******************************************************************/
function isBetween (val, lo, hi) {
if ((val hi)) { return(false); }
else { return(true); }
}
/*********************************************************************************
* FUNCTION: isDate checks a valid date
* PARAMETERS: theStr AS String
* CALLS: isBetween, isInt
* RETURNS: TRUE if theStr is a valid date otherwise false.
**********************************************************************************/
function isDate ( theStr) {
var the1st = theStr.indexOf('-');
var the2nd = theStr.lastIndexOf('-');
if (the1st == the2nd) { return(false); }
else {
var y = theStr.substring(0,the1st);
var m = theStr.substring(the1st 1,the2nd);
var d = theStr.substring(the2nd 1,theStr .length);
var maxDays = 31;
if (isInt(m)==false || isInt(d)==false || isInt(y)==false) {
return(false ); }
else if (y.length else if (!isBetween (m, 1, 12)) { return(false); }
else if (m==4 || m==6 || m==9 || m==11) maxDays = 30;
else if (m==2) {
if (y % 4 > 0 ) maxDays = 28;
else if (y % 100 == 0 && y % 400 > 0) maxDays = 28;
else maxDays = 29;
}
if (isBetween(d, 1 , maxDays) == false) { return(false); }
else { return(true); }
}
}
/*********************************************************************************
* FUNCTION: isEuDate checks a valid date in British format
* PARAMETERS: theStr AS String
* CALLS: isBetween, isInt
* RETURNS: TRUE if theStr is a valid date otherwise false.
**********************************************************************************/
function isEuDate ( theStr) {
if (isBetween(theStr.length, 8, 10) == false) { return(false); }
else {
var the1st = theStr.indexOf('/');
var the2nd = theStr.lastIndexOf('/');
if (the1st == the2nd) { return(false); }
else {
var m = theStr.substring(the1st 1,the2nd );
var d = theStr.substring(0,the1st);
var y = theStr.substring(the2nd 1,theStr.length);
var maxDays = 31;
if (isInt( m)==false || isInt(d)==false || isInt(y)==false) {
return(false); }
else if (y.length else if (isBetween (m, 1, 12) == false) { return(false); }
else if (m==4 || m==6 || m==9 || m==11) maxDays = 30;
else if (m==2) {
if (y % 4 > 0) maxDays = 28;
else if (y % 100 == 0 && y % 400 > 0) maxDays = 28;
else maxDays = 29;
}
if (isBetween(d, 1, maxDays) == false) { return(false); }
else { return(true); }
}
}
}
/**************************************************** ****************************
* 기능: 날짜 비교! 어느 것이 최신입니까!
* 매개변수: lessDate,moreDate AS String
* 호출: isDate,isBetween
* 반환: lessDate
function isComdate (lessDate , moreDate)
{
if (!isDate(lessDate)) { return(false);}
if (!isDate (moreDate)) { return(false);}
var less1st = lessDate.indexOf('-');
var less2nd = lessDate.lastIndexOf('-');
var more1st = moreDate.indexOf('-');
var more2nd = moreDate.lastIndexOf('-');
var lessy = lessDate.substrin(0,less1st);
var lessm = lessDate.substring(less1st 1,less2nd);
var lessd = lessDate.substring(less2nd 1,lessDate.length);
var morey = moreDate.substring(0,more1st);
var morem = moreDate.substring(more1st 1,more2nd);
var mored = moreDate.substring(more2nd 1,moreDate.length);
var Date1 = new Date(lessy,lessm,lessd);
var Date2 = new Date(morey,morem,mored);
if (Date1>Date2) { return(false);}
return(true);
}
/**************************************************** *****************************
* FUNCTION isEmpty는 매개변수가 비어 있는지 또는 null인지 확인합니다.
* PARAMETER str AS 문자열
********************************************** ************************************/
function isEmpty (str) {
if ((str==null)||(str.length==0)) return true;
그렇지 않으면 return(false);
}
/**************************************************** *****************************
* 함수: isInt
* 매개변수: theStr AS String
* RETURNS : 전달된 매개변수가 정수이면 TRUE, 그렇지 않으면 FALSE
* CALLS: isDigit
**************************** ************************************************** ****/
function isInt (theStr) {
var flag = true;
if (isEmpty(theStr)) { 플래그=false; }
else
{ for (var i=0; i
플래그 = 거짓; 부서지다;
}
}
}
return(플래그);
}
/**************************************************** *****************************
* 기능: isReal
* 매개변수: heStr AS String
decLen AS 정수(마침표 뒤의 자릿수)
* 반환: theStr이 부동 소수점이면 TRUE, 그렇지 않으면 FALSE
* 호출: isInt
******************** ************************************************** ***************/
function isReal (theStr, decLen) {
var dot1st = theStr.indexOf('.');
var dot2nd = theStr.lastIndexOf('.');
var K = 참;
if (isEmpty(theStr))는 false를 반환합니다.
if (dot1st == -1) {
if (!isInt(theStr)) return(false);
그렇지 않으면 반환(true);
}
else if (dot1st != dot2nd) return (false);
else if (dot1st==0) return (false);
else {
var intPart = theStr.substring(0, dot1st);
var decPart = theStr.substring(dot2nd 1);
if (decPart.length > decLen) return(false);
else if (!isInt(intPart) || !isInt(decPart)) return (false);
else if (isEmpty(decPart)) return (false);
그렇지 않으면 반환(true);
}
}
/**************************************************** *****************************
* 기능: isEmail
* 매개변수: 문자열(이메일 주소)
* 반환: 문자열이 유효한 이메일 주소인 경우 TRUE
* 전달된 문자열이 유효한 이메일 주소가 아닌 경우 FALSE
* 이메일 형식: AnyName@EmailServer 예: webmaster@hotmail.com
* @ 기호는 이메일 주소에 한 번만 나타날 수 있습니다.
************************************************************************ **********************************/
function isEmail (theStr) {
var atIndex = theStr.indexOf('@');
var dotIndex = theStr.indexOf('.', atIndex);
var 플래그 = true;
theSub = theStr.substring(0, dotIndex 1)
if ((atIndex { return(false); }
else { return(true); }
}
/**************************************************** *****************************
* 기능: newWindow
* 매개변수: doc -> 열 문서 새 창
hite -> 새 창 높이
wide -> 새 창 너비
bars -> 1-스크롤 막대 = YES 0-스크롤 막대 = NO
크기 조정 -> 1- 크기 조정 가능 = 예 0-크기 조정 가능 = 아니요
* 호출: 없음
* 반환: 새 창 인스턴스
************************ ************************************************** *********/
function newWindow(doc, hite, wide, bar, resize) {
var winNew="_blank";
var pt="toolbar=0,location=0,directories=0,status=0,menubar=0,";
opt =("scrollbars=" 바 ",");
opt =("resizing=" 크기 조정 ",");
opt =("너비="와이드 ",");
opt =("height=" 하이트);
winHandle=window.open(doc,winNew,opt);
반환;
}
/*********************************************************************************
* FUNCTION: DecimalFormat
* PARAMETERS: paramValue -> Field value
* CALLS: NONE
* RETURNS: Formated string
**********************************************************************************/
function DecimalFormat (paramValue) {
var intPart = parseInt(paramValue);
var decPart =parseFloat(paramValue) - intPart;
str = " ";
if ((decPart == 0) || (decPart == null)) str = (intPart ".00");
else str = (intPart decPart);
return (str) ;
}
"^\d $" //Non-negative integer (positive integer 0)
"^[0-9]*[1-9][0-9]*$" // Positive integer
"^((-\d )|(0 ))$" //Non-positive integer (negative integer 0)
"^-[0-9]*[1-9][0- 9]*$" //Negative integer
"^-?\d $" //Integer
"^\d (\.\d )?$" //Non-negative floating point number (positive floating point number 0 )
"^(([0-9] \.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9 ]*\.[0-9] )|([0-9]*[1-9][0-9]*))$" //Positive floating point number
"^((-\d (\ .\d )?)|(0 (\.0 )?))$" //Non-positive floating point number (negative floating point number 0)
"^(-(([0-9] \.[0- 9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9] )|([0-9]* [1-9][0-9]*)))$" // Negative floating point number
"^(-?\d )(\.\d )?$" //Floating point number
"^ [A-Za-z] $" //A string consisting of 26 English letters
"^[A-Z] $" //A string consisting of 26 uppercase English letters
"^[a-z ] $" // A string consisting of 26 lowercase English letters
"^[A-Za-z0-9] $" // A string consisting of numbers and 26 English letters
"^ \w $" //A string consisting of numbers, 26 English letters or underscores
"^[\w-] (\.[\w-] )*@[\w-] (\.[\ w-] ) $" //email address
"^[a-zA-z] ://(\w (-\w )*)(\.(\w (-\w )*))* (\?\S*)?$" //url

The future trends of Python and JavaScript include: 1. Python will consolidate its position in the fields of scientific computing and AI, 2. JavaScript will promote the development of web technology, 3. Cross-platform development will become a hot topic, and 4. Performance optimization will be the focus. Both will continue to expand application scenarios in their respective fields and make more breakthroughs in performance.

Both Python and JavaScript's choices in development environments are important. 1) Python's development environment includes PyCharm, JupyterNotebook and Anaconda, which are suitable for data science and rapid prototyping. 2) The development environment of JavaScript includes Node.js, VSCode and Webpack, which are suitable for front-end and back-end development. Choosing the right tools according to project needs can improve development efficiency and project success rate.

Yes, the engine core of JavaScript is written in C. 1) The C language provides efficient performance and underlying control, which is suitable for the development of JavaScript engine. 2) Taking the V8 engine as an example, its core is written in C, combining the efficiency and object-oriented characteristics of C. 3) The working principle of the JavaScript engine includes parsing, compiling and execution, and the C language plays a key role in these processes.

JavaScript is at the heart of modern websites because it enhances the interactivity and dynamicity of web pages. 1) It allows to change content without refreshing the page, 2) manipulate web pages through DOMAPI, 3) support complex interactive effects such as animation and drag-and-drop, 4) optimize performance and best practices to improve user experience.

C and JavaScript achieve interoperability through WebAssembly. 1) C code is compiled into WebAssembly module and introduced into JavaScript environment to enhance computing power. 2) In game development, C handles physics engines and graphics rendering, and JavaScript is responsible for game logic and user interface.

JavaScript is widely used in websites, mobile applications, desktop applications and server-side programming. 1) In website development, JavaScript operates DOM together with HTML and CSS to achieve dynamic effects and supports frameworks such as jQuery and React. 2) Through ReactNative and Ionic, JavaScript is used to develop cross-platform mobile applications. 3) The Electron framework enables JavaScript to build desktop applications. 4) Node.js allows JavaScript to run on the server side and supports high concurrent requests.

Python is more suitable for data science and automation, while JavaScript is more suitable for front-end and full-stack development. 1. Python performs well in data science and machine learning, using libraries such as NumPy and Pandas for data processing and modeling. 2. Python is concise and efficient in automation and scripting. 3. JavaScript is indispensable in front-end development and is used to build dynamic web pages and single-page applications. 4. JavaScript plays a role in back-end development through Node.js and supports full-stack development.

C and C play a vital role in the JavaScript engine, mainly used to implement interpreters and JIT compilers. 1) C is used to parse JavaScript source code and generate an abstract syntax tree. 2) C is responsible for generating and executing bytecode. 3) C implements the JIT compiler, optimizes and compiles hot-spot code at runtime, and significantly improves the execution efficiency of JavaScript.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
