How do you achieve case-insenstive search/indexing on thinking-sphinx or flying-sphinx? - thinking-sphinx

Have had a look through the documentation and wasn't able to clarify this easily.

Related

MXNet AdamW optimizer

Adam optimizer has flaws when used with weight decay. In 2018, AdamW optimizer has been proposed.
Is there any standard way to implement AdamW in MXNet framework (python implementation)? There is mxnet.optimizer.Adam class, but no mxnet.optimizer.AdamW one (checked in mxnet-cu102==1.6.0, mxnet==1.5.0 package versions).
P.S. I asked this questions on MXNet forum and on datascience.stackexchange.com, but to no avail.
Short answer: There isn't a standard way to use AdamW in Gluon yet, but there is some existing work in that direction that would make that relatively easy to add.
Longer answer:
People have been asking for this feature - a lot :) See: https://github.com/apache/incubator-mxnet/issues/9182
Gluon-NLP has a working version of AdamW - possibly slightly different from the one in the original paper: https://github.com/eric-haibin-lin/gluon-nlp/blob/df63e2c2a4d6b998289c25a38ffec8f4ff647ff4/src/gluonnlp/optimizer/bert_adam.py
The adamw_update() operator was added with this pull request: https://github.com/apache/incubator-mxnet/pull/13728 This is first released in MXNet 1.6.0.
Unfortunately, it looks like there isn't a way to use this with gluon.Trainer directly right now, without copying/modifying the BERTAdam code (or writing something similar from scratch). That would be a very nice thing to add to Gluon.
Please let me know if you get this working, as I'd love to be able to use that as well.

jodd build simple auth issues

I was trying to build a simple auth mechanism using madvoc and interceptors but it seems that the tutorial at
http://jodd.org/doc/example/auth-with-interceptors.html
is a little bit outdated.
I think that the tag was removed and I was not able to find the substituent.
How should we use the form in general and what is the recommended auth mechanism?
P.S. - I`m using latest jodd version.
The shortest answer is to check module jodd-joy. Look at the package jodd.joy.auth. It contains latest AuthTag, AuthAction that may be used, etc. This module contains some helpers for build an web-app even faster.
I will update this answer later, with more info - actually, I will try to update the website, too. But in general, the idea behind the auth is not much changed;)

WordPress Theme Options insert in custom database table with $wpdb-insert

I've been working out with this quite a long time and I can't find a way how to make it work.
I'm creating a simple theme option with my theme but putting all the options to a custom database table.
I want to know how $wpdb->insert() inserts all options like add_option().
This is my code - http://pastebin.com/5xHBs6r2
If you look at line 209 *function stheme_initialize_theme_options()* you'll see what I mean. I also created a function (*function stheme_default_options()*) that holds the default options and return it with apply_filters().
I hope someone can help me with this as I'm really struggling with it for a week now.
Thank you!
Best regards.
Consider using the Options API. It's a lot simpler than writing your own queries, and it's built in already.
http://codex.wordpress.org/Options_API
Setting, resetting and retrieving options you store can be done with 3 or 4 commands altogether, so it's a pretty nifty system. For instance, this:
add_option('my_option', 'foo');
Will instantiate an option in the DB, this will update it:
update_option('my_option', 'foo2');
and finally, this will retrieve it:
$s = get_option('my_option');
If you do use the Options APi, it's a good idea to stick to a naming convention, have your own prefix for your options. Too easy to cross over to other plugins etc if you use anything too obvious.
This is a classic XY Problem.
Don't create a table to do something that WordPress already does. You're even putting yourself into a trap, as you won't be able to query your data with WP default tools and will have to re-invent the wheel to achieve it.
What you're looking for is register_activation_hook, register_deactivation_hook and register_uninstall_hook.
Aside the uninstall hook, we can use the file uninstall.php with our plugins to clean up our stuff after the plugin is deleted. See this related posts at WordPress Answers.
PS: in your code, this is totally uncalled for:
add_action( 'init', 'st_register_table', 1 );
You address custom tables simply with $wpdb->prefix.'your_table'.

Is there a tutorial on how to use AREL or Reference document?

I am looking :
for a reference document that lists what methods are available?
a tutorial on how to setup and execute a query, then build up complex queries?
Checked README, questions that are tagged as Arel here but most are about how to setup where clauses, complex queries not how to use it in the first place ...
Thanks all in advance
Generated docs are your best bet if you're looking for an official reference.
As for tutorial, these cool slides helped me learn arel (props to Philip C).

best way to input a complex data structure into a gui (eclipse)

i have a exlipse plugin which can call a service and the user has to sepcifie the values of the parameters for it. these parameters may be complex.
i was thinking what would be the best way to provide input for them.
I know about the structure of the data type so something like a json template where the user would just fill out the values came to my mind.
But maybe there is a better solution and/or related work on that subject.
best regards
Well, your question is kind of vague, but if I understand you correctly, the common way to do what you need, in eclipse plugin and RCP development, is to define a model and bind data to it using JFace Data Binding. Lars Vogel wrote a good tutorial on this subject.