vb.Net - Regular Expression Tester Every now and then I find another use for a regular expression. For those not familiar with regular expressions, they can be as cryptic to read as strings of Greek letters. Simply put, regular expressions are just patterns. If you've ever used the DOS command shell `dir` command then you have likely used patterns, albeit simple ones. For example: dir d:\temp\pic*.jpg lists all files in the given folder that start with the letters `pic` and end with a `.jpg` extension. While the `dir` command allows only `?` and `*` wildcards, regular expressions allow you to …

Member Avatar
Member Avatar
+1 forum 3

Cell C4 has the expression =565+660+709+1093 Is there a function/nest of functions that can output the number of values being added? BIG NOTE: I AM NOT ASKING FOR THE SUM OF THE EXPRESSION!

Member Avatar
Member Avatar
+0 forum 1

Im working on a code that loops through a folder break up the file names in it into specific parts and then reads off sertain parts of the broken name and writes it to a csv sile. The files ser formated as follows test_PAQT_B2H.csv, test_PAQT_B4.csv, and test_PINI_B1H.csv. when it jsut has one file type like just AQT files it works fine but when there is INI files in it when it writes to the csv file for results it writes the ini file multiple times messing up the readability of the data. I jsut want to know how to get …

Member Avatar
Member Avatar
+0 forum 5

a method on how to return a boolean using lambda and its conditioned by two parameters

Member Avatar
Member Avatar
+0 forum 1

I am preparing for my exams and i just found this question from previous question papers: Give the C Expression for the following algebric expression : 1. ab^4c^2-d/m-n 2. ab-[{(e+f)^9}/c}] Please help me as i am preparing for my exams and haven't read this topic yet. help plz

Member Avatar
Member Avatar
+0 forum 7

Hi, i recently begun learning java and encryption. I found some code from a website that is supposed to decrypt lastlogin files found in minecraft. When i try to compile it gives me these errors: C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:54: error: invalid method declaration; return type required public MineCraftLoginReader() { C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: illegal start of type return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: ';' expected return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: illegal start of type return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: ';' expected return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); C:\Users\CROCCY\Documents\NetBeansProjects\Lastlogin decryptor\src\lastlogin\decryptor\LastloginDecryptor.java:87: error: invalid method declaration; return type required return "name: "+dis.readUTF()+NEWLINE+"password: "+dis.readUTF(); …

Member Avatar
Member Avatar
+0 forum 1

