Posts

Showing posts from September, 2012

php - Accessing mutiple responses in SOAP -

i learned soap month ago , managed reply in php. managed response , parse stuck different response 5 instead of 1. trying figure out how parse it. i'm used arrays , it's bit confusing me here normal response/reply $value = $client->getinmate($parameters); $xml = $value->getinmateresult; print "street: ".$xml->address->street; print "<br>city: ".$xml->address->city; print "<br>state ".$xml->address->state; this works now trying similar same method not working, here image of structure of next reply: http://i.stack.imgur.com/wwfxg.png as can see, i'm trying 'charges (5)' , manage them independently racking brain so. simplexml_load_string() isn't helping either, doesn't seem parse them correctly. aren't able retrieve result in loop because same format can see in image attached. if not, let me know response getting through line: $xml

How to do pattern matching on map keys in function heads in elixir -

i can't seem find way pattern match on map's key in function head. there way this? i'm trying run different code depending on whether key exists in map or not (and wanted avoid if/else , like) this code looks like def my_func(key, %{key => _} = map), do: ... which gives me error ** (compileerror) illegal use of variable key inside map key match, maps can match on existing variable using ^key of course tried using ^ def my_func(key, %{^key => _} = map), do: ... which gives ** (compileerror) unbound variable ^key i'm using elixir 1.3.1/erlang 19.0 x64 on windows 8.1 machine. reading! just pattern match key need: defmodule test def my_func(%{"a" => value}), do: {:a, value} def my_func(%{"b" => value}), do: {:b, value} def my_func(_), do: :error end then in iex: iex(1)> test.my_func(%{"a" => 1}) {:a, 1} iex(2)> test.my_func(%{"b" => 2}) {:b, 2} also order of

dynamics crm - how to create Appoinment from Android MS CRM SDK? -

