Web Development

Accessing Facebook's Graph API

webdev: reddit for web developers - Sun, 06/24/2018 - 15:12

Hi guys,

I'd like to query Facebook's Graph API with my NodeJS application. I do not intend to access it on behalf of a user, I would like to get a page's data every x minutes.

Is that possible or can I just login as a user? The documentation is confusing af.

submitted by /u/roconf
[link] [comments]
Categories: Web Development

Prospecting software development clients

webdev: reddit for web developers - Sun, 06/24/2018 - 14:57

I am looking to get back into doing web software development. I used to do freelance websites but have since learned Node.js, and PHP while creating 2 SaaS for myself as well as a ton of backend custom tools for those projects.

How do you guys go about prospecting potential web software clients other than in-bound leads?

submitted by /u/jsdfkljdsafdsu980p
[link] [comments]
Categories: Web Development

Users DO Change Font Size

CSS-Tricks - Sun, 06/24/2018 - 13:49

Evan Minto:

The question was “How many users browse the main Internet Archive site with a default font size other than the common value of 16 pixels?” By knowing this, we would determine how many users would be affected by sizing with relative units like rems/ems.

Using the methodology I describe below, we found that the answer is 3.08% of our users.

So if you set type in pixels, and your traffic is anything like the Internet Archive's, 3% of your users won't have their explicitly-asked-for font-size alteration accommodated.

It's true. I made two little reduced test cases. First I left the default medium font-size preference on and set one with pixels and one with ems and sized them to match. Then bumped up the preference to large, and only the ems changed, the pixel-set one stays the same.

As ever, there is more to think about. How does page zooming factor in? How annoyed are those 3%? How annoyed are the 3% on site that use pixels but set type pretty large anyway? How much do we care about people who use the preference to size type down?

Direct Link to ArticlePermalink

The post Users DO Change Font Size appeared first on CSS-Tricks.

Categories: Web Development

Now that the free Wunderground API has been killed, let's talk about the best free API for current weather conditions.

webdev: reddit for web developers - Sun, 06/24/2018 - 13:22
News:

As of May 2018, free keys are no longer available for the Weather Underground API.

You might notice that they don't even list their pricing on their website anymore. Now I know why:

Access to Wunderground's API now starts at the low, low price of $850/month (= $10,200/year).

This is a tragic turn of events. Wunderground is the most accurate weather source in my experience (in suburban Ohio, USA). The second-most accurate weather source is Weather.com (aka "The Weather Company"), but they bought out Wunderground and they don't have their own API.

The parent company of The Weather Company is IBM. If this sudden decision to "enhance their relationship with their users" has taught us anything, it is to place zero faith in IBM.

It's been a fun ride, but now is time to abandon ship.

   

Alternatives:

This is a helpful website that ranks the various weather forecasting services by their actual accuracy: ForecastAdvisor.com

I am strictly interested in APIs that are 100% free for at least a couple hundred calls a day. I am also only interested in real-time weather conditions (ie, what it looks like outdoors currently), not future forecasts or past data.

The only API that I have significant experience with is Open Weather Map.

 

Open Weather Map API: (link)

Pros:

  • Truly free (60 calls / minute) and will remain that way for the foreseeable future. (Being free is in their mission statement.)

  • Easy to use.

  • Most important: OWM has robust and descriptive "weather conditions" with granular distinctions. The problem is that...

Cons:

  • Too often, OWM weather conditions are not very accurate. On a daily basis, it shows a blatantly incorrect weather condition. Eg: OWM says "light rain", but it is clear & sunny outside, or it says "clear" and it is overcast.

This is because OWM has only 40,000 weather stations (vs Wunderground's 250,000) and OWM also updates less frequently than competitors.

If you just need temp or RH, then OWM should be fine, but for weather conditions, it simply is too all-over-the-place that ≈15% of the time.

  • OWM does not provide a "feels like" or wind-chill temperature.

You can always calculate it manually with a simple formula, but the "big boys" have complex algorithms that factor in way more info than just the temp and wind speed to arrive at their "feels like" temperature.

 

AccuWeather API: (link)

Super accurate, but...

You only get 50 free calls per day (= once every 28 minutes), so they're pretty much out of the picture.

 

Dark Sky API: (link)

  • 1,000 free calls per day (= once every 1.5 minutes).

  • More accurate than OWM, but still considerably less accurate than Wunderground.

  • Piss-poor descriptions for the current weather state. They are "Partly Cloudy", "Clear", "Mostly Cloudy", and about 5 more. Compare this to the dozens that OWM provide.

  • If you need forecasting (which I don't), they seem to have the strongest focus on time-based predictions like "rain will start in 5 mins and end in 25 mins."

 

AerisWeather API: (link)

  • 750 free calls per day (= once every 2 minutes).

  • But, this access only lasts for 2 months. It says "Valid for renewable 2 month periods", but nowhere else on their website is there an explanation of what this means exactly. This expiration concept worries me when thinking about the long-term.

  • IDK about accuracy b/c they're not listed on ForecastAdvisor.

    

Anyway, I am eager to hear what you think about the various APIs and what your experiences have been. LMK if I missed any and I'll update the list.

   

Another idea:

  • Do you think that it is worth it to simply forget about an API and instead scrape Wunderground.com? (I am thinking that they will block my IP or I'll run into captchas and whatnot.)

 

submitted by /u/WHRMFR
[link] [comments]
Categories: Web Development

Can I get access to Rotten Tomatoes or something similar for a school project?

webdev: reddit for web developers - Sun, 06/24/2018 - 13:08

Hi everyone,

I'm student in a web development focused bootcamp. I'm beginning a project using Mongo, Express, React and Node. I'm trying to get access to the Rotten Tomatoes API and this would be my first project involving outside data so I don't know the normal process for accessing an outside API. Is it normally this difficult to get access to APIs?

What are the chances they'd give an amateur access for a school project? IF my chances are slim, anyone have any suggestions for API's that do similar things?

submitted by /u/jstuckey
[link] [comments]
Categories: Web Development

Having trouble with nesting functions

webdev: reddit for web developers - Sun, 06/24/2018 - 12:25

After getting the user details from database, it dynamically creates rows of data and a pagination to page through the data. The number of pages depends on the data. If a page shows 25 results and I have 75, there will be 3 pages (algorithm is done on the server using the page variable sent).

function getUserDetails(page) { $.ajax({ url: '/get-user-details', data: { page: a }, success: function(resp) { // clears the display div and dynamically create rows of data // resp.count is the total number of rows returned from database // I need to pass in getUserDetails as an argument somehow createPagination(resp.count, getUserDetails); } }); } function createPagination(num, func) { // create buttons depending on num // each button onclick event will call func // so if page 2 is clicked, 2 is sent to getUserDetails to query the next set of data // using (2 -1) * 25 as the offset in my db query for(let i = 0; i < records; i++) { $('<button>').on('click', function() { func(i); } } } submitted by /u/eggtart_prince
[link] [comments]
Categories: Web Development

How can do I use UTF8_encode/decode and JSON_encode/decode with a multidimensional php array ?

webdev: reddit for web developers - Sun, 06/24/2018 - 10:59

I'm posting my question here because I can't get a response in the general topic.

So here's the deal: I'm trying to convert a php array in js with Json_encode. At first when my content were some "Lorem Ipsum" everything was OK. But when I've change my placeholder with my real text, it broke: my apostroph and my french accent where all broken.

I've tried using UTF8_encode/decode, but because I've never use it before, it doesn't really help. I don't know how to use it properly.

So can someone explain to me how to do it ? I can't show you my code, because I don't know how (thats not the point of this post). I trying things I've saw on other forum, but it doesn't work.

submitted by /u/Forummer0-3-8
[link] [comments]
Categories: Web Development

Resources to better understand Bootstrap Grid?

webdev: reddit for web developers - Sun, 06/24/2018 - 10:56

I'm reading the documentation, and it's somewhat difficult to understand. I'm just wondering if there any resources out to help in gripping the concept. Like a detailed guide or something like Flexbox Froggy? Also, when should I use Flexbox and when should I use Bootstrap Grid?

submitted by /u/Orange2341
[link] [comments]
Categories: Web Development

Media Queries Help (HTML/CSS)

webdev: reddit for web developers - Sun, 06/24/2018 - 09:41

Can anyone please help me make my div block levels after the width is 700px. here is what i got so far.

https://codepen.io/CodeMafia/pen/WyymdK

submitted by /u/magepker728
[link] [comments]
Categories: Web Development

Can GSuite send out emails from custom domains?

webdev: reddit for web developers - Sun, 06/24/2018 - 05:37

So someone recommended GSuite from this post.

But it is only able to forward emails to those custom emails right?

So if I register GSuite with myname.com, I can setup alias to from other domains like, hi@other.com and hi@other2.com, but I can't send out emails with domains right?

submitted by /u/juzatypicaltroll
[link] [comments]
Categories: Web Development

CircleCi

webdev: reddit for web developers - Sun, 06/24/2018 - 04:16

Hey,

I have a project with two branches; master, development.

On circleci when accessing the repository, I don't seem to find an option to choose the branch I want to let circleci run the tests. Since my master branch doesn't has any tests set up (it's basically an empty branch for now), circleci tells me it can't find anything to test (which is correct). How can I configure circleci to work on my development branch?

My config.yml should be fine (npm test refers to jest):

version: 2 jobs: build: branches: only: - development docker: - image: circleci/node:7.10 working_directory: ~/repo steps: - checkout - run: npm install - run: npm test submitted by /u/Fasyx
[link] [comments]
Categories: Web Development

Domain Name Ideas ME4T.COM

webdev: reddit for web developers - Sun, 06/24/2018 - 03:38

Hello, looking for ideas to host on my shortest domain name. me4t.com

Thanks

submitted by /u/dwhofuss
[link] [comments]
Categories: Web Development

Pages