Posts

Showing posts from September, 2010

Way to redirect login page if user not login -

i want redirect user login page if not logged on page. have actionlogin in registrationcontroller so when use in common/main : 'as beforerequest' => [ //if guest user access site so, redirect login page. 'class' => 'yii\filters\accesscontrol', 'rules' => [ [ 'actions' => ['login', 'error'], 'allow' => true, ], [ 'allow' => true, 'roles' => ['@'], ], ], ], it alway redirect me index.php?r=site%2flogin it possible change main login redirect index.php?r=registration%2flogin if possible should overwrite code or change something.. !edit! ok, 'user' => [ 'loginurl' => ['registration/login'], ], resolve problem when want go registration/index signup user redirect me registration/login. possible ruled out url enforced. want ma

bash - append an existing line | centos -

i append existing line in file (cent os). example have file have following # add hash line so adding hash 'to line' using sed trick? ** update: ** general information, i'm using edit sudoers file part of script i'm working on.

vba - Text Box on form must pick up data from another form -

i have 2 forms: frmreceipts , frmdiffs. frmreceipts has unbound control shows result of function: public function recdiffs() double recdiffs = forms!frmdiffs.text17 end function at moment value of text17 54.00 when frmreceipts opens shows value 0.00 on control text41. can correct clicking command button runs me.form.refresh refresh not work (i.e. text17 continues show 0.00) if refresh runs on load, on open, or on activate. seems work clicking command button. ideally i'd correct value show in text17 when form opens. also, if put frmreceipts design mode form view, text17 shows correct data. use .requery instead of refresh.

c++ - How do I add an include directory from outside the root folder with CMake? -

this first cmakelists.txt code: #cmake_minimum_required (version 2.6) project (project) add_subdirectory(src) include_directories(${/path_to_directory}/include) and cmakelists.txt in subdirectory set (cmake_c_flags "-wall -g") file(glob srcs *.cpp *.hpp *.h) add_executable(source ${srcs}) i'm still unable include path_to_directory in project edit: didn't work either: file(glob mylib *.cpp *.hpp *.h) add_executable(includesource ${mystuff}) target_include_directories( mystuff public ${path_to_directory}/include ) even if question not clear, guess want target_include_directories ( here documentation) instead of include_directories . from documentation: specify include directories or targets use when compiling given target. you can use as: target_include_directories( your_target_name public ${/path_to_directory}/include )

javascript - Connect Ember 2.3 App to WordPress backend with the version 2 WP REST API using adapters and serializers -

i'm connecting ember 2.3 front-end wordpress admin panel client. i'm using version 2 of wordpress json api . the api great , i've used before $ajax , xhr requests, never felt great implementation , version 1. this time , i've set adapter this: app/adapters/application.js import ds 'ember-data'; export default ds.jsonapiadapter.extend({ host: 'http://example.com', namespace: 'wp-json/wp/v2' }); jsonapiadaper new default , expects returned data complient jsonapi standard. , used findall data of pages store. app/routes/application.js import ember 'ember'; export default ember.route.extend({ model() { var pagesdata = this.store.findall('page'); console.log(pagesdata); return pagesdata; } }); here's url example. http://mellonwinslowdb.com/wp-json/wp/v2/pages what returned, doesn't appear compliant jsonapi standard. error while processing route: work assertion failed: nor

ios - Swift - navigation buttons show & hide -

Image
running weird issue , couldn't find how fix it. have tab bar controller based app 3 view controllers (2 table view controllers , 1 regular vc), profile, orders, people. when sign in, land on profile , buttons in nav bar show properly. go people , come back, buttons disappear , don't show anymore. vice versa true (going people profile). this additional weird part: if go profile orders, back, show buttons. if go profile orders people, people shows normally. here structure: in viewdidload , viewwillappear, add following code: let editbutton = uibutton() editbutton.frame = cgrectmake(0, 0, 60, 35) editbutton.settitle("edit profile ", forstate: .normal) editbutton.settitlecolor(uicolor.bluecolor(), forstate: .normal) editbutton.addtarget(self, action: selector("editbuttonpressed"), forcontrolevents: .touchupinside) let leftbarbutton = uibarbuttonitem() leftbarbutton.customview = editbutton self

Returning a null pointer from a C function, comparison seg faults -

i'm working on file system simulator using c. node struct looks this: typedef struct node { char name[64]; char type; struct node* child; struct node* sibling; struct node* parent; }node; my recursive function, findnode(), returns null if can't find node in tree specific name. node* findnode(char* name, node* start) { printf("inside findnode, looking %s, starting @ %s\n", name, start->name); node* current = start; if(strcmp(name, current->name) == 0) { printf("inside findnoe, node found.\n"); return current; } if(current->sibling->name != 0) { return findnode(name, current->sibling); } if(current->child->name != 0) { return findnode(name, current->child); } printf("inside findnode, node not found.\n"); return 0; } upon calling findnode() , comparing 0, program seg faults. if(findnode(bname,current) != 0) //seg fault here { printf("error: node basen

c# - How can i click on a button in web page using webbrowser? -

Image
the last div variable elementid working: "ctl00_rightmaincontent_submitaddress_p_submitbuttom" the problem items1 variable part. want click button can see in screenshot it's marked. class name "addimg" , onclick openuploaddiv(0) not in div variable in bottom onclick openuploaddiv(0) can't find it's id. , tried add classname "addimg" in foreach didn't find it. what want click automatic on addimg button. void webbrowser4_documentcompleted(object sender, webbrowserdocumentcompletedeventargs e) { if (e.url.absoluteuri != webbrowser4.url.absoluteuri) { return; } htmlelementcollection items = webbrowser4.document.getelementsbytagname("div"); foreach (htmlelement item in items) { if (item.getattribute("classname") == "elements") { webbrowser4.document.getelemen

git - Transferring the folder and all its file to github -

i want transfer entire java project including many nested folders , files github account. how can easily, tried following steps not able see folder on github. steps followed 1. created repo on github 2. using powershell on windows directory has source files , folders, entered git init(). 3. git add . 4. git commit -m "new push files" 5. git remote add origin https://github.com/name/my_project.git 6. git pull origin master 7. git push origin master but not seeing nested folders , files on web account. can please me here. appreciate in learning git. thanks using powershell on windows instead of powershell better use sourcetree or git-bash : but not seeing nested folders , files on web account. you need add files recursively: git add . -a do steps before (with minor changes can see): git init git add . -a git commit -m "message..." git remote add origin git@github.com:<user>/<repo>.git git push -u origi

Storage.mode in R Programming -

i have been studying is.numeric , as.numeric, is.complex , as.complex, etc. 1 thing don't difference between mode() , storage.mode(). mode() tells me whether numeric, complex, logical , char right? storage.mode() do? don't see why there needs storage.mode. explanations appreciated :)

ios - What's a proper way to control access to property that stores server call results? -

my class has property gets populated network call. population can triggered action. what's correct strategy implement access of property, given property can accessed when new result set being fetched server? e.g. @interface myclass @property (nonatomic, strong) nsdictionary *data; @end @implement myclass - (void)loaddata { // self.data can accessed when loaddata called. // what's correct strategy controlling access self.data? [self loaddatafromserverwithcompletion:^(nsdictionary *objects) { [self.data removeallobjects]; // populate self.data objects }]; } what's correct strategy implement access of property, given property can accessed when new result set being fetched server? the correct strategy? serialize access. the easiest way mark property atomic , , self.data = objects; in completion handler. your completion should this: dispatch_async(dispatch_get_main_queue(), ^{ ... tell app reload data ... });

python - scipy splrep() with weights not fitting the given curve -

Image
using scipy's splrep can fit test sinewave: import numpy np scipy.interpolate import splrep, splev import matplotlib.pyplot plt plt.style.use("ggplot") # generate test sinewave x = np.arange(0, 20, .1) y = np.sin(x) # interpolate tck = splrep(x, y) x_spl = x + 0.05 # show wors y_spl = splev(x_spl, tck) plt.plot(x_spl, y_spl) the splrep documentation states default value weight parameter np.ones(len(x)) . however, plotting results in totally different plot: tck = splrep(x, y, w=np.ones(len(x_spl))) y_spl = splev(x_spl, tck) plt.plot(x_spl, y_spl) the documentation states smoothing condition s different when weight array given - when setting s=len(x_spl) - np.sqrt(2*len(x_spl)) (the default value without weight array) result not strictly correspond original curve shown in plot. what need change in code listed above in order make interpolation weight array (as listed above) output same result interpolation without weights? have tested scipy 0.17.0. gi

How do I find the 'default' visibility for a google Calender Item? -

looking @ the calendar event documentation , 1 of possible values visibility is: "default" - uses default visibility events on calendar. default value. i'd find out, if see value on event, visibility event is. in other words, find default? fixed, property of calendar or user or ..? looked @ think of did not find reference visibility. after searching more, this might clue: it's user documentation, , says (with left out): first, learn calendar's privacy settings next, learn event sharing options: my calendar isn't shared anyone your calendar isn't shared anyone, events aren't either. no matter settings choose event, event seen you. i've shared calendar specific people see free/busy default: events show busy. see event details default: people you've shared calendar can see event details.

javascript - Code to detect webcam does not work on Chrome when running on server -

i using javascript code below detect webcam: navigator.getmedia = ( navigator.getusermedia || navigator.webkitgetusermedia || navigator.mozgetusermedia || navigator.msgetusermedia); it works chrome when application running on computer. when running application on server, works fine firefox not chrome. getting error message "no camera available" if trying detect webcam on server side (the server has no webcan) , not on client side, computer. can problem? it's because google chrome wants https connection enable webcam. webcam works on google chrome on https connection or on localhost.

ember.js - Sails/Waterlock password reset flow -

g'day all, does have experience waterlock flow passsword resets? i've hit wall can see work-around for, seems in-elegant, i'm missing something. when send through auth/reset post email element, system proceeds shoot email out planned. when submit received link in post request, password element, see "404" response. however if submit link request first, , submit post works. when waterlock-local-auth source, reset post action testing presence of decrypted token in request object before allowing proceed. so either code front end send request (which doesn't respond properly) , resubmit post, or go in , hack waterlock-local-auth code include decode of token (which i'm thinking elegant solution). any clues? thanks, andy i have got similar problem, use angularjs frontend. discussion thread helpful: https://github.com/waterlock/waterlock-local-auth/issues/7 basically, expected submit request url received in password reset emai

ios - Change UIVisualEffectView Colour Beyond Light/Dark? -

is possible change colour of uivisualeffectview beyond standard light, light , dark? i need achieve shade between of light , dark presets. if want similar uivisualeffectview more control, recommend taking @ apple's uiimageeffects sample code. you can find @ ios developer library : blurring , tinting image here's method may of interest : + (uiimage*)imagebyapplyingblurtoimage:(uiimage*)inputimage withradius:(cgfloat)blurradius tintcolor:(uicolor *)tintcolor saturationdeltafactor:(cgfloat)saturationdeltafactor maskimage:(uiimage *)maskimage notice tintcolor , saturationdeltafactor params.

MVC application using Spring -

Image
i developed spring mvc application 2-3 years ago. need develop web application , thought using spring mvc. have build application using jsp, spring controller , spring service (and hibernate), , deploy in wildfly application server. i started eclipse mars sts plugin , way used develop spring mvc application stated "legacy": this way used create filesytem: is mvc spring , old technology? have migrate spring library?

ios - Using Modal View Controller with UITabBarController and UINavigationBar -

Image
my application embedded within uitabbarcontroller , has 4 tabs. 3 of 4 tabs embedded within uinavigationcontrollers , other not. i have found if viewcontroller has navigationbar , using present view controller modally when segueing, , presenting controller has define context selected modal view appears underneath both navigationbar , uitabbar . if define context is not selected modal view displayed above uinavigationbar still underneath uitabbar . so, the problem here because modal view controller presented underneath uitabbar user can still access uitabbar , change tabs before dismissing results in black screen. however if presenting view controller has not got uinavigationbar , has not got define context selected modal view controller take whole view , displayed above uitabbar . means user cannot switch tabs before dismissing modal view. intended effect after, how can achieve when using uinavigationbar user cannot switch tabs ? if you've creat

ruby - Database Cleaner unable to detect ORM in Rails application -

the error below displayed when $ rspec executed: no known orm detected! activerecord, datamapper, sequel, mongomapper, mongoid, moped, or couchpotato, redis or ohm loaded? (databasecleaner::noormdetected) this snippet spec_helper.rb file: config.before(:suite) databasecleaner.strategy = :transaction databasecleaner.clean_with(:truncation) end the rails application in question uses activerecord orm , documentation database cleaner states checks activerecord first. the rails version application 5.0.0.beta2 . what cause of error , how can fixed? the cause: the error caused absence of model. because there no model, no orm has been specified application. result, databasecleaner cannot choose appropriate strategy. solution at least 1 model should created. can done via rails generate scaffold or rails generate model commands.

database design - What frameworks/db offer a good solution for content-based filtering? -

Image
let's have 700 000 observations of products have attributes, lets call them tags. and lets have userx. want implement simple content-based filtering method: rank products based tag count / relevance. lets userx has preference for: - yellow - price (0-15) - brandname to recommendation, 1 need go on 700.000 observations (can done in nosql database normalization setting through tags, still can lot observations when there multiple tags involved), , count number of tags present in product. what framework or method use quickly? i.e. outcome within couple of seconds? some things thought were: pure nodejs server pure python server neo4j graph database, not sure how relations implemented in setting? do product "observations" include user purchases/interactions? if so, in graph database neo4j model data this: here have user purchased product, product has 1 or more tag attributes. generate content based recommendation use cypher query this: match (u:

android - PreferenceActivity with Navigation Drawer Throws Null Pointer Exception -

i had preferenceactivity working fine. then, decided add navigation drawer it, , edited layouts according other activity layouts have working navigation drawers. however, after doing that, preferenceactivity stopped opening , started throwing npe on start. can't open activity anymore. problem in oncreate, obviously, , in onclick method stated in logcat. yet, there 2 onclick's in activities oncreate, , i'm not seeing how result in npe, since exact same in other working activities. layout xmls seperated 3 xmls according default drawerlayout implementation. without further due, here codes , xmls: preferenceactivity: public class firstyearcoursesactivity extends preferenceactivity implements navigationview.onnavigationitemselectedlistener { private appcompatdelegate mdelegate; toolbar toolbar; @override protected void oncreate(bundle savedinstancestate) { getdelegate().installviewfactory(); getdelegate().oncreate(savedinstancestate); super.oncreate(sav

git is not recognized as an internal or external command windows - already tried to change the environment variable -

i got following error, git not recognized internal or external command, operable program or batch file. read in forums need add /bin & /cmd paths 'system variable' i've done still running same error. restarted computer. ideas? had same issue , had setup environment variables still not able use git command window . finally worked when added path variable value to c:\program files\git\cmd instead of c:\program files\git\cmd this populated automatically if select option of use git command prompt shown below during installation process . enter image description here

mongodb - Insert multiple documents referenced by another Schema -

i have following 2 schemas: var schemaone = new mongoose.schema({ id_headline: { type: string, required: true }, tags: [{ type: mongoose.schema.types.objectid, ref: 'tag' }] }); var tagschema = new mongoose.schema({ _id: { type: string, required: true, index: { unique: true } }, // value name: { type: string, required: true } }); as can see, in first schema there array of references second schema. my problem is: suppose that, in backend server, receive array of tags (just id's) and, before creating schemaone document, need verify if received tags exist in database and, if not, create them. after having tags stored in database, may assign received array tags array of created schemaone document. i'm not sure on how implement this? can give me helping hand? so lets assume have input being sent server resolves this: var input = { "id_headline": "title", "tags": [ { "name": "one&

python - Uses for Nested Classes -

in scenarios nested classes useful, used lot in django, class signupform(forms.modelform): class meta: model = signup fields = ['full_name','email'] but think same can achieved using other structures,so gain when use nested classes? thanks django unusual. you see, django makes heavy use of behind-the-scenes feature called metaclass . in python 2, nested class cleanest , straightforward way of providing metaclass information isn't strictly part of class itself, such model form based on. in python 3, possible metaclass accept additional keyword arguments, this: class foo(bar, baz=qux): ... those arguments passed directly metaclass constructor, , cleaner syntax nested class. i not know whether django plans adopt syntax, backwards compatibility reasons, unlikely nested class syntax ever go away entirely.

scroll - CSS - Can't get overflow:hidden to work when overflowing on right or bottom -

i have created template contains panel , content. depending on template's class (top, left, right, or bottom) panel have different position. expand , collapse animations performed using transition , classes. edit: here fiddle: http://jsfiddle.net/ckkvx/2/ /edit here html code: <!doctype html> <html> <head> <link href="../css/reset.dev.css" type="text/css" rel="stylesheet"> <link href="../css/v_paneltemplate.dev.css" type="text/css" rel="stylesheet"> <script src="../js/jquery-1.9.1.min.js" type="text/javascript"> <script src="../js/v_paneltemplate.dev.js" type="text/javascript"> </head> <body class="paneltemplate bottom"> <div class="panel autohide collapsed">panel</div> <div class="content expanded">content</di

laravel 5.1 - Artisan error doesn't show line number -

i'm writing console command laravel 5.1 app. while developing, i'm having error somewhere. when artisan reports error, doesn't give me line number or file; error in shell highlighted in red background: [errorexception] undefined variable: answerer how artisan show me more information error occurred, line number , file? since first hit in google me, reply here. managed find solution issue. add -v option artisan getting stacktrace, including line number. php artisan -v survey:complete in case.

java.lang.NoClassDefFoundError in LWJGL when attempting to run in Eclipse -

so i'm moderately novice programmer, after toiling on error while, can't find solution. i'm making puzzle game, , reason, refuses run now. error: exception in thread "main" java.lang.noclassdeffounderror: not initialize class org.lwjgl.system.library @ org.lwjgl.system.memoryaccess.<clinit>(memoryaccess.java:22) @ org.lwjgl.system.pointer.<clinit>(pointer.java:24) @ org.lwjgl.glfw.glfw.<clinit>(glfw.java:594) @ graphics.launchwindow.run(launchwindow.java:32) @ graphics.launchwindow.main(launchwindow.java:96) eclipse tells me none of code has errors within it, , reinstalling lwjgl doesn't work (i tried both stable 3.0.0b build 64 , nightly 3.0.0 build 22). have seen other similar questions taking making sure lwjgl.jar in class path, i've made sure multiple times. also, if matters, have lwjgl_util.jar , slick_util.jar in class path well, , though outdated compared lwjgl 3, removing them class path makes no differ

How do I change the max value of the progress bar to the number that the user input in the textbox? c# -

how set maximum value of progress bar value input user in textbox on windows application form? here current code. need max value value input. need print current time , date. private void btnprognum_click(object sender, eventargs e) { progbarnum.maximum = 10; backgroundworker1.workerreportsprogress = true; backgroundworker1.runworkerasync(); } private void backgroundworker1_dowork(object sender, doworkeventargs e) { int = 1; int endprog = convert.toint32(txtnumprog.text); while (i <= endprog ) { system.threading.thread.sleep(500); backgroundworker1.reportprogress(i); i++; } } private void backgroundworker1_progresschanged_1(object sender, progresschangedeventargs e) { progbarnum.value = e.progresspercentage; lbloutprog.text = datetime.now.tostring(); } } private void btnprognum_click(object sender, eventargs e) { int n = int.parse(txtnumprog.text);

javascript - How do I check my condition on an if statement to see if it is working correctly? -

i'm trying make type of circular display cycles through series of values moving text elements within svg file. uses hammer.js library , uses drag event. values can go in either direction. have working degree. last value shown array, goes beginning of array first values. or vice-versa. var keyarray = ["c","c#","db","d","d#","eb","e","f","f#","gb","g","g#","ab","a","a#","bb","b"]; this array. here how wrap past end of array , beginning. ** per request of few commenters , suggested solution nina, have modified code below reflect suggestions. have added few more lines clarity of happening overall.** var delta = keyarray.length - 5; // can constant, positive for(i=0;i<5;i++){ //5 svg text element containing 5 musical keys keys = document.getelementbyid("keys"+i); //ev.deltax cha

Swift: Cannot subscript a value of type 'Array' -

Image
i have started learning swift ios development. encountering problem not able solve. can please tell doing wrong? image below contains screenshot of error. class viewcontroller: uiviewcontroller { @iboutlet weak var tableview: uitableview! @iboutlet weak var daypicker: uipickerview! @iboutlet weak var addbutton: uibutton! @iboutlet weak var textfield: uitextfield! let days = ["sunday","monday","tuesday","thursday","friday","saturday"] // creates array of 7 empty arrays var tabledata:array = [[string]] (count: 7,repeatedvalue:[]) override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } @ibaction func addobjecttotable(sender: anyobject) { if(textfield.text != "")

ruby on rails - How can I show the average rating in index page? -

currently, average rating in show page. but how show average rating in index besides each surf school's name? i'm having trouble because on index, use @surf_school.each |surf_schools|. the code below code showing average rating in show page. surf_schools_controller.rb class surfschoolscontroller < applicationcontroller before_action :authenticate_user!, except: [:index, :show] before_action :surf_school_find, only: [:show, :edit, :update, :destroy] before_action :correct_user, only: [:edit, :update, :destroy] def index @surf_schools = surfschool.all end def new @surf_school = current_user.surf_schools.build end def create @surf_school = current_user.surf_schools.build(surf_school_params) if @surf_school.save redirect_to surf_schools_path else render 'new' end end def show if @surf_school.surf_school_reviews.blank? @average_surf_school_review = 0 else @average_surf_school

oracle sql query statement NVL not working as desired -

i trying learn oracle sql , below query. wanted print everyone's manager , if doesn't manager should return "no one". problem: getting blank statement instead of "no one". help? select nvl(m.first_name || ' ' || m.last_name, 'no one') || ' supervises ' || w.first_name || ' ' || w.last_name employees w, employees m w.manager_id = m.employee_id(+); nvl(m.first_name||''||m.last_name,'noone')||'supervise ------------------------------------------------------ james smith supervises ron johnson ron johnson supervises susan jones ron johnson supervises fred hobbs supervises james smith this because of reason, when m.first_name , m.last_name null manager, m.first_name || ' ' || m.last_name not result in null, ' '. so, print space instead of 'no one'. can achieve desired results using nvl2 select nvl2( m.first_name ||m.last_name , m.first_name || ' ' |

Android EditText bottom line color and theme changes -

Image
hello need remove edittext default style want remove selected portion both side on focus of edittext or on normal edittext want simple black line on normal edittext , blue line on focus i have created 1 xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"><shape android:shape="line"> <!-- draw 2dp width border around shape --> <stroke android:width="1dp" android:color="@color/blue" /> </shape> <!-- overlap left, top , right border using background color --> <item android:bottom="1dp" > <shape android:shape="rectangle"> <solid android:color="@color/white"/> </shape>

node.js - How to deploy Node Js ,Express,and Mongo DB app to the Windows server 2012 R2 -

i have created app using express,node.js,and mongo db.i want deploy on windows server 2012 r2.please let me know process. i use iis node hosting node.js applications in iis on windows . installation process straightforward, yet, if questions, please install sample projects described on product repo or refer iis node howtos i use configuration mentioned sql (for moment). hope helps.

javascript - jQuery table sorter is not working -

javascript function , files sorting function don't know why not working. these files inside page page: <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="js/jquery.tablesorter.min.js"></script> this js function: <script type="text/javascript"> $(function(){ $('#keywords').tablesorter(); }); </script> this flight table not sorting data has 2 rows: <table id="keywords" class="flight_details" align="center" cellspacing="" cellpadding="20px" style="border-collapse: separate; border-spacing: 0px 5px;"> <tr style="border:1px;"> <th style="width:15%" align="center"> </th> <th style="width:15%; text-align:center"> <font color="04bbcd"> de

swing - How Do I display info from my database to a jtable in java? -

java code: private void adduseractionperformed(java.awt.event.actionevent evt) { try{ class.forname("com.mysql.jdbc.driver"); conn = drivermanager.getconnection("jdbc:mysql://localhost/mypos","root",""); statement stmt = (statement)conn.createstatement(); string fname = fld_fname.gettext(); string lname = fld_lname.gettext(); string role = cmb_role.getselecteditem().tostring(); string uname = fld_username.gettext(); string pass = fld_password.gettext(); string add = "insert admin (firstname, lastname, role, username, password) values('"+fname+"', '"+lname+"', '"+role+"', '"+uname+"', '"+pass+"');"; stmt.executeupdate(add); conn.close(); joptionpane.showmessagedialog(this,"personnel added",&quo