i creating appointment using below code give "500 internal server error" i added fields check it appointment objappointment = appointment.build() .setsubject("android sub") .setdescription("dis device") .setregardingobjectid(new entityreference("account", uuid.fromstring("0717b8e2-d00a-e611-8115-c4346bdd11d1"))) .setownerid(new entityreference("systemuser", uuid.fromstring("3edb272d-2da7-4c89-9350-2f4bd4e1762b"))) .setstatecode(new optionsetvalue(0)) .setnew_latitude(23.7845) .setnew_longitude(73.6574) .setnew_city("surat") .setactualstart(mdate.gettime()) .setactualend(mdate1.gettime()) .setnew_zippostalcode("380060") .setnew_street1("street1") .setnew_street2("street3") .setnew_street3("street3"

java - Adding revision information -

i want add git revision information java application built sbt. i'm using code generation feature described here http://www.scala-sbt.org/0.13/docs/howto-generating-files.html generate class revision field. servlet class reads field , renders html page revision information. works fine except fact generated file transient , ide (intellij idea in case) reports errors in servlet class. obviously, generate whole servlet class seems bit put in build definition. there way make file "permament" or doing wrong? could hitting issue: sbt/issues/1664 ? if can use generated scala, sbt-buildinfo worth look. add git revision so: import sbtbuildinfo.{ buildinfokey, buildinfoplugin } import sbtbuildinfo.buildinfokeys._ myproject .enableplugins(buildinfoplugin) .settings( buildinfokeys ++= seq[buildinfokey]( buildinfokey.action("revision") { process("git rev-parse --short head").!!.trim }) }

python - How to count occurrence of elements in a single column of Pandas Dataframe -

i have following df: import pandas pd data = pd.dataframe({'name' : ['a', 'a', 'b', 'd']}) in [7]: data out[7]: name 0 1 2 b 3 d what want summarize a 2 b 1 d 1 how can it? tried not good: g = data.groupby('name') g.count() hope helps use value_counts : data = pd.dataframe({'name' : ['a', 'a', 'b', 'd']}) in [14]: data['name'].value_counts() out[14]: 2 b 1 d 1 dtype: int64 or have tried using groupby : g=data.groupby('name')['name'] g.count() out[25]: name 2 b 1 d 1 name: name, dtype: int64

Android NavigationView with internal spacing -

Image
i developing android app support navigationview. have question make want it: (1) want divide navigation elements 2 areas: 1 @ top below header , 1 @ bottom end. (2) want remove padding between divider , element below it. how looks vs how should look: i know there way override padding value, fix (2). feels kind of dirty , maybe there approach achieve both of this. idea "settings"-element , change layout programmatically, far didn't find way working. or have build footer myself? also, not quite sure buzzwords should googling. maybe there easy answer out there. my current code. right there no layout changes inside activity, therefore did not add it. activity_main.xml: <android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main_drawer_layout" a

java - Console output to HTML File -

basically i'm running automated tests using testng. i'm using itestlistener give real-time results of tests status outputted console. is there anyway of outputting information on console html file can view progress html file? i'm planning create html style report own benefit more possible place output specific parts of html report create? overall i'm trying achieve html file can open on chrome while tests running , automatic refresh can view progress of tests. i came solution uses small amount of javascript update browser window: major file be: <html> <head> <script> function loadcontentfile() { document.getelementbyid("content").innerhtml='<objecttype="type/html" data="content.html"></object>'; } window.onload = setinterval(loadcontentfile, 1000); </script> </head> <body> <div id="content">&

javascript - Ignoring hidden files with gulp-watch -

i watching entire folder file modifications, want ignore of files. example, want watch files, ignore start period ( . ). how do that? i should work: gulp.watch(['css/**/*', '!css/**/.*'], ['styles']);

html - Position of the title in 960gs -

hy. work 960gs (12 columns) , try put title after logo in bottom part of it. solution find doesn't work because place title under logo. html: <div id="header" > <div class="container_12"> <header> <div class="grid_4"> <a href="index.html" title="pagina principala - crce" rel="home"> <img src="images/crce_logo.png" alt="logo crce"/> </a> </div> <div id="titleposition"class="grid_10"> <a href="index.html" title="" rel="home"> <img src="images/titlu_crce.png" alt=""/> </a> </div> </header> </div> </div> css: #header{ background: #798af7; background-repeat: repeat-x; height: 205px; overflow: vi

printf - Matlab: fprintf error -

i need save data in .txt file, works great except 1 line. %writing rest of data file fprintf(fid, '%u',speednum); fprintf(fid, ' '); fprintf(fid,speedunit); %that line in speedunit different values (none work) 1 of is: 'frames per min ' the error is: error using fprintf invalid format. error in rackwriter>tag_onoff_callback (line 414) fprintf(fid,speedunit); error in gui_mainfcn (line 95) feval(varargin{:}); error in rackwriter (line 42) gui_mainfcn(gui_state, varargin{:}); error in @(hobject,eventdata)rackwriter('tag_onoff_callback',hobject,eventdata,guidata(hobject)) error while evaluating uicontrol callback can me??? thank in advance fprintf(fid, ' '); fprintf(fid,speedunit); are both function calls 2 input arguments. in documentation of fprintf you'll find this: fprintf(formatspec, a1) formats data , displays results on screen. so in function calls fpr

java - How to use OpenShift environment variables to configure a MySQL database -

so generated application jhipster. locally, modify database info in application-dev.yml/application-prod.yml , works fine. now want deploy application on openshift. tried putting environment variable names in application-xxx.yml returned null. modified databaseconfiguration.java skip reading info .yml file , read them directly environment variables. if(system.getenv("openshift_mysql_db_host") != null && system.getenv("openshift_mysql_db_port") != null){ config.adddatasourceproperty("url", "jdbc:mysql://"+system.getenv("openshift_mysql_db_host")+":"+system.getenv("openshift_mysql_db_port")+"/zetravelcloud?useunicode=true&characterencoding=utf8"); } if (system.getenv("openshift_mysql_db_username") != null) { config.adddatasourceproperty("user", system.getenv("openshift_mysql_db_username")); } else { config.adddatasourceproperty("user",

python - Return dynamic arrays by ref in Swig -

i'm using swig wrap code in c++ use in python. have function array , return 2 dynamic arrays (the function them ref) after calculation on input array. problem output arrays unspecified size, because size depends on input array. function like: void arraymanipulate(int* inarray, int inlen, int resolution, int* &outarray1, int &outlen1, int* &outarray2, int &outlen2) i used numpy.i cast input array numpy array. if want use numpy return array argout not work, because assume size of output array known. module.i: %module minimal %{ #include "minimal.h" #include "numpy/arrayobject.h" %} %include numpy.i %init %{ inport_array(); %} %apply (int* inarray1, int dim1) {(int* inarray, int inlen)} %apply (int* argout_array1, int dim1) {(int* &outarray1, int &outlen1), (int* &outarray2, int &outlen2) %include "minimal.h" if try compile this, folowing error: file minimal_wrap.cxx: intellisense: value of type "

java - EasyStream and slf4j API Issue -

i needed easystream available @ sourceforge site , added dependency in application. slf4j-api used work fine has disagreement. way using code snippet : private final map<?, ?> parentcontext; mdc.setcontextmap(parentcontext); for reason getting compile time error message : the method setcontextmap(map<string,string>) in type mdc not applicable argument map<capture#5of-?,capture#6of-?> kindly suggest how can ride of error. my guess easystream depends on different version of slf4j 1 you're using. having more 1 of same version of dependency on one's classpath leads sorts of weird issues. depending on dependency management system you're using, need tell exclude child slf4j-api dependency or perhaps override it. example, in maven, i'd use <dependencymanagement> system force dependencies use same version of slf4j-api. perhaps if edit question more details dependency management system you're using can more specific answer, , de

ios - Firebase, Swift - runTransactionBlock: Permission denied -

i have encountered problem while trying users star runtransaction "permission denied" firebase. added below firebase security rules posts , swift transaction code. what fault in case? if did first ".write" rule "auth != null" works everyone. don't want this. want prevent other nodes, starcounter , stars need changeable. if shed light , explain, great. "posts": { ".read": "auth !== null", "$id": { ".write": "auth != null && ( (!data.exists() && newdata.child('ownerid').val() == auth.uid) || (!newdata.exists() && data.child('ownerid').val() == auth.uid) || root.child('admins').haschild(auth.uid))", "starcounter": { ".write": "auth !== null" }, "stars": { ".write&qu

dockerfile - docker: npm install on docker start -

i'd have kind of "development docker image" in npm install executed every time restart docker container (becuase don't want build, push , pull new dev image every day local machine our docker server). thought sth. in dockerfile: cmd npm install git+ssh://git@mycompany.de/my/project.git#develop && npm start sadly, doesn't work. container stops after docker start , don't know why, because works: run npm install git+ssh://git@mycompany.de/my/project.git#develop cmd npm start (just testing, that's of course not want have). maybe have wrong perception of cmd , enlighten me? make cmd point shell script. cmd ["/my/path/to/entrypoint.sh"] with script being: #!/bin/bash npm install git+ssh://git@mycompany.de/my/project.git#develop npm start # whatever else i find easier few reasons: inevitably these commands increase more being done it makes much easier run containers interactively, can run them docker run myc

Instantiating objects without calling the constructor in C++ -

this question has answer here: c++ default constructor not being called 2 answers i'm new @ c++ , i'm learning constructors. have class dog constructor: class dog{ dog(){ std::cout << "constructor called! } }; i know in c++ there different ways(if i'm not mistaken) can create object, instance: 1- dog dog; 2- dog dog = dog(); 3- dog *dog = new dog; 4- dog *dog = new dog(); 5- dog dog(); but here thing: statements 1 4 call constructor, statement number 5 doesn't , can figure out why. do have idea why fifth statement doesn't call class constructor? thanks. 5 example of c++'s most vexing parse . dog dog(); this declares function named dog accepts no parameters , returns dog . avoid most vexing parse (and if using c++11), can do: dog dog{}; and semantically (at least until c++17), dog dog = do

node.js - Node sendgrid ICAS/ICS invitation -

i using npm sendgrid node sendgrid github with have created following module: var path = require('path'), emailtemplates = require('email-templates'), async = require("async"), mailconfig = require('../config/email.json'), templates = require('../config/emailtemplates.json'), _ = require('lodash'), sendgrid = require('sendgrid')(mailconfig.sendgridapikey), fs = require("fs"); var mymailer = {}; /** * sends email either 1 or multiple users * @param template_id (the id key of template. can found in emailtemplates.json * @param string or array * @param string * @param subject string * @param keyreplacer array of objects keys replace in template * @param files array of file objects */ mymailer.sendtemplate = function (template_id, to, from, subject, keyreplacer, section, text, files) { var email = new sendgrid.email(), templatekey = templates[template_id]; if (

qcustomplot - Add a slide in Qt that moves a signal up and down the y axis -

i have 3 real time signals on same graph, overlap , need slide button move them , down y axis see them better. how can connect slide graph? when value of slide changes, datas of signal added on graph real_y_values+slide_value? mainwindow.cpp: mainwindow::mainwindow(qserialport* s,qwidget *parent) : qmainwindow(parent), ui(new ui::mainwindow), reader(s) { ui->setupui(this); connect(ui->verticalslider,signal(valuechanged(int)),ui->customplot,slot(deplasare())); setgeometry(400, 250, 542, 390); grafic(ui->customplot); setwindowtitle("real time data graph eda "); statusbar()->clearmessage(); ui->customplot->replot(); } void mainwindow::grafic(qcustomplot *customplot) { graph_name = "real time data graph eda"; customplot->addgraph(); // blue line customplot->graph(0)->setpen(qpen(qt::blue)); customplot->addgraph(); customplot->graph(1)->setpen(qpen(qt::blue)); customplot->addgraph(); // red line cu

calico - etcd error when trying to start service rejected send message -

i using ubuntu 14.04 , im configuring etcd use calico, service not work. this etcd.conf file: # vim:set ft=upstart ts=2 et: description "etcd" author "etcd maintainers" start on stopped rc runlevel=[2345] stop on runlevel [!2345] respawn setuid etcd env etcd_data_dir=/var/lib/etcd export etcd_data_dir exec /usr/bin/etcd --name="uno" \ --advertise-client-urls="http://172.16.8.241:2379,http://172.16.8.241:4001" \ --listen-client-urls="http://0.0.0.0:2379,http://0.0.0.0:4001" \ --listen-peer-urls "http://0.0.0.0:2380" \ --initial-advertise-peer-urls "http://172.16.8.241:2380" \ --initial-cluster-token $(uuidgen) \ --initial-cluster "node1=http://172.16.8.241:2380" \ --initial-cluster-state "new" when try start: ikerlan@uno:~$ service etcd start start: rejected send message, 1 matched rules; type="method_call", sender=":1.128" (uid=1000 pid=7374 comm="start e

java - What is a NullPointerException, and how do I fix it? -

what null pointer exceptions ( java.lang.nullpointerexception ) , causes them? what methods/tools can used determine cause stop exception causing program terminate prematurely? when declare reference variable (i.e. object) creating pointer object. consider following code declare variable of primitive type int : int x; x = 10; in example variable x int , java initialize 0 you. when assign 10 in second line value 10 written memory location pointed x. but, when try declare reference type different happens. take following code: integer num; num = new integer(10); the first line declares variable named num , but, not contain primitive value. instead contains pointer (because type integer reference type). since did not yet point java sets null, meaning "i pointing @ nothing". in second line, new keyword used instantiate (or create) object of type integer , pointer variable num assigned object. can reference object using dereferencing operator . (a dot

Variable is cleared on PostExecute event SSIS 2008 -

i trying pass package variable: packno execute sql task data flow. variable filled needed value on onprogress event. value is:20717. on onpostexecute event value cleared , assigned: -1. so sql command executed -1 value. idea why happening? there problem server. worked fine on different one.

spring - FieldError vs ObjectError vs Global Error -

i'm reading through spring 4 api , i'm trying understand difference between fielderror , objecterror , global error, in context of bindingresult . i'm guessing global errors name objecterror s since getglobalerror() returns objecterror . the context looking print error messages after form validation , want know how can avoid instanceof check, in this accepted answer . can use fielderror , ignore object errors? missing if logged fielderror s? i've tried few scenarios don't yet see distinction. through source in meantime. i'm guessing global errors name objecterrors since getglobalerror() returns objecterror. actually "global error" objecterror not instance of fielderror see source of getglobalerrors() what missing if logged fielderrors? any objecterror s code registered "global error" e.g. calling bindingresult.reject(errorcode, errorargs, defaultmessage) . see javadoc rejectvalue(field, errorcod

.net - Can I configure settings in UWP app desktop scanner? -

i have had success in getting input flatbed scanner in uwp app using windows.devices.enumeration; using windows.devices.scanners; imagescanner myscanner = await imagescanner.fromidasync(deviceid); var result = await myscanner.scanfilestofolderasync(imagescannerscansource.default, folder); and make use of auto configured scan profile if (myscanner.isscansourcesupported(imagescannerscansource.autoconfigured)) { ... // scan api call start scanning auto-configured settings. var result = await myscanner.scanfilestofolderasync( imagescannerscansource.autoconfigured, folder).astask(cancellationtoken.token, progress); ... } but there way can control configuration, lower resolution or b&w? of format options appear read properties. have tried make external scanner profile in win10 isn't picked (even when default). api appears aware of scanner supported settings because scantostream equivalent call reads in lowest possible resolution preview.

environment variables - -bash: sudo: No such file or directory -

this question has answer here: bash error when opening terminal [closed] 1 answer whenever opening terminal, end same error. -bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/hadoop/bin': not valid identifier and whenever running command lines, terminal throws error, like -bash: sudo: no such file or directory i can't edit ~/.bashrc through gedit ~/.bashrc think problem. echo $path gives me empty line though. by way, stuff happen under personal account. there's dedicated hadoop user account, created running hadoop , in fact works fine without glitch. i appreciate if tell me what's going on here, , it's been frustrating me week or so. in advance. edit: it turned out before created second account(for hadoop), modified bashrc @ end of file, totally

sql - python SQLite3 update row id when removing one row -

i've been building python/flask website, , works far, because need/use count(id) (where id auto-increment primary key), can't remove rows randomly. do know best way update every other higher ids when removing 1 row, kinda list, count() , id matches. (first id = 1, should match without update). i can put update function in standalone script , run manually, if it's heavy huge tables. one way recreate sequential numbering of key drop table , reconstruct it. consider renumber() function in code below: import sqlite3 pprint import pprint schema = ''' create table s ( id integer primary key autoincrement not null, content text not null)''' def init(db): db.execute('drop table if exists s') db.execute(schema) db.execute('insert s ( content ) values ("one")') db.execute('insert s ( content ) values ("two")') db.execute('insert s ( content ) values (&q

ajax - grails render template is not responding correctly -

Image
i using grails 2.4.3. have ajax call list of object. list ok. has 10 elements. problem when want send list model not behaving correctly. nothing generated in g:each block in template although have 10 records. can please me on please? here attempts below :: my ajax call >>> $.ajax({ type:'post', data:{id: 1}, url:'/mdnote/getcaretopictemplate/', success:function(data,textstatus){ $modal.find('.modal-body').empty().append(data); $modal.find('.modal-title').empty().append(cfg.title); $modal.modal('show'); }, error:function(xmlhttprequest,textstatus,errorthrown){}, complete:function(xmlhttprequest,textstatus){} }); my controller action >>> def getcaretopictemplate() { def caretopiclist = mdnoteservice.caretopiclist() render(template: '/md/patient/existingtemplateradiodiv', model: [caretopiclist: caretopiclist])

c# - HttpUtility.UrlEncode not encoding single quotes -

i'm trying encode query string using httputility.urlencode method the string is: www.example.come?a=1&b='mia'&c=33 the output is: www.example.come%3fa%3d1%26b%3d'mia'%26c%3d33 why did quotation marks not encoded , there way me ensure do? these characters valid url according this abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=

web - How to extract information of review period from a journal using R -

i want survey of review period of journal scientific reports , http://www.nature.com/srep/articles . want extract submitting time , accepting time of each article within time window (or recent 100 articles). there suggestion of how in r? solution can simple never used r web scraping before. hints can quite helpful. here's can try compile links in csv file change see in links srepid @ end, shown below : > head(links) links 1 http://www.nature.com/articles/srep20000 2 http://www.nature.com/articles/srep20001 3 http://www.nature.com/articles/srep20002 4 http://www.nature.com/articles/srep20003 5 http://www.nature.com/articles/srep20004 6 http://www.nature.com/articles/srep20005 then run following code : library(rvest) links <- read.csv("link.csv",t,"~") (i in 1:nrow(links)) { url <- read_html(as.character(links[i,1])) #upload links[i,2] <- url %>% html_node("dd:nth-chi

css - Making a custom navbar with Bootstrap -

Image
i want make custom navbar shown in image mocked up. i've written far - my html: <nav class="navbar navbar-default"> <div class="container"> <!-- brand , toggle grouped better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">brand</a> </div>

java - Why doesn't SQLException extends IOException? -

as client, when "bad" happens input / output of program, i/o exception should thrown. when i'm connected server, program has input-output-relationship client said server. therefore, when on communication doesn't work (something "bad"), resulting exception should ioexception, i.e. sqlexception should extend ioexception. why not case? because sqlexception not related io. for example if write bad sql command have sqlexception . here non exhaustive list of possible sqlexceptions not related io: bad sql grammar wrong attribute numbers wrong attribute types constraint violation privilege problems duplicate primary keys not existing table or column names from javadoc : an exception provides information on database access error or other errors .

C++ Polymorphism - Map of inherited classes -

i have movementsystem class inherits system class. later have number of xxxsystem classes store instances of xxxsystem (there 1 instance per system) in map way: enum { movement_system }; std::map<int,std::unique_ptr<system>> systems; systems[movement_system] = std::unique_ptr<system>(new movementsystem()); m_entitymanager.loadsystems(&systems); the last line there because need class entitymanager have access systems. therefore have method: std::map<int,std::unique_ptr<system>> *m_systems; // line in header void entitymanager::loadsystems(std::map<int,std::unique_ptr<system>> *systems) { m_systems = systems; } and in other method of entitymanager try access systems have sent class way: std::unique_ptr<movementsystem> mvt = (*m_systems)[movement_system]; mvt->update(dt); but error: conversion 'std::map<int, std::unique_ptr<system> >::mapped_type {aka std::unique_ptr<system>}&

PowerShell/CLI: “Foreach” loop with multiple arrays -

i'm trying brain round , on verge of head explosion. have list of data listing usernames, , virtual machines. for example: username servername bob.lazar abc001 bob.lazar abc002 peter.bob ght004 bob.lazar abc006 i need collate user data can email them listing. if loop through , email mail bob 3x times, need email bob once 3 server names. assume need put data multidimential array , loop through don't know begin. i didn't understand problem i'm pretty sure looking group cmdlet. pipe collection , specify property want group things , elements available group property jps> dir |group extension |? name -eq ".txt" | % group directory: c:\temp mode lastwritetime length name ---- ------------- ------ ---- -a---- 6/2/2016 8:23 pm 57930 foo.txt -a---- 12/21/2015 8:00 pm 8265 modulesessions.ps1.t -a---- 3/15/2016 6:26 pm

c++ - searching for tags in current directory only -

if have following structure . ├── main-one │   ├── main.cpp │   └── tags ├── main-two │   ├── main.cpp │   └── tags └── tags 2 directories, 5 files and in main.cpp in main-one folder, suppose want search tag print , , 2 of them exist, 1 in each main.cpp file. how can specify maximum depth level of 1 :ta print function searches in current working directory? maybe interactive tag search? i ask because trying use ctags on larger project , ability search common things main without getting hundreds of results you can't. :tag foo jump first foo in tags file, no matter (and are) in project. use :help :tselect instead.

java - Importing gradle dependencies -

i'm editing open source package uses gradle building/dependency management. have not used gradle before. i wanted use few jackson methods, added compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.7.5' build.gradle file , added import com.fasterxml.jackson.*; project. but when try build ./gradle shadowjar , following error: installing pre-commit hook unix/os x warning: jar not create executable jar. use shadowjar instead. :compilejava /users/mttjone/sw/builds/bixie-vanilla/src/main/java/bixie/checker/reportprinter/jsonreportprinter.java:11: error: package com.fasterxml.jackson not exist import com.fasterxml.jackson.*; ^ ... 4 errors :compilejava failed failure: build failed exception. * went wrong: execution failed task ':compilejava'. > compilation failed; see compiler error output details. * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed by popu

emacs - How can I use local .eslintrc in Spacemacs? -

i new spacemacs , follow guides in https://github.com/syl20bnr/spacemacs/tree/master/layers/%2bframeworks/react . everything works except eslinter not use local .eslintrc . it works on atom editor, sublime text 3, vscode. don't know why. can me ? thanks. just use projectile(which included in spacemacs) find .eslintrc . (defun codefalling//reset-eslint-rc () (let ((rc-path (if (projectile-project-p) (concat (projectile-project-root) ".eslintrc")))) (if (file-exists-p rc-path) (progn (message rc-path) (setq flycheck-eslintrc rc-path))))) (add-hook 'flycheck-mode-hook 'codefalling//reset-eslint-rc)

sql - Difficulty in creating a table in mysql database -

this question has answer here: i keep getting mysql error code #1089 1 answer i have tried creating table manually in mysql database columns id, phone, email, password, paymwnt. here id primary key auto increment when click save, following error message displays incorrect prefix key. used part isn't string, used length longer key part or storage engine not support unique prefix keys" someone please help. create table #user_table ( userid int primary key identity(1,1), last_name varchar(50), first_name varchar(50) ); select * #user_table insert #user_table values('k','raj') sol: userid last_name first_name 1 k raj

c# - Passing a Datatable From One Form to Another Form -

i have form1 , form2. form2 opened form1, has dgv after filling it, it's copied datatable on click button, , form2 closed or visible = false. passed datatable form1 it's giving me null reference. here code in form2: private void button1_click(object sender, eventargs e) { perclothesdescriptiondt = new datatable(); foreach (datagridviewcolumn col in datagridview3.columns) { perclothesdescriptiondt.columns.add(col.headertext); } foreach (datagridviewrow row in datagridview3.rows) { datarow drow = perclothesdescriptiondt.newrow(); foreach (datagridviewcell cell in row.cells) { drow[cell.columnindex] = cell.value; } perclothesdescriptiondt.columns.removeat(0); perclothesdescriptiondt.rows.add(drow); } this.visible = false; }

javascript - Set all form field to invalid state: angularJS -

sure, can write like: myform.price.$setvalidity('valid', true); myform.category.$setvalidity('valid', true); and myform.price.$setvalidity('valid', false); myform.category.$setvalidity('valid', false); but want to function, , iterate via each field , set invalid state... i tried so: setvalidity = function(value, form){ _.each(form, function(field){ if (field.$dirty === undefined || !field){ field.$setvalidity('valid', value); } }); }; but doesn't work maybe there approach of doing that? i think using _ (underscore) apply array. should work with for (fieldname in myform) { myform[fieldname].$setvalidity('valid', value); }

javascript - getting error on destroy item -

i have 1 crud of project , trying destroy project list using ajax. class projectscontroller < applicationcontroller . . . def destroy @project.destroy respond_to |format| format.js end end end destroy.js $('#all_projects').html("<%= escape_javascript render(:partial => 'projects/all_projects') %>"); all_projects.html.erb <table> <thead> <tr> <th>name</th> <th>team size</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @projects.each |project| %> <tr> <td><%= project.name %></td> <td><%= link_to 'show', project %></td> <td><%= link_to 'edit', edit_project_path(project) %></td> <td><%= link_to 'destroy', project, method: :delete, data: { confirm: 'are sure?

html - A random border is appearing on a search box -

Image
so have search box on page. on page load looks this: however, after typing text, , deleting it, box looks this: upon entering new text, border go away , original state. i not believe css altering in way these events occur .search { padding: 8px 15px; background: rgba(50, 50, 50, 0.2); border: 1px solid #dbdbdb; } .search:hover { background: rgba(0, 0, 0, .3); } .search:focus { background: rgba(0, 0, 0, 0); } .button { position: relative; padding: 6px 15px; left: -8px; border: 2px solid #207cca; background-color: #207cca; color: #fafafa; font-size: 12px; cursor: default; } .button:hover { background-color: #fafafa; } the border appears style on many of divs in document however, should not apply search box. edit: not example of outline appearing. outline appears after search box loses focus (i click elsewhere on page). outline disappear text being entered. edit #2: here's relevant html: <td style="min-width:254px"&

debian - Logging PostgreSQL interactive queries -

i have several people doing database queries directly systems. i log secure syslog server queries done interactively/by hand, or failing that, queries done using psql binary client. i using debian jessie, postgresql 9.4 , 9.1. how achieve that? there a multitude of methods setting configuration variables, varying scopes. as log_statement superuser-only setting, can rule out of client-side options, , server- or database-wide settings presumably broad case. i believe leaves per-user option, i.e.: alter user interactive_user set log_statement = 'all'; or if makes things easier manage: alter system set log_statement = 'all'; alter user application_user set log_statement = 'none'; note these settings applied on connection, cannot triggered (or bypassed) via set role commands. of course, assumes application , interactive users aren't sharing logins, don't think there's else right level of granularity.

android - RecyclerView list with items with boundaries at an angle, not horizontal -

Image
how implement list example below, boundary line between items in recyclerview @ angle. my plan right take top-most triangular portion of each item , render item above, visually items boundaries slanted, in reality remain horizontal. item can handle item selection based on click within item. there better way? edit: on consideration realise have no idea how crop image triangle, pointers super helpful too.

Making an application in Visual Basic to handle Dialogue in Morrowind? -

i want make program catered, specific purpose, aid me in making large set of quest mods videogame elder scrolls iii: morrowind. i’m attempting through either excel or visual basic, , here i’ve provided little summary of how dialogue works in game’s normal creation program , want create outside of , improve on.   how morrowind dialogue works? for of may familiar game, you’ll remember talking npc’s bring set of text, , text dialogue. there different “topics” if npc has dialogue set for, player can see topic , click on it, bringing new wall of text, , how dialogue works in entire game on player’s end. in creating morrowind mod, way dialogue works in “construction set” (the program used create , edit game) database contains every entry of text, , these entries have conditions set them limit npcs can given entry of dialogue. instance, topic “latest rumors”, have lots of entries in lots of different npcs having it. topic condition of sorts potentially dozens of entries attached it,