I'm currently experiencing the weirdest problem with Google's Rich Snippets Testing Tool. It kept throwing up warnings for my website which didn't make sense, so I pulled all of the structured markup out of my page to do some testing:
The following (based on Google's examples) works perfectly: the 'Google search preview' section displays the result with a snippet. See example here.
So I took the working example, and replaced the dummy details with my own. I was amazed to find that it didn't work! I'm told by the app that it has "Insufficient data to generate the preview". See example here.
So (after lots more testing and banging my head against the wall) I try using the original (working) snippet in example 1, and replace one field at a time. I only got as far as the first 'name' field, and it broke! What's wrong with my name Google? See example here.
I'm really confused by this, what's up? I noticed that if I change my name to "Row Manni" (the same character length as "Bob Smith" in the example), then it does work.
Has anybody experienced anything similar? If so, how did you solve it, and if not, what do I do next?
Thank you
Edit 2011-01-19:
After changing to use vcard (on comment suggestion) I ran a few more tests and I get exactly the same result. These tests are available here (not working - uses my full name) and here (working - using truncated names).
I can't for the life of me work out what's wrong here! If their testing tool isn't working correctly, does their search detect rich snippets in the same way, and is this broken too? I'm leaving the microformats in my page now, but I'd still really like to pursue this for my own interest (and sanity!).
I've cross-posted on the Google webmaster forums (as mentioned in the comments) to see if they pick it up. You can view the thread here.
It's a "bug":
If name itemprop="name"' (with or without spaces, case-insensitive) matches a substring of the domain, then this error is generated:
Insufficient data to generate the preview.
your domain "dev.rowanmanning.co.uk" contains "Rowan Manning" [minus the space]
try changing your name to: "Rowan Something Manning" and see if it works.
TEST CASES:
fails:
domain: rutledge.com
name: ru t l e d g e . co
test link
fails:
domain: jpwco.org
name: jpw co
test link
succeeds:
domain: jpwco.org
name: not_jpwco
test link
Names also expected to fail: "co" "uk" "ning" "dev.r owan".
ps. "name" match to the path part of the URL (after the domain) will not yield the error. IE: http://jpwco.com/stack/dev.rowanmanning.co.uk/test3.html succeeds, with the name "Rowan Manning".
Bizarre indeed.
Related
I logged in today to make another logic app today, and i noticed the return output for (in this example) a Http-call has changed.
Before, i have a memory of the whole object showing in the output of an action in the workflow. Now i just se this:
Picture below:
The output body is only a string in some kind of encryption...
Does the Workflow definition Language where i want to reach one specific value in the Json-body still work? Or was this Update a major overhall.
I'm lost here.
Does the Workflow definition Language where i want to reach one specific value in the Json-body still work?
Yes, We can still do it, seems like you at the designer over view of a run, if you want to see full of inputs and output click on the Run details tab on top of this screen.
enter image description here
The content is base64 encoded, if you want to decode with in the logic apps for any other action input, we can use the base64 function which are explained here (https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions)
When i type a certain wrong URL in my browser (Chrome/Edge), I don't get a page not found, but instead I'm taken to a similar website.
I like this behaviour but I'm curious how this happens.
In the case I'm thinking about I type the following correct URL which takes me to a page about cancer mortality from 1951:
http://www-dep.iarc.fr/NORDCAN/English/Table1.asp?cancer=510®istry=208&sYear=**1951**&eYear=2014&sex=1&type=1&age_from=1&age_to=18&submit=Execute
Notice the 1951 above which indicates the first year of the table. If I type the same URL but with 1950 or 1949 I'm still taken to the same website with data from 1951 (as data for 1950 or 1949 does not exist).
http://www-dep.iarc.fr/NORDCAN/English/Table1.asp?cancer=510®istry=208&sYear=**1950**&eYear=2014&sex=1&type=1&age_from=1&age_to=18&submit=Execute
What is this redirection or guessing called? How is this happening? Is it the browser or the HTML? Normally when I type a URL that does not exist, I get a "website does not exist"-error, but in this case I do not. Why is this?
Feel free to edit the title into something better, because I don't know what this behavior is called.
The query string (data shown after the ?) is used by the server to generate the data shown on the page.
We can't see exactly what's happening on the server, but I would say it's likely that the "redirection" is the server finding the closest possible data to what's been requested, and adjusting the URL accordingly.
Recently I read a query about "What does console.log do" and I read an answer, tried using it and found that despite the answer stating that it outputs to the console in googles browser, I just tried it and I get no output.
I did try this code:
function put(p){
if ( window.console && window.console.log ) {
console.log(p); // console is available
}else{
alert(p);
}
}
BUT... I get neither console output or alert and furthermore .log is a Math property, what gives with that?
Make sure that in the Developer Tools the Filter in the console section is set to All or Logs...
I had a similar experience where I couldn't see any of my console.log output and it was because the console was set to filter on Errors only... All the log entries were there - they just weren't visible.
Bonus marks: you can also Ctrl + Click to select multiple filters (Errors + Logs for example).
Press F12 and look at in Developer Tools: Console. I tried your code just now, works fine for me -- Chrome version 30.0.
Since you're after console logging, not mathematical logarithms, perhaps you could stop going on about there being similarly-named function in the Math object. It's not relevant here whatsoever.
You're also coming across just a little shouty. console.log() works fine, and your question didn't indicate that you knew where to look. This is totally your problem, but I'm trying to help you. I can obviously only go on the information you provide, and I can't say your initial question was written very clearly.
It appears, since the snippet of code you posted works here absolutely fine, that your calling code & containing (which you haven't posted) would be the cause of the problem. You should debug these, to find out what's going wrong.
Do you know how to use the Chrome debugger? Are there any error messages showing in Chrome or on the console?
Test it on a simple page if necessary, to rule out other errors in the page/ or surrounding context breaking it. One common mistakes is declare functions in a jQuery ready handler or similar, and then try & access them globally. Make sure your logging function is actually global (outside any other function(){} or object {} blocks).
Lastly, it's good to have a logging function for portability (I have one myself) but put() is not a good name for it. Naming it consoleLog() or log() would be better.
Had the same issue .
Make sure your using de right path when you try import thing's .
Example whit my issue :
Wrong path ----> ** import normalizedData from 'normalizr'; **
Right path ---> ** import normalizedData from '../schemas/index.js'; **
I had also faced the same problem. Make sure you apply no filter in the console. It worked for me.
I have a personal blog I built using rails. I want to add a section to my site that displays my current streak of github contributions. What would be the best way about doing this?
edit: for clarification, here is what I want:
just the number of days is all that is necessary for me.
Considering the GitHub API for Users doesn't yet expose that particular information (number of days for current stream of contributions), you might have to:
scrape it (extract it by reading the user's GitHub page)
As klamping mentions in his answer (upvoted), the url to scrap would be:
https://github.com/users/<username>/contributions_calendar_data
https://github.com/users/<username>/contributions
(for public repos only, though)
SherlockStd has an updated (May 2017) parsing code below:
https://github-stats.com/api/user/streak/current/:username
try projects which are using https://github.com/users/<username>/contributions_calendar_data (as listed in Marques Johansson's answer, upvoted)
IonicaBizau/git-stats:
akerl/githubchart (Github contribution SVG generator)
akerl/githubstats (Github contribution statistics)
build that graph yourself: see the GitHub project git-cal
git-cal is a simple script to view commits calendar (similar to GitHub contributions calendar) on command line.
Each block in the graph corresponds to a day and is shaded with one of the 5 possible colors, each representing relative number of commits on that day.
or establish a service that will report, each day, any new commit for that given day to a Google Calendar (using the Google Calendar API through a project like nf/streak).
You can then read that information and report it in your blog.
You can find various example of scraping that information:
github_team_calendar.py
weekend-commits.js
As in:
$.getJSON('https://github.com/users/' + location.pathname.replace(/\//g, '') + '/contributions_calendar_data', weekendWork);
leaderboard.rb:
Like:
leaderboard = members.map do |u|
user_stats = get("https://github.com/users/#{u}/contributions_calendar_data")
total = user_stats.map { |s| s[1] }.reduce(&:+)
[u, total]
end
... (you get the idea)
The URL for the plain JSON data was:
https://github.com/users/[username]/contributions_calendar_data
[Edit: Looks like this URL no longer works)
There is a URL which generates the SVG, which other answers have indicated. That is here:
https://github.com/users/[username]/contributions
Simply replace [username] with your github username in the URL and you should be able to see the chart. See other answers for more in-depth explanations
If you want something that matches the visual appearance of GitHub's chart, check out these projects which use https://github.com/users/<username>/contributions_calendar_data but also apply other factors based on Github's logic.
https://github.com/akerl/githubchart
https://github.com/akerl/githubstats
[Project deprecated and unavalaible for now, will be back online soon.]
Since the URL https://github.com/users/<username>/contributions_calendar_data don't work anymore, you have to parse the SVG from https://github.com/users/<username>/contributions.
Unfortunately, Github loves security and CORS is disabled on their server.
To solve this issue, I've setup an API for me and everyone who needs it, just GET https://github-stats.com/api/user/streak/current/{username} (CORS allowed), and you'll get and answer like:
{
"success":true,
"currentStreak": 3
}
https://github-stats.com will soon implement more stats endpoints :)
Please ask for new endpoint at https://github.com/SherloxFR/github-stats.com/issues, it will be a pleasure to find a way to implement them !
I am trying the post an invoice to SAP using the F-47 transaction and using SHDB to record the transaction and learn how it works. I see there that sometimes BU and ZK BDC OK codes are used. I would like to understand the difference between them, but could not find any official documentation. Please, explain the difference between the two?
I found the meaning of some of the status codes. I post it here, so I can remember:
/00. Enter
/AB Go to overview
=ZK Go to additional information
=ENTE Enter (don't know exactly what is difference between /00)
=PI select cursor location
=STER Go to taxes
=DELZ delete cursor
=GO continue
=BU post (save)
/EEND end processing
=Yes select "yes" from message box
=BP park (save)
=ENTR Enter (don't know exactly what is difference between =ENTE or /00)
=AE save when changing document
=BK change document header (parking or posting parked document)
=P+ next page
=BL delete parked document
A BDC_OKCODE indicates which action is (will) be executed on a screen (things like save, back, exit etc). The BU code is used for a SAVE function (like in MM01 transaction). Sorry but I cannot recall to which function ZK maps to. Obviously their difference lies in the fact that they map to different functions. You can still find out which function each button utilizes by using System->Status->GUI status.
By the way, BTCI transactions are not fully robust- minor changes in GUI flow let your program break. Error handling / analysis is tedious.... DId you have a look to posting methods more preferably? E.g. like BAPI_* function modules? With the help of LSMW you can browse for different input methods and use them later standalone. Or you can use transaction BAPI directly.