redundant-code

Redundant Code Checking

Are there any tools that can find any private functions without any references? (Redundant functions) Reason being, that a function may have been created and called from a couple of areas, but as the project expands and grows, these two calls may have been removed and swapped with a better alternative. But the method may still remain. I...

Should '#include' and 'using' statements be repeated in both header and implementation files (C++)?

I'm fairly new to C++, but my understanding is that a #include statement will essentially just dump the contents of the #included file into the location of that statement. This means that if I have a number of '#include' and 'using' statements in my header file, my implementation file can just #include the header file, and the compiler w...

Remove redundant casts in Java

Hi, I've been generifying some Java code that used lots of casts, and now most of them are redundant and unnecessary. It could be very tedious to inspect all the usages of the code to remove them, so: are there any tools to help to identify (and remove) superfluous casts? Thanks! ...

Is there an easy way to read filenames in a directory and add to an array?

Hi folks, I have a directory: Audio/ and in that will be mp3 files only. I'm wanting to automate the process of creating links to those files. Is there a way to read a directory and add filenames within that directory to an array? It'd be doubly cool if we could do an associative array, and have the key be the file name minus the ...

How to import my imports in JSP?

All of my JSPs have this at the top: <%@ page language="java" isELIgnored="false" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="spring" uri="http://www.springfr...