Posts

python - Is there any way to choose if a default parameter is used for a function? -

for example: def tune(a=2,b=3,c=4): return str(a) + " " + str(b) + " " + str(c) print tune(5, *default*, 7) so output be: 5 3 7 what put in place of *default* make happen? use default named arguments. explicitly mention c has take value of 7 >>> print tune(5, c= 7) 5 3 7

radgrid - telerik GridEditCommandColumn + pass row index to another page -

i have web form, mypage.aspx , use radgrid bind data entity data model using linq entities query. in radgrid have 2 columns data entities model , "edit" column ( telerik:grideditcommandcolumn ). when click on edit want pass id specific record in new page, mydetailspage.aspx . in page want edit specific row , save record. want pass id query string mypage.aspx mydetailspage.aspx . need pass id in linq entities query in mydetailspage.aspx in order retrieve data. in mydetailspage.aspx page have 2 textbox web server controls need bind values columns "systemname" , "title" mypage.aspx . thanks <mastertableview editmode="editforms" allowfilteringbycolumn="false" allowsorting="false" datakeynames="id" autogeneratecolumns="false"> <columns> <telerik:gridboundcolumn datafield="systemname" ...

java - networking javaSE applications -

this db class javase application. public class db { static connection c; public static connection get_connection() throws classnotfoundexception,sqlexception { if (c == null) { string ip = ""; string port = ""; string username = ""; string password = ""; try { bufferedreader br = new bufferedreader(new filereader(system.getproperty("user.home") + "/connectionsettings.txt")); ip = br.readline(); port = br.readline(); username = br.readline(); password = br.readline(); br.close(); } catch (exception e) { e.printstacktrace(); } class.forname("com.mysql.jdbc.driver"); c = drivermanager.getconnection("jdbc:mysql://" + ip + ":"+port + "/mydb", username,...

javascript - What it the right way to be noticed when an element with specific directive attribute has been removed from DOM? -

i'm trying find way noticed in case element added , removed dom. in case element removed need ng-model value of element. for example: <div tell-me-when-removed ng-model="sometitle"></div> <a ng-click="removethedivabove()"></a> i'm trying "sometitle" you can use scope.$on('$destroy', function() { //your stuff here });

javascript - Handsontable is having issues - single row with readonly cells -

i'm using handsontable in project. working till last week. last 2 days not working (displaying single row readonly cells). i don't know issue , ensure didn't change in code. hot = new handsontable(document.getelementbyid('scid'), { rowheaders: true, mincols: 23, maxcols: 23, columnsorting: true, colheaders :['issuercode','productcode','componentcode','variantcode','platform','trackingcode','medicalplancode','pharmacyplancode','avvalue','metalliclevel','riders','network','scidstatus','contributionamountmin' ,'contributionamountmax','hiosdescriptor','hiosreason','linkedhios','caseeffectivedate','georating','discontinuedate','newexisting','note'], minsparerows: 1 }); anyone me resolve issue? ...

mongodb - How to create a website with a searchbar to query a mongo database? -

i have large mongodb database set , trying create website user can use searchbar query database remotely , have results posted on site (strictly read-only). i have experience databases data analysis, have never created website querying results. i'm don't have experience web development , don't know platforms (php? node.js?) use. thanks in advance. there following steps problem: create front-end, consist of html, css, , javascript. beginners find easiest work jquery , jquery ui, because well-documented , contain plugins possible scenarios (they should not, however, used create large complex applications!). bootstrap or foundation can html / css. create (probably) json api, front-end can communicate submit searches , retrieve results. use php, python, ruby, or many other languages this. simple site 1 you're describing, it's more matter of preference else. translate search request front-end mongodb query apis, , return results through api. use m...

tcp - Android How to Configure XMPP Conference - Chat room -

i developing 1 chat application , not work properly, giving different-differet error 406 or 407 , please advice me following code proper or not , first login when application start : public void loginwithuser() { thread t = new thread(new runnable() { @override public void run() { saslauthentication.unregistersaslmechanism("org.jivesoftware.smack.sasl.javax.sasldigestmd5mechanism"); smackinitialization initialization = new smackinitialization(); xmpptcpconnectionconfiguration.builder config = xmpptcpconnectionconfiguration.builder(); config.setsecuritymode(connectionconfiguration.securitymode.disabled); config.setservicename(constants.service); config.sethost(constants.host); config.setport(constants.port); config.setresource("myresource"); config.setdebuggerenabled(true); config.setkeys...