Win a copy of Spring in Action (5th edition) this week in the Spring forum!

David Spades

Ranch Hand
+ Follow
since Feb 01, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Spades

never mind, posted to the wrong endpoint apparently. powers that be, feel free to delete this thread, you can save some memory on server, but the real reason is so that I can save my dignity.
Cheers

Bear Bibeault wrote:Perhaps you should show us that code.



which code? you mean the "need to do something here?" part?
that's the problem, I completely have no idea what to do, and success is currently blank.

Paul Clapham wrote:Do you mean that the Ajax response includes a cookie which is supposed to be noticed by the browser?



correct
Hi all,

I'm building a simple web application that sends cookie and json payload. I'm currently struggling with the front end. in the front end, I'm using jquery's $.ajax to communicate with server, but the cookie just doesnt seem to get picked up by browser (Windows 7, latest chrome 47.xxx). Following is the code:



Is there something I need to do inside "success" callback?
Hi,

I'm typing a method from an interface from jar and during autocomplete, I got


I was sure that the signature was


what can I do so that during autocomplete I can get the human-readable param name? I'm using eclipse mars with java 1.7

Thanks
2 years ago
Hi,

First, perhaps it's better to explain the problem background
I'm tracking 100K+ items sold on various store chains globally. each has item name, store chain name, manufacturer, sales country and date dimension. There are 4 facts that I record --> sales volume, manufactured volume, defect volume and returned volume. Sample of report I want to generate:
* top n items with highest average daily sales volume increase during the whole 2014

I'm trying to do aggregate operations on several millions facts vs decades of time. I just recently stumbled upon columnar DBMS. My question :

1. Are OLAP cubes and columnar DBs partners or competitors in DW?
2. If they're competitors, which is better? there will be no optional columns (sparseness) in my transactional data.

Thanks
3 years ago
still doing some research, but most likely hmac sha256. also, is it safe to have one secret key per application as opposed to 1 secret key per user? and how often should I change the secret key? or can I use the same secret key forever? thanks
3 years ago
Hi all,

I'm trying to create a secret key string for my mac. I have 2 questions:
1. will there be a problem if I include chinese, japanese, cyrillic characters in the secret key string?
2. what's the best length for the secret key?

Thanks
3 years ago
@all:
damn, you're right. 4.08 - 9.05 --> that's 5 hour difference, not 5 minutes. sorry about that.
signs of brain overload, time for some relaxation and it's friday, tequila time.
thanks for the suggestions.
3 years ago
@Campbell:
what do you mean?
4.08 am mean 8 past 4 in the morning. I dont include the seconds in the time. most people dont include seconds when referring to any specific point of time, meeting at 8.15 sharp or the show at 9.30. but okay, fair point, since this is programming forum and most application deals with time down to seconds part.
3 years ago
max 5 requests in any 5-minute window

there are 6 requests between 4.08am to 9.05 am (less than 5 minutes)
3 years ago
your approach wont work for this case

max 5 requests in any 5-minute window
4.03 am
4.08 am
6.10 am
8.02 am
9.02 am
9.03 am
9.05 am --> violated
3 years ago
ok, so what I'm trying to do is "guard" a certain method with a certain access frequency.
lets say I want the method not be accessed more than 60 times within any 5-minute window. so everytime the method is accessed:
1. it will first get "now" timestamp
2. check if the timestamp diff of first access token in queue and "now" is MORE than 5 mins
3. if #2 condition is met, pop first access token, create new access token and push said access token
4. if #3 condition is not met, then sleep

Thanks
3 years ago
I see. so for my operations:
1. add element always at the end
2. remove element always at the beginning
3. no iteration, no random access and no synchronization

LinkedList is best options in java 8, yes?
just want to make sure with those already using this impl if there's a better way or if linkedlist has undesirable side effects.
thanks
3 years ago
Hi all,

I want to know what's the best impl for queue (FIFO) in java 8. These are the only operations I'm gonna do to the collection:
1. add element (always at the tail)
2. remove element (always at the head)
no random access, no iteration, no synchronization needed, and it will have a fixed max size.

I saw that many people say linkedlist must be avoided (memory issue, etc), but arraylist is inferior in speed for the 2 operations I need compared to linkedlist.

Thanks
3 years ago