Hi,
We use the Jeks parser at present to evaluate expressions. I cannot see a way to evaluate string expressions with it - for example:
IF( "Test 1" = "Test 2")
Is there anything out there that can evaluate string and mathematical expressions in Java? Preferably free or open source.
Thanks for any help,
Andez
...
So, I have a list of nodes in a dynamic XML that is cached on a server. Using Ajax, I loop through the particular nodes to return a string each time:
XML:
<?xml version="1.0"?>
<Products>
<Product>
<ItemName>String</ItemName>
</Product>
<Product>
<ItemName>String</ItemName>
</Product>
<Product>
...
Please, look at the following code that just convert an unsigned int to a string (there may be some unhandled cases but it's not my question), allocating a char array in the heap and returning it, leaving the user the responsibility to free it after the use. Can you explain me why such function (and others similar) do not exist in C sta...
Can someone explain, what is this doing?? I am new and learning
txtCardNo.Text.Trim().Substring((txtCardNo.Text.Trim().Length - 4), 4)
Thank you!!!
...
This is something I could hack together, but I wondered if anybody had a clean solution to my problem. Something that I throw together wont necessarily be very concise or speedy!
I have a string like this ///hello/world///. I need to strip only the first and last slash, none of the others, so that I get a string like this //hello/world/...
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<string>
using namespace std;
**int main()
{
double write();
double read();
string choice;
while(1)
{
cout<<"Enter read to read a file and write to write a file.\n";
cin>>choice;
if (choice == "read")
cout<< read();
if (c...
I have code as follows :
String s = "";
for (My my : myList) {
s += my.getX();
}
Findbugs always reports error when I do this.
...
I have an excel file with numerous non-ascii characters which i would like to replace with the space character.
This text is to be entered into a MySQL database, and it will not import with these characters in the strings. I get a "HY000 Incorrect string value" when trying to post the row.
...
Hi all, i have a problem so hope you guys can help!
I have a string in code behind like this
string html = "<asp:CheckBox ID=\"CheckBox1\" runat=\"server\" />";
So how to insert it into aspx page and when the page is rendering, it convert my string as i write it own in the webpage
Hope you guys can help
Thanks in advance!
Let me sa...
I have a table A with this column:
IDS(VARCHAR)
1|56|23
I need to run this query:
select TEST from TEXTS where ID in ( select IDS from A where A.ID = xxx )
TEXTS.ID is an INTEGER. How can I split the string A.IDS into several ints for the join?
Must work on MySQL and Oracle. SQL99 preferred.
...
I'm working on a string-to-bool parsing function for HaXe (somehow the devs got by until now without one >.<) and i figured the best way to check the string would be ignoring case. I'm not sure how to do that though, can someone help me?
...
I don't understand
in 2.X it worked :
import zlib
zlib.compress('Hello, world')
now i have a :
zlib.compress("Hello world!")
TypeError: must be bytes or buffer, not str
How can i compress my string ?
Regards
Bussiere
...
As the question says am trying to parse one of the elements of an string array into a int variable. although the code is right in terms of syntax, when I try to run it, I get the following error message.
Error 1 Building content threw FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(St...
Im trying to find a solution for this problem. This is my example code:
class Program
{
private string Command;
private static string[] Commands = { "ComandOne", "CommandTwo", "CommandThree", "CommandFour" };
static void Main(string[] args)
{
Command = args[0];
switch(Command)
{
case Commands[0]: //do someth...
I am curious why this pattern doesn't work.
String same = "==== Instructions ====";
Pattern title4 = Pattern.compile(same);
Scanner scan = new Scanner(same);
System.out.println(scan.hasNext(same));
returns:
false
...
I have a question about global variable in Python.
The code is following. If I do not use global M in function test,
It would issue error.
But Why it does not show error for string s. I do not declare it as global.
global M
M = []
s = "abc"
def test():
### global M
print M
M.append(s)
print M
UnboundLocalError: local v...
I just joined StackOverflow after having found many great answers here in the past. Here's my first question:
EDIT: I feel bad... my first question to StackOverflow turned out to be a "wild goose chase". The problem is in the data, not the code reading the data. I was looking for a solution in the wrong place! I will explain in a commen...
Hi
whole of our project development is in C. However there are alot of string operations here and there and how much care we make .. we endup having coding errors in string operations and this results most of the time in for buffer overflows ..stack corruptions etc. due to programmers fault.
How nice is this idea to just use C++ strin...
I'm working on a program that takes in book records in the form
<book #>,<name>,<publisher>
for example
123,Example Book,Publisher
After which, the user is returned to a menu, using numbers to select what option they would like.
i get an java.util.InputMismatchException on this menu, whenever the string is taken in with a space. s...
I'm having a strange problem comparing strings. I send a string to my server (as bytes using getBytes()) from the client. I've ensured that encoding is the same on the client and server by starting both of them with -Dfile.encoding=UTF-8.
I noticed the problem when I was trying to perform a valueOf on the string I receive from the clien...