Joomla: Passing Parameters from an Article to Module - module

I am new to Joomla. I am developing a dynamic module which will display data relevant to the article with which the module is being displayed. Is it possible? If yes, how? Any help is appreciated.

What parameters exactly are you talking about? I think all parameters could be gotten using article ID. And article ID always could be retieved from GET. You could use code like this:
if(JRequest::getVar('option')=='com_content' && JRequest::getVar('view')=='article')
{
$article_id=JRequest::getVar('id');
// then operate with ID.
}
If I'm wrong please specify your needs.
I hope it will be helpfull.

Related

How to use exactTerms and excludeTerms with Google Custom Search JSON API

I've been working with Google Custom Search API and faced some inconveniences I hope you can help me with.
Google Custom Search API offers as a parameter in its call the possibility to search by an exact text as well as exclude it from results: exactTerms and excludeTerms. However, the q parameter is mandatory and cannot be ignored, so if I want to search only by an specific text I just can't.
So how can I do a query using JSON API that contains specifically the text I want? Does the q parameter work as the search form in Google?
If I want results including 'foo', should I do this:
service.cse().list(cx=const.SEARCH_ENGINE_KEY, q='"foo"').execute()
or this?:
service.cse().list(cx=const.SEARCH_ENGINE_KEY, q=None, exactTerms='foo').execute()
Thank you in advance for your time.
Due to the success on the answers (hehe) I'm posting my own conclusions. Please, if you've any facts regarding the original question, please post it.
I've been testing with some calls to Google CSE API and looks like you can pass to q parameter the same query you'd do in Google's main page textfield. So (at least for my needs), you don't need exactTerms and excludeTerms to get what I was trying to achieve.
Anyway, as I said before, if you know how to work with these parameters I'm sure everybody will thank you.

Apache pig: How to use the ignoreBadFiles tag with the load function?

I see there's a tag called ignoreBadFiles for the load function of Apache pig. I am wondering if someone can show me an example how to use it.
Here's the link for the jira tickets:
https://issues.apache.org/jira/browse/PIG-3404
It discusses the use cases for this tag but does not have an example.
For something like:
LOAD '$inpath' USING AvroStorage();
It would be great if someone can show me how to use this tag with the load function. Thanks a lot for your help!
In addition to getting your AvroStorage('ignore_bad_files') working, you may want to look at setting mapreduce.map.failures.maxpercent. This would give similar results by allowing the job continue with certain % of mappers (readers) failing.

How to use wigle.net API

I have to make a query to the Wigle's API, but I didn't find the API documentation (https://wigle.net/wiki/index.cgi?HomePage).
I have a list of Access Point's SSID and I have to interrogate Wigle in order to know the location of all the SSIDs.
Now I'm able to do this:
http://WiGLE.net/gpsopen/gps/GPSDB/confirmquery?longrange1=12.4952&longrange2=12.5434&latrange1=41.8973&latrange2=41.9136&simple=true
that return all the APs of an area.
If I want to know the location of an SSID without give a bounding box (lat,lon) what kind of query I have to do?
Thank you in advance.
I found this python class https://code.activestate.com/recipes/578637-wigle-wifi-geolocation/ and I solved the problem.
Check out the official WiGLE api at https://api.wigle.net for starters.
There's interactive Swagger documentation at https://api.wigle.net/swagger to help you get started.

RequestLenghtRestriction error on HttpGet

I have a web application in MVC4 / ASP.NET. Basically what is happening is in my foreach loop, I'm building a list of strings. When that list gets so long and I try to call HttpGet to retrieve that list I get the RequestLengthRestriction error. How can I fix this? Could I just send through javascript instead? If so, how? I'm not sure if I even provided enough information, if not, please let me know.
Thank you in advance.
Sounds like you need to POST that data.

Passing the arguments to a website

Well the title is tricky. I was not sure if this has been already there and how to put it.
Example:
Lets suppose my site is accessible:
http://mysite.com
if mysite does additions: with 2 inputs
Now If the end user need to pass an argument to site like this (so i load the page like this):
http://mysite.com/argument1/argument2
so it should be able to thus go to the result directly: arg1+arg2
This brings to the question:when user types this, how can i retreive argument1 and argument2 and load my site according to that? Is it possible? If yes, Any client site programming solutions?
Thanks in advance.
Found the solution after searching a lot. The correct term for this process is URL-routing. We can overcome this by using #.
www.mysite.com/#/argu1/argu2
Then in the document.ready() we can read the url in the following manner:
var url = window.location;
More sophisticated way is to use the "backbone.js" for the routing. The documentation on the link explains everything
Backbone.js routing