fetch

Accessing data in retrieved Managed Object with Core Data

穿精又带淫゛_ 提交于 2019-12-24 15:33:38
问题 I'm trying to access a data in the retrieved Managed Object. Xcode giving me error "Cannot subscript a value type "[AnyObject]?" with an index of type 'int'". Doesn anybody know what I should do to? Thank you This is my method which saves data and which is called from my viewDidLoad method: // save data func saveData (jmeno:String, adresa:String, telefon:String) { // delegate let delegate = UIApplication.sharedApplication().delegate as! AppDelegate // managed object context let

Fetching data from a site requiring POST data?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 12:01:24
问题 There's a very simple website containing just a few elements of which I'd like to retrieve a table. Previously I've used file_get_contents('http://www.example.com') for this exact purpose and extracted the piece of information I needed through explode and str_replace commands, which worked fine. However, this website requires POST data before it will display the table I require. I know only the name and id of the select boxes through which the data is submitted, as well as the 'option value'

JQuery FullCalendar not displaying events from aspx page

送分小仙女□ 提交于 2019-12-24 11:27:38
问题 I have implemented JQuery FullCalendar by fetching the events dynamically from an aspx page. But it is not displaying the events on the calendar. But if I manually add the page response to the events attribute, it works fine. Can anybody please help what would be the issue? Here is my code. $('#calendar').fullCalendar({ theme: true, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, //events: "GetCalendarEvents.aspx?id=2612&role=supervisor" --->not

Use fetch_column and fetch(PDO::FETCH_ASSOC) together?

梦想的初衷 提交于 2019-12-24 08:53:19
问题 I will admit php is a new language to me. Now I can get each of these working individually. In my prepare query SELECT * FROM... will allow my PDO fetch assoc while loop to work, but then fetch column doesn't work. And then I use SELECT COUNT(*) my fetch column works but then my fetch assoc doesn't. So Is there away around this so both will work? As I need the fetch column to return how many rows there are as an integer value (1 or 0) to determine if the user has entered log in information.

How to wait for this fetch JSON request before proceeding to the welcome intent <speak> command

ε祈祈猫儿з 提交于 2019-12-24 08:24:28
问题 I'm trying to use fetch to get a json object, and this does work correctly. Then I'm assigning a string based on the data and want to use that string in the ssml response...doing it the way I have it now it is about 300 ms too slow and the var is undefined, if I try to place the ssml response elsewhere in this code it comes up with an error "No response has been set". Can anyone point me in the right direction, I've literally been on this issue for 5 days in a row (already gave up on

Why is Fetch API call not returning the response headers?

。_饼干妹妹 提交于 2019-12-24 06:58:41
问题 I'm building a SignUp form and have the following API call to POST the form: const request = new Request('http://localhost:4300/auth/', { method: 'POST', headers: new Headers({ 'Accept' : 'application/json', 'Content-Type' : 'application/json', }), body: JSON.stringify({ user: data }) }); fetch(request).then(response => { console.log(response); const auth = response.headers.get('Authorization'); console.log(auth) }); The problem is response.headers.get('Authorization') is returning as null .

Why doesn't a browser run a <script> in an HTML fragment retrieved via fetch API? [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 06:23:33
问题 This question already has answers here : Can scripts be inserted with innerHTML? (18 answers) Closed last year . I was experimenting with getting a fragment of HTML using the fetch API, and then adding it to an HTML page. While this works fine for HTML content, I noticed that if I put a <script> tag in the fragment, the tag isn't stripped out, but it also isn't executed. Below is an example. I would expect the alert to fire, but it doesn't, even though the script tag appears on the page. My

Is there a functional equivalent to mysqli_fetch_all in PHP 5.2?

核能气质少年 提交于 2019-12-24 05:46:07
问题 So, I am a total n00b at PHP (and back-end programming in general), but I never the less decided I wanted to build a functioning database that users could search client-side as th final project for my first web dev class. Anyway, I made my site and database on a localhost, and though it took a while, I got everything functioning perfectly. When I tried to move it to my webhost, however, everything started breaking because, previously unbeknownst to me, the webhost is using PHP 5.2. I've been

fetch() POST request to Express.js generates empty body {}

六眼飞鱼酱① 提交于 2019-12-24 03:36:19
问题 Goal: send some defined string data from HTML in a fetch() function e.g. "MY DATA" My code: HTML <!DOCTYPE html> <html> <body> <script type="text/javascript"> function fetcher() { fetch('/compute', { method: "POST", body: "MY DATA", headers: { "Content-Type": "application/json" } } ) .then(function(response) { return response.json(); }) .then(function(myJson) { console.log(myJson); }); } </script> </body> </html> Server.js var express = require("express"); var app = express(); var compute =

PHP script to grab entire line

本秂侑毒 提交于 2019-12-24 03:35:16
问题 Thank you for taking the time to read this and I will appreciate every single response no mater the quality of content. :) I'm trying to create a php script which searches a text file for specific text. A person types in the specific text within a HTML form and the php script should search for that specific text within the text file. The value of the input field of the HTML form is "username" and within the php document, the variable "$username" is the entered data, example shown below: