Problems with determination...
Hey there,
Im making a program that can simulate like 20.000 hands of poker to get a rough estimate what the average chance is the poker player gets something, for example a flush. The program exists of 2 classes, a card class and a cardDeck class and a test class.
Card Class:
public class card
private String face;
public String kleur;
public card(String cardFace, String cardKleur)
face = cardFace;
kleur = cardKleur;
/*public String getFace()
return face;
public String getKleur()
return kleur;
public String toString()
return kleur + " " + face;
}Note that it allready has 2 methods to determine the kleur(suit) and face but i commented em for now.
cardDeck.class
import java.util.Random;
public class cardDeck
private card deck[];
private int currentCard;
private final int NUMBER_OF_CARDS = 52;
private Random randomnumber;
public String valueCardKleur;
public String faces[];
public String kleuren[];
public cardDeck()
String kleuren[] = {"Harten","Ruiten","Klaveren","Schoppen" };
String faces[] = {"Aas","Koning","Vrouw","Boer","Tien","Negen","Acht","Zeven","Zes","Vijf","Vier","Drie","Twee" };
deck = new card[NUMBER_OF_CARDS];
currentCard = 0;
randomnumber = new Random();
for(int i =0; i<deck.length;i++)
deck[i] = new card(faces[i%13], kleuren[i/13]);
//String valueCardKleur = kleuren[0];
public void shuffle()
currentCard = 0;
for(int first = 0;first < deck.length; first++)
int second = randomnumber.nextInt(NUMBER_OF_CARDS);
card temp = deck[first];
deck[first] = deck[second];
deck[second] = temp;
public card dealCard()
if(currentCard < deck.length)
return deck[currentCard++];
else
return null;
/*public card giveCard()
return deck[currentCard];
public String cardValueKleur()
return faces[0];
}Here are also 2 commented methods I added to maybe get to the right endsolution.
cardDeckTest.java
public class cardDeckTest
public static void main(String[] args)
String gedeeldeKaart = "";
String gedeeldeKaart2 = "";
String gedeeldeKaartKleur = "";
String gedeeldeKaartFace;
cardDeck myDeck = new cardDeck();
myDeck.shuffle();
for(int i=0;i <7; i++)
//System.out.println(myDeck.dealCard());
gedeeldeKaart = myDeck.dealCard().toString();
//gedeeldeKaart2 = myDeck.giveCard().getFace().toString();//door deze structuur kijg ik vast dubbele kaarten
//String gedeeldeKaartKleur = myDeck.dealCard().getKleur();
if(gedeeldeKaart.equals ("Schoppen"))
System.out.println(gedeeldeKaart + " ----> -100 punten kneus");
else
System.out.println(gedeeldeKaart);
}Now the problem is... I want to add 2 methods like getFace() and getKleur() to determine the suit and face of the dealt cards so i can determine what hand i have... The rest allready works (like the shuffling and dealing) but the last part is after 3 hours still unsuccesful so maybe you guys have any hints or maybe even straight solutions...
I sure hope so... Thanks in advance
Now the problem is... I want to add 2 methods like
getFace() and getKleur() to determine the suit and
face of the dealt cards so i can determine what hand
i have... If you need them why have you commented out these two methods in Card?
What you'll need is a class called Player or so who can hold a hand of cards.
Could you be more specific about your problem. Is it how to evaluate a hand of Poker?
Similar Messages
-
Problem with "determining gapless playback"
Hi.
How do I turn this off completely? If I press X then it slows down a bit and also it creates mistakes on some of my songs .
Is there any way to stop this feature? If not I propose a way of dealing with this to be available in the next Itunes upgrade .
EDIT: Also, since my Itunes library is different than my actual library, how can I put the old directory so that I tunes will use it as my library ? I do not wish to burden my Hard Disk any more . Thanks .
Message was edited by: Storm XIIIbumping this post because I'm having a similar problem. Mine does this for 170 songs (of 7,000 in my library) every time I sync my iPod. Most of the songs it goes through are purchased from iTunes and I don't even have the whole albums, just one or two songs. POINTLESS waste of time!
For the record, though, I love the gapless feature (listened to Abbey Road tonight on my iPod, worked beautifully!). Just want to know why it has to determine the info again for EVERY SYNC! -
Problem with determining suitable audio driver,pls help me.
Hello,
I have hp pavilion dv2690ee , and when i install windows xp , i used this driver for audio device sp34386.exe , though my cpu is intel.
But i replaced motherboard, now when i install sp34386.exe , this message appear "driver installation failed could not find the media device for this driver" , how can i know my new motherboard model, or which model my motherboard is compatible with it?
Note : i am using linux os , and it detect this audio device model: 82801H (ICH8 Family) HD Audio ControllerHi:
Did you first install the MS UAA driver? If you didn't that is probably your problem.
See the guide on this link under Moderate Models. There is a guide for installing the audio drivers.
http://h30434.www3.hp.com/t5/Operating-systems-and-software/General-XP-Downgrade-Guide-for-HP-Laptop...
Paul -
Problem with determining if JavaScript is Enabled
Can someone explain why this doesn't work:
<!-- <script><jsp:setProperty name="logIt" property="JSEnabled" value="true" /></script> //-->
<noscript><jsp:setProperty name="logIt" property="JSEnabled" value="false" /></noscript>
For your computer, JavaScript is: <small><jsp:getProperty name="logIt" property="JSEnabled" /><small>.
(This will return a string of either "disabled" or "enabled")
I always get the value of disabled, whether JavaScript is turned on or off.
Any help?The jsp:setProperty tags are executed before the page is
rendered in your browser. (Remember, Java runs on the
serer, not the browser). Since you last setProperty set
the value to false, this is the value you get. -
I have a problem with my iPhone 4s. An Apple rep looked at the phone tonight and determined I will need a new phone. I am now trying to back up my data to iTunes but I cannot get the phone to turn on. I have it plugged into my computer monitor but it just slowly flashes the Apple symbol. Any ideas on how I can get it to power up for the backup?
Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$
-
Receiver determination - Xpath expression problem with count
I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice. If it is greater than the number I want to write out a file to be processed by a different process on the receiving end. I have created the receiver determination condition with the following conditions:
(/p1:MT_HOG_Data/row[count(row) > 3] EX)
(/p1:MT_HOG_Data/row[count(row) <= 3] EX)
The integration is always processing the second condition no matter how many records come in. I have tried with and without the multiline option. Can anyone help with this?
I have searched through the forum and checked the following links without any resolution:
http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
I can't find any examples where a count of records is checked in the expression editor. Thanks in advance for any help.You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
Example: you want to send to receiver A if count > 3, else to B:
you set /rowNumber EQUAL 4 for sender A
and /rowNumber NOT EQUAL 4 for sender B
The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
Problem with that is that the second condition also will be true because nodes for that condition will be found
better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
CSY -
Problems with Receiver Determination
Hi everybody.
I have started as XI developer 2 weeks ago.
I'm trying to replicate de tbit40 exercises in our company system. when i try to make the 'Receiver Determination' somethings happen. It doesn't appear the part to write the system receiver.
This is my scenario : file->XI->IDOC.
I've defined in the SLD the hardware, including one PC, the XI server and the SAP 4.6c server.
This is only a test in order to check the connectivity between the PC and SAP R3. I haven't configured yet the part of the IDOC in the R3 system. Is this necesary to view the 'subwindow' of system receiver?
Thanks.Hi everybody,
I'm having some problems with the sender agreement and the receiver determination, let me explain you the scenario: i'm trying to translate inbound plain text files to XML to a outbound interface for MDM.
An XI consultant (expertise) has successfully created the inbound - outbound interface mappings for vendors catalog, it has worked good since he set it up, but now that i'm trying to create the materials mapping according to the manuals step by step, and when i try to create the receiver determination settings, i can't find my interface mappings, the pop-up window return 0 objects for interface mappings (that i have already created and linked with msg types).
So what can i do? Do you have any idea?
Regards.
Gerardo. -
Problem with Account determination
Hi all.
I have a problem with account determination when I change some data in Tcode VKOA.
For example:
I made changes in VKOA to determine G/L account 0000523201 and it worked it.
But in the account document the account that is displayed is different (0000501000) and I don´t know why.
I checked the Analysis Account Determination in VF03 and the system found the correct account in the access sequence, but I realized that there is a second line with the message G/L account in document 0000501000 . Where do I determine this account, or how Can I fix it ?
Thanks for any help.
RenatoHi reanto
Check in VKOA all the G/L accounts for all the respective account keys. Also check wheather any provisional G/L account have been maintained or not. for any account key
Also check wheather twice if you have maintained for the same account key different G/L accounts
Regards
Srinath -
Problem with ejecution work book (determining run time)
Hello, I have a problem with the Discoverer Desktop (v. 10.1.2.1) db. Oracle 10G.
Whenever I execute a work book with my user in any equipment of the network
when determining the run time of the report is delayed , only with my user and
the privileges of the reports and tables is ok.
excuse my english...
thanksIt sounds like the problem with the query estimator. Basically, the query estimator IMO should be turned off for Discoverer as it's not Disco's best feature. As to why only you see it, are you sure it's not only when run on your PC?
If you click over to a 'very old' link I have at:
http://proudman.homestead.com/files/optimizing_discoverer_on_client.htm
or at the bottom of this message I've copied it, you'll see #1 is the first thing you want to change.
You may not want to change #2 or #3 but take a look. Also, where the instructions refer to: Disco 3.1 just change to your version (ie: 10). Gotta' update that someday.
Russ
=================================================
3 REGISTRY SETTINGS TO CHANGE
============================
Note that for each of the three suggestions below, if the entry does not exist in your registry, then create it and set the value suggested.
1. Database\QPPEnable
type - DWORD, default 1
To Do: Turn off query prediction.
This can be done by specifying the following registry key:
HKEY_CURRENT_USER\Software\Oracle\Discoverer 3.1\Database\QPPEnable
It should be set to a DWORD value of 0 (zero). To re-enable query prediction at some later point in time, either remove the registry key or set it to 1.
2. Database\QPPCBOEnforced
type - DWORD, default 1
To Do: Stop query prediction forcing the use of the cost-based optimizer.
This can be done by specifying the following registry key:
HKEY_CURRENT_USER\Software\Oracle\Discoverer 3.1\Database\QPPCBOEnforced
It should be set to a DWORD value of 0 (zero) which means use of the Cost-based Optimizer (CBO) is not enforced. The CBO will follow the normal rules of the database server.
3. Database\ObjectsAlwaysAccessible
type - DWORD, default 0
To Do: Stop validating that the tables/views folders refer to exist and that the user has access to them.
This can be done by specifying the following registry key:
HKEY_CURRENT_USER\Software\Oracle\Discoverer3.1\Database\ObjectsAlwaysAccessible
It should be set to a DWORD value > 0 (ie: 1) which means validation will not take place.
------------------------------------------------------------------------------------------------------------------------------------------------ -
Problems with sources of supply determination for external requirements.
Hi gurus...
My scenario is SRM Classic Extended.
We have a problems with sources of supply determination for external
requirements comes from ECC. The shopping cart is created with successful
based in the purchase requisition at ECC, but when i try to make the
determination of sources of supply the system doesnt find any source of
supply.
There are a lot sources of supply creates for these parameters. The
contracts were already replicated to ECC.
This problem only occurs with external requirements comes from ECC, if i
created a shopping cart directly at SRM, using the same parameters, the
system propose the sources of supply correctly.
Is there something that we can do?? This is the normal comportment for the souces of supply?
Tks,
Gustavo NogueiraHello Gustavo Nogueira
Then it is an issue.
How are you searching the source of supply in sourcing cockpit.
Can you replicate the issue?
Let me know step by step,
as per standard SAP , source of supply data must be available for shopping carts so that buyer can assign the source of supply.
please share what source of supply you have there . -
Problem with text determination procedure
here we r finding text determinations procedures for purchase order in spro - img conflagration as follows materialmanagement-purchasing-messages-text for messages-define text for po.by going here i had a view where both header and item text for different po is maintained.
now i want this text to be printed in my purchase order every time with different item selected there should be different item text should be selected.
1. the major problem when inserting into medruck form as insert-text-standard text, here it selecting the text object as TEXT BUT FOR DIFFERENT MATERIALS IT SHOULD SELECT MATERIAL as text object then only i can retrieve the material text's.
if any one can forward a document r help to solve this problem and solution suggestions.
this is a very important requirement.pls forward it as early as possible,
thanx with regards...
hareesh tadepalliRaj,
Thanks for your suggestion. This would be a possiblity going forward, but we have existing tickets that would still be missing the interaction text. This apparently worked before we upgraded to SP 14, so I don't think there is a problem with our configuration.
I created some new test tickets, and found that the interaction text is still being copied and saved in the ticket log, even after text is added to the ticket. The problem is that the interaction text is not visible from IC Web. It is visible when looking at the ticket in the SAP GUI (transaction CRMD_ORDER).
For example, here is the contents of the Log text as seen in SAP GUI (I use "TICKET" or "INTERACTION" in the text to indicate where the text originated):
General Note
06/03/2009 11:14:36 M305755
TICKET - general note
General Note
06/03/2009 11:13:59 M305755
INTERACTION - general note
Technical Problem
06/03/2009 11:13:59 M305755
INTERACTION - technical problem
Here is the contents of the Log text as seen in IC Web:
General Note
06/03/2009 11:14:36 M305755
TICKET - general note
Martin -
Hello!
The new version of Firefox I have a problem with opening the site VKontakte. The browser displays the following error: "Firefox has determined that the server redirects the request for this address in a way that it will never end." How to solve this problem? Please excuse me for my English.
Sincerely, Vsevolod.You're welcome
-
Problem with Enhanced Receiver Determination
Hi Friends,
I am doing the enhanced receiver determination scenario, But it is giving the
error in SXMB_MONI like this
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Receiver Identification
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
<SAP:P1>Problem while determining receivers using interface mapping: Fehler beim Parsen der Empfänger-Liste.Länge des XML-Dokuments 264</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error when determining the receiver: Problem while determining receivers using interface mapping: Fehler beim Parsen der Empfänger-Liste.Länge des XML-Dokuments 264 Problem while determining receivers using interface mapping: Fehler beim Parsen der Empfänger-Liste.Länge des XML-Dokuments 264 Fehler beim Parsen der Empfänger-Liste.Länge des XML-Dokuments 264 System expected the element 'Receivers'</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
this is error is coming in the SXMB_MONI
THE DATA type(Receivers) we create in basis component is comes automatically?
are we have to create?
in my scenario i creted manually,
is it compulsory to specify the properties for the party and agency?
is it compulsory to create 2 Receiver structures in msg structure?
if yes what r those, actually i used from sap.help.com,
Can any body should give me the solution for this, regarding mapping and configuration , if anybody experienced this scenario. Pls . give me the guidelines to do.Hi,
the mapping creating the receiver list is not producing the required element "Receivers" from Namespace "'http://sap.com/xi/XI/System". Look to the operation mapping given in the enhance Receiver Determination (IB Directory) and detect the corresponding mapping program (ESR). Copy the source payload from MONI, test the mapping program and correct it.
Regards,
Udo -
Problem with condition editor in Interface determination
Hi,
I have 5 receivers for an interface. There are some conditions based on which the message should be processed.
one of my condition is:
If field A = CIT* and (field B != IDP or field C != IDP*) then message should be processed to a particular InterfaceMap(Messaeg Map).
I am facing problems when giving the condition with != in the condition editor of InterfaceDetermiantion.
When I send a message that is not satisfying the above condition, even then an output file with 0kb is getiitng created. But in this case, the condition should obstruct the message going to Message mapping.
I thought this could be the problem with != operator in condition editor.
Can any one suggest if there is any other way that i can proceed.
Thanks in advance,
Minisha.Hi Suraj,
Thanks for the suggestion.
But it didnt work for me.
Even when i give empty-message handling to ignore, the empty file is getting generated.
Not even the condition is working.
I tried only giving (field A u2248 CIT* AND field B != IDP EX ), which should work in this case. As expected, the message is not processed beyond this as the condition is false. But problem is when i tested with other testfile with which the condition given is true, still the message is not being processed. it is now completely obstructing the message even if the condition is true.
Thanks,
Mnisha.
Edited by: Minisha Uthaman on Sep 10, 2009 4:12 PM -
I am having a minor but nagging problem with a regression in the er_print utility of the Sun Performance Analyzer suite bundled in Studio 12. is there maybe a patch available or in the works?
I have not had any success in finding a resolution by searching the open literature
The issue is that the callers-callees listing only dumps functions in alphabetical order, ignoring the sort order specified by sort. This is a regression from the Performance Analyzer (7.4) behavior from Sun Studio 10. We only recently jumped to studio 12.1.
This functionality is documented here: http://docs.sun.com/app/docs/doc/821-0304/afaid?a=view (as well as many other references). To quote:
callers-callees
Print the callers-callees panel for each of the functions, in the order specified by the function sort metric (sort)."
I use a script input to er_print that in the past analyzed the top N functions sorted on inclusive thread time. Now I have to be sure to dump ALL functions and need a third-party search tool to find that information in the resulting report.
Has anyone heard of this problem or are there Performance Analyzer patch(es) available. I saw some for 7.6 and another for unspecified but have not seen this problem in patch notices.
Thanks.
Regards,
SteveNik, thanks for taking a look. We can't go to 12.2 because we're a software developer and we'll lose our binary compatibility with the release we've been building for the last few months. I'm a systems guy and will paste in a developer's example below.
Note Marc's url shows a 12.1 Performance Analyzer patch 142369-01 we have not yet installed. The patch notice description doesn't show much. I'll pass on patch info to remote user/developer.
Developer example:
I use a script input to er_print that in the past analyzed the top N functions sorted on inclusive thread time. Now I have to be sure to dump ALL functions and need a third-party search tool to find that information in the resulting report.
Heres a shortened (only 4) example of the behavior Im seeing the focus of the functions in callers-callees are NOT those of the functions determined by the sort metric.
= = = =
sysun046% er_print /scratch/test.4.er
/scratch/test.4.er: Experiment has warnings, see header for details
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) sort i.total
Current Sort Metric: Inclusive Total Thread Time ( i.total )
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) cmetrics a.total:e.user:i.user:e.total:i.total
Current caller-callee metrics: a.total:e.user:i.user:e.total:i.total:name
Current caller-callee sort metric: Attributed Total Thread Time ( a.total )
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) limit 4
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) sample_select 22-53
Exp Sel Total
=== ===== =====
1 22-53 57
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) functions
Functions sorted by metric: Inclusive Total Thread Time
Excl. Incl. Incl. Total Name
User CPU User CPU Thread
sec. sec. sec.
26.015 26.015 113.530 <Total>
0. 26.015 113.530 ACE_Task_Base::svc_run(void*)
0. 26.015 113.530 ACE_Thread_Adapter::invoke()
0. 26.015 113.530 ORB_Task::svc()
(/opt/sunstudio12.1/bin/../prod/bin/sparcv9/er_print) callers-callees
Functions sorted by metric: Inclusive Total Thread Time
Callers and callees sorted by metric: Attributed Total Thread Time
Attr. Total Excl. Incl. Excl. Total Incl. Total Name
Thread User CPU User CPU Thread Thread
sec. sec. sec. sec. sec.
113.530 26.015 26.015 113.530 113.530 *<Total>
113.530 0. 26.015 0. 113.530 lwpstart
Attr. Total Excl. Incl. Excl. Total Incl. Total Name
Thread User CPU User CPU Thread Thread
sec. sec. sec. sec. sec.
0.010 0. 0.010 0. 0.010 ACE_Message_Block::clone(unsigned long)const
0. 0. 0.010 0. 0.010 *ACE_Data_Block::clone(unsigned long)const
0.010 0.398 0.398 0.398 0.398 memcpy
Attr. Total Excl. Incl. Excl. Total Incl. Total Name
Thread User CPU User CPU Thread Thread
sec. sec. sec. sec. sec.
0.001 0. 0.003 0. 0.011 ACE_Select_Reactor_T<ACE_Select_Reactor_Token_T<ACE_Token> >::resume_handler(int)
0.001 0.001 0.001 0.001 0.001 *ACE_Guard<ACE_Select_Reactor_Token_T<ACE_Token> >::release()
Attr. Total Excl. Incl. Excl. Total Incl. Total Name
Thread User CPU User CPU Thread Thread
sec. sec. sec. sec. sec.
0.010 0. 0.010 0. 0.010 TAO_Synch_Queued_Message::clone(ACE_Allocator*)
0. 0. 0.010 0. 0.010 *ACE_Message_Block::clone(unsigned long)const
0.010 0. 0.010 0. 0.010 ACE_Data_Block::clone(unsigned long)const
= = = = =
Nik, thanks for taking a look.
Steve
Maybe you are looking for
-
How to put your money from one apple ID to a different apple ID
does any one know how to do that if u do pls help
-
How mapping role defined in JDeveloper to LDAP
Hi, I'm trying to understand how to map the roles definited during design of BPM process and the LDAP. I've deployed process on soa server, I can see the ear on Console page. I did the following: 1. Log in to Oracle BPM workspace (http://localhost:80
-
Someone help VERY FAST!
-
How to check frequency of ABAP program usage
Dear Experts, How to find out the frequency of ABAP programs executed by users? the reason is because we want to do a housekeeping on all the ABAP reports that we have developed over the years, we want to deactivate those reports that are no longer e
-
Print service will not start up
Every time I enter the command "sudo serveradmin start print" I get the following respond: print:command = "setState" print:state = "STOPPED" print:status = 0 I've tried to clean out all temp files from /var/spool/cups, /var/spool/cups/tmp, etc. and