Wiki

Articles in category "tips", sorted by ratingX
Displaying 71-80 of 154 result(s).

Managing constants easily

Created 5 years ago by briiC.lvTips4 comments – viewed 16,642 times – ( +4 / -1 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

Create thermometer using rgraph

Created 3 years ago by Ankit ModiTips2 comments – viewed 7,540 times – ( +4 / -1 )
Hi friends,

How to catch and log MySQL deadlock errors

Created 5 years ago by sebTips1 comment – viewed 12,832 times – ( +4 / -1 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

Access log output from unit tests

Created 5 years ago by MikeTips2 comments – viewed 8,146 times – ( +4 / -1 ) – version 1.1
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

Get notified about the status of a Facebook user in your web app using periodic Ajax calls.

Created 4 years ago by sirin kTips0 comments – viewed 7,705 times – ( +4 / -1 ) – version 1.1
hello, This article is helpful only if you have the following situation: A web app which uses facebook login to login its users and if a user is logged out from his/her facebook account through another browser tab, then your app dont know that he is logged out out or not from his facebook account and he/she will remain as logged in your web application.Its ok if you have no problem with this situation.But if you want to forcefully logout the user from your application if he is logged out from his facebook account means you can try this example.This example uses periodic ajax calls to facebook's graph api to check whether the user is logged in or not.
tags: facebook, user

Preventing CJuiTabs from hiding drop-down CMenu items

Created 6 years ago by Steve FriedlTips1 comment – viewed 10,923 times – ( +4 / -1 ) – version 1.1
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

Yii2 default values for Index data Provider

Created 3 years ago by CTalaTips3 comments – viewed 17,328 times – ( +4 / -1 ) – version 2.0
Guys,

Syntax check

Created 6 years ago by Russell EnglandTips2 comments – viewed 8,736 times – ( +4 / -1 ) – version 1.1
So I've been busy making lots of modifications to my views/models/controllers - came to test the app and got a blank screen. Nothing in the application.log file so must be a syntax error somewhere... But which file?
tags: php, syntax

adding class and links to Ctreeview node

Created 6 years ago by bingjie2680Tips2 comments – viewed 14,852 times – ( +4 / -1 ) – version 1.1
This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.
tags: ctreeview, link, class

Send asset folder path to a javascript of a widget

Created 5 years ago by sensorarioTips4 comments – viewed 23,424 times – ( +4 / -1 ) – version 1.1
When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this: