VB Code Commented To Convert It To Java?
Oct 13, 2009
I am a Java developer. I have the task of converting a VB class to Java.Can some VB developer comment the following VB code so that I can write its Java equivalent?
Public Class RmaValidationCode
' Values for test type
Public Const SOFTWARE_TEST_TYPE = 0
[code].....
View 2 Replies
ADVERTISEMENT
Mar 10, 2010
I'm working with an inherited code base which contains thousands of lines of commented out code. I know the previous coder meant to save all his hard work for posterity rather than simply deleting it but: I will never read it and it just gets in the way. One problem example is that when I perform text searches for certain code segments I gets dozens of "false" hits in the commented code. Is there a quick/easy way to detect large blocks of commented out code? A clever RegEx perhaps? I happen to be working in VB.NET at this time and comment character is a single apostrophe.
View 7 Replies
Mar 1, 2011
Vb.net For each currentFarm in ......
If urlQueue.Count > 0 Then
Debug.Assert(currentFarm.isBusy = False)
Debug.Assert(currentFarm.WebClient.IsBusy = False)
[CODE]...
The commented code won't work. That's because by the time the thread start, the variable currentFarm have changed. So I create a new function and cache the currentFarm in the function parameter. No there will be a cache of currentFarm address (object is always a pointer) on a stack and that address is the one being passed to the System.Threading.Thread constructor.
View 5 Replies
Feb 15, 2010
I want to convert java file into vb.net files
View 2 Replies
Oct 7, 2010
I have developed one project by using JAVA and swing.Can i convert that project to as .net project?
View 3 Replies
May 16, 2011
Can someone convert this java code into Vb.net? because i'm dont understand in java language.[code]...
View 4 Replies
Feb 15, 2011
We are developing an Android Application (Java) that reads an image, encode the bytes in base64 to send them over HTTP (via GET) to a WebService written in VB.NET.On .NET side, they are using this :
Dim Pix As Image
Pix = Image.FromFile("C:UsersPublicPicturesSample PicturesTree.jpg")
Dim ms As New MemoryStream[code]....
How can I pass the correct string to them to correctly decode the image from Java encoding (unsigned) to .NET decoding (signed)?
View 1 Replies
Jul 20, 2009
i need to convert a Java tool into a VB (2005) application. Most things are fairly straight forward, but i have on a few lines my problem the appropriate VB function to find.
View 5 Replies
Dec 21, 2011
i'm using the following algorithm to encrypt and decrypt a string in VB.NET and wanted to do that same method in Android also.
Encryption:
Private Function decryptStr(ByVal key As String, ByVal enc As String) As String
Try
DES.Key = Hash.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(key))
[Code]....
View 1 Replies
Oct 29, 2009
I wrote a Java class that parses a bpel text file and then returns a count of the number of occurences of certain words. I wanted to convert it to VB2008 Forms application, so that its results are displayed in a TextBox and not on the console. The problem is that VB2008 lacks Scanner and StringTokenizer classes, which are in my current Java class. Am not sure how to get the same functionality (or better) in VB2008. Can someone out there help to convert this class.
[Code]...
View 1 Replies
Feb 24, 2011
I have the following Java code that i am trying to dissect to better understand what all it is doing:
try {
String userName = System.getenv("USERNAME");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH.mm.ss");
OracleDataSource ds = new OracleDataSource();
ds.setDriverType("thin");
ds.setServerName("xxxxxxx");
[Code]...
View 4 Replies
Nov 9, 2011
I am trying to convert a public adaptation of the Whirlpool hash from Java to VB.NET, I am getting errors that do not make sense to me and thusly I don't know how to fix them.
[Code]...
View 12 Replies
Apr 21, 2012
I am trying to learn OOD/OOP and read on the net that I am not supposed convert SQL tables into classes. But I cannot find an explanation why not to do it or which tables to skip. So I made an web application based on the below diagram. It works perfectly well. But I do not use OO. which table should not be mapped into a class and why not. do not use LINQ or NHibernate, etc as I do not understand them. I just need to understand the OOD.
View 2 Replies
Dec 10, 2010
where i can find the converter of code from java to vb.net.
View 2 Replies
Dec 8, 2009
my project was intially mandated to be done in c#.however a large contributor to the project wrote much of the business logic, which he knows well, in vb.net.How difficult would it be to convert the following c# code into vb.net.
[Code]...
View 5 Replies
Sep 19, 2011
I'm new here at Dream.In.Code, and this is my first question! To begin I would like to say I am new to Java but not new to coding, I am using Eclipse IDE 3.7 for Java and only have a basic knowledge of Java. I understand how it works; I don't know very much code... On to my question! I am wishing to create a simple JAR file for my own education/demonstration. Yet despite my searching and reading through my book I cannot find any relevant information about how JAR files are constructed. So, what defines a JAR file? How does one compile/make one?
P.S. I wish to work with JAR files because of their seeming simplistic nature and cross-compatibility. This is true, yes?My dearest apologies, I realise I posted this in the wrong forum. May a moderator move it for me?
View 5 Replies
Jan 2, 2010
I have a program that allows a user to type java code into a rich text box and then compile it using the java compiler. Whenever I try to compile the code that I have written I get an error that says that I have an illegal character at the beginning of my code that is not there. This is the error the compiler is giving me:
C:UsersTravis Michael>"Program FilesJavajdk1.6.0_17injavac" Test.java
Test.java:1: illegal character: 187
public class Test
[code].....
View 5 Replies
Mar 2, 2012
Try
Dim sr As New IO.StreamReader(Mapfile & ".txt")
'Dim intValue As String = ""
[code].....
View 2 Replies
Oct 20, 2009
some idea to how to run VB project using Java.
View 3 Replies
Apr 24, 2012
I have quite a long java class and I need it displayed within a text box, with a scroll bar, in a powerpoint presentation. I have only just found out that powerpoint can use vb to create macros. I would want it displayed in the powerpoint presentation correctly formatted etc. [Code]
View 2 Replies
Oct 14, 2011
I have a folder which consists of 13 files. I want if a file contains human readable code than count the number of commented lines, line of code, and otherwise ignore the file.
View 4 Replies
Jun 25, 2010
I just had this throw a compilation error while refactoring some legacy (hence VB.NET) unit tests, where I wanted to just comment out one of the sample inputs to MBUnit:
<RowTest> _
'<Row("Something")> _
<Row("SomethingElse")> _
[Code]....
Is it actually treating the whitespace/commented-out line as an actual line? Generally, when I gripe about VB.NET, I preface it with, "Now, I wouldn't want to be the guy writing their grammar, but..." This seems like one of those cases where I don't know the answer, if I'm right.
View 1 Replies
Apr 15, 2012
I've only used type inference when using LINQ in VB.NET. However, I'm aware that type inference can be used in other parts of the language, as demonstrated below:
Dim i = 1 'i is inferred to be an Integer
Dim s = "Hoi" 's is inferred to be a string
Dim Temperatures(10) as Double
[code]....
I can see how type inference reduces the amount of typing I would need to write a piece of code and can also make it quicker to change the type of a base variable (such as Temperatures(10) above) as you wouldn't need to change the types of all other variables that access it (such as T). However, I was concerned that the lack of an explicit declaration of type might make the code harder to read, say during a code inspection, as it may not be immediately obvious what type a variable is. For example, by looking at just the For loop above, you might correclty assume that T is some floating point value, but wouldn't be able to tell if it's single- or double-precision without looking back at the declaration of Temperatures. Depending on how the code is written, Temperatures could be declared much earlier and would thus require the reader to go back and find the declaration and then resume reading. Admittedly, when using a good IDE, this is not so much of an issue, as a quick hover of the mouse cursor over the variable name reveals the type.
Also, I would imagine that using type inference in some situations could introduce some bugs when attempting to change the code. Consider the following (admittedly contrived) example, assuming that the classes A and B do completely different things.
Class A
Public Sub DoSomething()
End Sub
End Class
[code]....
It is possible to change the type of ObjectList from A to B and the code would compile, but would function differently, which could manifest as a bug in other parts of the code.With some examples of type inference, I would imagine that most people would agree that its use has no negative affect on readability or maintainability. For example, in Java 7, the following can be used:
ArrayList<String> a = new ArrayList<>(); // The constructor type is inferred from the declaration.
instead of
ArrayList<String> a = new ArrayList<String>();
View 3 Replies
Jun 13, 2009
I'm trying to make a vb.net application that has got 2 textboxes, 7 radio buttons and 2 buttons(one named compile and the other 'run'). How can I load the content of a C/C++(or any programming language) file into the 1st textbox and on clicking the compile button, i should be able to show the errors or the C/C++ program in the 2nd textbox. On clicking Run, I should be able to show the output in the 2nd textbox. In short, I want to use the 2nd textbox as a terminal/console. The radio buttons are 4 selecting the language C or C++ or python or C# or java or perl or vb.R d compilers of all these languages present in .net?
View 2 Replies
Mar 24, 2010
how to convert an existing Standalone Java Application to a Dynamic WEB Application which can be deployed on Apache-Tomcat Server container ?
View 2 Replies
May 26, 2010
i recorded the following macro in excel 2007:
[Code]...
View 3 Replies
Jul 19, 2011
This code was posted in Chit Chat and everyone is saying how great it is. I just have Visual Studio 2010 and no familiarity with VB6 so I thought it would be good to convert the code to Visual Basic 2010.
[Code]...
View 39 Replies
Jul 18, 2011
Dim wiaManager As WiaClass = Nothing ' WIA manager COM object
Dim wiaDevs As CollectionClass = Nothing ' WIA devices collection COM object
Dim wiaRoot As ItemClass = Nothing ' WIA root device COM object
Dim wiaPics As CollectionClass = Nothing ' WIA collection COM object[code]....
View 2 Replies
Mar 15, 2011
I had the following code:[code]How can I convert this code to listbox code? Because the above code is using datagridview but I would like to change it to listbox.
View 1 Replies
Mar 25, 2009
the equivalent code for the following c# codepreviousRow.Cells[cellIndex].RowSpan < 2 ? 2 : previousRow.Cells[cellIndex].RowSpan + 1;
View 4 Replies