Head-Fi.org › Forums › Misc.-Category Forums › Members' Lounge (General Discussion) › 「Official」Asian Anime, Manga, and Music Lounge
New Posts  All Forums:Forum Nav:

「Official」Asian Anime, Manga, and Music Lounge - Page 4402

post #66016 of 130035

Is your dishwasher one of the 3 billion devices that runs Java? 

post #66017 of 130035

It says its only avaliable for the dac1 variations not the dac2 o_o. Unless it hasn't been updated? Or the dac2 just goes under a different name.

post #66018 of 130035
Quote:
Originally Posted by ThinkAwesome View Post

Is your dishwasher one of the 3 billion devices that runs Java? 

Probably, but I'm not 100% sure.

post #66019 of 130035
Quote:
Originally Posted by 28980 View Post

It says its only avaliable for the dac1 variations not the dac2 o_o. Unless it hasn't been updated? Or the dac2 just goes under a different name.

Sloot can be a very intuitive sloot sometimes.

Quote:
Originally Posted by ThinkAwesome View Post

Is your dishwasher one of the 3 billion devices that runs Java? 

It can run Pascal, Go, Lua, Haskell, R, Go, ASP.NET, Smalltalk, bash, csh, zsh (no wait), Scheme, BASIC, C#, C++.

I'll check about the Java part.

 

Quote:
Originally Posted by bowei006 View Post

I just finished my Research Proposal for Uconn ECE Western European History 

https://docs.google.com/document/d/1WOWPVJ6quoFXi49EK5AZGwinsOILA9lbtwAU317qWqw/edit?usp=sharing

Cool beans. 

Don't forget to share the entire research piece when it works out evil_smiley.gif

Quote:
Originally Posted by miceblue View Post

Wat? I'm not sure if that code is 100% correct since I haven't used Java in a year.

ph34r.gif

I'll give you 20 minutes to find out.

post #66020 of 130035

Well since you have people to help you with programming and Chinese, I might be able to help you with the linear algebra if I remember my stuff.

post #66021 of 130035
Quote:
Originally Posted by TwinQY View Post

Durp.

 

 

