c_nick

Activity Graph

Page 1 of 4 | Next »

2018-08-11

[14:21:15] c_nick: has joined #ruby
[14:21:44] c_nick: Whenever I open my team city triggered runs to looks at the results, I want to provide a tab where I can see my Ruby-Sinatra web server.Ideally that should result in a Same Domain Error because team city tabs are i-frames, If I give a html page with a hyper link to the web server.How can I go about it
[15:18:39] c_nick: Remote host closed the connection

2018-05-12

[09:47:30] c_nick: has joined #ruby
[10:07:20] c_nick: Quit: ciaos

2018-05-08

[03:17:34] c_nick: has joined #ruby
[03:18:37] c_nick: has left #ruby: ()

2018-05-07

[18:32:51] c_nick: has joined #ruby
[18:48:09] c_nick: Ping timeout: 260 seconds
[18:54:26] c_nick: has joined #ruby
[19:11:05] c_nick: Read error: Connection reset by peer

2018-05-02

[17:40:30] c_nick: has joined #ruby
[17:40:38] c_nick: has left #ruby: ()

2018-04-28

[04:26:10] c_nick: has joined #ruby
[05:05:09] c_nick: Ping timeout: 260 seconds
[05:13:09] c_nick: has joined #ruby
[05:54:35] c_nick: has left #ruby: ("Ex-Chat")

2018-04-26

[02:57:10] c_nick: has joined #ruby
[03:09:55] c_nick: Quit: ciaos

2018-04-08

[18:13:16] c_nick: has joined #ruby
[18:17:54] c_nick: has left #ruby: ()

2018-03-25

[13:42:23] c_nick: has joined #ruby
[14:26:45] c_nick: Ping timeout: 263 seconds
[14:43:37] c_nick: has joined #ruby
[14:53:09] c_nick: Quit: ciaos

2018-03-20

[06:36:26] c_nick: has joined #ruby
[06:41:57] c_nick: Ping timeout: 240 seconds
[12:39:35] c_nick: has joined #ruby
[12:39:50] c_nick: Remote host closed the connection
[16:30:52] c_nick: has joined #ruby
[16:34:54] c_nick: how can i capture the data from the following string {name|color:red}age{address|color:green} and split it into three components {name|color:red} {address|color:green} age
[16:44:27] c_nick: {name|color:red} should become name color:red
[16:46:21] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}|([^\{]+)/)
[16:47:27] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}
[16:47:34] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}}
[16:47:38] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\})
[16:48:00] c_nick: >> {name|color:red}age{address|color:green}".scan(/\{(\w+)\}/)
[16:48:13] c_nick: no i missed the /
[16:48:37] c_nick: WhereIsMyBot
[16:49:49] c_nick: i agree with WhereIsMySpoon the solution has a lot of layers will be nice to have a simple one
[16:51:41] c_nick: nope it can start or end
[16:52:26] c_nick: i am pretty sure this is possible via regex
[16:52:34] c_nick: i simply cannot get my head around it
[17:04:32] c_nick: i forgot what A stood for
[17:04:51] c_nick: wasnt that ^
[17:05:43] c_nick: i need to study this but you have been a big help to me
[17:05:49] c_nick: many thanks havenwood
[17:06:27] c_nick: Quit: ciaos

2018-03-15

