How to get the output of a C prgram to Java to the parent Java program
Hi,
Suppose there is a Java Program which calls inside it the C program.The C program outputs as below
printf("%c%c",c1,c2);
Now I have to take this output as an input of the Java Program for further processing.How can I do this?
Tapas
By reading from the output stream of the C program.
(if you're not already reading the output stream of the program anyway, you should be - http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#2 )
The format is a char, a space, a char, so just call read() three times and ignore the second value.
Similar Messages
-
How to get the parent of a component in fx?
Here is an example:
Index.fx:
Stage {
title: "Online book library";
width: 1024
height: 768
scene:Scene {
fill: Color.WHITE
content: [
banner ,
login = Login{translateX:715 translateY:135}
};Login.fx:
var logOn : Button = Button {
translateX:25 translateY: 170
text: "Log On"
font: Font {size:11 name: "Verdana Bold"}
action: function() {
showHello();
function showHello(){
// add a label in index.fx whose text is "welcome!";
}I want to show something on the index.fx but I don't know how to get the parent from the child component?
In Flex, we use parent or parentApplication, Is there a similar function in JavaFX?Reusing the same Tile example, I had no problems, I suppose I was doing wrong the first time:
def IMAGES_WIDTH = 100;
def IMAGES_HEIGHT = 100;
var COLUMN_NB = 3;
var ROW_NB = 3;
var scene: Scene;
var previews: Container;
Stage
title: "Test of Tile layout"
scene: scene = Scene
width: 500
height: 500
fill: Color.LAVENDER
content:
previews = Tile
hgap: 10
vgap: 10
layoutX: bind (scene.width - previews.width) / 2
layoutY: bind (scene.height - previews.height) / 2
columns: COLUMN_NB
content: for (i in [ 1 .. COLUMN_NB * ROW_NB ])
ImageView
id: "IV{i}"
image: Image
url: "{__DIR__}clock.gif"
width: IMAGES_WIDTH
preserveRatio: true
onMousePressed: Hide
function Hide(evt: MouseEvent): Void
println("{evt.node} ({evt.node.id}) - {evt.node.parent}");
var nm: Node = evt.node.parent.lookup("IV5"); // Middle node
nm.visible = false;
var ntl: Node = evt.node.parent.lookup("IV1"); //Top left node
(ntl as ImageView).viewport = Rectangle2D { height: IMAGES_WIDTH/2, width: IMAGES_WIDTH/2 };
(evt.node.parent as Tile).hgap = 20; // Strange effect, but works
} -
How to get the parent window in sub-child controller class in javafx?
how to get the parent window in sub-child controller class in javafx?
You can get the window in which a node is contained with
Window window = node.getScene().getWindow();Depending when this is invoked, you might want to check the Scene is not null before calling getWindow().
If the window is a stage that is owned by another window, you can get the "parent" or "owner" window with
Window owner = null ;
if (window instanceof Stage) {
Stage stage = (Stage) window ;
owner = stage.getOwner();
} -
How to get the parent Frame of a component ?
Hi,
I'm wondering how to get the parent JFrame (or JDialog) of a component.
Thanks for tipsI'm using this code:
public Component getFrame(Component comp)
Component frame = comp;
while ((frame != null) && !(frame instanceof Frame))
frame = frame.getParent();
if (frame == null)
frame = comp; // no parent found
return frame;
} -
How to get the parent node of the current node?
Hi all,
i want to get the parent node of the current node and the not the parent of the parent node.
thank you very muchHi,
the parent node of <subnode1-2>29.99</subnode1-2> is (node1), how can do to get <node1> throw <subnode1-2>29.99</subnode1-2> the sub node of <node1>.
As per my understanding the parent node of <subnode1-2>29.99</subnode1-2> is book not the node1.
If you want node 1 as a parent of subnode1-2 than your xml will look like this.
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<fathernode>Harry Potter</fathernode>
<node1>
<subnode1>29.99</subnode1>
<subnode2>29.99</subnode2>
</node1>
<node2>
<subnode1>19.99</subnode1>
<subnode2>19.99</subnode2>
</node2>
</book>
</bookstore>
and also if you want tom retrive float data than refer following XPATH.
"//book[[price='1000']]/price/text()"
Regards,
Manoj Bilthare -
[CS3] How to get the parent spread of a page?
Hallo!
I have the page UID.
How to get the spread of this page?
Thanks,
Alois BlaimerYou'll also need an IDataBase*, from any object in the same document.
Then you can follow IID_IHIERARCHY one up to the kSpreadLayerBoss, two up to the kSpreadBoss or just refer to the hierarchy root.
Dirk -
How to Get the Parent - Child Relationship
Hi ,
In my application having 100 tables with parent - child releation ship without using casecade constraints
i want to delete the parent with child and sub child records
Example
Table - 1
parent1
child 2
Table - 2
Child 1 - Parent 1
Parent 2
Table - 3
Child 1 - Parent 2
Parent 3
Table - 4
Child 1 - Parent 3
How to delete the parent table ? Is it any scripts available ?
Regards
Sudhakar P.Hi,
1) Firstly identify the parent tables using
SELECT a.table_name, 0
FROM user_tables a, user_tab_columns b
WHERE a.table_name = b.table_name
store these in one table say ID_table
2) Identify dependent tables and sore in table say table_dependency using
SELECT LEVEL, parenttable, parentcol, childtable, childcol
FROM (SELECT UNIQUE parenttable, parentcol, childtable,
b.column_name childcol
FROM (SELECT p.table_name parenttable,
k.column_name parentcol,
k.POSITION pos,
c.table_name childtable,
c.constraint_name CONSTRAINT
FROM all_constraints p,
all_constraints c,
all_cons_columns k
WHERE p.constraint_name =
c.r_constraint_name
AND c.r_constraint_name =
k.constraint_name
AND p.constraint_type IN ('P', 'U')
AND c.constraint_type = 'R'
AND p.table_name != c.table_name
ORDER BY p.table_name,
c.constraint_name,
k.POSITION) a,
all_cons_columns b
WHERE a.CONSTRAINT = b.constraint_name
AND a.pos = b.POSITION)
3)Now using these details find tables without cascade rule as below
SELECT *
FROM table_dependency
WHERE child_table IN (
SELECT DISTINCT table_name
FROM user_constraints
WHERE constraint_type = 'R'
AND delete_rule <> 'CASCADE'
AND table_name IN (SELECT child_table
FROM table_dependency)
AND r_constraint_name IN (
SELECT constraint_name
FROM user_constraints
WHERE table_name IN (
SELECT table_name
FROM id_table
UNION
SELECT child_table
FROM table_dependency))
AND table_name NOT IN (
SELECT table_name
FROM id_table)); -
How to Get the Parent Process ID from Child BPEL Process
Hi All,
We have a requirement to get the Parent BPEL Process ID from Child BPEL Process. One way is we can pass the Parent BPEL process ID from Parent BPEL Process to Child BPEL process. Is there any standard function available to get the Parent BPEL process ID from Child Process?
P.S: We are using BPEL 10.1.3 Version.
Please share any info on this.
Thanks in Advance,
SaravanaHi Saravana,
The existing methods in 10.1.3x allow a following (a bit of a convoluted way):
In a BPEL Java embedding activity, you can use the following code to get the parentProcessname:
String parentInstanceId = getParentId();
String parentProcessname = getLocator().locator.lookupInstance(parentInstanceId).getProcess().getProcessId().getProcessId();Hope this helps,
Regards,
Shanmu
http://www.prshanmu.com/articles/ -
Need how to get the parent acount details in Trial balance report
Hi All,
I have a requirement in which i need to print the details of the parent account details as the report wont print the parent a/c details by default.
Can any one please let me know how can i achieve this?
Thax in advance.
SeshuGenerally the trial balance summary report does not fetch the parent account details.
In my customized report , i need to get the detials of the current accounts as well as the details (initial balance,debit,credit ) for a particular period of the parent account as well. -
How to get the parent name in the hierarchy
Hi Colleagues.
Im working on with java webdynpro by showing hierarchical data.
When I select a leaf item, I should get the possible parent items.
For Ex:
A
B
C
|
D
When I select D, I need to get the information as A-B-C-D.
How can I acheive this?
Thanks
RakeshHi Rakesh
You can go up to the root using the following methods:
IDNode dNode = dElement.node();
IWDNodeElement cElement = dNode.getParentElement();
IWDNodeElement bElement = cElement.node().getParentElement();
BR, Siarhei -
How to get the Parent Id using Groovy script in FCRM
Hi,
I have created one custom object A. I related this object with Opportunity. I created one custom button in custom object. When I click the button I need to get the Optortunity Row Id and pass it to external system.
If I define the OpportunityVO itself it throwing error.
Our application Version : 11.1.7.0.0.
Thanks in Advance,
MohanHi Mohan,
You'll have to use the internal "bindings" to get this value from the session context. As a general recommendation, look at the properties of other pages where this is included (incl. hidden) and see if you can derive the groovy expression from that. You can see an example in this video.
Kind regards, Richard
FA Developer Relations
http://blogs.oracle.com/fadevrel -
Hi
I am using jdev 11.1.1.5
In this i had used gl_acct_classes VO and gl_accounts VO and an updatable AccountsVO
select * from gl_acct_classes,gl_accounts from gl_acct_classes.acct = gl_accounts.acctI have the fields gacl_id , gacl_prim_id
In this which ever gaclid has the value null in gacl_prim_id had been consider as parent
for eg
sno gacl_id gacl_prim_id
1 a //It is consider as parent since gacl_prim_id is null
2 o a
3 e a
//In this a is parent for o and e
4 b //parent
5 t b
6 r b
// b is parent for t and rI need to get the sum of all the accounts having o,e as a class id in which a is a parent and t,r as a class id in which b is a parent
I hope that i may be clear for u..,I had used ParentVO GlAccountClassVO
I had also created a viewlink
ParentVO.cl_id = AccountClasses.GACL_ID
Querry for ParentVO updatable
SELECT GlAccountClasses.GACL_ACCT_TYPE,
GlAccountClasses.GACL_BU,
GlAccountClasses.GACL_CRE_BY,
GlAccountClasses.GACL_CRE_DATE,
GlAccountClasses.GACL_DESC1,
GlAccountClasses.GACL_DESC2,
GlAccountClasses.GACL_GP_FLAG,
GlAccountClasses.GACL_ID,
GlAccountClasses.GACL_OPTYPE,
GlAccountClasses.GACL_PRIM_ID,
GlAccountClasses.GACL_PT_SEQ_NO,
GlAccountClasses.GACL_SCH_NO,
GlAccountClasses.GACL_SEQ_NO,
GlAccountClasses.GACL_UPD_BY,
GlAccountClasses.GACL_UPD_DATE
FROM GL_ACCOUNT_CLASSES GlAccountClasses
WHERE GACL_PRIM_ID is nullI had created a Transient attrbute with the following groovy expression sinct it doesnt work
AccountClass.sum("GapbDebitAmt") -
Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
EDK5.2____________________,_________oHello.
Java________,_______________...
Class________o
com.plumtree.remote.auth.ChildGroupList
...o(^^;)
Best Regards,
--------- Hiroko Iida_______ (05/10/28 18:27) -------
Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
EDK5.2____________________,_________o -
How to Get the Parent Community of a Community Using PRC
Greetings,
Using the PRC, I am trying to build a heirarchy table of all of the Communities a particular user has access to.
Stated another way, I want to be able to build a tree of all of the communities a user can access, and display them in an explorer type graphical object(treeview).
Through ICommunityManager I CAN get all of the communities (step 1). But beyond that, I am unable to find the communities' parents(I have found no way in the PRC to ask for a parent community) so I can iteratively start the treck up to the top of the heirarchy and down to the bottom.
The Adaptive tag library has tags to get parent, sibling, and child community URL's of the current and any specific community, so I know it can be done, but the tags do not help me to build the tree beyond the current community's parent (At least I have not figured out how).
Has anyone done anything like this? Could you direct me to the appropriate API's or approach?
Thank You.Have you thought about using pt:standard.tree instead of rolling your own?
Chris Bucchere | bdg | [email protected] | www.bdg-online.com -
How to get the parent Summary task of Task List Item in Tasks List ?
Is there something in SharePoint List Architecture that will help me populate summary task of a particular task as the column in the same list? I am trying to relate Tasks List and Issues List. However, when I use "Task Name" as the lookup column
in Issues List am not able to figure out which summary task the issue is related to. Any thoughts on how to accomplish this?
Please help!
techieHi,
There is a reply in your another similar thread about this issue, please check if it would be helpful to you:
https://social.msdn.microsoft.com/Forums/office/en-US/e1fc971a-9988-4f70-9726-a6c255456bd1/task-list-query?forum=sharepointdevelopment
Best regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to get the enclosing folder of an Application?
Ok. re-visiting my Applescript to compare installed apps versus a list of predefined apps... here is my test code so far:
set appsPath to (path to applications folder)
tell application "Finder"
set appList to name of every application file of entire contents of folder appsPath
end tell
set theApps to {"iMovie.app", "Microsoft Excel", "Microsoft Excel.app", "Adobe Acrobat 7.0 Professional.app", "Adobe After Effects CS4.app", "ColorEyes Display Pro.app", "Corel Painter X.app", "DiskTracker 2.3.2", "EPSON Scan.app", "Flash 8.app", "Product Ingest.app", "Product Tag.app", "Art Ingest.app", "TextWrangler.app", "Toast Titanium.app", "Suitcase Fusion 2.app", "Suitcase Fusion 3.app", "Fetch.app"}
repeat with anApp in theApps
set vers to version of (application anApp)
-- get parent path of anApp!!!!
if (parentFolder is equal to "Applications" or parentFolder is equal to "Utilities") then
set parentFolder to ""
end if
display alert anApp & ": Version: " & vers & " " & parentFolder
end repeat
The only thing I'm stuck on is how to get the parent folder of anApp. Basically we use several versions of software here that are not easily identifiable by the version attribute. However their enclosing folder has all the versioning info I need (e.g.: MS Excel 04's vers would be 110113, but the enclosing folder is "Microsoft Office 2004", and some departments get Office 2008, Office 2011, etc., so I need a human-friendly way to get the right versions)
I don't know if the "if" statement to check whether the parent is Applications or Utilities is correct as I haven't gotten that far in testing. I'm only interested in getting the parent of apps that have parent folder that is a sub-folder of Applications or Utilities.
Basically what I am trying to do here is write a text file containing all departmental apps, homefolder sizes, relevant partition sizes, etc. and spit it out at the tech responsible for migrating a user to a new mac (display alert is just convenient for testing purposes). In the past we've had too many "missed" items in QC like wrong apps installed, or wrong versions, or data not copied over properly, etc. So this way they can run this on the old system beforehand and the new system after, line everything up and check off if it matches. This is just a snippet...
TIA!
AndrewHi,
Andrew Caldwell wrote:
Is there a way to invoke these without the script opening each one?
You must use the bundle identifier instead of the name
Here a example :
set theApps to {"com.microsoft.excel", "com.adobe.Acrobat.Pro", "com.barebones.textwrangler", "com.roxio.Toast", "com.fetchsoftworks.Fetch"}
repeat with anApp in theApps
tell application "Finder" to tell (application file id anApp)
set vers to version
set parentFolder to name of its container
end tell
if parentFolder is in {"Applications", "Utilities"} then set parentFolder to ""
display alert anApp & ": Version: " & vers & " " & parentFolder
end repeat
Maybe you are looking for
-
Not a question. A comment actually. Regarding the persistent blue autofill box that may appear in Safari, my wife shut down the iMac then unplugged it for a few minutes. On restarting, the box was gone.
-
Dynamic queue listener in Message driven bean
Hi all I wonder if exists a way for creating a message driven bean that reads messages from a queue defined on fly. I mean I'd like to create an mdb that read from queue ,where the queue name is defined in a data base table . Hope to be clear. Thanks
-
Inbound IDOC - for Orders Acknowledgement & Orders change Acknowledgement
Hi Gurus, Using EDI 855 and 865 need to change delivery date and delivery quantity. The quantities must be equal to the original PO quantities. PO quantity must be splitted to equal the original PO quantity and we need to post the acknowledgements in
-
Whenever I touch the Photos icon on my iPod 6G, the iPod restarts. What can I do?
-
Ipod Touch 2.0.2 update problem
ok so i just bought the 2.0.2 update when it started downloading, it said that my computer was full or something so i cound't get it in and now i have no idea how to get it back do i have to buy it again or something..