|
I've used jspdf for trucking load sheets and it's worked well, without any issues: http://parall.ax/products/jspdf Never tried to print labels but because it's creating a pdf via data-uri you shouldn't have any issues with default styles overriding measurements or anything like that.
|
# ¿ Apr 17, 2014 01:32 |
|
|
# ¿ May 17, 2024 01:09 |
|
supermikhail posted:Chrome after a while stops reloading JavaScript and gets it from the cache which is annoying when I'm editing it (supposedly it's not just JavaScript, but this is what's annoying). How do you work this thing? (Right now I "Clear Browsing Data"). Work in an incognito tab. If you're working with offline web apps this is also nice for having a fresh cache for testing and development.
|
# ¿ Apr 26, 2014 19:14 |
|
Lexicon posted:As a side project, I've decided to migrate my resume out of Apple Pages and into html - the idea being that I can version control it properly, etc. I'd like the CSS to roughly look like a paper resume at desktop device size, be appropriately responsive on mobile, and competently 'print to PDF' such that the resulting PDF looks like it came out of a word processor and not a web browser. I'm not really sure what you mean by 'looks like it came out of a word processor' but you can specify different css files for print than for screen, so you can optimize your layout specifically for a sheet of paper easily enough. e;fb
|
# ¿ May 4, 2014 18:39 |
|
pipes! posted:Here's some of the newsletters I subscribe to (also Sidebar): Thanks for the links. It's hard to tell what is going to be good vs. linkspam. http://webplatformdaily.org/ is a good site to check daily as well.
|
# ¿ Jul 3, 2014 02:56 |
|
Why can't the devs work in Linux? Plenty of web dev tools available in OSX are also compiled for Linux. What keeps them in windows at all?
|
# ¿ Jul 11, 2014 05:45 |
|
Pivo posted:Just the current scroll position. It's a browser thing, I know we're not doing it on purpose. Just doing window.reload(true) or whatever it is to not grab from cache, since we've got a modal where people do some poo poo and if it succeeds we want to reload the page and we show a little success thing at the top and then their new data. The page has gotten long though and I'm annoyed that some browsers save the scroll position (although it's awesome when I'm actually browsing the web) so people don't see that success message and it looks all hosed. If you don't have any other javascript that executes on page load, put this in a script tag after your <body> tag closes: JavaScript code:
|
# ¿ Aug 21, 2014 01:39 |
|
It's weird that .scroll only goes halfway up the page, maybe something is interrupting it. maybe something trying to take over scroll functionality? Also, just pointing out, I can't think of many reasons you should have to use window.reload. Really the only one I can think of is if you're using appcache and you've swapped caches.
|
# ¿ Aug 21, 2014 05:02 |
|
Pivo posted:But seriously, how would you have fixed it? Trying to display a font in a way that it wasn't designed? What's to fix?
|
# ¿ Aug 29, 2014 03:12 |
|
fletcher posted:Wasn't somebody just asking about whether they should use YUI in this thread? According to some folks in IRC, Yahoo's teams are trying out Ember and React right now.
|
# ¿ Aug 30, 2014 02:16 |
|
Lumpy posted:Need to learn ux? Here's how You got me! But yeah, call to action.
|
# ¿ Sep 1, 2014 03:36 |
|
Heskie posted:I had a similar issue where a PNG was reversed upside down for my client's Safari a while back. They were using OSX Tiger (Safari 5 I think?) but it looked fine for me in Mavericks/Safari 7. Web stuff should always be RGB. I doubt it was that.
|
# ¿ Sep 3, 2014 05:13 |
|
hayden. posted:I'm making a sort of Harvest Moon game in HTML/Canvas and eventually want it to be multiplayer. In the meantime I want to be able to store map data (it's a tile structure). I want to be able to save and load this map data across multiple computers because I do dev work on three separate PCs, so that means the localstorage option is out doesn't it? If you need to load and save map data across multiple clients you definitely need a database somewhere. The easiest way to keep connection info to your DB secret is probably to make a separate module that you can require into your main server code that contains the info, and put that module into your .gitignore file. I wouldn't worry about your sql queries being slow unless they're really heavy. Whether you use PHP or node for your back-end code is pretty much up to preference and what you want to learn/practice. Both are able to respond to ajax requests or use websockets. Are you planning on hosting the game on github pages or do you have a web server for that? As far as I know you wouldn't be able to run server-side code off github - just static pages and source code.
|
# ¿ Sep 3, 2014 14:24 |
|
I've been introducing stuff like grunt very gradually at work and I can see the value, especially for stuff like React where being able to recompile the jsx files live is pretty great. Not sure I want to jump down the browserify rabbit hole, but working with Node I can see the benefit of just being able to toss in node modules to solve problems I'd have some custom lib sitting around for previously. Watching the .net devs at work struggle for a whole day to get up and running with a visual studio solution and all its stupid dependencies is enough to keep me off the IDE path for now. Sublime and Terminal are quite enough.
|
# ¿ Sep 13, 2014 02:22 |
|
caiman posted:Which is better/faster/optimal: to call jQuery from Google's CDN in addition to your main JS file; or to use your own jQuery file that's combined into your main JS file? Option one means loading Google's fast and likely cached jQuery file, but option two means one less http request. Thoughts? Generally people recommend hosting your own these days. The initial gain from faster loading is quite marginal compared to the risk of malicious injection of code into the cdn version (like could have happened last week with jquery), the cdn going down, etc. It's also one more thing you can wrap together into your bundle if you're concatting/minifying your scripts.
|
# ¿ Sep 27, 2014 18:03 |
|
substitute posted:I think Atom (https://www.atom.io) in the 6-12 months will probably become one of, if not THE defacto code/text editors for web development (and maybe more). Get on board now people. I tried it for a day last week and it crashed on me three times. I want to like it but sublime is just faster, more stable, and has a better package community right now.
|
# ¿ Oct 11, 2014 15:31 |
|
fuf posted:Does the iphone browser try and detect phone numbers on pages and make them clickable? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. drop this meta tag in your <head>: code:
|
# ¿ Oct 16, 2014 06:14 |
|
Mostly Sober posted:Hi guys, I've just joined a small research project as a developer working on a learning analytics dashboard that looks similar to this: This sounds like a great use case for react-grid-layout: https://github.com/STRML/react-grid-layout
|
# ¿ Nov 16, 2015 15:55 |
|
nexus6 posted:I'm being put on a project that will essentially need to be a webapp/HTML & JS game that Your solution sounds fine. Application cache will handle caching your files offline quite well, as long as you get used to the way it works. localStorage has a 5MB limit on most browser/device combos and that's a lot of JSON. If you need more than that, look into pouchdb's client-side library for good cross-browser database functionality. For pretty much everything other than UI testing you can develop in Chrome on your machine and emulate various levels of network connectivity as needed. I do a lot of web application development for iDevices in this way, and I rarely need to hook an iPad up for debugging anymore.
|
# ¿ Dec 12, 2015 04:08 |
|
There's also this: http://jsconsole.com/remote-debugging.html But yeah, it's a pain and Chrome definitely doesn't always act the same as Safari.
|
# ¿ Jan 21, 2016 15:47 |
|
fuf posted:Am I right that Safari on iPhone cuts off the top of a web page with its menu bar? Kind of annoying. Is there any way to stop that or to force a site to go fullscreen? It does not, and the only way your site can go fullscreen is with a meta tag if your users save it to their homescreen.
|
# ¿ Feb 6, 2016 18:17 |
|
There are a ton of minimal css frameworks out there now as an alternative to bootstrap. I'm really liking Bulma lately but there are plenty of others. There is really very little need to go and use css modules or css in js, especially for a small project.
|
# ¿ Jun 5, 2016 23:15 |
|
ModeSix posted:What does the asp. Net ecosystem bring to the table that really will make me want to do it? Nothing except jobs.
|
# ¿ Jul 3, 2016 15:31 |
|
Thermopyle posted:Others have said the stuff I would say mostly, but I wanted to add that the new fetch api is pretty nice and there's a good polyfill for older browsers. This. Fetch is great. https://github.com/github/fetch
|
# ¿ Jul 8, 2016 03:16 |
|
Knifegrab posted:So I pass a props array to a component. Sometimes I reorder that array but my component doesn't update, and I'm guessing its because it is only looking at the top level of the arraay and since its just a sort the actual reference doesn't change. Copying the whole array seems like a process intensive thing, is there another way to force the copmonent to update. I wuld assume I could try and use ComponentWillReceiveProps but I am not sure if that will even be invoked since I doubt it sees this as a prop change... This is what keys are for. Give each element in your array of components a key that is relevant to its contents (not the index) and that should solve the issue.
|
# ¿ Jan 2, 2017 03:12 |
|
McGlockenshire posted:Not to belabor the point, especially after being pointed to the JS thread, but I'm irritated that all the transpiling solutions are so focused on the node ecosystem. I have no interest in installing a thousand dependencies so that I can invoke a tool every time I save a file to recompile the world before I can see if my code works. Sounds like you want babel-standalone: https://github.com/babel/babel-standalone#usage I went here: http://babeljs.io/docs/setup/#installation and clicked "Prototyping in the browser".
|
# ¿ Mar 18, 2017 22:58 |
|
Ruggan posted:Ok so that is all well and good for application code with well written tests. I agree that your approach makes sense. This may be a useless answer depending on your ecosystem, but at work we use SQL Server, and Visual Studio allows you to define your database in a project and generate migration scripts against a given database or just create a new one. It's great because the step of compiling helps you find bad references and you can migrate from any existing schema to your latest. Everything's just flat files so it's easy to put in version control and the diffs are useful, too. I'm not aware of any other solutions that are as good.
|
# ¿ Oct 22, 2017 01:15 |
|
Ruggan posted:Material UI (Next) vs Ant Design. Anyone used these? Assuming you're talking about react libraries, I used material-ui a couple years ago and was extremely unimpressed with it, specifically how it handles themes and colors. Huge pain in the rear end. Maybe it's better now. React-md looks like it may be a better option if you want to go the Material route: https://react-md.mlaursen.com/ We use semantic-ui at work now and I really have no complaints, it's very comprehensive, easily extended, the docs are great, and it looks great: https://react.semantic-ui.com/
|
# ¿ Nov 23, 2017 03:01 |
|
The Chrome team pretty regularly implements features using APIs that are still in the process of being proposed as web standards. Hell, google hangouts doesn't work in firefox because google implemented it using webrtc stuff that isn't standard. It's kinda rich for a google employee to be saying that.
|
# ¿ Jan 4, 2018 17:59 |
|
ChadSexington posted:I'm setting up a personal site for myself and considering using CSS Grid for layout and responsive design. I'm pretty comfortable with HTML/CSS/JS, but I'm primarily a backend developer and out-of-date with what's going on in web design right now. I'm wondering if there's another option I should be looking at. Bootstrap, maybe? Css grid serves a specific layout purpose so I'd recommend reading up on grid and flexbox and the differences between them to see what serves your needs. Rolling your own css is a great way to learn and I'd definitely recommend doing that over using bootstrap if your goal is to learn.
|
# ¿ Jan 5, 2018 17:45 |
|
UnfurledSails posted:Is there a service that can send people a one-off email when they enter their email address in a form? I'm using Squarespace to whip up with a basic website for my father's company. Due to legal reasons he can't just list the prices, so he needs to send them on demand via email instead. Check out Sendgrid, they have a free plan that lets you send 100 emails/day. We use it at work for one-off emailing (registration, etc).
|
# ¿ Jan 15, 2018 04:42 |
|
Nolgthorn posted:Yesterday I was developing something and I added a `setTimeout` to my code. Compilation started warning about how `timers` was not defined and when running it in my browser it didn't work. It took quite a bit of frustration before discovering that Visual Studio Code had automatically placed `import timers from 'timers';` at the top of my file. I have no idea why. Yeah VS Code does this thing where it looks through type definitions for the thing you're typing and imports it automatically if you tab-complete to that particular intellisense suggestion. I think the setting that controls it is `typescript.autoImportSuggestions.enabled`
|
# ¿ Feb 13, 2018 15:07 |
|
That's fine until you want your sidebar to be full height, at which point you're hacking around with clearfix. Flex fixes a real layout problem.
|
# ¿ Feb 28, 2018 03:54 |
|
the heat goes wrong posted:Just use flexbox man. While Grid is cool and all, it isn't that supported yet. Support is actually pretty good, the main issue is IE of course: https://caniuse.com/#feat=css-grid
|
# ¿ Feb 28, 2018 15:52 |
|
Grump posted:Does anyone have any experience implementing both Google Tag Manager and Analytics in a React app that uses React Router? Do I need both Google products? From what I’m reading, I can easily use GTM to create triggers on window location changes, but the actual user interactions are going to have to be coded into the event handlers with analytics.js Yeah but there are libraries to make it work more nicely with react, like this one by the NY Times: https://github.com/NYTimes/react-tracking I haven't used it but it might be worth looking into.
|
# ¿ Jul 18, 2018 02:30 |
|
Tei posted:I think Article 13 in the european union is the worst thing to happen to democratic values, freedom, security, privacy and web software developers. Tei posted:I have yet to study how Article 13 works in detail ok
|
# ¿ Sep 21, 2018 01:51 |
|
Dominoes posted:Hey dudes. Does anyone know what a Post body for JSON is supposed to look like? In Django, I print the request.body as: Your post body is valid JSON so yeah the issue is the content-type header not being set correctly. it should be application/json, not application-json (assuming you didn't typo that)
|
# ¿ Dec 30, 2018 02:50 |
|
Nolgthorn posted:You really just want to set window.location.href to the file location and let their browser do what it does with the filetype. In most cases it'll download. Just to elaborate, this depends on the content-disposition header returned by the server. 'attachment' will make it prompt to save, 'inline' will attempt to display it in the browser. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
|
# ¿ Jan 16, 2019 03:41 |
|
Microsoft Azure has a similar api and Here maps has one as well, shop around a bit.
|
# ¿ Apr 14, 2020 19:50 |
|
New Coke posted:I've been maintaining an Angular app that allows employees to clock in via a web portal, and some of them are seeing the time appear incorrectly. First off, I've added a bit of logging to try to get some visibility into the problem and confirm my suspicion; that some of their browsers are using an incorrect timezone. You should be handling all this time stuff on the server side. Never trust the client. Make an endpoint that the client posts to that simply indicates the user clocked in. Get the time on the server when the request comes in and store it in your database in UTC. When you display that time to a user, send it to the client in UTC and use the client time zone to translate it, at which point the previous suggestions about luxon and moment become relevant.
|
# ¿ Nov 29, 2020 05:11 |
|
|
# ¿ May 17, 2024 01:09 |
|
Violator posted:I've been taking a look at my current workflow so the recent JS talk has been good. Yeah there are tons of good css frameworks these days, just depends on what things you’re looking for.
|
# ¿ Dec 5, 2020 06:04 |