Posts

java - Jackson error : unacceptable character '' (0x0) special characters are not allowed -

i'm trying parse yaml data using jackson mysql error saying there special character. error : com.fasterxml.jackson.databind.jsonmappingexception: special characters not allowed [source: java.io.stringreader@5528a42c; line: 13, column: 68] (through reference chain: com.app.resultcontentmodel["opinion"]) ... caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.yamlexception: special characters not allowed @ [source: java.io.stringreader@5528a42c; line: 13, column: 68] ... caused by: unacceptable character '' (0x0) special characters not allowed in "'reader'", position 1027 my dependencies file : <dependency> <groupid>mysql</groupid> <artifactid>mysql-connector-java</artifactid> <version>5.1.6</version> </dependency> <dependency> <groupid>com.fasterxml.jackson.dataformat</groupid> <artifactid>jackson-dataformat-yaml...

select - Need Simple Query in Sql server -

my criteria: i have distributor (parent table), has many retailer (child table). need last joined retailer name. i.e distributor list | total no. retailer | last joined retailer name my query : select distname, count(retailername) totalretailer, max(retailername) lastposted, max(lastjoinretail) lastjoindate distributor d right outer join retailer r on d.distno = r.retailno , r.status = 0 , d.status = 0 group distname..... i not getting last joined "retailer name"?. select [distributor_name] , [total_no._retailer] , [last date] , (select name tbl_retailer [last date] = createddate) [last joined retailer name] ( select d.name 'distributor_name' ,count(r.name) 'total_no._retailer' ,max(r.createddate) 'last date' tbl_distributor d inner join tbl_retailer r on d.id = r.distributorid gr...

How can I replace a character in mongodb with another character in a collection? -

i have collection contains documents having delimiter "|". { "_id" : objectid("57bbe4342a00d122b0075fbb"), "phone_search" : "9255958588|9138115601|9034223813", "address" : "central complex market|rohtak road|sonipat|rohtak road-131001|sonepat|haryana", "national_catidlineage_search" : "/10255012/|/10406930/", "area" : "rohtak road", } is there command in mongodb can replace "|"s ","s documents in collection? this question answered here how replace string in documents in mongo // change 'collection' name yours in db.collection.find , db.collection.update: var cursor = db.collection.find(); while (cursor.hasnext()) { var x = cursor.next(); print("before: "+x['phone_search']); x['phone_search'] = x['phone_search'].replace('|', ...

android - Difficulty to set latitude & longitude in marshmallow in url & displaying item -

Image
difficulty set latitude & longitude in marshmallow in url & displaying item. setting latitude & longitude in url after hitting url want information on basis of hitting url . while did not set lat & long in url dynamically . list coming image while have set lat & long manually in url when hitting url use below code progress bar loader moving not getting list . i setting lat & long in url dynamically . please see error in code not getting in marhsmallow nothing getting while below marshmallow getting loader moving , moving . see in image public class listviewactivity extends activity implements locationlistener { // log tag private static final string tag = listviewactivity.class.getsimplename(); // change here url of server api // private static final string url = "https://comida-95724.herokuapp.com/api/v1/restaurants?per_page=5&km=1&location=true&lat=19.0558306414&long=72.8339840099"; private pro...

perl - Use of uninitialized value in concatenation (.) or string at App/DuckPAN/Web.pm line 484 -

i trying develop instant answer goodie duckduckgo. using codio , after testing code, when try run webserver @ port 5000, error: ddg::zeroclickinfo { parents www::duckduckgo::zeroclickinfo public methods (4) : does, has_structured_answer, new, structured_answer private methods (0) ...

python bs4 find return none -

i learning python web scraping,i practice on http://search.proquest.com/ , site need purchase think universities have it. from urllib.request import urlopen urllib.request import urlretrieve bs4 import beautifulsoup import urllib.error import http.cookiejar import requests import pymysql conn = pymysql.connect(host ='localhost',user = 'root',passwd = 'gaojia',db = 'mysql') cur = conn.cursor() # cur.execute("create database wsj") cur.execute("use wsj") # cur.execute("create table wsj.list (id int not null auto_increment, url varchar(255) not null, title varchar(1000) , abstract varchar(20000),created timestamp not null default current_timestamp, primary key (id))") issues = set() # store url of desired issues articles = set() # store url of articles of given issue def store(title,abstract,url): cur.execute("insert pages (title,abstract,url) values (%s,%s,%s)",(title,abstract,url)) cur.connection.co...

python - Event when entry's xview changes -

i creating simple program using tkinter . want function called every time xview property of entry changes. there doesn't seem event this, @ least not 1 can find. the <configure> event fires on resize, handled, doesn't fire when actual value i'm tracking changes in different way, such user dragging mouse see end of entry. here code: import tkinter tk import tkfiledialog root = tk.tk() class repositoryfolderframe(tk.frame): def __init__(self, root): tk.frame.__init__(self, root) self.build_gui() self.set_entry_text("searching...") #root.after(0, self.find_repo) self.prev_entry_index = len(self.entry.get()) root.bind("<configure>", self.on_entry_resize) #self.entry.bind(???, self.on_entry_change) #self.entry.bind("<configure>", self.on_entry_change) def on_entry_resize(self, event): cur_entry_index = self.entry.xview()[1] if ...