:(

post #66022 of 130035
Quote:
Originally Posted by TwinQY View Post

Quote:
Originally Posted by miceblue View Post

Wat? I'm not sure if that code is 100% correct since I haven't used Java in a year.

ph34r.gif

I'll give you 20 minutes to find out.

Which means nothing is wrong with it.

Or I forgot a backslash for the \! if that's what Java needs for punctuation in a string....unless that is !true.

post #66023 of 130035
Quote:
Originally Posted by ThinkAwesome View Post

Uggh. I was hoping for a stupid intro to programming question. Oh well. 

 

What are you doing now, what needs to happen instead?

 

I want to make it so that for every subdirectory one child process is generated and calls run_worker on whatever's passed in from the parent. There should only be one parent and n amount of children.

 

The parent is supposed to read in FreqRecord structures (one at a time) from the child and add each FreqRecord structure into an array with maximum elements MAXRECORDS and sort the array from high to low frequencies. When the parent reads in a sentinel structure, it will stop reading from that particular child.

 

At the end, the master process should call wait on all the children, after which it will close all the pipes to the children.

 

My problem is finding the distinction between the parent and the master process. Currently what my code is doing is to run a for loop with the maximum as # of subdirectories, in which it calls fork every time and has the child and parent processes do the sort of stuff that I wrote above. How do I get the master process to call wait on the children after this loop ends?

 

I could pastebin the code and PM it to you if you want. I'm finding it really hard to explain my problem.


Edited by mbamg - 3/18/13 at 2:31pm
post #66024 of 130035
Quote:
Originally Posted by bowei006 View Post

...

What's the topic you need for Chinese Hsitory? What years to what year? Anything specific to focus on?

 

I just finished my Research Proposal for Uconn ECE Western European History 

https://docs.google.com/document/d/1WOWPVJ6quoFXi49EK5AZGwinsOILA9lbtwAU317qWqw/edit?usp=sharing

 

RESEARCH PAPER TOPICS, PART I
1. Discuss the costs and benefits of the Grand Canal in Chinese
socioeconomic and environmental history from the Sui to the
Qing dynasties
2. How did the northern frontier shape the dynamics of Chinese
history during the Ming and Qing dynasties?
3. Discuss the role of the Jesuits and merchants in forming
connections between China and Europe
4. What were the most important contributing factors to the fall
of the Ming dynasty?
5. Was the Qing dynasty a Chinese dynasty or a Manchu empire?
6. Did the position and status of women change significantly
during the Ming and Qing dynasties? If it didn't, how did it
not? If it did, how did it?

 

 
RESEARCH PAPER TOPICS, PART II
7. What were the major factors contributing to the “High Qing”
period as a culmination of diverse strands of Chinese history?
Why did it fall apart?
8. What role did silver play in the social, political, and economic
history of the Ming and Qing dynasties?
9. How have interpretations of footbinding changed over the last
hundred years?
10. Discuss the background, structure, and impacts of the
eighteenth-century Qing granary system
11. Was the Taiping Rebellion a religious conflict or a class-based,
peasant uprising?
12. Is the history of twentieth-century China a continuation of
long-term trends in Chinese history, or is it governed by
fundamentally new dynamics?
13. Why did the Communists win the civil war with the Nationalists?

post #66025 of 130035

Quote:
Originally Posted by mbamg View Post
My problem is finding the distinction between the parent and the master process. Currently what my code is doing is to run a for loop with the maximum as # of subdirectories, in which it calls fork every time and has the child and parent processes do the sort of stuff that I wrote above. How do I get the master process to call wait on the children after this loop ends?

Not sure if its what you are asking, but fork returns 0 to the new process. You can use that to check which process is which. 

post #66026 of 130035
Quote:
Originally Posted by mbamg View Post

 

RESEARCH PAPER TOPICS, PART I
1. Discuss the costs and benefits of the Grand Canal in Chinese
socioeconomic and environmental history from the Sui to the
Qing dynasties
2. How did the northern frontier shape the dynamics of Chinese
history during the Ming and Qing dynasties?
3. Discuss the role of the Jesuits and merchants in forming
connections between China and Europe
4. What were the most important contributing factors to the fall
of the Ming dynasty?
5. Was the Qing dynasty a Chinese dynasty or a Manchu empire?
6. Did the position and status of women change significantly
during the Ming and Qing dynasties? If it didn't, how did it
not? If it did, how did it?

 

 
RESEARCH PAPER TOPICS, PART II
7. What were the major factors contributing to the “High Qing”
period as a culmination of diverse strands of Chinese history?
Why did it fall apart?
8. What role did silver play in the social, political, and economic
history of the Ming and Qing dynasties?
9. How have interpretations of footbinding changed over the last
hundred years?
10. Discuss the background, structure, and impacts of the
eighteenth-century Qing granary system
11. Was the Taiping Rebellion a religious conflict or a class-based,
peasant uprising?
12. Is the history of twentieth-century China a continuation of
long-term trends in Chinese history, or is it governed by
fundamentally new dynamics?
13. Why did the Communists win the civil war with the Nationalists?

Obviously I would choose anything from 11-13

 

but it is really up to you.

 

Advice my teacher gave me was.

 

Choose a topic that interests you. because chances are, if it interests you, it interests him. He reads hundreds of these and can't give a f***. If you couldn't when you wrote it, he won't either.

 

Him enjoying your paper already auto boosts its grade.

post #66027 of 130035
Quote:
Originally Posted by bowei006 View Post

Obviously I would choose anything from 11-13

 

but it is really up to you.

 

Advice my teacher gave me was.

 

Choose a topic that interests you. because chances are, if it interests you, it interests him. He reads hundreds of these and can't give a f***. If you couldn't when you wrote it, he won't either.

 

Him enjoying your paper already auto boosts its grade.

 

My lecturer is a Communist. I don't really know much about Marxism to give my papers some spin, though. Also, my TA's marking my paper, not my lecturer.


Edited by mbamg - 3/18/13 at 3:12pm
post #66028 of 130035
Quote:
Originally Posted by ThinkAwesome View Post

Not sure if its what you are asking, but fork returns 0 to the new process. You can use that to check which process is which. 

 

I just posted something on the course forum. I'll post it here. Maybe this will clear some stuff up:

 

Quote:
for # of subdirectories
switch (childpid = fork())
error: error
child: close fds, call run_worker
parent: close fds, write to child
end switch
end for loop

switch (childpid)
error: error (though it shouldn't be reachable)
child: do nothing
default: read FreqRecords and pass them to array until no more, then call wait (# of subdirectories) times and close pipes
end switch

Is there something wrong with my understanding of fork here? If fork runs n times and generates n children, the children would not be able to read anything until the parent actually writes something, so the children should not be able to do what they're supposed to until then, right?

Because fork copies the parent to generate the children, would the children continue running after the for loop, or would they continue to run their own for loops and fork children themselves? Am I forced to have the child exit in the first switch to prevent this occurrence if my structure is set up to allow it?

Also, is having the parent call wait inside the second switch fine? I thought because the parent only stops reading after (# of directories) sentinels have been passed to it, the children should all be finished by then, right?

I'm so confused...

 

Just tried this instead, probably makes more sense. I need to make sure that each child will not exit until the parent gets what it needs from it:

Quote:
    int j;
    for (j=0;j<subdir_count;j++) {
        int status;
        switch (childPid = fork()) {
        case -1:
            perror("fork");
            exit(1);
        case 0:
            close fds, call run_worker
            exit
        default:
            close fds, write to child
        }
    }
    
   read FreqRecords and pass them to array until no more, then call wait (# of subdirectories) times and close pipes
 

 

Also, if i have multiple children and one parent, do I need file pointer arrays?


Edited by mbamg - 3/18/13 at 3:11pm
post #66029 of 130035

Do any of you Japanophiles have hobbies/collections other than headphones with a lot of Japanese stuff? I have a fair number of other hobbies besides headphones, and over the years I've found that I tend to prefer the Japanese or German products. I think the Germans generally have better designs, but the Japanese edge them out in precision and quality control.

post #66030 of 130035
Quote:
Originally Posted by Tsujigiri View Post

Do any of you Japanophiles have hobbies/collections other than headphones with a lot of Japanese stuff? I have a fair number of other hobbies besides headphones, and over the years I've found that I tend to prefer the Japanese or German products. I think the Germans generally have better designs, but the Japanese edge them out in precision and quality control.

- Food (my parents used to work in sushi restaurant)

- Pencils (for uhmm, drawing)

- Music - CDs, japanese vinyl pressings (rock, avant-garde, experimental scene)

- Artbooks

- Instruments

- Little assorted gadgets/arts & crafts

- Tea

- Food

 

That's it. 

New Posts  All Forums:Forum Nav:
  Return Home
Head-Fi.org › Forums › Misc.-Category Forums › Members' Lounge (General Discussion) › 「Official」Asian Anime, Manga, and Music Lounge