|
Sedro posted:You can customize the adapter and serializer for that model. By default, the serializer will serialize all attributes and the adapter will use a PUT request when you save(). Amazing, thank you! There's a lot to wade through with Ember, but I really like it. I got the REST adapter configured so that it can talk to my server, so I kind of know what's up with adapters and serializers, but obviously I have more reading to do!
|
# ? Aug 11, 2016 16:27 |
|
|
# ? May 9, 2024 07:40 |
|
Lumpy posted:Put a max-height on B with overflow-y: auto; What would I set the max-height: to though? A doesn't have a set height, it's text and some padding on the top and bottom that create the length which I'd like B to match.
|
# ? Aug 11, 2016 18:16 |
|
Soylent Pudding posted:I mean design in the sense that I've never touched HTLM/PHP/ASP. The closest I've come was database class, but I worked solely on the SQL database and other team members did the PHP front end. Basically I want to start learning website development because it's going to be at least a year before I can take any classes on it. I figured building a new website here would be a good project to focus on but I'm unsure of what to look at to start learning. Hmm, that one's tougher. On the one hand I want to say "just start throwing together stuff in HTML" so you learn the basics, but on the other, almost no one does that any more so I'm not sure if that's a basic that's worth learning. If you have a relatively defined project of static content like you say, I'd still suggest mucking about with WordPress. Get it installed on local and try to brain your way through this: https://codex.wordpress.org/First_Steps_With_WordPress Concentrate on getting a lot of content into it first, then you'll have lots of stuff to play around with in regards to styling, menu building, etc etc.
|
# ? Aug 11, 2016 19:07 |
|
life is a joke posted:What would I set the max-height: to though? A doesn't have a set height, it's text and some padding on the top and bottom that create the length which I'd like B to match. Whatever height makes sense... you said you wanted it to scroll but it kept getting taller and taller. So keep adding content, and "when things start looking stupid", that's your max-height. If you don't want things to be constrained, don't.
|
# ? Aug 11, 2016 19:22 |
|
Scaramouche posted:Hmm, that one's tougher. On the one hand I want to say "just start throwing together stuff in HTML" so you learn the basics, but on the other, almost no one does that any more so I'm not sure if that's a basic that's worth learning. If you have a relatively defined project of static content like you say, I'd still suggest mucking about with WordPress. Get it installed on local and try to brain your way through this: Counterpoint: WordPress is one of the worst things you can do to yourself if you want to run a website or learn web design / development. If you have simple content / mostly static stuff, use a static site generator like Jekyll or Pelican. If you have more complex needs, use something that isn't awful like Django.
|
# ? Aug 11, 2016 19:25 |
|
Scaramouche posted:Hmm, that one's tougher. On the one hand I want to say "just start throwing together stuff in HTML" so you learn the basics, but on the other, almost no one does that any more so I'm not sure if that's a basic that's worth learning. Almost no one makes full sites out of just HTML any more, but it's still a foundational skill that you need in order to do pretty much anything else, including anything non-trivial in WordPress (if you don't want to use dozens of fragile plugins which are more work to set up and maintain in the long run anyway).
|
# ? Aug 11, 2016 21:16 |
|
PT6A posted:Almost no one makes full sites out of just HTML any more, but it's still a foundational skill that you need in order to do pretty much anything else A number of backend developers I've worked with who consider <div> a reasonable element to use for literally every single piece of content or layout on a page would beg to differ.
|
# ? Aug 11, 2016 22:20 |
|
kedo posted:I use this for flexbox. It's just a series of mixins for all the various flexbox properties that includes vendor prefixes. The guy even shows how you can use it to replicate a grid, though I'm not sure why you'd do so. I really don't mind Bootstrap but this is good info to have. I need to learn more about flexbox. SASS is great and everyone should use it. I can't think of a single reason you wouldn't use it unless you literally couldn't because of constraints.
|
# ? Aug 12, 2016 01:11 |
|
kedo posted:A number of backend developers I've worked with who consider <div> a reasonable element to use for literally every single piece of content or layout on a page would beg to differ. Ignoring for the moment the fact that this, in a sense, proves my point, I was talking about building and maintaining a complete website. You either need to know HTML and CSS to some degree, or be working with someone that does. Someone involved had better know HTML.
|
# ? Aug 12, 2016 16:33 |
|
Does anyone know of a way to capture images of web pages with MP4 video embedded server-side on windows? It needs to capture at 1280x720 and allow setting a waiting time for javascript and resources to load, also it needs to be headless. Annoyingly wkhtmltoimage works aside from video. I found this for linux http://www.leonardteo.com/2011/07/taking-server-side-screenshots-of-websites/ but not windows. im going to cry
|
# ? Aug 12, 2016 16:46 |
|
PT6A posted:Ignoring for the moment the fact that this, in a sense, proves my point, I was talking about building and maintaining a complete website. You either need to know HTML and CSS to some degree, or be working with someone that does. Someone involved had better know HTML. I was agreeing with you, albeit with a sarcastic joking reply. My point is that there lots of developers out there (more than I'd like to imagine) who think, "I work on websites, but I only do stuff on the backend. Therefore I don't need to know anything about HTML or CSS best practices," and are perfectly happy to have their poo poo spit out nasty markup filled with deprecated or misused elements. I choose not to work with these people again because it's frustrating and there are plenty of other developers in the sea. Anyone working in this industry, even UX or designer folk, should know enough HTML and CSS that they could mockup a simple page themselves if they had to.
|
# ? Aug 12, 2016 16:48 |
|
It's actually an interesting question from a pedagogical standpoint; obviously there is value in knowing how to HTML and style things. But when's the last time you did so from scratch without using any interim/generation tools? Like I remember when IE3 came out and TABLEs were suddenly a big deal (and JPGs!), so obviously I have a grounding in the basics, perhaps too basic. But for people getting into it fresh new, what's the compelling use case for learning HTML and writing it from scratch? I think the most HTML I've written in the last few years has been essentially article level formatting, and the most CSS has been menu tweaking. If anything raw HTML has become something of an adjunct to authoring tools in a way; when's the last time you opened up a new file and started typing "<HTML>...</HTML>"?
|
# ? Aug 12, 2016 17:30 |
|
Scaramouche posted:It's actually an interesting question from a pedagogical standpoint; obviously there is value in knowing how to HTML and style things. But when's the last time you did so from scratch without using any interim/generation tools? Like I remember when IE3 came out and TABLEs were suddenly a big deal (and JPGs!), so obviously I have a grounding in the basics, perhaps too basic. But for people getting into it fresh new, what's the compelling use case for learning HTML and writing it from scratch? I think the most HTML I've written in the last few years has been essentially article level formatting, and the most CSS has been menu tweaking. If anything raw HTML has become something of an adjunct to authoring tools in a way; when's the last time you opened up a new file and started typing "<HTML>...</HTML>"? Constantly at my god drat rear end backwards company that makes me want to shoot myself.
|
# ? Aug 12, 2016 17:37 |
|
kedo posted:I was agreeing with you, albeit with a sarcastic joking reply. My point is that there lots of developers out there (more than I'd like to imagine) who think, "I work on websites, but I only do stuff on the backend. Therefore I don't need to know anything about HTML or CSS best practices," and are perfectly happy to have their poo poo spit out nasty markup filled with deprecated or misused elements. I choose not to work with these people again because it's frustrating and there are plenty of other developers in the sea. While I agree it doesn't feel good when generated pages have crap source code, I'm not sure it matters much of the time. The idea is that the prettiness or correctness of the source only matters as far as it takes for the browser to parse it in a performant way. People have no need to be reading it. I question the usefulness of a backend generating html that a human will have to be looking at.
|
# ? Aug 12, 2016 17:38 |
|
Giga Gaia posted:Constantly at my god drat rear end backwards company that makes me want to shoot myself. Do they force you to use Notepad or something? If so, please find a new job. Literally any editor I've ever seen that's been specifically built for writing HTML will throw in some boilerplate code. Edit content: Anyone who's looking for a good walkthrough of .NET Core working with MVC/Entity Framework/angular/bootstrap(or not, but it's included in the course), should look at this series: https://app.pluralsight.com/library/courses/aspdotnetcore-efcore-bootstrap-angular-web-app/table-of-contents Pluralsight Membership required of course. The first 3 or 4 modules are pretty basic, this is what web dev/html/cs/javascript is. Once you skip or slog through that, he starts going into how the .NET MVC works and it's really well presented. He's a total grognard and even says "it's hard to grok" at some point in the Javascript section, which is loving amazing, reminds me of my childhood. The guy presenting the course is super good and really explains well for anyone (like me) who was/is having a hard time getting their head around the .NET Core framework. I work in education, and this guy should really be a teacher professionally. ModeSix fucked around with this message at 18:26 on Aug 12, 2016 |
# ? Aug 12, 2016 18:13 |
|
Thermopyle posted:While I agree it doesn't feel good when generated pages have crap source code, I'm not sure it matters much of the time. The idea is that the prettiness or correctness of the source only matters as far as it takes for the browser to parse it in a performant way. People have no need to be reading it. I agree for the most part. I'm mostly talking about what it's like as a front-end dev to deal with that sort of crap, not as a browser interpreting said crap. If one one else has to touch it and it's generated in a performant way, that's great and I don't really care. But that hasn't always been the case for me. Thermopyle posted:I question the usefulness of a backend generating html that a human will have to be looking at. Absolutely agree with this. Scaramouche posted:It's actually an interesting question from a pedagogical standpoint; obviously there is value in knowing how to HTML and style things. But when's the last time you did so from scratch without using any interim/generation tools? Like I remember when IE3 came out and TABLEs were suddenly a big deal (and JPGs!), so obviously I have a grounding in the basics, perhaps too basic. But for people getting into it fresh new, what's the compelling use case for learning HTML and writing it from scratch? I think the most HTML I've written in the last few years has been essentially article level formatting, and the most CSS has been menu tweaking. If anything raw HTML has become something of an adjunct to authoring tools in a way; when's the last time you opened up a new file and started typing "<HTML>...</HTML>"? Knowing what can and cannot be done and what's easy vs. hard. I'm coming from the perspective of someone who worked with print designers and web designers (who didn't know how to code) for several years, and their lack of knowledge made my job incredibly difficult. I was in the position of saying, "No we can't do that because it's literally impossible," or "No we can't do that because it's more complex than the budget allows," and they weren't very helpful in coming up with alternative solutions. Like all things, there's a car analogy here. To sell cars you don't need to know how to build one by hand and in fact you don't even need to know how one runs. However knowing how the various pieces fit together and why engine A is better than engine B, or why you can't put wheels X on car Y makes you a more informed salesperson which in turn makes you a more valuable resource to your clients and your employer. Even if you're using Angular or WordPress or whatever framework/CMS/tool, you're still probably writing at least some structural HTML. If you didn't have a solid grounding in how and why it works the way it does, wouldn't it make your job a lot harder?
|
# ? Aug 12, 2016 18:15 |
|
kedo posted:Even if you're using Angular or WordPress or whatever framework/CMS/tool, you're still probably writing at least some structural HTML. If you didn't have a solid grounding in how and why it works the way it does, wouldn't it make your job a lot harder? Oh yeah, and I'm not arguing against it even. But I don't think I've written my own <HTML>, <HEAD>, and <BODY> information in a dog's age, which is a significant (thought not total) part of HTML. It seems like everything up until the first <div class="content"> is getting handled for you now by various tools, and the lumbering ever-expanding CSS/Javascript juggernaut handles everything else. Another example is that I haven't used TABLE in forever either, because CSS columns are pretty cool. Or <IFRAME>. I think the only old school HTML only structures I use on the reg are: - <Hx> (hilariously only for the obsolete SEO intangibles that people insist on having; formatting wise CSS handles anything H does) - <p>/<br/> - <ul>/<ol>/<li> - <div> - <strong>/<em> That might be though that I'm not really a display guy, having come up through databases/server side, and am a weak scrub compared to the rest of you.
|
# ? Aug 12, 2016 20:45 |
|
I'm a bit confused by this as I write html/body tags constantly for the layouts and partials that my framework or static site generator. Yeah its not an .html file but I couldn't imagine going years without rewriting a body tag unless I worked on the same product for all those years that all extended from the same single layout file that never got updated. I used an iframe yesterday to make a 'preview panel' in an admin interface to show how something appeared to the customer by literally displaying what the customer saw in a borderless iframe. Also tables are good for tabular data . HTML is cool and good.
|
# ? Aug 12, 2016 21:05 |
|
Heskie posted:I used an iframe yesterday to make a 'preview panel' in an admin interface to show how something appeared to the customer by literally displaying what the customer saw in a borderless iframe. wish i could do that in m y application but it would be way too heavy
|
# ? Aug 13, 2016 01:51 |
|
I am managing an extremely simple site for my dad. He's got a brick-and-mortar store and he wants it to have a web presence. It's a bunch of pages that are all basic html, and a css file for the style stuff. Now, this is something I do to the side, it only needs a content update like once a year, so I don't want to put much effort into it. I'm not a designer, either. The website is completely usable and I made it easy for visitors to find the information they need, but it looks like it was made in the 90s. I don't really care about that part, if he wants something better he should hire someone with the right skills for it. When my dad asks me to update the content, there's two things that somewhat annoy me: - Because it's barebones html, stuff like the menu bar on top of every page is literally duplicated in every html file. A change to the menu is a lot of work. - My dad doesn't understand html so he cannot fix stuff like typos himself. He does have a wordpress blog elsewhere and has no trouble with its wysiwyg editor. For the first point, I'd normally use some kind of templating engine with the ability to inherit from a global page definition or to include reusable components. We use Java-backed jsp and ftl templates at work. The thing is, my dad uses a simple webhost that only supports php, and client-side stuff of course. And because I don't spend enough time on it to want to put hours of work into upgrading it, I don't want to have to wade knee-deep into php or javascript to set up an engine. I would like something quick and simple, where I dump some files on the server, add a tag or two to the existing html pages, and that's it. For the second point, which might be mutually exclusive with the first - I'm wondering if there's some kind of tool, perhaps a CMS, that doesn't force any kind of default layout on me and can just take the existing html and css files and allows my dad to edit pages in a WYSIWYG editor on the fly, so that he doesn't need to use FTP to upload changed files. As I said I want simple and quick. If that's asking too much, it's easier for me to push through those annoyances and just keep updating the website old style. Carbon dioxide fucked around with this message at 20:44 on Aug 13, 2016 |
# ? Aug 13, 2016 20:39 |
|
Scaramouche posted:Oh yeah, and I'm not arguing against it even. But I don't think I've written my own <HTML>, <HEAD>, and <BODY> information in a dog's age, which is a significant (thought not total) part of HTML. It seems like everything up until the first <div class="content"> is getting handled for you now by various tools, and the lumbering ever-expanding CSS/Javascript juggernaut handles everything else. Another example is that I haven't used TABLE in forever either, because CSS columns are pretty cool. Or <IFRAME>. I think the only old school HTML only structures I use on the reg are: <table>s are cool and good, because sometimes you need to display tabular data. Why would you go through the hassle of formatting that all with css when there's absolutely no point? If you are not displaying tabular data, though, you should not be using a table.
|
# ? Aug 13, 2016 22:07 |
|
Carbon dioxide posted:I am managing an extremely simple site for my dad. He's got a brick-and-mortar store and he wants it to have a web presence. It's a bunch of pages that are all basic html, and a css file for the style stuff. It sounds like you have a pretty good use case for a static site generator. Basically, markdown/template goes in => HTML comes out. You then upload the generated HTML wherever you want to host it. Markdown should be teachable and if you just setup a shortcut that runs the generator or something your dad could could probably do everything end to end. Alternatively (and depending how much hosting is already costing you), something like squarespace might be a better solution if you're already thinking "I don't want to deal with this".
|
# ? Aug 13, 2016 22:48 |
|
Thanks, that page was very useful. I decided to go with jbake because it uses the freemarker templates I'm used to. I also made the menu bar a generic include in every page. At the very least this will make it easier for me to change things, and perhaps I can even teach my dad how to do edits himself.
|
# ? Aug 14, 2016 13:45 |
|
If your dad already knows how to use wordpress maybe you should just rebuild it as a wordpress site? Easy for your dad to edit, no more menu problems, and you can replace the 90s design with something modern.
|
# ? Aug 14, 2016 14:03 |
|
Is there a jsfiddle equivalent that does live reload? Why do I have to click "run" every time what is this 2015 or somethin
|
# ? Aug 17, 2016 15:59 |
|
fuf posted:Is there a jsfiddle equivalent that does live reload? Why do I have to click "run" every time what is this 2015 or somethin http://codepen.io/
|
# ? Aug 17, 2016 16:12 |
|
thank you my man
|
# ? Aug 17, 2016 16:15 |
|
Careful with codepen, its "hot reloading" is so aggressive that sometimes I've had it fall into an infinite and loop and crash because it's trying to run my code as I'm writing a for loop or some other thing.
|
# ? Aug 17, 2016 19:59 |
|
I'm redoing my personal website/blog completely. Do people still use css resets? My current/old one is using normalize.css. Is that one still the one to use?
|
# ? Aug 18, 2016 08:38 |
|
I see it pretty regularly on projects, yeah.
|
# ? Aug 18, 2016 12:55 |
|
Okay, is it just me or is Drupal a huge pain in the rear end? I know there are a million and five modules that exist for it, but finding one that does what I want is loving impossible. Is there a better place for me to look besides just Googling whatever function I'm trying to achieve? For example: I'm trying to figure out if there's some way to generate a linked list of the content on a page based on its headline structure. I have zero clue how to Google this in Drupal-speak.
|
# ? Aug 19, 2016 15:54 |
|
Crossposting from the .NET Megathread. I'm in the process of learning .Net Core and I have a question about DbContext. I'm using an override in my DbContext and want to tell it to use a Postgres SQL server, but the Npgsql documentation is loving wondrously inadequate. This is what I've got in my WorldContext.cs file: code:
code:
ModeSix fucked around with this message at 16:20 on Aug 19, 2016 |
# ? Aug 19, 2016 16:17 |
|
kedo posted:Okay, is it just me or is Drupal a huge pain in the rear end? I know there are a million and five modules that exist for it, but finding one that does what I want is loving impossible. Is there a better place for me to look besides just Googling whatever function I'm trying to achieve? It's just that Drupal has quite a steep learning curve. It sounds like you're trying to make a table of contents, like on wikipedia pages? Try looking at the Comparison of Table of Contents / TOC modules to see if there's one there that does what you're looking for.
|
# ? Aug 19, 2016 17:04 |
|
I need help streaming a file download to file on disc. What I've got going so far: My server is streaming the file from the database into the HTTPResponse. Client-side, I'm using the HTML5 File API to write to a file on disc within a Chrome App writing sequential Blobs to a location, works great. What I need is to stream the data from the download occurring over XHR into that location, but as far as I can tell the XHR (https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent) doesn't give you the option to take pieces of the file as they appear, you simply get to know how many bytes have transferred so far and wait until it's complete before you can see the data all put together in memory. I think I need this because my Chrome App crashes and the logs show 'Out of memory', to which my response is "probably shouldn't load the whole file download into the Chrome App memory before writing to disc." I'm shipping some large files (500MB+) as well. I'm aware of the Chrome Blob limit issue (is it still?) (https://bugs.chromium.org/p/chromium/issues/detail?id=375297) but don't think this is my problem, since I break up the ByteArray of the file download into small Blobs that I write to disc. So, does anyone know how to get the current transferred bytes in an XHR so I can stream a download to disc?
|
# ? Aug 19, 2016 17:50 |
|
Assuming no one can answer your question directly, you could consider breaking the large file up on the server side and then downloading each chunk separately with a single XHR each, then assembling the chunks again client-side as required. Possibly not ideal, but it would work.
|
# ? Aug 19, 2016 18:36 |
|
PT6A posted:Assuming no one can answer your question directly, you could consider breaking the large file up on the server side and then downloading each chunk separately with a single XHR each, then assembling the chunks again client-side as required. Possibly not ideal, but it would work. Yea that's a possible solution, similarly (http://stackoverflow.com/questions/20058339/use-xhr-onprogress-to-process-large-ajax-download-without-running-out-of-memory) suggests using Range headers with multiple XHRs, though I'm not sure to what extent my IIS server can just sort of deal with that by itself rather than me having to change the server-side code to manually grab just that range of bytes and then set the Content-Range header on the Request. Edit: MVC needs you to handle that manually, so after trying that it of course turns out that my asynchronous SqlDataReader Stream isn't seekable. Opulent Ceremony fucked around with this message at 19:13 on Aug 19, 2016 |
# ? Aug 19, 2016 18:48 |
|
nexus6 posted:It's just that Drupal has quite a steep learning curve. It sounds like you're trying to make a table of contents, like on wikipedia pages? Try looking at the Comparison of Table of Contents / TOC modules to see if there's one there that does what you're looking for. Thanks much!
|
# ? Aug 19, 2016 19:52 |
|
I'm sorry if this is a bad question, but I'm kind of overwhelmed with all of the framework language options. I want to make something with a LAMP stack, or maybe RoR. Out of those four languages, which is in the highest demand or the most versatile? I'm leaning towards Python since I work in ops/infrastructure and that would serve me well even before I get into development.
|
# ? Aug 21, 2016 01:08 |
|
Python + Django is a pretty good framework to get started with. The documentation is world class compared to most of the competition, including Ruby on Rails. The framework is reasonably well designed too, with a decent balance between getting poo poo done and flexibility for your own code. If you want more flexibility, you can go with flask, but you'll get a lot less 'out of the box' compared to Django.
|
# ? Aug 21, 2016 01:20 |
|
|
# ? May 9, 2024 07:40 |
Seconded. Though Django's ORM will shield you from having to learn SQL, which might be a plus for you at this stage (you can learn how to do SQL properly later on, and meanwhile the ORM lets you internalize object-oriented data modeling practices).
|
|
# ? Aug 21, 2016 01:23 |