Looping Problem-Index
Dear all,
I am unable to get the index read correctly for my IT_DISPLAY table.There are 2 values in plaf table and multible in display table.
how to get the correct index value for my display table?since currently it is on plaf table.due to this index problem,my values get moved incoreectly
code is as follows
SORT IT_AFPO BY PLNUM.
SORT IT_PLAF BY PLNUM.
LOOP AT IT_AFPO INTO WA_AFPO.
LOOP AT IT_PLAF INTO WA_PLAF.
W_INDEX = SY-TABIX.
IF WA_PLAF-PLNUM = WA_AFPO-PLNUM.
MOVE:WA_PLAF-GSMNG TO WA_DISPLAY-GAMNG.
MODIFY IT_DISPLAY INDEX W_INDEX FROM WA_DISPLAY TRANSPORTING GAMNG.
ENDIF.
CLEAR:WA_PLAF,WA_DISPLAY.
ENDLOOP.
CLEAR:WA_AFPO.
ENDLOOP.
Hai Rahul try like this..
SORT IT_AFPO BY PLNUM.
SORT IT_PLAF BY PLNUM.
LOOP AT IT_AFPO INTO WA_AFPO.
read table IT_PLAF INTO WA_PLAF with key PLNUM = WA_AFPO-PLNUM binary search.
if sy-subrc eq 0.
W_INDEX = SY-TABIX.
MOVE:WA_PLAF-GSMNG TO WA_DISPLAY-GAMNG.
MODIFY IT_DISPLAY INDEX W_INDEX FROM WA_DISPLAY TRANSPORTING GAMNG.
endif.
ENDIF.
CLEAR:WA_PLAF,WA_DISPLAY.
CLEAR:WA_AFPO.
ENDLOOP.
if you have to do a loop in a loop
SORT IT_AFPO BY PLNUM.
SORT IT_PLAF BY PLNUM.
LOOP AT IT_AFPO INTO WA_AFPO.
LOOP AT IT_PLAF INTO WA_PLAF where PLNUM = WA_AFPO-PLNUM .
W_INDEX = SY-TABIX.
MOVE:WA_PLAF-GSMNG TO WA_DISPLAY-GAMNG.
MODIFY IT_DISPLAY INDEX W_INDEX FROM WA_DISPLAY TRANSPORTING GAMNG.
CLEAR:WA_PLAF,WA_DISPLAY.
ENDLOOP.
CLEAR:WA_AFPO.
ENDLOOP.
Similar Messages
-
SOLUTION - Re-Index Loops when "Index Now" button is broken
This message is for anyone having trouble with Soundtrack's loop indexing in the following way:
PROBLEM:
... You want to re-index some loops, or
... You want to de-index some loops, or
... Some loops are showing up red
AND...
... You cannot re-index from the "Setup..." button in the Search palette (the minus button and/or "Index Now" buttons are grayed out for some unknown reason)
*HERE IS THE POSSIBLE SOLUTION:*
... Delete all files from the following folders:
Library/Preferences/Soundtrack/
Library/Audio/Apple Loops Index/
... Now restart Soundtrack, and click "Setup...". All the indexed directories should be gone.
... You'll have to re-add and re-index your whole library. This may also affect GarageBand and/or Logic, and require re-indexing in them as well.
*If you're still having trouble...* there may be some more index files floating around your system. Open Spotlight and set "System Files are Included" and "File Name" in the search options and search for "search index". This should show you where any remaining Apple Loop search index files are located, so you can delete them. They will be named stuff like "Search Index E44B5969-5E4A-4E27-A3C2-E5861C5D1FB8.txt".
Hope this helps anyone else out there. It worked for me with Soundtrack 1.1 when my loops were all messed up.Well, to add metadata and transients to sound clips you need to edit them in Apple Loop Utility which is included with Final Cut Studio.
To add custom loops to your permanent library you need to make a new folder like "My Loops" and put it somewhere permanent like in Library/Audio/Apple Loops and then index it with Soundtrack/GarageBand/Logic. Soundtrack uses the "Setup..." list and GarageBand you can just drag and drop into the loop browser. Not sure about Logic but it should be something similar.
If you wanted to edit the index files manually from the Finder, they are in some weird format and I don't think it's possible. -
Not the usual 'login loop' problem, help.
The login loop problem I'm facing is not the usual login loop problem when starting up mac; it's when I'm trying to log into websites or applications (most of them, eg. facebook, instagram).
I have tried:
using other browsers: Safari, Firefox, Maxthon, Chrome
clearing all cookies / caches / keychains / passwords
repairing disk
deleting launchservices cache
using other userid to login
All to no avail.
How do I solve this without having to reformat/install mac?
Thank you.Hi, are you using Parental contrils or a managed account, or an admin account?
Using any Anit-Vrus software? -
Trying SSH CLI , reading command line method is infinte loop problem!
I am trying excute command and reading result. but reading result part has problem.
below source is a part of my method.
try{
SessionChannelClient sessionChannel = ssh.openSessionChannel();
sessionChannel.startShell();
OutputStream out = sessionChannel.getOutputStream();
String cmd = s + "\n";
out.write(cmd.getBytes());
out.flush();
InputStream in = sessionChannel.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
byte buffer[] = new byte[255];
String read= "";
while (true) {
String line = br.readLine();
if (line == null)
break;
str += line;
str += "\n";
System.out.print(str); //print result
sessionChannel.close();
in.close();
out.close();
}catch(IOException ee){
System.out.println(ee);
}finally{
System.out.println("=============end cmd=============");
while loop has problem. While statement has infinite loop problem.
why has this problem?
anybody, help me please. Thanks for reading .
Edited by: BreathAir on Aug 5, 2008 12:16 AMThat loop will loop until readLine() returns null, which will only happen when the other end closes its end of the connection, and it will block while no data is available.
-
Sony D-50 "boot-up loop" problem
I have a Sony D-50 portable recorder barely three months old that did something totally strange. Has anyone else had this problem?
During a shoot yesterday, I noticed that the Sony D50 I bought back in August would not turn OFF.
When I moved the power switch to the OFF position, the machine went into a "boot up loop," that is:
I'd turn it OFF after recording.
Screen goes black.
I get the "See you!" message.
Screen lights up again.
The word "SONY" appears as though it's gonna boot up,
Then the whole process starts over again
Screen goes black.
I get the "See you!" message.
Screen lights up.
The word "SONY" appears as though it's gonna boot up....
So, same thing late last night.
I get up this morning and turn it ON; it works fine until I turn it off, then it goes back into the "boot loop" thing again.
I tried everything I could think of, even searching for a "RESET" on the machine and in the Menu. I finally had to take the batteries out of it to shut it down.
Then, I did something that apparently---so far---fixed it.
This is so strange---right out of the Twilight Zone:
I put the batteries back in it, then it starts the loop again.
Since it won't turn OFF, I take the batteries out of it in the OFF position. I wait five minutes and put the batteries back in it with it in the OFF position.
Same problem---the "boot up loop" thing.
I take the batteries back out of it again in the OFF position and wait fifteen minutes. I put the batteries back in it while it's still in the OFF position. Guess what?
Problem solved: It's doesn't start the "boot up loop" thing.
So, I turn it back ON. Machine boots up fine and is ready to record.
OK, I turn it OFF.
Back to the exact same problem---It shuts down and goes into the "boot up loop" again.
I go back through the same process of removing and installing the batteries with the machine in the OFF position.
Nothing changes.
Then, I have an idea.
With the machine in the OFF position and going through the "boot up loop" thing, I remove the batteries.
I then move the power switch to the ON position before I put the batteries back in it---had not tried that before: reinstalling the batteries with it in the ON position. I install the batteries with the machine in the ON position.
Machine boots up fine and is ready for recording.
Now, I turn it OFF.
The machine shuts down fine with no "boot up loop" problem.
Putting the batteries back in the machine with it in the ON position instead of the OFF position apparently solved the problem.
So, I turn it back ON and then OFF several times.
Same thing: No "boot up loop" problem.
Do-do-Do-do....
The machine now works fine.
Anyone ever had this happen to a Sony D-50?
I'm wondering if I should send it to back to Sony before it does this again. For God's sake, it's only three months old!
I bought it after rave reviews in the "recorder" community, and I haven't found anyone else who has had this problem with one..Sorry to see that you were having this issue with your PCM-D50 Linear PCM Recorder - if you continue having the issue the unit may need service - give Sony Business and Professional team a call and they will be happy to assist:
http://pro.sony.com/bbsc/ssr/services.s ... port.shtml -
Problems indexing 30M documents
Platform: Sun 4800, 12 CPU, Solaris 9, 48 Gb RAM
Oracle Version: 10.1.04
Database Character Set: UTF-8
SGA MAX SIZE: 24 Gb
hi,
Our database contains a mix of image files and plain text documents in 30 different languages (approximately 30 million rows). When we try to index the documents (using IGNORE in the format column to skip the rows containing images), the indexing either bombs out or hangs indefinitely.
When I first started working on the problem, there were rows in the ctx_user_index_errors table which didn't really give any good indication of what the problem was. I created a new table containing just these rows and was able to index them with no problems using the same set of preferences and the same indexing script. At that time, they were using just the BASIC_LEXER.
We created a MULTI_LEXER preference and added sub-lexers when lexers existed for the specified language, using the BASIC_LEXER as the default. When we tried to create the index using a parallel setting of 6, the indexing failed after 2 hours, and we got the following error codes: ORA-29855, ORA-20000, DRG-50853, DRG-50857, ORA-01002, and ORA-06512. We then tried to create the index without parallel slaves, and it failed after 3 hours with an end of file on communication channel error.
Thinking perhaps that it was the MULTI_LEXER that was causing the problem (because the data is converted to UTF-8 by an external program, and the character set and language ID is not always 100% accurate), we tried to create the index using just the BASIC_LEXER (knowing that we wouldn't get good query results on our CJK data). We set the parallel slaves to 6, and it ran for more than 24 hours, with each slave indexing about 4 million documents (according to the logs) before just hanging. The index state in ctx_user_indexes is POPULATE, and in user_indexes is INPROGRESS. There were three sessions active, 2 locked, and 1 blocking. When we were finally able to ctl-C out of the create index command, SQL*Plus core dumped. It takes hours to drop the index as well.
We're at a loss to figure out what to try next. This database has been offline for about a week now, and this is becoming critical. In my experience, once the index gets hung in POPULATE, there's no way to get it out other than dropping and recreating the index. I know that Text should be able to handle this volume of data, and the machine is certainly capable of handling the load. It could be that the MULTI_LEXER is choking on improperly identified languages, or that there are errors in the UTF-8 conversion, but it also has problems when we use BASIC_LEXER. It could be a problem indexing in parallel, but it also dies when we don't use parallel. We did get errors early on that the parallel query server died unexpectedly, but we increased the PARALLEL_EXECUTION_MESSAGE_SIZE to 65536, and that stopped the parallel errors (and got us to the point of failure quicker).
Any help you can provide would be greatly appreciated.
thanks,
Tarisa.I'm working with the OP on this. Here is the table definition and
the index creation with all the multi_lexer prefs. The table
is hash partitioned, and we know the index cannot be
local because of this, so it is a global domain index.
Perhaps of interest, we have changed PARALLEL_EXECUTION_MESSAGE_SIZE
from the default up to 32K. This made a huge difference in indexing speed, but
so far has just helped us get to the point of failure faster.
CREATE TABLE m (
DOC_ID NUMBER,
CID NUMBER,
DATA CLOB,
TYPE_ID NUMBER(10),
FMT VARCHAR2(10),
ISO_LANG CHAR(3)
LOB (data) store as meta_lob_segment
( ENABLE STORAGE IN ROW
PCTVERSION 0
NOCACHE
NOLOGGING
STORAGE (INITIAL 32K NEXT 32K)
CHUNK 16K )
PARTITION BY HASH ( doc_id )
PARTITIONS 6
STORE IN (ts1, ts2, ts3, ts4, ts5, ts6),
pctfree 20
initrans 12
maxtrans 255
tablespace ts
ALTER TABLE m
ADD (CONSTRAINT pk_m_c PRIMARY KEY (doc_id, cid)
USING index
pctfree 20
initrans 12
maxtrans 255
tablespace ts
nologging )
BEGIN
ctx_ddl.create_preference('english_lexer', 'basic_lexer');
ctx_ddl.set_attribute('english_lexer','index_themes','false');
ctx_ddl.set_attribute('english_lexer','index_text','true');
ctx_ddl.create_preference('japanese_lexer','japanese_lexer');
ctx_ddl.create_preference('chinese_lexer','chinese_lexer');
ctx_ddl.create_preference('korean_lexer','korean_morph_lexer');
ctx_ddl.create_preference('german_lexer','basic_lexer');
ctx_ddl.set_attribute('german_lexer','index_themes','false');
ctx_ddl.set_attribute('german_lexer','index_text','true');
ctx_ddl.set_attribute('german_lexer','composite','german');
ctx_ddl.set_attribute('german_lexer','mixed_case','yes');
ctx_ddl.set_attribute('german_lexer','alternate_spelling','german');
ctx_ddl.create_preference('french_lexer','basic_lexer');
ctx_ddl.set_attribute('french_lexer','index_text','true');
ctx_ddl.set_attribute('french_lexer','index_themes','false');
ctx_ddl.set_attribute('french_lexer','base_letter','yes');
ctx_ddl.create_preference('spanish_lexer','basic_lexer');
ctx_ddl.set_attribute('spanish_lexer','index_text','true');
ctx_ddl.set_attribute('spanish_lexer','index_themes','false');
ctx_ddl.set_attribute('spanish_lexer','base_letter','yes');
ctx_ddl.create_preferences('global_lexer','multi_lexer');
ctx_ddl.add_sub_lexer('global_lexer','default','english_lexer');
ctx_ddl.add_sub_lexer('global_lexer','english','english_lexer','eng');
ctx_ddl.add_sub_lexer('global_lexer','gernan','german_lexer','ger');
ctx_ddl.add_sub_lexer('global_lexer','french','french_lexer','fra');
ctx_ddl.add_sub_lexer('global_lexer','spanish','spanish_lexer','spa');
ctx_ddl.add_sub_lexer('global_lexer','japanese','japanese_lexer','jpn');
ctx_ddl.add_sub_lexer('global_lexer','korean','korean_lexer','kor');
ctx_ddl.add_sub_lexer('global_lexer','simplified chinese','chinese_lexer','zho');
ctx_ddl.add_sub_lexer('global_lexer','traditional chinese','chinese_lexer');
END;
BEGIN
ctx_output.start_log('m_ctx_data.log');
END;
CREATE INDEX m_ctx_data ON m (data)
INDEXTYPE IS ctxsys.context
PARAMETERS ('memory 1G
lexer global_lexer
format column fmt
language column iso_lang
sync (every "sysdate+1")' )
PARALLEL 6
BEGIN
ctx_output.end_log();
END;
/ -
Possible solution to "Looping" problem
Hello all, I've read several threads here dealing with a "looping" problem, I'm not sure what the ins-and-outs of this issue is but it seems to affect many different config and different manufacturers are blaming each other... check out the link below (mind the wrapping) for what might be a real solution at the Via forums. I happened upon this because I could not get a stable system out of my MSI via-km266 mobo with dual display.
http://forums.viaarena.com/messageview.cfm?catid=25&threadid=9263&highlight_key=y&keyword1=dual%20display
Alpay EnoWhat is the problem? Let the filters return a List instead of an array. Am I missing something?
Kaj -
I'm having a problem with loops and indexes. (indices? ha)
I'm building a Frequency Histogram table. I have a Histogram method below me, but it's showing up errors for the lines I put in bold. The error is "cannot find "i" variable". What should I do? Thanks in advance for the help.
public void histogram(int numClasses){
int frequency[];
int k = 0;
double midpoint = 0;
frequency = new int[numClasses];
int classWidth = 0;
classWidth = (((int)this.max() - (int)this.min()) + 1) / numClasses;
for (int i = 0; i < data.size(); i++){
if ((0 <= i) && (i < numClasses)){
if ((((this.min() - 0.5) + (data.get(i)*classWidth)) <= data.get(i)) && ( data.get(i) < ((this.min() - 0.5) + ((data.get(i)+1)*classWidth))))
k = (int)((data.get(i) - (this.min() - 0.5) / classWidth));
frequency[k]++;}}
for (i = 0; i < numClasses; i++){
midpoint = (int)this.min() - 0.5 + (k + 0.5) * classWidth;
System.out.println(""+midpoint+" |");
for (int j = 1; j < frequency; j++){
System.out.println("*");
System.out.println();for (int i = 0; i < data.size(); i++) {
<snip>
for (i = 0; i < numClasses; i++){
}It looks like you are reusing the variable i in the same scope, but it's hard to tell with the lack of [cod[b]e] tags and no formatting.
Try using a different variable for the second loop there, like n or sokething. -
Hi there,
This is the second time I have posted this problem, as the last solution I was offered did not seem to work. Here is the problem:
I have written a method to search through a text file for a word and replace it with another word. That word can either be on its own in the document or as part of another word. So, if the search word was "foot" and the replace word was "dog", the word "football" in the document would become "dogball".
This method works fine, except for when the replace word is the same as the search word. Basically, if someone searched for "dog" and wanted to replace it with "dog dog" or even just "dog", the program goes into an infinite loop. I understand why it is doing this, but I don't know how to prevent it from happening.
Now, to make it worse I have to stick to this array style structure and method of solving the problem. I know there is a way to do this by building temporary strings and then concatenating them at the end and returning them to their previous position in the array. The reason I know this is because a friend of mine has managed it. She also happens to be a girl.
So, I am asking you all to assist in defending men's intelligence by helping me see where I am going wrong in this method. Please.
Here is the method:
// Search the document for a string and replace it with another string
public String [] SearchReplace() {
// Declare variables to be used in the method
String SecondSubstring;
String FirstSubstring;
int ReplaceNumber = 0;
// Loop through the lines of text stored as strings contained in the array
for (int i = 0; i < NumberOfLines; i++) {
// As long as the string contains an instance of the search string, run the method
while (StrArray.indexOf(SearchW) >= 0) {
// Make a string of all the characters after the search word
SecondSubstring = StrArray[i].substring(StrArray[i].indexOf(SearchW) + SearchW.length());
// Make a string of all the characters before the search word
FirstSubstring = StrArray[i].substring(0, StrArray[i].indexOf(SearchW));
// Concatenate FirstSubstring with the replace word to make a new string
String FirstHalf = FirstSubstring.concat(ReplaceW);
// Concatenate the new string with SecondSubstring to make the whole replaced string
String FullString = FirstHalf.concat(SecondSubstring);
// Put this altered string back to its original place in the array
StrArray[i] = FullString;
// Increment ReplaceNumber to count the replacements made
ReplaceNumber++;
// Print the numbers of replacements made
System.out.println("\nA total of " + ReplaceNumber + " changes made.\n");
// Display the searched and replaced contents of the file
return StrArray;
Any suggestions, pointers or solutions would be much appreciated.
Thanks very much.Doing it the "old fashioned" way:
You need to keep track of a "from index" so you don't search through parts of the string you've already replaced:
public static void main(String args[]) {
try {
String[] lines = new String[] {
"the dog went up the dog hill",
"all dogs go to dog heaven",
"the dogball takes place on 3rd april"
lines = replace(lines, "dog", "dog dog");
for (int i = 0; i < lines.length; i++) {
System.out.println(lines);
} catch (Exception e) {
e.printStackTrace();
private static String[] replace(String[] lines, String searchWord, String replaceWord) {
if (searchWord.equals(replaceWord)) return lines; // nothing to do
for (int i = 0; i < lines.length; i++) {
int fromIndex = 0; // from index to do indexOf
String line = lines[i];
while (line.indexOf(searchWord, fromIndex) != -1) {
final int index = line.indexOf(searchWord, fromIndex);
line = line.substring(0, index) + replaceWord + line.substring(index + searchWord.length());
fromIndex = (line.substring(0, index) + replaceWord).length();
lines[i] = line; // replace
return lines; -
I have a problem with a while loop in this code and it is really holding me up doing my degree. I can see nothing wrong with it but perhaps someone here can help. I would be really greatful if someone could. I have commented the line where the while loop starts about a third of the way down the code.
Thanks
Michael
if (ae.getSource()==client_open)
int row=0;
check=true;
row=client_listing.getSelectedRow();
try
System.out.println("information[row][1] is "+information[row][1]);
if(information[row][1]!=null) //if the index is not null. Comment out this if statement to troubleshoot
try
InetAddress inet=InetAddress.getByName(information[row][1]);
//Create a client socket on the listeners machone on port 7070
client_socket=new Socket(inet,7070);
System.out.println("Client port open on 7070 ");
//Get the output as well as the input streams on that socket
BufferedOutputStream out=new BufferedOutputStream(client_socket.getOutputStream());
BufferedInputStream br_socket=new BufferedInputStream(client_socket.getInputStream());
XMLWriter writer=new XMLWriter();
writer.requestFString("SHOWFILES"," ");
String file_data=writer.returnRequest();
byte file_bytes[]=file_data.getBytes();
int file_size=file_bytes.length;
byte b[]=new byte[1024];
// The methos takes a byte array and it's length as parameters and return
// a byte array of length 1024 bytes....
add_on upload=new add_on();
System.out.println("Class of add_on created sucessfully");
b=upload.appropriatelength(file_bytes,file_size);
out.write(b,0,1024);
/*An output stream is also initialised. This is used to store all the response
from the listener */
BufferedOutputStream out_file=new BufferedOutputStream(new FileOutputStream("response.xml"));
int y=0;
byte f[]=new byte[32];
System.out.println("Entering while loop");
//This while loop is not working. Any ideas. It just hangs here
while((y=br_socket.read(f,0,32))>0) //the socket input stream is read
out_file.write(f,0,y); //written on to the file output stream, y bytes from f start @ ofset 0
out.close();
br_socket.close();
out_file.close();
System.out.println("Exited while loop and closed streams");
catch(Exception e)
client_socket=null;
check=false;
System.out.println("Didnt enter try");
try
client_socket.close();
catch(Exception e)
System.out.println("Error occuered "+e.getMessage());
row=0;
if(check) //If the exception occurs then do not come here
Vector parameters=new Vector();
// A class SParser is also used here this class has a function/method of
// the name perform which calls the xml parser to parse the xml file
// generated by the response from the client soket...
// the function perform returns a Vector which has the files/directories,
// along with their flag information and size in case of files....
SParser sp=new SParser();
System.out.println("SParser object created sucessfully");
parameters=sp.perform("response.xml");
System.out.println("Parsing finished ");
// The vector value returned by the xml parseris then passed as one of
// the parameters to a class named file_gui this class is responsible for
// displaying GUI consisting of a table and some buttons along with the
// root information and flag..
// Initially since the class is called for the first time the parameter
// for the root is given the name "ROOT" and the Flag is set to "0"..
file_gui showfiles=new file_gui(parameters,information[row][1],"Root","0");
showfiles.show();
check=false;
} //end if
} // end if
} //end try
catch(Exception e)
row=0;
} //end of ae.getSource()Why do you think it hangs at the while loop, eh? You need to put in additional printlns to justify your assertion. It takes alot less time to diagnose if you put in specific try/catch blocks with their own printlns - even if it is not as much fun. When you get into these kinds of troubles, there is no shame in putting in prints at each statement or logical point to track down the actual fault.
~Bill -
I have a database table with columns as follows.
racerID
race1
race2
race3
race4
race5
race30
totalScore
I do my query as follows:
SELECT *
FROM races
WHERE racerID = URLVar
I want so loop through the query results to list the points
by race... my problem is that they are all in one record...
I tried these:
<cfloop index="i" from="1" to ="30">
<p>#races.race#i##</p>
</cfloop>
I also tried using square brackets around i at the end of
races.race...
How can i reverence a field name using i?
All help is appreciated. I have had this problem on more than
one site i have done and i have always just broke down and typed
all the code out for each field, but there has to be an easier
way.Just from what you have listed, this seems to be a bad data
model design. What happens if you add another race? You would have
to add another column to your table. You might consider having a
racer table, with all of the attributes associated with a racer, a
race table with all of the attributes associated with a race, then
an "associative entity" (link table) to link race with racer. This
race_racer table would have the ID for the racer, and the ID for a
given race, and the points for that race and racer so that you
could find race info for any particular racer of race by joining
these tables. Then it would be a snap to list the points by race or
racer using SQL and not having to use outside loops, etc. In other
words, normalize your data.
<edit> looks like Dan beat me to it </edit>
Phil -
Loop Problems. There are no Apple Loops installed on your System.
When I first open Garage Band I get a message that says
"There are no Apple Loops installed on your System. Please reinstall the Apple Loop Package"
Where is the Loop Package, how do I reinstall it, and overall.. how do I fix this problem?WH,
I did and with no luck. But I was able to solve the problem.
What I found out was that the folder under the main library has the wrong rights which wouldn't allow the index files to be updated.
So, I change the Audio folder and all enclosed folders to allow All Others the ability to Read/Write. I deleted the files out of the Apple Loops Index and launched GB. I dropped a loop onto the loop browser and the index was rebuilt.
Eventually I copied the Jam Pack folders over to the Macintosh HD > Library > Audio > Apple Loops > Apple folder. Then dopped another loop on the loop browser for the index to be rebuilt again. Doing this allowed all users on this computer to have access to the loops.
Race.
Message was edited by: Race Proffitt -
Hi,
I'm having trouble with this char loop of mine. It tells me that there is a .class that is expected and I'm not too sure as to what that is...
I'd like each value coming out of the loop to go into this char array and then to be converted to a string
for (char x= ' '; x <= '~'; x++)
char[] myChars = x.toCharArray();
String y = new String(myChars);Can anybody help me please? Much appreciated!Let's look at your code each line at a time.
StringBuffer catcher = new StringBuffer(); creates the stringbuffer, no problem here
int arrsize = 128;
char[] arrs = new char[arrsize]; creates an array of char 0 to 127. Perhaps unknown to you, but I believe that this array is initialized such that each element is set equal to 0 or more precisely, (char)0.
for (char x= ' '; x <= '~'; x++)
catcher.append(arrs[x]);Here's a problem. Loops through all chars of interest. That's ok, BUT you haven't done anything to the array. It's still filled with nothing but 0's, and then you take elements of the array (not starting at array index 0 mind you), and stick them into the StringBuffer. In the end what do you have? A StringBuffer that is stuffed with nothing but (char)0. Not very useful at all. You need to do a couple of things here and you have a choice.
1. First and foremost, always use curly braces in all of your for loops, if, else, and similar statements. It may seem like overkill, but it will save you a world of worry some day, trust me.
2. Next either put the correct char in the array or in the StringBuffer. The correct character is x, just x, not arrs[x], but just simply x. So to put it into your StringBuffer you'd call cather.append(x);
3. As an alternative, you could fill the array, but if you did, you should start at index 0, not index (int)' '. That can be done like so:
import java.util.Arrays;
public class Fubar2
public static void main(String[] args)
char firstChar = ' '; // to make it easy later
char lastChar = '~'; // to make it easy later
// let java do the dirty work of calculating array size
int arrsize = lastChar - firstChar + 1;
char[] arrs = new char[arrsize];
for (char x = firstChar; x <= lastChar; x++)
arrs[x - firstChar] = x; // array index starts at 0
System.out.println(Arrays.toString(arrs));
} -
P55 GD 80 Lock Up Sound Loop Problem
Hello, I recently built a new i5 GD 80 computer two months ago. From almost day one Ive had problems on the desktop and in games with a hard lock screeching sound loop. At first I thought it was my PSU or GTX 280. So I swaped in new PSU and an ATI 5870 from another computer I have and got the same thing. However the GTX 280 will lock up, purple screen chicken wire, and sound loop. Where the 5870 does all but doesent purple screen. Ive exhausted my mind trying to troubleshoot this for the last two months and am probly going to have to RMA. I will list what Ive tried and my full specs. Again I have another computer to test the vid cards in and they run fine. Anyone that can help would be apperciated, thanks.
-two different OS's on two different HD's Vista and Win 7
-two vid cards with at least 4 differnt drivers
-two different PSU's
-onboard and xfi sound card
-two pcie slots
-memtest 1 hour passed
-super pi 1 hour passed
-load temp of cpu 40c load temp of gpu's 70c
-checked and rechecked all PSU connections
-updated BIOS's through 1.7
-Bios fail safe defaults
Full Comp Specs
win vista and 7
two Raptor 150's
i5 920
4 gigs Corsair
Corsair PSU hx620 and hx750
x fiCheck stability with Orthos http://sp2004.fre3.com/beta/orthos_exe_20060420.cab
For details ==> https://forum-en.msi.com/index.php?topic=103598.msg760534#msg760534
Also stress test VGA with MSI Kombustor:
http://event.msi.com/vga/afterburner/images/MSIAfterburnerSetup151.zip
Post back results -
Loop using index read ( internal table)
Hi,
I thought of impelementing loop at ITAB using read statements, Here it goes.
REPORT Z_LOOP_IMPROVE.
DATA : T_OUTPUT TYPE STANDARD TABLE OF MARC WITH HEADER LINE,
L_TABIX TYPE SY-TABIX.
DEFINE ILOOP.
DO.
IF SY-INDEX EQ '1'.
READ TABLE &1 WITH KEY &2 = &3 BINARY SEARCH.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ELSE.
L_TABIX = SY-TABIX + 1.
READ TABLE &1 INDEX L_TABIX.
IF SY-SUBRC NE 0 OR &1-&2 NE &3.
EXIT.
ENDIF.
ENDIF.
END-OF-DEFINITION.
DEFINE IENDLOOP.
ENDDO.
END-OF-DEFINITION.
DATA : T1 TYPE I, T2 TYPE I.
SELECT * FROM MARC INTO TABLE T_OUTPUT.
SORT T_OUTPUT BY WERKS.
GET RUN TIME FIELD T1.
ILOOP T_OUTPUT WERKS '0001'.
WRITE : / T_OUTPUT-MATNR, T_OUTPUT-WERKS.
IENDLOOP.
GET RUN TIME FIELD T2.
T2 = T2 - T1.
WRITE : / T2.
*C----
But sadly it takes more time than a normal loop with
where condition.
can anyone suggest some ideas to improve execution speed?You can use a binary read to get the first record. Then read each record sequentially until you have proccessed all the records that meet your critera. You will have to have the internal table sorted so that the binary search and subsequent reads will work:
READ TABLE itab WITH KEY
field = whatever
BINARY SEARCH.
IF sy-subrc = 0.
itab_index = sy-tabix.
DO.
IF sy-subrc = 0.
IF itab_data-field = whatever
itab_index = itab_index + 1.
READ TABLE itab_data INDEX itab_index.
ELSE.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
Rob
Maybe you are looking for
-
I've been using Muse for about a month, with no problems. Today, I have repeatedly crashed with the error "Adobe Muse Stopped Working". This happens 10 minutes or so after I open Muse. It happens whether or not I have another app open. I tried closin
-
CC and Photoshop CC just do not want to properly work.
Okay so this is starting to become a major problem which I am getting stressed out about and it is taking a huge chunk out of my ability to work. OS: Win 7 (x86) Last Thursday I purchased CC and downloaded Photoshop CC, everything installed fine asid
-
I can't find the PS CS5 to install the trial anyways... so i need a solution
-
Hi, I would set as warnig, in a development client, the message error KI235 "Account & requires an assignment to a CO object" How can I do this ? Thanks Best regards
-
Hello, Can someone tell me the table where I can see the SAP customer block ? Thanks. Regards, Rajesh.