Posts

android - ParseCloud httpRequest post exception -

i trying execute http request in using cloud code module parse.com. invoke android app keep getting exception : com.parse.parseexception:java.lang.illegalargumentexception trying execute post command without body parameters. code below , keeps giving me parse.cloud.define('httprequest', function(request, response) { var requestparams = { 'apikey': '{api_key}', 'currency':'gbp', 'locale':'en-gb', 'adults':'1', 'children':'0', 'infants':'0', 'originplace':'11235', 'destinationplace':'13554', 'outbounddate':'2015-08-19', 'inbounddate':'2015-08-26', 'locationschema':'default', 'cabinclass':'economy', 'grouppricing':'true', 'country':'gb...

java - FetchPlan orientDB incorrect results -

Image
i using orient 2.1-rc4, executed following commands: motive fetch outgoing vertices path. 1. correct result simple graph create class depends extends e create vertex set name="persians" create vertex set name="vikings" create vertex set name="teutons" create vertex set name="mayans" create vertex set name="aztecs" select * v \# |@rid|@class|name 0 |#9:0|v |persians 1 |#9:1|v |vikings 2 |#9:2|v |teutons 3 |#9:3|v |mayans 4 |#9:4|v |aztecs create edge depends #9:0 #9:2 create edge depends #9:1 #9:2 create edge depends #9:2 #9:3 create edge depends #9:2 #9:4 select @this.tojson('fetchplan:in_*:-2 *:-1') #9:2 {"out_depends":[{"out":"#9:2","in":{"name":"mayans","in_depends":["#11:2"]}},{"out":"#9:2","in":{"name":"aztecs","in_depends":[...

python - Fail to understand to me strange re behaviour -

can please explain me, why getting different result when remove lines containing '# duplicate'? import re def nysiis(term: str) -> str: """ returns new york state identification , intelligence algorithm (nysiis) code given term """ if not len(term): return '' else: term = term.upper() table = { r'\w+': '', # remove whitespace , non-word characters r'^mac': 'mcc', r'^kn': 'nn', r'k': 'c', r'ph|pf': 'ff', r'sch': 'sss', r'(ee|ie)$': 'y', r'(dt|nd|nt|rd|rt)$': 'd', # on first letter must no longer change. r'(?<!^)ev': 'af', r'(?<!^)[aeiou]': 'a', r'(?<!^)q': 'g', r'(?<!^)z': 's', ...

java - Exceptions with Spring Data Rest -

i'm starting on concepts of microservices springboot , spring data rest me confusing how can few lines of code. my main question is: have entities , repositories, spring data rest "generates" paths post requests, etc. , repository performs correctly. but how exception handling? example, send post without "name" field , accepted but want return error . how do that? entity @document public class veiculo{ @id private string id; @indexed(unique = true) private string nome; private string tipo; @dbref list<contato> contatos; @dbref list<cliente> clientes; public string getid() { return this.id; } public veiculo setid(string id) { this.id = id; return this; } public string getnome() { return this.nome; } public veiculo setnome(string nome) { this.nome = nome; return this; } public string gettipo() { return this...

sql - MYSQL - Combine rows with multiple duplicate values and delete duplicates afterwards -

so have database set single table. in table have collected source url , description (i scraping product description number of pages). unfortunately have ended multiple rows in database url/source page if there more 1 paragraph. what is, if there multiple rows same url, combine description each row , delete duplicate rows url. my table literally structured so: table +----+----------------------------+-------------+ | id | url | description | +----+----------------------------+-------------+ | 1 | http://example.com/page-a | paragraph 1 | | 2 | http://example.com/page-a | paragraph 2 | | 3 | http://example.com/page-a | paragraph 3 | | 4 | http://example.com/page-b | paragraph 1 | | 5 | http://example.com/page-b | paragraph 2 | +----+----------------------------+-------------+ how want like: table +----+----------------------------+-------------------------------------+ | id | url | description...

ruby on rails - how to remove records from the joined table? -

please solve problem. table posts create_table "posts", force: :cascade |t| t.string "title" t.text "body" end table tags create_table "tags", force: :cascade |t| t.string "tagname" end joined table create_table "posts_tags", id: false, force: :cascade |t| t.integer "post_id" t.integer "tag_id" end model post class post < activerecord::base has_and_belongs_to_many :tags end model tag class tag < activerecord::base has_and_belongs_to_many :posts end i need remove of association table posts_tags. i form set id tags: [3, 18, 21] here controller handles set id_tags: def update if @post.update_attributes(post_params) #add_new_tags(@post) p '------------------1' p params['delete_tags'] p '------------------2' destroy_tags(params['delete_tags'], @post) flash[:success] = t :post_up...

unix - Determine Which Hard Drive the Database-Files/Transaction-Files are Stored -

i have old sybase server database acting up. have tried rebuilding file-system , database file. problem returns. want replace hard drive database-files , transaction-files stored. want determine hard drive because not familiar unix. moreover, want see if files stored in same hard drive operating system or not; if are, need re-install operating system restoring database new hard drive. better if database-files , transaction-files not in same hard drive operating system. please me determine these 2 things. so far, have found these: (1) use sp_helpdb command , find database files , transaction files stored in these logical devices: sybdbs syblogs master sybdbs2 (2) use sp_helpdevice command 4 logical devices shown above, , find logical devices in these physical devices: /dev/rdsk/c0t0d0s1 /dev/rdsk/c0t3d0s4 d_master /dev/rdsk/sybdbs2 (3) when use sp_helpdevice show physical devices, see this: device_name physical_name des...