Converting Return of QueryDB into StringArray ?!
Hi fellow sufferers,
I do want to split a SQL DB Query Return (something like
“12345;45678;abcde;998765″) into a string array containing those X
parameters delimited by a “;”.
I run the QueryDB Activity returning a published data a full line as a string separated by “;”…. this works perfectly.
Afterwards I execute a Run .NET Script Activity containing the following PS Code:
$Var={Full line as a string with fields separated by “;” … from QueryDB Activity}
$NewVar=$Var.Split(“;”)
$Fr1=$NewVar[0]
$Fr2=$NewVar[1]
Everytime I run this runbook the .net activity stops with an error
saying “abcde” is not a recognized cmdlet, function, trigger — wtf am I
doing wrong, why do SCORCH think that it should treat $newVar[1] e,.g.
as a cmdlet ??!
Any help is really appreciated…thanks in advance.
Markus
Hi Markus,
to your initial question: You have to quote the Published Data {Full line as string with fields separated by ";" … from QueryDB Activity}:
NOT: $Var = {Full line as string with fields separated by ";" … from QueryDB Activity}
BUT: $Var = '{Full line as string with fields separated by ";" … from QueryDB Activity}'
One remark: You need no separate Activity to split the {Full line as string with fields separated by ";" … from QueryDB Activity}. You can use the Field-Function (http://technet.microsoft.com/en-us/library/hh440537.aspx)
inside the following Activities:
[Field('{Full line as string with fields separated by ";" … from QueryDB Activity}',1)] from your example will result 12345.
[Field('{Full line as string with fields separated by ";" … from QueryDB Activity}',3)] from will result abcde.
Regards,
Stefan
www.sc-orchestrator.eu ,
Blog sc-orchestrator.eu
Similar Messages
-
Converting a binary string into a JPEG image in Crystal Reports 2008
Hi Gang
Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
I have JPEG images stored in ECC. ECC stores the data in binary format.
Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data. This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data. Each line contains a maximum of 1,024 characters.
When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table. (in my case, 19 lines are displayed.)
I created a formula to collect all the data into a single string.
whileprintingrecords;
stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
I added the formula to the detail section and itu2019s doing a great job collecting the data.
I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
whileprintingrecords;
stringvar data:=data;
data
My clever idea turned out to be a disappointment . . . . my picture object is blank.
Does anyone have a solution for converting a binary string into a JPEG image?Save the JPEG in a format CR supports. Refer to the help file for the file types.
-
How to convert an Application Service into a Web Service
Hi,
I am working on SAP Netweaver CE 7.1. I have created an Application Service which returns an output as a List with each elemnt of the list conatining some attributes and a List.
now I want to convert this AS into a Web Service. how I can do that as teh Developer Studio doesn't allow me to select the method which returns the List.
Also how should I deploy the Web Service and test the same.
Please reply ASAP.
ManishTo convert your Application Service into a Web Service ,
1) go to General Tab of your Application Service
2) check the option Remote Enabled Service , Save Metadata
3) Right click Application Service and select WebService New , give name for your Webservice and select Default Configuration type : Simple SOAP or select Basic Auth SOAP if u want your webservice to be password protected , just click next and finally finish
4) Genearte your project code , build and deploy your application
5) Then goto webService navigator to test your Web service
Hope this helps
Thanks
Asif -
How to bridge (fill) gaps when converting a 2006 geometry into a 2002 geometry
Is it at all possible to bridge (fill) gaps when converting a 2006 geometry into a single 2002 geometry. I have a solution for the conversion from 2006 to 2002 provided by BHall but upon further investigation investigation of my dataset some of the multi line polygons have gaps which I need to fill and I am not sure how to go about this.
Here is a simple example of what I am trying to achieve
Before
SELECT (sdo_geometry(2006, 81989, NULL,
mdsys.sdo_elem_info_array(1,2,1,5,2,1,9,2,1,13,2,1),
mdsys.sdo_ordinate_array(16,0.999,16.998,-0.001,17.253,-0.001,18.003,0.999,18.003,0.999,19.001,0.999,19.001,0.999,19.999,-0.001)))
FROM dual
After
SELECT (sdo_geometry(2006, 81989,NULL,
mdsys.sdo_elem_info_array(1,2,1),
mdsys.sdo_ordinate_array(16,0.999,17.253,-0.001,18.003,0.999,19.001,0.999,19.999,-0.001))) FROM dual
Thanks in advanceOkay Roché,
You might need to break this problem down into smaller parts for the forum. All your examples show the gap being replaced by a single vertice - e.g. you want to "snap" the gap together. I'd suggest this is just complicating your question. Once the gap is filled (with a line) then you can run SDO_UTIL.REMOVE_DUPLICATE_VERTICES afterwards to remove the new line if its below your tolerance. I think that Bryan's code wrapped in remove duplicate vertices will solve your second scenario. But overall I think it would be helpful to focus just on the filling and leave the snapping for a follow-up question.
So back to scenario #1, below is some code I wrote a while back that might do what you want or at least get you started. Note that the input must be a multistring and the multistring cannot be "spaghetti". In other words each line in the multistring must be disjoint or at most touch other lines only at endpoints. The goal is to sift through the lines and create a single linestring using the smallest gaps. It's not subtle and will indeed produce bad geometries if the inputs are setup in an impossible manner. There are also some rare geodetic bugs with SDO_GEOM.RELATE that crop up. So you'll note I test both distance and relate in some places. That's intentional though kind of dumb.
Hopefully this helps. If you improve the code please shoot a copy back to me.
Cheers,
Paul
CREATE OR REPLACE PACKAGE dz_gap_fill
AUTHID CURRENT_USER
AS
FUNCTION linear_gap_filler(
p_input IN MDSYS.SDO_GEOMETRY
,p_tolerance IN NUMBER DEFAULT 0.05
) RETURN MDSYS.SDO_GEOMETRY;
END dz_gap_fill;
CREATE OR REPLACE PACKAGE BODY dz_gap_fill
AS
FUNCTION fast_point(
p_x IN NUMBER
,p_y IN NUMBER
,p_z IN NUMBER DEFAULT NULL
,p_m IN NUMBER DEFAULT NULL
,p_srid IN NUMBER DEFAULT 8265
) RETURN MDSYS.SDO_GEOMETRY
AS
BEGIN
-- Step 10
-- Check over incoming parameters
IF p_x IS NULL
OR p_y IS NULL
THEN
RAISE_APPLICATION_ERROR(-20001,'x and y cannot be NULL');
END IF;
-- Step 20
-- Do the simplest solution first
IF p_z IS NULL
AND p_m IS NULL
THEN
RETURN SDO_GEOMETRY(
2001
,p_srid
,SDO_POINT_TYPE(
p_x
,p_y
,NULL
,NULL
,NULL
END IF;
-- Step 30
-- Do the other wilder choices
IF p_z IS NULL
AND p_m IS NOT NULL
THEN
RETURN SDO_GEOMETRY(
3301
,p_srid
,SDO_POINT_TYPE(
p_x
,p_y
,p_m
,NULL
,NULL
ELSIF p_z IS NOT NULL
AND p_m IS NULL
THEN
RETURN SDO_GEOMETRY(
3001
,p_srid
,SDO_POINT_TYPE(
p_x
,p_y
,p_z
,NULL
,NULL
ELSIF p_z IS NOT NULL
AND p_m IS NOT NULL
THEN
RETURN SDO_GEOMETRY(
4401
,p_srid
,NULL
,SDO_ELEM_INFO_ARRAY(1,1,1)
,SDO_ORDINATE_ARRAY(p_x,p_y,p_z,p_m)
ELSE
RAISE_APPLICATION_ERROR(-20001,'ERR!');
END IF;
END fast_point;
FUNCTION get_start_point(
p_input IN MDSYS.SDO_GEOMETRY
) RETURN MDSYS.SDO_GEOMETRY
AS
int_dims PLS_INTEGER;
int_gtyp PLS_INTEGER;
int_lrs PLS_INTEGER;
BEGIN
-- Step 10
-- Check over incoming parameters
IF p_input IS NULL
THEN
RETURN NULL;
END IF;
-- Step 20
-- Gather information about the geometry
int_dims := p_input.get_dims();
int_gtyp := p_input.get_gtype();
int_lrs := p_input.get_lrs_dim();
-- Step 30
-- Handle point and multipoint inputs
IF int_gtyp = 1
THEN
RETURN p_input;
ELSIF int_gtyp = 5
THEN
RETURN SDO_UTIL.EXTRACT(p_input,1);
END IF;
-- Step 40
-- Return results
IF int_dims = 2
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(1)
,p_input.SDO_ORDINATES(2)
,NULL
,NULL
,p_input.SDO_SRID
ELSIF int_dims = 3
AND int_lrs = 3
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(1)
,p_input.SDO_ORDINATES(2)
,NULL
,p_input.SDO_ORDINATES(3)
,p_input.SDO_SRID
ELSIF int_dims = 3
AND int_lrs = 0
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(1)
,p_input.SDO_ORDINATES(2)
,p_input.SDO_ORDINATES(3)
,NULL
,p_input.SDO_SRID
ELSIF int_dims = 4
AND int_lrs IN (4,0)
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(1)
,p_input.SDO_ORDINATES(2)
,p_input.SDO_ORDINATES(3)
,p_input.SDO_ORDINATES(4)
,p_input.SDO_SRID
ELSIF int_dims = 4
AND int_lrs = 3
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(1)
,p_input.SDO_ORDINATES(2)
,p_input.SDO_ORDINATES(4)
,p_input.SDO_ORDINATES(3)
,p_input.SDO_SRID
ELSE
RAISE_APPLICATION_ERROR(-20001,'ERR!');
END IF;
END get_start_point;
FUNCTION get_end_point(
p_input IN MDSYS.SDO_GEOMETRY
) RETURN MDSYS.SDO_GEOMETRY
AS
int_dims PLS_INTEGER;
int_gtyp PLS_INTEGER;
int_lrs PLS_INTEGER;
int_len PLS_INTEGER;
BEGIN
-- Step 10
-- Check over incoming parameters
IF p_input IS NULL
THEN
RETURN NULL;
END IF;
-- Step 20
-- Gather information about the geometry
int_dims := p_input.get_dims();
int_gtyp := p_input.get_gtype();
int_lrs := p_input.get_lrs_dim();
int_len := p_input.SDO_ORDINATES.COUNT();
-- Step 30
-- Handle point and multipoint inputs
IF int_gtyp = 1
THEN
RETURN p_input;
ELSIF int_gtyp = 5
THEN
RETURN SDO_UTIL.EXTRACT(
p_input
,SDO_UTIL.GETNUMELEM(p_input)
END IF;
-- Step 40
-- Return results
IF int_dims = 2
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(int_len - 1)
,p_input.SDO_ORDINATES(int_len)
,NULL
,NULL
,p_input.SDO_SRID
ELSIF int_dims = 3
AND int_lrs = 3
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(int_len - 2)
,p_input.SDO_ORDINATES(int_len - 1)
,NULL
,p_input.SDO_ORDINATES(int_len)
,p_input.SDO_SRID
ELSIF int_dims = 3
AND int_lrs = 0
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(int_len - 2)
,p_input.SDO_ORDINATES(int_len - 1)
,p_input.SDO_ORDINATES(int_len)
,NULL
,p_input.SDO_SRID
ELSIF int_dims = 4
AND int_lrs IN (4,0)
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(int_len - 3)
,p_input.SDO_ORDINATES(int_len - 2)
,p_input.SDO_ORDINATES(int_len - 1)
,p_input.SDO_ORDINATES(int_len)
,p_input.SDO_SRID
ELSIF int_dims = 4
AND int_lrs = 3
THEN
RETURN fast_point(
p_input.SDO_ORDINATES(int_len - 3)
,p_input.SDO_ORDINATES(int_len - 2)
,p_input.SDO_ORDINATES(int_len)
,p_input.SDO_ORDINATES(int_len - 1)
,p_input.SDO_SRID
ELSE
RAISE_APPLICATION_ERROR(-20001,'ERR!');
END IF;
END get_end_point;
FUNCTION is_spaghetti(
p_input IN MDSYS.SDO_GEOMETRY
,p_tolerance IN NUMBER DEFAULT 0.05
) RETURN VARCHAR2
AS
num_tolerance NUMBER := p_tolerance;
ary_strings MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
ary_starts MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
ary_ends MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
int_count PLS_INTEGER;
ary_start_count MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();
ary_end_count MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();
ary_inside_count MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();
BEGIN
-- Step 10
-- Check over incoming parameters
IF p_input IS NULL
THEN
RETURN NULL;
ELSIF p_input.get_gtype = 2
THEN
RETURN 'FALSE';
ELSIF p_input.get_gtype <> 6
THEN
RAISE_APPLICATION_ERROR(-20001,'input gtype must be 2 or 6');
END IF;
IF num_tolerance IS NULL
THEN
num_tolerance := 0.05;
END IF;
-- Step 20
-- Break multistring into single linestrings with nodes
int_count := SDO_UTIL.GETNUMELEM(p_input);
ary_strings.EXTEND(int_count);
ary_starts.EXTEND(int_count);
ary_ends.EXTEND(int_count);
ary_start_count.EXTEND(int_count);
ary_end_count.EXTEND(int_count);
ary_inside_count.EXTEND(int_count);
FOR i IN 1 .. int_count
LOOP
ary_strings(i) := SDO_UTIL.EXTRACT(p_input,i);
ary_starts(i) := get_start_point(ary_strings(i));
ary_ends(i) := get_end_point(ary_strings(i));
END LOOP;
-- Step 30
-- Loop through and count the nodes connections
FOR i IN 1 .. int_count
LOOP
ary_start_count(i) := 0;
ary_end_count(i) := 0;
ary_inside_count(i) := 0;
FOR j IN 1 .. int_count
LOOP
IF i != j
THEN
IF SDO_GEOM.RELATE(
ary_starts(i),
'DETERMINE',
ary_strings(j),
num_tolerance
) IN ('TOUCH','CONTAINS','COVERS','ON')
THEN
ary_start_count(i) := ary_start_count(i) + 1;
ELSIF SDO_GEOM.RELATE(
ary_ends(i),
'DETERMINE',
ary_strings(j),
num_tolerance
) IN ('TOUCH','CONTAINS','COVERS','ON')
THEN
ary_end_count(i) := ary_end_count(i) + 1;
ELSIF SDO_GEOM.RELATE(
ary_strings(i),
'DETERMINE',
ary_strings(j),
num_tolerance
) IN ('TOUCH','CONTAINS','COVERS','OVERLAPBYINTERSECT')
THEN
ary_inside_count(i) := ary_inside_count(i) + 1;
END IF;
END IF;
END LOOP;
IF ary_start_count(i) > 1
OR ary_end_count(i) > 1
OR ary_inside_count(i) > 0
THEN
RETURN 'TRUE';
END IF;
END LOOP;
RETURN 'FALSE';
END is_spaghetti;
FUNCTION points2segment(
p_point_one IN MDSYS.SDO_POINT_TYPE
,p_point_two IN MDSYS.SDO_POINT_TYPE
,p_srid IN NUMBER
) RETURN MDSYS.SDO_GEOMETRY
AS
BEGIN
IF ( p_point_one.Z IS NULL AND p_point_two.Z IS NOT NULL )
OR ( p_point_one.Z IS NOT NULL AND p_point_two.Z IS NULL )
THEN
RAISE_APPLICATION_ERROR(
-20001,
'both points must have the same number of dimensions, point_one Z is ' ||
NVL(TO_CHAR(p_point_one.Z),'') ||
' and point_two Z is ' ||
NVL(TO_CHAR(p_point_two.Z),'')
END IF;
IF p_point_one.Z IS NULL
THEN
RETURN SDO_GEOMETRY(
2002
,p_srid
,NULL
,SDO_ELEM_INFO_ARRAY(1,2,1)
,SDO_ORDINATE_ARRAY(p_point_one.X,p_point_one.Y,p_point_two.X,p_point_two.Y)
ELSE
RETURN SDO_GEOMETRY(
3002
,p_srid
,NULL
,SDO_ELEM_INFO_ARRAY(1,2,1)
,SDO_ORDINATE_ARRAY(p_point_one.X,p_point_one.Y,p_point_one.Z,p_point_two.X,p_point_two.Y,p_point_two.Z)
END IF;
END points2segment;
FUNCTION points2segment(
p_point_one IN MDSYS.SDO_GEOMETRY
,p_point_two IN MDSYS.SDO_GEOMETRY
) RETURN MDSYS.SDO_GEOMETRY
AS
int_gtype1 PLS_INTEGER;
int_dims1 PLS_INTEGER;
int_gtype2 PLS_INTEGER;
int_dims2 PLS_INTEGER;
point_one MDSYS.SDO_POINT_TYPE;
point_two MDSYS.SDO_POINT_TYPE;
BEGIN
int_gtype1 := p_point_one.get_gtype();
int_dims1 := p_point_one.get_dims();
int_gtype2 := p_point_two.get_gtype();
int_dims2 := p_point_two.get_dims();
IF int_gtype1 = 1
AND int_gtype2 = 1
AND int_dims1 = int_dims2
AND p_point_one.SDO_SRID = p_point_two.SDO_SRID
THEN
NULL; -- Good
ELSE
RAISE_APPLICATION_ERROR(
-20001
,'both point objects must be points and have the same number of dimensions and SRIDs'
END IF;
IF int_dims1 = 4
THEN
RETURN SDO_GEOMETRY(
4402
,p_point_one.SDO_SRID
,NULL
,SDO_ELEM_INFO_ARRAY(1,2,1)
,SDO_ORDINATE_ARRAY(
p_point_one.SDO_ORDINATES(1)
,p_point_one.SDO_ORDINATES(2)
,p_point_one.SDO_ORDINATES(3)
,p_point_one.SDO_ORDINATES(4)
,p_point_two.SDO_ORDINATES(1)
,p_point_two.SDO_ORDINATES(2)
,p_point_two.SDO_ORDINATES(3)
,p_point_two.SDO_ORDINATES(4)
ELSE
-- Use the sdo_point_type method for the rest
IF p_point_one.SDO_POINT IS NOT NULL
THEN
point_one := p_point_one.SDO_POINT;
ELSE
IF int_dims1 = 3
THEN
point_one := SDO_POINT_TYPE(
p_point_one.SDO_ORDINATES(1)
,p_point_one.SDO_ORDINATES(2)
,p_point_one.SDO_ORDINATES(3)
ELSE
point_one := SDO_POINT_TYPE(
p_point_one.SDO_ORDINATES(1)
,p_point_one.SDO_ORDINATES(2)
,NULL
END IF;
END IF;
IF p_point_two.SDO_POINT IS NOT NULL
THEN
point_two := p_point_two.SDO_POINT;
ELSE
IF int_dims1 = 3
THEN
point_two := SDO_POINT_TYPE(
p_point_two.SDO_ORDINATES(1)
,p_point_two.SDO_ORDINATES(2)
,p_point_two.SDO_ORDINATES(3)
ELSE
point_two := SDO_POINT_TYPE(
p_point_two.SDO_ORDINATES(1)
,p_point_two.SDO_ORDINATES(2)
,NULL
END IF;
END IF;
RETURN points2segment(
p_point_one => point_one
,p_point_two => point_two
,p_srid => p_point_one.SDO_SRID
END IF;
END points2segment;
FUNCTION linear_gap_filler(
p_input IN MDSYS.SDO_GEOMETRY
,p_tolerance IN NUMBER DEFAULT 0.05
) RETURN MDSYS.SDO_GEOMETRY
AS
sdo_input MDSYS.SDO_GEOMETRY := p_input;
num_tolerance NUMBER;
int_counter PLS_INTEGER;
ary_edges MDSYS.SDO_GEOMETRY_ARRAY;
ary_starts MDSYS.SDO_GEOMETRY_ARRAY;
ary_ends MDSYS.SDO_GEOMETRY_ARRAY;
ary_nearest MDSYS.SDO_NUMBER_ARRAY;
ary_distance MDSYS.SDO_NUMBER_ARRAY;
num_temp NUMBER;
num_nearest NUMBER;
int_winner PLS_INTEGER;
int_winner2 PLS_INTEGER;
sdo_point1 MDSYS.SDO_GEOMETRY;
sdo_point2 MDSYS.SDO_GEOMETRY;
boo_done BOOLEAN;
num_one NUMBER;
num_two NUMBER;
int_looper PLS_INTEGER := 1;
BEGIN
-- Step 10
-- Check over incoming parameters
IF num_tolerance IS NULL
THEN
num_tolerance := 0.05;
END IF;
IF sdo_input IS NULL
OR sdo_input.get_gtype() <> 6
THEN
RETURN sdo_input;
END IF;
IF is_spaghetti(sdo_input,p_tolerance) = 'TRUE'
THEN
RETURN sdo_input;
END IF;
<> ary_edges := MDSYS.SDO_GEOMETRY_ARRAY();
ary_starts := MDSYS.SDO_GEOMETRY_ARRAY();
ary_ends := MDSYS.SDO_GEOMETRY_ARRAY();
ary_nearest := MDSYS.SDO_NUMBER_ARRAY();
ary_distance := MDSYS.SDO_NUMBER_ARRAY();
-- Step 20
-- Break multistring into edges and start and end nodes
int_counter := SDO_UTIL.GETNUMELEM(sdo_input);
ary_edges.EXTEND(int_counter);
ary_starts.EXTEND(int_counter);
ary_ends.EXTEND(int_counter);
FOR i IN 1 .. int_counter
LOOP
ary_edges(i) := SDO_UTIL.EXTRACT(sdo_input,i);
ary_starts(i) := get_start_point(ary_edges(i));
ary_ends(i) := get_end_point(ary_edges(i));
END LOOP;
-- Step 30
-- Determine the closest endpoints
ary_nearest.EXTEND(int_counter);
ary_distance.EXTEND(int_counter);
FOR i IN 1 .. int_counter
LOOP
num_nearest := NULL;
int_winner := NULL;
FOR j IN 1 .. int_counter
LOOP
IF j != i
THEN
num_temp := SDO_GEOM.SDO_DISTANCE(
ary_edges(i)
,ary_edges(j)
,num_tolerance
IF num_nearest IS NULL
OR num_temp < num_nearest
THEN
num_nearest := num_temp;
int_winner := j;
END IF;
END IF;
END LOOP;
ary_nearest(i) := int_winner;
ary_distance(i) := num_nearest;
END LOOP;
-- Step 40
-- Find the smallest gap
int_winner := NULL;
num_nearest := NULL;
FOR i IN 1 .. int_counter
LOOP
IF num_nearest IS NULL
OR ary_distance(i) < num_nearest
THEN
int_winner := i;
num_nearest := ary_distance(i);
int_winner2 := ary_nearest(i);
END IF;
END LOOP;
-- Step 50
-- Determine the endpoints to connect
num_one := SDO_GEOM.SDO_DISTANCE(
get_start_point(ary_edges(int_winner)),
ary_edges(int_winner2),
num_tolerance
num_two := SDO_GEOM.SDO_DISTANCE(
get_end_point(ary_edges(int_winner)),
ary_edges(int_winner2),
num_tolerance
IF ( num_one = 0 AND SDO_GEOM.RELATE(
get_start_point(ary_edges(int_winner)),
'ANYINTERACT',
ary_edges(int_winner2),
num_tolerance
) = 'TRUE' )
OR ( num_two = 0 AND SDO_GEOM.RELATE(
get_end_point(ary_edges(int_winner)),
'ANYINTERACT',
ary_edges(int_winner2),
num_tolerance
) = 'TRUE' )
THEN
sdo_point1 := NULL;
ELSIF num_one < num_two
THEN
sdo_point1 := get_start_point(ary_edges(int_winner));
ELSE
sdo_point1 := get_end_point(ary_edges(int_winner));
END IF;
num_one := SDO_GEOM.SDO_DISTANCE(
get_start_point(ary_edges(int_winner2)),
ary_edges(int_winner),
num_tolerance
num_two := SDO_GEOM.SDO_DISTANCE(
get_end_point(ary_edges(int_winner2)),
ary_edges(int_winner),
num_tolerance
IF ( num_one = 0 AND SDO_GEOM.RELATE(
get_start_point(ary_edges(int_winner2)),
'ANYINTERACT',
ary_edges(int_winner),
num_tolerance
) = 'TRUE' )
OR ( num_two = 0 AND SDO_GEOM.RELATE(
get_end_point(ary_edges(int_winner2)),
'ANYINTERACT',
ary_edges(int_winner),
num_tolerance
) = 'TRUE' )
THEN
sdo_point2 := NULL;
ELSIF num_one < num_two
THEN
sdo_point2 := get_start_point(ary_edges(int_winner2));
ELSE
sdo_point2 := get_end_point(ary_edges(int_winner2));
END IF;
-- Step 50
-- Smash together
IF sdo_point1 IS NULL
OR sdo_point2 IS NULL
THEN
sdo_input := SDO_UTIL.CONCAT_LINES(
ary_edges(int_winner),
ary_edges(int_winner2)
ELSE
sdo_input := SDO_UTIL.CONCAT_LINES(
SDO_UTIL.CONCAT_LINES(
ary_edges(int_winner),
points2segment(sdo_point1,sdo_point2)
ary_edges(int_winner2)
END IF;
boo_done := TRUE;
FOR i IN 1 .. int_counter
LOOP
IF i NOT IN (int_winner,int_winner2)
THEN
sdo_input := SDO_UTIL.APPEND(sdo_input,ary_edges(i));
boo_done := FALSE;
END IF;
END LOOP;
-- Step 60
-- Check if valid if returning
IF sdo_input.get_gtype() = 2
OR boo_done = TRUE
THEN
RETURN sdo_input;
END IF;
int_looper := int_looper + 1;
GOTO TOP_OF_IT;
END linear_gap_filler;
END dz_gap_fill; -
i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.
function(){return A.apply(null,[this].concat($A(arguments)))}
hope1hope2 wrote:
i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.
It's very unlikely that you'l
l find any help here; this forum is used only
for testing purposes. Unfortunately, I cannot suggest
another forum
Extra line breaks kindly supplied by the software. -
Converting latitude and longitude into UTM coordinates
hi
can anybody help me to convert latitude and longitude into UTM coordinates
maybe someone have a program
thanksdo you searched the internet for that?
My quick search return this link:
http://www.uwgb.edu/dutchs/usefuldata/utmformulas.htm
In this, you can find also a spreadsheet that may help more.
See if it's good for you
Software developer
www.mcm-electronics.com
PS: Don't forget to rate a good anwser ; )
Currently using Labview 2011
PORTUGAL -
How to convert a jpeg file into a 1-bit bmp file (2 colors image)
Hi. I�m having serious problems to convert a jpeg file into a 1-bit bmp file (2 colors image).
I�m using FileSaver.saveAsBmp(String t) but what i get is a bmp image, but with 16M colors, but what i want is a 2 colors bmp file. A black and white image.
Does anybody know how to do this? I�m really getting crazy with ths problem.
Thanks in advanceHi opalo,
this code may help you...
import java.awt.*;
import java.io.*;
import java.awt.image.*;
import javax.imageio.ImageIO;
class Write1 extends Component {
//--- Private constants
private final static int BITMAPFILEHEADER_SIZE = 14;
private final static int BITMAPINFOHEADER_SIZE = 40;
//--- Private variable declaration
//--- Bitmap file header
private byte bitmapFileHeader [] = new byte [14];
private byte bfType [] = {'B', 'M'};
private int bfSize = 0;
private int bfReserved1 = 0;
private int bfReserved2 = 0;
private int bfOffBits = BITMAPFILEHEADER_SIZE + BITMAPINFOHEADER_SIZE;
//--- Bitmap info header
private byte bitmapInfoHeader [] = new byte [40];
private int biSize = BITMAPINFOHEADER_SIZE;
private int biWidth = 50;
private int biHeight = 70;
private int biPlanes = 1;
//private int biBitCount = 24;
private int biBitCount = 1;
private int biCompression = 0;
private int biSizeImage = 0x030000;
private int biXPelsPerMeter = 0x0;
private int biYPelsPerMeter = 0x0;
private int biClrUsed = 0;
private int biClrImportant = 0;
//--- Bitmap raw data
private int bitmap [];
//--- File section
private FileOutputStream fo;
//--- Default constructor
public Write1() {
public void saveBitmap (String parFilename, Image parImage, int
parWidth, int parHeight) {
try {
fo = new FileOutputStream (parFilename);
save (parImage, parWidth, parHeight);
fo.close ();
catch (Exception saveEx) {
saveEx.printStackTrace ();
* The saveMethod is the main method of the process. This method
* will call the convertImage method to convert the memory image to
* a byte array; method writeBitmapFileHeader creates and writes
* the bitmap file header; writeBitmapInfoHeader creates the
* information header; and writeBitmap writes the image.
private void save (Image parImage, int parWidth, int parHeight) {
try {
convertImage (parImage, parWidth, parHeight);
writeBitmapFileHeader ();
writeBitmapInfoHeader ();
writeBitmap ();
catch (Exception saveEx) {
saveEx.printStackTrace ();
* convertImage converts the memory image to the bitmap format (BRG).
* It also computes some information for the bitmap info header.
private boolean convertImage (Image parImage, int parWidth, int parHeight) {
int pad;
bitmap = new int [parWidth * parHeight];
PixelGrabber pg = new PixelGrabber (parImage, 0, 0, parWidth, parHeight,
bitmap, 0, parWidth);
try {
pg.grabPixels ();
catch (InterruptedException e) {
e.printStackTrace ();
return (false);
pad = (4 - ((parWidth * 3) % 4)) * parHeight;
biSizeImage = ((parWidth * parHeight) * 3) + pad;
bfSize = biSizeImage + BITMAPFILEHEADER_SIZE +
BITMAPINFOHEADER_SIZE;
biWidth = parWidth;
biHeight = parHeight;
return (true);
* writeBitmap converts the image returned from the pixel grabber to
* the format required. Remember: scan lines are inverted in
* a bitmap file!
* Each scan line must be padded to an even 4-byte boundary.
private void writeBitmap () {
int size;
int value;
int j;
int i;
int rowCount;
int rowIndex;
int lastRowIndex;
int pad;
int padCount;
byte rgb [] = new byte [3];
size = (biWidth * biHeight) - 1;
pad = 4 - ((biWidth * 3) % 4);
if (pad == 4) // <==== Bug correction
pad = 0; // <==== Bug correction
rowCount = 1;
padCount = 0;
rowIndex = size - biWidth;
lastRowIndex = rowIndex;
try {
for (j = 0; j < size; j++) {
value = bitmap [rowIndex];
rgb [0] = (byte) (value & 0xFF);
rgb [1] = (byte) ((value >> 8) & 0xFF);
rgb [2] = (byte) ((value >> 16) & 0xFF);
fo.write (rgb);
if (rowCount == biWidth) {
padCount += pad;
for (i = 1; i <= pad; i++) {
fo.write (0x00);
int b = 1200;
fo.write(b);
rowCount = 1;
rowIndex = lastRowIndex - biWidth;
lastRowIndex = rowIndex;
else
rowCount++;
rowIndex++;
//--- Update the size of the file
bfSize += padCount - pad;
biSizeImage += padCount - pad;
catch (Exception wb) {
wb.printStackTrace ();
* writeBitmapFileHeader writes the bitmap file header to the file.
private void writeBitmapFileHeader () {
try {
fo.write (bfType);
fo.write (intToDWord (bfSize));
fo.write (intToWord (bfReserved1));
fo.write (intToWord (bfReserved2));
fo.write (intToDWord (bfOffBits));
catch (Exception wbfh) {
wbfh.printStackTrace ();
* writeBitmapInfoHeader writes the bitmap information header
* to the file.
private void writeBitmapInfoHeader () {
try {
fo.write (intToDWord (biSize));
fo.write (intToDWord (biWidth));
fo.write (intToDWord (biHeight));
fo.write (intToWord (biPlanes));
fo.write (intToWord (biBitCount));
fo.write (intToDWord (biCompression));
fo.write (intToDWord (biSizeImage));
fo.write (intToDWord (biXPelsPerMeter));
fo.write (intToDWord (biYPelsPerMeter));
fo.write (intToDWord (biClrUsed));
fo.write (intToDWord (biClrImportant));
// DataOutputStream temp = new DataOutputStream(fo);
// int m = 32;
// temp.writeInt(m);
catch (Exception wbih) {
wbih.printStackTrace ();
* intToWord converts an int to a word, where the return
* value is stored in a 2-byte array.
private byte [] intToWord (int parValue) {
byte retValue [] = new byte [2];
retValue [0] = (byte) (parValue & 0x00FF);
retValue [1] = (byte) ((parValue >> 8) & 0x00FF);
return (retValue);
* intToDWord converts an int to a double word, where the return
* value is stored in a 4-byte array.
private byte [] intToDWord (int parValue) {
byte retValue [] = new byte [4];
retValue [0] = (byte) (parValue & 0x00FF);
retValue [1] = (byte) ((parValue >> 8) & 0x000000FF);
retValue [2] = (byte) ((parValue >> 16) & 0x000000FF);
retValue [3] = (byte) ((parValue >> 24) & 0x000000FF);
return (retValue);
class Writebmp
public static void main(String args[])
//Image img = Toolkit.getDefaultToolkit().getImage("jatin.bmp");
try
File filename = new File("jatin_test.bmp");
BufferedImage image = ImageIO.read(filename);
Graphics graphics = image.getGraphics();
graphics.drawString("उजगर",10,30);
Write1 w = new Write1();
Image img = Toolkit.getDefaultToolkit().getImage("jatin_test.bmp");
w.saveBitmap("jatin_test.bmp",img,200,200);
catch (IOException e)
System.err.println ("Unable to write to file");
System.exit(-1);
} -
How to converting a flash clip into a bmp file quickly
Hi,
I’d like to get help on converting a flash clip into a
bmp file. I have an application developed with ActiveX technology.
There is a flash control embedded in the ActiveX control, which has
a printing button. The end users can press the printing button to
print the flash picture as well as other text content.
I get the flash picture for printing in follow steps:
1.Create a BitmapData object
var bmp:BitmapData = new BitmapData(w, h, false);
2.Obtain the image of current flash
bmp.draw(mc, mc.transform.matrix, new ColorTransform(), 1,
new Rectangle(x, y, w, h));
3.Get pixels of flash image one by one in loop, and save them
into a PixelCollection
bmp.getPixel(col, row);
4.Move the PixelCollection into flash container
fscommand("print", load_PixelCollection);
5.Ocx control gets the PixelCollection and converts it into
BMP format
But I find it is very slow when action script gets pixels one
by one. Getting pixels of a middle size flash may spend one minute.
It is hard for our customer to stand. Does anyone have idea to get
the flash image quickly?
Any help is appreciated.
Shi HangWhat about the built-in print methods, wouldn't it be better
to use those here?
Getting all pixel values is a time intensive process, because
of the amount of pixels. It may be a bit faster if you split the
getPixel() loop over some frames, but I'm not exactly sure how to
do that (just read it somewhere).
If the content is fixed, you could create the pixel array in
the background while the user looks at it. This is quite some
overhead, but when the user decides to print, the array would
already be there.
Finally, not helpful here, but interesting:
quote:
BitmapData.getPixels()
No longer do you have to loop through every pixel in a
bitmap, one at a time with getPixel to send a bitmap to the server.
This method returns a ByteArray containing the hexadecimal color
value of each of the pixels in the specified rectangular region of
a bitmap. Use this method in conjunction with the new ZLib
compression method; ByteArray.compress() to compress and send a
bitmap over the wire to a server so it can be converted into a file
ready for downloading.
(from
http://www.flashguru.co.uk/actionscript-3-new-capabilities/)
This will be available in AS 3.
hth,
blemmo -
Trouble converting a complicated navigation into a library item
I am having trouble converting our main navigation into a
library item. The navigation includes many images, layers and
behaviors. You can see the nav at the top of
http://www.vedanta.org as you
scroll over the main topics just under the banner.
I built the nav from scratch on a new XHTML page and it works
fine. Then I did Edit/Select All and the entire nav was selected.
But when I choose Modify/Library/Add Object to Library, absolutely
nothing happens, nothing appears in the library at all.
Is this navigation too complicated to be saved as a Library
item?
NancyDW is having a little trouble interpreting your GL code. For
example, the
menu is here -
<div id="rkou">
<a onMouseOver="CSAction(new
Array(/*CMP*/'B9B0A14425',/*CMP*/'B9B0A14427',/*CMP*/'B9B0A14429',/*CMP*/'B9B0A14431',/*C MP*/'B9B0A14433',/*CMP*/'B9B0A14435',/*CMP*/'B9B0A14437',/*CMP*/'B9B0A14439',/*CMP*/'B9B0A 14441',/*CMP*/'B9B0A14443',/*CMP*/'B9B0A14445',/*CMP*/'B9B0A14447'));return
true;" href="#"
csover="B9B0A14425,B9B0A14427,B9B0A14429,B9B0A14431,B9B0A14433,B9B0A14435,B9B0A14437,B9B0 A14439,B9B0A14441,B9B0A14443,B9B0A14445,B9B0A14447"><img
src="images/navigation/rkou.gif" alt="" height="18"
width="166"
border="0"></a></div>
DW will be flummoxed trying to put this into a Library item.
Either rebuild the menu in DW, or try this -
copy everything from -
<div id="wivu"> (line286)
through -
<p></p> (line 322)
inclusive, and paste it into a new Library item (FILE | New
> Library item).
Save that file in the Library folder with the *.lbi
extension.
When you insert it into a page, MAKE SURE THAT THE PAGE
ALREADY HAS ALL OF
THE GL CODE IN THIS LINKED PAGE IN THE HEAD.
See if that works.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"eucalyptus1" <[email protected]> wrote in
message
news:[email protected]...
>I am having trouble converting our main navigation into a
library item. The
> navigation includes many images, layers and behaviors.
You can see the nav
> at
> the top of
http://www.vedanta.org as you
scroll over the main topics just
> under
> the banner.
>
> I built the nav from scratch on a new XHTML page and it
works fine. Then
> I
> did Edit/Select All and the entire nav was selected. But
when I choose
> Modify/Library/Add Object to Library, absolutely nothing
happens, nothing
> appears in the library at all.
>
> Is this navigation too complicated to be saved as a
Library item?
> Nancy
> -
Converting a Labview time into a string with Measurement Studio C++
In my Measurement Studio-based C++ application, I'll be sent a Labview
time in the format of a double, which I believe is seconds since 1904.
Does Measurement Studio for Visual C++ contain a function that will
convert that time value into a string format? I'd like to end up with
something like "hh:mm:ss:msec". I'm basically looking for the
equivalent of the Labview vi, "Format Time/Date String". If Measurement
Studio doesn't provide this, is there some other (hopefully simple) way
to do this?
I can request that the Labview application send me time in a string
format as well as a double; this will require several changes to the
Labview application sending the timestamp, but if that is a simpler
solution that's the option we'll take.
Thanks in advance,
AdamMeasurement Studio does not have a function for this, but you can do
this yourself by first converting from LV epoch (1/1/1904) to Unix
epoch(1/1/1970) and then using c runtime time functions
UNIXEpochOffset is the difference between the 2 epochs at GMT. To
convert to a UNIX system clock value, just subtract the sum of this
number and your time zone offset in seconds
lvTime is the value returned by LV timestamp
#define UNIXEpochOffset 2082844800
int _tmain(int argc, _TCHAR* argv[])
__int64 lvTime = 3214396284; //10:48:13.173 AM 11/9/2005
//GMT offset for Central Time is -6 (3600 seconds). You will need to account for daylight savings time.
int offset = -3600;
time_t unixTime = lvTime - UNIXEpochOffset - offset;
struct tm *newtime = localtime(&unixTime);
printf(asctime( newtime )); //prints out the time in a string format.
return 0;
Bilal Durrani
NI -
SharePoint 2013---How to convert current left Navigation into tree view
Hi All,
I want to convert current left navigation into tree view in SharePoint 2013. When we click on Modify Navigation and set headers and links; I need that should be convert into tree view. All headers should be expandable to thier links.
I just want tree view on navigation headers and links. not for all site and subsites which we can enabled from site settings --> Modify All Site settings --> Tree view
Please help me Master Page editing on Navigation Generation.. Thanks in advance!
Regards,
AnnaHi Anna,
If you want to replace the Quick Launch part with the custom treeview web part in master page, you can comment out or remove the quick launch code block "<!--SPM:<SharePoint:SPNavigationManager id="QuickLaunchNavigationManager.....>....<>-->",
then insert the custom web part snippet code in proper location in seattle master page, then all pages inheriting the seattle master page will have this web part.
Note, please back up the master page before customizing the original master page for recovery.
http://msdn.microsoft.com/en-us/library/office/jj862341(v=office.15).aspx
http://www.sharepointpals.com/post/Add-snippets-in-Page-layout-using-design-manager
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
How to convert a .class file into .java file without .jad using DeJDecompil
Hi all,
I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
If I get the .java file without error then I can process the rest of the functionality.
Thanks in advance
With kind Regs
Satheesh.KNot so urgent today then!
http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
I'm still not going to help you to steal someone�s code. -
How can I convert a Java program into a screen saver ?
I want to write a screen saver in Java, which is to be run under Window 95 platform. However, I don't know how to convert a .class file into a .scr file ?
A SCR File is just an renamed exe file. So what you need is an CLASS2EXE converter (there are some around) and than simply rename the file to scr.
Dont forget the special parameters scr files have, like /s or /c for config...look up in google for those. -
How can I create a link that allows users to convert a Wiki pages into PDF format.
I am working on an enterprise Wiki library site collection, but I want to create a link named “Convert to PDF” , which allow users to convert the current Wiki into a pdf file. I need this link to be displayed some where in all the exsiting Wikis pages, and
on any new wiki page. Can anyone advice if there is already such as capability within sharePoint 2013.
ThanksHi,
For your requirement, we can add this link to the master page, then it will appear in the pages which apply this master page.
To convert the current page to PDF, you can take consideration of using jsPDF.
The links below with demos for your reference:
http://parall.ax/products/jspdf
Best regards
Patrick Liang
TechNet Community Support -
How do I convert an ASP file into a PDF?
How do I convert an ASP file into a PDF?
None of the free Adobe Reader products (Adobe Reader Touch, Adobe Reader for iOS/Android, Adobe Reader XI for desktop) provide the support for converting ASP to PDF.
Acrobat XI Pro and Standard (which are not free) can convert an ASP page into PDF.
Please note that Acrobat XI Pro, Standard, and Reader XI are not compatible with the Windows RT operating system.
Maybe you are looking for
-
Images are JPG, 300 - 350kb each, the thing crashes every time! not to mention that in future it was planned to pload few swf's instead of few jpgs there... package import flash.display.*; import flash.geom.Matrix; import flash.utils.*;
-
Links not displaying properly on mobile devices
Hi All, I am having trouble with my website when viewing it on a mobile device (android, iphone). Everything displays well on the mobile devices except for links. Excluding menu items, everytime there is a link on the page, it creates a huge white sp
-
Is there a way to password protect guess access to wireless on an E2000 router?
I'd like to set up guest access to my E2000 router, but only for a few friends, not my entire neighborhood. When I set everything up originally through Cisco Connect, I was able to set up a guest account with a password, but it's showing up in my wir
-
HTML Content in Powershell HTML Output
How do I include HTML tags in the table output generated by the ConvertTo-HTML command? For example, if I had an array of objects like this: FriendlyName,URL Microsoft,www.microsoft.com Google,www.google.com Yahoo,www.yahoo.com How could I make my Co
-
Windows - Upgrade 10.1.0.4 to 10.2 automatic
Is there an .exe file that will update Oracle from 10.1.0.4 to 10.2. I looked on metalink but only seen the manual process which is way to long. dan