Query String Parameter Encryption/Decryption? Usabe with Silverlight? - silverlight

I have an instance where an external source is going to pop a browser that will navigate to my host page for my Silverlight application.
Within the query string that third party is sending pseudo-sensitive data that I do not want the user to be able to manipulate.
Seeing the data itself isn't the issue, it's simply being able to increment or change the values to assumed values.
My issue is that most cryptography I've found is not usable in Silverlight to decrypt the query string values.
I have 3 query string parameters that need encrypted.
i.e.
3rd Party: (encrypted values would need to be value1, 2 and 3)
//make call to Silverlight application host page
http://server/SilverlightRIA.aspx?value1=blah&value2=foo&value3=bar
My application's ASPX page will strip the query string parameters and send them to the Silverlight application through init parameters.
At this point they can be decrypted and set as globals variables or whatever the case may be.
I'm hoping for some suggestions on the best way or most efficient/simplest way to encrypt the values.

Actually ended up finding a fairly simple encryption method that will work with Silverlight.

Related

Using Matomo API to get top 10 visited pages starting with a certain URL

For a weblog I am trying to get the top 10 popular posts from for example the last month. I figured I'd get the data out of Matomo, as that's already tracking visits and has an API. I've never used this API before though, so I've been reading the documentation and trying out some things. I am able to get data from the API using the Actions.getPageUrls method. However, when I try to filter using segment=^http://example.org/post I still get data from other URL's. It looks like it filters on session and gives back all data from the sessions that have at least 1 page that conforms to the filter.
The full URL I'm using is: http://example.org/matomo/index.php?&module=API&token_auth=12345&method=Actions.getPageUrls&format=json&idSite=1&period=month&date=today&expanded=1&segment=pageUrl%3D%5Ehttp%253A%252F%252Fexample.org%252Fpost. I've also tried with less and no URL encoding for the segment, but that doesn't seem to make a difference. If I use a URL that doesn't exist I get an empty array returned.
Am I doing something wrong? Is there a different way to only get the top pages with a URL starting with http://example.org/post? Or do I have to sift through the data myself to only get the pages I want?
I am using Matomo version 3.13.5.
I figured it out. There is no need to use segment. This can be achieved using the flat, filter_column and filter_pattern parameters.
Setting flat=1 will make it so all pages are returned in a single array, instead of hierarchically.
With filter_column and filter_pattern I can filter the results.
The URL I use now is: http://example.org/matomo/index.php?&module=API&token_auth=12345&method=Actions.getPageUrls&format=json&idSite=1&period=month&date=today&flat=1&filter_column=label&filter_pattern=%5E%2Fpost%2F. This does exactly what I want.
The unencoded pattern is ^/post/, so this will filter out any page that does not start with /post/.

Send checkbox to range from single checkbox incrementally in Google Sheets

I have a Google Sheet with a large number of applications with multiple responses. The person going through them would like all of the information for each application formatted neatly and to give them a way to go through each application and mark whether to accept or reject the entry.
I have set up and formatted a sheet that displays all of the info from a single application with all of the answers being displayed by =Indirect() referencing a hidden value. A simple next button attached to a script increases that value by 1 to bring up the next application.
I need a way to send the Accept/Reject value back to the first sheets raw data, but it seems like checkboxes only work with formulas when they are receiving a value. Because the same cell is being used when parsing through applications, I have no way of referencing that checkbox in the raw data.
I think I need to have a script check the indirect value to know which application is currently being used and then send TRUE to the correct cell, then have it be reset back to unchecked (potentially as part of the 'Next' button)?
Hopefully I explained this well enough and thanks for any help~

Database: store hashtag with or without hash

I am writing a mobile app where users can tag an item with hashtags like Twitter does. To the user, he sees the hashtags as #thisisahashtag.
However I am wondering if I should store the hashtag in the database along with the hash? Or strip it out and just store "thisisahashtag"? Or does it not make any difference? I am on Postgresql DB by the way.
Some things to consider:
How will other systems use this data? Will they need to know the context of the '#' character? Or would they just be interested in the content value?
How will searching/indexing be affected?
How will data storage/sizing be affected?
It seems the hashtag character is markup as it is used by the UI to either take a specific action when selected or identify the content as a "hashtag" to the user, and not part of the data proper.

Is there a clean way of users managing their own locations?

A lot of my site is dynamically generated dependant on the user location.
To get an initial fix I am currently using the Smart_IP module which does this based on the user IP address - which works great as a starting point. I can access $_SESSION['smart_ip']['location']['longitude'] & $_SESSION['smart_ip']['location']['latitude'] as required - perfect!
But I need to allow my user to override this..
Using HTML5 geolocation. I want to only do this on user request, ie click 'locate me', rather than requesting their location uninvited.
Using one of a few pre-defined locations selectable by the user.
Using an inputed address by the user.
Is there any drupal module I can use for this, or how else could I achieve it?
-
Just to clarify, I am talking about anonymous users here - the general public visiting my site. I just want them to be able to refine their 'location' by overriding the defaults I give them using smart_ip.
I suggest to use Geolocation field and all it's submodules or Geofield. Last one provides more input methods.
Use the Address field module to allow the user create multiple addresses into a node (or even into his profile), Geocoder module to get the lon/lat from these addresses and then a Views to display them in a list.
Same as 2 but without views.
If you want to allow user select one of the 3 methods you can use an other - helper - field (eg a select list with the 3 options).
Finally you should add an extra field to store the lat/lon pair final values maybe with Computed field module or 2 simple textfields that will get the selected values through javascript.

Xpages - Convert a database searched document as currentDocument

I have an xPages form editing a document, which can be edited automatically (as a datasource) coming frme a view. But you can also input directly (in an input field) the key of the document; then (if it exists) it will be searched in the database (converting the key in an UNID).
The matter is that in this case it is not the currentDocument and custom controls tests (for example for displaying buttons) do not work.
So my question is how to "convert" a programmatically searched document in the database (by UNID) to the normal datasource currentDocument, so normal controls can be apply to it too ?
Thanks if you know.
Store the Unid in the session and compute the data source from there - or open the Form with the matching URL parameter
Your problem is in the URL: it does not contains params to initialize default data source. This is IMHO the simplest way to fix it: native Domino links and XPages.
I am not sure whether it will help, it depends on actual value of context.getUrl(). If it doesn't, you need to redirect to URL you compute from UNID, as Stephan suggested.

Resources