ALL_TAB_HISTOGRAMS.ENDPOINT_VALUE Algorithm for Characters
Has anyone resolved the algorithm to transform the column characters to numbers to be stored in ALL_TAB_HISTOGRAMS.ENDPOINT_VALUE?
Daniel
Using Jonathan's formula from the char to the ENDPOINT_VALUE, I think I've found a way to get the first 6 characters given the ENDPOINT_VALUE:
create or replace function GetStringFromEndpoint (InitVal IN number)
return varchar2
is
lCurrVal number;
lAsciiVal integer;
RetString varchar(6) := NULL;
begin
lCurrVal := InitVal + 500000000000000000000; /* to account for rounding to 15 s.d.: */
for i in 1..6
loop
lAsciiVal := floor((lCurrVal/power(256, 15-i)));
lCurrVal := lCurrVal - lAsciiVal*power(256, 15-i);
RetString := RetString || chr(lAsciiVal);
end loop;
return RetString;
end GetStringFromEndpoint;
I've done a bit of testing (on 10.2), and it worked OK so far. Anyone sees a flaw with this code/logic? Also, anyone could try it on 9i for me, since I don't have that version anymore?
Thanx
Daniel
Similar Messages
-
How to get the unicode escapes for characters outside a characterset
Hi!
I'm tryiing to edit into a RTF file and have been fairly successful so far. But living outside the U.S i need some characters outside ASCII. Those characters are supposed to be escaped as unicode-escapes, eg \u45. But I can't find a way to get the escapesequense for the unicode-characters that lives outside ASCII.
I'm guessing that this is a very simple thing to do but I have not been lucky with google so far.
So, how do I get the unicode escapes for characters outside a characterset?
Thanks in advance
Roland CarlssonI'm tryiing to edit into a RTF file and have been
fairly successful so far. But living outside the U.S
i need some characters outside ASCII. Those
characters are supposed to be escaped as
unicode-escapes, eg \u45. But I can't find a way to
get the escapesequense for the unicode-characters
that lives outside ASCII.You are asking about RTF and not java correct?
As a guess....
Unicode is 32 bit (presumably you are not using the newest one.) Thus it requires a 32 bit representation. Thus \u45 actually is the same as \u0045. Thus something like \u1e45 would probably work. -
RegEx for characters with accents and such but not alphanum or punctuation
I'm creating a fuction that checks for the following code snip. I'm having trouble understanding what I need to do to get the last criteria. How do I specifically check for characters with additional marks such as a' but not a
Thanks in advance for any help or advice you might give
<!---Contain characters from three of the following five categories:--->
<!---English uppercase characters (A through Z)--->
<cfif ReFind("[[:upper:]]+",passwd,0, false) gt 0>
<cfset numCharSets = numCharSets + 1>
</cfif>
<!---English lowercase characters (a through z)--->
<cfif ReFind("[[:lower:]]+",passwd,0, false) gt 0>
<cfset numCharSets = numCharSets + 1>
</cfif>
<!---Base 10 digits (0 through 9)--->
<cfif ReFind("[[:digit:]]+",passwd,0, false) gt 0>
<cfset numCharSets = numCharSets + 1>
</cfif>
<!---Non-alphabetic characters (for example, !, $, #, %)--->
<cfif ReFind("[[:punct:]]+",passwd,0, false) gt 0>
<cfset numCharSets = numCharSets + 1>
</cfif>
<!---A catch-all category of any Unicode character that does not fall under the
previous four categories. This fifth category can be regionally specific.--->AWEInCA1 wrote:
How do I specifically check for characters with additional marks such as a' but not a
By recognizing they are seperate characters. You will probably want to use codes to access these characters.
\uFFFF where FFFF are 4 hexadecimal digits
Matches a specific Unicode code point. Can be used inside character classes.
\u00E0 matches à encoded as U+00E0 only. \u00A9 matches ©
http://www.regular-expressions.info/refunicode.html
http://www.regular-expressions.info/reference.html -
Predictive Algorithm for Churn analysis
Hi,
Can anybody help me with the algorithm which I can use for churn analysis?
Thanks,
AtulHi Atul,
For Churn analysis or what is usually referred to as a binary classification problem where the customer is either staying or leaving=churning I would suggest one of the following algorithms:
CNR Decision Tree - which also provides a decision tree to explain which feature split is influencing the target (churn) the most.
You could also chose one of the R based Neural Network algorithms, however the produced predictive model & results are usually hard to explain.
If need be you can enhance the number of available algorithms by adding you own R functions - there are a lot of examples in this community.
If you have SAP HANA you could also chose:
Decision Trees:C4.5, CHAID or CART (new in SAP HANA SP08).
Other supervised learning algorithms for binary classification: Naive Bayes or SVM (Support Vector Machine).
There are a lot more but this should get you started.
Best regards,
Kurt Holst -
Load balancing algorithm for groups in RZ12
Hello,
I would like to know the load balancing algorithm for groups defined in RZ12.
I know that log on groups for external connections are administered via SMLG and table RZLLICLASS.
I also know that RFC resources can be managed for RFC logon groups via RZ12.
Kind regards,
Peter
<removed_by_moderator>
Point awarding is at your discretion, but read and follow the "Rules of Engagement"
Edited by: Juan Reyes on Dec 3, 2010 10:21 AMHello!
Found this post while searching information about RFC and Logon Groups...
I have some mess in my head with SMLG functionality and RZ12. As I know SMLG we can use to distribute users to application server instances, it gives us good achievement in performance. With RZ12 we can distribute RFC connection of particular job for parallel execution on predefined application server. With SMQS and SMQR transaction we can set "Name of AS Group" to route RFC-execution on certain server or servers. But I have troubles with understanding. Imagine, we set up group 1 with 2 servers (name it RFC_GR1), and group 2 with another 2 servers (name it RFC_GR2). How could qRFC scheduler decide on which RFC server group (RFC_GR1 or RFC_GR2) distribute RFC-execution? How to interact "Name of AS Group" with RFC groups if we can set only one group? How could we distribute RFC-execution depending on our logon groups (smlg)? We would like to distribute RFC depending on SAP logon groups. Is it possible? Or do I compare apple and orange?
Regards,
Artem Ivashkin -
Help: Algorithm for Load File Data Block Hash?
Hi guys
I would like to understand the algorithm of a field in INSTALL for LOAD command. It is "Load File Data Block Hash". I'm concerning about it in JCOP tool + Eclipse
(All I want to to is designing the new INSTALL for LOAD command, and I want to imitate JCOP tool)
Can I use DES algorithm for this field?
Thanks in advance.The load file data block hash is described in GP Card Spec v2.1.1 sections 6.7.6.1, 7.7.7 and C.2 all titled Load File Data Block Hash.
The hash is a SHA-1 hash of the load file data block.
Cheers,
Shane -
What is the algorithm for this?
if I have a string 000111 (or any amount of zeros and ones), what is the algorithm for me to get all possible combinations? (001011, 001101, ...)
Odd but the following code does not yeild the results you list in your post. Maybe you have a mistake? Or am I missing something?
class test
public int[] getC(int[] c, int n)
int m= c.length;
for (int i= m; i-- > 0;)
if (++c[i] <= n-(m-i))
while (++i < m)
c= c[i-1]+1;
return c;
return null;
public static void main(String[] args)
test t = new test();
int[] input = {0,1};
int n = 4;
int[] res = t.getC(input, n);
for (int i = 0; i < res.length; i++)
System.out.println(res[i]); -
Algorithm for Rainflow live cycle (Markov) in mstudio 6?
Hi,
does anyone knows how to create a rainflow algorithm for live cycle analysis
(Markov algorithm) by using measuremnt studio 6. Is there any algorithm
build in the lib ? I need a algorithm for a visual c++ programm.
Thanks,
Torsten SchultzTry the latest Fixpack which is 13. This will take WebSphere to 6.1.0.13
Every fixpack from IBM for WebSphere now come with its own UpdateInstaller, downloaded separately. Install this first.
Then copy the Fixpack .pak file into the /maintenance folder of the UpdateInstaller. Then run the UpdateInstaller.
Also, remember that the fixpack for the IBM Java SDK also needs to be separately downloaded and installed. -
Uncrackable algorithm for serial-numbers
In the last few days, Ive been thinking:
Whats the use of sofisticated programs that cost millions to develope, and cost a few hundred dollars and there you can download a pirate version?
There must be an uncrackable algorithm for protecting serial numbers or something like that.
I would like to find out something like that
R. HollensteinSo, tschodt, what you are suggesting is that I only
provide the user interface and some core functions to
anyone and then, I must create a database with
registered (paying) users and everytime a user wants
to make use of some function, he must have an
internet connection?
That is indeed the only uncrackable software, and the only way to ensure you get paid for pirated versions.
But then, the performance of the program would be
decreased...
Not necessarilly. You just need enough resources to serve the expected number of clients and they need a fast enough network connection.
I will think in some other solution.
Maybe, you can deal it that the user must connect
only once in order to get full functionality.
In that case someone can buy the software, figure out what you do to unlock the functionality when he logs on, and use that to crack the system.
As soon as you let any of your code (compiled or otherwise) out of your company someone WILL find a way to crack it. -
Help me to get the algorithm for this assingment.
I have tried to draw the x-y axis and the rectangle. I hava a problem to draw the rectangle inside of the lablled grid.
NEED EVERYONE'S HELP HERE!
Assignment #4
Goal:
� This lab gives students more experience in
� developing proper algorithms for real-life problems;
� using program constructs � sequential, selection, and repetition.
Algorithm. An algorithm is a description of steps to solve a problem that is unambiguous, executable, and terminating. In order to solve a problem by computer, you must know an algorithm for finding a solution.
Problem Description
Develop an algorithm and then write a java program that can accept commands from the user to draw a rectangle. The program should accept the xy-coordinate pair of the upper-left corner, and the width and height of a rectangle. It should then draw the rectangle pattern on a 40 X 20 labelled grid. For example, if the upper-left corner is (5, 10) with a width of 10 and height of 5, then the program would display:
^
20+
|
|
|
|
|
15+
|
|
|
|
10+
| ++++++++++
| ++++++++++
| ++++++++++
| ++++++++++
5+ ++++++++++
|
|
|
|
________________________________>
0 5 10 15 20 25 30 35 40
Upper Left (5,10) width:10, Height: 5
NOTE:
� Your display should include the labelled axis, as shown on the previous page, and also the lines that are drawn horizontally across the page.
� Make sure the rectangle will fit on the 40X20 grid.
� Appropriate error messages must be displayed for invalid data provided by the user.If you format your code, it looks like thispublic class Rectangle {
public static void main(String[] args) {
int maxYAxisPoint = 20;
int maxXAxisPoint = 40;
int xCoodinate = 5;
int yCoodinate = 10;
int width = 5;
int height = 10;
int leftLowPoint;
System.out.println("This program draw a rectangle pattern on a 40*20 labelled grid.");
System.out.println("Please enter the x-coordinate of the upper left point: ");
xCoodinate = MyIO.readLineInt();
System.out.println("Please enter the y-coordinate of the upper left point: ");
yCoodinate = MyIO.readLineInt();
System.out.println("Please enter the width of the rectangle: ");
width = MyIO.readLineInt();
System.out.print("Enter the height of the rectangle:");
height = MyIO.readLineInt();
if (yCoodinate < maxYAxisPoint && yCoodinate + width < 40 ||
xCoodinate + width < maxXAxisPoint &&
xCoodinate + height < maxYAxisPoint) {
System.out.println(" ^");
for (maxYAxisPoint = 20; maxYAxisPoint >= 0; maxYAxisPoint--) {
if ( (maxYAxisPoint % 5) == 0) {
System.out.println(maxYAxisPoint + "+");
for (leftLowPoint = (maxYAxisPoint - height) + 1;
leftLowPoint <= yCoodinate; leftLowPoint--) {
System.out.println("+");
//Draw the x-axis
for (maxXAxisPoint = 0; maxXAxisPoint <= 40; maxXAxisPoint++) {
System.out.print("+____");
System.out.println("+>");
for (maxXAxisPoint = 0; maxXAxisPoint <= 40; maxXAxisPoint++) {
System.out.print(maxXAxisPoint + " ");
} else {
System.out.print(" | \n" + " |\n" + " |\n" + " |");
} else {
System.out.print("You entered a wrong x-y coordinate of the rectangle,\n the rectangle is not in the labelled grid.");
System.out.print("Upper Left(" + xCoodinate + "," + yCoodinate + ")");
System.out.print("width:" + width);
System.out.println("height: " + height);
}You have nested your loops. I'm pretty sure you don't want to do this. Here's an example of the difference. First a nested looppublic class Test2 {
public static void main(String[] args) {
for (int i=0; i<3; i++) {
System.out.println("i="+i);
for (int j=0; j<4; j++) {
System.out.println(" j="+j);
Outputs this
i=0
j=0
j=1
j=2
j=3
i=1
j=0
j=1
j=2
j=3
i=2
j=0
j=1
j=2
j=3Now an unnested looppublic class Test2 {
public static void main(String[] args) {
for (int i=0; i<3; i++) {
System.out.println("i="+i);
for (int j=0; j<4; j++) {
System.out.println(" j="+j);
outputs this
i=0
i=1
i=2
j=0
j=1
j=2
j=3This means you are printing the x-axis for every point on the graph. -
Very neat algorithm for noise reduction for high ISO
I thought of this algorithm for the suppression of parasitic points occurring at high ISO
ISO 6400
before
http://i053.radikal.ru/1009/26/ba1c56f4837b.jpg
after
http://s56.radikal.ru/i153/1009/73/ffcdcd185821.jpg
Operation for photoshop, but for the Russian version and the English version must rename the layers ...
http://rapidshare.com/files/417172652/Noise15.atn
P.S.
Maybe it will help you to further improve noise reduction algorithmsHi travojed !
Thank you for your message
I came to the conclusion that the high level "Median" (or "Dust&Scratches") destroys parts in this algorithm.
And it seemed to me that the best result (when the contours remain sharp) will be if, instead of a "median" using the Topaz Denoize (Raw-moderate), because Topaz protects the sharp contours in this algorithm.
Example (at full resolution - copy the address into a separate window)
(RAW 6400)
before
http://s57.radikal.ru/i157/1009/73/ec1fbac57a83.jpg
after
http://s43.radikal.ru/i101/1009/fd/c30219adfc74.jpg
P.S.
I do not recommend using a constant value "Threshold" because at different values of the ISO get different noises
travojed If you give me your example of a noisy image, I can see how best to remove the noise -
Handle Event for Characters At Serial Port in an eventstructure
I want to write an event driven application for serial communcation without polling for characters at serial port, instead I want to have an event case in the event structure for this event. Is this possible and how can i do it?
You should be able to execute the example that I posted with an event structure in parallel. I modified the last example so that on thread is waiting for the serial event and then another thread is executing an event structure that just increments a counter. You should be able to increment the counter any time you want and the serial event will complete as soon as a message is read independent of one another.
Unfortunately, I don't know how to (and I am not sure you can) setup an event structure to work with VISA or DAQ events. If you put your VISA Wait on Event inside of your event structure it will hold and prohibit any other events from executing until it is done. However, if any event fires it will block the other
events until it completes. If you uncheck the box under the your event properties you can prevent the front panel from locking. This will at least queue up the events.
I hope this helps out. Attached are some examples.
-Josh
Attachments:
visaRead.vi 42 KB
visaRead2.vi 49 KB
visaRead3.vi 49 KB -
Announce: Generic Algorithms for Java, 0.3 release
The latest release of jga: Generic Algorithms for Java is now available at
http://jga.sf.net/
Included in this release are a collection of algorithms adapted from STL that operate over generic collections and iterations. What's included are the algorithms that do not attempt to modify the collection/iteration that they're given: in other words, all of the find/search/count algorithms. Also included are the complete set of functors and predicates that were present in the last release, with a few modifications for easier use.
The library is released under the LGPL, and includes the source for the library, the test framework, and a non-genericized version of the test framework that verifies that the library may be used without having the generic environment available.A (similar, it seems) parameterized collections library for JSR-14 Java.I had looked at JUtil some time ago, and I'm not sure of the similarity: JUtil looks to provide a number of interesting (if somewhat specialized) collections. JGA provides functors & predicates, and STL-ish algorithms that operate on collections and iterators. Looks to me to be more complimentary than similar.
Mr. Ananian/Astaire's site is also the source of SinjDoc, the javadoc tool that I used to generate the javadoc at jga.sf.net, and with which I replaced the munge4doc.pl and mungedoclist.pl scripts that I had previously used and posted on this forum. -
Discrete PID algorithm for digital final control elements
Is there a Discrete PID algorithm for digital final control element? This is used to turn on one digital output for a positive move and another digital output for a negative move.
Good day APCO, I hope all is well.
I have a couple of questions for you. Are you using LabVIEW? And if you are what version? Also, are you using any toolkits or modules.
I know that there is a Discrete PID VI in the FPGA module. Here is the link to some information about that specific VI.
http://zone.ni.com/reference/en-XX/help/371599A-01/lvfpga/discrete_pid/#details
If you are not using the FPGA module, we have a PID Toolkit that contains a myriad of VIs. Here is the link for the PID Toolkit.
http://www.ni.com/toolkits/lv_pid_control.htm#des
http://www.ni.com/pdf/manuals/322192a.pdf
Please take a look at the information and let me know if you have further questions. Have a great day.
Efosa O. -
Hello All
Can any one inform me on how to find out if a binary file is a text file or a try binary. There is a class that reads all files as binary (both text and binary). I need to be able to distinguish at run-time whether the file is text (i.e. .txt, .rtf, .sql files are considered text) and binary
ThanksYou can have some heuristics, both on octet value distribution and also some unicode byte-order marks (see the XML spec for some algorithms for guessing different text encodings). For RTF and SQL you also have definite grammars they must obey. But you won't ever get a 100% accurate test.
Pete
Maybe you are looking for
-
Hide the database connection window when load a report in a viewer control
When I load a report in viewer and the datasource is empty always appears a window for connect to database. How I can hide ALWAYS that window. Is possible? I did see some ways for do it, at before versions of CR, but seems don´t works in last version
-
Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them
-
HT201493 What determines the notify button activation?
I know the location of two friends but I can be notified when one of them moves but not the other one!
-
Creating a document & making it accessable on the web using a link.
There is an issue I want to address to the forum. I don't want to clutter up my posted topic with an entire page of information that is rellevent to my topic. How can I create a document that other Apple Discussion members can view it using a link? W
-
Firefox nightly doesn't use any file associations on downloaded files
I am using Firefox 8.0a with Gnome 3 and Shell. Chromium will open any downloaded files with the correct applications, but Firefox always asks me to locate an application to open a file with. Rather than searching through for all the correct binaries