Posts

swift - NSTableView's makeViewWithIdentifier finding nil on one of its child views -

Image
i have nstableview 2 columns, 1 non-editable nstextfield , other editable one. each cell has different identifier ("camera" first column, "position" other). i having no trouble first column's cell, however, second 1 ("position") finds nil when trying access editable nstextfield. have tried using 1 identifier. declaring @ beginning of viewfortablecolumn, , several other things, keeps missing nstextfield. ideas might going wrong? my code: func tableview(tableview: nstableview, viewfortablecolumn tablecolumn: nstablecolumn?, row: int) -> nsview? { if tablecolumn?.identifier == "column0" { let cell = tableview.makeviewwithidentifier("camera", owner: nil) as? nstablecellview cell?.textfield?.stringvalue = array(cameraorder.keys)[row] return cell } else { let cell = tableview.makeviewwithidentifier("position", owner: nil) as? nstablecellview cell!.textfield!.stringva...

html - PHP mail() not receiving the email -

this question has answer here: php mail function doesn't complete sending of e-mail 24 answers i'm trying set contact me page , i've got working way point of 'message sent' result showing correctly. e-mail never shows me in box inbox. <?php $name = $_post['name']; $email = $_post['email']; $subject = $_post['subject']; $message = $_post['message']; $antispam = $_post['antispam']; $to = 'myemailaddress@gmail.com'; $from = 'from : ' . $email; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($antispam == '10' || 'ten' || 'ten') { $human = true; } if($_post['submit'] && $name != "" && $email != "" && $message != "" &...

android - set textsize for multiple textview with different ids -

i trying set textsize multiple textview different ids. also, every textview in own fragment view , slide in view pager. but, problem code working first , second id , rest did not change. also, if remove if (st != null) got null point error. @override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { case android.r.id.home: navutils.navigateupfromsametask(this); return true; case r.id.small_fond_size: int[] ids = {r.id.text_view_thread0, r.id.text_view_thread1, r.id.text_view_thread2, r.id.text_view_thread3, r.id.text_view_thread4, r.id.text_view_thread5, r.id.text_view_thread6, r.id.text_view_thread7, r.id.text_view_thread8, r.id.text_view_thread9, r.id.text_view_thread10, r.id.text_view_thread11, r.id.text_view_thread12, r.id.text_view_thread13, r.id.text_view_thread14, r.id.text_view_thread15, r.id.text_v...

c - How to use second rank pointer rightly? -

i have 2d array called matrix , add 1 every element. #include <stdio.h> #include <stdlib.h> int **add_one(int **matrix, int m, int n) { int i, j; int **new_mat; new_mat = (int **) malloc(m * n *sizeof(int)); (i = 0; < m; i++) { (j = 0; j < n; j++) { new_mat[i][j] = matrix[i][j] + 1; } } //return 2nd rank pointer return new_mat; } int main() { int matrix[3][2] = {1, 2, 3, 4, 5, 6}; int **new_mat; int i, j; new_mat = add_one(matrix, 3, 2); (i = 0; < 3; i++) { (j = 0; j < 2; j++) { printf("%d ", new_mat[i][j]); } printf("\n"); } free(new_mat); } however, compiler told me [error] cannot convert 'int (*)[2]' 'int**' argument '1' 'int** add_one(int**, int, int)' it works bit differently thought #include <stdio.h> #include <stdlib.h> // can pass have int **ad...

percent encoding - Converting foreign characters in URLs -

is there website converting foreign characters url format? need instant result after submit foreign character request. examples: 台積電 = %cc%a8%b7e%eb%8a シャープ = %a5%b7%a5%e3%a9%60%a5%d7 혼 하이 = %26%2354844%3b+%26%2354616%3b%26%2351060%3b

java - Is there any javascript library to represent json-result of @JsonIdentityInfo? -

i have 2 bi-directional models , use jsonidentityinfo prevention infinite recursion in json result. here viewmodels: @jsonidentityinfo(generator = objectidgenerators.propertygenerator.class, property = "id") public class groupsviewmodel extends baseentityviewmodel<long> { private string title; private set<userviewmodel> users; } @jsonidentityinfo(generator = objectidgenerators.propertygenerator.class, property = "id") public class userviewmodel extends baseentityviewmodel<long> { private string username; private string password; private set<groupsviewmodel> groups; } and part of json result below: [{ "id" : 1, "title" : "admingroup", "users" : [{ "id" : 1, "username" : "admin", "password" : "...", "g...

vb.net - Check if Adobe Reader is installed before using it -

i want able have app check if adobe reader installed. if is, want program use display pdf, if not want use free (limited) reader control display pdf. any suggestions edit: question seems little broad basicly i'm trying following try dim acrodisplay new axacropdflib.axacropdf acrodisplay.left = 50 acrodisplay.top = 50 acrodisplay.width = 200 acrodisplay.height = 500 me.controls.add(acrodisplay) msgbox("acro added") catch ex exception msgbox("acro not installed") ''load alternate pdf viewer (spire.pdf free) end try however when acrobat isn't installed instead of going catch statement shows error "could not load assembly" , exits sub what want if acrobat control isn't installed, wont display , error , instead load alternate pdf viewer is there way check axacropdflib.axacropdf before attempting load? hopefully makes things clearer edit 2: after searching , screwing around found 2 possible ways...