|
Hi, first time posting so hopefully doing it correctly. I have used a form builder to build my forms but have run into a couple of issues with functionality. In the code/calculation below I need to be able to return the answer 0 if the answer is less than 0. I've searched loads to no avail so any help would be much appreciated. T.I.A.
$('form#Commission #Commission_On').formCalc(" Nett_Earnings -Actual_Takings >0==0",{ currency_format:true, mirror:'sfm_Commission_On_parsed'});
modified 17-May-20 10:15am.
|
|
|
|
|
What language is that, it does not look much like Java? However assuming it is supposed to convert that string into an actual sum it does not look valid. In the expression Nett_Earnings -Actual_Takings >0==0 , what is >0==0 supposed to mean?
|
|
|
|
|
Thanks for answering, I just assumed it was Java as all the scripts are. >0==0 is just one of the ways I was trying to make it work from their info before they told me the form couldn't do the calculation.
|
|
|
|
|
What is this code and where did you get it from? As I said it does not look anything like Java.
|
|
|
|
|
Thanks for answering. The programme is called simfatic form maker.
This was their reply to my query
"Simfatic Forms calculation field can't handle multiple levels of variables. In this case, the user enters a variable that intern is a variable in the next step.
This form has to be hand coded with the help of a developer"
Here is the actual form I am trying to make work https://www.salonlogic.co.uk/forms/Commission/Commission.php[^]
|
|
|
|
|
Sorry, but this has nothing to do with Java programming. You need to talk to the people who created this package for information.
|
|
|
|
|
I have also tried it this way
$('form#Commission #Commission_On').formCalc(" Nett_Earnings -Actual_Takings >0?0",{ currency_format:true, mirror:'sfm_Commission_On_parsed'}); however that then means no output to the box at all.
|
|
|
|
|
That is not Java; that is JavaScript.
Despite the similar names, they are two completely different languages.
There is a specific forum for JavaScript questions:
JavaScript Discussion Boards[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for replying, I will ask in the correct place. 
|
|
|
|
|
hi guys, I was wondering if someone could help me write a search function that looks for a string in a hashtable. iv been struggling with this part of my assignment. iv done all the inserts parts and hash function itself.
|
|
|
|
|
You need to explain the problem in more detail. What is wrong with a simple loop that compares the search string with each item in a list?
|
|
|
|
|
hi Richard,
thank you for replying. So the hash table implementation stores simple String data items, so we can only track if an item is in the data structure or not. The find function, determines if the string is in the data the hash table or not. The program loads the test dataset into the data structure, then performs find operations on all the test data items, followed by find operations on a disjoint set of unseen data items.
Iv been able to code the hash component, its just the search part that I'm not too sure of.
this is my hash function
public int hash ( String s )
{
int sum = 0;
for(int=0, i<s.length(); i++)
{sum +=((int)string.charAt(i))%size;}
return sum %size;
}
my find function would resembles something along these lines.
boolean find ( String s )
{
boolean found = false;
int value = hashFunction(s, size);
return found;
}
modified 17-May-20 5:15am.
|
|
|
|
|
As I suggested before, you just need a loop to compare your search value with all the ones already stored. If they are in an array or list then it is just a simple compare of each value. If they are in a database then it is a SQL SELECT statement.
|
|
|
|
|
Thank you Richard, ill try that and see. since the size of the list is already known, im thinking of using a for loop. ill let you know how it goes.
|
|
|
|
|
That is the simple way and should work well for small lists. But there are plenty of Java classes that can manage lists and provide most of the functions that you would need. Check the documentation for things like List, Arrays etc.
|
|
|
|
|
Hi, I'm creating a custom IDE vased on the Netbeans platform. When I build my project, two launchers are created in the build\launcher\bin folder for Windows. I've to apply branding on them. Not on the custom IDE window, but on these two <application name>.exe and <application name>64.exe files. At least file properties like product version, file version, product name. I try to play with the branding\core\core.jar\org\netbeans\core\startup\Bundle.properties, but it affects only on the IDE window.
Is the a way to define these file properties?
|
|
|
|
|
Answer: there is no way to do it with Netbeans. 3-rd party SW can be used. https://netbeans.apache.org/wiki/DevFaqExecutableIcon.asciidoc
|
|
|
|
|
كود جافا جاهز لاشارة المرور على اربع تقطعات
|
|
|
|
|
Translated:
"Java code is ready for the traffic signal on four blocks."
That makes no sense and is not a question.
|
|
|
|
|
Something about traffic lights. Still a no, even if it was in English.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I don't know what this is, except maybe a request for someone to write his/her code for them.
|
|
|
|
|
No.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Please help me on this VB.NET
assuming i have n=0(using a label to show how n is increasing) and i want my n to be increasing when a button is pressed till my n=100. E.g when button5 is pressed it should be n=n+5(initial n+5) or when button4 is pressed it should be n=n+4(initial n+4)
|
|
|
|
|
|
In addition to Peter's suggestion, we have already explained that if you want help then you need to show some effort on your part. You would also do well to make up your mind which language you want to work in. Switching between VB.NET and Java every few days is just a waste of your time, as you will be unlikely to get anywhere. Focus on one and go and study the language carefully. I have already given you the link (below) for the Java Tutorials, and you can find plenty of resources for VB.NET here on CodeProject and on MSDN.
|
|
|
|