« first day (1470 days earlier)      last day (3454 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
DON'T BE A JAR-JAR! :O
 
LOTS of exceptions...
xD
 
Exceptions? Checked!
;P
 
Hello, is anybody here?
 
Nope.
 
:) I have a quick question dealing with recursion.
 
4:06 PM
We all went to a party.
 
But ask!
 
recursion can be very evil
 
I call a method from my main function. The purpose is to return the inputted integer and reverse it. My method works correctly, however, I am having a little difficulty with negative integers.
So for instance,
 
4:08 PM
public int reverse(int d) { //negative integers... not working

if (d < 10 || d > -10 && d < 0) {
return d;
} else if (d>10)
{
return (int) ((d % 10) * Math.pow(10, (int) Math.log10(d)) + reverse(d / 10));

}
else
{
d = -d;
return (int) ((d % 10) * Math.pow(10, (int) Math.log10(d)) + reverse(d / 10));

}
}
I thought that I could convert the input into a positive value by mulitplying by negative 1, use the same return method except I multiply again by negative one when I print it out.
All values bewteen -10 -> any positive integer works correctly, however, for any value less than -10, it just returns the original input.
 
Integer division? What coffee are you drinking?
 
hi, anyone have used libphonenumber api
 
Starbucks? :o
 
?
 
Eh, I think your problem is within the statement:
((d % 10) * Math.pow(10, (int) Math.log10(d)) + reverse(d / 10))
 
4:11 PM
@Unihedron That's what I thought as well, but I have tested it quite a bit and it came out to be the same algorithm as others on stackoverflow. It's just for negative values that that algorithm doesn't work.
Since you can't take the log of a negative argument... I try converting said input into a positive value.
So I guess it has something to do with the if/else statements... recursion is such a pain.
 
Maybe you should use else if() instead of else.
Wait, that's not the problem.
Maybe you could try (int) ((d % 10) * Math.pow(10, (int) Math.log10(-d)) + reverse(d / 10));
 
@Unihedron hi
 
Eh, there's an edge case. When d is 10, it falls into the else clause. Might want to fix that.
@Ashutosh Hello!
 
@Unihedron can you help me on this topic
?
 
@Ashutosh Unfortunately, I've never used that library before.
 
4:14 PM
@Unihedron Yea. :(. I tried your modification and it still returns the original negative value. I'll try and think of a way to fix the edge cases and come back to you.
 
@Jun-GooKwak :(
Good luck!
 
@Unihedron anyone in your group ?
 
@Ashutosh Hmm?
Oh OF COURSE the site will be in read-only mode when I'm ready to test if the chat bot works... -_-
 
@Ashutosh What are you trying to do with that API?
 
Uni, you have a possey? :P
 
4:16 PM
@Jun-GooKwak I want to get countryCode from mobile number
if they have like +4490909099
 
@Unihedron for how long are they gonna pull that sh*t
 
@Gemtastic idkz
 
:(
I wanna play with Junior!
 
@Ashutosh Isn't this what you are looking for? PhoneNumberOfflineGeocode
 
@Jun-GooKwak PhoneNumberUtil
class
@Jun-GooKwak Actually I want to get it from this extractCountryCode() in PhoneNumberUtil class
 
4:24 PM
@Ashutosh I think I see now... PhoneNumberUtil first parses a phone number into int. It then extracts the country code and the phone number.
@Ashutosh I think you are looking into the boolean part whether it verifies that the number from the country is valid or not.
 
Does Junior want to be played with?
 
Of course he does!
He want's to come out and play always!
 
Email video... :P
 
@Joe'sMorgue Can't if the site is in read only mode and he can't login :(
 
Cute @Unihedron
 
4:26 PM
@Unihedron doesn't change the fact that Junior WANTS to play. It just says he can't
 
@Gemtastic Agreement reached.
 
:P
 
Give him something else to play with...
 
@Jun-GooKwak Actually, this method is integer type extractCountryCode() and return a number then I will call this method getRegionCodeForCountryCode() and will get countryCode
@Jun-GooKwak if any how we add the data in "currentFilePrefix" in PhoneNumberUtil
then we can get
because the same concept is working in iphone
0
Q: How to get country code from mobile number using libphonenumber api in Android

AshutoshI am using libphonenumber api https://code.google.com/p/libphonenumber/ in android project, I am getting country code using following code PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); try { PhoneNumber numberProto = phoneUtil.parse(number, "IN"); int countryCode = num...

 
@Ashutosh The way in which it extracts the country depends on how the phone is dialed. For instance, if you call internationally, its based on the IDD. If it is just a regular phone number, it takes the ISO country code after the leading +.
@Ashutosh Lines 67-95 may be of use to you.
 
4:39 PM
000 000 This message is totally star-worthy!
4
 
@Jun-GooKwak Ok, but in Iphone it is working fine, can you tell me how can I load metadata file in application ?
 
@Unihedron Starred? :o
 
@Jun-GooKwak Transcript:
 
@Unihedron Now you are tied with Gem. :)
 
O.o how did you get THAT many stars?
 
4:43 PM
@Ashutosh I'm sorry. You will have to ask someone with more experience than me. I've only learned Java for 1 month.
@Ashutosh So your two questions are 1.) how does the API extract the country code and 2.) how do you load metadata files to the application in Android?
 
@Gemtastic hax
 
@Ashutosh It says "To include the code in your application, either integrate with Maven or download the latest Jars from the Maven repository." From there I would assume you would be able to access the files from your application.
 
Unihedron; the hacker years.
 
