Wordpress Custom Post Types And Custom Taxonomies - wordpress-theming

For a test i have been given following topics.
1)Taxonomies
2)Custom Post Types
3)Data extraction from Database for use in posts and plugins
so far i have learnt
register_post_type()
register_taxanomy()
wpdb class
So My Question Is
1)What other topics/functions do i need to learn.Can somebody provide me link to resorces where i can learn aditional topics other than offical docs.
2)If i have to create a custom post type and add custom taxonomy to it can you somebody give me a sketch of how this can be done i would greatly appreciate it.

Related

how to access arrays from different component in angular

I'm new to programming and just wondering how I can access arrays from a different component in angular project
This data chips: Array<String> = ["One", "Two", "Three"]; are inside tags.component.ts file
I want to access those data inside home.component.ts file
I have search filter inside home component so I'm trying to access those data and to display inside home component when a user search for those data.
Thanks
There is more than one way to do that. Take a look at this material, you'll learn from this https://fireship.io/lessons/sharing-data-between-angular-components-four-methods/
Long story short - there is a couple of ways to share data (via Input, via ViewChild, via Output() and EventEmitter) and sharing data between unrelated components with a Service.
I hope that will help!
I'm guessing you won't get much of an answer because the answer is more involved than a simple do this. Also, they'll ding you with a negative vote for not posting a project link to what you have tried for them to see all the code you are working with.
My suggestion is that you watch this series on Angular 6. It is very in depth and very good.
https://codecraft.tv/courses/angular/es6-typescript/1/

How to get an entity class name with thymeleaf & spring mvc in html page

I'm starting spring mvc and thymeleaf with a little app where i have bank accounts. I have two types of bank accounts (Savings and Deposit), who are two Java classes inherited from a class Account.
When i pass an account object to my view, with thymeleaf, how can i retrieve the classname in order to know what account im dealing with ?
I guess i should use something like
<div>
<label>Type :</label>
<label th:text="${compte.class.name}"></label>
</div>
But i get the wrong name with package
com.alain.comptemvc.entities.Compte$HibernateProxy$pzeNarBH
I spend hours in thymeleaf documentation without finding any list of properties that i can look into, and intelli-j doesn't show me any auto-completion about it.
So more generaly, where can i look for these informations without trolling here !
Thanks !
The problem was coming from my query to get the object.
i was using accountRepository.getOne(String id).
I changed it to
Optional<Compte> cp = compteRepository.findById(codeCpte);
And now in the view :
<label th:text="${compte.class.simpleName}"></label>
give the good result.
But IntelliJ put me class.simpleName underline in red, with suggestion
"declare external variable in comment annotation"
Is it somethiing that i should really pay attention to ?

Converter .rrd to json

I am working on a project where I have a database in .rrd need and converts it to json, so can create graphs with jqueryplot. I tried to use the following code in the documentation could not more, returns me the following error. start time: unparsable time: toe. Does anyone have any idea what can I do?
I was Googling for this, and found a blog post mentioning rrdtool xport --json, added in rrdtool 1.4.6. Does it not do what you want?

JTreeTable model updating

I'm following the example of JTreeTable filesystem2 taken from the sun site http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html#updating_the
My problem is that I can't update my model (and then my JTreeTable)...
In fact I create my model, I pass it to the JTreeTable and all work fine...but I need to modify the model...
I've yet answer a similar question, but now I've changed my code, without find a solution.
The problem is when and how I have to call the method fireTreeNodesChanged()...in the example above is used the method getPath() to retrieve information about the root node...but this is a method of File class..not my case...
Does anyone have a link to a simple code which shows how create a TreeTabelModel (with objects as nodes) and how update it?
FileBrowser is a good example of modeling a hierarchical file system as a tree. While its TreeModel is implemented using DefaultTreeModel, an alternative FileTreeModel is shown here. As mentioned in How to Use Trees: Creating a Data Model "the TreeModel interface accepts any kind of object as a tree node."

Mapping Linq-to-Sql entities to custom domain entities

How could I map my Linq-to-Sql generated entities (DTO’s) to my domain entities? The problem is that I can’t map the associations because they are not of the same type. The DTO’s uses EntitySet and EntityRef and my domain entities uses IList and T.
I’ve looked at some blog post: Ian Cooper's architecting-linq-to-sql-applications-part-5 and digital_ruminations linq-to-sql-poco-support but they don’t fit my needs. I like some kind of generic converter class to handle the mapping.
Now I do something like this:
public IList<Entities.Customer> GetAll()
{
try
{
return _custConverter.Convert(base.GetEntities());
}
But the Convert method only converts the basic properties not the associations.
Any ideas how I can do this the best way?
You might want to look into AutoMapper. It does a great job of mapping properties automatically out of the box and supports extensive customization, such as custom converters, which I think could be used to make Lists out of your EntitySets.
Update:
The official project site and compiled releases are found in CodePlex (same link as above).
Code is SVN hosted at Google Code
Discussiong group is hosted at Google Groups
Accouncement and overview of features at Jimmy Bogart's blog post