I create a table to show a picture of my friend and me but I can't get my friend picture in data_source and show my picture only.
First, I get picture form Datasource of google (Gmail profile picture) and I use filters like this
var empsDS = app.datasources.CurrentUser;
var email = widget.parent.datasource.item.Email;
empsDS.query.filters.PrimaryEmail._equals= email;
empsDS.load();
but program show my picture only
P.S. This is code to get a picture
#datasources.CurrentUser.item.ThumbnailPhotoUrl !== null ? #datasources.CurrentUser.item.ThumbnailPhotoUrl : window.DEFAULT_PROFILE_IMAGE_URL
Image Ex.
enter image description here
The reason it shows only your picture is because your datasource points to only the current user. you need to get the directory and find matches to the emails in order to get the each picture.
Related
I am creating a report using SSRS which contains pages separated by individual account holders. Each page represents one account and I am using a textbox label in the header to display the name of the account; however, I am having trouble getting the textbox label to show different name as I navigate through pages.
So for example, on page 1 the account label in the header would show Account A, and on page 2 it should show Account B. However, right now it always shows Account A regardless of the page it is on. The expression of the label looks like this : =(Fields!Account_Name.Value)
Do I need to create a grouping or some sort in order to have the account change depending on the grouping of account name? If so how do I go about doing this? Thanks!
You will have to display the group field in the page header.
The expression would be something like this:
=ReportItems!Account_Name.Value
Reference: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1bc58a64-db73-4eda-9f86-21d6f9e23c84/ssrs-to-display-page-header-as-per-the-group?forum=sqlreportingservices
Image of How it Looks Likei am using Blab Chat Script , in chat, when i write some URL for example http://example.com/examplepage/example.html and enter. it only shows this "example.com/examplepage/..."
it only shows 25 Characters of URL, how can i remove this limit and shows full URL.
there is a funtion in blab.js that might effect this
function convjs(x){
y=/\%/g; x=x.replace(y,'%25');
y=/&/g; x=x.replace(y,'%26');
y=/\+/g; x=x.replace(y,'%2B');
return x;}
i want it like this
www.w3schools.com/html/html_formatting.asp
I'm trying to figure out how to extract the results generated from this site:
mailtester.com when entering a full email. Take the email address laura.singer#pfizer.com for example. After entering this address and clicking submit, a HTML table thats highlighted green will show up. I want to get the text "Email address is valid" which is the 5th child of the 5th row of this table it seems. However, there are no ids or names, and there are two tables, so its a bit tricky.
This is what I have right now:
wait = WebDriverWait(self.browser, 300)
inputEmail=wait.until(EC.presence_of_element_located((By.NAME, "email")))
inputEmail.clear()
inputEmail.send_keys(email)
inputEmail.submit()
somethin = self.browser.find_element_by_xpath("//table")
somethin = somethin.text
print(somethin)
It prints "Email address" which is incorrect. Looks like there are two tables which do not have ids or names.
Try this CSS selector. It basically means find the TABLE tag that is a child (>) of an element with an ID (#) content
somethin = self.browser.find_element_by_css_selector("#content > table")
I try to use the Content picker w/o success..
I created a doc type which the properties are Content pickers, so what I try to do is along the magazine to use this page to pick up the features news / etc and display them on home page. w/o success..
I used something like:
dynamic feature_news_item = Library.NodeById(1111); (tried also the same but with Model: Model.NodeById(1111); Let's say for the example that 1111 is the id of this page which store the content pickers.
So again, the property of the page is "Content Picker" and the alias is featureItemNews
Now, I try to get / display the ID which the Content Picker (as much as I know..) should retrieve but just get errors (or nothing...) - tried this for example:
var node = #Library.NodeById(feature_news_item.contentPicker);
#node.Name
Doesn't show the Url nor the Name
So I tried
var node = #Library.NodeById(feature_news_item.featureItemNews);
int story1 = #feature_story.featureItemNews
Nothing works
Again featureItemNews is the Alias
and feature_news_item is just to get the Node with the Content picker (see at the beginning of the question)
All I try now is just to get the ID of the selected node which store in the content picker and display it / use it
What's the magic?
Thanks a lot for your help!
I've added Content Picker with alias (and name): myTestContentPicker
In razor code
:
var current = umbraco.NodeFactory.Node.GetCurrent();
int id = current.GetProperty<int>("myTestContentPicker");
< h1>#id< /h1>
It shows the ID of node I have selected. Then I can do whatever I want with this node:
var node = new Node(id);
I have 3 thumbnails which i want to rotate each time a user refresh the page. Therefore want to show different thumbnail each time. I have image name stored in the database. I am using this SQL query to fetch "select thumbnail from tablename order by rand() limit 1". It is fetching one thumbnail perfectly.
The problem is that sometime same images comes up. For example first time i refresh the page thumbnail 1.jpg shows but second time again 1.jpg comes up.
So what i am looking for is to have different thumbnail each time i refresh the page.
Can anyone provide me some suggestions to achieve this ?
this is not possible with random selection, as the same image can come again.
For the effect you want you need to use a cookie to store the last displayed image name and NOT display that image for the next request.
As you have confirmed in your comment you do not want to display the last displayed thumbnail. IN that case you can do this like this using sessions:
// get last shown from session if any
$last_shown = '';
if(isset($_SESSION['last_shown_thumb']))
$last_shown = $_SESSION['last_shown_thumb'];
// select a thumbnail randomly which is not the one last shown
$query = "SELECT thumbnail FROM tablename WHERE thumbnail <> '" . $last_shown . "' order by rand() limit 1";
$res = mysql_query($query);
$row = mysql_fetch_row($res);
$curr_thumb = $row[0];
// set the current to last shown in session
$_SESSION['last_shown_thumb'] = $curr_thumb;
Assuming you are using PHP, you store the previous thumbnail in $current_thumbnail.
Then, you can do it like this
SELECT thumbnail FROM tablename WHERE thumbnail <> '$current_thumbnail' ORDER BY rand() LIMIT 1
Your query just needs to know what thumbnail you are currently displaying so you can filter it out.