Java2hard5me :(
 
s/5/4/
@Gemtastic Meanwhile, Tavern on the Meta:
 
4:49 PM
:O
 
XD
 
@Jun-GooKwak ok but can you help me on this point ?
 
5:23 PM
@Ashutosh The integration part?
 
HELLO! Who's still alive??
:))
 
hi
 
@LeeJeong I checked @Unihedron, I don't htink he's really alive...
 
@Joe'sMorgue I have to say I agree with you.
 
5:32 PM
ahaha!
sorry... but whaddya guys mean exactly?
xD
 
@LeeJeong Unihedron is just a ghost that hangs around in chat. :o He doesn't really exist. :)
 
oh shit. is that for real?
 
...maybe....
 
@LeeJeong Yep, Unihedron is actually* just a program that takes messages from other users and replies back. It was an AI project back in the day...
@Unihedron Hi!
Just watch and see. :)
 
I dont know who to believe now..
He was so valuable, he saved my ass a lot'a times... and then it was just a ghost..
 
5:37 PM
You people make up the most interesting of conversations, but there's nothing much to do when Stack Overflow is in read only mode.
 
Well I have to say, I never lie, except when I'm not telling the exact truth.
 
but that's still lying! is it?
 
Depends on your definition of lying...
Is StackOverflow undergoing maintenence?
 
hey @Unihedron your not a ghost are you?
 
5:38 PM
@LeeJeong Does it matter? You'll virtually never meet me in real life anyway.
 
lying, is not telling the truth.. xD couldnt have any better definition that is there?
i just felt sad when they told me your were just an AI, that i was just grateful of all your answers... and then.. i dont know. ahaha
xD thanks anw
 
Actually, that inspires me. I should upload my mind to a web server. The virtual me will be able to make money by completing freelance projects and virtually earn income, paying itself.
@LeeJeong I don't think Machine Learning field has went that far yet. :P
 
< gullible creature.
 
5:42 PM
v
 
ahahaha
 
^ hacks
or its just v
>.<
 
T.T
 
You just pointed at yourself @Jun-GooKwak
 
hats
<^>
 
5:43 PM
or caret
 
hello guys
 
hi
 
i need some brainstorming help :|
 
gives you brainstorming help you're welcome.
 
made me actually think that @Unihedron was a bot because he was always there
ahahaha
 
5:44 PM
Sorry.
 
@LeeJeong Whatever.
 
so i am developing a small webcrawler in java, but now i want to implement politeness. that means if i crawl domain A i want to crawl domain b as next and not 10 requests in a row to domain a
 
ahaha.
 
@unr3al011 Continue?
 
i use rabbitMQ as queue for urls, but how can i poll domains with different hosts?
 
5:45 PM
Eh, I'm not going to write a book here (it's 01:45 am), so what's the problem?
Also, my voting stats on SO:
 
mhhh
 
aaaaagg
 
i just dont know how to explain the problem...
 
Why so many downies. :(
 
Eh.
@Jun-GooKwak Cuz so much crap!!!
Maybe you could outline what's there and point out what's broken.
 
5:47 PM
when i add urls to the queue, i add 100x domainA.com ... and 200x domainB.com. when i poll them, they come out like they came in, but i want them to come out like domainA,domainB,domainC,domainA and so on and not domainA,domainA,domainA....
 
@unr3al011 So you're looking for a scrambling algorithm that keeps entropy just right for disorder and keep the standard deviation as distributed as possible?
 
yes, because it is impolite when i crawl 100x in a row domainA, i want them to shuffle in an efficient way
 
Eh, what collection do you store your queue?
 
rabbitMQ server
 
Is that a database?
 
5:50 PM
since it needs to be a central service.
its a "queue server"
 
@unr3al011 May be of use... Ahttps://stackoverflow.com/questions/8236046/typical-politeness-factor-for-a-web‌​-crawler
 
You have to poll it anyway. I assume you're using a java library right?
 
yes
 
@Jun-GooKwak one-boxed for prosperity:
4
Q: Typical politeness factor for a web crawler?

Loki AstariWhat is a typical politeness factor for a web crawler? Apart from always obeying robot.txt Both the "Disallow:" and non standard "Crawl-delay:" But if a site does not specify an explicit crawl-delay what should the default value be set at?

 
the main problem is,that i cannot search rabbitMQ, i just can poll.
and if i search in java, its too late, since it is already dequeued from the main server
 
5:51 PM
What do you get after polling? A list?
 
1 polling returns 1 url that needs to be crawled
 
... Is it REST?
 
www.rabbitmq.com
thats it
 
Representational state transfer (REST) is an abstraction of the architecture of the World Wide Web; more precisely, REST is an architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements. The term representational state transfer was introduced and defined...
 
i dont know yet
 
5:54 PM
You're... Coding without specifications?
 
i am just developing a prototype and test out what best works
 
Oh I see.
Night!
 
night good sir!
 
thanks ;)
 
6:11 PM
@Unihedron Night. Ah, I found a nice solution earlier to my previous question. Instead of dealing with all the if/else statements and making two algorithms, I just took Math.abs(input) so it was always positive in the method. Then in main, if input<0, i printed out output*-1, otherwise, it was just the output.
 
 
1 hour later…
7:26 PM
goodnight people! :)
 
7:59 PM
hello , is there simple way to implement failover for connecting to DB ?
 
8:23 PM
Hello
 
hello
 
 
3 hours later…
11:52 PM
Dead chat
 
00:00 - 16:0016:00 - 00:00

« first day (1470 days earlier)      last day (3454 days later) »