back soft

مطالب مرتبط با «accessing data from json» در back soft | نویسنده: استخدام کار

Highchart - series[](name,data) as json from controller. How to assign to Highchart series?

Vote count: 0 Model: public class TemperatureData { public string name { get; set; } public double[] data { get; set; } } Controller: [HttpPost] public ActionResult GetData() { var json = ""; try { List PlotData = new List(); PlotData.Add(new TemperatureData { name = "Tokyo", data = new double[] {7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6} }); PlotData.Add(new TemperatureData { name = "New York", data = new double[] {-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14....

ادامه مطلب

Getting image id from SQL dataBase ind setting it in imageView( Android)

Vote count: 0 I want to get image id from sql database and put it in imageView through RecyclerViewAdapter . Unfortunately I have got no luck until now. -once I tried to put the ids in an array and getting number of array from database and calling the related array, but app force closed. -another time I tried to get the id from database but again it didn't work and app force closed. Who knows what is the correct way? thanks in advance. asked 1 min agomohamad Let's block ads!...

ادامه مطلب

update data in one table with the values from another table

Vote count: 0 I have 2 tables, shows and show_photo shows structure: show_photo structure: What i want to do is update show_photo.modified column with show.yearThis is what i tried but nothing gets updated. UPDATE show_photo t2 JOIN shows t1 ON t1.id = t2.show_id SET t2.modified = t1.year; asked 44 secs agopedja Let's block ads!...

ادامه مطلب

Excluding unwanted names from json with jq

Vote count: 0 Suppose I curl a json file, like so: curl https://api.github.com/repos/ruby/ruby/tags -o ruby.json I can then run cat ruby.json | jq '.[0] | .tarball_url' and get the latest tarball for Ruby. However, I'd like to not fetch any tarballs that are previews of Ruby or contain something like "yarv_migration_base". Is there a way to exclude data using jq? asked 1 min agoAvery Magnotti Let's block ads!...

ادامه مطلب

How can I get the value from json url

Vote count: 0 I am using AngularJS and I want to get the value of the price dynamically I mean to get it from a url json data. Is this possible ! This is the url json : url And this is my controller : angular.module("myApp",['zingchart-angularjs']).controller('MainController', ['$scope', '$http', function($scope, $http) { $scope.cities =[{ "name": "city A", "elements": [{ "id": "c01", "name": "name1", "price": "15",//I want to get this price from the url json: [url][1]. Get it from the value of ...

ادامه مطلب

share one sqlite database from headless and main app blackberry 10

Vote count: 0 I want to share one sqlite db from headless and main app on Blackberry 10 OS. On the main app, I setup the db like this QString dataFolder = QDir::homePath(); QString newFileName = dataFolder + "/myapp.db"; QFile newFile(newFileName); if (!newFile.exists()) { // If the file is not already in the data folder, we copy // it from the assets folder (read-only) to the data folder // (read-write) QString appFolder(QDir::homePath()); appFolder.chop(4); QString originalFileName = appFolder...

ادامه مطلب

ember-data with customization for use with non-JSONAPI service

Vote count: 0 I am a bit confused and just need some clarity: Should I be implementing a custom adapter or a custom serializer? I need my ember app to talk to a REST/json backend. I want my ember app to expose the resource as: GET /locations/:id But the host it coects to has the resource located at: GET http://server/api/location/:id Payload from the server: { "id": "7ff3269e-d16c-4cc4-954d-aef8e662e0f6", "geo": { "latitude": 0, "longitude": 0 }, "typedAddress": { "addressType": "US", "countryCo...

ادامه مطلب

Parse Json in Logic App from Stream Analytics -> Service Hub -> Logic Apps

Vote count: 0 I'm trying to build a logic app that inserts data into a Sql database. The data is coming from s Stream Analytics job, outputting it on a Service Bus topic, consumed in Logic Apps in Service Bus trigger. To populate the properties of the row inserted (lets say it only has one column 'Name'), I've found that this should work using following syntax: "body": { "Name": "@{json(decodeBase64(triggerBody()['ContentData'])).Name}" }, Provided the message body contains a 'Name' property. Ho...

ادامه مطلب

How to detect duplicate keys during map construction from JSON in clojure

Vote count: 0 I am using http://clojure.github.io/data.json/ read-str to read swagger (https://openapis.org/specification) documents for semantic validation. One of the things to validate is no duplicate paths. For example: /foo/{bar}/baz is a duplicate of: /foo/{dup}/baz However, if the swagger file containts two "literal" identical paths: /foo/bar/baz : ... ... /foo/bar/baz : ... When I use read-str, the last one "overwrites" the first one, so I can't see the dup - it is just dropped. Is there...

ادامه مطلب

Unable to delete table from sqlite database in iOS

Vote count: 0 I have written a delete query in applicationDidEnterBackground Appdelegate METHOD. But when i stop the simulator it does not delete the database table. I want to delete the database tables when the app enters in the background or when the app terminates. Here is my applicationDidEnterBackground METHOD for delete table query. - (void)applicationDidEnterBackground:(UIApplication *)application { sqlite3 *database; NSArray * dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDire...

ادامه مطلب

How to connect a postrgresql database instance from aws rds to django code in an aws ec2 insatnce

Vote count: 0 I have an ec2 instance ruing a djngo application, and for the database i've an AWS-RDS postgresql. So how can I coect my database to the django application asked 1 min agoNijo Let's block ads!...

ادامه مطلب

How to sort inner object while parsing json data with gson

Vote count: 0 I have two classes. Class SubCategory public class SubCategory implements Comparable{ private int scid; private String scname; public SubCategory(int scid, String scname) { this.scid = scid; this.scname = scname; } public int getScid() { retu scid; } public void setScid(int scid) { this.scid = scid; } public String getScname() { retu scname; } public void setScname(String scname) { this.scname = scname; } public int compareTo(SubCategory subCategory){ retu this.getScname().compareT...

ادامه مطلب

how to remove a pandas dataframe from another dataframe

Vote count: 0 how to remove a pandas dataframe from another dataframe, just like the set subtraction: a=[1,2,3,4,5] b=[1,5] a-b=[2,3,4] and now we have two pandas dataframe, how to remove df2 from df1 In [5]: df1=pd.DataFrame([[1,2],[3,4],[5,6]],columns=['a','b']) In [6]: df1 Out[6]: a b 0 1 2 1 3 4 2 5 6 In [9]: df2=pd.DataFrame([[1,2],[5,6]],columns=['a','b']) In [10]: df2 Out[10]: a b 0 1 2 1 5 6 then we expect df1-df2 result will be In [14]: df Out[14]: a b 0 3 4 how to do it? thank you. ask...

ادامه مطلب

how to pass data from one view to another view in SAPUI5

Vote count: 0 Master Details Template When click on Master[list] it will navigate to detail page with table data, Suppose four column are there & In last column "Add" Button is there, * Now what I want is, on click that "Add" button that row data will bind direct in cart view * Cart view is on Master page with icon asked 1 min agomkraj Let's block ads!...

ادامه مطلب

What is the URL of the google chrome new tab page and how to exclude it from manifest.json

Vote count: 0 I am currently building a simple google chrome extension to prank my brother. The Extension simply deletes the old page and replaces it with HTML and CSS copied off of the "You have no inteet" page, In essence making the user think they don't have inteet when they do. The following is the content script injected into all new pages: var hed = document.head; var bod = document.body; document.head.parentElement.removeChild(document.head); document.body.parentElement.removeChild(docume...

ادامه مطلب

parsererror SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Vote count: 0 I hava an ajax function : $.ajax({ url: 'my.php', type:'POST', dataType: 'json', data:{switch:9}, error: function(data,e,f){ alert("Error : "+e+" "+f); console.log(JSON.stringify(data)); }, success:function(data){ if(data.length!=0){ // getting the data from the array $.each(data, function(k, v) { // set the data from database to input box $("input[name='fname']").val(v['fname']); $("input[name='bname']").val(v['bname']); $("input[name='address']").val(v['address']); $("input[name=...

ادامه مطلب

Reading data from a text file into a 2D array and getting out of bounds exception

Vote count: 0 I've been having trouble with reading data in from a text file to a 2D array. I am not too sure what the issue with the out of bounds exception is because I thought I initialized it correctly but I am not sure. Here is my code. String [][] f_team = new String [20][6]; //20 and 6 int cnt = 0; int cnt2 = 0; String line = ""; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); loadData(); } public void loadData() { try { BufferedReader br...

ادامه مطلب

Calculate vertical acceleration from sensor data

Vote count: 0 I'm using Sensor.TYPE_LINEAR_ACCELERATION and Sensor.TYPE_ROTATION_VECTOR to read the rotation vector and accelerometer values from the device's sensors. Now, I want to use this data to calculate the vertical acceleration of the phone - i.e. regardless of how the phone is rotated, I want to be able to read the acceleration in the up/down direction relative to the ground. How can I accomplish this? asked 2 mins agoBadCash Let's block ads!...

ادامه مطلب

How Show Data in view from rails model with react

Vote count: 0 I have rails model which i created with rails g resource Post title:string body:text I wan't to create react component and render my react component on Posts/index.html.erb. How i can do that? I use react-rails gem already asked 2 mins agoCihan Zengin Let's block ads!...

ادامه مطلب

Issue with translating strings pulled from database [Laravel, October CMS]

Vote count: 0 I am developing a plugin that integrates with an exteal CRM and enables automatic page generation from database records. I have an issue while figuring out the translation scheme for this plugin. This is my current flow: Save values from an exteal XML to local DB Get values from Database Create new page for each seperate array object and display these values on the front-end. Lets say I want to display the estate's type of this object. I would use this code:{{ realEstate.type|raw }...

ادامه مطلب