[15:10:40] c_nick: has joined #ruby
[15:16:00] c_nick: The user interface for my web app is done using Slim in which i am creating a row (td) and dumping the data from a config file in it. Now I want to color the content dynamically
[15:17:24] c_nick: lets say i have a config file - data.yaml which has contents text="This is a sample text" and in my data.slim i am doing td = "#{@yaml.text}"
[15:20:08] c_nick: Burgestrand, Now in my yaml file i want to do something like text = "sample data" <but hey! this should be in red> something like that
[15:21:47] c_nick: elomatreb, yeah a protocol .. so that in user.slim i can understand and color it while in configuration file i define it
[15:23:32] c_nick: server side for me .. i want to communicate from yaml to my web app to color the text
[15:26:26] c_nick: elomatreb, i guess this will work for me text {#formatting option}
[15:26:59] c_nick: and in my web server i will try to search if there is any {} and dump the contents in a span style
[15:27:55] c_nick: dminuoso, its a string so i will do string manipulation so no issues in ruby
[15:29:37] c_nick: ACTION off to code
[15:33:20] c_nick: Quit: ciaos
[15:57:49] c_nick: has joined #ruby
[15:58:15] c_nick: hi again , name {color:red} how to extract just color:red from this text
[15:58:46] c_nick: \{\.*\} still gives the \{ \}
[16:05:29] c_nick: leitz, yes thats a good one .. i am somehow hell bent on regex .. its like drugs
[16:05:34] c_nick: cooked up something like data.scan(/\{(.*)\}/).flatten.first
[16:06:16] c_nick: as scan gives u an array of all the groups in arrays and flatten will knock off the first array and first will get the value within
[16:06:42] c_nick: leitz, but its super cool
[16:06:48] c_nick: unless u reach level 2
[16:09:02] c_nick: leitz, /\{(.*)\}/.match(data)[1] seems better option
[16:09:11] c_nick: no need of the beef
[16:17:59] c_nick: thanks leitz :-)
[16:18:02] c_nick: has left #ruby: ("Ex-Chat")

2018-01-17

[04:38:08] c_nick: has joined #ruby
[04:56:17] c_nick: Ping timeout: 276 seconds
[05:40:13] c_nick: has joined #ruby
[06:04:28] c_nick: Quit: ciaos

2018-01-16

[17:32:36] c_nick: has joined #ruby
[17:46:31] c_nick: has left #ruby: ("Ex-Chat")

2018-01-10

[17:19:17] c_nick: has joined #ruby
[18:40:51] c_nick: has left #ruby: ("Ex-Chat")

2018-01-04

[17:44:42] c_nick: has joined #ruby
[17:46:04] c_nick: Hi .. I am trying to load a C++ DLL inside my Ruby application .. I have registered the Interface using regsrv32 and loading the Dll using Win32OLE .. but if i am running a 64 bit variant of Ruby i cannot register a 32 bit C++ dll can anyone help?
[18:05:46] c_nick: Ping timeout: 260 seconds
[22:32:50] c_nick: has joined #ruby
[23:13:03] c_nick: chaos95, is there another way as opposed to win32Ole to actually access bitness independent bin object?
[23:16:47] c_nick: hmm then i guess i am left to forking out processes
[23:17:02] c_nick: thanks, chaos95!
[23:17:32] c_nick: Quit: ciaos
[23:18:13] c_nick: has joined #ruby
[23:52:31] c_nick: Quit: ciaos

2017-12-05

[18:36:26] c_nick: has joined #RubyOnRails
[18:37:33] c_nick: Hi .. if my database table has a foreign key then its possible for me to access this record from that table.. but is it also possible in AREL for me to access that record from here?
[18:51:52] c_nick: Quit: ciaos

2017-12-02

[11:26:55] c_nick: has joined #ruby
[11:28:07] c_nick: hi .. how to retrive only two columns of a specific table using Active Record- Active Relations (Ruby not rails) .. i can go Table.where(run_id: 1) but this will return me the whole row ..
[11:32:46] c_nick: active record is a design pattern .. Arel is also not rails specific i suppose but I guess you are right most people are in rails on this
[11:41:17] c_nick: apeiros, sorry one last question i know that we can do AR.pluck(:id) will give us [1,2,3] but what will AR.pluck(:id,:name) give us ?
[11:44:41] c_nick: i thought it required rails terminal
[11:45:00] c_nick: i dont have the environment set up on this machine .. only ruby ..
[11:45:27] c_nick: so how will the database linking work
[11:46:05] c_nick: hmm ok i will try thanks
[11:50:35] c_nick: Ping timeout: 240 seconds
[14:44:05] c_nick: has joined #ruby
[14:44:08] c_nick: has left #ruby: ()

2017-11-18

[13:20:03] c_nick: has joined #ruby
[13:20:53] c_nick: i want to test a C++ Dll and have decided to do the testing in Ruby .. I can see "IApplication.dll", "Application.ole" dont know what they are ..
[13:26:55] c_nick: Ping timeout: 250 seconds
[13:57:32] c_nick: has joined #ruby
[14:11:13] c_nick: Quit: ciaos

