Magic numbers. Joomla K2. Wrong some categories links - categories

I have one category (Games) with subcategories (Gamesnames).
http://www.gamerno1.net/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=1&Itemid=113
The settings of all categories is the same. But, links certain subcategories return to the parent category (Games).
As soon as I change the alias name - everything works as it should.
Below is a list of subcategories and their aliases.
Ancients of Ooga 91810
Anomaly Warzone Earth 91200
Cloning Clyde 91800
Dead Island 91310
Demolition, Inc. 98600
Dungeon Defenders 65800
Dungeons of Dredmor 98800
E.Y.E: Divine Cybermancy 91700
Hard Reset 98400
Jamestown 94200
Post Apocalyptic Mayhem 91900
Ravaged 96300
Revenge of the Titans 93200
Rise of Immortals 90530
Sanctum 91600
SkyDrift 91100
SpaceChem 92800
Spiral Knights 99900
The Elder Scrolls V: Skyrim 72850
Toy Soldiers 98300
Worms Ultimate Mayhem 70600
Xotic 92600
What is my problem?
Thank you!
Update.
If you create a category with an alias: 91810, 91200, 91800, etc. .. category will refer to the parent category.
Whyyyyy?
Magic numbers ...

I solved the problem.
I removed
urlencode($item->alias)
everywhere
and all earned the right.
Thanks for watching!!!

Related

Gremlin: Generate a list by location of counts for active versus inactive users

