abdulrehman

Activity Graph

Page 1 of 2 | Next »

2015-10-08

[17:23:10] abdulrehman: has joined #ruby

2015-09-30

[19:44:38] abdulrehman: has joined #ruby
[20:34:26] abdulrehman: has joined #ruby

2015-09-18

[18:54:54] abdulrehman: has joined #ruby
[18:55:12] abdulrehman: has joined #ruby

2015-09-10

[22:23:15] abdulrehman: has joined #ruby
[22:33:50] abdulrehman: Quit: AbdulRehman

2015-09-04

[21:23:38] abdulrehman: has joined #ruby

2015-08-26

[09:07:57] abdulrehman: has joined #ruby
[09:28:42] abdulrehman: Quit: Page closed

2015-08-23

[10:52:09] abdulrehman: has joined #ruby

2015-08-22

[01:47:52] abdulrehman: has joined #ruby
[01:52:27] abdulrehman: Ping timeout: 240 seconds
[01:54:27] abdulrehman: has joined #ruby
[01:59:13] abdulrehman: Ping timeout: 264 seconds
[02:03:53] abdulrehman: has joined #ruby
[02:08:09] abdulrehman: Ping timeout: 246 seconds
[02:12:42] abdulrehman: has joined #ruby
[02:18:13] abdulrehman: Ping timeout: 252 seconds
[02:23:28] abdulrehman: has joined #ruby
[02:27:47] abdulrehman: Ping timeout: 240 seconds
[02:32:38] abdulrehman: has joined #ruby
[02:37:33] abdulrehman: Ping timeout: 265 seconds
[02:41:36] abdulrehman: has joined #ruby
[02:46:37] abdulrehman: Ping timeout: 264 seconds
[02:50:40] abdulrehman: has joined #ruby
[02:55:26] abdulrehman: Ping timeout: 245 seconds
[02:59:51] abdulrehman: has joined #ruby
[03:04:21] abdulrehman: Ping timeout: 246 seconds
[03:08:57] abdulrehman: has joined #ruby
[03:13:45] abdulrehman: Ping timeout: 244 seconds
[03:18:00] abdulrehman: has joined #ruby
[03:22:43] abdulrehman: Ping timeout: 260 seconds
[03:27:08] abdulrehman: has joined #ruby
[03:32:01] abdulrehman: Ping timeout: 272 seconds
[03:36:16] abdulrehman: has joined #ruby
[03:40:48] abdulrehman: Ping timeout: 250 seconds
[03:45:14] abdulrehman: has joined #ruby
[03:50:15] abdulrehman: Ping timeout: 260 seconds
[03:54:24] abdulrehman: has joined #ruby
[03:58:43] abdulrehman: Ping timeout: 244 seconds
[04:03:53] abdulrehman: has joined #ruby
[04:08:12] abdulrehman: Ping timeout: 246 seconds
[04:12:49] abdulrehman: has joined #ruby
[04:17:31] abdulrehman: Ping timeout: 255 seconds
[04:21:44] abdulrehman: has joined #ruby
[04:28:51] abdulrehman: Ping timeout: 240 seconds
[04:33:53] abdulrehman: has joined #ruby
[04:38:19] abdulrehman: Ping timeout: 260 seconds
[04:42:34] abdulrehman: has joined #ruby
[04:47:49] abdulrehman: Ping timeout: 264 seconds
[04:51:41] abdulrehman: has joined #ruby
[04:56:34] abdulrehman: Ping timeout: 256 seconds
[05:00:51] abdulrehman: has joined #ruby
[05:05:35] abdulrehman: Ping timeout: 246 seconds
[05:09:57] abdulrehman: has joined #ruby
[05:14:36] abdulrehman: Ping timeout: 245 seconds
[05:19:02] abdulrehman: has joined #ruby
[05:28:06] abdulrehman: Ping timeout: 244 seconds
[05:33:53] abdulrehman: has joined #ruby
[05:38:32] abdulrehman: Ping timeout: 260 seconds
[05:42:37] abdulrehman: has joined #ruby
[05:47:12] abdulrehman: Ping timeout: 252 seconds
[05:51:40] abdulrehman: has joined #ruby
[05:57:31] abdulrehman: Ping timeout: 240 seconds
[06:02:30] abdulrehman: has joined #ruby
[06:07:21] abdulrehman: Ping timeout: 244 seconds
[06:11:37] abdulrehman: has joined #ruby
[06:16:18] abdulrehman: Ping timeout: 246 seconds
[06:20:38] abdulrehman: has joined #ruby
[06:28:43] abdulrehman: Ping timeout: 272 seconds
[06:33:52] abdulrehman: has joined #ruby
[06:38:21] abdulrehman: Ping timeout: 250 seconds
[06:42:41] abdulrehman: has joined #ruby
[06:47:35] abdulrehman: Ping timeout: 250 seconds
[06:51:39] abdulrehman: has joined #ruby
[06:58:50] abdulrehman: Ping timeout: 250 seconds
[07:08:29] abdulrehman: has joined #ruby

