Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Jason Gosling

Greenhorn
+ Follow
since Oct 18, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jason Gosling

I concern about this much. Remember in Runtime Environment Data, we have another field named "Method Area" which contains Method information and class variables as well

In my opinion, the separation between stack and heap can be deemed as following:

+ Stack: local variables (both primitive & reference) and method parameters

+ Heap: object

==>When we have a declaration like this

class A{
int e = 1;
public int math (int x, int y){
A a = new A();
return (A.e + x + y);
}
}

Then we have:

Stack: x, y, a
Heap: instance a (it is A object), a.e = 1

(Note that a in stack points out to instance a in heap)

If instance a is no longer used, it is garbage collected
9 years ago
I am trying to do a Gomuko Game on Android. Here is a part from my code to draw the board to play game. I don't know why it's wrong

For each point of board. I use an array (int board[13][13]) to contain it. May be it's wrong in android



Here is my full code: http://www.mediafire.com/download.php?25gfjdtdnzm

Please check for me if you have time

Thanks in advance
10 years ago
Hi, I have a project related to socket programming

First of all, here is my connection between client-server using UDP Socket, result can be viewed on Log Cat








It can be done, I'm sure

But my problems are


  • [*]I couldn't use TCP Socket even though it's said that it can be done with TCP, in theory
    [*]I couldn't run my example onto 2 emulators, server and client, each onto one emulator


  • =======>>>>>> I really need help. Please
    10 years ago
    I can do Socket Programming on Android with UDP like this







    But it can just run onto 1 emulator. I really want to run onto 2 emulators

    On the other hand, with Socket Programming, I can not do with TCP
    10 years ago
    Hi, I couldn't run client-server onto 2 emulators. Can somebody helps

    But, in one emulator, and run onto logcat, i can send data from client to server and server to client too
    10 years ago