Vote count: 0 I'm trying to retu information from my api but I don't understand how to correctly use subscribe. With an array I retu an empty array from my service and push values into it as I get them. How would I correctly retu just a single value variable in app-component ts. Right now If I do a alert(JSON.stringify(authenticated)) it just gives me {"_isUnsubscribed":false,"_subscriptions":[{"isUnsubscribed":false}]} app-component ts checkAuthentication(){ var authenticated = this._authService.getAuthenication(); } authentication Service getAuthenication() { retu this._http.get('auth.php').subscribe(res => { if (res.json().authenticated === true){ retu true; } retu false; }); } auth.php a...
ادامه مطلبVote count: 0 I have Matlab R2014b installed. Also Microsoft Visual studio professional 2013 with update 4 installed. mex -setup has configured to use 'Microsoft Visual C++ 2013 Professional (C)' for C language compilation. But when I compile yprime.c in C:Program FilesMATLABR2014bexteexamplesmex, I get the following: mex yprime.c Building with 'Microsoft Visual C++ 2013 Professional (C)'. Error using mex There is no description of Error. When I do mex -v yprime.c I get a long listing as follow: Verbose mode is on. Neither -compatibleArrayDims nor -largeArrayDims is selected. Using -compatibleArrayDims. In the future, MATLAB will require the use of -largeArrayDims and remove the -compatibleA...
ادامه مطلبVote count: 0 Suppose i have an array looklike this var users = [ { 'users': [{user:'harry',user:'potter',user:'jiy',user:'weasly'}], 'age': 36, 'active': true }, { 'users': [{user:'brad',user:'pit',user:'angelena',user:'joly'}], 'age': 40, 'active': false } ]; From this i want to select json with condition users object match multiple values eg: if the names are harry and angelena the output becomes this { 'users': [{user:'harry',user:'potter',user:'jiy',user:'weasly'}], 'age': 36, 'active': true }, { 'users': [{user:'brad',user:'pit',user:'angelena',user:'joly'}], 'age': 40, 'active': false } Eg: if the name is harry output becomes this { 'users': [{user:'harry',user:'potter',user:'jiy',use...
ادامه مطلبVote count: 0 Is there any possibility to keep in the directory only raw .ts and .html files? For example, in the folder ./rawapp I hold uncompiled ts files, that will be compiled and stored in the ./app directory. I tried to modify tsconfig.json file by adding "outDir": "app/","flags, but it applies only to .ts files. Alteatively, is there any possibility to hide in the sublime text's open dirs bar files other than .ts & .html? It is damn not comfortable to look at the 3 files instead of one. asked 44 secs agouser3054208 This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-o...
ادامه مطلبVote count: 0 I have a bug on my website and I really don't know how tu debug it : http://goo.gl/EKcVSo The page load a bit and then freeze (sometimes the whole browser !). It may be because of the multiple iframes loaded or maybe a function wich interrupt the page loading. I don't know how to debug that and discover wich function is causing the freeze. Even with the console logs :/ Thanks for your help :) asked 3 mins agoFixxit This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: -1 I have an array which contains 4 different objects and looks like this: [ { a: 1, b: 12, c: 3 }, { a: 15, d: 1, e: 8 }, {b: 2, d:6 }, {a: 1} ] I want to retu one object with the sum of each object's values added together. I am looking to retu the following object: {a: 17, b: 14, c: 3, d: 7; e: 8} I have attempted many different solutions, and also checked here for which I surprisingly could not find a solution. This was as close as I found, but could still not solve the issue. asked 3 mins agoPaul Fitzgerald This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-...
ادامه مطلبVote count: 0 my first post so be gentle... I have a PHP contact form where on a php page (contact.php) On clicking the send button the data goes to the send.php script to be validated. If passes validation, the user views a sent.html page where the message "Your Message Has Been Sent - Thank You" is displayed $message = "Your Message Has Been Sent - Thank You"; include "sent.html"; However if validation fails, for example, if a field is left blank the validation fails the send & the $message is displayed on the within the form, back on the on the contact.php... if ((!$fname) OR (!$lname) OR (!$email) OR (!$enquiry)) { $message = "ERROR: ALL FEILDS MARKED * MUST BE COMPLETED"; include "conta...
ادامه مطلبVote count: 0 I have a php page to create an excel file and save it to a folder. I start from a page where user click on a button to start the script. My goal is to perform the following steps: run the script in another window (I am now using a small popup); when the script ends close the popup and in the main window display an alert to say that execution is ok; on alert close refresh the file list displayed in the main window. I know how to do all these stuffs but one: how can i trigger any event (popup close and alert) when in the popup the script ends? My actual code for the popup is the following: $('#elabora').click(function(e){ e.preventDefault(); var data = $('#data_rif').val(); if (d...
ادامه مطلبVote count: 0 I'm using GS 32bits with the wrapper for C# . This line works : GhostscriptSharp.GhostscriptWrapper.GeneratePageThumb("a.pdf" , "a.jpg", 1, 100, 100, 50, 50); But this line doesn't work GhostscriptSharp.GhostscriptWrapper.GeneratePageThumb("a.pdf" , "C:\a.jpg", 1, 100, 100, 50, 50); How GS handle the in/out path ? asked 2 mins agoMickaël B. This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I've got a small test script in grails, but I do not manage to run it. The script looks like this. scripts/Test.groovy includeTargets...
ادامه مطلبVote count: 0 have node-red ruing with arduino analogue output through serial to pi, where I'm collecting thermistor data as a msg payload on change. Trying to tu the Arduino signal into a Temperature - it's the most common 10K enamelised thermistor that adafruit sell. So quite useful code. The issue is that I am a total noob at JS. Here's my code so far - using a function node - and trying to replicate the steinhart equation (https://lea.adafruit.com/thermistor/using-a-thermistor) var input = { payload: msg.payload }; var R0 = 10000; var R = R0 / ((1023 / input)-1); var T0 = 273 + 25; var B = 3950; var T = 1 / ( (1/T0) + (1/B) * Math.log(R/R0) ); retu T; asked 39 secs agomdk This entry pass...
ادامه مطلبVote count: 0 Please give me feedback on is there any possible way to obtain dynamic auto complete without Jquery and render the data from an XML. asked 30 secs agoMAINAK BHATTACHARYA This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I am currently do a form page on a tabular form and I detect when a change has been made to the form. If a change has been made to a form and you submit the page (either cancel button or choosing a filter), a confirm box appears which asks you if you want to continue since you will lose all unsaved changes. Now if the user selects Ok, he continues with the page submit. If the user selects cancel the page submission stops. This is where I need help because the filter that starts the page submit process does not go back to its original value, and the tabular form does not filter. Where I am at: I am currently getting the original value of the filter before the page submit request...
ادامه مطلبVote count: 0 Need help in below: I know it's quite big in text, but if you could read it's understandable. I'm having this file cat myfile.txt XSAP_SM1_100 COR-REV-SAPQ-P09 - 10/14/2013 - SCHEDULE XSAP_SM1_100#COR-REV-SAPQ-P09 TIMEZONE Europe/Paris ON RUNCYCLE RULE1 "FREQ=WEEKLY;BYDAY=WE" EXCEPT RUNCYCLE CALENDAR2 FR1DOFF -1 DAYS EXCEPT RUNCYCLE SIMPLE3 11/11/2011 AT 0530 : XSAP_SM1_100#CORREVSAPQP09-01 AT 0640 TIMEZONE Europe/Paris XSAP_SM1_100#CORREVSAPQP09-02 AT 0645 TIMEZONE Europe/Paris I'm taking the data range after the ':' by using awk 'BEGIN {p=0} {if ($0==":") {p=p+1} else {if (p>0) {print $0} } } END {print ""}' . So I get the required data starting from after : So here I'm fetch...
ادامه مطلبVote count: 0 This question is some what related to Why is typescript failing to import a module?, which I asked yesterday. The initial setup is the same. I have a simple typescript file like this: /// 'use strict'; import * as y from 'js-yaml'; console.log(y); When I compile like so tsc --module commonjs file.ts, typescript is happy. But, when I move the /// reference below the 'use strict', like this: 'use strict'; /// import * as y from 'js-yaml'; console.log(y); Typescript is not happy: $ tsc --module commonjs file.ts file.ts(4,20): error TS2307: Caot find module 'js-yaml'. Typescript does indeed output a compiled file and it is the same as the one output originally, except of course tha...
ادامه مطلبVote count: 0 I have a simple table, however my table has php includes in the td. These include statements are dropdowns that create another table of data when clicked How can I write a javascript function to capture that data. Table1 asked 4 mins agoAidan G 73 This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلب