simon tiberius

Greenhorn
+ Follow
since Oct 30, 2012
Merit badge: grant badges
For More
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 simon tiberius



will this snippet leak? I have some assumptions:
1. in old browsers, there can only be one page in each browser window. so in old browsers, closing the browser window will clear the leak. but in newer browsers where one browser window can accommodate multiple tabs which means that one browser window can accommodate multiple pages at once, closing the one tab containing the snippet above is enough to solve the leak. so in newer browsers, no need to close other tabs that don't contain the snippet right? just the one containing the snippet is enough to "plug" the leak.
2. if I change the code to this:

will this plug the leak altogether?
thanks
When I click a button, another thread is still executing. as a result the click event has entered the queue, but the handler is not invoked yet. it's still waiting in the queue until all previous threads have finished executing. is this correct? if so, is it possible to get the time when the click first enter the queue, not the time the handler is invoked. thanks
I've tried:


but didn't work. the text in td is still on top of td. how to make it centered?


but when moving the scrollbar, the page still moves. how to stop the default behavior? thanks
I read that DOM preserves all nodes, even when the nodes that have been removed from DOM tree. the only way to truly remove these "removed" nodes is to to a page refresh. is this correct (according to latest DOM spec)? thanks
I wish to know if there's a way to check / display uncleared timer in javascript? it may be a new syntax or someway to monitor it in browser's add-on like firebug or chrome console. thanks
right now, I'm building a simple login for my web service. I'm still confused about several things:
1. do cookies deemed to be unRESTful?
2. when using https, do we have to pay to the organization (forgot the name) for a certificate? no free version of this?
thanks
11 years ago
I've tried javascript native focus event and jqery's event on element td, but none of them fired. Does element td not have focus event? thanks
I tried inserting with script, but as I thought, because it's loaded in one go, the browser stopped responding. the element inserted was 50000. so, in the end I couldn't observe anything.
^
^
I haven't been around a lot. I stumbled upon this forum when googling and just registered this month. and I had the book, but not anymore. well, technically I never have the book since it's not mine. so, care to share the technique to solve this question?
your comment sure seemed sarcastic from any perspective, but okay, if you say so.

it's not like I'm trying to ask people to test it for me, I'm just asking if anybody already know the effects and would like to share it with everyone reading this thread. that's all.
okay, so how do I test for memory? as of performance, as I said, how can I test it? can't really see it with naked eyes.
^
^
I don't know what's your problem for being sarcastic, but it would be much appreciated if you just refrain yourself from commenting if you're not in the mood to help others. no need to spread your foul mood around. after all this is a forum for developers to learn from more experienced developers. I don't think my question is offensive, just want to know the inner working of the major browsers.

In today's modern browser, it's quite hard notice the difference in speed because they're in the order of millisecond. that's why I'm asking if anyone already had the experience with this issue.
let's say at first I have a web page. in that page, initially there's only one button. if that button is pressed, a new textbox will appear under that button, pressed again, another textbox appears under the last textbox, and so on.

let's say I've pressed that button a million time (that's a million textboxes), what will the effect (cost) be? will the browser hang? will it become very slow (lagging)? or no effect?
after all, every time the page is refreshed, there will be only one button to generate.
right now I just want to test the correctness of a customer updates his order. how do I do this? mock objects or stubs? so, something like this:
I'm using JSON format because it's easier to desribe the object although the object that will be tested is java object (Order class and Part class). This JSON format represents the state of the Java objects and the changes during order update:

order = {orderid:1, customerid:7, creationdate:'2012/10/10', calculatedamount:125.00
, part:[{orderid:1, partid:5, unitcost:10, quantity:5}, {orderid:1, partid:6, unitcost:25, quantity:3}]
};

let's say I update the quantity for partid 5 to 7 and quantity for partid 6 to 5

order = {orderid:1, customerid:7, creationdate:'2012/10/10', calculatedamount:195.00
, part:[{orderid:1, partid:5, unitcost:10, quantity:7}, {orderid:1, partid:6, unitcost:25, quantity:5}]
};

all updated property are bold. what is the technique in JUnit for this? the object is Java object, not JSON, because what's being tested is the method in the service for updating order. so this is not javascript test, but a java method test. thanks
11 years ago
okay, usually I use the naming like this for resource classes : XYZResource like so:


so which one is the resource? the class OrdersResource (only one resource) or the 4 methods inside the class (there are 4 resources). because right now, the URI for orders looks like this:
all the URI starts with /order
create : /order
read : /order/{order-id}
update : /order/{order-id}
delete : /order/{order-id}

also, is it RESTful to include userID in the request header? what's the best practice to check whether a request is authenticated or not? thanks
11 years ago