|
Edge user agent. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393" Hello, I am Mozilla, I am also AppleWebKit, I am based on KHTML (that is a browser like Gecko), I am Google Chrome, I am Apple Safari. I am also Edge. Trust me here.
|
# ? May 11, 2017 16:39 |
|
|
# ? Jun 6, 2024 07:29 |
|
Tei posted:Edge user agent. They should have just used "*" to future proof it.
|
# ? May 11, 2017 20:07 |
|
I wonder when the last reasonable user-agent existed in a consumer browser
|
# ? May 11, 2017 23:58 |
|
NewForumSoftware posted:I wonder when the last reasonable user-agent existed in a consumer browser NCSA Mosiac: CSA_Mosaic/2.0 (Windows 3.1) Netscape 1.0: Mozilla/1.0 (Win3.1) Everything after that was bad. A brief history: http://webaim.org/blog/user-agent-string-history/
|
# ? May 12, 2017 00:24 |
|
as usual internet explorer hosed that poo poo up asap
|
# ? May 12, 2017 00:44 |
|
Tei posted:Edge user agent. It's just a cross-comparability list, but without any sane delimiter. Not the worst thing ever except for the systems out there that you know have basically white lists of user agent strings.
|
# ? May 12, 2017 14:03 |
|
Maybe the JQuery team where in the right to disable browser inspection, and push people to feature detection. Like if feature detection where not another place with eldritch horrors from a exterior dimension ready to devour the sanity of developers.
|
# ? May 12, 2017 15:10 |
|
I think they were right overall, but I've also encountered browser-specific bugs that weren't detectable by feature inspection. Identifying trouble user agents is the only way around in that case. Or you could do the reasonable thing and say gently caress everyone who chooses to use a broken browser.
|
# ? May 12, 2017 15:29 |
|
Quickie Q for pointers in the right documentation direction: I've got a Django website running and I'm migrating from server-side templates to AJAX endpoints and more API-driven content. How do I test the APIs? I can unit test the python code, but I'd like to put regression tests that point at the staging webserver. Not Selenium, the UI is under heavy development and it's someone else's responsibility anyway. I'm probably just googling the wrong type of testing. I see lots of "use jsfiddler to test your API" but that's not automated.
|
# ? May 13, 2017 04:47 |
|
Just use the request module to make requests to your api. Assuming your testing with python of course, but whatever language you're using can make requests and then you make assertions on the responses.
|
# ? May 13, 2017 07:08 |
That's one of the biggest reasons for moving to API-driven content, imo. Nobody wants to parse HTML snippets, but json is life json is love.
|
|
# ? May 13, 2017 18:47 |
|
So I've been picking up Django pretty well. Basically I have a set of data assumptions / levers / filters I'm letting users modify or insert. The next piece is I need to start creating a lot of time series data with these inputs. Since I've already done the calculations in a jupyter notebook with pandas, I was thinking of just reusing that code, and then looping through each row and inserting using Django's ORM, rather than try to save data directly to the database with pandas. Is this the best way to approach something like this? It's not going to be an astronomical amount of data or anything. I guess the alternative would be to not insert the created data into the database, but do all the calculations in JS or something in the browser.
|
# ? May 13, 2017 19:29 |
|
Example code? I'm having trouble following. Whether you use server-side or client-side code depends on what you're doing; if it needs to be fast and responsive, you may need client side. Otherwise, server-side sounds better for your use: You can code in a nicer language, with Pandas and your existing code. Dominoes fucked around with this message at 19:36 on May 13, 2017 |
# ? May 13, 2017 19:34 |
|
Most of them are simple inputs. Say for example a monthly cost, representing a lease, or perhaps the cost of implementing a piece of technology, or whatever, and the impacted dates. There's some organizational stuff, but most of it's no more complicated than that. Then I'm just visually organizing these different assumptions in a tree, which I've completed. So hidden to the user I'll probably create approximately 150 time series on a monthly basis over 10 years. Then just create some reports and dashboards with that. Was just wondering if there was something I hadn't thought of, or making this more complicated. I don't think I could easily do this in just django's ORM. Maybe that's my best bet (django pandas) and just bulk create or bulk insert after I've created my data.
|
# ? May 13, 2017 20:02 |
|
FAGGY CLAUSE posted:So I've been picking up Django pretty well. Basically I have a set of data assumptions / levers / filters I'm letting users modify or insert. The next piece is I need to start creating a lot of time series data with these inputs. Since I've already done the calculations in a jupyter notebook with pandas, I was thinking of just reusing that code, and then looping through each row and inserting using Django's ORM, rather than try to save data directly to the database with pandas. Is this the best way to approach something like this? It's not going to be an astronomical amount of data or anything. I guess the alternative would be to not insert the created data into the database, but do all the calculations in JS or something in the browser. FWIW, there's a Django thread. It's really hard to answer your question no matter which thread you ask in as it's just too general.
|
# ? May 13, 2017 21:28 |
|
Tangental: Found This page on storing DataFrames in a SQL-based DB. Can't tell how it works from the page; implies a tie-in with SQLAlchemy. How would you go about storing a data frame? Have a DB row for each row, with a Postgres JSONfield containing a list of values for each col? And separate entries defining the indexes and column datatypes, names etc? It looks like there may be ways to integrate HDF5 into a website DB. The relational SQL DBs most websites use don't feel appropriate for dataframes and n-dimensional arrays. Dominoes fucked around with this message at 21:37 on May 13, 2017 |
# ? May 13, 2017 21:34 |
|
There's nothing stopping you from querying whatever kind of database or service you want from your views and I think that's pretty common. Some types of data just aren't appropriate for RDBS.
|
# ? May 13, 2017 23:17 |
|
Dominoes posted:Tangental: Found This page on storing DataFrames in a SQL-based DB. Can't tell how it works from the page; implies a tie-in with SQLAlchemy. One protip: caching here is your friend, Pandas can be extremely memory intensive and can bring once-mighty servers to their knees. Don't use Memcache, the 1MB max value size is restrictive. I love Postgres but it's not necessarily the best tool for every job, though if your needs tend towards time series data take a look at this, since it's a really cool solution I want to play with. EDIT: If you're restricted to Postgres, I'd probably work out how you build your dataframe from multiple 2-dimensional tables, create tables for them, and then write queries to get whatever you need from them, and build the dataframe from that. If you want to store a dataframe whose contents only need to be updated occasionally (i.e., not in real-time), find the best way to store your various data sets and then use a cron job or something to rebuild the dataframe at your specified interval and cache it. Hell, you can pickle it, ship it to your server, and bypass any database if that fits your needs. But I would focus not on storing your dataframe as-is, and more on how to store the data you construct it from, and how to reconstruct it efficiently from a database. Ghost of Reagan Past fucked around with this message at 00:47 on May 14, 2017 |
# ? May 14, 2017 00:35 |
|
Thermopyle posted:Just use the request module to make requests to your api. Ok, so everyone's open-coding the tests, that works too. I figured with how important APIs are there'd have been some sort of testing framework for them by now.
|
# ? May 14, 2017 00:53 |
|
100 degrees Calcium posted:I spoke with the senior developer. I let her know that after some consideration and research, I think I can save time by doing some mock ups now and iterating them with the users. She's skeptical that the users can respond to anything short of a fully functioning application, but agrees that wireframing each slice before I start, while considering future workflow, would be beneficial for preventing gently caress-ups. It's not really much of a blessing since there was nothing preventing me from wireframing each task beforehand already. I just wanted to say you're doing the best you can in what seems to be an under-resourced project. You're right that mockups etc are important but that stuff is usually handled by some kind of UX designer, so it's not crazy that you would have not fully appreciated the usefulness - it's just not your area. That said, as you seem to be well aware, in small teams the dev frequently has to wear many hats. You're doing just fine, is what I'm trying to say.
|
# ? May 15, 2017 01:58 |
|
Having a cross browser layout issue and I've boiled it down this far but can't quite figure it out. Works fine in Chrome but not Firefox. It's a flexbox container with two panels. The container should stretch to fill its parent and the panels should stretch to fill the container. The panels will contain content that will cause them to become scrollable. In Firefox, the title doesn't seem to be factored into the calculation for the containers height though, causing it to be pushed down and the entire page to overflow. Ideally, Firefox would render the same as Chrome. What am I missing? code:
|
# ? May 15, 2017 02:02 |
|
Dr. Poz posted:Having a cross browser layout issue and I've boiled it down this far but can't quite figure it out. Works fine in Chrome but not Firefox. It's a flexbox container with two panels. The container should stretch to fill its parent and the panels should stretch to fill the container. The panels will contain content that will cause them to become scrollable. In Firefox, the title doesn't seem to be factored into the calculation for the containers height though, causing it to be pushed down and the entire page to overflow. Phone post, so no code, but it's probably padding adding to the heights of all your elements plus the two 100% heights stacking so your inner thing wants to be as high as the document so the title would make it taller. You probably want to use box sizing to include padding in your calculations for height, and then more importantly, not use 100% height. Make the body 100vh tall then make #conainter flex 1 so it fills all space not taken by the header. I'll do up,an example tomorrow at work if nobody beats me to it by then.
|
# ? May 15, 2017 02:15 |
|
Dr. Poz posted:Having a cross browser layout issue and I've boiled it down this far but can't quite figure it out. Works fine in Chrome but not Firefox. It's a flexbox container with two panels. The container should stretch to fill its parent and the panels should stretch to fill the container. The panels will contain content that will cause them to become scrollable. In Firefox, the title doesn't seem to be factored into the calculation for the containers height though, causing it to be pushed down and the entire page to overflow. I tried pasting this into JSFiddle (using Chrome) and both columns just stretch vertically to suit the content. Am I missing something? I noticed that I could replicate the behaviour you're after by changing #main to have a height of "100vh", is that what you want? putin is a cunt fucked around with this message at 02:17 on May 15, 2017 |
# ? May 15, 2017 02:15 |
|
a hot gujju bhabhi posted:I tried pasting this into JSFiddle (using Chrome) and both columns just stretch vertically to suit the content. Am I missing something? The part where he said it worked fine in Chrome but not FireFox?
|
# ? May 15, 2017 02:16 |
|
Lumpy posted:The part where he said it worked fine in Chrome but not FireFox? I saw that part, that's why I'm confused that after trying it in Chrome it didn't work fine at all, smart rear end. (I think it's a JSFiddle thing).
|
# ? May 15, 2017 02:18 |
|
I originally set it up in a codepen but it didn't render correctly in the preview, so it's something to do with the way they handle it. I had to run it in the browsers to properly replicate.
|
# ? May 15, 2017 02:22 |
|
Adding overflow-y: hidden; to #container solved it for me in Chrome and Firefox. (I'm not going to pretend I fully understand why). putin is a cunt fucked around with this message at 02:33 on May 15, 2017 |
# ? May 15, 2017 02:31 |
|
a hot gujju bhabhi posted:Adding overflow-y: hidden; to #container solved it for me in Chrome and Firefox. Neither will I but I'll take it! I tinkered around trying to implement Lumpys suggestions but couldn't get any play. Thanks a hot gujju bhabhi and Lumpy.
|
# ? May 15, 2017 02:43 |
|
Dr. Poz posted:Neither will I but I'll take it! I tinkered around trying to implement Lumpys suggestions but couldn't get any play. Thanks a hot gujju bhabhi and Lumpy. No problem! By the way I think Lumpy's suggestion to make #main 100vh high instead of 100% is on point. So probably do that also.
|
# ? May 15, 2017 02:49 |
|
I actually do have body height: 100vh in my real project. And I'd still really like to see whatever solution you had in mind Lumpy.
|
# ? May 15, 2017 02:57 |
|
Dr. Poz posted:I actually do have body height: 100vh in my real project. And I'd still really like to see whatever solution you had in mind Lumpy. https://jsfiddle.net/veddermatic/hzt5jL1o/1/ Works in my FF and Chrome. Basically what you came upon: you have to get the "content holder" to determine it's height, which it won't do my default as a flexbox in FireFox. I slap an overflow hidden on the content wrapper to do so. It's one of those "technically it's not a bug since it follows the spec but it would be nice" things.
|
# ? May 15, 2017 16:01 |
|
I'm not a designer or really even much of a design-implementer-sorta-guy (just not something I enjoy). Because of this I use Bootstrap for MVP's until we decide its worth it to bring on someone who does have some skills in this area. I'm just kind of tired of Bootstrap. Anyone have anything else they like to use? Particularly interested in feedback from people who have used multiple CSS frameworks...
|
# ? May 15, 2017 17:09 |
|
Thermopyle posted:I'm not a designer or really even much of a design-implementer-sorta-guy (just not something I enjoy). Because of this I use Bootstrap for MVP's until we decide its worth it to bring on someone who does have some skills in this area. Material Design Lite is kind of fun. I've enjoyed it more than Bootstrap or Foundation (older versions). https://getmdl.io/
|
# ? May 15, 2017 17:47 |
|
Thermopyle posted:I'm not a designer or really even much of a design-implementer-sorta-guy (just not something I enjoy). Because of this I use Bootstrap for MVP's until we decide its worth it to bring on someone who does have some skills in this area. I've looked at this a little, but it seems awesome http://materializecss.com/
|
# ? May 15, 2017 17:50 |
|
Thermopyle posted:I'm not a designer or really even much of a design-implementer-sorta-guy (just not something I enjoy). Because of this I use Bootstrap for MVP's until we decide its worth it to bring on someone who does have some skills in this area. I use skeleton sometimes but I'm kind of in the same boat of wanting something new, and the css/making-things-look-nice part of the job is the part that I hate and am bad at. I actually just started a toy project using skeleton because my five minutes of googling didn't turn up anything more compelling to met than that or bootstrap.
|
# ? May 16, 2017 12:42 |
|
https://semantic-ui.com/ is a thing that I plan on trying in my next personal project.
|
# ? May 16, 2017 16:44 |
|
The Fool posted:https://semantic-ui.com/ is a thing that I plan on trying in my next personal project. Oh, I like the looks of this one.
|
# ? May 16, 2017 16:47 |
|
If I've got a REST API with nested resources, but don't want to include the actual child resource objects, would it be better to provide a list of IDs or a list of resource URLs to retrieve the child resource objects? I'm leaning towards URLs as it will be easy to denormalize data client-side by deconstructing the URL - strip out the base API URL and you're left with <object_type>/<id>. The client doesn't need to know what endpoint corresponds to what list of random numbers. I don't see any downsides actually, but I frequently overlook things until I run into them later. Example payloads of 'People': code:
code:
|
# ? May 18, 2017 00:10 |
|
I think the former is almost alway preferable. To memory, I can't think of an instance where I'd ever preferred addresses
|
# ? May 18, 2017 00:19 |
|
|
# ? Jun 6, 2024 07:29 |
|
a hot gujju bhabhi posted:I just wanted to say you're doing the best you can in what seems to be an under-resourced project. You're right that mockups etc are important but that stuff is usually handled by some kind of UX designer, so it's not crazy that you would have not fully appreciated the usefulness - it's just not your area. That said, as you seem to be well aware, in small teams the dev frequently has to wear many hats. You're doing just fine, is what I'm trying to say. Yo, I appreciate this. I guess I let it out that I was feeling like I was majorly cocking this up way early, but yeah at this point I'm just trying to stay as dynamic and forward-thinking as I can. I've already made some moderately expensive mistakes, but I've been given another developer as a resource and he and I working pretty closely to handle each problem as expertly as we can.
|
# ? May 18, 2017 00:28 |