Form input correction & database query- Codeigniter
By : Saranya
Date : March 29 2020, 07:55 AM
|
Codeigniter Query result returning Custom result object with setters
By : PassionArya
Date : March 29 2020, 07:55 AM
hop of those help? I found your question while looking for a solution for myself. After digging a bit in the documentation I managed to figure it out: code :
class user_item {
// you can declare all the attributes you want as private
private $id,$name,$dob,$gender,$role,$username,$password,$salt,$picture,$lastactive;
function __construct(){
// you can use the constructor to format data as needed
$this->username = strtouppper($this->username);
}
public function set_password($p){
$this->generateSalt();
$this->password = $p.$this->salt;
}
public function get_password(){
return $this->password;
}
}
class User_model extends CI_Model {
public function get_user($id){
return $this->db->get_where('users', array('id' => $id), 1)->result('user_item');
}
}
class Users extends CI_Controller {
function __construct(){
$this->load->model('user');
}
public function profile($user_id){
var $myUser = $this->user->get_user($user_id);
$myUser->set_password('myPassword');
echo $myUser->get_password();
}
}
|
getting result after grammar correction from gingerit
By : user2955042
Date : November 22 2020, 10:33 AM
I think the issue was by ths following , for grammar correction in my python app, I am using gingerit-0.5.4 . this is one of best module for spell and grammar correction. but i did not know how to get result of sentence from parser.parse() after correction. , You need result key from parser.parse returned dict. Try: code :
print parser.parse(text)['result']
|
array prints result in controller but not giving result in view ,codeigniter
By : audi diya
Date : March 29 2020, 07:55 AM
will be helpful for those in need Print $country in view. Use echo ""; print_r($country);. I think you used foreach loop for data print and Country_id doesn't exist in database table column.So this error occured.
|
Applying a Bonferroni Correction on a chi square test result R
By : Maaz Bin Ibrahim
Date : March 29 2020, 07:55 AM
Hope this helps If you are going to do multiple pairwise comparisons after your overall Chi Sq test, your Bonferroni correction would be .05/(number of tests). See helpful references here and here You probably need to test all possible pairs, meaning that you'd be doing a lot more than 10 tests. However, before going ahead, you might want to think about other ways to tackle this.
|