# HelloACM.com

The Ultimate Computer Technology Blog | Computing, Programming, Web Hosting, Algorithms, Data Structure, SEO, Big Data, Database, Shell…

• ### Interview Question: The Number of Bits Required to Convert One Integer to Another (C/C++ function)

The question is: how many bits are required to change if we want to convert a integer to another? The problem is from [Cracking the Coding Interview]. This may seem complicated at first but it is actually very simple to implement. We have just to count the number of different bits for each position and…

• ### How to Use VBScript to Delete Duplicate Excel Rows with Another Less Column Value

In this article, I am going to share a easy and quick way to delete some duplicate rows (e.g. regarding column B) from a spreadsheet but the requirement is to keep the row with the maximum value (e.g. regarding column G). If you convert the spreadsheet into *.csv (comma separated values), which are just plain…

• ### C/C++ Function to Compute the Combination Number

We all know that the total number of solution to pick combination of n items out of m items is C(m, n), and sometimes denoted as or . We can easily write an iterative function to compute the value. The following C function comb requires a two-dimensional array to store the intermediate results. Please noted…

• ### Test Javascript On/Off in PHP via POST

Javascript is almost enabled in modern browsers. However, at some legacy devices or some particular situations where the Javascript is not supported or turned on (for security purposes), you might want to do some checks. The following is a good way to check if Javascript is turned on and pass the result into dynamic scripting…

• ### BASH Shell Script to Compute the Integer Factorial

Bash script can be very powerful. In Linux shells, with BASH script, it is possible to solve maths problems easily. It is a full programming language and arithmetic operations are just one shining aspect. The integer factorial is a simple maths problem. Given a integer N and compute the value N! = 1 x 2…

• ### BASH Script to Solve 8 Queen Problem

If you major in Computer Science, you must know the 8-queens problem, which is a classical Artificial Intelligent problem that can be solved using back tracing. Previous posts can be found here and here. I have just digged into my hard drive and found out that I wrote this 10 years ago (in 2004). It…

• ### How to Change All Filenames to Lowercase Under BASH for Files under Directories and Sub-Directories

Linux BASH shell is very powerful. You must have heard of “where there is a shell, there is a way”. We can write a script that recursively changes all the filenames to lowercases for specified folders and their sub directories. #tolower.sh convert() { mv \$1 `dirname \$1`/`basename \$1 | tr ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’ ‘abcdefghijklmnopqrstuvwxyz’` } [ \$#…

• ### How to Show System Environment Variables using VBScript/JScript under Window Scripting Host

Under WSH (Windows Script Host), you can access the COM object WScript.Shell for some useful functions. For example, the collection Environment provides the environment variables, so you can easily use either JScript or VBScript to access some particular information. VBScript The following is the VBScript that gets the variables from “Process”. Dim WSHShell C_LRF =…

• ### Tutorial Example: How to Access Microsoft Excel (Chart) using the Windows Scripting Host (JScript)

WSH (Window Scripting Host) is a powerful and handy scripting environment. It is installed by default and can be found on almost every windows versions since Win98. There are two programming languages you can use easily, which is JScript and VBScript. The scripts will be interpreted by cscript.exe (console) or wscript.exe (graphical, prefer dialogs). C:\Windows\system32>cscript/?…

• ### How To Use Compound Commands in Windows Command Shell

At Windows command shell cmd.exe you could do something powerful with the compound commands, which I believe copies from *nix. Today Someone asked me how to write a script – executes the second command after the correct execution of the first command. He suspected that the IF isn’t the right choice. In fact, using a…

• ### Tutorial: Create a Sample DLL Project using CodeBlocks IDE in C/C++

CodeBlocks is a open source, free C/C++ IDE that just works across platforms. The create-project wizard is so easy to use and it gives you a very good starting point for your project. The DLL (Dynamic Link Library) plays an important role in windows applications system. The *.dll files contain a bunch of frequently-used functions/entries…

• ### C/C++ Coding Exercise – Recursive Computation of Value e

We all know the formula to compute value e (mathematical constant that is the base of the natural logarithm) is e = 1 + 1/1！+ 1/2！+ …..+ 1/n！ Now, the best way to compute this is to use iterative approach that avoids excessive duplicate computations of intermediate values. No stack frames/function calls are required, which…

• ### Tiny Javascript Function to Redirect to Different Pages Given Different Screen Resolution

If you want to improve user experience when browsing your website, given that you know the screen resolution they are on, then the following is a quick Javascript solution that works like a charm. <script language=’javascript’> function redirect() { if (screen.width == 1024) location.href = “1024.html”; else if (screen.width == 800) location.href = “800.html”; else…

• Total 35 Pages,Page 1: 1 2 3 4 5 6 ... 35 Next >
454 Posts | 139 Categories | 959 Tags | 20 Links | 25 Comments |
854 Days | 2014/9/16 Last Updated

 Do you like the articles you read here? Connect with us: