Posts

Showing posts from July, 2012

How to configure the new Azure App service instead of Mobile Service From Android? -

Image
i used azure mobile services android app using url , api key sql database access,but mobile app services no longer available. please me how configure new app services android app. code used mobile service config azure android app : // mobile service url , key mclient_user = new mobileserviceclient( "https://****.azure-mobile.net/", "******************", this).withfilter(new progressfilter()); link referred migration according document, migrating service changes underlying environment hosts mobile backend. requires no code changes either mobile client or mobile server project. if use automated migration option, preserves service.azure-mobile.net url. specially per issue, please check following points: data scripts in mobile services have been changed easy tables in mobile apps, please follow https://azure.microsoft.com/en-in/documentation/articles/app-service-mobile-migrating-from-mobile-ser

How to encode string (use encrypt MessageDigest in Java) to Base64 string in swift? -

in java, used this: public void encryptdata() { string data = "hello world"; messagedigest md = null; try { md = messagedigest.getinstance("md5"); } catch (nosuchalgorithmexception e) { e.printstacktrace(); } if (md == null) { return; } md.update(data.getbytes()); string dataencoded = base64.encodetostring(md.digest(), 11); return dataencoded; //print: sqqnswtgdueft6mb5y4_5q } how do have same results in swift? updated: func test() -> void { var data: string = "hello world" data = md5(data) data = base64encode(data) print("data = \(data)") //yjewythkyje2nguwnzu0mta1yjdhotliztcyztnmztu= } md5 , base64encode function used md5 here , base64 here any hints helpful. your code not produce expected result because referenced md5() function returns message digest hex-encoded string, base64 encoded. instead of string -> utf-8 data -> md5

c++ - disable gcov coverage at run-time -

i'm writing test in c++ , i'm using gcov (actually lcov think it's beside point) informations coverage. is there way disable information record @ run-time? e.g. : bool mytest() { objecttotest obj; /* enable gcov... */ obj.functiontotest(); /* ...disable gcov */ if(obj.getstatus() != whatever) return false; else return true; } in case gcov display "covered" functiontotest leave objecttotest constructor , getstatus "uncovered". thanks in advance! no, in case of gcov don't have such option. i have seen such options in coverage tools clover works instrumenting source code directly though. beside solution problem write part of code different source file , call inside desired source file including it. suggesting because when generate coverage report later using lcov or gcovr both provide option exclude specified files coverage report passing them flags. lcov: -r tracefile pattern

phpoffice - How can I read .doc file and get particular words from it in php -

i want read doc file , result it. for example: if have file - file.doc and has like resume name: john carter address: usa i working php developer then want like: array( 'name' => john carter 'address' => usa ) and reject additional info it. is possible? i have tried phpoffice can't related need. we can whole file data can't recognize whatever want. i need similar abbyy gives image text. please me. php docx reader: convert ms word docx files text class can convert ms word docx files text. it can extract files compressed microsoft word file in docx format. the class can parse document xml file , extract text contains. refreance question : https://stackoverflow.com/a/19503654/5212418

tsql - SQL - Group Value Column A, Only show in Column B has different values -

i trying write query keep eye out when same email address or telephone number being used postcode different. i have table below: ref@ | pcode | email ---------------------------------- lyjx01 | b99 1aa | this@that.com lyjx02 | b98 1aa | this@that.com lyjx03 | b92 1dd | this@that.com ahsf01 | b91 2bb | my@email.com i want pull out records this@that.com because have multiple different postcodes associated email address. in ideal world postcode should unique email address if postcode ever different wish pull policies. i have far written this: select pr.b@, pr.ref@, pr.pcode, pr.email dbo.ic_daprospect pr pr.email in ( select email dbo.ic_daprospect pr group pr.email having count(*) > 1 ) all doing though pulling records have multiple lines same postcode , email address exists more once. how go showing have instances of postcode changing? cheers. try below along requirement should exclude records email id , code combination same. select * dbo.i

sql - Raw data before each group by -

which queries should execute in order show raw data before every group row? there way that? user receiptno price ----- ---------- ------ 876 100 877 50 **150** b 960 60 b 961 40 **100** most database support standard group modifiers such rollup or grouping sets . if so, can do: select user, receiptno, sum(price) price t group grouping sets ((user, receiptno), (user));

python 2.7 - OpenERP - How to change end of the workflow? -

i need add new " approval" node end of existing workflow , make end. please please me that the workflow new node , transition <?xml version="1.0" ?> <openerp> <data> <!-- workflow definition 1. draft->submitted (no signal) 2. submitted->accepted (validate signal) if not double_validation 2. submitted -> first_accepted (validate signal) if double_validation 2. submitted->refused (refuse signal) 3. accepted->refused (refuse signal) 4. first_accepted -> accepted (second_validate signal) 4. first_accepted -> refused (refuse signal) 5. accepted -> last_accepted (last_validate signal) 5. last_accepted -> refused (refuse signal) --> <record model="workflow" id="wkf_holidays"> <field name="name">hr.wkf.holidays</field> <field name="osv">hr.holidays

How to escape mysql blank and duplicate data using php -

i using code send data mysql database , functioning though users sending blank data , duplicating too. <?php require "conn.php"; $lostidno = $_post ["lostidno"]; $phonenol = $_post ["phonenol"]; $mysql_qry = "insert lostdb.lost (lostidno, phonenol) values ('$lostidno', '$phonenol')"; if ($conn->query($mysql_qry) === true) { echo "information recieved!"; } else echo "sorry! error occured:" . $mysql_qry . "br" . $conn->error; $conn->close(); ?> how prevent this? you can use trim function remove spaces @ beginning , ending of string. after able check if 2 parameters aren't empty: <?php require "conn.php"; $lostidno = trim($_post["lostidno"]); $phonenol = trim($_post["phonenol"]); if(!empty($lostidno) && !empty($phonenol)) { $mysql_qry = "insert lostdb.lost (lostidno, phonenol) valu

How to create an Azure API App using the .YAML file and Python code? -

one of clients wants host api's in azure, apis developed in python. tried creating azure api app in dot net , getting successful result don't have knowledge of python, can me finding out how can host these python api's in azure? the source file has .yaml file, .py file , .html file. you can confirm customer, whether python apis in complete python web application. there several popular python web frameworks customer may use build apis server, flask, django , bottle. can find document how deploy these application azure web apps @ creating web apps flask in azure , creating web apps django in azure , creating web apps bottle in azure . any further concern, please feel free let me know.

wso2 - Is there a way to turn on global payload compression (gzip) on the ESB or API Manager? -

is there way switch on payload compression on either esb (< 5.0.0) or api manager (< 2.0.0) , application/json content-type ? i have achieved on resource level global option ideal. after research have found following available option in catalina-server.xml : compression="on" & compressablemimetype. this not tomcat servers web interface , not services , axis2 for. after more digging found archived article http://wso2.com/library/3316/ . inside references following : "mc_gzip_response (server, writable) : default http response body not compressed. set message context property true have response body gzip compressed." sounds need , not sure set parameter. thanks "ycr". set me on right path. what did achieve create global custom insequence , outsequence (global extensions) api's deployed inside api manager , mentioned in https://docs.wso2.com/display/am1100/adding+mediation+extensions . the insequence checks value/

java - Custom Object converter JavaFx FXML -

i new javafx 8 , have been jsf/primefaces programmer time now. working on javafx application fxml , mvc pattern. have problem making converters of jpa 2.1 entities in fxml gui , how use them. in jsf/primefaces simple , straight forward , easy integrate special tag converters. wonder if there similar solution javafx fxml. please need help. the closest equivalent describing stringconverter class. built-in cell implementations virtualized controls (e.g. listview , tableview , etc) can configured appropriate instance of stringconverter . additionally, example, textfield (or other text input control) can have textformatter set on it, in turn can instantiated specifying stringconverter instance . so if have entity class myentity , can create string converter: public class myentitystringconverter extends stringconverter<myentity> { @override public string tostring(myentity myentity) { return ... ; } @override public myentity fromstring

excel - Creating a list of ComboBoxes using VBA that update the values of cells specified in the code -

Image
what trying create program adds combo boxes options. these options should then, depending on option selected, change values in cells specify in code. this how make combo lists: private sub workbook_open() worksheets("sheet1").columns("e") .columnwidth = 25 end = 1 6 set curcombo = sheet1.shapes.addformcontrol(xldropdown, left:=cells(i, 5).left, top:=cells(i, 5).top, width:=100, height:=15) curcombo .controlformat.dropdownlines = 3 .controlformat.additem "completed", 1 .controlformat.additem "in progress", 2 .controlformat.additem "to done", 3 .name = "mycombo" & cstr(i) .onaction = "mycombo_change" end next end sub i want each of dropdown values trigger event mycombo_change , change cell "d" example, combo box 3 located @ e3 , want "to done" clear cell d3 , completed store date (and time) cell d3. should done combo boxe

javascript - Faster way of scaling text in browser? (help interpret test) -

i need scale lots of text nodes in browser (support of modern desktop , mobile browsers). if right there 2 options offer performance: scaling text objects in canvas or scaling text nodes in dom using transform:matrix . i have created scenario test both versions results inconclusive. uncomment testdom() or testcanvas() function start test. (i using jquery , createjs framework because convenient. possible use vanilla js don't think bottleneck here). (it matters portion of screen see please switch full screen view in codepen). http://codepen.io/dandare/pen/pejyyg var width = 500; var height = 500; var count = 200; var step = 1.02; var min = 0.1; var max = 10; var stage; var canvas; var bg; var canvastexts = []; var domtexts = []; var dommatrix = []; var dom; function testdom() { (var = 0; < count; i++) { var text = $("<div>hello world</div>"); var scale = min + math.random() * 10; var matrix = [scale, 0, 0, scale, mat

python - How to preserve keys with capital letters read from a config-file with configparser? -

this question has answer here: preserve case in configparser? 4 answers when reading out config file python's configparser package, key names lowercase strings. know how read strings preserving capital , uppercase words? for example: $cat config.cfg [default] key_1 = someword key_2 = word $ python3 >>> configparser import configparser >>> cf = configparser() >>> cf.read('./config.cfg') ['./config.cfg'] >>> print(cf.defaults()) ordereddict([('key_1', 'someword'), ('key_2', 'another word')]) thanks help! yes, keys automatically transformed lowercase during read/write operations. mentioned in last sentence of the quick start section of configparser docs . to not have effect can set parsers' optionxform (a callable) return option rather transform lowercase:

opencv - EmguCV - Mat.Data array is always null after image loading -

when trying read image file, after load mat.data array alway null. when looking mat object during debug there byte array in data image. mat image1 = cvinvoke.imread("minion.bmp", emgu.cv.cvenum.loadimagetype.anydepth); do have idea why? i recognize question super old, hit same issue , suspect answer lies in emgu wiki . specifically: accessing pixels mat unlike image<,> class, memory pre-allocated , fixed, memory of mat can automatically re-allocated open cv function calls. cannot > pre-allocate managed memory , assume same memory used through life time of mat object. result, mat class not contains data > property image<,> class, pixels can access through managed array. access data of mat, there few possible choices. easy way , safe way cost additional memory copy the first option copy mat image<,> object using mat.toimage function. e.g. image<bgr, byte> img = mat.toimage<bgr, byte>(); the pixe

PHP symfony www.one.com hosting -

this question has answer here: symfony 2 - fatal error: cannot redeclare class sessionhandlerinterface in c:\…\app\cache\dev\classes.php on line 532 7 answers i have working symfony project on linux computer. i'm trying set hosting www.one.com i wrote .htaccess file i'm getting following error: fatal error: cannot declare interface symfony\component\dependencyinjection\containerawareinterface, because name in use in /customers/x/x/x/xxxxxxxxxx.be/httpd.www/var/cache/dev/classes.php on line 6397 can me in write direction? ps: i followed guide http://trac.symfony-project.org/wiki/installingsymfonyonone not seems working. a guide following symfony 1.x , interface mention symfony 2 have mismatch here. try follow this guide (and remember symfony 1.x , 2.x/3.x has nothing in common). and guess: try clear cache on new machine: app/consol

php - Dynamics NAV 2016 Web Service: Parameter * in method * in service * is null -

i try single contact dynamics nav web service (dynamics nav 2016). soap-request in php. the web service codeunit contains 2 functions: fgetcontact(icontactnumber : text[20]) ocontact : text[250] if rcontact.get(icontactnumber) begin ocontact := ''; ocontact := rcontact."no." + ';' + rcontact."company name" + ';' + rcontact."first name" + ';' + rcontact.surname + ';' + rcontact."e-mail"; end; exit(ocontact); fgetcontacts() ocontacts : text[250] if rcontact.get('kt100190') begin ocontacts := ''; ocontacts := rcontact."no." + ';' + rcontact."company name" + ';' + rcontact."first name" + ';' + rcontact.surname + ';' + rcontact."e-mail"; end; exit(ocontacts); the second function, fgetcontacts,

traditional rails commands don't work with ruby 2.3 -

i updated ruby version 2.3, , when try simple commands rails new myapp have error message: rbenv: rails: command not found `rails' command exists in these ruby versions: 2.1.2 2.2.2 can please me that, can't find answer online :) just install rails on new ruby version with: $ gem install rails

html - Absolute path not working in some files -

i've been banging head against wall hour stupid problem. i'm building website , i'm using font awesome. home page of site located in root (/); page called fog.html in /content/books/. font awesome folder (font-awesome-4.6.3) in /fonts/, example fa's fonts in /fonts/font-awesome-4.6.3/fonts/. i reference fa's css home page this: <link rel="stylesheet" href="fonts/font-awesome-4.6.3/css/font-awesome.min.css"> and fog.html this: <link rel="stylesheet" href="../../fonts/font-awesome-4.6.3/css/font-awesome.min.css"> because fog.html 2 directories deeper home. checked inspector , fa's css referenced in both instances. fa's icons visible on home page, blank squares on fog.html. guessed must because fa fonts referenced fa's css using relative paths, , since 2 pages located in different parts of directory tree, relative path type in there take me different places depending on page css reference

sql - how to write a nested case query and get correct results -

i have case query , need in re-writing perfect results. current query follows: case when monthsretrieved <= 6 , monthsretrieved > 0 case when monthssincelastreceipt <= 6 'fast' when monthssincelastreceipt > 6 , monthssincelastreceipt <= 12 'slow' when monthssincelastreceipt > 12 , monthssincelastreceipt <= 18 'very slow' when monthssincelastreceipt > 18 'dead' when openingqty = 0 'new items' when qtyissued = 0 'non-moving' else 'fast' end when monthsretrieved > 6 , monthsretrieved <= 12 case when monthsretrieved <= 12 'slow' when monthssincelastreceipt > 12 , monthssincelastreceipt <= 18 'very slow' when monthssincelastreceipt > 18 'dead' when openingqty = 0 'new items' when qtyissued = 0 'non-moving' else 'slow&

.net - Problems with Ref Keyword in MOQ -

hoping can me. i trying test method (outer method) has dependency class invokes method (inner method). inner method takes boolean ref parameter, , problem far been unable control boolean ref parameter. (note-the code shown below has been written purpose of illustrating problem , not code looks like). the moq documentation here - https://github.com/moq/moq4/wiki/quickstart gives overview of dealing ref/out parms have not found helpful. i tried example works (which found here - assigning out/ref parameters in moq ) public interface iservice { void dosomething(out string a); } [test] public void test() { var service = new mock<iservice>(); var expectedvalue = "value"; service.setup(s => s.dosomething(out expectedvalue)); string actualvalue; service.object.dosomething(out actualvalue); assert.areequal(actualvalue, expectedvalue); } but when tried code want run cannot work. included below. the interface public interface

JSON definition - data structure or data format? -

what more correct? json data structure or data format ? it's ambiguous , depends on interpration of words. the way see it: datastructure, in conventional comp sci / programming i.e. array, queue, binary tree has specific purpose. json can pretty used anything, hence why it's data-format. both definitions make sense

.bat file not working properly, want to keep leading zero -

this question has answer here: dealing octal variables in batch script 1 answer i getting invalid number.numeric constants either decimal(17),hexadecimal(0x11),or octal(021). keeps renaming 20161201_2012312016 though running when should 20160801_20160831. i've pasted code. thanks @echo off set firstday=01 set /a month=%date:~4,2%-1 set month=0%month% set month=%month:~-2% set year=%date:~10,4% if %month%==00 ( set month=12 set /a year=%year%-1 ) if %month%==01 set "lastday=31" & goto foundate if %month%==02 set "lastday=28" & goto foundate if %month%==03 set "lastday=31" & goto foundate if %month%==04 set "lastday=30" & goto foundate if %month%==05 set "lastday=31" & goto foundate if %month%==06 set "lastday=30" & goto foundate if %month%==07 set "lastday=31"

how to format array from string in php? -

i want if first number in string 2 output 2 array. how explode each array string. my code <?php $str = "2,2;2;,1;1;,07-09-2016;07-09-2016;,08-09-2016;10-09-2016;,1;3;,100.00;450.00;"; $data = explode(',',$str); $out = array(); for($i=1;$i < count($data)-1;$i++){ $out[]= explode(';',$data[$i]); } $i = $out[0][0]; foreach ($out $key => $value) { for($a=0;$a < $i; $a++){ echo $value[$a]. "<br/>"; } } ?> i result 221107-09-201607-09-201608-09-201610-09-201613 want format <?php $str = "2,2;2;,1;1;,07-09-2016;07-09-2016;,08-09-2016;10-09-2016;,1;3;,100.00;450.00;"; //format split semicomma ; $arr1 = array('2','1','07-09-2016','08-09-2016','1','100.00'); $arr2 = array('2','1','07-09-2016','10-09-2016','3','450.00'); ?> the php function array_column come in handy here. here short c

sitecore8.1 - Clear all Sitecore Experience Profile data -

i tried removing contacts mongo db robomongo sitecore still lists contacts in experience profile dashboard , when click on each not found error ones deleted. is there way clear experience profile data have on fresh installation? you should follow instructions walkthrough: rebuilding reporting database article. , delete files in sitecore_analytics_index folder

SQL Server return records where the most recent matches the criteria -

this question using sql server. there more elegant way of doing this? considering table mytable (i'm using unix timestamps, i've converted these readable dates ease of reading) id foreign_id date ------------------------- 1 1 01-jul-15 2 2 01-sep-16 3 3 05-aug-16 4 2 01-sep-15 i extract foreign_id recent record's (highest id) date in range, example 1st january 2016 31st december 2016. following works if substituting dates timestamps: select distinct foreign_id mytable l1 (select top 1 date mytable l2 l2.foreign_id = l1.foreign_id order id desc) >= **1 jan 2016** , (select top 1 date mytable l2 l2.foreign_id = l1.foreign_id order id desc) <= **31 dec 2016** that should return foreign_id = 3 . simpler query return foreign_id 2 wrong, has more recent record dated out of above ranges this form part of bigger query assuming sql server

reactjs - creating a login component which will show login error -

i creating login component show login error. don't know how bring errors array _onsubmit function loginform here code code. import react, { component } 'react'; import split 'grommet/components/split'; import section 'grommet/components/section'; import sidebar 'grommet/components/sidebar'; import loginform 'grommet/components/loginform'; //import logo './logo'; import firebase 'firebase'; export default class login extends component { constructor() { super(); this._onsubmit = this._onsubmit.bind(this); this._onresponsive = this._onresponsive.bind(this); this.state = {responsive: 'multiple',errors:[]}; } _onsubmit(fields) { firebase.auth().signinwithemailandpassword(fields.username, fields.password).catch(function(error) { // handle errors here. var errorcode = error.code; var errormessage = error.message; var errors = []; errors.push(errorcode);

sql server - SQL group by in joined tables -

i trying extract data 2 tables of sql server. below query runs out "group by" when try group data b.catdesc , a.fiscal_ year shows below error. error: [ibm][system access odbc driver][db2 i5/os]sql0122 - column country_code or expression in select list not valid. error code: -122 report user select a.country_code, a.book, b.catunitdesc, b.catdesc, b.csku_cc, sum(a.gross_sales), a.fiscal_year, a.fiscal_week, a.fiscal_month, sum(a.gross_costs), sum(a.net_sales), sum(a.net_costs), sum(a.qty_shipped_gross), sum(a.qty_shipped_net) essv11.eudmeas2 join essv11.eudmp1 b on a.sku_cc = b.sku_cc book = 'g21-2014' or book = 'g21-2015' or book = 'g21-2016' , country_code ='gb' grouped b.catdesc, a.fiscal_year; can please help. thanks in advance you need include non-aggregated columns in group by . suggest: select a.country_code, a.book, b.catunitdesc, b.catdesc, b.csku_cc, sum(a.gross_sales), a.fiscal_year, a.fi

android - Databinding Error: old values should be followed by new values. Parameter 2 must be the same type as parameter 3 -

i using data binding custom fields. have set custom data binding adapter this. my binding adapter looks this: @bindingadapter({"created_by,created_at"}) public static void setdetailcreated(textview textview, string createdby, long createdat) { calendar cal = calendar.getinstance(); cal.settimeinmillis(createdat); simpledateformat dateformat = new simpledateformat("h:mm a, dd mmm yyyy"); string format = textview.getcontext().getstring(r.string.details_created, createdby, dateformat.format(cal.gettime())); textview.settext(format); } and in layout file have: ... <data> <import type="java.util.map" /> <import type="com.example.beans.friend" /> <variable name="user" type="com.example.beans.user" /> <variable name="friends" type="map&lt;string, friend&gt;" /> </data>

python - Is there a way to reduce the amount of code for RMSProp -

i have code simple recurrent neural network , know if there way me reduce amount of code necessary update stage. code have for: class rnn(object): def__init___(self, data, hidden_size, eps=0.0001): self.data = data self.hidden_size = hidden_size self.weights_hidden = np.random.rand(hidden_size, hidden_size) * 0.1 # w self.weights_input = np.random.rand(hidden_size, len(data[0])) * 0.1 # u self.weights_output = np.random.rand(len(data[0]), hidden_size) * 0.1 # v self.bias_hidden = np.array([np.random.rand(hidden_size)]).t # b self.bias_output = np.array([np.random.rand(len(data[0]))]).t # c self.cache_w_hid, self.cache_w_in, self.cache_w_out = 0, 0, 0 self.cache_b_hid, self.cache_b_out = 0, 0 self.eps = eps def train(self, seq_length, epochs, eta, decay_rate=0.9, learning_decay=0.0): # other stuff self.update(seq, epoch, eta, decay_rate, learning_decay) # other st

c# - Powershell-string to listview -

i have created c# application that, among other things, should installed programs on remote computer using powershell code. can run code adds items single column in single row , i'm not able scroll in it. can tell me how add each program new row, headers are: program, vendor, version ? here ps1 code: invoke-command -computername $computername -scriptblock { $swinstalled = get-wmiobject win32_product | select @{label="program";expression={$_.name}}, version, vendor | sort-object program $swinstalled | ft } here relevant c# code: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.windows; using system.windows.controls; using system.windows.data; using system.windows.documents; using system.windows.input; using system.windows.media; using system.windows.media.imaging; using system.windows.navigation; using system.windows.shapes; using system.collections.objectmodel; using system

ember.js - Called stop() outside of a test context in Ember acceptance test -

i made first acceptance test ember cli. use ember mirage mock server. test('create file', function(assert){ visit('/login'); fillin('input[name=username]', 'joe'); fillin('input[name=password]', 'foo'); click('button'); andthen(function() { visit('/projects/files'); }); andthen(function(){ assert.ok(true); }) }); the test runs successfully, hangs, , getting following error uncaught (in promise) error: called stop() outside of test context at object.stop ( http://localhost:4200/assets/test-support.js:2469:10 ) @ class.asyncstart ( http://localhost:4200/assets/vendor.js:49507:13 ) @ asyncstart ( http://localhost:4200/assets/vendor.js:41446:44 ) @ object.async ( http://localhost:4200/assets/vendor.js:41460:7 ) @ fulfill ( http://localhost:4200/assets/vendor.js:61624:26 ) @ handlemaybethenable ( http://localhost:4200/assets/vendor.js:61584:9 )

saml 2.0 - Enterprise Single Sign On -

am searching desktop application manage enterprise single sign on (saml v2, identity provider , service provider ) here how achieved in enterprise: there 2 approaches use "windows authentication" can give actual user trying access website. enterprise application ( assuming being hosted on intranet) has integration active directory. user identity can authenticated using ldap server use oauth way , use third party provide identity management. front end calls services generate token. token can sent backend authenticate token against validator service.

How to execute PHP from Java -

i'm trying open console , run php script, after running need print stuff console data java program script, , other way around. i know there questions on here ask kinda same thing, don't mention how variables program script. that sounds terrible idea, judge... can try j-php http://j-php.net in other direction can try http://php-java-bridge.sourceforge.net/pjb/index.php you use ipc (inter process communication). also, if php or python application has output need on java application save in file or in database , read java. difficult without knowing more use case.

angular - Angular2 - Waiting for observable to return with data -

angular2 templates seem fine waiting list return observable this: <li *ngfor="let product of products"> {{product.displayproductname}} </li> ... export class publicproductlistcomponent { errormessage: string; products: products[]; mode = 'observable'; constructor(private productservice: productservice) { } ngoninit() { this.getpublicproducts(); } getpublicproducts() { this.productservice.getpublic() .subscribe( products => this.products = products, error => this.errormessage = <any>error); } } but when tried same thing object ( userdash ), got errors saying object undefined because wasn't waiting subscription find data: <li *ngfor="let prod of userdash.ownedproducts"> {{prod.displayproductname}} </li> ... export class ownedproductlistcomponent { errormessage: string; userdash: userdashboard; mode = 'observ

Access .net DLL from Java -

i new java , dll-s i need access dll's methods java . go easy on me. i have tried using jna access dll here have done. import com.sun.jna.library; public class mapper { public interface mtapi extends library { public boolean isstopped(); } public static void main(string []args){ mtapi lib = (mtapi) native.loadlibrary("mtapi", mtapi.class); boolean test = lib.isstopped(); system.out.println(test); } } when run code, getting following error: exception in thread "main" java.lang.unsatisfiedlinkerror: error looking function 'isstopped': the specified procedure not found. i understand error saying cannot find function, have no idea how fix it. i trying use api mt4api and here method, attempting access mql4 can tell me doing wrong? i have looked @ other alternatives, jni4net , cannot working either. if can link me tutorial shows me how set up, or knows how to, greatfull. trading? huntin