Searching Through Google +1 Links - google-plus-one

I do a lot of searches to answer specific questions I have (usually programming related). When I find an answer I +1 the page using the +1 Chrome Extension. I don't like to bookmark pages like these, because my bookmarks fill up with links to pages that I can't remember viewing.
If I end up Googling the same question again, seeing that I have +1'ed a particular page saves me a heap of time. But what I would really like to do is search through only the pages that I have +1'ed.
The problem is that the +1 API is all about displaying the +1 button, not accessing the list of URLs you have +1'ed. Does anyone know if it is possible to somehow search through the complete list of you +1'ed items (and I already know about the +1 list in Google+)?

Related

Instagram scraping a random list of public profiles

Quick summary, I want to create a list or dictionary of random IG profiles (size = ~1000). If possible i would like to set conditions based on number of followers the profiles have. Honestly, I've been searching the last few days for some kind of direction but haven't found anything. I've been using Insta-scrape but it haven't been successful. Any help would be great appreciated.
Firstly Scraping Instagram is illegal based on their Terms and Conditions so you should have definitely went to do more research before posting this. FBI are probably watching you right now. Scraping other websites legally can be done using requests and beautifulsoup4, or selenium

How can I find out similar texts / strings given a string?

In sites like Quora or Stack Overflow, on a particular question, they are able to show questions that are possibly related. A quick look at them would reveal that they are merely looking for questions with similar text content. Is there any standard technique to find out such similar texts from a DB table where all texts are stored?
For example if you go to this question -
How to remove Application icon from Action Bar in Android?
it shows the following question as related -
Remove application icon and title from Honeycomb action bar .
If I have column questionText, where the questions texts are stored, in a table questions, how will I find out such related strings?
You'll need to extract keyword tokens from your documents and them find correlation between them. You can use a FOSS tool like Apache Lucene to do that for you.
They can rely on tags also.

Why my google +1 button doesn't show statistics/numbers?

I have more than 1K +1 for my website. And I want to show that number next to my +1 button as it shows in all other websites. But mine is not working.
If you are not understanding what i am trying to say then look at my website
http://come2chat.com
look at the top center of my webpage. It has a google +1 button but it doesn't show how many +1 I have on it.
to see the number of +1, i have to visit my google plus one profile at
https://plus.google.com/107969039583165788589/posts
how to fix this problem?
You need to use another +1 button.
You can find the right ones here:
https://developers.google.com/+/web/+1button/#button-sizes
Looks like you need to change your data-annotation and data-size attributes.
The button generator at the top of the page I linked can help you find the look you want.

search results and pagination wrong if embedded view or block in result set

I have two content types (in a Drupal 7.20 environment) which embed views or blocks. When I allow those content types in search results, the results page goes sideways whenever those content types are represented in the result set: the pager shows a different number of total pages from one results page to the next, or disappears entirely after I hit Next (!), fewer than 10 results show per page (yet there's a pager...), etc., etc.
If I disallow those content types (via Custom Search), I don't see any problems with pagination, etc.
What I have noticed is that the actual views/blocks get executed when the search results page is constructed - it's not merely a matter of hits being found in the search_index table.
Anybody know how to address this problem?
(I've searched through stackoverflow, and issues for Search and Custom Search on Drupal.org - no joy.)
Thanks in advance,
Lee
[Edit: fixed a couple of typos...]
[3/17/13 Edit: The problem turns out to be due to the pager for the view or block that is included in the search result set. If the view is in the result set, but doesn't have a pager, there is no problem. My solution, therefore, is to detect that I'm on a search results page in hook_views_query_alter() (by looking at the request URI) and set
$view->items_per_page = 0;
which effectively gets rid of the view's pager.
[I didn't realize I could answer my question - not sure how that's different from editing the question to include the answer, but I'll put my answer here as well, anyway.]
The problem turns out to be due to the pager for the view or block that is included in the search result set. If the view is in the result set, but doesn't have a pager, there is no problem. My solution, therefore, is to detect that I'm on a search results page in hook_views_query_alter() (by looking at the request URI) and set
$view->items_per_page = 0;
which effectively gets rid of the view's pager.

Reverse Routing Slug-Based URL in CakePHP

(I know there's a couple of other reverse-routing-slugs questions on this site, but I'm not having much luck relating the answers to my particular issue, so I'll ask my more specific question...)
I am building a site whose URLs now need to be slug-based, i.e. what was initially news/item/1 now has to have the URL news/firstnewsitem. And so on for a number of other controllers. I can easily get these addresses to work, and maybe even not stomp on my existing utility actions, with something like:
Router::connect('/:controller/:slug',
array('action'=>'item'),
array('pass'=>array('slug'), 'slug'=>'[^(index|add|edit|view|delete)]')
);
However, the reverse routing of these new links seems to be a non-starter: Cake is still generating such links as news/item/3. It seems optimistic to hope that a slug-based URL would automagically happen, but is there any array that I can pass in my Html->link parameters that will create the :controller/:slug format I'm looking for? Or do I have to cut my losses and back away from reverse routing at this point?
There's a pretty decent plugin for handling slug-based routing here:
https://github.com/jeremyharris/slugger
If you used this, you would be able to create links something like this
$html->link("some item", array(
'controller'=>'items',
'action'=>'view',
'Item'=>$item['id']
));
and that would output a link to /items/view/slug-for-your-item

Resources