Questions tagged [utility-method]

For questions regarding utility class methods.

69 questions
0
votes
0 answers

How to design a private utility method, checkSize(String[] data) in Java?

I'm a bit new to Java. How do I compile a private utility method, checkSize(String[] data) that checks incoming data for every conceivable size or null error (Smaller data is okay. Bigger data or null is not ok). It should be in the form of a…
Masha
  • 1
  • 1
0
votes
7 answers

call a function in utility class

I have a function in a utility class namespace GUI.code { public class Utility { public string GetFileName(string grpID) { string filenameUNC = "\\\\" + "localhost" + "\\AgentShare\\"; string realPath =…
user175084
  • 4,550
  • 28
  • 114
  • 169
0
votes
0 answers

C++ design options - utility class, namespace, or other?

I am fresh to C++ from Java, and am currently in the process of figuring things out. I need some advice on something that I am implementing: it's for a simulation, and will essentially be a bunch of methods for translating between real time and…
false_azure
  • 1,333
  • 4
  • 25
  • 46
0
votes
1 answer

Logback - How to write any log level by specifying it on log statement?

I'm Writing a utility for logging using logback with slf4j, Since i'm new to logback i need to know if i can write logging statement with user defined log level from calling class something like we use in java logging as …
Karthick Radhakrishnan
  • 1,151
  • 3
  • 12
  • 32
0
votes
1 answer

Best way to convert OpenGL immediate mode rendering utility methods to using VBOs?

I've written for myself a small utility class containing useful methods for rendering lines, quads, cubes, etc. quickly and easily in OpenGL. Up until now, I've been using almost entirely immediate mode, so I could focus on learning other aspects…
0
votes
0 answers

Calender View shows Utility declaration error

The following code shows error about Utility declaration and Array Adapter Class.... I have added Some more code to it.... ================================================================================== import java.text.DateFormat; import…
-1
votes
1 answer

Python3 calls function directly from class name. Utility function? Static function? Or implicit instantiate an object

I am looking the following python3 code: class MyClass(MyAbstractClass): : def my_fun1(self, input1): : return result Then at other part of the codes, MyClass is used like: output = MyClass().my_fun1(input1) I am…
Edamame
  • 23,718
  • 73
  • 186
  • 320
-1
votes
2 answers

Utility class for Android Toast object

I have decided to write my own Utility class for Toast to cut repetitive code public class Utilities { public static void initializeToast(Context context, Toast toast, String res) { cancelToast(toast); toast = Toast.makeText(context, res,…
LA_Homie
  • 169
  • 4
  • 12
-1
votes
3 answers

How to create a utility method in knockout JS?

var ViewModel = function () { var self = this; self.firstName = ko.observable("Hello…
1 2 3 4
5