To detect and write the midi imput into an ini file
greetings
for some experimental programming purposes, I need to have an ini file with only one value within, detecting the current pressed key of the midi keyboard connected to the PC trough midi interface.
So that value should change in real time while the user plays the instrument.
If possible to do this with Java + there are already some java programs who could do this?
greetings
for some experimental programming purposes, I need to have an ini file with only one value within, detecting the current pressed key of the midi keyboard connected to the PC trough midi interface.
So that value should change in real time while the user plays the instrument.
If possible to do this with Java + there are already some java programs who could do this?
Similar Messages
-
How to open MSWORD using JAVA/JNI and write the database entries into WORD
Hi..
I am searching for java codes that uses JAVA NATIVE INTERFACE (JNI) for opening MSWORD 2003.
To be brief.
I created HTML form called Employee_data.
if i click on Submit button a word document should be opened.This should be using JNI.
I have also created a servlet in jsp to process the form data and store it into database(mysql).;
Please help me to find the codes to open MSWORD on submit click and to write the database entries into word file.Can i get the full code for that.This is so urgent.
Thanks in advance.Hi Suresh,
The easest solution I can think of is to copy the math equation from the PowerPoint then paste in the Word document directly, there's actually no way to convert it to plain text, some equation is very complext, String variable is not suitable in this case.
For example, this code works fine:
var powerPoint = new Application { WindowState = PpWindowState.ppWindowMinimized };
var oPresSet = powerPoint.Presentations;
Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(@"C:\test.pptx", MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
var strObj = oPres.Slides[1].NotesPage.Shapes[2].TextFrame2.TextRange.MathZones.get_MathZones();
strObj.Copy();
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = true;
Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Add();
doc.Range(0, 0).Paste();
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Application to Read and Write the Configuration Data from a xml file
Hi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AMHi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AM -
I have data that is in basic generic text file format that needs to be converted into Excel spreadsheet format. The data is much longer than 65536 lines, and in my code I haven't been able to figure out how to carry over the data into the next column. Currently the conversion is done manually and generates an Excel file that has a total of 30-40 full columns of data. Any suggestions would be greatly appreciated.
Thanks,
Darrick
Solved!
Go to Solution.No need to use nested For loops. No need for any loop anyway. You just have to use a reshape array function. The picture below shows how to proceed.
However, there may be an issue if your element number is not a multiple of the number of columns : zero value elements will be added at the end of the last column in the generated 2D array. Now the issue depends on the way you intend store the data in the Excel spreadsheet : you could convert the data as strings, replace the last zero values with empty strings, and write the whole 2D array to a file (with the .xls extension ) using the write to spreadsheet function. Only one (minimal) problem : define the number of decimal digits to be used;
or you could write the numeric array directly to a true Excel spreadsheet, using either the NI report generation tools or ActiveX commands, then replace the last elements with empty strings.
We need more input from you to decide how to solve these last questions.
Message Edité par chilly charly le 01-13-2009 09:29 PM
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
Example_VI.png 10 KB -
Compare String in a table and insert the common values into a New table
Hi all,
Anyone has idea on how to compare a string value in a table.
I have a Students Table with Student_id and Student_Subject_list columns as below.
create table Students( Student_id number,
Student_Subject_list varchar2(2000)
INSERT INTO Students VALUES (1,'Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History');
INSERT INTO Students VALUES (2,'Math,Law,Business,Social,Language arts,History,Biotechnology,communication');
INSERT INTO Students VALUES (3,'History,Spanish,French,Langage arts');
INSERT INTO Students VALUES (4,'History,Maths,Science,Chemistry,English,Reading');
INSERT INTO Students VALUES (5,'Math,Science,Arts,Music,Computer Programming,Language arts,History');
INSERT INTO Students VALUES (6,'Finance,Stocks');
output
Student_id Student_Subject_list
1 Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History
2 Math,Law,Business,Social,Language arts,History,Biotechnology,communication
3 History,Spanish,French,Langage arts
4 History,Maths,Science,Chemistry,English,Reading
5 Math,Science,Arts,Music,Computer Programming,Language arts,History
6 Finance,Stocks
I need help or some suggestion in write a query which can compare each row string value of Student_Subject_list columns and insert the
common subjects into a new table(Matched_Subjects).The second table should have the below colums and data.
create table Matched_Subjects(Student_id number,
Matching_studesnt_id Number,
Matched_Student_Subject varchar2(2000)
INSERT INTO Matched_Subjects VALUES (1,2,'Math,Law,Business,Social,Language arts,History');
INSERT INTO Matched_Subjects VALUES (1,3,'History,Langage arts');
INSERT INTO Matched_Subjects VALUES (1,4,'History,Maths,Science');
INSERT INTO Matched_Subjects VALUES (1,5,'Math,Science,Arts,Music,Language arts,History');
INSERT INTO Matched_Subjects VALUES (2,3,'History,Langage arts');
INSERT INTO Matched_Subjects VALUES (2,4,'History,Maths');
INSERT INTO Matched_Subjects VALUES (2,5,'Math,Language arts,History');
INSERT INTO Matched_Subjects VALUES (3,4,'History');
INSERT INTO Matched_Subjects VALUES (3,5,'Language arts,History');
INSERT INTO Matched_Subjects VALUES (4,5,'Math,Science');
output:
Student_id Match_Student_id Matched_Student_Subject
1 2 Math,Law,Business,Social,Language arts,History
1 3 History,Langage arts
1 4 History,Maths,Science
1 5 Math,Science,Arts,Music,Language arts,History
2 3 History,Langage arts
2 4 History,Maths
2 5 Math,Language arts,History
3 4 History
3 5 Language arts,History
4 5 Math,Science
any help will be appreciated.
Thanks.
Edited by: user7988 on Sep 25, 2011 8:45 AMuser7988 wrote:
Is there an alternate approach to this without using xmlagg/xmlelement What Oracle version are you using? In 11.2 you can use LISTAGG:
insert
into Matched_Subjects
with t as (
select student_id,
column_value l,
regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
from students,
table(
cast(
multiset(
select level
from dual
connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
as sys.OdciNumberList
select t1.student_id,
t2.student_id,
listagg(t1.subject,',') within group(order by t1.l)
from t t1,
t t2
where t1.student_id < t2.student_id
and t1.subject = t2.subject
group by t1.student_id,
t2.student_id
STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
1 2 Math,Law,Business,Social,Language arts,History
1 3 Language arts,History
1 4 Science,History
1 5 Math,Science,Arts,Music,Language arts,History
2 3 Language arts,History
2 4 History
2 5 Math,Language arts,History
3 4 History
3 5 History,Language arts
4 5 History,Science
10 rows selected.
SQL> Prior to 11.2 you can create your own string aggregation function STRAGG - there are plenty of example on this forum. Or use hierarchical query:
insert
into Matched_Subjects
with t1 as (
select student_id,
column_value l,
regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
from students,
table(
cast(
multiset(
select level
from dual
connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
as sys.OdciNumberList
t2 as (
select t1.student_id student_id1,
t2.student_id student_id2,
t1.subject,
row_number() over(partition by t1.student_id,t2.student_id order by t1.l) rn
from t1,
t1 t2
where t1.student_id < t2.student_id
and t1.subject = t2.subject
select student_id1,
student_id2,
ltrim(sys_connect_by_path(subject,','),',') MATCHED_STUDENT_SUBJECT
from t2
where connect_by_isleaf = 1
start with rn = 1
connect by student_id1 = prior student_id1
and student_id2 = prior student_id2
and rn = prior rn + 1
STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
1 2 Math,Law,Business,Social,Language arts,History
1 3 Language arts,History
1 4 Science,History
1 5 Math,Science,Arts,Music,Language arts,History
2 3 Language arts,History
2 4 History
2 5 Math,Language arts,History
3 4 History
3 5 History,Language arts
4 5 History,Science
10 rows selected.SY. -
How to write the JTables Content into the CSV File.
Hi Friends
I managed to write the Database records into the CSV Files. Now i would like to add the JTables contend into the CSV Files.
I just add the Code which Used to write the Database records into the CSV Files.
void exportApi()throws Exception
try
PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
System.out.println("Connected");
stexport=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
rsexport=stexport.executeQuery("Select * from IssuedBook ");
ResultSetMetaData md = rsexport.getMetaData();
int columns = md.getColumnCount();
String fieldNames[]={"No","Name","Author","Date","Id","Issued","Return"};
//write fields names
String rec = "";
for (int i=0; i < fieldNames.length; i++)
rec +='\"'+fieldNames[i]+'\"';
rec+=",";
if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
writing.println(rec);
//write values from result set to file
rsexport.beforeFirst();
while(rsexport.next())
rec = "";
for (int i=1; i < (columns+1); i++)
try
rec +="\""+rsexport.getString(i)+"\",";
rec +="\""+rsexport.getInt(i)+"\",";
catch(SQLException sqle)
// I would add this System.out.println("Exception in retrieval in for loop:\n"+sqle);
if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
writing.println(rec);
writing.close();
}With this Same code how to Write the JTable content into the CSV Files.
Please tell me how to implement this.
Thank you for your Service
JofinHi Friends
I just modified my code and tried according to your suggestion. But here it does not print the records inside CSV File. But when i use ResultSet it prints the Records inside the CSV. Now i want to Display only the JTable content.
I am posting my code here. Please run this code and find the Report.csv file in your current Directory. and please help me to come out of this Problem.
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.*;
public class Exporting extends JDialog implements ActionListener
private JRadioButton rby,rbn,rbr,rbnore,rbnorest;
private ButtonGroup bg;
private JPanel exportpanel;
private JButton btnExpots;
FileReader reading=null;
FileWriter writing=null;
JTable table;
JScrollPane scroll;
public Exporting()throws Exception
setSize(550,450);
setTitle("Export Results");
this.setLocation(100,100);
String Heading[]={"BOOK ID","NAME","AUTHOR","PRICE"};
String records[][]={{"B0201","JAVA PROGRAMING","JAMES","1234.00"},
{"B0202","SERVLET PROGRAMING","GOSLIN","1425.00"},
{"B0203","PHP DEVELOPMENT","SUNITHA","123"},
{"B0204","PRIAM","SELVI","1354"},
{"B0205","JAVA PROGRAMING","JAMES","1234.00"},
{"B0206","SERVLET PROGRAMING","GOSLIN","1425.00"},
{"B0207","PHP DEVELOPMENT","SUNITHA","123"},
{"B0208","PRIAM","SELVI","1354"}};
btnExpots= new JButton("Export");
btnExpots.addActionListener(this);
btnExpots.setBounds(140,200,60,25);
table = new JTable();
scroll=new JScrollPane(table);
((DefaultTableModel)table.getModel()).setDataVector(records,Heading);
System.out.println(table.getModel());
exportpanel= new JPanel();
exportpanel.add(btnExpots,BorderLayout.SOUTH);
exportpanel.add(scroll);
getContentPane().add(exportpanel);
setVisible(true);
public void actionPerformed(ActionEvent ae)
Object obj=ae.getSource();
try {
PrintWriter writing= new PrintWriter(new FileWriter("Report.csv"));
if(obj==btnExpots)
for(int row=0;row<table.getRowCount();++row)
for(int col=0;col<table.getColumnCount();++col)
Object ob=table.getValueAt(row,col);
//exportApi(ob);
System.out.println(ob);
System.out.println("Connected");
String fieldNames[]={"BOOK ID","NAME","AUTHOR","PRICE"};
String rec = "";
for (int i=0; i <fieldNames.length; i++)
rec +='\"'+fieldNames[i]+'\"';
rec+=",";
if (rec.endsWith(",")) rec=rec.substring(0, (rec.length()-1));
writing.println(rec);
//write values from result set to file
rec +="\""+ob+"\",";
if (rec.endsWith(",")) rec=rec.substring(0,(rec.length()-1));
writing.println(rec);
writing.close();
catch(Exception ex)
ex.printStackTrace();
public static void main(String arg[]) throws Exception
Exporting ex= new Exporting();
}Could anyone Please modify my code and help me out.
Thank you for your service
Cheers
Jofin -
Write the ldapsearch results into a file
We are using ldapsearch from the command line and want to write the search results into a file. How can we do this?
What OS are you using - If Unix / Linux then use the standard redirection > or >> facility.
-
How to read the and Write the PDF file give me the solution
Hi all,
How to read the and Write the PDF file give me the solution
My coding is
import java.io.File;
import com.asprise.util.pdf.PDFImageWriter;
import com.asprise.util.pdf.PDFReader;
import java.io.*;
import java.io.FileOutputStream;
public class example {
// public example() {
public static void main(String a[])
try
PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
reader.open(); // open the file.
int pages = reader.getNumberOfPages();
for(int i=0; i < pages; i++) {
String text = reader.extractTextFromPage(i);
System.out.println("Page " + i + ": " + text);
// perform other operations on pages.
PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
writer.open();
writer.addImage("C:\\sam.doc");
writer.close();
System.out.println("DONE.");
reader.close();
catch(Exception e){System.out.println("error:"+e);
e.printStackTrace();
I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
Please give response immtly
i am waiting for your reply.
thanks,
Suresh.GI have some question flow
How library to use this code.
I try runing but have not libary.
Please send me it'library
Thank you very much! -
When I import a commerical CD Itunes will create 2 identical albums and put all of the songs except one into one album and put the other song into the second album that it created. Why is itunes doing this and what can I do to combine them into one album?
I found this to be somewhat helpful: Grouping Tracks into Albums
What I did was to put in the same name for Album Artist in every track. That seemed to do the trick (previously all those fields were empty). It seems like a lot of work for a simple thing.
iTunes knows (or should know) that these tracks were imported from one CD. So why is it relying on incomplete data from the gracenote database? -
IDoc to webservice and get the response back into another IDoc.
Hi guys
We have a scenario where we need to send an IDoc to webservice and get the response back into another IDoc.
Questions:
1. Is this scenario possible without a BPM? or do we need to use BPM (Sync-Async bridge).
2. Is there a Async to Sync bridge in BPM?
3. How do I use this bridge in my scenario and customize it?
4. If not possible, provide me the related docs using BPM for the same scenario.
Appreciate your quick response
Regards
NaiduHi,
this link may help u............,
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1134. [original link is broken] [original link is broken] [original link is broken]
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403. [original link is broken] [original link is broken] [original link is broken]
Regards,
Azeez khan. -
How do I remove disk partition and merge the 2 partitions into main hard disk C drive. Win7
How do I remove a disk partition and merge the 2 partitions into main hard disk C drive. If I delete Drive D I am left with 250G of unallocated space in drive D Hard drive. And I want the unallocated portion 250G to be allocated
to the C drive.jcI know it is a little bit late to reply. But, I still want to share my experiences with everyone here.
Actually, I have ever also has the same issue and needed to resize my C drive partition for much more partition space. But, the resizing process just unexpectedly fails at last in Disk Management. The “extend” function is unable to work.
So, I have no choice but to take chances with some third party partition resizing tools:
GParted
http://gparted.sourceforge.net/
IM-Magic Partition Resizer Free
http://www.resize-c.com/
Both of them seem efficient. So, I just have tried them one by one and finally added wanted free space to my C drive successfully.
I even have found a video tutorial that teaches me how to resize my drive with this freeware in details:
https://www.youtube.com/watch?v=6jCeT7CbsKk -
welcome to support.mozilla.com
before you can use your new account you must activate it-this ensures the e-mail address you used is valid and belongs to you.To account,click the link below or copy and paste the whole thing into your browser's bar:
https://support.mozilla.com/en-US/users/actiate/656ec47229 etc.
tell me how to do this, if possible.'''waiting for reply, will there be a reply?'''
-
OJEC1.0: Cannot detect and install the selected platform
Hi All
I try to setup the OJEC 1.0 SDK for Windows x86.
While adding the emulator located in C:\Program Files (x86)\Oracle\Oracle JavaME Embedded Client\1.0\emulator-platform as a new "Java ME CDC Platform Emulator" in the "Java Platform Manager" (Tools -> Java Platforms -> Add Platform), it throws "Cannot detect and install the selected platform" error.
This should be successfully done because of following the [Developer's Guide|http://docs.oracle.com/javame/config/cdc/cdc-opt-impl/ojmeec/1.0/install/html/z400009a1006487.html]
Here is my Netbeans's environmental information. The same error causes in the case of NetBeans 6.9.1.
Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0_01; Java HotSpot(TM) 64-Bit Server VM 21.1-b02
System: Windows 7 version 6.1 running on amd64; MS932; en (nb)
Any suggestion would be appreciated.
Regards,
--yoshiki(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
http://majorgeeks.com/download.php?det=4459
(2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
I have an iPhoen 5, and unfortunately the phone fell into a mud pit,sice then does not work.I wouod like to infor me, where I can repair it in Sao Paulo,Brasil
Thank's
MarcIf you have an Apple store in your city, that would be the place to start...an Apple store genius bar can help. Damage of this kind is considered out-of-warranty damage by Apple and not covered by the warranty. Replacement of an iPhone 5 is $229 in the US, but not sure of the conversion to Brazilian currency.
You can also find an appropriate customer service number to call on http://support.apple.com/kb/HE57 -
Payment for the exam voucher in INR and write the exam in USA
Hi,
I am currently on a visit to US and I wanted to do an Oracle Certification. Can I purchase the exam voucher in Indian currency(INR) through Oracle University India and write the exam in US. The cost of the exam in US Dollar is almost double as that of the Indian currency.
Thanks,
VinodGlance at the following post that is in the Certification forum:
Oracle 11g Certification Query
Maybe you are looking for
-
How can I do order tracking with a DC speed signal?
I'm using SignalExpress 2009 to bring in several strain signals which will require order tracking. The speed signal will be a 4-20 mA DC input. How can I set this up as my speed reference?
-
I can't open or delete any of my verizon emails. I also cannot access my spam account ( I need to check because sometimes legitimate emails go to my spam file). Is anyone else having this problem and do you have any solutions? Thanks.
-
For some reason I can't get the avid codecs to work in my quicktime. I've done everything I can think of - updated quicktime and my operating system to most recent versions, and I've downloaded every codec available on the avid website: Downloaded fr
-
hi all, i want to change display the long text instead of the short text in a standard-smartform.is it possible? is there any other way to attend to it? regards, johnson
-
Quicktime cannot download to startmenu directory. Anyone know a fix?
I am using windows 7 32 bit. I can download the installer, but during the actual installation. The directory under C:programdata\microsoft\windows\startmenu it cannot download too. I've tried download managers/different internet browsers/ and tried r