Recently I have use the Find() function to do the text search on web pages in a CefSharp browser, and implemented IFindHandler OnFindResult() to get the found text count:
public virtual void OnFindResult( CefRefPtr< CefBrowser > browser, int identifier, int count, const CefRect& selectionRect, int activeMatchOrdinal, bool finalUpdate );
However, I have noticed if the web page is too long, the Find() function and the count from OnFindResult() only work for the first two pages. This issue doesn't only happen with CefSharp, but also in Google Chrome. I have uploaded an example html, it is very long and about 5 MB:
https://www.hihisoft.com/ss.html
If you try to use find() to find a word like "sox", it only return me 34 founded. But the actual quantity of the word would be much more. I attached a screenshot, you can see the browser only found on the first and second pages, but all the red annotated words has not been highlighted and found.
Is there a way to do the full page search with CefSharp? Let it return the actual text/word count.
Related
I would like to understand better Firebase Dynamic Links because i am very new to this subject.
What i would like to know :
FirebaseDynamicLinks.instance.getInitialLink() is supposed to return "only" the last dynamic link created with the "initial" url (before it was shorten) ?
Or why FirebaseDynamicLinks.instance.getInitialLink() doesn't take a String url as a parameter ?
FirebaseDynamicLinks.instance.getDynamicLink(String url) doesn't read custom parameters if the url was shorten, so how can we retrieve custom parameters from a shorten link ?
My use case is quite simple, i am trying to share an object through messages in my application, so i want to save the dynamic link in my database and be able to read it to run a query according to specific parameters.
FirebaseDynamicLinks.instance.getInitialLink() returns the link that opened the app and if the app was not opened by a dynamic link, then it will return null.
Future<PendingDynamicLinkData?> getInitialLink()
Attempts to retrieve the dynamic link which launched the app.
This method always returns a Future. That Future completes to null if
there is no pending dynamic link or any call to this method after the
the first attempt.
https://pub.dev/documentation/firebase_dynamic_links/latest/firebase_dynamic_links/FirebaseDynamicLinks/getInitialLink.html
FirebaseDynamicLinks.instance.getInitialLink() does not accept a string url as parameter because it is just meant to return the link that opened the app.
Looks like there's no straightforward answer to getting the query parameters back from a shortened link. Take a look at this discussion to see if any of the workarounds fit your use case.
I am new to "Here" and I am using Here SDK Flutter 4.3.3.0. I want to fetch/search for places and get the Place's Photos/Image and or Place's Logo if the place is a business/company.
The place images place.details.internalimages are always empty when I search for any place. I tried for different countries like "Chipotle" a restaurant near Las Vegas, a restaurant in Canda, and a Shopping mall in India. All of these return 0 (zero) images. Does, Here API support to get places photos like Google Places or TomTom API?
Looks like this API has a method to get WebImage List but does not contain any data at all. Please advise, If I need to use any other method to get Place's photos.
Another question is, is there a way to get a company logo, if the place I am searching for is a business/company like Restaurant, Store, etc.
Below is the code, I use in my Flutter application. Note, I am able to get other field values like title, address, etc.
TextQuery textQuery = TextQuery.withAreaCenterInCountries('some partial place name', geoCoordinates, countryCodes);
searchEngine.suggest(textQuery, searchOptions, onHereSearchSuggestionCompleted);
In onHereSearchSuggestionCompleted functions, I have the following code:
if(suggestions.length > 0){
print('explore - onHereSearchSuggestionCompleted - suggestions count > 0');
for (Suggestion suggestion in suggestions) {
print('onHereSearchSuggestionCompleted - current count = ${(suggestions.indexOf(suggestion) + 1)}');
print('onHereSearchSuggestionCompleted - suggestion title = ${suggestion.title}');
print('onHereSearchSuggestionCompleted - place id = ${suggestion.place.id}');
print('onHereSearchSuggestionCompleted - place title = ${suggestion.place.title}');
print('onHereSearchSuggestionCompleted - place address = ${suggestion.place.address.addressText}');
print('onHereSearchSuggestionCompleted - place img length = ${suggestion.place.details.internalimages.length}');
}
}
Please note, you have been able to see this functionality being exposed in flutter SDK due to a bug exposing internal methods in flutter. In general this functionality is not yet public (not in native android and iOS).
We plan to expose this functionality soon, however even when we do, only certain eligible customers would have access to the image content. There should be contractual agreement to be able to see this functionality
It seems that youtube are now using ID's for their channels instead of names (part of the V3 api)
However it seems that the embedded iframe playlist player cannot handle these channel ID's
example channel https://www.youtube.com/channel/UCpAOGs57EWRvOPXQhnYHpow
then ID is UCpAOGs57EWRvOPXQhnYHpow
Now try to load this
http://www.youtube.com/embed/?listType=user_uploads&list=UCpAOGs57EWRvOPXQhnYHpow
Can anyone shine a light on this issue ? Or is there some hidden username ?
I also placed this question at the gdata-issues website http://code.google.com/p/gdata-issues/issues/detail?id=6463
The issue here is that a channel is not a playlist; channels can have multiple playlists, yet the listType parameter is designed to look for an actual playlist info object. The documented way around this is to use the data API and call the channel endpoint, looking at the contentDetails part:
GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=UCuo5NTU3pmtPejmlzjCgwdw&key={YOUR_API_KEY}
The result will give you all of the feeds associated with that channel that you can choose from:
"contentDetails": {
"relatedPlaylists": {
"uploads": "UUuo5NTU3pmtPejmlzjCgwdw"
}
}
If available (sometimes with oAuth), there could also be "watch later" lists, "likes" lists, etc.
This may seem like a lot of overhead. In the short term, though, it can be noted that the different feeds are programmatically named; so, for example, if my user channel begins with UC and then a long string, that UC stands for 'user channel' -- and the uploads feed would begin with 'UU' (user uploads) and then have the rest of the same long string. (you'd also have 'LL' for the likes list, 'WL' for the watch later list, 'HL' for the history list, 'FL' for the favorites list, etc. This is NOT documented, and so there's no guarantee that such a naming convention will perpetuate. But at least for now, you could change your ID string from beginning with UC to beginning with UU, like this:
http://www.youtube.com/embed/?listType=user_uploads&list=UUpAOGs57EWRvOPXQhnYHpow
And it embeds nicely.
Just to inform on current state of things -- the change suggested by jlmcdonald doesn't work anymore, but you can still get a proper embed link via videoseries (with the same UC to UU change). I.o.w. link like
http://www.youtube.com/embed/videoseries?list=UUpAOGs57EWRvOPXQhnYHpow
works as of at the moment of writing this.
Good afternoon,
I’m developing a website using NopCommerce 2.65 (in CSHTML) and the customer asked me for two style modifications that I’m unable to do so far:
1st – While the users are browsing a specific subcategory, all of the subcategories in the same level must be colored (red, in this case) except the subcategory that I’m browsing that has the inverted foreground and background colors. I’ve tried changing the CSS3 file, and even after finding these NopCommerce forum topics:
http://www.nopcommerce.com/boards/t/19630/suggestion-categorynavigationcshtml-add-some-style-rules-to-child-categories-so-we-can-easily-customise-through-css.aspx
and
http://nopcommerce.codeplex.com/SourceControl/changeset/0c83401329d9
I still haven’t solved it.
2nd – I have the NopTemplate MegaMenu Plugin installed in the site, and while browsing one of the pages associated with the MegaMenu, I want to mark that page as the currently seen placing a small arrow in it.
What is the best option to do so?
Any help would be appreciated.
Thanks
Unfortunately, nop 2.65 does not make the distinction between cat and sub cat at display level they use the same view. So no if you are intending to use the admin, thats not possible
The view you are looking for should be
CategoryTemplate.ProductsInGridOrLines.cshtml
or
CategoryTemplate.ProductsInGridOrLines.Mobile.cshtml
The model is the categorymodel
You can either hard code in the view (
if(Model.Id == XXX)
or
if(Model.Name == XXX)
Or you assign a new variable
Adding A New int Column i.e. (CSSLevel) in the database
Data SIDE
Nop.Core.Domain.Category
public virtual int CSSLevel{ get; set; }
Nop.Data.Mapping.CategoryMap
this.Property(c => c.CSSLevel);
Admin Side so user can enter himself
Nop.Admin.Models.Catalog.CategoryModel
public int CSSLevel{ get; set; }
Nop.Admin.Views.Category
_CreateOrUpdate.cshtml
#Html.EditorFor(model => model.CSSLevel) *Not providing the full table but you should be able to see
And finally to show the web customer
Nop.Web.Models.Catalog.CategoryModel
public int CSSLevel{ get; set; }
Nop.Web.Category.Controller within (category function )
model.CSSLevel = category.CSSLevel;
CategoryTemplate.ProductsInGridOrLines.cshtml
#if (Model.CSSLevel == 1)
Just remember do the models first always and within vs you should see it coming up when u change the views and controller
Here is the code that shows a photo from flickr
THIS USER : 53335537#N04 doesn't show ANYTHING - NADA
but this user : 85173533#N00 work great
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready( function() {
var cesc = new flickrshow('flickrbox', {
'autoplay':true,
'hide_buttons':false,
'interval':3500,
'page':1,
'per_page':10,
'user':'53335537#N04'});
});
</script>
Question : Why a user doesn't work....
This address work great, so flickr is not blocking it
http://www.flickr.com/photos/53335537#N04
Here is the "live" page.... upper right : http://www.notrepanorama.com/1-la-table-et-ses-partenaires/
Seems to call this URL: http://api.flickr.com/services/rest/?api_key=6cb7449543a9595800bc0c365223a4e8&extras=url_s,url_m,url_z,url_l&format=json&jsoncallback=flickrshow_jsonp_22262679527&page=1&per_page=10&license=1,2,3,4,5,6,7&method=flickr.photos.search&user_id=53335537#N04&
which returns an empty result set:
flickrshow_jsonp_22262679527({"photos":{"page":1, "pages":0, "perpage":10, "total":"0", "photo":[]}, "stat":"ok"})
Removing the license=1,2,3,4,5,6,7 param causes results to be returned
So this user has apparently not licensed his images under one of the listed licenses. Flickrshow has this to say about that parameter:
A comma seperated list of the
allowable licenses within your
slideshow. If set to null, no license
restrictions will be set so please
ensure you have permission to display
the images. See the Flickr API for
more information on license codes.
Here's the relevant doc page from flickr: http://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html
It seems that embedding that user's images, since they're marked "all rights reserved", is legally questionable (although I'm guessing in this case, the embedder and the photo owner are the same person). flickrshow only displays images with CC licenses by default, it seems.
So, in the end: either relicense the photos, or override flickrshow's license filter (probably by adding 'license':null, to your params)