runtime-error

MidiSystem.getSequencer() returns Audio Device Unavailable

∥☆過路亽.° 提交于 2020-01-04 08:37:34
问题 I've keep having an exception thrown, on and on. When i try to make a new Sequencer object, i keep getting the javax.sound.midi.MidiUnavailableException: Audio Device Unavailable exception. So, here's the code: import javax.sound.midi.*; public class MiniMusicPlayer1 { public static void main(String[] args) { try { Sequencer sequencer = MidiSystem.getSequencer(); sequencer.open(); Sequence seq = new Sequence(Sequence.PPQ, 4); Track track = seq.createTrack(); for (int i = 5; i < 61; i += 4) {

MidiSystem.getSequencer() returns Audio Device Unavailable

只谈情不闲聊 提交于 2020-01-04 08:37:19
问题 I've keep having an exception thrown, on and on. When i try to make a new Sequencer object, i keep getting the javax.sound.midi.MidiUnavailableException: Audio Device Unavailable exception. So, here's the code: import javax.sound.midi.*; public class MiniMusicPlayer1 { public static void main(String[] args) { try { Sequencer sequencer = MidiSystem.getSequencer(); sequencer.open(); Sequence seq = new Sequence(Sequence.PPQ, 4); Track track = seq.createTrack(); for (int i = 5; i < 61; i += 4) {

MidiSystem.getSequencer() returns Audio Device Unavailable

大憨熊 提交于 2020-01-04 08:34:27
问题 I've keep having an exception thrown, on and on. When i try to make a new Sequencer object, i keep getting the javax.sound.midi.MidiUnavailableException: Audio Device Unavailable exception. So, here's the code: import javax.sound.midi.*; public class MiniMusicPlayer1 { public static void main(String[] args) { try { Sequencer sequencer = MidiSystem.getSequencer(); sequencer.open(); Sequence seq = new Sequence(Sequence.PPQ, 4); Track track = seq.createTrack(); for (int i = 5; i < 61; i += 4) {

jruby on rails - error when star server (rails s) command is used

雨燕双飞 提交于 2020-01-03 17:44:34
问题 A error is thrown when rails s command is used in the context of my project. The following is my application settings: JRuby (1.7.0.preview2) Rails (3.2.8) IBM DB2 Express C (1.01) active-record-jdbc-adapter (1.2.2) and this is the java error: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x0155b803, pid=8552, tid=9692 # # JRE version: 7.0_06-b24 # Java VM: Java HotSpot(TM) Client VM (23.2-b09 mixed mode, sharing windows

Why is a DOM element null? [duplicate]

会有一股神秘感。 提交于 2020-01-03 17:34:46
问题 This question already has answers here : Why does jQuery or a DOM method such as getElementById not find the element? (7 answers) Closed 3 years ago . I have this simple HTML file: <!DOCTYPE html> <html> <head> <script src='test.js'></script> </head> <body> <p>I am a paragraph tag</p> <h1 >I am an h1 tag</h1> <div id="id"> I am a div tag</div> </body> And this simple script (test.js): y=document.getElementById("id"); y.style.color="green"; Why on earth is "y" null? The error I'm getting is

Postgres pg_dump cache lookup failed for index

半城伤御伤魂 提交于 2020-01-03 17:01:16
问题 I am trying to create a back-up of a postgres database using the following command (omitting details): $ pg_dump -h $host -p 5432 -U $user $db > db.sql After some time, I get an error (formatted) pg_dump: [archiver (db)] query failed: ERROR: cache lookup failed for index 1184605879 pg_dump: [archiver (db)] query was: SELECT t.tableoid, t.oid, t.relname AS indexname, pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, t.relnatts AS indnkeys, i.indkey, i.indisclustered, false AS

Program to find every list of X in Prolog

青春壹個敷衍的年華 提交于 2020-01-03 16:01:30
问题 I am starting on learning Prolog. This program tries to get all occurrences of a given element: occurences(_, [], Res):- Res is []. occurences(X, [X|T], Res):- occurences(X,T,TMP), Res is [X,TMP]. occurences(X, [_|T], Res):- occurences(X,T,Res). But here is the error: ?- occurences(a,[a,b,c,a],Res). ERROR: is/2: Arithmetic: `[]/0' is not a function ^ Exception: (11) _G525 is [] ? creep Exception: (10) occurences(a, [], _G524) ? creep Exception: (9) occurences(a, [a], _G524) ? creep Exception:

How to save android runtime error logs in device without connected to PC?

ⅰ亾dé卋堺 提交于 2020-01-02 19:10:11
问题 I just wanna to ask if it is possible to save android runtime error information in sdcard without device connected to PC? I tried to run: adb shell "logcat -v threadtime *:V > /mnt/sdcard/logcat_log.txt" which is lack of runtime error when I plug out the USB. Any thoughts? Thanks for your comments. Here some information I just digged. From the very beginning, I though this command 'adb shell "logcat -v threadtime -f /mnt/sdcard/logcat_log.txt"' will output logs into the file 'logcat_log.txt'

Glib-GIO-ERROR when opening an file chooser dialog

感情迁移 提交于 2020-01-02 10:11:26
问题 I use GTK3 , codeblcks IDE, glade3 in windows 7... In my application i have a button which when clicked should open a gtk_file_chooser_dialog... But gives the fillowing error.. Glib-GIO-ERROR** : No GSettings schemas are installed on the system static void on_save_clicked(GtkWidget *widget,gpointer data) { GtkWidget *dialog; //dialog=gtk_file_chooser_dialog_new("Save it",GTK_WINDOW(gtk_builder_get_object(builder,"mainwindow")),GTK_FILE_CHOOSER_ACTION_SAVE,GTK_STOCK_OK,GTK_RESPONSE_OK,GTK

F2Py: Working with allocatable arrays in Fortran being invoked through Python

拜拜、爱过 提交于 2020-01-01 19:12:32
问题 Using F2Py to compile Fortran routines being suitable to be used within Python , the following piece of code is successfully compiled configured gfortran as the compiler while using F2Py , however, at the time of invoking in Python it raises a runtime error! Any comments and solutions? function select(x) result(y) implicit none integer,intent(in):: x(:) integer:: i,j,temp(size(x)) integer,allocatable:: y(:) j = 0 do i=1,size(x) if (x(i)/=0) then j = j+1 temp(j) = x(i) endif enddo allocate(y(j