Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!

Fred Victa

Ranch Hand
+ Follow
since May 01, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fred Victa

Suppose there is a String array called "myStringArray" and it is passed to a method called "myTestMethod".

Suppose this String array has the following values:
myStringArray[0] = "Arial;Arial;Greetings";
myStringArray[1] = "<strong>My name is John Doe</strong>";

I would like to set the String array called "text" equal to the values of the String array "myStringArray", but I don't want the String array "text" to have the font names and the xml tags.
In other words, I would like "text" to have these values:
text[0] = "Greetings";
text[1] = "My name is John Doe";

How can I do this? Below is the code I have written so far.

4 days ago
I'm trying to create an aspect, but I keep getting an error saying that an interface is required.

Here is my code:
aspect TimeZoneConversionAspect


I've also tried the following code and I got the same error. What could be going wrong?
public aspect TimeZoneConversionAspect

7 months ago

Rob Spoor wrote:What do you need to do with these properties?

If they are of type Date or Calendar and they are not null, then convert the timestamp to UTC.

The properties are private.
7 months ago

Ron McLeod wrote:You can use reflection to inspect the fields for their type:

Thank you.

Suppose the properties are private. If the field is of type Date or Calendar and it is not null, how can I convert the timestamp to UTC?
7 months ago

Ron McLeod wrote:Do you want to know what type of object was passed to your method?

I was thinking of having a method that takes an argument of type Object. Then, I would like to find out whether that object has any properties of type Date or Calendar. For example, if a Car object were passed to the method, I would like to find out if the Car object has any properties of type Date or Calendar. If a Person object were passed to the method, I would like to find out if the Person object has any properties of type Date or Calendar.
7 months ago
I want to create a method in Java that has an input parameter of type Object and use Java reflection to find out if the object has a property of type, Date or Calendar. How can I do this?
7 months ago

Frits Walraven wrote:You might want to check the WAS admin console if your application is deployed succesfully, typically hosted on this URL: https://localhost:9043/ibm/console

My application is not starting up correctly.

I'm seeing this in my log files:
R log4j:ERROR >>>>> JEEK2QChannel: Cannot create Open JEE JMS Connection to K2: JEEK2QChannel: Getting connection or Destination from JNDI (jms/SIB_CCCS_KEH_FACTORY:jms/SIB_CCCS_TO_KEH_QUEUE) failed and Cleaned.

Do you know how I can resolve this?
1 year ago
I'm running an application on the WebSphere 8.5 server, which is on my local machine. I'm using the IBM Rational Application Developer IDE. I  have the application deployed to my local WebSphere and it is using port 9081. While running my application, I typed in http://localhost:9081 in IE and I got the message saying that it could not find the page. I also tried http://localhost:9081/ but that did not work either. I looked at my hosts file and it has localhost
1 year ago
How can I write a regular expression in ActionScript for this requirement:
Match the letters "UM" followed by any character or match the letters "PM" followed by any character.
1 year ago
I came up with a solution. Here it is:

1 year ago

Paweł Baczyński wrote:ChronoUnit.DAYS.betweenChronoUnit.MONTHS.between will help you.

For some reason I read that you want a number of days.

I'm sorry. I meant calculate a person's age in terms of the number of months. For example, if someone was born on 8/21/2015 and today's date is 8/21/2017, then he is 24 months old.
1 year ago
Suppose someone's birth date is 8/29/2016. How can I create a method that calculates the number of full months between 8/29/2016 and today's date which is 8/20/2017? For this example, the method should return 11 months since 8/29/2017 is in the future.
1 year ago
I'm trying to install Angular 2 on my PC. I'm using Windows 7.

When I run this command, it always fails: nvm install 0.12.9

Is there some other version that I can install?
How can I make a creation complete handler to a button? How can I create a function or method in ActionScript/MXML that will be executed when a button is created?
1 year ago

Mary Delamater wrote:Hi Fred

Sorry for the delay in answering - I wasn't sure what to say. The fact is that I don't work with windows much - even back in the day, when they were more popular, I generally avoided them. The book covers the basics of working with windows, but doesn't go in to a lot of detail, because there isn't much demand anymore. So, unfortunately, this all means that I don't know the answer to your question right off the top of my head. Are you having much luck when you Google it?

Fred Victa wrote:I'm working on an application that uses Javascript. When the user attempts to close a Web page, there is a pop-up window that comes up with two buttons: Leave this page and Stay on this page. How would I know if the user clicked on the "Leave this page" button? How would I know what the user clicked when using window.onbeforeunload?

I found this site helpful: