Posts

php - Login problems in android: fields are returning empty -

i creating , android application our thesis. i'm finished app when started having problems login. fields accepting input when try toast it, sends me "fields empty" response when send data server. got stuck working on this, appreciated. this jsonparser class: public class jsonparser { static inputstream = null; static jsonobject jobj = null; static string json = ""; // constructor public jsonparser() { } // function json url // making http post or mehtod public jsonobject makehttprequest(string url, string method, list<namevaluepair> params) { // making http request try { // check request method if(method.equals("post"){ // request method post // defaulthttpclient defaulthttpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(url); httppost.setent...

machine learning - difference between Latent and Explicit Semantic Analysis -

i'm trying analyse paper '' computing semantic relatedness using wikipedia-based explicit semantic analysis ''. one component of system described therein i'm grappling difference between latent , explicit semantic analysis. i've been writing document encapsulate understanding it's somewhat, "cobbled together", sources don't 100% understand, i'd know if i've come accurate, here is: when implementing process singular value decomposition (svd) or markov chain monte carlo machines, corpus of documents can partitioned on basis of inherent characteristics , assigned categories applying different weights features constitute each singular data index. in highdimensional space difficult determine combination of factors leading outcome or result, variables of interest “hidden” or latent. defining set of humanly intelligible categories, i.e. wikipedia article pages basis comparison [gabrilovich et al. 2007] have devised system whereb...

go - Template layouts in revel -

is possible use template layouts in revel. example have root.html contains {{define "main"}}{{end}} tag. call executetemplate(out, "main", nil) http://golang.org/pkg/html/template/#template.executetemplate something c.renderlayout() you can define want conf/routes file. can call action name want: package controllers import ( "github.com/revel/revel" ) func (c name) root() revel.result { c.render() } views/name/root.html other way can this: views/controler/nameaction.html {{template "root.html" .}} views/root.html <p>bla, bla</p>

php - How to pass arrays and nested arrays from Controller to Javascript in View in Yii framework -

i have array in controller , nested arrays inside result of query database. want pass data javascript ajax , update content on site when check checkbox. pls show me example or give me advice how it. controller public function actiontestresponse(){ $id = $_post['id']; $checkval = $_post['checkval']; $this->layout = 'newhome'; $criteria=new cdbcriteria(); if($id == 'checkfemale'){ $criteria->compare('sex', 'female'); } else if ($id == 'checkfemale'){ $criteria->compare('sex', 'male'); } $items = user::model()->findall($criteria); //if($items==null||empty($items)){$items='null';} //$response = array('id'=>$id, 'checkval'=>$checkval, array('data' => $items)); $response = array('id'=>$id, 'checkval'=>$checkval); //$d...

java - JavaFX : Consuming REST service and displaying the data in front-end -

i working on javafx(on jdk8 scenebuilder) project should connect spring-mvc based server , access objects server , display it. have programmed spring server give desired object upon request, unfamiliarity in ui programming , javafx making bit difficult. in fxml file, have added grid-pane , display objects there. appreciate guys started up. have basic code, pasting below : canvas.fxml : <?xml version="1.0" encoding="utf-8"?> <?import javafx.scene.control.*?> <?import java.lang.*?> <?import javafx.scene.layout.*?> <?import javafx.geometry.insets?> <?import javafx.scene.layout.gridpane?> <?import javafx.scene.control.button?> <?import javafx.scene.control.label?> <gridpane maxheight="-infinity" maxwidth="-infinity" minheight="-infinity" minwidth="-infinity" prefheight="400.0" prefwidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns=...

python - how to search efficiently items in the list? -

i have list of dicts: [ {"num": 60, "name": "a"}, {"num": 50, "name": "b"}, {"num": 49, "name": "c"}, ... etc ] and list created this: [[x, {}] x in xrange(0, mylist[0]['num'])] list: [..., [50, {}], [51, {}], ... , [60, {}], ..., [65, {}], ... etc] and this: [..., [50, {"num": 50, "name": "b"}], [51, {}], ..., [60, {"num": 60, "name": "a"}], ..., [65, {}], ... etc] how it? in question, wrote and this: [..., [50, {"num": 50, "name": "b"}], [51, {}], ..., [60, {"num": 60, "name": "a"}] the accepted answer gives different, i'd add answer more faithful original request. this answer based on observation wrote xrange(0, mylist[0]['num']) leading me think topmost number in list in first position, , further...

dynamics crm 2011 - How to insert line breaks into Dialog response default values -

Image
on final page of dialog i'm designing want have multiple line text box acts template user has input on rest of dialog them alter/ add other comments create body email. put line break in between each field make bit more readable. any body know how put line break in on default value? you cannot in standard dialogs. dialogs designed facilitate relatively straightforward data entry scenarios. more sophisticated wizard designs can built custom html dialogs (using web resources).