could not be able to get image from url and set to image view in flex - flex4.5

Any body help me I want to get image from yahoo weather rss and set the source of my flex component, I'm now able get other data from yahoo weather rss but still not able to get image please help me I have got other data in this way could-not-be-able-to-get-data-from-yahoo-weather-rss-in-flex
please give me some hint to get that images

Ok, at last today I got idea about how to set image, not about get image, from yahoo weather api or rss feed. So, I tried to get code of condition and set my own image placed in my assets folder like this:
var codeOfCondition:XMLList = result_weather_data_xml.descendants().attribute("code");
and then tried :
if(codeOfCondition == 0){image.source = "assets/CORRESPONDING_IMAGE_TO_CODE";// for all conditions there should be corresponding image}
and this solves the problem for me, there may be some other way to do that but this is my approach thanks.

Related

Imported content is empy Google Sheets

I'm trying to get the price of an item in my Sheet but I am unable to get it using IMPORTXML command as it keeps returning the error "Imported content empty"
I'm trying to retrieve the highlighted number on the image.
Site link: https://csgostash.com/sticker/3666/Battle-Scarred-Holo
My code: =IMPORTXML("https://csgostash.com/sticker/3666/Battle-Scarred-Holo","/html/body/div[3]/div[4]/div1/div/div[2]/div[2]/div1/a/span[2]")
The image is here!
It would be great if anyone could help me out, thanks!
The HTML for that website has no visual hierarchy, so it's tough to plow down through it. But this is what I arrived at:
=IMPORTXML("https://csgostash.com/sticker/3666/Battle-Scarred-Holo","/html/body/div[2]/div[4]/div/div/div/div/div[1]/a/span[2]")

authorProfileImageUrl returns only a tiny thumbnail

I'm trying to use YouTube Data API to get a list of comments for a video.
The problem is that the field authorProfileImageUrl in the response contains a URL to a tiny thumbnail (28x28 pixels) of the profile image instead of the bigger one (48x48) that can be seen in YouTube's comment section. How can I retrieve the bigger one? Am I missing some magic parameter in the request that selects the size of the profile images in comments?
Here's my request URL:
https://www.googleapis.com/youtube/v3/commentThreads?videoId=VIDEO_ID&part=snippet&fields=pageInfo,items(snippet(topLevelComment(id,snippet(authorDisplayName,authorChannelUrl,authorProfileImageUrl,authorChannelId,textDisplay,likeCount,publishedAt)),totalReplyCount))&maxResults=3&key=API_KEY
Edit:
Here's an example profile pic URL i get:
https://yt3.ggpht.com/-b-fXZSZ0hPw/AAAAAAAAAAI/AAAAAAAAAAA/mq4JpF46xq4/s28-c-k-no-mo-rj-c0xffffff/photo.jpg
^^
I noticed that the marked part seems to select the size, because when I change the 28 to 48, the size of the profile pic changes too.
I could change it "manually" with some fancy regexp, and it will work, but it will also rely on implementation details that are undocumented and that may change in future and render the application broken :P So it really would be better if there was a documented API way to do that.
Seems like nobody knows how to solve this, ho here's my temporary solution.
It works, but it depends on an implementation detail that can change in the future and then the solution will break apart and will have to be corrected :q
I accept my own answer for now, but when someone posts a better one, I'll accept it instead.
The solution:
I made a simple function that searches for the image size in the URL string and replaces it with a bigger size.
function small2big(url)
{
return url.replace(/(\/.*s)28(.*\/photo.jpg)$/,"$1"+"48"+"$2");
}
Oh, and here's my middle finger for you, Google: ,,|,,
It seems that actually removing everything right at the 's28' will display the entire image without specifying a size.
For example, instead of this:
https://yt3.ggpht.com/-b-fXZSZ0hPw/AAAAAAAAAAI/AAAAAAAAAAA/mq4JpF46xq4/s28-c-k-no-mo-rj-c0xffffff/photo.jpg
You can use this: https://yt3.ggpht.com/-b-fXZSZ0hPw/AAAAAAAAAAI/AAAAAAAAAAA/mq4JpF46xq4/
And it will return the full size image.
In my case, using php I simply:
function bigAvatar($url) {
$url = substr($url, 0, strpos($url, 's28'));
return $url;
}
Again, if google decides to change this in the future, this would break. But for now, it works.

How do I get a feed of the 10th page on realbusiness.co.uk?

I'm trying to pull the 10th page from realbusuiness.co.uk rss feed. I have tried several variations of the url but I can't find the correct one like so:
http://realbusiness.co.uk/feed/page10
http://realbusiness.co.uk/feed/paged10
http://realbusiness.co.uk/feed/?page10
http://realbusiness.co.uk/feed/?paged10
http://realbusiness.co.uk/feed?page10
http://realbusiness.co.uk/feed?paged10
Any idea on what the correct url would be?
Thanks in advance!
I think you missing = on url. Because the wordpress feed page url is at http://realbusiness.co.uk/feed/?paged=number of page in your case maybe http://realbusiness.co.uk/feed/?paged=10

IOS PDF Reader with search , annotation and bookmarks

I'm trying to do a PDF Reader which have the following features:
bookmarks
zooming
highlight //annotation or just changing the background of the rect
search
what I'm using is vfr/Reader :
https://github.com/vfr/Reader
it have the zooming function and bookmarks
and I want to make it like LazyPDf : https://github.com/lazyprogram/LazyPDFKit
which have annotation function
or make it like github.com/Ink/ThatPDF
which have less annotation functions than lazypdf
and add the search from
github.com/KurtCode/PDFKitten
the problem is that i have been working on it for like a month and I didn't make any progress and I don't know where to start or how to merge those applications together , even though all of them uses CGPDF.
please help me to find a way to make my app or let me know if there is a better free library ,and if i need to learn anything just drop a link in a comment.
Thank you !!
You can use below link for pdf reader.
you can easly use the book mark,zooming,saved pdf,email,print pdf
https://github.com/vfr/Reader
You can use iOS PDFKit:
This reponse will help you

How to get bigger size pictures if me/home items in facebook sdk

Now i'm using Facebook SDK on my ASP.NET MVC5 project, and for data query I use Graph Api.
When I read a data from "me/home", almost each read item of it have key called "picture", that represents image attached to post. But it is thumnbail size, how can I get it bigger resolution and better quality?
Link i got look smth like this:
https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/s130x130/1902827_682459971849744_3936731463452030828_n.jpg?oh=a31397c18fc806dcd1b60565009fd50b&oe=54BAA327&gda=1420888048_5c40d0ab0d0b0f5636d7965138f7f6ab
I hope for your help.
Thank you for your time
There is a variable in the API "type" using that you can specify the sizes of the image
The type parameter can be one of square, small, normal, or large for profile pictures or thumbnail, normal, album for album pictures.
image src would be something like this
https://graph.facebook.com/xxx/picture?access_token=yyy&type=normal
you can find more information # http://developers.facebook.com/docs/reference/api/user/
string imageUrl = fb.Get("/me?fields=picture.type(large)").ToString();

Resources