2015-08-21

[22:11:07] abdulrehman: has joined #ruby
[22:49:40] abdulrehman: Quit: AbdulRehman

2015-08-14

[21:55:00] abdulrehman: has joined #ruby

2015-08-11

[08:39:34] abdulrehman: has joined #ruby-offtopic
[10:41:28] abdulrehman: Ping timeout: 246 seconds

2015-08-10

[10:40:44] abdulrehman: has joined #ruby
[10:55:14] abdulrehman: quick question please; I am doing the following Dir.open(YC_POLLING_FOLDER).each do |file| end however the function also returns the '.' and '..' which I want to skip, any advice?
[10:58:41] abdulrehman: adaedra: Yah, I thought of a simple logic, just thougth there is a method to get files only back
[11:00:43] abdulrehman: suchness: can you please forward me the docs for that?
[11:00:55] abdulrehman: adaedra: not sure what you mean
[11:03:01] abdulrehman: suchness: many thanks
[11:03:22] abdulrehman: adaedra: oh ok I understand what you mean
[13:20:21] abdulrehman: sorry but another firey quick question, currently I am doing the following, "some_string_to_read".index('_') and returns the first occurrence of it, any way I can get the second one
[13:20:42] abdulrehman: returns the position*
[13:21:31] abdulrehman: ok, one sec let me try
[13:22:05] abdulrehman: not sure what I am doing wrong but it does not work,
[13:24:07] abdulrehman: I am reading the docs, and I am using it the same way it is pointing out, but for some bizzare reason, not working
[13:24:14] abdulrehman: (I am sure this reason is me) lol
[13:24:22] abdulrehman: index(substring [, offset])
[13:25:18] abdulrehman: ljarvis: awesome that works
[13:25:30] abdulrehman: so basically the offset is a block?
[13:26:28] abdulrehman: I see, I thought it would be the occurrence number as in SQL ,
[13:26:42] abdulrehman: that's great, thank you ljarvis so very much
[13:26:46] abdulrehman: and stoodfarback
[13:29:35] abdulrehman: thank you ljarvis, that's excatly what I need to do.... thank you very much

2015-08-02

[15:46:06] abdulrehman: has joined #ruby
[15:55:14] abdulrehman: has left #ruby: ()
[16:57:54] abdulrehman: has joined #ruby
[18:33:17] abdulrehman: Quit: AbdulRehman
[23:41:55] abdulrehman: has joined #ruby
[23:47:54] abdulrehman: Quit: AbdulRehman
[23:48:55] abdulrehman: has joined #ruby

2015-08-01

[00:42:33] abdulrehman: Quit: AbdulRehman
[12:06:37] abdulrehman: has joined #ruby
[12:16:21] abdulrehman: Quit: AbdulRehman
[12:33:51] abdulrehman: has joined #ruby
[13:50:28] abdulrehman: Quit: AbdulRehman
[13:59:19] abdulrehman: has joined #ruby
[14:43:26] abdulrehman: Quit: AbdulRehman
[18:02:51] abdulrehman: has joined #ruby
[18:07:24] abdulrehman: has joined #ruby
[18:22:47] abdulrehman: Quit: AbdulRehman
[18:33:20] abdulrehman: has joined #ruby
[22:33:07] abdulrehman: Quit: AbdulRehman

2015-07-31

