This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MvcTest | |
{ | |
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
dbContext db = new dbContext(); | |
ControllerBuilder.Current.SetControllerFactory(new ControllerFactory(db)); | |
RouteConfig.RegisterRoutes(DP.Web.Mvc.Core.RouteTable.Routes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DP.Web.Mvc.Authentication.Controllers | |
{ | |
public class AuthenticationController : BaseController | |
{ | |
public AuthenticationController(BaseDatabaseContext baseContext) | |
: base(baseContext) | |
{} | |
public ActionResult Index() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i have a user(id, name), interests(id, interest) and users_interests(user_id, interest_id) table. | |
how to select all users that have for example 2 matching interests. | |
lets say there are 4 users(mike, andre, julian, john). 2 of them have 3 matching interests. | |
for example mike(music, sports, games), andre(music, sports, games). the other 2 users have different interests. | |
i need a query where i can say give me all users with 2 matching interests. 2 is variable. the result would be mike and andre. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
portal.getHosterByStream = function (stream, callback) { | |
var content = ""; | |
var items_hoster; | |
var $; | |
var rel = []; | |
var hoster = []; | |
async.series([ | |
function (callback) { | |
console.log("2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
portal.getHosterByStream = function(stream, callback) { | |
request(URL + stream, function (error, response, body) { | |
if (!error && response.statusCode === 200) { | |
var hoster = []; | |
var $ = cheerio.load(body); | |
var information = $('body div[id=frmMain] div[id=dontbeevil] div[id=Vadda]').html(); | |
var items_hoster = $(information).find("ul[id=HosterList]").html(); | |
$(items_hoster).each(function (i, item) { | |
var rel = $(item).attr('rel'); |