2017-10-25

[03:09:13] c_nick: has joined #ruby
[03:21:53] c_nick: is it possible to call a ruby function only on form submit through HAML or is there a better way to achieve this?
[03:30:45] c_nick: RickHull, I have created a User Interface where i give all the options to the User and use his selection and create a query which i show in a div, is there a way by which i can send this content from the div back to my route ?
[03:31:06] c_nick: for now i am sending the form elements and concatenating the elements in the ruby like i do in JS which is literally doing things twice
[03:31:22] c_nick: i am using Sinatra Haml no Rails
[03:33:51] c_nick: thats a good question .. I am doing all of that in JS so in the Client.. but this sinatra app is not really a server-client .. its like an App so in this case server and client are one
[03:36:13] c_nick: submit the created query via GET/POST is what i am looking for .. for now when i click on submit i get all the params but they essentially only include the input tags i am not entirely sure how i can pass a div innerhtml to a form
[03:37:34] c_nick: its in the form .. hmm perhaps if i make it a TextArea .. let me see
[03:38:22] c_nick: that seems like a good option .. as i am not really in the favour of doing it once in JS then again in Ruby.. then maintain both till the end.. thats sad
[03:38:32] c_nick: I will try and see Thanks RickHull :-)
[03:45:26] c_nick: thanks RickHull, Works well! :-)
[03:45:33] c_nick: Now off to styling ... :)
[03:49:09] c_nick: i want that text area to be a read only bit .. ie. u can copy from the UI and paste on the cmd ..
[03:55:45] c_nick: yes seems like the right foot forward, many thanks RickHull, :)
[03:55:49] c_nick: Quit: ciaos

2017-10-24

[18:28:44] c_nick: has joined #ruby
[18:29:09] c_nick: how can i call ruby on button click in sinatra ?
[18:43:34] c_nick: Ping timeout: 264 seconds
[18:44:10] c_nick: has joined #ruby
[18:57:26] c_nick: Quit: ciaos

2017-06-08

[17:09:37] c_nick: has joined #ruby
[18:19:15] c_nick: I need to parse a yml ,csv and xml file, is there a generic parser kind that parses all or do i need to parse these separately -> yaml parser, csv parser and xml parser
[18:29:05] c_nick: pupsicle, wow this is fantastic! i dont need to code, everything is taken care of!
[18:29:07] c_nick: Quit: ciaos

2017-05-08

[02:58:40] c_nick: has joined #ruby
[02:58:59] c_nick: Do i need the TCL/TK Bindings when i install Ruby ?
[02:59:15] c_nick: I am trying to understand why do we need it or what is it
[03:01:21] c_nick: Sqlite3 on ruby 2.3.3 WIndows, so safe for me to ignore that option
[03:09:33] c_nick: thanks elomatreb
[03:12:52] c_nick: Quit: ciaos

2017-05-05

[01:31:24] c_nick: has joined #ruby
[01:33:45] c_nick: Hi .. I used Ruby 2.3.3 and installed the sqlite3 gem, the gem gets installed but it fails for sqlite3_adapter, i have downloaded the libsqlite3.dll from sqlite3 website and copied it in the C:\WIndows directory. When i try with Ruby 2.0 everything works fine. Even Ruby 2.2.6 does not work
[01:34:00] c_nick: Note: This is on WIndows'
[03:13:58] c_nick: Quit: ciaos

2017-04-27

[01:18:52] c_nick: has joined #ruby
[01:26:53] c_nick: I have an excel based test cases in ruby which are distributed via incredibuild onto different threads on the available CPU's. When i run it normally it works fine but when i run it via teamcity i sometimes fail to get the excel object and few tests go missing
[01:27:46] c_nick: teamcity agent is running in non interactive mode.. i also tried the interactive mode.. and that seemed to give me less failures
[01:55:34] c_nick: Quit: ciaos

2017-04-05