[15:36:21] abdulrehman: is there any difference, between some_array.each do end and some_array.each {}
[15:39:18] abdulrehman: ljarvis: thanks,
[18:51:25] abdulrehman: Quit: Page closed
[21:29:28] abdulrehman: has joined #ruby
[21:31:26] abdulrehman: has left #ruby: ()
[22:18:57] abdulrehman: has joined #ruby
[22:40:38] abdulrehman: Quit: AbdulRehman
[23:12:19] abdulrehman: has joined #ruby
[23:34:13] abdulrehman: Quit: AbdulRehman
[23:34:31] abdulrehman: has joined #ruby
[23:40:47] abdulrehman: Quit: AbdulRehman
[23:41:35] abdulrehman: has joined #ruby
[23:44:53] abdulrehman: has joined #ruby

2015-07-30

[07:54:17] abdulrehman: do we have another way of taking in commands beside the optionparser?
[07:56:26] abdulrehman: I'll look that up, many thanks shortdudey123
[08:12:21] abdulrehman: adaedra: hahahha he is like me , he really means everyone when he says guys.... on his behalf sorry lol
[11:15:51] abdulrehman: I'm having a small problem, I am getting a numeric from the DB and its really long, I need to round it to 10 and display it in float, but when the value is negetive it still shows as exp value like this; 1.83046e-05 even though I have indicated to_i , anyadvice?
[11:16:57] abdulrehman: apeiros: I am saving the value to a key in a hash,
[11:18:03] abdulrehman: no no, I am not rounding a float as a hash key, the rounding for the value of the key
[11:18:41] abdulrehman: but I have noticed that thhe same thing is working in the other value but not for some ungodly reason with one of them
[11:19:15] abdulrehman: :security_weight => sec_row.weight.to_f.round(10),
[11:19:30] abdulrehman: :security_price => sec_row.clean_price.to_f.round(10), working here though
[11:20:03] abdulrehman: what other option do I have?
[11:20:23] abdulrehman: no but these are not just any prices
[11:20:36] abdulrehman: these are stock weights and used in risk software
[11:20:55] abdulrehman: let me try that
[11:21:22] abdulrehman: do I need to include the decimal ? or no includes?
[11:24:12] abdulrehman: ok I required the correct files,
[11:24:20] abdulrehman: and it seems that the big decimal is the better option
[11:25:14] abdulrehman: havenwood: thanks done that
[11:25:19] abdulrehman: but I am back to square 1
[11:25:28] abdulrehman: its displaying the number as exp
[11:25:34] abdulrehman: -0.137033996E-2
[11:26:24] abdulrehman: -0.00137033996042487000.to_d(10).to_digits
[11:26:37] abdulrehman: -0.00137033996042487000.to_d(10).to_digits => prints "0.00137033996"
[11:27:00] abdulrehman: -0.00137033996042487000.to_d(10) => prints "-0.137033996E-2"
[11:27:08] abdulrehman: many thanks, everyone
[11:29:28] abdulrehman: the gem called bigdecimal
[11:32:14] abdulrehman: apeiros: true, but no harm of learning a new thing ahhaha
[11:50:56] abdulrehman: apeiros: I looked up the sprintf pretty strong, but one question if I may, how to make the 00s after the decimal point optional, so if zeros don't show, only show if there is numbers, currently doing this : sprintf("%.10f",12.222) which displays this 12.2222000000
[11:54:45] abdulrehman: you mean for what before the decimal point ?
[11:54:51] abdulrehman: wasamasa: it worked the way you said
[11:55:03] abdulrehman: sprintf("%.10g", '22.22') => 22.22
[11:55:16] abdulrehman: sprintf("%.10f", '22.22') => "22.2200000000"
[11:55:29] abdulrehman: wasamasa: thank you
[11:55:43] abdulrehman: that's the issue
[11:56:05] abdulrehman: >> sprintf("%.10f", '22.2223423423423423423')
[11:56:47] abdulrehman: >> sprintf("%.10f", '2213123122.2223423423423423423')
[11:56:56] abdulrehman: you are right
[11:57:14] abdulrehman: ok, then the BAs should make do with the extra zeros
[11:57:36] abdulrehman: apeiros: not sure what do you mean by that, I really haven't used this before
[11:58:38] abdulrehman: [k-: this isn't science, I work for an evil corp and they want it to the nears 10 decimal places lol
[11:59:07] abdulrehman: oh ok, so you are saying keeping the zeros is fine?
[11:59:40] abdulrehman: apeiros: that's logical, and make sense,
[12:03:39] abdulrehman: ya, all my work is around these types of instruments.... the problem is that my code feed into another software so I can't make up my own spec
[12:03:46] abdulrehman: although I'd love to
[12:07:27] abdulrehman: [k-: true that

2015-07-29

[11:16:27] abdulrehman: Quit: Page closed
[11:16:48] abdulrehman: has joined #ruby
[11:23:16] abdulrehman: quick question; any chance I can embed ruby code in a string where by some part of the string get replaces on the fly by some sort of a condition?
[11:25:31] abdulrehman: ok, i thought we can only have variables in there
[11:27:22] abdulrehman: something like this; strg = "World is #{ 'great' unless false}"
[11:29:10] abdulrehman: awesome, love ruby!!!
[11:37:10] abdulrehman: workmad3: ya, but I think it wont do me good sadly, the reason being is that I am written some strings in a seperate rb file and include that, now some part of the string is like this #{testing} and testing is a variable I have just before bringing the string from the other file, so it complains it can't find it, I need a way to pass these to the file without complaining, and sorry I do not think I am being clear hahahahah
[11:41:18] abdulrehman: but maybe I can use lambdas
[14:31:34] abdulrehman: centrx: question away my friend
[14:31:58] abdulrehman: jhass: hi sorry for late reply, at work can't always look at the screen
[14:32:36] abdulrehman: adaedra: good to know,
[14:50:04] abdulrehman: Quit: Page closed
[14:50:38] abdulrehman: has joined #ruby
[15:17:12] abdulrehman: where I work, they prefer csv files, and to be honest, they are so easy to work with, and can also be opened with excel

2015-07-28

[08:00:41] abdulrehman: guys any idea how to formate/convert scientific exponential to float
[08:01:39] abdulrehman: Ox0dea: thanks I'll try that
[08:04:07] abdulrehman: ruboto: sure my bad, sorry
[09:32:58] abdulrehman: welcome back adaedra
[09:41:08] abdulrehman: adaedra: then I'm the one who returned hahahaha
[09:41:17] abdulrehman: welcome back me
[09:45:32] abdulrehman: hahaha not yet
[10:16:31] abdulrehman: adaedra: is there a way I can do this; DateTime.parse(someString).formate(YYYYMMDD)?
[10:16:51] abdulrehman: where somestring is a date
[10:18:43] abdulrehman: just thought to keep you on your toes :p
[10:20:04] abdulrehman: yorickpeterse: thanks, and done!! I knew of it, I was just using it wrong
[10:20:24] abdulrehman: adaedra: thanks, and I won't dress you any more buddy!! I'll dress ruboto :-p
[10:21:49] abdulrehman: hey, obama didn't give you guys care health options, why should I give you fashion options!!!
[10:23:50] abdulrehman: ruboto: sorry, yah no more off topics, adaedra also yes I know, I was just kidding....
[10:41:32] abdulrehman: arup_r: well, he works with ruby, I am sure he has some sense of humour hahaha
[14:28:49] abdulrehman: guys/gals is there a way to embed ruby logic in a sql? so instead of using case statement use some if statement or unless statement to select one coloumn over the otehr i some conditions are met? or I am dead down to use sql?
[14:29:25] abdulrehman: cool one minuite
[14:32:22] abdulrehman: ljarvis: along these lines, https://gist.github.com/AbdulR3hman/2468e54f266dd9b90b61
[14:33:02] abdulrehman: the reason behing this, is that the statement is gonna be very long and I'd rather customise it using ruby but I think it wont be possible this might be sql cause it needs to be done on the server side
[14:34:22] abdulrehman: ljarvis: I guess you are right, I try to avoid doing just because it looks ugly in the ruby code, I wish I can kinda sperate them in different places where the sql is in different place and the call (logic) of calling the sql is in the main function
[14:34:41] abdulrehman: I guess I can use prepared statements and simply require them from different files
[14:35:53] abdulrehman: ljarvis: the problem is in the project I am working with I am using three different database, orcale sybase and sql server.
[14:36:11] abdulrehman: ljarvis: I guess you are right
[14:37:01] abdulrehman: koolio, thanks folks
[15:57:23] abdulrehman: good night peeps, thanks for the help again..... see you tomorrow ( adaedra if they don't block the channel by then hahaha)