Posts

How to add List<int> to a DataContract of a web service -

i want create datacontract class 2 different list members. when try start web service, error method, sendemail, not supported test wcf client. data contract: [datacontract] [knowntype(typeof(int[]))] public class emailinfo { private string strfromuserid = string.empty; private string strfromaddress = string.empty; private string strfromname = string.empty; private object lstindividualids = null; private object lstgroupids = null; private string strsubject = string.empty; private string strmessage = string.empty; [datamember] public string fromuserid { { return strfromuserid; } set { strfromuserid = value; } } [datamember] public string fromaddress { { return strfromaddress; } set { strfromaddress = value; } } [datamember] public string fromname { { return strfromname; } set { strfromname = value; } } [datamember] public object individualids ...

oracle - add item inside Interactive Report Region -

i need add text box @ top of inetractive report region or between action bar , report itself. tried make irr without heading not successful in either. help you need create dynamic action fired on page load , set execute javascript code posted below: document.getelementbyid('apexir_toolbar').innerhtml = document.getelementbyid('apexir_toolbar').innerhtml + '<label for="p5_x" class="uoptional"></label></td><td align="left" valign="middle"><input type="hidden" name="p_arg_names" value="11759631789729827" /><input type="text" id="p5_x" name="p_t01" class="text_field" style="margin:5px" value="" size="30" maxlength="4000" />'; or using oracle-apex 'jquerysh' notation: $x('apexir_toolbar').innerhtml = $x('apexir_toolbar').innerhtml + '...

javascript - Setting controller attributes inside ajax call -

i new in angularjs , i'm doubt controller attributes. created attribute called anuncio, attribute has array of objects showed in image bellow: var anunciomodule = angular.module('anunciomodule',[]); anunciomodule.controller('registrationcontroller',['$http',function ($http){ this.anuncios; this.loadanuncios = function loadanuncios(){ $http.get('http://localhost:8080/pederofer/anuncios/get.action').then(function(result){ this.anuncios.push.apply(this.anuncios, result.data); }); } }]); when call webservice function loadanuncios , try set values directly using "this.anuncios" message "this.anuncios undefined". if create var called anuncs , set "this.anuncios = anucs", , instead of set ajax call directly this.anuncios set anucs image bellow, works. var anunciomodule = angular.module('anunciomodule',[]); var anuncs =[]; anunciomodule.controller('reg...

ftp - InternetOpenUrl failed: '' download.file in R -

i trying download file following : "download.file(url,"db.zip", "auto", quiet = false, mode = "wb", cacheok = true)" but keep getting error stating in download.file(url, "db.zip", "auto", quiet = false, mode = "wb", : internetopenurl failed: '' i've searched countless places , haven't found valid reason. , says theirs working

java - Is it possible to convert HTML into XHTML with Jsoup 1.8.1? -

string body = "<br>"; document document = jsoup.parsebodyfragment(body); document.outputsettings().escapemode(escapemode.xhtml); string str = document.body().html(); system.out.println(str); expect: <br /> result: <br> can jsoup convert value html xhtml? see document.outputsettings.syntax.xml : private string toxhtml( string html ) { final document document = jsoup.parse(html); document.outputsettings().syntax(document.outputsettings.syntax.xml); return document.html(); }

Create a bash script to compile SCSS into CSS that takes arguments -

how can create bash script compile scss css works different filename , paths? for example i'm running command compile scss file css file in different directory: sass test.scss ../css/test2.css it's tedious run on , on again, can write makes easier? i'm new bash scripting. is looking for? #!/bin/bash f=${1:-test} sass ${f}.scss ../css/${f}.css this script runs sass filename.scss ../css/filename.css . if filename (without extension) isn't set first argument defaults test . can update accept more 1 input file. but not going save time since still have call script instead of sass . replacing command doesn't accomplish anything. use !sass instead rerun last sass command on same file or !! rerun previous command. bash history . how use: save script file, xx . make xx executable: chmod u+x xx run without argument on test: ./xx run filename without extension: ./xx myscssfile here's version take list of filenames input or default tes...

Finding imports and dependencies of a go program -

the go list -json command run command line tell imports , dependencies of go program ( in json format). there way information within go program i.e @ runtime, either running 'go list' command somehow or way? i don't think can without using go binary since go needs analyze source code. it's pretty easy must have access go , source code @ run time. heres quick example: package main import ( "encoding/json" "fmt" "os/exec" ) func main() { cmd := exec.command("go", "list", "-json") stdout, err := cmd.output() if err != nil { println(err.error()) return } var list golist err = json.unmarshal(stdout, &list) _, d := range list.deps { fmt.printf(" - %s\n", d) } } type golist struct { dir string importpath string name string target string stale bool root string ...