This file contains hidden or 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
| public createTask(req: Request, res: Response): Observable<mongoose.Document> { | |
| const body = req.body | |
| const self = this | |
| const task = body.task | |
| const projectId = body.projectId | |
| const moduleId = body.moduleId | |
| const timeRequired = body.timeRequired | |
| return Observable.create(function(observer: Observer<mongoose.Document>) { |
This file contains hidden or 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
| var d = $;var x = $('.c-box-list.c-box-list--linked.c-video-player__lesson-list.c-video-player__lesson-list--open').children | |
| for(var i = 0;i<x.length; i++) { | |
| var z = x[i]; | |
| (function() { | |
| var y = z.children[0]; | |
| setTimeout(function() { | |
| console.log('Switching to ' + y); | |
| y.click(); | |
| setTimeout(function() { |
This file contains hidden or 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
| // | |
| // DetailEventsBuilder.swift | |
| // DetailEventsBuilder | |
| // | |
| // Created by Tibor Bödecs | |
| // Copyright © 2018. Tibor Bödecs. All rights reserved. | |
| // | |
| // Modified by Anirudha Mahale | |
| // Copyright © 2018. Anirudha Mahale. All rights reserved. | |
| // |
This file contains hidden or 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
| val apiClient = APIClient().getAPIClient().create(APICallsInterface::class.java) | |
| apiClient.getFeeds().enqueue(object : Callback<ResponseBody> { | |
| override fun onFailure(call: Call<ResponseBody>?, t: Throwable?) { | |
| println("Failed") | |
| } | |
| override fun onResponse(call: Call<ResponseBody>?, response: Response<ResponseBody>?) { | |
| println("Result: ${response!!.body().toString()}") | |
| data = response.body()!! | |
| loadRecyclerView() |
This file contains hidden or 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
| // Set date somewhere | |
| UserDefaults.standard.set(Date(), forKey:"creationTime") | |
| extension Date { | |
| func isBeyond24Hours() -> Bool { | |
| if let date = UserDefaults.standard.object(forKey: "creationTime") as? Date { | |
| if let diff = Calendar.current.dateComponents([.hour], from: date, to: Date()).hour, diff > 24 { | |
| return true | |
| } | |
| return false |
This file contains hidden or 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
| // Set date somewhere | |
| UserDefaults.standard.set(Date(), forKey:"creationTime") | |
| extension Date { | |
| func isBeyond24Hours() -> Bool { | |
| if let date = UserDefaults.standard.object(forKey: "creationTime") as? Date { | |
| if let diff = Calendar.current.dateComponents([.hour], from: date, to: Date()).hour, diff > 24 { | |
| return true | |
| } | |
| return false |
This file contains hidden or 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
| // Set date somewhere | |
| UserDefaults.standard.set(Date(), forKey:"creationTime") | |
| extension Date { | |
| func isBeyond24Hours() -> Bool { | |
| if let date = UserDefaults.standard.object(forKey: "creationTime") as? Date { | |
| if let diff = Calendar.current.dateComponents([.hour], from: date, to: Date()).hour, diff > 24 { | |
| return true | |
| } | |
| return false |
This file contains hidden or 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
| extension Error { | |
| var code: Int { return (self as NSError).code } | |
| var domain: String { return (self as NSError).domain } | |
| var userInfo: [String : Any] { return (self as NSError).userInfo } | |
| } |
This file contains hidden or 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
| // | |
| // LayoutServices.swift | |
| // AMLayout | |
| // | |
| // Created by Anirudha on 10/10/17. | |
| // Copyright © 2017 Anirudha Mahale. All rights reserved. | |
| // | |
| import UIKit |