[02:55:20] c_nick: has joined #ruby
[02:57:04] c_nick: hi ..Addition of two arrays into a third.. is the '+' operator the right way to do it ? or should i loop the contents and use '<<' operator ?
[03:00:53] c_nick: PorcoRex, indeed, was planning to loop in the array and then add the individual element in the new array
[03:01:19] c_nick: conatenation is not a costly operation right as compared to <<?
[03:01:45] c_nick: concatenation* (appologies for the typo, getting used to the new laptop keyboard)
[03:06:10] c_nick: PorcoRex, simple addition .. [1,2] [3,4] no issues of duplicated.. i can use concat to save on the extra variable (being too miser?)
[03:06:45] c_nick: allisio, the third array is an addition of first two ..
[03:07:42] c_nick: baweaver, i have a performance fetiesh
[03:08:01] c_nick: PorcoRex, bingo
[03:09:31] c_nick: ok thanks everyone :)
[03:36:31] c_nick: Quit: ciaos

2016-07-29

[01:03:38] c_nick: has joined #ruby
[01:48:02] c_nick: ruby equivalent of "%+0*d"%(5, -3)?
[01:50:26] c_nick: got it.. i need to replace () with []
[01:58:13] c_nick: has left #ruby: ()

2016-07-28

[15:55:37] c_nick: has joined #ruby
[15:57:46] c_nick: i want to represent the scientific number "2e-0003" as "2e-003", i tried 0.0e but that evaluates to 2e-03
[15:59:03] c_nick: kegster: foo is a dictionary u can create a key "myArray" and then assign it an array
[16:31:55] c_nick: i want to represent the scientific number "2e-0003" as "2e-003", i tried 0.0e but that evaluates to 2e-03
[17:55:03] c_nick: Quit: Leaving.

2016-07-18

[16:18:20] c_nick: has joined #ruby
[16:18:59] c_nick: anyone can suggest good website / read up for reporting designs -> i need to create an attractive UI for reporting regression breaks
[16:48:32] c_nick: has left #ruby: ()

2016-06-29

[17:28:19] c_nick: has joined #ruby
[17:28:50] c_nick: copy all rb files from a folder and its subfolders
[17:29:10] c_nick: FileUtils.cp_r(Dir.glob(src),dest) this wont work
[17:29:51] c_nick: src = "C:/Users/Nathan/Desktop/*.java"
[17:39:14] c_nick: got it thanks
[17:39:15] c_nick: has left #ruby: ()

2016-06-27

[06:35:24] c_nick: has joined #ruby
[07:07:52] c_nick: crazycoder: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-php/
[07:22:38] c_nick: crazycoder: Ruby can be used for Web Server, it can be used on nginx. Could you brief me your actual requirements ? is it that you want to try ruby on the Web? ideonline or some other online version? Do you want to create a web server using ruby? then Ruby on Rails or Sinatra. Do you want to learn Ruby as a programming language? you can use the docs I pointed to (not just the PHP part) What is it that we want here?
[07:24:18] c_nick: Neobenedict: sudo apt-get remove ruby doesn't work ?
[07:29:56] c_nick: crazycoder: Sinatra for starters, Rails is a full blown Web Application Fx
[07:33:07] c_nick: crazycoder: The web application framework handles many of such. So performance should not be like what you say "Slow"
[07:34:35] c_nick: crazycoder: For python try Flask or Bottle (equivalent to Sinatra) and Django (equivalent to Rails)
[07:40:36] c_nick: I have worked in C C++ Objctive C Java Python Ruby C# AIML -> Shouldn't really matter as a Developer. Its just the syntax and a little bit of time thats all!
[07:44:37] c_nick: crazycoder: Niche Market less available jobs :) Python Ruby are nearly similar so you should not have a tough time working on both.
[07:47:41] c_nick: most of the organizations have stupid people at the highest positions, they dont understand technology and often relate it to "can this do that?" And then comes a Developer who replies "Ofcourse it can! and it will do this in addition too at the same investment" and everybody is happy when he moves out of the company people say "Let it do what it is doing". So you will have the choice of the language ;) or manipulate your preference wherever required
[08:07:40] c_nick: dminuoso: technology can help a project or program manager in a HUGH way which they often miss out. Ruby and Python can both solve a problem but then which is the preferred way to go about it?
[08:11:02] c_nick: Its getting GC and then referenced.
[08:11:49] c_nick: crazycoder: I recommend you search on Official Wikis for Python and Ruby. All your questions should get answered.
[08:12:13] c_nick: The documentation is quite verbose. I mean literally you can grow old reading all that stuff!
[08:16:05] c_nick: dminuoso: A non technical project manager would only undertand in terms of resource and time lines and budget but they entirely depend on their resources for the choice of technology or legacy - what is being used for generations. There is not much scope for innovation or doing something different
[08:18:39] c_nick: Developer001: thats like getting paid for pooping every morning!
[08:23:25] c_nick: dminuoso: From the point of the Project Manager if I buy in to whatever my subordinates tell me without having a failr idea and just accepting their facts than I am not a good Project Manager
[08:27:57] c_nick: dminuoso: true that
[08:53:53] c_nick: has left #ruby: ()

