Vote count: 0 Is there any function that can be used to select all data(strings) from a field? E.g. when you want to delete all the data from a field, and you manually select it and press delete. I am currently doing this with DoubleClick() and Backspace key, but if the string contains spaces(e.g. "This is a string") it will only select the first word. asked 7 mins agomhd Let's block ads!...
ادامه مطلبVote count: 0 I noticed that json has format like this: { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "310230", "properties": { "name": "XXX District", "cp": [141.5637,61.5383 ], "childNum": 1 }, "geometry": { "type": "Polygon", "coordinates": [.....] } } ] } How to get the value of [features:properties:name](here is "XXX District") when mouse overring an point within corresponded admin subdivision? asked 1 min agoAlex Luya Let's block ads!...
ادامه مطلبVote count: 0 I have a dictionary like so: { 'cost' : cost, 'oLen' : oLen } I write this to file so the file contains: {'oLen': 32, 'cost': 2048} Later, I do this: with open('conf.conf') as f: config = json.loads(f.read()) print config['oLen'] And get this: ValueError: Expecting property name: line 1 column 2 (char 1) If I change json.loads to json.dumps, I get: TypeError: string indices must be integers, not str edited 1 min ago asked 4 mins agoAurora 3 Answers Vote count: 1 You need to use dou...
ادامه مطلبVote count: 0 i have a data,i want show only 1 data, from json data don't know, show only 1 data. i want copy this data to my page. This is my code json.php This my data like this Array ( [rajaongkir] => Array ( [query] => Array ( [origin] => 501 [destination] => 114 [weight] => 1700 [courier] => jne [service] => REG ) [status] => Array ( [code] => 200 [description] => OK ) [origin_details] => Array ( [city_id] => 501 [province_id] => 5 [province] => DI Yogyakarta [type] => Kota [city_name] => Y...
ادامه مطلبVote count: 1 I have a class named Order shown below. class Order{ private int id; private String name; private String amount; //getters and setters } Using Spring security, I need to be able to control the data that is being retued as a response from Spring Controller. For say, Admin can view all the data of Order, but customer can see only name and amount. How can I filter the JSON data with Spring Security. asked 2 mins agoRaghavendra Let's block ads!...
ادامه مطلبVote count: 0 I need a default text for a spier where values in the spier are from database,fetching all details from database into spier by using arrayadapter,but im not able to apply default text like Select Size for it. Isaw many posts ,but i didnt find one which has same requirement, help me please :( Here is the code String siz =feedObj.getString("P_Size"); Size=(Spier)findViewById(R.id.size); if(siz!= null && !siz.isEmpty()) { String[] seperatedsize = siz.split(", "); ArrayAdapter spiersiz...
ادامه مطلبVote count: 0 import urllib import twurl import json import sqlite3 TWITTER_URL = 'https://api.twitter.com/1.1/friends/list.json' co = sqlite3.coect('spider.sqlite3') cur = co.cursor() cur.execute("' CREATE TABLE IF NOT EXISTS Twitter (name TEXT, retrieved INTEGER, friends INTEGER)"') while True: acct = raw_input('Enter a Twitter account, or quit: ') if ( acct == 'quit' ) : break if ( len(acct) < 1 ) : cur.execute('SELECT name FROM Twitter WHERE retrieved = 0 LIMIT 1') try: acct = cur.fetchone()...
ادامه مطلبVote count: 0 I have a Yaml file and a list of [thomas] ids corresponding to my Yaml file (thomas: -third row down on the file). Below is just a small snippet of the file. - id: bioguide: C000858 thomas: '00246' lis: S215 govtrack: 300029 opensecrets: N00002091 votesmart: 53288 icpsr: 14809 fec: - S0ID00057 wikipedia: Larry Craig house_history: 11530 name: first: Larry middle: E. last: Craig bio: birthday: '1945-07-20' gender: M religion: Methodist terms: - type: rep start: '1981-01-05' end: '19...
ادامه مطلبVote count: 0 I am a newbie, I am using openweather API for calling current location.In JSON parsing, I saw "dt": 1457852143 (UTC/unix) which means last updated.So in my app, I stored that value in String variable and got the output screen but I am unable to convert it to local time(or System Time) and want to show in Textbox. I have no idea whether it is long or string or other.Any suggestion would be highly appreciated I am using Android Studio 1.5 And I am using Async Task asked 27 secs agoCy...
ادامه مطلبVote count: 0 hi everyone i am facing a issue where list view is not reading the complete data from the JSON but if i uninstall and re-install the app its reading the complete data at that time please help me i am unable to move forward from past 3 days please any one help me out JSON:https://www.courtbuddy.com/jsons/chathome.php?sid=1213&rid=1256 Message.Java public class Messages extends Activity { ListView chatview; List chatdata; public int APP_REFRESH_TIME_IN_SEC = 5; Button sendbutton; Edi...
ادامه مطلبVote count: 0 When a user get a push notification and open the app via the notification the user should be redirect to a special ViewController (aPostViewController). The ViewController (aPostViewController) I want the user to be redirected can be pushed on by another ViewController. In the push notification userInfo there is some data I also want to send to the aPostViewController. The data I want to send to the aPostViewController is an id. The id should be use to fetch a Post from my database...
ادامه مطلبVote count: 0 im trying to get data from access to a combobox1 but its not working. my database is a .accdb file. my table name is "list". the columns names are: "ID_lista" = autonumber "Nome" = smalltext "Link" = hyperlink here is the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace teste_pwd { public partial class Form2 ...
ادامه مطلبVote count: 0 I am done with my carting part and now I am in the checkout part. My code is fine but what I want to insert the user_id of the current user in the checkout table in my datbase. Here is some part of my code. The customer_id must be the users_id from the users table. I am just a rookie in this area and I don't have idea to do this. THANKS...
ادامه مطلبVote count: 0 Hello every one im having some problem in leaing java programming. im a new bie and i starting a java programming using mvc + dao because i heard is a very good method. i all ready success creating coection class `/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package mirsuma.service; import com.mysql.jdbc.Coection; import com.mysql.jdbc.jdbc2.option...
ادامه مطلبVote count: 0 this is my first question, so I apologize if I mess up the formatting or do this wrong in general, feel free to give me pointers, I'm always open to lea. Anyway, my issue at hand is that I have a web application I'm working on using ASP.NET 5 and MVC 6, all up to date, and so far for testing, I've been using the localdb and working with fake data. Now, I have a url, with an API token, and login info, and I am using a WebRequest to get the data and stream it with a StreamReader into...
ادامه مطلبVote count: 0 Been tasked with changing some code to do a new task but unsure how to go about it as I'm pretty new to VBA. I have an access table called Stock , with columns PartNo, Remark, ProdDesc, Price, cusDesc. I have a excel spreadsheet with the same columns that have selected items from the Access table which have had their prices updated. Below is code that I am trying to adapt to allow me to import updated items new prices to the table while keeping the other items intact. Currently thi...
ادامه مطلبVote count: 0 I am generating 10 multiple series in one chart, by-default two series are kept visible others are hidden, others are displayed when clicked on buttons respectively. But the problem is "On hover data is being fetched only from last rendered series", I want to fetch data from series on which i hover. Code to fetch data is this: var $reporting = $('#hist_riskvalue'); /*HTML Div where data will be displayed*/ var $reporting2 = $('#hist_gindex'); /*HTML Div where data will be displayed...
ادامه مطلبVote count: 128 Everyone runs into syntax errors. Even experienced programmers make typos. For newcomers it's just part of the leaing process. However, it's often easy to interpret error messages such as: PHP Parse error: syntax error, unexpected '{' in index.php on line 20 The unexpected symbol isn't always the real culprit. But the line number gives a rough idea where to start looking. Always look at the code context. The syntax mistake often hides in the mentioned or in previous code lines. C...
ادامه مطلبVote count: 0 I am trying to get chart data from json file. Using it fist time so keeping it copied from high chart documentation. But it is not working. Json: [ { "name" : "Asia", "data" :[4502, 635, 809, 947, 1402, 3634, 5268] }, { "name" : "Africa", "data" : [106, 107, 111, 133, 221, 767, 1766] }, { "name" : "Europe", "data" : [163, 203, 276, 408, 547, 729, 628] }, { "name" : "America", "data" : [18, 31, 54, 156, 339, 818, 1201] }, {"name" : "Oceania", "data" : [2, 2, 2, 6, 13, 30, 46] } ] Sc...
ادامه مطلبVote count: 0 I am working on an API that is pulling data from an xml file then decode it into json, how would the store method look like in the controller? I have tried storing the json into my DB with code below, but i cant get to a point were the json gets saved into the DB public function store(Request $request) { $fileContents = file_get_contents('/path/to/my.xml'); $simpleXml = simplexml_load_string($fileContents); $json = json_encode($simpleXml, true); Vacancy::create($json); } This is my...
ادامه مطلب