Posts

Proper include design practice in PHP -

Proper include design practice in PHP - i've started working on larger preexisting code base of operations (php) , has come attending lot of these files utilize includes/requires in unreadable way. includes/requires sort of cascade through file system, because every file in scheme includes/requires file called common.php. mutual file includes/requires every other file, seems when developer in doubt, included/required mutual , called good. this written professional web developers, , i'm still student, i'm curious if mutual practice in php. in php should there mutual file includes/requires everything, should each file included/required case case, or there different way mutual practice? on side note: i'm trying switch out api file new 1 (while keeping old compatibility testing), , hard me tell files utilize new api or old one. generally, includes should used view based material (html, smarty, perhaps xml or xslt) in mark used build view in mvc a...

Ogre Error In Cmake -

Ogre Error In Cmake - while implementing cmake in code getting ogre error: /usr/bin/ld: cannot find -logre my cmakelists.txt file looks like: #specify version beingness used aswell language cmake_minimum_required(version 2.6) #name project here project(ecad) #sets cmake run moc when needed set(cmake_automoc on) #find requirements of projects find_package(qt5widgets) find_package(qt5core) find_package(ogre) find_package(ois) # find includes in corresponding build directories set(cmake_include_current_dir on) #sends -std=c++11 flag gcc compiler add_definitions(-std=c++11) qt5_wrap_ui(cmake_form_hdr resources/ui/mainwindow.ui) #this tells cmake main.cpp , name ecad add_executable(ecad main.cpp ${cmake_form_hdr}) #include subdirectory containing our libs add_subdirectory (gui) include_directories(gui) #link_libraries target_link_libraries(ecad qt5::widgets qt5::core ogre ois) i new this. please help me out solve problem the command find_package(ogre) ru...

google cloud messaging - Send message from Server to Android device and vice versa -

google cloud messaging - Send message from Server to Android device and vice versa - i want implement chat application. have few questions, not solve searching internet. my requests are: of course of study can address each device individually server (makes sense chat app) i can create time delay between sending , receiving message the application should not require registration (this not must, nice) i wonder if gcm (google cloud messaging) appropriate solution me. have not yet worked it, have help. run troubles this? , important: registration required? you run troubles surely, gcm not creating chat applications . need xmpp.gcm kind of thing used broadcasting messages,which not guarantee delivery of messages instantaneously i.e real time requiring. see too: android , xmpp: available solutions android google-cloud-messaging

windows - How to execute a PostGre exe file with silent mode? -

windows - How to execute a PostGre exe file with silent mode? - hy, i install postgresql 9.1 on windows server 2012. want used powershell script. jdk executables file, utilize start-process "myfile" -argumentlist "/s" -wait argument \s don't work postgre executables file. have thought ? you can utilize install-postgres powershell module, it's on technet gallery. the install-postgresql powershell module following: creates local windows user postgresql use downloads postgresql installer provided enterprisedb installs postgres unattended using supplied parameters sets postgres windows user owner of postgres files , folders sets postgres windows service run under postgres local user creates pgpass.conf file in appdata copies configuration files info directory opens supplied port postgresql utilize in windows firewall usage import-module install-postgres install-postgres -user "postgres" -password "changeme!" ...

shell - Javascript to load putty to a specific ssh host -

shell - Javascript to load putty to a specific ssh host - i trying create website has links , depending on links load putty ssh connection specific host. ( used internally , ie 6) so far have ignore host <script language="javascript"> function connection(host) { oshell = new activexobject("wscript.shell"); oshell.run("putty.exe -ssh" + host + "22"); } </script> <a href="javascript:connection('@1.1.1.1')"> connection 1 </a> i managed perform need <script language="javascript"> function connection(host) { var oshell = new activexobject("wscript.shell"); oshell.run('"c:\\archivos de programa\\putty\\putty.exe" -ssh '+ host +' 22'); } </script> <a href="javascript:connection('@1.1.1.1')"> connection 1 </a> i needed pass location of putty executable (with escaped chars) adding spaces...

javascript - directive communication and coupling -

javascript - directive communication and coupling - i have 2 directives, dropdown , panel. panels contain dropdowns. using require : "^panel", , specifying controller, can create both communicate. you can see illustration here http://plnkr.co/edit/rqbsz26jiqkzfmrpbmkd?p=preview class="snippet-code-html lang-html prettyprint-override"> <!doctype html> <html ng-app="app"> <head> <script data-require="angular.js@*" data-semver="1.3.0-rc2" src="https://code.angularjs.org/1.3.0-rc.2/angular.js"></script> <link rel="stylesheet" href="style.css" /> <script src="script.js"></script> <script> angular .module("app", []) .controller("ctrl", function($scope) { $scope.test = "welcome" }) .directive("dropdown", function() { home...

javascript - setTimeOut function not working as expected -

javascript - setTimeOut function not working as expected - i having hard time settimeout function .let me show code first. here code :- function submitform(loginurl, username, password) { seek { loc = new string(window.location); document.forms.frm_login.action = junctionurl; document.forms.frm_login.username.value = username; document.forms.frm_login.password.value = password; document.forms.frm_login.submit(); settimeout(gotohomepage,4000); } grab (e) { alert(e.message +"submit form"); } } function gotohomepage() { alert("test"); var url = "test.aspx"; window.location=url; } but here gotohomepage function not @ triggered after specified 4 seconds. what doing wrong here.please suggest . any help appreciated. thanks form submission redirecting result page unload ing current page. so, timer doesn't tick. use ajax or set targ...