Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

August 30 2017

July 07 2015

Comment by rogeriopvl on Combine keys and values in RUBY

@CarySwoveland the user asking the question did not provide any proof that it was trying to solve the problem. And the question text is written as a programming exercise.

Comment by rogeriopvl on Combine keys and values in RUBY

@CarySwoveland the user asking the question did not provide any proof that it was trying to solve the problem. And the question text is written as a programming exercise.

Comment by rogeriopvl on Combine keys and values in RUBY

I'm voting to close this question as off-topic because it's clearly homework.

Comment by rogeriopvl on Combine keys and values in RUBY

I'm voting to close this question as off-topic because it's clearly homework.

Answer by rogeriopvl for Automatically populating a database when running Mean.js application

Two suggestions:

First, you could use npm scripts: https://docs.npmjs.com/misc/scripts

So, for instance if your "create database" script is a python file you would add this to your package.json:

{
  ...
  "scripts": {
    "createdb": "python create_database.py"
  }
  ...
}

And now you can run it when you need it like this:

npm run-script createdb

Still, this is very manual. Which leads us to my second suggestion:

You can create a grunt task that populates your database, and after running creates a hidden file indicating that it has been run. Just before running you check if the file is present, if so, you skip the task.

Add the hidden file to your .gitignore and every time your project is cloned and grunt is fired up, your database will be populated just once.

Answer by rogeriopvl for Automatically populating a database when running Mean.js application

Two suggestions:

First, you could use npm scripts: https://docs.npmjs.com/misc/scripts

So, for instance if your "create database" script is a python file you would add this to your package.json:

{
  ...
  "scripts": {
    "createdb": "python create_database.py"
  }
  ...
}

And now you can run it when you need it like this:

npm run-script createdb

Still, this is very manual. Which leads us to my second suggestion:

You can create a grunt task that populates your database, and after running creates a hidden file indicating that it has been run. Just before running you check if the file is present, if so, you skip the task.

Add the hidden file to your .gitignore and every time your project is cloned and grunt is fired up, your database will be populated just once.

June 07 2015

Top 5 artists this week

  1.  
  2.  
  3.  
  4.  
  5.  

May 31 2015

May 24 2015

May 17 2015

Top 5 artists this week

  1.  
  2.  
  3.  
  4.  
  5.  

May 10 2015

May 03 2015

April 26 2015

April 19 2015

April 05 2015

Top 5 artists this week

  1.  
  2.  
  3.  
  4.  
  5.  

March 29 2015

March 22 2015

March 08 2015

February 15 2015

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl