About find param's value order
file "doc/readme.html"
at "Parameter Resolution" said:
"the XSQL Page Processor determines the value of the parameter by using the following logic.
If the request is being processed by the XSQL Servlet, then check in the following order if myParam is the name of...
An XSQL local page parameter
An HTTP Cookie
An HTTP Session Variable
An HTTP Request Parameter
but at "Producing Dynamic XML Documents from SQL Queries" (about page 40) said:"The XSQL Page Processor will first consult the HTTP request parameters (or command-line parameters) for a matching parameter named paramname and if found, it will use that value. If not found among the HTTP request parameters, it will search for XML attributes on the current <xsql:query> element, and its ancestor elements until reaching the document root. "
there is a different,why?
There is no conflict here.
The parameter value resolution order is as stated:
[list=1]
[*]Local page parameter (not the same as an XML attribute)
[*]HTTP Cookie
[*]HTTP Session Variable
[*]HTTP Request Param
[list]
and then, if none of these matches, it uses an attribute of the same name as the parameter as a "fallback" or "default" value if it can find one on the current action element or one of its ancestors.
null
Similar Messages
-
Finding the same value in different columns
Hello,
I am trying to figure out how I would go about finding the same value in the same row but in different columns. For example, in the table sometimes the report name is the same as the description. I would like to find all of the rows where this is the case.
Thanks
Report name
Description
Date
Time
Report 1
Report 1
dddd
tttt
Report 2
Billing Report
dddd
tttt
Report 3
Report 3
dddd
ttttHi,
Is this what you want?
SELECT * -- or whatever columns you want
FROM table_x
WHERE report_name = description
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Finding the min value in a hashtable
Hi,
I'm trying to work out the lowest value contained in a hashTable. So far I've got.
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
public class StoreValuesDouble extends Statistic {
* Each object of the class (StoreValuesDouble) will have these attributes.
* When you call the StoreValuesDouble class you can use
* myDoubleValues (a Vector holding Double types),
* Hashtable (a Hashtable using Double types as values and keys) and
* nullValues (an Double currently set to 0.0).
Vector<Double> myDoubleValues; //declare a variable myDoubleValues that is of data type Vector
Hashtable<Double, Double> myValues; //declare a variable myvalues that is a data type Hashtable
Double nullValues = 0.0; //Double attribute to count the number of null values contained in the vector
* pass myDoubleValues to inValues
* @param Vector /<Double/> a vector holding Double values
* @param inValues the values in the vector
* @return
public void DoubleStat(Vector<Double> inValues) {
myDoubleValues = inValues;
* calculate the mean of myDoubleValues
* @return mean of myDoubleValues as a double
public double meanDouble() {
double mean = 0;
Double currentDouble;
double nonNull = 0;
for (double j = 0; j < myDoubleValues.size(); j++)
currentDouble = myDoubleValues.elementAt((int) j);
if (currentDouble != null) {
mean += currentDouble.doubleValue();
nonNull++;
return mean / nonNull;
* calculate the standard devitation of myDoubleValues
* @return standard devitation of myDoubleValues as a double
public double standardDeviationDouble() {
double m = meanDouble();
double t = 0.0;
Double currentDouble;
double n = 0;
for (double j = 0; j < getDoubleValues(); j++) {
currentDouble = myDoubleValues.elementAt((int)j);
if (currentDouble != null) {
n = currentDouble.doubleValue();
t += (n - m) * (n - m);
return Math.sqrt(t / (myDoubleValues.size() - 1.0));// n - 1 as sample varience
* return the number of values of myDoubleValues to help calculate the mean & standard deviation
* @return the size of myDoubleValues as a Double
public double getDoubleValues() {
return myDoubleValues.size();
* compute the number of null values
* @return a double value representing the number of null values
public Double getDoubleNull() {
Double nbNull = 0.0;
// test if myIntValues is null
if (myDoubleValues == null) {
System.out.println("Please enter values that are not null!");
return 0.0;
// if not null, parse all values
// for each value, test if it is null or not
Double currentDouble;
for (double i = 0; i < myDoubleValues.size(); i++) {
currentDouble = myDoubleValues.elementAt((int)i);
if (currentDouble != null) {
/// nothing to do
else {
nbNull++;
return nbNull;
//find the MIN values in the Hashtable to give us the range (with the MAX value)
public Double MinDouble()
Double MinDouble = null;
Double currentValue;
for (double j = 0; j < myDoubleValues.size(); j++)
currentValue = myDoubleValues.elementAt((int) j);
if (currentValue != null){
if (currentValue <= MinDouble) {
MinDouble = currentValue;
return MinDouble;
/*find the MAX value in the Hashtable to give us the range (with the MIN value)
public double MAX()
* Create an instance of StoreValuesDouble to hold vector values and number of times the values
* appear. StoreValuesDouble automatically contains the variables defined above
* (myDoubleValues, myValues and nullValues) we have to initialise myDoubleValues and myValues
* as they have been defined but not initialised. nullValues has been defined (int) and initialised (0).
* @param Vector /<Double/> a vector holding Double values
* @param inValues the values in the vector
* @return
public StoreValuesDouble(Vector<Double> inValues) {
myDoubleValues = inValues; //the attribute myDoubleValues defined in the StoreValuesDouble class
//is the inValues parameter, this allows us to store the Vector in inValues
myValues = new Hashtable<Double, Double>(); // create an instance of/initialise Hashtable
* Now define the methods to make the instance StoreValuesDouble do what we want it to do
* (ie parse all the double values of the myDoubleValues Vector attribute.
public void computeDoubleValues() {
Double currentDouble;//local variable to store the current read Double object
* Use a for loop to read through all the values contained in the vector
for (double i = 0; i < myDoubleValues.size(); i++) {
currentDouble = myDoubleValues.elementAt((int)i);
//currentDouble is now the Double object stored at i
//to check that i is not null we use the if statment
if (currentDouble != null) {
//i is not null so we want to add it to the hashtable. Rather than writing a lot of code
//here to do checking and adding we just call a method that can be written seperately
updateDoubleTable(currentDouble);
else {
//i is null so we just count it by adding it to our nullValues attribute
nullValues++;
* Update the current distribution of Doubles
* @param Double for the value of the key
* @param inDouble for the value entered into the Hashtable (the object)
public void updateDoubleTable(Double inDouble) {
//First test that variable inDouble is not null
if (inDouble != null) {
//update the table myValues this involves two tasks
//1)see if the double object has already been seen
//so we create a local variable to test the Hashtable
boolean alreadyPresent;
alreadyPresent = myValues.containsKey(inDouble);
//here we check whether inDouble is already in myValues
if (alreadyPresent) {
//if it is present we need to increase the counter
Double counter = myValues.get(inDouble);
//local variable counter to get the value associated to the key inDouble
Double newCounter = new Double(counter.intValue() + 1.0);
//update counter values and then ...
myValues.put(inDouble, newCounter);
//put into myValues
//as Hashtable can store only Objects, we cannot use primitive types
// so we use Objects related to primitive types as Integer, Float, Double
// or Boolean (here, we use Double)
} else {
//store the double and set it's counter to 1
myValues.put(inDouble, new Double(1));
} else {
//do nothing
//now we want to display the values
public void displayDoubleTable() {
// to display the distribution, we need to parse all the keys of the
// hashtable and access to the value associated to each key
Enumeration<Double> keys = myValues.keys();
Double currentKey;
Double currentValue;
System.out.println("");
System.out.println("Hashtable Information:");
System.out.println("");
System.out.println(myDoubleValues.size() + " Double objects in initial vector");
System.out.println("");
while (keys.hasMoreElements()) {
currentKey = keys.nextElement();
currentValue = myValues.get(currentKey);
System.out.println("The value " + currentKey.doubleValue()
+ " has been seen " + currentValue.doubleValue()
+ " time(s) in the initial Vector");
System.out.println("");
System.out.println("There were " + nullValues
+ " null Double object(s) in the inital Vector");
}As part of the StoreValuesDouble class. And to display it.
package statistics;
import java.util.Vector;
public class TestStatDouble {
static Vector<Double> doubleVector;
* Create and initialise a vector of values and compute the mean,
* standard deviation, distribution and MIN/MAX values.
public static void main(String[] args) {
// initialise the values in initValues
initValues();
// create an instance of StoreValuesDouble taking double as the parameter
StoreValuesDouble is = new StoreValuesDouble(doubleVector);
//Display the results
displayVectorContent(doubleVector);
System.out.println("");
System.out.println("Number of null values: " + is.getDoubleNull());
System.out.println("Number of non-null values is: " +(is.getDoubleValues() - is.getDoubleNull()));
System.out.println("Number of all values: " + is.getDoubleValues());
System.out.println("The mean is: " + is.meanDouble());
System.out.println("Standard deviation is: " + is.standardDeviationDouble());
System.out.println("The lowest value is " + is.MinDouble());
System.out.println("");
* now I want to display the results from the displayTable method in the StoreValuesDouble
* class so I create an instance of StoreValuesDouble and use the computeDoubleValues and
* displayDoubleTable methods.
StoreValuesDouble storeValues = new StoreValuesDouble(doubleVector);
storeValues.computeDoubleValues();
storeValues.displayDoubleTable();
* create the class method initValues() to add values to the Vector doubleVector
public static void initValues()
doubleVector = new Vector<Double>();
doubleVector.addElement(null);
doubleVector.addElement(new Double(10.9));
doubleVector.addElement(new Double(15.95));
doubleVector.addElement(new Double(17));
doubleVector.addElement(null);
doubleVector.addElement(new Double(1));
doubleVector.addElement(new Double(4));
doubleVector.addElement(new Double(10.499));
doubleVector.addElement(null);
doubleVector.addElement(new Double(10.4999));
doubleVector.addElement(new Double(17));
doubleVector.addElement(new Double(-15));
doubleVector.addElement(null);
doubleVector.addElement(new Double(14));
doubleVector.addElement(new Double(20));
doubleVector.addElement(new Double(-3));
doubleVector.addElement(null);
doubleVector.addElement(new Double(9));
doubleVector.addElement(new Double(1.5));
doubleVector.addElement(null);
doubleVector.addElement(new Double(10.22));
doubleVector.addElement(new Double(15.23));
doubleVector.addElement(new Double(17.91));
doubleVector.addElement(null);
* class method to print values contained in the vector doubleVector to the console.
* @param doubleVector the Vector to be displayed
public static void displayVectorContent(Vector doubleVector)
Double currentDouble;
System.out.println("Double values within the Vector:");
for (int i=0; i<doubleVector.size();i++)
try
currentDouble = (Double) doubleVector.elementAt(i);
if (currentDouble != null)
System.out.print(currentDouble.toString() + " ");
catch(ClassCastException cce)
System.out.print(cce.getMessage() + " ");
cce.printStackTrace();
System.out.println("");
It compiles fine but when I try and run it I get a
Exception in thread "main" java.lang.NullPointerException
at statistics.StoreValuesDouble.MinDouble(StoreValuesDouble.java:139)
at statistics.TestStatDouble.main(TestStatDouble.java:37)
TestStatDouble 37 is
System.out.println("The lowest value is " + is.MinDouble());139 is
if (currentValue <= MinDouble) {I guess the problem's in my if loop but I'm not sure why. Any help would be appreciated.
Message was edited by:
Ali_DCouple of points about your code:
1. Don't declare your instance variables as solid types, declare them using their interfaces (where applicable), so in your case don't specifiy that you are using Vector or Hashtable, use List and Map. This will allow you to easily change your code to use a different collection, if and when appropriate. Also the unnecessary overhead of Vectors synchronisation means that you should use ArrayList instead of vector (that means that you will have to use get(int) instead of elementAt() but that's a very small price to pay.
2. Declare local variables as close to their point of usage as possible. (Unless you need to do this for your course work, in which case you don't have a choice).
3. Use the appropriate data type. For your count of null values you should be using an int or a long (you can't have a fractional count value!) Also, this should have been obvious to you, when you had to cast the value to an int for use with your lists. (Using double as an index is a very bad idea... And before you go posting the question, do a search on why floating point precision may not give you the results you expect)
4. Code defencively... e.g. in your meanDouble() method, you set nonNull to 0, and then you do a division using that value. What do you think is going to happen if your loop doesn't execute once? Division by zero... You should handle these cases, rather than letting them fail ignominiously.
5. If you are doing code like this... if (currentDouble != null) {
// / nothing to do
} else {
nbNull++;
} Why have the empty block? You should just do the inverse.
if (currentDouble == null) {
nbNull++;
} Far simpler, and expresses exactly what you are trying to do, not what you are not trying to do.
6. Enumeration --- What version of java is that course being run in? I can see that you are using autoboxing, so it has to be 1.5 so, WHY is your lecturer encouraging the use of Vectors, Hashtables, and Enumerations!?!?!
Anyway, that should be enough to be going on with. -
A question about assigning a default value
Hi guys, I have a question about assigning a default value to a Numeric Decision CO. This Co needs 2 parameters to compare with each other. I wanna assign para1 during runtime and para2 during design time, but I have no idea how to assign a default value to para2 during design time. Can anyone help me solve this question? Thx a lot.
BTW I`m searching an article about Time-off example`s "details". I have read several articles about time-off example, but those are not detailed enough. I wanna know about all details of COs. Can anyone forward such article to me, plz. Thx again.^^Hi,
You can assign a default value to the parameter of a callable object.
First attach your CO to an Action.At the action level you can assign default values to the CO Parameters.
Select the action in the design time.
Select the parameters tab for that action.
Select the required paramter. At the top, you can find Default value tab, with that you can assign default value.
I think you can achieve your requirements with Business logic CO better.
[Business Logic CO|http://help.sap.com/saphelp_nwce10/helpdata/en/44/3d3936c5c14a8fe10000000a1553f6/content.htm]
Thanks -
Gross price of Service entry Sheet more than the value ordered in PO
Hi all!!
I have a PO that were created and changed by the following way:
The user created the PO of service with the quantity = 1 and the price = 50.000,00
Than he made the service entry sheet of this PO and MIRO normally.
As the fields on service tab wasn't blocked, the user changed the quantity to 105.000,00 and the price to 1.
After that, he made 3 services entry sheet to complete 105.000,00 quantities.
With this, the value delivered became bigger than the value ordered in the PO.
if I make a service entry sheet with a quantity of 200.000,00 for example, the message SE363 will be shown to me with a message that the "quantity entered exceeds quantity in purchase order".
I'd like to know if there's a way by customizing of control the price on Service entry sheet based on the value ordered in PO instead of quantity.
Can anybody help me?
Thanks in advance,
CrisHi Ajit and Rajesh
Thanks for the response.
The user made a PO with one line with quantity 1 and net price 50.000,00.
In the services tab, he put a sevice with quantitiy 1 and gross price 50.000,00, and than made the service sheet entry, and MIRO.
After this he changed in the services tab the quantity to 105.000,00 and the gross price to 1 (with the objective of making more than one service entry sheet by quantity).
With this, the system let the user make many entries of service allowing the user to make entries os sheet more than the net price that is in the line of PO.
I'd like to know if there's a way configure the system to make a compare between the gross price and the net price when i'm doing the service entry sheet, because now when I change a line of service tab, the system is not considering that other service entry sheet were made.
So that, i'm having the value of ordered bigger than the value delivered.
Nowadays, the block is made by quantity as I said, but i'd like to block by price too.
Sorry about the bad explanation before, I hope that now i explained better.
Thanks
Cris -
In which table we can find frieght, excise value, basic value, customer no
hi,
sap gurus,
good afternoon to all,
i came with a different query now.
in reports where in which table we can find
frieght,
excise value,
basic value,
customer no,
sales rate/value,
entry tax details,
octroi,
charity
CST
VAT
Bill value before rounding off
rounding off
final bill value.
these are the fields which has to capture in one report
what to do ?
on this.
plz let me know some thing on this.
regards,
balaji.t
09990019711Dear balaji
All condition values will be stored in KONV. So Go to SE16, input KONV and execute. You will get all condition types from this table. Here, you cannot correlate these condition types to your sale order.
So that you have to do is that there is a field "Doc.condition" in the above report under which, some numeric values will flow. Copy those values and now go to SE16, input table VBAK and execute. Here, the same field, viz.Doc.condition will be there. Paste those values which you copied from KONV and execute.
You will now get the desired result.
thanks
G. Lakshmipathi -
How to find the nearlest value in 1-D array ?
Hi.. everybody..
I need to seperate the raw data(1-D) into 2 group of array by the center value and then make the average value in each array. But I also still have the problem about if the center value is not the same of some value in the 1-D array. I cannot use the split function.
"How to find the nearlest value to the center point that I calculated, in the 1-D array ?"
Thanks a lot for anybody helpIn a general sense, since I'm not sure what your data values are or how far away your calculated center is from the true value, I would do it one of two ways:
1) Use a threshold value and scan the array until the threshold is reached (assumes constantly increasing values in the array).
2) Use either a) round to nearest integer b) round to + Infinity (round up) or c) round to - infinity (round down). If you don't have decimal values, you'll have to devide the values by a power of 10.
2006 Ultimate LabVIEW G-eek. -
Question about Finder-Load-Beans flag
Hi all,
I've read that the Finder-Load-Beans flag could yield some valuable gains in performance
but:
1) why is it suggested to do individual gets of methods within the same Transaction
? (tx-Required).
2) this strategy is useful only for small sets of data, isn't it? I imagine I
would choose Finder-Load-Beans to false (or JDBC) for larger sets of data.
3) A last question: its default value is true or false ?
Thanks
FrancescoBecause if there are different transactions where the get method is called
then the state/data of the bean would most be reloaded from the database. A
new transactions causes the ejbLoad method to be invoked in the beginning
and the ejbStore at the end. That is the usual case but there are other ways
to modify this behavior.
Thanks
Gaurav
"Francesco" <[email protected]> wrote in message
news:[email protected]...
>
Hi thorick,
I have found this in the newsgroup. It's from R.Woolen answering
a question about Finder-Load-Beans flag.
"Consider this case:
tx.begin();
Collection c = findAllEmployeesNamed("Rob");
Iterator it = c.iterator();
while (it.hasNext()) {
Employee e = (Employee) it.next(); System.out.println("Favorite color is:"+ e.getFavColor());
tx.commit();
With CMP (and finders-load-beans set to its default true value), thefindAllEmployeesNamed
finder will load all the employees with the name of rob. The getFavColormethods
do not hit the db because they are in the same tx, and the beans arealready loaded
in the cache.
It's the big CMP performance advantage."
So I wonder why this performance gain can be achieved when the iterationis inside
a transaction.
Thanks
regards
Francesco
thorick <[email protected]> wrote:
1) why is it suggested to do individual gets of methods within thesame Transaction
? (tx-Required).I'm not sure about the context of this question (in what document,
paragraph
is this
mentioned).
2) this strategy is useful only for small sets of data, isn't it? Iimagine I
would choose Finder-Load-Beans to false (or JDBC) for larger sets ofdata.
>
If you know that you will be accessing the fields of all the Beans that
you get back from a
finder,
then you will realize a significant performance gain. If one selects
100s or more beans
using
a finder, but only accesses the fields for a few, then there may be some
performance cost.
It could
depend on how large some of the fields are. I'd guess that the cost
of 1 hit to the DB per
bean vs.
the cost of 1 + maybe 1 more hit to the DB per bean, would usually be
less. A performance
test using
your actual apps beans would be the only way to know for sure.
3) A last question: its default value is true or false ?The default is 'True'
-thorick -
Hi team,
I have the following query where i need to find the max value
[code]
with t as (
select 'L1' R_nm ,'Data' R_Data , 'Obj' R_Obj , 'Wd' r_prec , '2' val from dual
union all
select 'L1' , 'Data', 'Obj' , 'No', '4' from dual
union all
select 'L2' , 'Data', 'Obj' , 'No', '4' from dual )
select t.*, max(val) over(partition by r_nm,r_data,r_obj) rk from t
[/code]
My expected output should be
[code]
r_nm r_data r_obj r_prec val rk
L1 Data Obj Wd 2 1
L1 Data Obj No 4 2
L2 Data Obj Yes 1 1
[/code]
Thank YouHi,
It looks like you're not interested in the MAX at all. It looks like you want to rank the rows, such that the one with the lowest value is assigned the number 1, the row with the 2nd lowest values gets 2, ..., and the row with the N-th lowest value gets N. If doesn't matter if the MAX is 4, or 2, or 420.
Here's one way to do that:
SELECT t.*
, RANK () OVER ( PARTITION BY r_nm, r_obj
ORDER BY val
) AS rk
FROM t
ORDER BY r_nm, r_obj
, val
Depending on how you want to deal with ties, you might want to use ROW_NUMBER or DENSE_RANK instead of RANK. -
Finding the smallest value from an array
Hi there :)
I started learning Java a few days ago and have now run into my first problem :p
I am using Netbeans on Mac OS X.
I need to find the smallest value from an array. So far I've had no luck. Any suggestions would be fantastic.
The code so far:
* Math Problems
* Created on May 4, 2007, 10:54 AM
* PROJECT 1: - IN PROGRESS
* Create a program that allows you to create an integer array of 18 elements with the following values
* 3, 2, 4, 5, 6, 4, 5, 7, 3, 2, 3, 4, 7, 1, 2, 0, 0, 0
* - The program computes the sum of elements 0 to 14 and stores it in element 15 // COMPLETED
* - The program computes the average and stores it in element 16 // COMPLETED
* - The program finds the smallest value from the array and stores it in element 17
* PROJECT 2: - TO DO
* Write a program that accepts from the command line and prints them out. Then use a for loop to print
* the next 13 numbers in the sequence where each number is the sum of the previous two. FOR EXAMPLE:
* - input>java prob2 1 3
* - output>1 3 4 7 11 18 29 47 76 123 322 521 843 1364
* PROJECT 3: - TO DO
* Write a program that accepts from the command line two numbers in the range from 1 to 40. It then
* compares these numbers against a single dimension array of five integer elements ranging in value
* from 1 to 40. The program displays the message BINGO if the two inputted values are found in the array
* element. FOR EXAMPLE:
* - input>java prob3 3 29
* - output>Your first number was 3
* - Your second number was 29
* - Its Bingo! // This message if 3 and 29 are found in the array
* - Bokya! // This message if 3 and 29 are not found in the array
* - The array was 7 5 25 5 19 30
* PROJECT 3 EXTENSION: - OPTIONAL
* Generate the array of 5 unique integers using random numbers
package mathproblems;
* @author Mohammad Ali
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
int A[]={3,2,4,5,6,4,5,7,3,2,3,4,7,1,2,0,0,0};
int O = A.length - 3;
int B = A[0] + A[1] + A[2] + A[3] + A[4] + A[5] + A[6] + A[7] + A[8] + A[9] + A[10] + A[11] + A[12] + A[13] + A[14];
A[15] = B; // Stores the sum of the integers in A[15]
int C = B / O;
A[16] = C; // Computes and stores the average in A[16]
int D = 101;
if (A[0] < A[1]) { D = A[0]; }
else { D = A[1]; }
if (A[1] < A[2]) { D = A[1]; }
else { D = A[2]; }
System.out.println("There are " + O + " numbers in the Array");
System.out.println("Those numbers add up to " + B + ".");
System.out.println("The average of those numbers is " + C + ".");
System.out.println("The smallest value in the array is " + D + ".");
}The code is incomplete, but it works so far. The problem is I know there must be an easier way. SAVE ME :)OK :)
Just thought I should show you the output as to help anyone else with the same problem:
* Math Problems
* Created on May 4, 2007, 10:54 AM
* PROJECT 1: - IN PROGRESS
* Create a program that allows you to create an integer array of 18 elements with the following values
* 3, 2, 4, 5, 6, 4, 5, 7, 3, 2, 3, 4, 7, 1, 2, 0, 0, 0
* - The program computes the sum of elements 0 to 14 and stores it in element 15 // COMPLETED
* - The program computes the average and stores it in element 16 // COMPLETED
* - The program finds the smallest value from the array and stores it in element 17 // COMPLETED
* PROJECT 2: - TO DO
* Write a program that accepts from the command line and prints them out. Then use a for loop to print
* the next 13 numbers in the sequence where each number is the sum of the previous two. FOR EXAMPLE:
* - input>java prob2 1 3
* - output>1 3 4 7 11 18 29 47 76 123 322 521 843 1364
* PROJECT 3: - TO DO
* Write a program that accepts from the command line two numbers in the range from 1 to 40. It then
* compares these numbers against a single dimension array of five integer elements ranging in value
* from 1 to 40. The program displays the message BINGO if the two inputted values are found in the array
* element. FOR EXAMPLE:
* - input>java prob3 3 29
* - output>Your first number was 3
* - Your second number was 29
* - Its Bingo! // This message if 3 and 29 are found in the array
* - Bokya! // This message if 3 and 29 are not found in the array
* - The array was 7 5 25 5 19 30
* PROJECT 3 EXTENSION: - OPTIONAL
* Generate the array of 5 unique integers using random numbers
package mathproblems;
* @author Mohammad Ali
import java.util.Arrays;
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
int A[]={3,2,4,5,6,4,5,7,3,2,3,4,7,1,2,0,0,0};
Arrays.sort(A);
System.out.println("The smallest value in the array is " + A[0] + ".");
int num = A.length;
System.out.println("There are " + num + " values in the Array.");
int sum = 0;
for (int i = 0; i < A.length; i++) {
sum+=A;
System.out.println("Those numbers add up to " + sum + ".");
double d = (double)sum/num;
System.out.println("The average value of those numbers is " + d + ".");
What Iearned:
1) How to create for loops properly
2) How to import java.util.Arrays ( =D )
3) How to get a more accurate average using double instead of int
4) This forum is the best and has very helpful people 24/7 ( =D)
Thanks Again,
Mo. -
Finding variable data value using fms
hi experts
i want find variable field value by using fms.pls help me
exact scenerio is
i want fetch the value tax amount of respective tax code from the Define tax Amount distribution form.
eg.if suppose i tax code BED+VAT then i want get what is the calculated value of excise ,cess and and vat .i get the row tax amount.whwn i click tax amount filed i get tax amount distribution form from this form i want that particular valu
what is exactsql for thisHi Sachin,
No need to go FMS. Open any transcation screen. For eg., Open Sales Order, goto Form Setting -> Table Format. Please check the field column like "Tax Only".
Then open any SO, check it out this Link, u will get the full information and tax break etc...
Thanks
SAGAR -
How to find Assertion key value?
Hi,
I am referring MSDN article for Management Libraries for .NET to access my Azure AD account.
I followed all steps from article, but when my application execution starts it gives an error
"An unhandled exception of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' occurred in Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Additional information: AADSTS90014: The request body must contain the following parameter: 'client_secret or client_assertion'."
c# block where I caught in error--
AuthenticationResult result = context.AcquireToken(
ConfigurationManager.AppSettings["apiEndpoint"],
ConfigurationManager.AppSettings["clientId"],
new Uri(ConfigurationManager.AppSettings["redirectUri"]));
my context variable as below
var context = new AuthenticationContext(string.Format(
ConfigurationManager.AppSettings["login"],
ConfigurationManager.AppSettings["tenantId"]));
and when I am trying to add client_secrete key to code
AuthenticationResult result = context.AcquireToken(
ConfigurationManager.AppSettings["apiEndpoint"],
new ClientCredential("*******", "******"),
new UserAssertion("*****", "client_credentials", "*****"));
throws an error
An unhandled exception of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' occurred in Microsoft.IdentityModel.Clients.ActiveDirectory.dll
Additional information: AADSTS50027: Invalid JWT token. AADSTS50027: Invalid JWT token. Token format not valid.
please tell me proper solution where I making mistake and also help to find Assertion key value for application which are added on Azure AD portal.
thanks,
Yogesh
Hello Yogesh,
Since this issue is related with window azure AD, i move it to the azure ad forum, there are AD experts who will hlep you. The current forum you posted to is used to discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O,
Regigistry, Globalization, Reflection.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to find out the Sales order no based on spool no
Hi Experts,
Anyone tell me how to find out the Sales order no based on Spool no.
Thanks and regards,
AmjadHello Mohammed,
Please check the following SAP Spool tables for your spool request.
You will find your required document number as an Object key in these tables.
TSCMSTAT --> Field OBJNO
SOOS --> Field APPLKEY (Document number will be a part of this key)
If your document is getting printed by SAP Script, then dont forget to take SCR value in the OBJTP field while searching for your record.
Thanks and Best Regards,
Vikas Bittera.
***Points for Usefull answers *** -
Where can I find the scale value of mx:Image with scaleContent enabled?
Hey all
Like the topic says, where can I find the scale value of the image content using an mx:Image with scaleContent set to true. Both the scale on the image object and the image.content is 1 (resizing is probably done by a matrix).
To put things into context: I'm loading a picture from the filesystem and then use the Marilena facedetection to check for faces. When I find any faces I draw on a overlaying UIComponent the box where the face is. Because the detections returns the position of the face based on the unscaled bitmapdata the box indicating the face is not in the right position. In order to get this right I need the scale factor of the mx:Image scaleToFit.
tnx in advance!Nope, there it is also 1.
I solved it by calculating it myself:
detectLayer.scaleX = detectLayer.scaleY = image.width>image.height?Bitmap(image.source).width/image.width:Bitmap(image.source).heig ht/image.height; -
Find Planned and Production Orders
Hi all ,
I have a requirement . If i give the Work center Name i should get already assigned Planned Orders or Open Production Order against that Work center .
Please let me know . If there is no standard FM then let me know can i retrieve those from any tables .
I appreciate for any suggestions .
Regards
RajHello Raj
Please note that your "objective" (Find planned and Production Orders) has little to do with object orientation.
Function module BAPI_ALM_ORDEROPER_GET_LIST is probably the one you are looking for. You need to feed TABLES parameter IT_RANGES with the appropriate values.
Please note that the selection parameters have special names that can be found in the structures defined in fm IBAPI_ALM_ORDEROPER_GETLIST:
* set some local constants:
constants:
lc_progname like rsvar-report value 'RIAFVC20',
lc_par_int type ddobjname value 'IBAPI_ORDER_LISTOPER_PARAMS',
lc_par_ext type ddobjname value 'BAPI_ALM_ORDER_LISTOPER_PARAMS',
lc_sel_int type ddobjname value 'IBAPI_ORDER_LISTOPER_SELOPS',
lc_sel_ext type ddobjname value 'BAPI_ALM_ORDER_LISTOPER_SELOPS'.
Example: If you want to select for a specific work center then I assume the selection parameter is:
(BAPI_ALM_ORDER_LISTOPER_SELOPS-) OPTIONS_FOR_WORK_CNTR
Thus, to select for a given work center add the following record to IT_RANGES:
FIELDNAME = 'OPTIONS_FOR_WORK_CNTR' " presumably without the DDIC structure name
SIGN = 'I'
OPTION = 'EQ'
LOW = <work center>
If the selection does not work then just do a little debugging.
Regards
Uwe
Maybe you are looking for
-
Why Can't I Install iTunes 10.5?
I recently tried to update Itunes 10.5 or the most recent itunes, and it keeps saying the fallowing: " The feature you are trying to use is on a network resource that is unavailable." Then below it says: "Click OK to try again, or enter an alternate
-
No Tables in DW CS3 Remote MySQL Connection
Hello All, I was hoping forum members would be able to troubleshoot a Dreamweaver CS3/remote MySQL Connection issue I'm having. I am successful in connecting to the database but the table data I created in phpMyAdmin 2.6.3 does not appear in the Appl
-
Problem syncing Aperture to iPad
Has anyone else had a problem syncing Aperture to the iPad after upgrading to Mountain Lion? I have attempted to sync selected albums from Aperture, but no new images were transferred. Thanks - Dudley
-
Help!! Want to immigrate Oracle Data in ASCII7 code to a Simplified Chinese Database
I want to immigrate Oracle Data in ASCII7 code to a Simplified Chinese Database? I use exp& imp but it failed. Who can help me ! Thanks a lot!
-
Why can't I save something in Word for Mac?
When I try to save something to Word for Mac, it says that the HD if full. It's not. I've only had my computer for a year and I can't save anything to a flash drive either. Help, please!