100 MB characters in object
We are using java 1.5 in our application on HP UX 11.
In one of the functionality we are saving java objects to hard disk and reading them later.
code is like --
file=new File(path);
fileOut = new FileOutputStream (file);
objOut = new ObjectOutputStream (fileOut);
objOut.writeObject(object);
objOut.close();
fileOut.close();
for reading we use readObject method.
In normal cases size of object files on disk is not more than 35 kb.
This works fine in normal scenarios but if end user enters some special characters from MS word or excel then size of files is increased to 100 MB dramatically.If we open the object file in some editor then we can see a series of latin characters like à à à à à à (millions of characters).
While taking input from application user we are accepting only 20 characters.
I am not able to understand how single character is converted to millions of characters?
This is killing JVM...
Thanks for reply.
I have created a sample class saveObject for example.This will write object in C drive in case of windows (<1kb).
import java.io.File;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
public class saveObject {
public saveObject() {
public static void writeObject(Object object , String path) {
File file=null;
FileOutputStream fileOut=null;
ObjectOutputStream objOut=null;
try {
file=new File(path);
fileOut = new FileOutputStream (file);
objOut = new ObjectOutputStream (fileOut);
objOut.writeObject(object);
objOut.close();
fileOut.close();
} catch (Exception e){
e.printStackTrace();
} finally {
file=null;
fileOut=null;
objOut=null;
public static void main(String[] args) {
writeObject("WallStreet 2nd A LA","C://test.obj");
}We are facing issue only in HP UNIX . The code works fine in Windows and Linux environment.
More Details : We have web application in which we accept data from users in html forms and save this to disk on temporary basis.
Issue is faced with address field where user is doing copy paste from excel/word rather than typing in form.
Similar Messages
-
How can I list more than 100 VI's during Object find?
I am trying to use the LabVIEW 6 Find tool. When I select Object and VI it only lists 100 subvi's within the application. Is there a way to increase the number of subvi's listed?
Attachments:
LabVIEW_Find_example.bmp 974 KBUse the "VIs by Name" option. I'm not sure what the limit is on that one, but it should be higher than 100.
Remember that Alliance Members are here to help. We do this stuff every day.
Daniel L. Press
PrimeTest Corp.
www.primetest.com -
100% width problems on iphones
I have a layout with an accordion which I'm trying to get to work correctly on iPhones. The problem I have is that when viewed in Safari on the phones, there is horizontal play (the pages moves a lot with a side to side swipe gesture). To get around this issue, I implemented several changes including:
Change the text box width from 360 px to 95% in the CSS files (If I do 100%, some characters can get cut off by the scroll bar on the right)
Change the viewport from 380 px to 320 px in the CSS files (This prevents the horizontal play on iPhone 4-5S)
Add <meta name="viewport" content="width=device-width"/> to the html files
This workaround was ok but with the introduction of iOS 8 and the new iPhone 6 and 6+, the higher resolution is throwing everything off. I think the issue is that the viewport is greater than 320 pixels. This is making my design off-center and with play.
Any ideas how to work around this? I need a layout that will only allow vertical scrolling and look good on both iOS 7/8 and iPhones 4-6+.
SangHi Zak,
Thanks for the reply. I'm confident that there are no protruding objects outside the width of the pages. The page content is pretty straight forward. The master page has a color background and a vertical menu nav. The content pages have just an accordion object. It displays fine without any issues in browser desktops, but on mobile safari the behavior is different.
Unfortunately I have to modify the text box width because unlike the accordion object, the text boxes inside of it won't resize based on the device width.
Sang -
Texts more then 60 characters?
Hi friends,
we have in source system (ECC) a table, which includes some texts for every Profit Center for each month
001.2010 PRCTR1 Text1
002.2010 PRCTR1 Text2
001.2010 PRCTR2 Text3
002.2010 PRCTR2 Text4u2026
Text field (Text1, 2, 3u2026) can have approx. 100-120 characters.
They want to show those texts in BW reports according to Profit Center and Period.
But I donu2019t know how to define those fields in BW data model ?
If I define it as an Infoobject then they can have max 60 characters.
How would you define the data model in BW to show the text fields completely?
Cheers.Hi
An Article in BI expert explainas about Displaying Text Longer Than 60 Characters in Web Queries.
BW users often turn to BW-based Web queries to display document-level details. For example, vendors often access BW reports through the Web and need to view long text stored on purchase orders or delivery documents. However, length limitations on BW InfoObjects restrict how much data users can display in BW Web queries. You can display text greater than 60 characters in BW Web queries by enhancing the context menu of Web queries and using a Business Server Page (BSP) application in the back end.
SAP Web Application Server includes BSP, a page-based programming model with server-side scripting as well as server page technology for developing, designing, and implementing Web applications. Server-side scripting enables direct access to all elements in the application server (such as function modules, database tables, ABAP Objects, and remote function modules).
To display text greater than 60 characters in BW reports, you must enhance the context (right-click) menu on BW Web queries by modifying the Web template to call the BSP application. In turn, the BSP application calls a remote function module in R/3 to retrieve the text and present it in a pop-up window. You must set up a separate BSP application for each field (such as delivery number) for which you want to display the enhanced context menu. Then, all users see the new option in their context menu.
Helpfull Link of BSP
http://help.sap.com/saphelp_nw2004s/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
Thanks
Suganya -
Creating module pool programming in abap objects
Hello...
I just wanted to know how u create a give modulepool programming in classes and objects.Could anyone tell me the procedure how to do so.And i knew that module pool programming has become obsolete and now everyone are using object oriented concept in module pool programming.soo i want why r they using soo and what is the drawback in using the module pool programming instead of oops concepts.Could anyone give me the clear explanation..Hello Chadipriya,
You can create module pool program for both ABAP and ABAP OO(Object Oriented).
The thing is in OO u have to declare classes,objects and methods.
<b>Procedure oriented approach</b>
1. Emphasis on tasks
2. Large programs are divided into smaller programs known as functions
3. Most of the functions share global data
4. Data move openly around the system from function to function
<b>Object oriented approach</b>
Emphasis on things that does those tasks
Programs are divided into objects
3. Data structures are designed such that they characterized the objects
4. Functions that operate on the data of an object are tied together in the data structure
5. Data can be hidden and cannot be accessed by external functions
6. New data and functions can be easily added whenever necessary
Go to SE80 ---> Select Program ---> Give ur program name and type this code below :-
REPORT YSUBDEL LINE-SIZE 120.
CLASS parentclass DEFINITION .
PUBLIC SECTION.
DATA : commondata(30) type c value 'Accessible to all'.
METHODS : SHOWVAL.
PROTECTED SECTION.
DATA : protectdata(40) type c value 'Protected data'.
private section.
data : privatedata(30) type c value 'Private data'.
ENDCLASS.
CLASS parentclass IMPLEMENTATION.
METHOD : SHOWVAL.
write:/5 'All data from parentclass shown:-'.
write:/ sy-uline.
WRITE:/5 COMMONDATA,
/5 PROTECTDATA,
/5 PRIVATEDATA.
endmethod.
endclass.
CLASS childclass DEFINITION INHERITING FROM parentclass.
PUBLIC SECTION .
METHODS : subval.
ENDCLASS.
CLASS childclass IMPLEMENTATION.
method : subval.
skip 1.
write:/5 'Data of parent shown from child-'.
write:/5 sy-uline.
WRITE:/5 COMMONDATA,
/5 PROTECTDATA.
Commondata = 'Public data changed in subclass'.
Protectdata = 'Protected data changed in subclass'.
write:/5 sy-uline.
WRITE:/5 COMMONDATA,
/5 PROTECTDATA.
endmethod.
endclass.
You r using OOPs concepts in module pool program and not module pool programming instead of oops concepts.
<b>Reward points if helpful</b>
Thanks,
Sachin -
Hi!
I have silverlight 3 installed with Visual studio 2008. installation is fine.
I have created a silvelight application including a test page.
In my test page I used the "object tag" to call my application as it is suggested since silverlight 3:
<object type="application/x-silverlight-2"
data="data:application/x-silverlight,"
width="450" height="220">
<param name="source" value="MySilverlightApplication.xap"/>
</object>
At the run time, using the test page my application runs as expected. But when i call the same application in another page i have created, nothing happens: the web page is blank. I wonder why it works with the test page created at the same time with the
silverlight application ( i have checked the radio button that required the test paged creation during the process of the silverlight application) and why it doesn't work with a page created separately.
Thank you for your help!
JoelHi Andy!
Hi Qimin!
Thank you for your helps. But i want to let you know that the html code i wrote in my post is just an example so I will complete my post with more information.
0- I have visual studio 2008 installed with silverlight 3.
1- I have created a web project with a master page (my master page has a content page )
2- I added a silvelight application: carousel.xap (during its creation I've accepted to add a test page: carouselTestPage.aspx)
3- I added a main page Home.aspx: which inherits from the master page created in step 1, then I call my silverlight application in this content page using the object tag.
Result of the tests during run time:
My silverlight application carousel.xap works fine when I test it with the
carouselTestPage.aspx.
But my silverlight application carousel.xap doesn't work with the main page I added to my web project. the web content page is blank.
Here below the script of the carouselTestPage.aspx
and for the Pages_Home:
carouselTestPage.aspx code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>carousel</title>
<style type="text/css">
html, body {
height: 100%;
body {
padding: 0;
margin: 0;
#silverlightControlHost {
height: 100%;
text-align:center;
</style>
<script type="text/javascript" src="Silverlight.js"></script>
<script type="text/javascript">
function onSilverlightError(sender, args) {
var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;
if (errorType == "ImageError" || errorType == "MediaError") {
return;
var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
errMsg += "Code: "+ iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";
if (errorType == "ParserError") {
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += " + args.charPosition + " \n";
else if (errorType == "RuntimeError") {
if (args.lineNumber != 0) {
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += " + args.charPosition + " \n";
errMsg += "MethodName: " + args.methodName + " \n";
throw new Error(errMsg);
</script>
</head>
<body>
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/carousel.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="height:0px;width:0px;border:0px"></iframe></div>
</form>
</body>
</html>
2. Home.aspx code:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MyMasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Pages_Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MyContent" Runat="Server">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="~/ClientBin/carousel.xap"/>
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<param name="enableHtmlAccess" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px">
</iframe>
</asp:Content>
so the application source is correctly supplied in the object tag description. so I wonder why it doesn't work with a separate content page in the same web project and work with this embedded Silverlight Test page.
Thank you for your helps.
Joël -
Dynamic populating object variable
Hi Experts!
I have object type:create or replace type r_attribs_t is table of varchar2(100);
create or replace type r_relations_t is table of varchar2(40);
create or replace type r_spatial_t is table of varchar2(100);
type recfull_ot is object (
r_type char(2),
r_class varchar2(10),
r_atype varchar2(10),
r_id varchar2(30),
r_idr varchar2(100),
r_status char(2),
r_dtu date,
r_dtw date,
attribs r_attribs_t,
relations r_relations_t,
spatial_data r_spatial_t,
map member function newer return date,
member function get_ID return varchar2,
member procedure load_record (p_type varchar2, p_id varchar2, p_idr varchar2)
);and some tables:CREATE TABLE "G5ADR" (
"ID" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"STATUS" NUMBER(2,0) DEFAULT 1 NOT NULL ENABLE,
"G5TAR" NUMBER(1,0),
"G5NAZ" VARCHAR2(200 BYTE),
"G5KRJ" VARCHAR2(200 BYTE),
"G5WJD" VARCHAR2(200 BYTE),
"G5PWJ" VARCHAR2(200 BYTE),
"G5GMN" VARCHAR2(200 BYTE),
"G5ULC" VARCHAR2(200 BYTE),
"G5NRA" VARCHAR2(200 BYTE),
"G5NRL" VARCHAR2(200 BYTE),
"G5MSC" VARCHAR2(200 BYTE),
"G5KOD" VARCHAR2(200 BYTE),
"G5PCZ" VARCHAR2(200 BYTE),
"G5DTW" DATE,
"G5DTU" DATE,
"IDR" VARCHAR2(100 BYTE),
CONSTRAINT "G5ADR_PK" PRIMARY KEY ("ID")
CREATE TABLE "G5DOK" (
"ID" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"STATUS" NUMBER(2,0) DEFAULT 1 NOT NULL ENABLE,
"G5IDM" VARCHAR2(200 BYTE),
"G5KDK" NUMBER(2,0),
"G5DTD" DATE,
"G5DTP" DATE,
"G5SYG" VARCHAR2(200 BYTE),
"G5NSR" VARCHAR2(200 BYTE),
"G5OPD" VARCHAR2(200 BYTE),
"G5DTW" DATE,
"G5DTU" DATE,
"IDR" VARCHAR2(100 BYTE),
CONSTRAINT "G5DOK_PK" PRIMARY KEY ("ID")
-- ... and others ...I need to write member procedure load_record loading data from one of that tables into the object variable. The table to load data from depends on p_type input parameter, howerer. This makes the problem difficult for me, because I realy don't know how to deal with that. The attribs nested table shoud be populated with all the G5% columns from the table.
Any suggestions?
Help, please...
Edited by: JackK on Nov 18, 2010 9:48 AMOK, I've been experimenting on an alternative for DBMS_SQL...
Here's a simplified test case based on the structures you gave.
It should work on release 10.2 and upwards (I've only tested it on 11.2 though).
create or replace type r_attribs_obj is object(col varchar2(30), val varchar2(100));
create or replace type r_attribs_tab is table of r_attribs_obj;
CREATE OR REPLACE TYPE recfull_ot IS OBJECT (
r_id varchar2(30),
r_idr varchar2(100),
attribs r_attribs_tab,
member procedure load_record (self in out recfull_ot, p_type varchar2, p_id varchar2, p_idr varchar2)
CREATE OR REPLACE TYPE BODY recfull_ot IS
MEMBER PROCEDURE load_record (self in out recfull_ot, p_type varchar2, p_id varchar2, p_idr varchar2)
IS
ctx dbms_xmlgen.ctxHandle;
res xmltype;
attribs_tab r_attribs_tab;
BEGIN
ctx := dbms_xmlgen.newContext('SELECT * FROM '||p_type||' WHERE id = :1 AND idr = :2');
dbms_xmlgen.setBindValue(ctx,'1',p_id);
dbms_xmlgen.setBindValue(ctx,'2',p_idr);
res := dbms_xmlgen.getXMLType(ctx);
dbms_xmlgen.closeContext(ctx);
self.r_id := p_id;
self.r_idr := p_idr;
SELECT cast(
multiset(
select col, val
from xmltable(
'for $i in /ROWSET/ROW/*
where fn:starts-with(local-name($i),"G5")
return element r
attribute col {local-name($i)},
$i/text()
passing res
columns col varchar2(30) path '@col',
val varchar2(100) path '.'
as r_attribs_tab
) INTO self.attribs
FROM dual
END;
END;
CREATE TABLE "G5ADR" (
"ID" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"G5NAZ" VARCHAR2(200 BYTE),
"G5KRJ" VARCHAR2(200 BYTE),
"G5WJD" VARCHAR2(200 BYTE),
"IDR" VARCHAR2(100 BYTE),
CONSTRAINT "G5ADR_PK" PRIMARY KEY ("ID")
insert into g5adr (ID, G5NAZ, G5KRJ, G5WJD, IDR) values ('001', 'NAZ001', 'KRJ001', 'WJD001', '1');
insert into g5adr (ID, G5NAZ, G5KRJ, G5WJD, IDR) values ('002', 'NAZ002', 'KRJ002', 'WJD002', '1');
insert into g5adr (ID, G5NAZ, G5KRJ, G5WJD, IDR) values ('003', 'NAZ003', 'KRJ003', 'WJD003', '1');Verifying the nested table is correctly loaded...
SQL> set serveroutput on
SQL> DECLARE
2 obj recfull_ot := recfull_ot(null, null, null);
3 BEGIN
4 obj.load_record('G5ADR', '001', 1);
5 for i in 1..obj.attribs.count loop
6 dbms_output.put_line(obj.attribs(i).col||' = '||obj.attribs(i).val);
7 end loop;
8 END;
9 /
G5NAZ = NAZ001
G5KRJ = KRJ001
G5WJD = WJD001
PL/SQL procedure successfully completed -
Displaying International Characters
Some users have been concerned about the fact that Buzzword
does not display some international characters - ranging from Greek
to Russian. This is accentuated by the fact that we have Buzzword
users in well over 100 countries.
The problem occurs when users attempt to insert some
international characters - say, the Greek letter omega - and
Buzzword instead displays a dot on the screen. Here's what's going
on, for anyone interested:
Like virtually all modern software, Buzzword adheres to the
Unicode standard, where characters are defined with 16 bits,
resulting in a total of over 65,000 possible characters.
However, unlike most desktop software, Buzzword must use
something called "embedded fonts". This means that we can't read
fonts off a user's computer, but instead we have to download fonts
from our server.
This is where our challenge begins. A font family contains
characters - called "glyphs" when drawn on the screen - for some
portion of the 65,000 possible characters defined by Unicode. Each
available character is downloaded as a small program containing
instructions on how to draw the glyph. The instructions are
relatively small, but each takes time to download - you can see
evidence of this in our "loading fonts" progress bar.
For Buzzword to load relatively quickly, we need to limit the
number of characters downloaded with each of our seven font
families. Most people use far fewer than 65,000 characters, so for
our first phase of deployment, we identified a couple hundred
characters to download for each font family. Because our initial
market focus was North America, we chose characters from Latin-1,
the Western European character set.
The result: when a user attempts to enter the Greek letter
omega, Buzzword recognizes the Unicode character but does not have
the downloaded instructions to display the glyph on the screen. The
little dot that is displayed instead is an indication that the
requested glyph has not been downloaded with the font set.. If the
user were to export the document to be read by a desktop program,
the glyph would probably be displayed using the computer's fonts.
Longer term, we'll handle this differently by downloading
fonts dynamically, based on the document's contents and a user's
settings. In the meantime, we apologize to everyone who uses
characters outside the Western European set. We will work to get
you a solution as soon as we possibly can.quote:
Like virtually all modern software, Buzzword adheres to the
Unicode standard, where characters are defined with 16 bits,
resulting in a total of over 65,000 possible characters.
Actually, Unicode (the standard) does not care about the
number of bits.
It has enough space to encode more than one million
characters, and the current version (Unicode 5.1) already encodes
more than 100,000 characters (
http://www.unicode.org/versions/Unicode5.1.0/)
quote:
Buzzword must use something called "embedded fonts".
Nothing prevents Flash/Flex from using fonts "html style".
In fact, Buzzword can add a "Generic sans-serif" font as an
option (font-family: Verdana, Arial, Helvetica, sans-serif;) with
zero effort.
The document will not look the same on all computers, but
this might be better than the current bullets.
So this is not a "must". -
Spreadsheet functions causing 100% CPU usage
Running ColdFusion Enterprise 9,0,0,251028 with JVM 1.6.0_14 on a Windows 2003 server. I am finding that when using <cfspreadsheet> and the spreadsheet functions to build a spreadsheet the server CPU maxes out at 100% while the spreadsheet object is being built. The spreadsheet is not overly large or complex: 10-15 columns and 400-500 rows. This behavior is consistent - it happens every time, even when building a simple spreadsheet with 1 column and a few rows. Is anyone else experiencing this? Is it a known problem with a fix? Thank you.
Michael Mongeau
Stratus TechnologiesI was able to root cause the excessive CPU usage to a single-CPU virtual machine. When I ran the same code on dual-CPU virtual machines the CPU usage went to 50-60% but never reached 100% and stayed there as it does on the single-CPU virtual machine. So there appears to be an issue with JRun and Apache POI on single-CPU machines. I simply had my system administrator add another CPU to the virtual machine and the problem no longer occurs.
-
Removing DBMS_OUTPUT statements from the Oracle Objects
I do have some objects (Procedure,function and packages) in my database with line numbers vary from 100-10000 in each object.Most of these objects contains the 'DBMS_OUTPUT.PUT_LINE' statement in n number.I want to remove all these statements from all the objects using some utility or script.
Regards
MSIt is not possible to remove such ifs as they are followed by else part also.And replacing such dbms_output statments with NULL is not possible as i am creating the script automatically using the UTL_FILE package.What should be the condition to replace such dbms_output statments with null statments.Pls specify.
--MS -
How to track a mobile object, masking the others?
Hi
I work with spherical objects with a dimeter size equal to 100 micrometers. The objects are immersed in a fluid. They are movable, swimming in the fluid. I would like to track one of them, masking the others. Could somebody give me an advise how to do it?
RegardsHello,
sincu you did not attach any images it's hard to say, but check this out (a toolkit i've made, wrapping various OpenCV functions):
https://decibel.ni.com/content/blogs/kl3m3n/2014/09/05/point-cloud-library-pcl-and-open-computer-vis...
You could use camshift/meanshift tracking based on hue-saturation histogram backprojection, or perhaps you could just try masking your image with backprojection only.
Spherical - since you are processing in 2D space, you can also try using Hough circle transformation to detect the circles and track them on subsequent frames using for example Euclidean distance from detected centers as your criteria.
Can you post a sample image?
Best regards,
K
https://decibel.ni.com/content/blogs/kl3m3n
"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful." -
What's up with the fat characters in my PDF? (I and L)
Outlined type in illustrator (CS 1) exported to PDF and then combined (2 pages) in Acrobat makes my resultant file have "FAT" characters, namely the I and Ls, respectively. Acrobat 6.0.2 professional, Illustrator CS 1. HELP!
Guys,
this issue has just come to light for me in the last couple days.
Here is what I believe is happening:
Some outlined text or even graphics that are nice even rectangles in illustrator are changed to stroked lines in Acrobat. And only in Acrobat from what I've seen.
I found this out by digging for a while in Acrobat, and discovering View > Wireframe!!!!!
Try this with your files, and you'll see exactly which characters and objects are being affected. The biggest news to me from my customer, and the reason I've dug into this SO tenaciously, was that IT WILL SHOW UP ON THE PRINTED PIECE!!!!!!!!!
So, far I've found this to be true only when the pdf file is printed from Acrobat. The stroked line weights are imperfectly generated by Acrobat, and apparently subject to interpretation by the DPI of the printer used!!
If your client takes the file back into illustrator, it will print fine, view fine even in Outline mode, and continue to give us that warm safe feeling convert to outlines has always given us in the past.
TAKE NOTE ADOBE, YOU NEED TO INFORM USERS AS TO WHY ACROBAT DOES THIS!!
(Steve Ð hinting?... outlined text is vector art, and unless you create it in Corel Draw, it is scalable to ANY size without degredation. Make sure you know what your talking about before you condemn a valid and often necessary feature!) -
Polymorphism. Problems with my Element Objects
As far as I know, my problem is I keep getting my Objects confused with one another. I was wondering if someone could help me please.
Eyerything works in my abstract class and supporting classes. My application is where the issues are. It goes:
public class PlayElementOOPS
public static Scanner keyboard = new Scanner(System.in);
public static void main(String[] args)
//Data
ElementSet anES;
Element anE;
String classId;
Play2 aPlay;
Playwright aPW;
String possible;
double maybe;
boolean done = false;
int choice;
//Logic...
anES = new ElementSet();
while(!done)
System.out.print("\nPlease enter the option you wish the program to " +
"perform.\n\n1) Add a Play\n2) Add a "+
"Playwright\n3) Remove a Play\n" +
"4) Remove a Playwright\n5) Diplay all Plays\n" +
"6) Display all Playwrights\n7) Display by a " +
"given Playwright\n8) Display all Playwrights " +
"by a given Nationality\n9) Quit" +
"\n\n Choice: ");
choice = Integer.parseInt(keyboard.nextLine());
while(!isGoodChoice(choice)) //will output if bad choice is made
System.out.print("\nPlease enter the option you wish the program to " +
"perform.\n\n1) Display all Plays\n2) Display a "+
"particular Play\n3) Display all plays by a Director\n" +
"4) Display all Plays of a Cast member\n5) Quit" +
"\n\n Choice: ");
switch(choice) //switch for which choice the user makes
case 1: addPlay(anES);
break;
case 2: addPlaywright(anES);
break;
case 3: removePlay(anES);
break;
case 4: removePlaywright(anES);
break;
case 5: displayPlays(anES);
break;
case 6: displayPlaywrights(anES);
break;
case 7: displayAPlaywright(anES);
break;
case 8: displayByNation(anES);
break;
case 9: done = true;
break;
public static boolean isGoodChoice(int choice)
return(choice == 1 || choice == 2 || choice == 3 || choice == 4
|| choice == 5);
public static void addPlay(ElementSet anES)
int addRes;
Play2 aPlay = new Play2();
aPlay.readIn(); //Polymorphism
addRes = anES.add(aPlay);
if(addRes == 0)
System.out.print("Could not add. Set is Full.\n");
else if(addRes == -1)
System.out.print("Could not add. Duplicate.\n");
else
System.out.print("Successful add.\n");
public static void addPlaywright(ElementSet anES)
int addRes;
Playwright aPW = new Playwright();
aPW.readIn(); //Polymorphism
addRes = anES.add(aPW);
if(addRes == 0)
System.out.print("Could not add. Set is Full.\n");
else if(addRes == -1)
System.out.print("Could not add. Duplicate.\n");
else
System.out.print("Successful add.\n");
public static void removePlay(ElementSet anES)
String toRemove;
boolean removed;
System.out.print("What play do you want to remove? ");
toRemove = keyboard.nextLine().toUpperCase();
Play2 aPlay = new Play2();
aPlay = toRemove;
removed = remove(aPlay);
if(removed == false)
System.out.print("Failed to remove.\n");
else
System.out.print("Successfully removed.\n");
public static void removePlaywright(ElementSet anES)
String toRemove;
boolean removed;
System.out.print("What play do you want to remove? ");
toRemove = keyboard.nextLine().toUpperCase();
Playwright aPW = new Playwright(toRemove);
removed = remove(aPW);
if(removed == false)
System.out.print("Failed to remove.\n");
else
System.out.print("Successfully removed.\n");
public static void displayPlays(ElementSet anES)
String classId;
System.out.print("Here are all of the Plays\n");
for (int i = 0; i < anES.size(); i++)
anE = anES.getCurrent();
classId = anE.getClassName();
if (classId.equals("Play2"))
aPlay = (Play2) anE;
aPlay.display();
public static void displayPlaywrights(ElementSet anES)
String classId;
System.out.print("Here are all of the Playwrights\n");
for (int i = 0; i < anES.size(); i++)
anE = anES.getCurrent();
classId = anE.getClassName();
if (classId.equals("Playwright"))
aPW = (Playwright) anE;
aPW.display();
public static void displayAPlaywright(ElementSet anES)
Playwright aPW;
String wTW;
String classId;
System.out.print("Enter the Playwright you want to search for: \n");
wTW = keyboard.nextLine().toUpperCase();
for (int i = 0; i < anES.size(); i++)
anE = anES.getCurrent();
classId = anE.getClassName();
Playwright aPW = (Playwright) anE;
if (classId.equals("Playwright"))
if (aPW.equals(wTW))
aPW = (Playwright) anE;
aPW.display();
public static void displayByNation(ElementSet anES)
Playwright aPW;
String wTW;
String classId;
System.out.print("Enter the Playwright's Nationality you " +
"want to search for: \n");
wTW = keyboard.nextLine().toUpperCase();
for (int i = 0; i < anES.size(); i++)
anE = anES.getCurrent();
classId = anE.getClassName();
aPW = (Playwright) anE;
if (classId.equals("Playwright"))
if (aPW.getNation().equals(wTW))
aPW = (Playwright) anE;
aPW.display();
} //End Program
I just cannot see where some of my issues are at.Same program, but different issue. The previous issue was fixed. This issue is in my ElementSet Class.
I cannot see why it cannot find the symbol.
Issue is in the public Element getCurrent() method
Complier:
ElementSet.java:156: cannot find symbol
symbol : constructor Playwright(Playwright)
location: class Playwright
return new Playwright((Playwright) theList[saveIndex].clone());
The ElementSet where the issue is:
public class ElementSet
// Fields ...
Element[] theList; // Will reference an array of objects
// from the subclasses of the abstract
// class, Element
int currentIndex; // Index of current element in the set
int currentSize; // Number of objects currently in the list
final int MAXSETSIZE = 100;
// Maximum number of objects that can be
// in an ElementSet.
// Constructor ...
The ElementSet constructor sets up an array with MAXSETSIZE-many
cells to reference objects from the subclasses of Element.
It also initializes currentIndex and currentSize.
public ElementSet()
theList = new Element[MAXSETSIZE];
currentIndex = -1;
currentSize = 0;
// Test methods
The isMemberOf method tests to see if the parameter, anElement,
is already a member of the ElementSet. Note that anElement can
reference either a Person, a Student, or any subclass (direct
or indirect) of the Element class.
@param anElement the object being checked for membership in
the set
@return true if anElement is already in the set and false
public boolean isMemberOf(Element anElement)
// Local data ...
String paramClass = anElement.getClassName();
String currClass;
// Logic ...
for (int i = 0; i < currentSize; i++)
currClass = theList.getClassName();
// Only compare anElement against those objects
// that belong to anElement's class
if (currClass.equals(paramClass))
if (theList[i].equals(anElement))
return true;
// This object was not found in the set
return false;
The isFull method returns true if the calling object
is full and false otherwise.
@return true if the calling object is full to capacity and
false otherwise.
public boolean isFull()
return currentSize == MAXSETSIZE;
The isEmpty method returns true if the calling object
is empty and false otherwise.
@return true if the calling object is empty and false
otherwise.
public boolean isEmpty()
return currentSize == 0;
// Access methods
The size method returns the number of objects
currently in the set.
@return the value of currentSize
public int size()
return currentSize;
The getCurrent() method returns a reference to the
current object in the set. Note the pre-condition.
This method should only be called if the set is
not empty. The method advances currentIndex to
the next object to set up for the next call to
getCurrent. If getCurrent returns a copy of
the last object, currentIndex is reset to 0.
Pre: currentIndex is not -1 (which can only
occur if currentSize is not 0).
@return copy of the current object
public Element getCurrent()
// Local data ...
int saveIndex = currentIndex;
String classId;
// Logic ...
if (currentIndex == currentSize - 1)
// Recycle to beginning of list
currentIndex = 0;
else
// Advance currentIndex to next object
currentIndex++;
// Return a reference to the current object
classId = theList[saveIndex].getClassName();
if(classId.equals("Play2"))
return new Play2((Play2) theList[saveIndex].clone());
else
return new Playwright((Playwright) theList[saveIndex].clone());
// Mutator methods ...
The add method adds a reference to the parameter object
to the set if the the set is not full and if the
parameter object is not already in the set. The
method returns 1 if the add was successful, 0 if
the set is full and -1 if the object is already
in the set.
@param anElement the object we will try to add
@return 1 for success, 0 for no more room, and
-1 for duplicate object
public int add(Element anElement)
// Logic ...
if (currentSize == MAXSETSIZE)
return 0; // set is full
else if (this.isMemberOf(anElement))
return -1; // it's already in there
// We will add anObject to the set.
theList[currentSize] = anElement.clone();
// Increment currentSize.
currentSize++;
// Set currentIndex to object we just added if it was the
// first object in the set.
if (currentSize == 1) currentIndex = 0;
// We succeeded.
return 1;
The clear method resets the set to the empty set.
public void clear()
for(int i=0; i < currentSize; i++)
theList[i] = null;
currentIndex = -1;
currentSize = 0;
// The display method
The display method displays all of the objects in the
set using polymorphism in a powerful way.
public void display()
if (currentSize == 0)
System.out.println("There are no objects in the set. ");
else
System.out.println("Here are the objects in the set: \n");
for (int i = 0; i < currentSize; i++)
theList[i].display();
System.out.println("\n");
//The remove() method will remove a select object.
public boolean remove(Element anElement)
for(int i = 0; i <currentSize; i++)
if(theList[i].equals(anElement));
for(int x = i; x < currentSize; x++)
theList[x] = theList[x+1];
currentSize--;
return true;
return false; -
Reading child objects in flash content
I have a vector graphic that originated in Illustrator, which
I then imported into Flash CS3. I converted the graphic elements to
symbols, linking them to AS3 classes, and exported the swf to load
into Flex 3.
I can capture a mouseover event for the individual elements
in the graphic, reading the event.target value just fine, loaded
via the swfLoader or via the Image tag, and feeding the object to
the functions I want to operate on the individual elements.
Now I want to programmatically (and randomly) select the
individual graphic symbols, but can't seem to read them.
In this sample code, which is not working, "background" holds
Flash swf, whether it is a swfLoader, Image, or other Display
Object. The underlying symbols are typed as movie clips, but
casting the selected children as different types doesn't seem to
help.
public function applyRandom():void
var index:int = NumberUtilities.random (0, 100, 1);
var _target:Object;
_target = Object(background.getChildAt(index));
animate(_target);
I've installed Flex Component for Flash CS3 and pulled the
individual components into Flex, but not the whole graphic. Even if
I re-composed the graphic by moving the individual symbols back
into place, in my initial tests, I am running into the same
problem.
Any suggestions would be greatly appreciated.I have it solved.
loadedMC = MovieClip(background.content);
var _index:int = NumberUtilities.random (0,
loadedMC.numChildren-1, 1);
var _target:Object = Object(loadedMC.getChildAt(_index));
animate(_target); -
Hello everybody,
i wonder if it is possible to "package" objects into package definition as follow:
CREATE OR REPLACE PACKAGE OBJECTS_TEST IS
TYPE MYTYPE IS OBJECT(T0 VARCHAR2(200),T1 VARCHAR2(200));
when i try to execute this I always receive the following error:
ERROR line 3, col 22, ending_line 3, ending_col 22, Found '(', Expecting: ;
So far, seems that the definition of the object must go internally to the PACKAGE BODY, therefore into a FUNCTION/PROCEDURE.
I would like to define a package that works as a global handler for all my objects used in my schema, what I'm supposed to do ?
Any help will be very appreciated,
Thank you,
LuigiThank you everybody for your support, and as requested I'll try to be more precise.
I'm developing functions and procedure to manipulate data that will then be used by a Business Object universe.
As for now, I've opted to develop some custom transformation procedure in PL/SQL to handle special cases where strings contains value pairs like :
1~FirstText~2~SecondText
From this point onward, I need to create a view that needs to be like this:
VALUE | TEXT
1 | FirstText
2 | SecondText
So far, I've build a PL/SQL procedure that parse the string and returns a TABLE OF OBJECTS to be further used in a VIEW with more or less 100 records.
Those objects where initially declared externally to my package in this way:
CREATE OR REPLACE TYPE RadioQuestionParam IS OBJECT (
Q_ID VARCHAR2 (50 CHAR),
Q_F_ID VARCHAR2 (50 CHAR),
Q_VALUE VARCHAR2 (4000 CHAR),
Q_TEXT VARCHAR2 (4000 CHAR)
CREATE OR REPLACE TYPE RadioQuestionParamTable IS TABLE OF RadioQuestionParam;
/and the procedure that will use them is...
create or replace package objects_test
FUNCTION PARAMS2ROWS2 (P_Q_ID IN VARCHAR2,
P_Q_F_ID IN VARCHAR2,
P_Q_PARAM IN VARCHAR2)
RETURN RadioQuestionParamTable ;
end objects_test;
/so then I can use:
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2'));to produce the desired output.
As I would like to organize everything in one single package I was wondering if there's a way of using OBJECTS INSIDE A PACKAGE....
As for now I've modified my code to use michaels2 suggestion but with no luck as when I execute the
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2')); I'm receiving a ORA-00902: invalid datatype;
Thank you for your precious help,
Luigi
Maybe you are looking for
-
Transfer 100M XML file with XSL
Hi, I am trying to transfer 100M XML file with XSL. Input.xml is the XML file, format.xsl is the XSL file. I type in the command line as: java org.apache.xalan.xslt.Process -IN input.xml -XSL format.xsl -OUT output.xml It got "out of memeory" error.
-
Can't get old photo's off of iphone and into iphoto '09
I have photo's on my iphone which iphoto does not import or even see if I use itunes sync it says will wipe out photos on my iphone, how can I get these old picture off my phone and into my computer, e-mail is no good it reduces resolution. thanks.
-
IPHOTO -I can't open my photos by clicking on them
I can't open my photos by clicking on them when using Iphoto although everything else seems to be working OK. Any ideas??
-
IPhoto library mapping issues on home network
Ladies and Gentlemen, I have my iPhoto 8 library stored on PowerMac G4 that acts as media server for the house. Each Mac automatically mounts the media drive when the appropriate user logs in and each copy of iPhoto has been 'mapped' to the iPhoto li
-
Hi, On my PowerBook G4 Titanium's keyboard the normal position of the right-hand Command/Apple Key is an "Enter" key instead. I think it is meant to be used with num-lock as a calculator input (with some letter keys converting to number keys). I neve