I have vertices people, usertype, and location. People has outgoing edges people_location and people_usertype. People has property 'name', usertype has property 'activationStatus', and location has property 'name'.
I want to create a list that looks like this:
[[1]: https://i.stack.imgur.com/lKzZL.png]
I want the count of people, by location, for activationStatus "active" and "inactive" where the location has "US" in it.
This is all I have only for count of people by location where the location 'name' begins with US:
g.V()hasLabel('people').out('people_publicisofficelocation')
.filter(has('name',between('US','UT')))
.groupCount().by('name')
It is running but not yielding results.
You can simulate 'starts with' behavior in versions of TinkerPop prior to 3.4 using something like has('name',between('US','UT')) so you could replace the filter line above with that. If the graph implementation you are using supports TinkerPop 3.4 there are additional text predicates you can use for begins with, ends with and contains.
As others have said if you can post some sample addV() and addE() steps that build part of your graph it will be easier to give a more precise answer.
This worked for me!
g.V().hasLabel('Location').filter(has('name',between('US','UT')))
.project('Name','Active', 'Inactive', 'Total')  .by('name')  .by(__.both('people_location').out('people_usertype')
.where(values('activationStatus').is(eq('Active'))).count())  .by(__.both('people_location').out('people_usertype')
.where(values('activationStatus').is(eq('Inactive'))).count()) 
.by(__.both('people_location').out('people_usertype').count())

jstree dnd and how to limit drops

I have a jstree as follows:
Cities
London
Paul
Jack
New York
Lisa
Fred
So I want to drag and drop the Peoples from one city to another,
but not people to people.
Please can anyone show o code piece for that solution.
I am able to drop at people to cities and also people to people,
but people to people makes no sense in that case.
I found the solution by using dynatree:
onDragEnter: function(node, sourceNode) {
if (node.data.isFolder)
return ["over"];
else
return ["before", "after"];
},
That is exact what I need

Google Sheets - Retrieve "A:File1" to "A:File2" where "Sheetname:File1" = "B:File2" if "C:File2" is between "E" and "F" in "File1"

Sorry for the somewhat long title, but I was told to be as specific as possible. :D
My problem will require some explantion.
So, I have 2 spreadsheets files ("Konverteringstabeller" and "Tee Posen").
In "Tee Posen" I have a sheet named "Scores MIK" (golf scorecard and my name).
In "Konverteringstabeller" I have sheets with conversion tables for multiple golf courses, but if one works, all should.
What I need is to find out what course handicap I would get if my golf handicap is "HCP 26,0" (as shown in File 2 Picture), and in this case that result should be 29 (not visible), but you should get the point.
(example: golf hcp 10 would result in course hcp 11, because 10 is between 9,9-10,7)
While I have been able to find the right result, it has only been in the "Konverteringstabeller" spreadsheet file and that is not the place I need it.
I want to have it written in E6 in the "Scores MIK" sheet in File 2.
I should mention that in "Scores MIK : File 2", cell C2 (Ikast Golf Klub) has data validation so I can easily change between the different courses in the "Konverteringstabeller" file once I add more.
What I have been messing with is something with vlookup and importrange with concatenate in it, but I can't figure out how to do it, so I ask for your help.
And I am by no means skilled in the art of Spreadsheets, so I would very much appreciate a detailed explanation.
Picture - Scores MIK (File 2)
Picture - Ikast Golf Klub (File 1)
Thanks in advance!
// Mikkel Christensen
OK so a couple notes - One is that to join a static cell where you keep the sheet name but allow it to chance you should add '$' around it, also if the rows for B8-E70 will always be the same position on the various sheets you also need to add $ around those as well.
here is an example of the whole formula
=IFERROR(ARRAYFORMULA(VLOOKUP(E5:E25;IMPORTRANGE("spreadsheet key";"'"&C2&"'!$B$8:$E$70");4;TRUE)))
And lastly - using the "&" operator to concatenate is better at least in my opinion because concatenate sometimes does not work as well with array formula - plus I find it personally quicker and easier to use that having wrap yet another function around my stuff.

Negation of osm class or type

If you search for an airport (aeroway=aerodrome) around brescia, italy, you will also receive a hit for a military airfield, which happens to be tagged as an aerodrome also (it's taggged: aeroway=aerodrome, landuse=military, military=airfield). To avoid this I want to search for aeroway=aerodrome but exclude [military]. I've tried [! military] and [military~"^$"]. Any suggestions?
This particular case may be rare, I realize, but the concept of negating multi-classed elements is useful. And multi-classed elements is not a rare occurance. In general, they seem to be complimentary, not conflicting, so it's not an issue. I also realize that I can weed out conflicting hits with some back-end processing. I wasn't expecting a military airfield to appear with a commercial aerodrome.
In any case, here is a shortened version of my query. I include node, way and relation in full query:
http://overpass-api.de/api/interpreter?
data=[out:json][timeout:25][bbox:45.400861,9.868469,45.641408,10.542755];
(node[aeroway~%22aero|term|heli%22][! military]; ... ) out etc
or:
http://overpass-api.de/api/interpreter?
data=[out:json][timeout:25][bbox:45.400861,9.868469,45.641408,10.542755];
(node[aeroway~%22aero|term|heli%22][military~%22^$%22]; ... ) out etc
If you try to run it, you'll need to include way and relation.
Also, as you can see I don't exactly ask for aeroway=aerodrome. I include terminal and variations on heliport. My experience has been that some aerodromes are tagged only as "terminal", so if you're looking for an airport, asking for "aerodrome" isn't enough.
The correct syntax for negation is as follows:
[military !~ ".*"]
Please see the documentation on the OSM wiki for details.

How to persist graphs presenting circular references in Voyage?

I'm having an issue I don't recall having had about half a year ago when trying out Voyage.
In my schema, a User has an instVar referencing all the Centers he belongs to, and a Center has an instVar referencing all of its Users, so when the Voyage serializer tries to serialize a user (or a center), it goes into an infinite loop trying to find the end of the reference chain and the image clogs.
I remember saving the exact same schema a while ago without a problem, is there something new I should know about?
BTW, I'm using the #bleedingEdge version, with Magritte3 and all.
Thanks! :)
I tried to reproduce your problem and it works fine in my example.
What I did is this:
You have a Star, who has Planets, who at it's time points to the owner Star.
Star new
name: 'Sun';
position: 10#12;
addPlanet: (Planet new
name: 'Earth';
orbit: 3;
yourself);
save
Both possible combinations works for me:
Star class>>#isVoyageRoot
^ true
Planet class>>#isVoyageRoot
^ true
and:
Star class>>#isVoyageRoot
^ true
Planet class>>#isVoyageRoot
^ false
So... I don't know where is your error :(