Questions tagged [utility]

Utility software is system software designed to help analyze, configure, optimize or maintain a computer. A single piece of utility software is usually called a utility or tool.

Utility software usually focuses on how the computer infrastructure (including the computer hardware, operating system, application software and data storage) operates. Due to this focus, utilities are often rather technical and targeted at people with an advanced level of computer knowledge - in contrast to application software, which allows users to do things like creating text documents, playing games, listening to music or viewing websites.

338 questions
400
votes
16 answers

Implement touch using Python?

touch is a Unix utility that sets the modification and access times of files to the current time of day. If the file doesn't exist, it is created with default permissions. How would you implement it as a Python function? Try to be cross platform…
itsadok
  • 27,343
  • 27
  • 120
  • 167
136
votes
12 answers

Converting newline formatting from Mac to Windows

I need a conversion utility/script that will convert a .sql dump file generated on Mac to one readable on Windows. This is a continuation of a problem I had here. The issue seems to be with newline formatting in text files, but I can't find a tool…
Yarin
  • 144,097
  • 139
  • 361
  • 489
132
votes
8 answers

Java: Static Class?

I have a class full of utility functions. Instantiating an instance of it makes no semantic sense, but I still want to call its methods. What is the best way to deal with this? Static class? Abstract?
Nick Heiner
  • 108,809
  • 177
  • 454
  • 689
72
votes
7 answers

How to ensure thread safety of utility static method?

Is there any general way or rules exits by which we can ensure the thread safety of static methods specifically used in various Utility classes of any applications. Here I want to specifically point out the thread safety of Web Applications. It is…
Tapas Bose
  • 25,780
  • 71
  • 202
  • 317
62
votes
7 answers

Good tool for testing socket connections?

I'm writing a tcp/ip client and I would need a "test server" to be able to test easily. It should listen on a configurable port, show me when a client connects and what the client sent, allow me to manually enter text to send to the client. It…
Name
  • 3,232
  • 4
  • 28
  • 33
60
votes
4 answers

How can I create an utility class?

I want to create a class with utility methods, for example public class Util { public static void f (int i) {...} public static int g (int i, int j) {...} } Which is the best method to create an utility class? Should I use a private…
user2693979
  • 2,212
  • 4
  • 16
  • 22
39
votes
5 answers

Java Utility Class vs. Service

What's the difference in Java between a utility class (a class with static methods) and a Service class (a class with public methods that provides a "service"). For example, one can argue that a cryptographic object (providing methods to encrypt,…
djunforgetable
  • 799
  • 3
  • 8
  • 16
30
votes
11 answers

What are the Best Components of Boost?

I've been browsing revision 1.38.0 of the Boost libraries, in an attempt to decide if there are enough jewels there to justify negotiating my company's external software approval process. In the course of writing test programs and reading the…
Don Wakefield
  • 8,315
  • 2
  • 31
  • 53
30
votes
5 answers

How can I programmatically manipulate Windows desktop icon locations?

Several years back, I innocently tried to write a little app to save my tactically placed desktop icons because I was sick of dragging them back to their locations when some event reset them. I gave up after buring WAY too much time having failed…
ZeroBugBounce
  • 3,542
  • 3
  • 27
  • 40
28
votes
4 answers

Find usage of id not working in Android Studio on Windows

I selected an id in XML, mouse right click, find Usage shows no occurrence of id even Id exist in java file. And if i do the same in Mac its finding it. So is there any cache issue or something else ?
squiroid
  • 13,119
  • 4
  • 43
  • 67
25
votes
9 answers

Free alternative(s) to PowerGREP

First of all, great praise goes out to PowerGREP it's a great program. But it's not free. Some of it's options I'm looking for: Being able to use .NET regexp's (or similar) to find things in a filtered list of files through subdirectories.…
Mischa Kroon
  • 1,786
  • 1
  • 13
  • 19
24
votes
4 answers

C/C++ call-graph utility for Windows platform

I have a large 95% C, 5% C++ Win32 code base that I am trying to grok. What modern tools are available for generating call-graph diagrams for C or C++ projects?
Jeff Leonard
  • 3,144
  • 7
  • 27
  • 27
23
votes
4 answers

Getting a device UDID from .mobileconfig

I'm trying to write function similar to http://whatismyudid.com/ that, then approved, will return the users UDID and store it to a database for future reference with that user. I have written a .mobileconfig xml doc that opens in the Profile…
joseym
  • 1,312
  • 4
  • 20
  • 34
20
votes
3 answers

Is there a tool to check a Perl script for unnecessary use statements?

For Python, there is a script called importchecker which tells you if you have unnecessary import statements. Is there a similar utility for Perl use (and require) statements?
Dennis Williamson
  • 303,596
  • 86
  • 357
  • 418
15
votes
1 answer

Tool for tracing C preprocessor execution during macro expansion?

Is there a way to print step by step, what the C preprocessor is doing as it expands a macro? For example, I would give it some C language text (ex: .h file(s)) to preprocess. For sake of demonstration, here's a simple example: // somefile.h #define…
chadjoan
  • 425
  • 3
  • 10
1
2 3
22 23