Posts

Showing posts from May, 2013

android - Facebook custom unit for Fitness is not showing -

Image
i implementing facebook fitness sharing feature , have custom unit nike do: i have hosted own unit object , implemented share button using following code: iv_workout_share.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // create object shareopengraphobject.builder object = new shareopengraphobject.builder() .putstring("fb:app_id", "xxxxx") .putstring("og:type", "fitness.course") .putstring("og:title", "example") .putstring("fitness:duration:value", (workout.duration / 1000) + "") .putstring("fitness:duration:units", "s") .putstring("fitness:distance:value", string.format("%.2f", workout.current_distance / 1000f)) .putstri...

javascript - Sending form data to page nested in div -

this third attempt find answer question, every other time downvoted 1 reason or another. try again. attempting send data hidden input within form via ajax. hidden input gets value php script. can not seem pull hidden input value on receiving page. form sending generated , propagated within php ajax fires send form other page. when attempt call info form on receiving page not seem receive data first page. reason assume no errors , not display data fire echo located before fetch array. here code first page. works in aspects trying except form sending portion. leaving lot out ajax , form portions in there. <?php $con=mysqli_connect("localhost","base","password","util"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } $sql = "select * recipes"; $result = mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { echo...

In jQuery, how do I add a user input value to a running total based on pre-defined values? -

this have far, albeit scaled down. want user click on pre-defined values, in first 2 divs, or click on "input custom value" brings focus #enter_custom input can enter own value. user add each value option total clicking "add total" after highlighting either predefined value or entering custom value. hope makes sense. i cannot life of me user defined input value add total. not sure if need remove focus before can added. i've tried (and many more failures), perhaps using wrong approach -- blur() -- or, perhaps i'm on wrong track altogether. total displays nan i've tried. appreciated. $(document).ready(function() { var $total = 0; $('#total').html($total); $('.activate').click(function() { $(this).addclass('selected'); $(this).siblings().removeclass('selected'); var $value = $(this).find('input').val(); var $totalchanger = parseint($value, 10); $('#add').clic...

How to get root access to my android application? -

i have application user take snap camera , view it. for functionality, creating file in sd card store returned data camera created file whenever creating directory getting error. com.cyanogenmod.filemanager.console.insufficientpermissionsexception this code creating directory. public static file getoutputmediafile(int type) { file mediastoragedir = new file( environment .getexternalstoragepublicdirectory(environment.directory_pictures), mediaconstants.base_directory); if (!mediastoragedir.exists()) { if (!mediastoragedir.mkdirs()) { //getting error here return null; } } //code create file name in directory } i got know application doesn't have sufficient permission create directory in external storage. please me on giving permissions application create directory you don't need root permission this. rather,...

php - Update existing data otherwise insert new data -

i new in laravel.first have have inserted form data database .then have fetched data array. inserted data new database. when every time insert form data, in second database data inserted multiple time.my code given below: foreach($result $res) { $res1 = userlist::firstorcreate($res); } here array. if same data in database, want update array new value database the method want use updateorcreate model::updateorcreate( ['needle' => $value], ['field1' => 'value1', 'field2' => 'value2'] ); hope help.

unity3d - Cannot modify a value type return value of `UnityEngine.Material.color' for changing alpha of gameobject -

i'm having trouble this, although improvement code can make gameobject change it's alpha want simpler. here code: spriterenderer go; color colora; float x = 0f; void start () { go = getcomponent<spriterenderer> (); } // update called once per frame void update () { colora = new color(255f,255f,255f,.5f); go.material.color.a = colora.a; } this error one. make code simpler. color struct , valuetype. go.material.color // return copy of color you have make instance of color assign go.material.color go.material.color = new color(255f,255f,255f,.5f);

java - ArrayList ignore null value causing ArrayIndexOutOfBoundsException -

i trying specific data line using ! split. example: s!arc!256!547291!840.50!9038.00!840.50!9038.00!519.50!9038.00!321.00!0.00!counterclockwise!assembly_top!bat-2-cr1632-t0_r!bt2k! so when split line using ! , put in array, array should contain 16 data. facing problem when data like s!line!257!37825 1!3525.00!10720.00!4525.00!10720.00!6.00!!!!!assembly_top!csco-label-asy-73-sn-comb_r!! and ignore last data null or "". when try take data[15] , problem arrayindexoutofboundsexception keep pop out.below code write: string[] data = $line_list.get(k).split("!"); if ($line_list.get(k).startswith("s!") && $line_list.get(k).contains("assembly_top")) { $graphic.append(data[15]) .append("!") .append(data[14]) .append("!") ...

javascript - Fabricjs freedrawing hline brush -

i following create freedrawing here: http://fabricjs.com/freedrawing/ working fine pencil,circle,spray & pattern isn't working hline,vline,square,diamond & texture. had defined canvas earlier this: $(document).ready(function () { //setup front side canvas canvas = new fabric.canvas('tcanvas', { hovercursor: 'pointer', selection: true, selectionbordercolor: 'blue' }); }); i have created free drawing function this: function getfabricbrush(mood) { var mood; if (mood === 'hline') { canvas.freedrawingbrush = vlinepatternbrush; } else if (mood === 'vline') { canvas.freedrawingbrush = hlinepatternbrush; } else if (mood === 'square') { canvas.freedrawingbrush = squarepatternbrush; } else if (mood === 'diamond') { canvas.freedrawingbrush = diamondpatternbrush; } else if (mood === 'texture') { canvas.freedrawin...

c++ - Modern OpenGL issue texturing plane -

i have been having difficulty texturing plane made. first quad on plane textured properly, rest of plane seems use first pixel of texture ends solid color. seems work if make 1 giant plane , texture that, when try break plane sections keep getting issue. i’m assuming missing far coordinates go, understanding thought supposed between 0 , 1? appreciated. [![enter image description here][1]][1] texture coordinates glfloat grasstexcoords[] { 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f }; setting vao gluint makeplane() { float size = 5; (int = -5; < 5; ++i) { (int j = -5; j < 5; ++j) { verts.push_back({ glm::vec3((i * size), -11.f, (j * size)) }); verts.push_back({ glm::vec3((i * size), -11.f, (j * size) + size) }); verts.push_back({ glm::vec3((i * size) + size, -11.f, (j * size)) }); verts.push_back({ glm::vec3((i * size) + size, -11.f, (j * s...

c# - How to extract a method which is using "using" keyword and is disposable -

i have around 20 methods, of them requires userprincipalextension disposable class different operations, want extract separate method, not sure how to, public static userprincipalextension getupe(identity type, string identity) { using (principalcontext pc = myutilities.getprincipalcontext()) using (userprincipalextension upe = userprincipalextension.findbyidentity(pc, type, identity)) { // different operations // if return upe here pc going dispose ? } // how best return upe , dipose pc well, return upe; } so can use in other methods this: var upe = getupe(identitytype.sid, "s-32sldkfjsldr344"); using(upe) { } upe , principalcontext should disposed afterwords. unless upe has own way of disposing principal context, have 2 options - make wrapper class around upe, or use helper function. there's little said wrapper class approach - have class has field both pc , upe, , have dis...

scala - Spark reparition() function increases number of tasks per executor, how to increase number of executor -

Image
i'm working on ibm server of 30gb ram (12 cores engine), have provided cores spark still, uses 1 core, tried while loading file , got successful command val name_db_rdd = sc.textfile("input_file.csv",12) and able provide 12 cores processing starting jobs want split operation in between intermediate operations executors, can use 12 cores. image - description val new_rdd = rdd.repartition(12) as can see in image 1 executor running , repartition function split data many tasks @ 1 executor. it depends how you're launching job, want add --num-executors command line when you're launching spark job. something like spark-submit --num-executors 10 \ --driver-memory 2g \ --executor-memory 2g \ --executor-cores 1 \ might work you. have on running spark on yarn more details, though of switches mention yarn specific.

php - Not getting query string value using angular.js -

i have url http://localhost/phpdemo/edit_data.php?edt_id=1 . here need query string value 1 . using angular.js, getting following output in browser's console. id : object {} my code given below. update.js: var app=angular.module("edit_data", []); app.controller("updatecontroller",function($scope,$http,$location){ $scope.errors = []; $scope.msgs = []; var id=$location.search(); console.log("id :",id); $http.get('js/edit.php',{"user_id":$location.hash()}).success(function(response){ console.log('response',response); }); $scope.update_data=function(){ $http.post('js/update.php',{"first_name":$scope.first_name,"last_name":$scope.last_name,"city":$scope.city} ).success(function(data, status, headers, config){ if(data.msg!=''){ $scope.msgs.push(data.msg); }else{ $scope....

windows universal - Launch exe file generated by Visual Studio 2015 -

i need runnable .exe file simple windows 10 universal app developed in visualstudio 2015 community edition. worked before on windows 7 pc visual studio 2012 (or maybe 2013), .exe located @ myproject/bin/x64/debug, , able run it. now, visual studio 2015, can still find .exe file, gives me error when try run it: this application can run in context of app container. is there way export executable, without having payed developer account? if it's windows 10 universal app cannot run exe file. need create appxupload binary in visual studio. here's steps follow create binaries. open solution select project-->store-->create app packages a dialog opens , select 'no' if want generate appx file own use. click next. in next screen select create after checking appropriate requirements. hope helps case. check these links screenshots. https://www.dropbox.com/s/64fvm3huy64qqda/capture.jpg?dl=0 https://www.dropbox.com/s/hw52n281u7rse1z/capture1.j...

php - using unique rule of laravel 4 on updating database records -

i have table weapons have columns weaponid, weaponname, wstock, wdesc in update function inside controller, have set of rules public function c_updatesystemuser($id) { $rules = array( 'weaponname' => 'required|min:2|max:50|regex:/^[a-za-z0-9\-\s]+$/|unique:weapontbl,weaponname,' . $id, 'wstock' => 'required|numeric', 'wdesc' => 'required|min:1|max:100|regex:/^[a-za-z0-9\-\s]+$/' ); //other stuff } when updated , changed wstock having problems because saying weaponname existed. used unique rule unique:weapontbl,weaponname,' . $id, because wanted except record im working on when tested i'am having these errors column not found: 1054 unknown column 'id' in 'where clause' (sql: select count(*) aggregate `weapontbl` `weaponname` = unicorn , `id` <> 1) why using id whereas don't have 'id' in table weaponid? ther...

gruntjs - how to compile multiple scss files into multiple css files with grunt-sass? -

i compile scss files inside scss folder , not imported ( file names not start _ ) each separate css files( has same name scss file ). that kind of functionality can found in prepros. is possible grunt-sass? i tried doesn't work: sass: { dist: { files { 'css/*.css': 'scss/*.scss', } } } you can try: sass: { dist: { files: [{ expand: true, cwd: 'styles', src: ['*.scss'], dest: '../public', ext: '.css' }] } }

ios - New warnings in iOS9: Ambiguous expansion of macro 'TARGET_OS_IOS' -

after upgrading xcode version 7 , using ios sdk 9 these warnings appear in: #if target_os_ios warning: ambiguous expansion of macro 'target_os_ios' how make go away? if have defined target_os_ios in own code need change else (or delete version) xcode 7 newly defines along target_os_watch

android - Creating custom actionbar popup menu using layout -

i'm trying create custom popup/drop down menu on android when click action button action bar list of overflow options appear in different format (image on right instead of left, button, etc). tried find question , 1 close this question answer incomplete , lacks explanation. tried far replicate removed dropdown class nothing happens expected. tried ways using xml menu giving me same result of image on left , text on right. think setactionview doesn't work way expected it. hope can me on this.

content management system - TYPO3 v4.6 about IRRE (sorting) -

we must update field data sorting sorting . i set $tca['tx_table2']['ctrl']['sortby'] = 'sorting'; and set: $tca['tx_table1']['columns']['uid_records'] = array( ............ 'config' => array( 'type' => 'inline', 'languagemode' => 'inherit', 'foreign_table' => 'tx_table2', 'foreign_sortby' => 'sorting', 'size' => 1, 'minitems' => 0, 'maxitems' => 100, ) ); but when moving recording position, data field sorting not updated. values recorded when creating new record. what problem?

CSS transition inner div elements on div hover -

i want change opacity of text in div when hover on happens : currently transition looks this, , moved box bit: .bg-onebyone { transition: 0.5s ease; background: #17b6a4 none repeat scroll 0% 0% !important; } .bg-onebyone:hover { margin-top: -8px; } in div.bg-onebyone have div holding text this .bg-onebyone .widget-stats .stats-icon { color: #fff; opacity: 0.5; } and want when main div hovered on want increased above opacity in transition. how can ? <a href="/url"> <div class="widget widget-stats bg-onebyone"> <div class="stats-icon stats-icon-lg"> <i class="fa fa-search fa-fw"></i> </div> <div class="stats-desc">creating grouped unmatched aliases</div> </div> </a> you need use :hover pseudo-class on parent , select child element. .bg-onebyone:hover .stats-icon { opacity: 0.8; } also...

node.js - Javascript: Check whether key exists in an array of objects -

var _ = require('lodash'); var users = [ { 'id': '1', 'coins': false }, { 'id': '2', 'coins': false } ]; var = _.every(users, function(p){ if ('id' in p && 'coins' in p) return true; else return false; }); console.log(a); the function works check in keys exists in array of objects. if 1 of object doesn't exists "id" or "coins" , return false. is there better way write thie snippet of code? felt quite clumsy. since you're in node.js, know have array.every() don't see reason lodash here or if/else . why not this: var users = [ { 'id': '1', 'coins': false }, { 'id': '2', 'coins': false } ]; var allvalid = users.every(function(item) { return 'id' in item && 'coins' in item; }); fyi, code assuming nobody has mysteriously added properties named id or coins obj...

javascript - Unexpected token ILLEGAL error when lines of code are split -

i playing around source code of timesheet.js (see specific line) , came across small bug, see below line of code: '<span style="margin-left: ' + bubble.getstartoffset() + 'px; width: ' + bubble.getwidth() + 'px; " class="bubble bubble-' + (cur.type || 'default' ) + '"></span>', when generate html , split in 2 lines works fine, if following i.e. split html in 3 lines , so: '<span style="margin-left: ' + bubble.getstartoffset() + 'px; width: ' + bubble.getwidth() + 'px; " class="bubble bubble-' + (cur.type || 'default' ) + '"></span>', i following error: uncaught syntaxerror: unexpected token illegal why ? why when spit code multiple lines error occur ? can explain ? question. thank you. alex-z. well, duh, split code in middle of string literal. can...

How to delete all the item from list in c# windows phone 8 -

hi working on windows phone chat application , have save user chat in local db , want clear conversation , not able delete chat , following code delete 1 item @ time following code using: var del_chat = dbconndelete_user.query<savedmsg>("select * savedmsg chatuserid='" + totalseletion + "'").firstordefault(); dbconndelete_user.delete(del_chat); if want clear list, can this list<myclass> mylist = new slist<myclass>(); mylist.clear(); //remove elements list this work observablecollection too observablecollection<myclass> myobservable = new observablecollection<myclass> (); myobservable.clear(); i suggest use observablecollection represents dynamic data collection provides notifications when items added, removed, or when whole list refreshed. reflected in user interface. pros of observable collection instead of list

c - execve grep process never exit -

the following code simulate pipe , grep operation forking process , using execve system call. output seems fine, however, grep process seems never exit (still running in back) until whole process ends. what's problem? abnormal since using grep in shell exit. #include <stdio.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <sys/wait.h> #include <fcntl.h> int main(int argc, char *argv[], char *env[]) { char ch[32]; while (1) { scanf("%s", ch); int pd[2]; if (pipe(pd) == -1) { perror("pipe failed"); exit(1); } int childpid, pid; if ((childpid = fork()) < 0) { perror("fork failed\n"); exit(1); } else { // parent process if (childpid) { int status; wait(&status); // print exit code of child process printf("exit code %d\n", status); } // c...

node.js - Sails js application driving CPU usage to 100% -

i'm building application using sails , every time leave server running more few minutes cpu jumps solid 100% usage. i'm including big amount of less files in assets , believe issue lies here. there other reasons may happen? it grunt-watch, when have lot of files squeezes cpu. try disabling , check if cpu gets normal usage (6-30% depending on cpu , overall usage). to go tasks/register/default.js , remove 'watch' array. module.exports = function (grunt) { grunt.registertask('default', ['compileassets', 'linkassets', 'watch']); }; if don't want disable grunt watcher, go tasks/config/watch.js , try excluding folder has of files, or exclude them if not in particular folder. i'll give example of how exclude folder task. add ! before path want exclude. module.exports = function(grunt) { grunt.config.set('watch', { // config can ignore in case assets: { // assets wa...

extjs - How to put validation on text field not allow characters while paste in ext js -

how put validation on text field not allow characters while paste in ext js? i using maskre: /[0-9]/. using while entering value digits allowed. while paste allows character. maybe check input value on "blur" event : mytextfield.on('blur', function (component) { if (!component.isvalid()) { // need do, maybe clear textfield ? } })

angularjs - Cordova katzer plugin background mode not working on iOS-9 -

in ionic/angularjs application use https://github.com/katzer/cordova-plugin-background-mode/ backgrounding application. it's working quiet on ios-8 new ios-9 not working more. did few tests , looks app working in background user gets no information it. on ios-8 message "yourapp using location" or on top of display. on ios-9 message missing. did same experience plugin? i found out there changes in core location functions on ios9: allowsbackgroundlocationupdates in cllocationmanager in ios9 like suggested in post add default property allowsbackgroundlocationupdates value yes org.apache.cordova.geolocation plugin. with fix on cdvlocation.m located in /plugins/org.apache.cordova-geolocation/src/ios/ works. to bring work removed platform ios cordova platform remove ios , added again cordova platform add ios builds plugins new. now i'm getting blue bar on display again :-) this fix break geolocation support on ios < 9.0. bring work older ve...

javascript - chosen plugin not working with dynamically created rows in a table -

i must beginner in jquery try figure out , solve problems myself. have problem , stuck have table dynamically added rows , select box each purpose of single delete or multiple delete, works fine except when rows added chosen applied select boxes aren't functioning no matter nothing works. html <table id="datatable"> <tr> <th><input type="checkbox" id="selectall" value="selectall"/></th> <th>field-1</th> <th>field-2</th> <th>field-3</th> <th>field-4</th> <th>field-5</th> </tr> <tbody> <tr> <td><input type="checkbox" class="check"></td> <td> <select name="input-1[]" class="chosen_select_l"> <option></option> <option>option 1</option> <opti...

latex - omitting summary statistics from -tabstat- by subgroup if they are missing values -

i writing code export summary statistics table in latex using tabstat, by() , esttab . here have toy example replicates structure of data: cls clear set more off use auto, clear // create 2 groups used in -by()- option gen rep2="first dataset" if rep78>=3 replace rep2="second dataset" if rep78<3 // recode "price" missing in first group replace price=. if rep2=="first dataset" // table eststo: estpost tabstat weight price mpg trunk, /// column(statistics) statistics(count mean median sd) by(rep2) nototal local sum_statistics "count(label(observations)) mean(label(mean) fmt(2)) p50(label(median)) sd(label(standard deviation) fmt(2))" esttab using "table1.tex", replace type /// title("summary statistics") /// cells("`sum_statistics'") /// noobs nonum booktabs the output displays summary statistics 2 subtables, 1 each dataset (as defined rep2 ). these 2 datasets...

javascript - How does the $html.appendTo($parentEl) work internally to allow listeners to be attached before the $html is in the DOM? -

i thought listeners can attached elements in dom. if element dynamically added need reattach listeners or attach listeners parent element (bubbling) in first place. when use .appendto() can somehow attach listeners element not in dom , still works. how appendto change things? making grave mistake using method regret later? code: var $html = $("<div class='someelnotindom'>random text</div>"); attachsomelisteners($html); // ex. click event listener etc. var $parentel = $(".someelementindom").eq(0); $html.appendto($parentel); // listeners work. why?

linux - Commit file property changes to git repository -

i have bunch of file incorrect permissions: since files may contain passwords don't want them world-readable after checkout user not have remember changing acces rights. -rw----rw-. 1 beginner beginner 16 19. sep 04:36 file1.config -rw----rw-. 1 beginner beginner 16 19. sep 04:36 file2.config -rw----rw-. 1 beginner beginner 16 19. sep 04:36 file3.config but after using chmod get -rw-------. 1 beginner beginner 16 21. sep 04:36 file1.config -rw-------. 1 beginner beginner 16 21. sep 04:36 file2.config -rw-------. 1 beginner beginner 16 21. sep 04:36 file3.config git status not show these files changed. question: how can commit property changes these files git repository? probably filemode not on, thats why git doesn't show changes. look project, in .git folder config file , should see this: [core] filemode = false set true or run following command git config core.filemode true you can find more examples git configuration here

cryptography - How to create a digital signature using SHA256 with ECDSA algorithm in C# -

i have requirement create signature url-safe-base-64-encoded sha256+ecdsa signature of message. used consume remote rest service. i have been given hal browser implementation connects them expected , test implementation done in scala. val token = generatetoken() // generates random numeric token, different each request val lines = line1 + "\n" + line2 + "\n" + line3 + "\n" val linebytes = lines.getbytes() try { var sig = signature.getinstance("sha256withecdsa") sig.initsign(privatekey) sig.update(linebytes) body.foreach { input => // if there body, sign input.reset() var bytes = new array[byte](1024) while (input.available() > 0) { val alloc = input.read(bytes) sig.update(bytes, 0, alloc) } } val encoder = new base64(true) val sigstring = encoder.encodeasstring(sig.sign()).replace(...

Accessing inbound property in mule -

Image
in sub-flow, how can access http connector (red area) inbound properties available @ green marked area. the scope of inbound property after inbound endpoint or source endpoint. here should copy inbound properties "flowvars" , use across flow #[flowvars.paramertername = message.inboundproperties.'http.query.params'.parametername]

php - mysql setting for queries in a loop -

i using script in php insert large data in loop in mysql each loop selecting 10000 rows 1 table , inserting rows in table but per current configuration , mysql goes aaway after first loop of queries means goes out after inserting first 10000 rows i using zend server in ubuntu , mysql i have tried change my.cnf , php.ini got no success thnx in advance ones provide solution. <?php include('db.php'); $conn = mysql_connect($server, $user, $password) or die('cant connect server'.mysql_error()); mysql_select_db($database); //ps_orders // truncate table ps_orders; //select * ps_customer order id_customer desc limit 0,2; //select * ps_cart order date_add desc limit 0,1 // fecth cart sss database //where id_customer >56020" $conn1 = mysql_connect($server,$new_user,$new_password); mysql_select_db($database_newdb,$conn1); $sql="truncate table `ps_orders`"; if(mysql_query($sql,$conn1)) { echo "table truncated"; } else { mysq...

javascript - jQuery image map responsive only one way -

i have responsive image map overlay. but resizes when make browser window smaller, when resize big browser window again, keeps smallest size have been down to. doing wrong? when resized follows width of .page_content, responsive , works great on resizing. use imagemapster. heres code: jquery('#apartment-map').mapster(initial_opts) .mapster('snapshot') .mapster('rebind',basic_opts); var resizetime = 0; var resizedelay = 25; function resize(maxwidth,maxheight) { var image = jquery('#apartment-map'), imgwidth = image.width(), imgheight = image.height(), newwidth=0, newheight=0; if (imgwidth/maxwidth>imgheight/maxheight) { newwidth = maxwidth; } else { newheight = maxheight; } image.mapster('resize',newwidth,newheight,resizetime); } function onwindowresize() { var curwidth = jquery(".page_content").width(), curheight = jquery(".pag...

Android class ConnectionService -

can give example how implement abstract class- connectionservice.my idea use telecommanager make outgoing call. https://developer.android.com/reference/android/telecom/connectionservice.html#service_interface telecommanager telecommanager = (telecommanager)this.getsystemservice(context.telecom_service); phoneaccounthandle accounthandle=telecommanager.getsimcallmanager(); phoneaccount account=telecommanager.getphoneaccount(accounthandle); telecommanager.registerphoneaccount(account); charsequence label=account.getlabel(); connectionrequest request = null; connection connection= service.oncreateoutgoingconnection(accounthandle,request); now need know given in request feild , connection service how implement before it.. it's purpose not other apps place calls. supported method doing through intent.action_call stated in other answer. there api on telecommanager place call, however, no different sending intent direct...

email - codeigniter query gives error -

i writing code email following query, gives me error: undefined variable email it seems result generated query can't seen outside of foreach loop, want email variable. error in send_session_close_mail() function: $qry="select email end_employee_master id=(select eemp_id book_e_counseling_mst caseid='ec-".$cid."')" ; $query=$this->db->query($qry); $num=$query->num_rows(); foreach($query->result() $row) { $email=$row->email; } full code listing: <?php class email_model extends ci_model { private $config = null; public function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); $this->load->library('email'); $this->config = array( 'protocol' => 'smtp', 'smtp_host' => 'mail.santulan.co.in', 'smtp_port' =...