Aoa... i m new to java.. please help me to correct this program given blew. it shows error of illegal start of esxpression.. how could b it seems as correct program please help me.. thanks alot **error: illegal start of expression JOptionPane.showMeassageDialog(null, "ID: " + ID + "name: " + name + "category: " + category + "price: " + price + "quantity: " + quantity + "description: " + d escription+); ** import javax.swing.*; class product { string ID; string name; srting category; string price; string quantity; string description; // Perameterized constructor public product(string I, string n, string c, …

Member Avatar
Member Avatar
+0 forum 5

I have a query that starts like this... SELECT COUNT(A.FISH), COUNT(B.MEAT), COUNT(C.FRUIT).... now my problem is this, how could I count when I need to consider an expiration date for each column,...and the expiration dates varies for each column... Can I do this in one query? Or is there any other way I can do to consider the dates for each column?????..... Need clarification here... Thank you in advance....

Member Avatar
Member Avatar
+0 forum 2

Hi Every body Is my answer correct for this question - Obtain the minimal form for the following Boolean expression using Karnaugh map. F(U, V, W, Z) = ∑(0, 1, 2, 3, 6, 7, 8, 9, 10, 13, 15) My answer - ![a48a42f649b78dce10e6abdea215d087](/attachments/small/2/a48a42f649b78dce10e6abdea215d087.jpg "align-left") There are four pairs and one quad that reduce as given below: Pair-1(m7 + m6) reduces to U’VW Pair-2(m8 + m9) reduces to UV’W’ Pair-3(m13 + m15) reduces to UVZ Pair-4(m8 + m10) reduces to UV’Z’ Quad (m0 + m1 + m2 + m3) reduces to U’V’ Simplified Boolean expression for given K-map is F(U,V,W,Z) = …

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm doing an input validation of a String. The number should have a decimal pt, a whole number and a fraction part. It can have a negative sign (-) but not positive sign(+). This is what I've done but when I write --43.05, it prints false. String n = args[0]; if(n.matches("[-]*([0-9])+[.]([0-9])+")) System.out.println("true"); else System.out.println("false");

Member Avatar
Member Avatar
+0 forum 1

[CODE]//To convert postfix expression into an expression tree #include"stdio.h" #include"conio.h" #include"process.h" #include"string.h" #include"stdlib.h" struct node{ char item; struct node *lnode; struct node *rnode; }*stc[30],*temp,*root; typedef struct node *NODEPTR; char expression[50]; char c; int top=0; NODEPTR pop(); void push(NODEPTR); void getinput(); void inorder(NODEPTR p); int main (){ getinput(); int i,j; for(i=0;i<strlen(expression);i++) { printf("\nstrlength=%d--------for i=%d\n",strlen(expression),i); c=expression[i]; switch(c) { case '+': case '-': case '*': case '/': case '^': { temp=(NODEPTR)malloc(sizeof(struct node)); temp->item=c; temp->rnode=pop(); temp->lnode=pop(); push(root); } default : { temp=(NODEPTR)malloc(sizeof(struct node)); temp->item=c; temp->lnode=NULL; temp->rnode=NULL; push(temp); } void free(void *ptr); break; } } root=pop(); inorder(root); getch(); } NODEPTR pop(NODEPTR p) { if(top==0) printf("Underflow …

Member Avatar
Member Avatar
+0 forum 5

Guys i need help it says there is a data mismatch in criteria expression need help fast!! Dim statement2 As New OleDbCommand("select * from Student_registration where Student_code = '" & studentnotextbox.Text & "'", conn) Dim statement2 As New OleDbCommand("select * from Student_registration where Student_code = '" & studentnotextbox.Text & "'", conn) statement2.CommandType = CommandType.Text Dim adapt4 As New OleDbDataAdapter adapt4.SelectCommand = statement2 adapt4.SelectCommand.ExecuteNonQuery() Dim dset As New DataSet adapt4.Fill(dset, "Student_registration") fnametextbox.Text = dset.Tables("Student_registration").Rows(0).Item("first_name") mnametextbox.Text = dset.Tables("Student_registration").Rows(0).Item("middle_name") lnametextbox.Text = dset.Tables("Student_registration").Rows(0).Item("last_name") addresstextbox.Text = dset.Tables("Student_registration").Rows(0).Item("address") statustextbox.Text = dset.Tables("Student_registration").Rows(0).Item("status") gendertextbox.Text = dset.Tables("Student_registration").Rows(0).Item("gender") contactnotextbox = dset.Tables("Student_registration").Rows(0).Item("contact") religiontextbox.Text = dset.Tables("Student_registration").Rows(0).Item("religion") monthtextbox.Text = dset.Tables("Student_registration").Rows(0).Item("birthday_month") datetextbox.Text = dset.Tables("Student_registration").Rows(0).Item("birthday_day") …

Member Avatar
+0 forum 0

Hi I have problem in Report viewer. I am using the expression to filter the value. I explain my scenario. I want sum the amount for particular category. I have student database. I need the sum the paid amount for exam fee only. =SUM(Fields!Amount.Value, "DataSet1") . It sums all amount. But I need to sum EXAM FEE only. Please help me how to do this Thank you Maideen

Member Avatar
Member Avatar
-1 forum 3

For the below program: import java.util.*; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String leftOrRight; char hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); kbd.nextLine(); System.out.println("What side do you want the hypoteneuse on? Left or Right:"); leftOrRight = kbd.nextLine().toLowerCase(); if ((leftOrRight.compareTo("left")) || (leftOrRight.compareTo("right"))) { System.out.println("Only enter Left or Right!"); leftOrRight = kbd.nextLine().toLowerCase(); } hyp = leftOrRight.charAt(0); }} I want leftOrRight to be only "left" or "right" if its not i want the user to have to keep entering strings until it meets …

Member Avatar
Member Avatar
+0 forum 2

