« first day (1137 days earlier)      last day (2118 days later) » 

user5870134
12:02 AM
After I was done with the MD5 function I realised that MD5 is outdated, and has been compromised... So I needed to switch to sha256 but it works the exact same.
 
3:29 AM
:357@Mango You're welcome. I'm glad I could help.
 
3:59 AM
@Mango Actually, for the purpose of checking file duplication md5 is fine. It's just really bad for password hashing, because it's quick to calculate and has some other issues I don't know because I don't do tons of crypto.
48
Q: Is MD5 considered insecure?

sareptaAfter all these articles circulating online about md5 exploits, I am considering switching to another hash algorithm. As far as I know it's always been the algorithm of choice among numerous DBAs. Is it that much of a benefit to use MD5 instead of (SHA1, SHA256, SHA384, SHA512), or is it pure per...

 
 
2 hours later…
5:49 AM
I think @thesecretmaster is correct here. On the other hand, I don't think there's a big cost to using SHA1, so it's probably just as good as MD5 for doing duplicate checking. So... pick one :)
 
 
8 hours later…
1:27 PM
Good morning!
 
Good morning!
 
1:45 PM
I got a problem with facebook sharing
if any one could help me out please
 
1:58 PM
hi
@ChiragArya so why didn't you share your problem?
 
My problem is
I'm sharing a image on facebook from my website(built with ror)
and adding a custom url to the image
so when I go to facebook and click on that image it is redirecting me to home page instead of that link
and this is only happening when i am clicking on the link from facebook app
in browsers everything works fine
 
oh, I've no idea, never used fb api with RoR
 
:(
Ok
 
 
1 hour later…
3:06 PM
http://stackoverflow.com/questions/42347640/facebook-redirect-url-not-redirecting-to-intended-url-from-facebook-app?noredirect=1#comment71846736_42347640
Any One ?
 
do you use sequel?
 
Yea
 
have you used Dataset.import?
 
is it something like taking a database dump of your app ?
 
well, I'm trying to insert about 2000 rows into a table
so I'm benchmarking - here are the results for single inserts (MyModel.insert hash) vs a single insert (MyModel.insert rows.first.keys, rows.map(&:value)) on 2000 rows
  2.630000   0.230000   2.860000 ( 19.482736)
  0.310000   0.000000   0.310000 (  0.644364) // single insert
 
3:24 PM
Very interesting!
 
I've tried it after reading this one (I'm using postgres though) - stackoverflow.com/questions/1793169/…
 
I didn't even know that ActiveRecord had a syntax for multiple-row insert.
 
it's Sequel
 
yes
 
3:39 PM
Neato. I'll have to add that to my list of things to try.
 
3:50 PM
Mondays are so awesome. I feel smart again after the weekend.
 
me not
 
You can't feel smart again on Monday unless you felt stupid on Friday.
 
4:17 PM
i'm wondering if I should put global methods in some kind of class or module
there are two or three of them, inside a tiny self-contained container
 
What do they do?
 
right now there's only one I'm interested in - it's an entrypoint to the whole script, getting objects from db, conditionally updating them and inserting another associated objects, called 'process'
I'd rather call it MyModelUpdater.process or MyModelNotifier.process
 
I usually do something like this:
    module AwesomeScript
      class Main
        def call
          # Main loop, or whatever
        end
      end
    end

    AwesomeScript::Main.new.call if $0 == __FILE__
I like plain Ruby objects. I like using modules as name spaces. I don't dislike global methods, but they're not my favorite thing.
 
reminds me of this python if sth == main or sth like that, these terrible underscores are terrible
'main'
__ main __
 
Yes, the double underscores are obnoxious.
 
4:32 PM
hmm
 
I just looked to see if the english module has an alias for __FILE__, but I don't see one.
I guess __FILE__ isn't cryptic... just ugly.
 
I have another funny problem - I want to have a 'number' of length, let's say, 4, starting from 0000, so that I can increment it, like 0001, 0002, .... 9999
 
"%04d" % n
 
works really nice :)
 
At least one popular Ruby style guide says not to use the String % operator. Ignore it.
 
4:38 PM
Any solution for them
The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
 
I know, but I don't care here
 
5:05 PM
Hi. Good evening
Can you use scope methods with tableless model which only includes ActiveModel::Model?
 
5:16 PM
@Anwar How would a scope method work when the model isn't related to a database table? I thought that scopes were ways of defining queries, or parts of queries, but what is there to query if there is no database table?
 
hmm..That's right. Was looking for a tableless model which can have some associations and methods for those association
It's kind of a middle man. Doesn't need (or I'm not willing now) to be stored at db.
 
cya
 
6:13 PM
Hi guys
anyone there?
 
6:27 PM
Hello. Please review the room rules linked-to in the upper-right corner, if you haven't already. And welcome.
 
 
3 hours later…
9:03 PM
@thesecretmaster Did you decide what to put in the otter gem?
 
 
2 hours later…
user5870134
11:08 PM
Good evening, guys.
 
user5870134
Could any of you check out my new(est) jQuery Plugin?
 
user5870134
0
A: javascript regex ending string with values in array

MangoI've created a jQuery plugin for you: (function($) { // the string plugin object (NOTE: this can be extended) $.string = {}; // "create" a new string $.string.new = function(str) { return str; }; // test the string for a regex match $.string.test = function(string, regex) { ...

 

« first day (1137 days earlier)      last day (2118 days later) »