Jump to content

nuc

Member
  • Posts

    15
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

434 profile views
  1. If you even bothered to look at the socket.io site you'd see a chat example under the demos tab (redirects to https://github.com/socketio/socket.io/tree/master/examples/chat).
  2. Haskell, and PureScript (Scala infrequently too).
  3. Via the constructor of VerifyEmail. Please consult the docs for w/e framework/lib you're using https://laravel.com/docs/5.6/mail
  4. You answered your own question. Mailable is a component, so the with function is available. Both are correct. ->with('key', $var) ->with('key', [$var])
  5. Above was modelling a potential data representation solution - Haskell is just my current choice/employed language, and I feel it's clear and concise enough for most people to understand data structures (other language features <<>~, >>=, <|>, etc, probably not). Your endpoint would fill out the shortestPathBetween function; this function would return all stations along the path - if you wish to group them, that's up to you as well. If you need more assistance, you'd want to send a POST request to your handler with a body like: { "from": "Nawada", "to": "Jor Bagh", "time": "2018-02-19T20:00:00Z" } and would ideally return a structure similar to: { "from": "Nawada", "to": "Jor Bagh", "time": "2018-02-19T20:00:00Z", "stations": [ { line: "Blue", station: "Nawada" } , ... , { line: "Yellow", station: "Jor Bagh" } ] } You don't need to use Haskell by any means, but the concept of an n-linked list is the same. Adding in time would change the results, as we'd need to record average time between all stations. Least jumps wouldn't always be the shortest path.
  6. Re spa: I wanted clarification as the request in terms of FE was vague. I made an assumption, turns out it was an incorrect assumption - when most people say they want a javascript FE, they're talking about a spa consuming an api. Yes, you can use angular/react/etc as just the view layer and return it along with each page view; but, for what I have seen in your other thread I don't think that's necessary - you can get away with (for mvp) simple form submissions. If graphs would be the only "intensive" part of the page, these can also be generated by your server as images and returned with the associated data set. This is my opinion after many a greenfield, strangulation, and complete rewrites. You may wish to ignore it, and that's your right. I'm not saying you never need a spa (or similar), just that it's probably not the best idea right now - then again this isn't my project.
  7. Why do you need a spa framework (which is what I assume it is you're asking for)? Most projects get derailed because they try to do too much at once. There isn't anything wrong with server served html - the cult of JavaScript look down on it because it isn't "fancy" enough.
  8. I understand why the limit is enforced, but more lines does not equal better or more complete - it's likely that most students will just produce fillers, and the projects will be worse for it. He could've just listed, no 3rd party libraries, or similar. Even having a feature requirement is a terrible idea - that would prevent me from writing a single purpose application, regardless of passion.
  9. Whichever professor came up with a line limit as a "requirement" is an idiot. If you're struggling to fill up space, just use Java and write a crap ton of DTOs. There's a reason for concepts like generics, partial application, currying, etc exist: to write less code!
  10. Both above are half right in their explanation of what auto does in context of margin. The auto keyword tells the browser "I don't know what size margin I want now, calculate it for me"; because auto is set on the 2 opposing sides the value is split between them - centering the element. You should never use w3schools (not only b/c it's a scam site - do not attempt to buy a "certification") but also b/c information is wrong or out of date. Use MDN: https://developer.mozilla.org/en-US/docs/Web/CSS There is css-grid, or flexbox that also have solutions for centering.
  11. Without knowing the relation of the data, and the set of data itself I can't give you a great suggestion. The naive solution would be to make a doubly-linked list. You shouldn't take the below as gospel, speed times will be awful - worse than O(n); but the naive solution will get you started. There are gaps in solution, and logic, but it should help. data TransitLine = Central | Northern | District | Circle -- Some go north/south, but for simplicity we'll assume they're the same data Direction = East | West type GetNextStation = Direction -> Maybe Station data Station = Station { name :: Text , lines :: [TransitLine] , nextStation :: GetNextStation , intersections :: [Station] } mkStation :: Text -> [TransitLine] -> GetNextStation -> ]Station] -> Station mkStation -- construct the station = undefined nextStationOnLine :: Direction -> TransitLine -> Station -> Maybe Station nextStationOnLine direction station -- run nextStation function with direction = undefined stationList :: [Station] stationList = [ mkStation , ... ] -- return "can't find path" or the list of stations and the line shortestPathBetween :: Station -> Station -> Either String [(TransitLine, Station)] shortestPathBetween -- implement dijkstra shortest path = undefined The above is Haskell, if the syntax doesn't make sense I can explain it further.
  12. That is personal preference. What you're listing is basically the same between all those listed languages. Simple things like file io, and db access are included as standard or have a library that is widely accepted across all the languages you listed. But since you showed a comma separated list, and then separated java/javascript as if they were one in the same screams bullshit. Playing around with dragging some buttons onto a screen vs creating a non-blocking async application to handle twitter scale are two very different things. There is a reason why no one at scale uses VB.NET, and if they do use the Microsoft stack it's C# - for clarity reasons.
  13. Most NHS computers are piles of shit. Don't go for a desktop application, the amount of bureaucratic crap you have to go through (at least when I worked lvl 3 IT support) to approve a program is enormous; wanted to change to VNC from some other pile they were using before. Make it web/cloud based, so then all you need is a browser, any language can do this (your approval process can/will be easier). PHP would be the easiest to learn, but it is very limiting. A couple pointers before you start: look at proper project structure, and do not place core logic inline with view logic (look at MVC). Symfony2 is the only worthwhile framework that will help you with some of the heavy lifting. Laravel is ok, v4 has large limitations, and terrible templating language/ORM, and v5 is basically a shittier version of Symfony. Phalcon, and CakePHP aren't bad options. Don't forget tests!
  14. If all you want is a simple search where you assume people will be writing things correctly, what sparkle128 suggested is the easiest (for now) to integrate, and is your best bet. If you want partial searches (AND|OR), multiple keywords, aggregations, ranking data by specificity to search, or to allow word deviations then you're best off looking at seeding a solution like elasticsearch. When you'd add/update/delete/etc a row to your MySQL db, you'd also update the entry in elasticsearch; elasticsearch isn't a permanent data store RDBMS, it's a NoSQL search. PHP library: https://github.com/elastic/elasticsearch-php
×