2016-06-16

[02:36:57] c_nick: has joined #ruby
[02:37:31] c_nick: need to check for every {([ we have }])
[03:37:20] c_nick: has left #ruby: ()

2016-06-14

[18:16:42] c_nick: has joined #ruby
[18:24:55] c_nick: I was looking at the old colleage notes .. and i saw the famous Star Problem __* _** *** when length given is 3 .. How i know how to get this done in C++ i am a bit confused in Ruby what do we use to set teh size in ruby
[18:26:59] c_nick: yeah bingo
[18:27:16] c_nick: is that right(3)
[18:28:15] c_nick: thanks spudowiar
[18:28:47] c_nick: has left #ruby: ()

2016-06-07

[02:30:33] c_nick: has joined #ruby
[02:31:11] c_nick: i want to copy all contents of A to B .. FileUtils.cp_r(A/.,B) should be fine right?
[02:34:13] c_nick: shevy: yep. many thanks
[02:34:34] c_nick: FileUtils.cp_r("A/.","B")
[02:35:40] c_nick: Off topic but incase anyone can help - In excel i want to check if A1 has 'Sat' or 'Sun' fill A2 with Grey color , is macro the only choice or we can do it via Conditional Formatting or some other means ?
[02:41:03] c_nick: shevy: lol .. yeah to think of it we can use the excel sheet in Ruby using Win Module parse it and then make another one :D but ......
[03:16:27] c_nick: has left #ruby: ()

2016-05-18

[16:22:37] c_nick: has joined #ruby
[16:22:46] c_nick: How to compare files ?
[16:35:19] c_nick: Ping timeout: 252 seconds

2016-05-05

[17:06:45] c_nick: has joined #ruby
[17:10:44] c_nick: Hi.. i was trying to create a directory if its not existing FileUtils::mkdir_p '\\gerdata\test\quarter_2\april' but it kelt complaining \\gerdata\test already exists does it require all the directories to be absent or present ? like gerdata/test exists but others done will it work ?
[19:22:41] c_nick: FileUtils vs Dir which one is better ?
[19:23:31] c_nick: shevy: whats the difference
[19:23:40] c_nick: My purpose is to work with directories
[19:24:36] c_nick: nope if u r on Ruby 2.0.0 +
[19:25:36] c_nick: Fileutils.mkdir_p work for share drives ? //myshare
[19:25:43] c_nick: it didnt seem to work
[19:26:55] c_nick: i am passing it //myshare/folder1/folder2/folder3 where folder3 is to be created..
[19:27:12] c_nick: i think i need to gsub('/',"\\")
[19:27:49] c_nick: lol windoze
[19:33:35] c_nick: unfortunately my client is on Windows :(
[19:33:51] c_nick: its a stupid bank ! with all old techs
[19:35:03] c_nick: i will try the gsub one to convert to windows path and see tomorrow if something works. Many Thanks
[19:35:05] c_nick: has left #ruby: ()

2016-05-03

[16:49:59] c_nick: nemish: :role is a symbol you have not defined that in the hash
[16:50:10] c_nick: :role and role are diferent
[17:07:00] c_nick: nemish: what is the issue
[17:09:35] c_nick: nemish: comment line 28
[18:37:43] c_nick: Quit: Leaving.
[18:46:10] c_nick: has joined #ruby
[18:46:24] c_nick: has left #ruby: ()