I can't figure out why I'm getting this error, i've checked all the posts I can find here and they are all a method inside another method, which i'm pretty sure I don't have. This is the error message it gave me: Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - illegal start of expression at rps.Rps.compChoice(Rps.java:63) at rps.Rps.main(Rps.java:20) This is my code: [CODE]package rps; import java.util.Random; import java.util.Scanner; public class Rps { Scanner keyboard =new Scanner(System.in); Random rand = new Random(); public static void main(String[] args) { String compType = ""; String playerType =""; int comp = compChoice (); …

Member Avatar
Member Avatar
+0 forum 6

public class review{ //method code public void start() { int a, b; a = 5; b = methodA(a); System.out.println(a + " " + b); } private int methodA(int a) { int b = 10; a = a + 5; return a + b; } //method end } ------------------------------------------------ i compile and run this code in dr.java compiler jdk 6.0_41 it can compile, but when i run it will display like thi *"Static Error: This class does not have a static void main method accepting String[]"* when i try to add public static void main (String[]args){ //method code } when i …

Member Avatar
Member Avatar
+0 forum 4

Hi Everyone, I am trying to get the program below to work correctly. The line below is where I'm having trouble. (line 33 in PrefixCalc.java) calc = new ExpressionTree(new Scanner(console.nextLine())); When I run the program and enter "4 + 8", the scanner only picks up "4". Apparently this program was developed using the Scanner from Java 5. How do I get the entire line into a Scanner object? *** I found this program online at http://penguin.ewu.edu/cscd300/Topic/ExpressionTree/ExpressionTree.pdf. This is not my program. I am just learning from it. *** /** * Prefix calculator: generate the expression tree, then display it * …

Member Avatar
Member Avatar
+0 forum 4

Hey guys working on a Webpage for class and I wanted to add a companies facebook feed to the site. I generate the code under the devolpers site and insert the Iframe code into my website. When I open the Webpage, and with in the Likebox the webpage that tells you that "you have no internet connection shows up" is this just a bug because its not a live website at the moment or what im not sure. any help or ideas why would appriciated. Thermalnuke

Member Avatar
Member Avatar
+0 forum 2

I have a warning that I can;t get rid of: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. I am pretty sure it is becasue I have not dimentioned the variable but how do you dimention an IO.memorystream. Here is the code: Photograph1.Image = Photograph1.Image.FromStream(New IO.MemoryStream(arr)) Any help would be greatfull. The programms runs and works, its just got those annoying warnings.

Member Avatar
Member Avatar
+0 forum 5

The above code computes the value of a mathematical expression supplied at command line by using the concept of converting infix to postfix,then evaluating the postfix expression. Any comments are appreciated.

Member Avatar
Member Avatar
+0 forum 3

So I have been working on this project for quite some time and I can't figure out why I keep getting an "Illegal Start of Expression" error. I tried moving the variables above the main method and that only returned the same error but instead of the error occuring at line 14, it occurs at the start of the next method(applet). Any help would be greatly appreciated! I'm sure it's just some stupid formatting error... package superhangman; import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.util.Random; public abstract class SuperHangman extends Applet implements ActionListener { public static void main(String[] args){ static …

Member Avatar
Member Avatar
+0 forum 2

String usn = jTextField1.getText(); String pwd = new String (jPasswordField1.getPassword()); if (usn.equals("hayley") && pwd.equals("hello")) {new Home().setVisible(true);} else {alert("Invalid Username / Password (LOGIN FAILED)");} Please see the following code above. I have been receiving problems such as "illegal start of expression" and ')' expected whenever I run my system, even though I have already double-checked them and seen no problems with it. BTW, this was declared in the "Set Action..." function of Netbeans IDE. Hoping for a positive response! :D

Member Avatar
Member Avatar
+0 forum 1

Hello Internet. So the task is to create our own parser for a expression calculator. For Example: Input: 3+2*1-6/3 Output: 3 Input: 3++2 Output: Invalid Expression Input: -5+2 Output: -3 Input: 5--2 Output: 7 The code [Here](http://www.technical-recipes.com/2011/a-mathematical-expression-parser-in-java/) solves a part of the problem except that it has a fixed input and negative values cannot be solved, And I'm not quite sure yet if it really does solve the expression with operator precedence. but I already modified it to get an input expression from the user. and I've been wondering for hours how to implement the solving for negative values. help …

Member Avatar
Member Avatar
+0 forum 1

Okay, so I'm working on a battleship game, and I added these two tables which are throwing all sorts of errors, like: * Illegal Start of Expression, * Not a Statement, * ';' expected, * ']' expected, * <identifier> expected. I have no idea why... Help, please? import java.awt.*; import java.awt.event.*; import javax.swing.*; class PlayerControl { private static int[] has; private static int[] placed; static ActionListener aListen = new ActionListener() { public void actionPerformed(ActionEvent e) { ... } }; private static void menuAction(JMenuItem menuItem) { ... } private static void buttonAction(JButton button) { ... } static void placeShips() { has[10] …

Member Avatar
Member Avatar
+0 forum 3

Hi guys! So I need help with a small problem. I'm using a char pointer array which contains a mathematical expression. For example: "sqrt 25" Now I want to use the inbuild c++ function `sqrt(int))`. I'm first searching in the array for the letters 'sqrt' so that my custom function knows what to math function to call. As the example is only a small part of a long math expression. Now I'm running through a while-loop intill it finds a whitespace. So that I know where the number stops. `while(Expression[i] != '')` Dont know should I read the number into …

Member Avatar
Member Avatar
+0 forum 6

i have some code i am working on andit keeps throwing an expression expected error. this code is designed to cheeck a RichTextBox form and highlight text, specified by a dictionary. Dim location As UInteger = 0 Dim dict As Dictionary(Of String, ULong) = getWords(rText1) Dim wcount As Integer = 0 For i As Long = 0 To dict.Count For j As Integer = 0 To args.Length If dict.ContainsKey(args(j)) Then For Each args(j) In dict.Keys Dim count As ULong = dict.Values.ElementAt(wcount) Dim colorSpace = count - args(j).Length rText1.Select(colorSpace, count) rText1.SelectionColor = Color.DarkBlue Next() 'error here End If Next For j …

Member Avatar
Member Avatar
+0 forum 2

hey there, Here's my complete code for a delete button that deletes a record in a Heirachical Flex Grid. Dim rsTour As New ADODB.Recordset Dim cn As New ADODB.Connection Dim strSQL As String cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & App.Path & "\Luckshan Tours & Travels.mdb;" & _ "Persist Security Info:False" cn.Open msg = MsgBox("Delete Record?", vbYesNo) If msg = vbYes Then strSQL = "Delete From Tour Where [Tour ID] = '" & fgdTour.TextMatrix(fgdTour.Row, 1) & "'" cn.Execute strSQL strSQL = "Select * From Tour" rsTour.Open strSQL, cn, adOpenStatic, adLockPessimistic Set fgdTour.DataSource = rsTour End If Set fgdTour.DataSource = …

Member Avatar
Member Avatar
+0 forum 4

So the program makes an inventory from a cvs file. The cvs file consists of dvds and books. here is the code: #include "StdAfx.h" #define _CRTDBG_MAP_ALLOC //for memory checking #include <iostream> #include <stdlib.h> #include <crtdbg.h> #include <iomanip> #include <fstream> #include <string.h> #pragma warning(disable: 4996 4018) using namespace std; #define COPYSTR(TARGET, SOURCE) \ TARGET = new char [strlen(SOURCE)+1]; \ strcpy(TARGET, SOURCE) ////////////////////////////////////////////////////////////////////-->ERROR class error { fstream error_file; void open_file(); void close_file(); public: error() {open_file();} ~error() {close_file();} void print_file(); void clear_file(); void add_file(int, const char*); }; void error::open_file() { error_file.open("error_file.txt", ios::in | ios::out | ios::app); } void error::print_file() { cout << "\nERRORS:\n"; …

Member Avatar
Member Avatar
+0 forum 8

[code]main() { int a=5; a=++a + ++a; printf("%d",a); }[/code] the output is 14..how come?

Member Avatar
Member Avatar
+0 forum 8

Is there any framework or sample java code to evaluate an arithmatic / logical / bitwise expression , which will provide the value for input parameters , to make the condition pass. For example , In the below sample arithmatic condition , if the values a=7 and b=6 are passed , the condition will get passed and we'll get "Condition is passed!!!" printed in console. [ICODE]if( (a>b) && (a<10) && (b>5)) { System.out.println("Condition is passed!!!"); }[/ICODE] Is there any framework which will give me the value of a and b , taking the expression as input.

Member Avatar
Member Avatar
+0 forum 2

The End.