Quantcast
Channel: DaniWeb Code Topics
Browsing all 225 articles
Browse latest View live

OZ Programming Top Two Max Numbers in A List

I am having trouble with an OZ Program (Mozart Programming). I have a code to find the maximum element in a list. The code I have so far is: local fun {MaxList L1} case L1 of nil then 0 [] X|Xr then...

View Article


[PHP] About environment variables

Simple Advice This is just a reminder. When setting environment variables through .htaccess, CLI or dotenv use filter_var() to evaluate a boolean. For example, start the built-in PHP server with these...

View Article


A simpler, safer alternative to java.util.Scanner

This class is intended as a small and simple alternative to java.util.Scanner for people in the early stages of learning Java. Unlike Scanner it has built-in error handling and retry, it throws no...

View Article

Nested array printing etc - designing for reuse

This is a little discussion/example of design for modularity and re-use, inspired by javaAddict and Orlando Augusto posts in their thread “Dynamic Multidimensional Array Printing”...

View Article

secure proxy objects for frontend API

Usage: Provides a secure frontend object with restricted access to attributes of the backend object.

View Article


Listing primes using list comprehensions with the aid of PLINQ in C#

OH noo, please not that again! Yeah, primes sigh. But they play a minor role here as a perfect victim to explain some other things. Would not advise to use the algorithm here to calculate them in real...

View Article

How to disabled ADD TO CART button when user had not checked the zipcode

I am building an e-commerce website i found one error in last night in my site Error: If user enters the zipcode in zip code field & without clicking on CHECK OR GO Button, when he clicks on ADD...

View Article

Image may be NSFW.
Clik here to view.

Plot a Valantine's heart on your screen

There are many pictures of hearts out there. I just wanted to draw a picture of a heart on my own from a math formula I found on the net. Seems there are many formulas to find. This is how it looks:...

View Article


vbScript Implementation of FolderWatch

An often underused control from vb.Net is the FolderWatch control. But sometimes you need to throw something together that doesn't need a fancy GUI. Or perhaps the task seems too trivial to go to the...

View Article


vbScript Implementation of QuickSort

Over the years I've seen a lot of discussion (and several implementations) of the Quicksort algorithm. Most of what I have seen, unfortunately, lacks sufficient commenting as well as meaningful...

View Article

Generate a 2D Maze Recursively

This code generates an ascii maze of up to size 30x30. If you try to generate a larger maze then you will likely run out of stack space. There is no way to increase the size of the stack in vbscript....

View Article

Mass insert large text file into MySQL

I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.

View Article

vbScript - Create a FolderWatch on a Folder

This is the first in (hopefully) a series of posts about vbScript. Please see my post vbScript - The Basics for more details on vbScript. My wife and I take a lot of pictures. Naturally, we end up...

View Article


vbScript - Run an External Program and Capture the Output

vbScript - Run an External Program and Capture the Output Please see my post vbScript - The Basics for more details on vbScript. When you want to execute an external program for a particular result...

View Article

vbScript - Sorting With and Without Code

vbScript - Sorting With and Without Code Please see my post vbScript - The Basics for more details on vbScript. Sorting is something that must be done from time to time. I'm going to examine three...

View Article


vbScript - Convert Integer to Binary String

vbScript - Convert Integer to Binary String Please see my post vbScript - The Basics for more details on vbScript. vbScript has a number of functions for converting from one type to another. These...

View Article

vbScript - Browse for Folder or File

vbScript - Browse for Folder or File Please see my post vbScript - The Basics for more details on vbScript. Some scripts need input (other than from the command line) from the user. This can be read...

View Article


vbScript - Get Drive Letter by Volume Label

vbScript - Get Drive Letter by Volume Label Please see my post vbScript - The Basics for more details on vbScript. I have all my computers partitioned with two partitions. The drive letters are C (OS...

View Article

vbScript - Identify File by Extension

vbScript - Identify File by Extension Please see my post vbScript - The Basics for more details on vbScript. There are times when you want to operate on all files of a given type. For example, you may...

View Article

vbScript - Identify File by Perceived Type

vbScript - Identify File by Perceived Type Please see my post vbScript - The Basics for more details on vbScript. There are times when you want to operate on all files of a given type. For example,...

View Article
Browsing all 225 articles
Browse latest View live


Latest Images