Using Filename As Palindrome.java?
Dec 4, 2009in my vb.net code i m using filename as palindrome.java but i want only a program without any extension.
View 4 Repliesin my vb.net code i m using filename as palindrome.java but i want only a program without any extension.
View 4 RepliesI'm having a very difficult task here. I need to analyze a certain text and find the minimum number of characters it needs to become a palindrome. The text will not have any special characters or numbers, just alphabet letters. Now, I've made some progression and have tried a lot of situations correctly, but in some situations I've gotten wrong outputs on the MINIMUM number of characters needed. I've tested the below texts:
View 2 RepliesQuick query...I'm trying to scan a long string and return any values that occur between the tags <FileName> and </FileName> I've got a bit of code here to use regular expressions to return the position of the occurunces of both substrings..Just wanted to find out if there is any way to scan for both substrings within one loop (as im currently doing 2, one for the first substring and one for the 2nd) so I can use something along these lines:
ringlist = Mid(XMLRESP, (startloc + 1), (endloc - 1))
MsgBox(ringlist)
to msg box the value between the substrings...either that or another approach to return the value between the 2 substrings (it can be of variable length)
Dim patternstart As String = "<FileName>"
Dim patternend As String = "</FileName>"
Dim matchesstart As MatchCollection = Regex.Matches(XMLRESP, patternstart)
[code].....
How would I do that? Sample code is below that demonstrated that the file I opened contained the full path and file name.
I want to extract just the path and serialize that to the user.config file as a UserSetting value. Then next time the user opens the dialog box, it uses that saved path string to go immediately to the location previously used.
If openFileDialog1.ShowDialog() = DialogResult.OK Then
Properties.Settings.Default.persistConnectionType = openFileDialog1.FileName
Properties.Settings.Default.Save();
[Code].....
why i cant get the right output for a palindrome sentence.
Public Class Form1
'declaring variables
Dim strword As String
[Code]....
I have a Listview on my form with different files. I can selet a file en open it with the proces start method. To open the file i use the OpenFileDialog method and select the filename. This work very good. With the code below.
My question is if there is a method to get the selected file without using the OpenFileDialog Box. So when i dubbelclick the selected file the proces will start with open the selected file. Something like:
proc.StartInfo.FileName = Me.SelectedCell.FileName
instead of proc.StartInfo.FileName = Me.OpenFileDialog1.FileName
PS) May be i can preduce the Filename using the OpenFileDialog method on the background.
Private Sub ListView1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
If Me.OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
[Code]....
how do you transform an address like "file:///d:filename.ext" in "d:filename.ext"
without dirty string manipulation??
I need to create a a palindrome checker program. Now I know how to check a simple palindrome by using the reverse method however I am unsure if the palindrome had special characters or spaces. My question is what is the code for removing spaces and special characters from a string using loops and if statements. Also we cannot use arrays.
View 9 RepliesI am working on a project for the next week of my course and have the code built already and running but there was one section of it that looking at it I just dont understand why it works correctly.[code].....So i get that the second if statement here says that is palcheck1 = palcheck2 then its not the same telling the program its not a palindrome. But in the first part of it if palcheck1 is greater than palcheck 2 then it is a palindrome.
View 6 RepliesI need to create a code using String Compare() and Cases to figure out if a word, phrase, or what is typed in a textbox is a palindrome. If it is, a message will appear in a label under the textbox that reads, "What you typed is a palindrome." Or, "What you typed is not a palindrome." , if it is not.
View 16 RepliesI am having problems getting this program to run. It is a palindrome checker, you are suposed to enter a word or a phrase and determine weather it is a palindrome. The code is suposed to contain a Boolean valued function, and should display true or false if word(s) are palindrome.
Here is my code
Private Sub btnAnswer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnevaluate.Click
Dim Input As String
If IsPalindrome(Input) Then
txtAnswer.Text = "True"
[code]....
I'm working on a problem where i have to allow a user to input a word or phrase and then determine if it is a palindrome (a words that reads the same forwards and backwards) . It also says that the program should use a Boolean-valued function procedure named IsPalindrome that returns the value True when the word or phrase is a palindrome and the value False otherwise.
View 3 Repliesi want to set a link in VB.net dynamically to a file. My url looks like that:
[Code]...
i use this:
Try
' Create an instance of StreamReader to read from a file.
Using sr As StreamReader = New StreamReader("musik.txt")
Dim line As String
[code]....
In the line line = sr.ReadLine I dont want the full path Maybe i have c:lalalalamin.mp3 And i just want to show min.mp3?
I'm trying to figure out how to get the file name of the application at run time, in case it gets renamed.Also, as a easter-egg. First post, I don't know what code to put but this is how I am so far, the {FN} is where I need the file name.
If({FN} = "easter.exe") Then
msgbox("You found a easteregg! :O")
end
I often use things like the crosshatch in filenames to group them together. Until recently this has not been a problem.
I am working modifing a WPF app which uses a Listbox to store images. I need the full path of the image to feed to a class to retrieve metadata.
The test image is named "# Canon-ixus.jpg".
Using Listbox.SelectedValue to return the filename I get "%23 Canon-ixus.jpg". There are not a whole lot of options to returning the name of the selected item from the Listbox.
Is there any simple way to get the name back to its original form?
In VB.NET there is the WITH command that lets you omit an object name and only access the methods and properties needed. For example:
With foo
.bar()
.reset(true)
myVar = .getName()
End With
Is there any such syntax within Java?
existing tool which converts VB.NET Code to Java.
View 1 RepliesPossible Duplicate: WITH statement in Java? does anyone know if there is the With Keyword in Java?
View 4 RepliesI need to reference a C++ dll from my Java project. The method that I need to expose is actually written in Visual Basic. Is there any way to access the Visual Basic code in C++, so that it can eventually be accessed in the Java project?
View 6 RepliesI want to convert java file into vb.net files
View 2 Replies`I want to encode my string using .net and pass it to a java program. I am using the same program for encryption and decryption on both the sides. But the java program and .net programs are returning different MD5 hash codes.Here are the codes for both my programs :
VB.net
md5Provider = New MD5CryptoServiceProvider()
input = UTF8Encoding.UTF8.GetBytes(sSecurityKey)
oHash = oMd5CryptoServiceProvider.ComputeHash(input)[code]....
The problem is that m.digest() from java and oHash from vb.net are different. So i cant go further with DES encryption.
Is there any code in vb.net or java to get ID of computer >>?? I want to write a program which could get id of computer in order to make a license of software like microsoft did ?
View 2 RepliesMy problem is actually a bit more complicated than just how to use AES in VB.NET, since what I'm really trying to do is use AES in VB.NET from within a Java application across JACOB. But for now, what I need to focus on is the AES implementation itself.
[Code]...
I'm trying to compile java files in a folder that contains a batch compiler. The application starts the compiler and redirects the output to a textbox in the form.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim mypro As New Process()
Dim myproinfo As New ProcessStartInfo(FolderBrowserDialog1.SelectedPath + "/compiler.bat")
myproinfo.UseShellExecute = False
[code].....
My compiler is like this.
@echo off
Title Compiler
"C:\Program Files\Java\jdk1.6.0_01\bin\javac.exe" *.java
pause
I have a 32-bit java dll which i need to call from a asp.net application on a 64-bit machine.
View 1 RepliesI have a bit of an issue.I have a ton of functionality written in java and have been asked to investigate how to consume it from a .net application.Can anyone point me in the right direction as I havent a clue.For some reason wcf came to mind but I am pretty certain that wont fit. AAAArrrrgggghhhhh
View 2 RepliesPossible Duplicate: Way to get unique filename if specified filename already exists (.NET)Have a look at the following code:
Dim counter As Integer = 0
While System.IO.File.Exists("C:DesktopSample.xls")
counter = counter + 1
[code].....
I have a filename SBSA_UPLD_20101208 and I am interested in reading the Last date part which is 20101208. How can I do it?
View 1 RepliesI am having trouble getting a filename out of my SaveFileDialog. I am using Framework 4.0, it works fine in 3.5.
Private Sub cmdExportToPDF_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdExportToPDF.Click
Dim SaveFileDialog1 As New SaveFileDialog()
[Code].....