Posts

Showing posts from July, 2010

mysql - Creating a view with multiple tables? -

i trying create view 5 tables having issues when trying join last 2 tables together. here current mysql query: create view s_view select ac.id, a.id account_id, a.name, a.description, a.industry, a.phone_fax, a.phone_office, a.shipping_address_street, a.shipping_address_city, a.shipping_address_state, a.shipping_address_postalcode, a.shipping_address_country, c.id contact_id, c.first_name, c.last_name, c.title, c.department, c.phone_home, c.phone_mobile, c.phone_work, c.primary_address_street, c.primary_address_city, c.primary_address_state, c.primary_address_postalcode, c.primary_address_country, ea.email_address accounts inner join accounts_contacts ac on a.id = ac.account_id inner join contacts c on c.id = ac.contact_id inner join email_addr_bean_rel er on er.bean_id = a.id inner join email_addresses ea on er.email_address_id = ea.id and tables set in following way: accounts (id, first_name, last_name, etc.) contacts (id, name, etc.) ac...

shiny - ggvis, tooltip for bar plots -

i trying create tooltip bar plot. tried same code on layer_points, , works fine. however, when switch layer_bars, function not work anymore. tooltip not show case. can please help? here code: the data using contains x: index, , ss.plus: positive numbers ui.r: library(ggvis) shinyui(fluidpage("test", fluidrow( plotoutput("realdata", height = "200") ), sidebarlayout( sidebarpanel( sliderinput("range.real", label="select range of view", min=1, max=1808, value=c(1, 50) ) ), mainpanel( ggvisoutput("barplus") ) ) )) server.r: library(ggvis) shinyserver(function(input, output, session){ sub.data <- reactive({ real.data[input$range.real[1]:input$range.real[2],] }) on_hover <- function(x){ if(is.null(x)) return(null) paste0(x$x, ",", x$ss.plus) } sub.data %>% ggvis(~x, ~ss.plus) %>% layer_bars(width=0.8) %>% add_tooltip(on...

android - java.lang.NullPointerException encountered in an unexpected place -

i'm perplexed question: there situation in first line in following 3 lines can produce java.lang.nullpointerexception? if (mjobs == null || mjobs.size() == 0) { <-- trace shows exception here return null; } this exception seen on unrooted android 4.4.4 phone. mjobs declared this: arraylist<job> mjobs; any ideas highly appreciated. update: crash happened 1 time out many thousands of runs. no, assuming using java.util.arraylist , not own implementation. it clearer use isempty() instead of size() == 0 . check see how code getting called since returning null in either of 2 cases.

wordpress - woocommerce credit card payment gateway not showing up in Payment gateways page -

Image
i using paypal standart not pro or advanced. before able select credit card payment gateway , had issues woocommerce - caused 500 server error managed going , there lot of changes made related website,but nice no error right now, cant see credit card gateway. thought maybe have messed files , disabled uninstalled (in woocommerce tools section "remove post types on uninstall" selected , saved) woocommerce plugin , installed again , again nothing happened ,i still cant see credit card payment gateway. before there credit card gateway paypal image credit card images here system report wordpress environment home url: http://samplewebsite.com (not real websites name) site url: http://samplewebsite.com wc version: 2.3.7 wc database version: 2.3.7 log directory writable: ✔ /home1/lauroskr/public_html/wp-content/uploads/wc-logs/ wp version: 4.1.1 wp multisite: – wp memory limit: 96 mb wp debug mode: – language: en_us server environment server info: apache php v...

tcp - Windows NDIS filter - how to check if port is used by operating system -

i writing windows ndis filter driver , able query inside kernel status of tcp port (is in use?). when driver in irql = dispatch_level, can use wsk network api or else query if port being used operating system? thanks in advance! afaik, there no visible (read: documented) method doing that. 1 option use gettcptable2, parse , send information driver using ioctl. see this question example how usermode, you'll have add work process , send down driver. it possible go through less preferable way of reverse engineering api used gettcptable2 , use yourself. see discussion in osr , including few leads , few reasons why not it.

Using ASM to get the reference returned via ARETURN bytecode instruction -

i have method returns value generated in method similar this: public static filechannel open() { return provider.newobject(); } so bytecode of method looks this: invokevirtual org/test/helper.process ()lorg/test/myobject; areturn i have java agent uses asm bytecode-transformation when jvm starts up. now inject code access returned myobject without doing changes invoke itself, i.e. ideally add bytecode instructions before areturn. which asm/bytecode construct allows me access object returned here? for simple, can put dup instruction in there followed desired use. if need inject more complex code, should store in register (it doesn't matter since won't used after code except in exceedingly unlikely event areturn throws exception , there's exception handler in method). so if you're using register 0 go astore_0 (your code) aload_0 areturn .

image processing - OpenCV: GoPro video editing blur -

i attempting post-process video in opencv. problem gopro video blurry, high frame rate. is there way can remove blur? i've heard deinterlacing, don't know if applies gopro 3+, or begin. any appreciated. you can record @ high frame rate remove blur, make sure recording enough natural light, recording outdoors recommended. look @ video: https://www.youtube.com/watch?v=-nu2_erc_oe at 30 fps, there blur in car, @ 60fps blur non existant, doubling fps can good. since have hero3+ can record 720p 60 , remove blur. wvga 120fps can justice (example 1080p still applies)

c# - Connecting to .NET webservice from android application -

i trying connect android application .net webservice. using github.com/signalr/java-client. have no experience android , cannot find solution problem. tried use these sample: github.com/signalr/java-samples implementing android client. in mainactivity.java have method public void buttonclick(view v) { hubconnection conn = new hubconnection("http://192.168.132.28:9000"); // create hub proxy hubproxy proxy = conn.createhubproxy("hubclient"); proxy.subscribe(new object() { @suppresswarnings("unused") public void messagereceived(string name, string message) { system.out.println(name + ": " + message); } }); // subscribe error event conn.error(new errorcallback() { @override public void onerror(throwable error) { error.printstacktrace(); } }); // subscribe connect...

asp.net - RadioButtonList and their 'Value' property -

i wondering 'value' property of item in radiobuttonlist. if want value of selected radio button in list, these must unique or auto-select first item finds value i'm looking for. no duplicate values. why this? i've looked around net, used them, , such know how working, know why works way. if select item in list, knows item selected. button fills in, can index of item selected...so why doesn't go: "okay, selected item @ index x. want value? okay, let me access list, go item x , value." i can think when want value of item, looking value rather index value? update 1: in particular case doing this: i have 1 radiobuttonlist has 3 items(radiobuttons) in it. following select...case occurs inside of button click. select case radiobuttonlist1.selecteditem.text case "texta" case "textb" //this radiobutton has value of 200 case "textc" //this radiobutton has value of 200 end select this work...

oracle - SQL - Error with Sum(Case -

i have searched bunch of examples quite helpful in creating query having trouble 1 part of query... sorry not being able provide complete table structure. here working query... select i.spl_instr_code_1 lw, sum((d.units_ordered/i.std_sub_pack_qty) - (d.units_rcvd/i.std_sub_pack_qty)) "booked" wmdbadmin.item_master i, wmdbadmin.cust_po_appt c, wmdbadmin.po_hdr h, wmdbadmin.po_dtl d, wmdbadmin.appt_sched a, wmdbadmin.vendor_master v, wmdbadmin.sys_code s h.ref_field_2 = 'n' , c.appt_nbr = a.appt_nbr (+) , c.po_nbr = h.po_nbr , h.po_nbr = d.po_nbr , i.sku_id = d.sku_id , h.vendor_master_id = v.vendor_master_id , s.code_id = a.stat_code , s.rec_type = 's' , s.code_type = '628' , s.code_desc<>'scheduled' , a.stat_code <= '90' , ((to_char(a.sched_date_time,'yyyymmdd')>= '20150401' , to_char(a.sched_date_time, 'yyyymmdd')<='20150401')) group i.sp...

Cassandra Table design for Historical state information -

my requirement design table historical state information (not time-series). ex: have devices connecting , disconnecting management platform. want know details such (name, mac address, os, image, etc.) devices connected management platform in given interval (start , end time). any on table design use-case? if want know if connected during interval, should work in traditional time series approach: create table device_state( deviceid, timeofevent, state, details, primary key (deviceid, timeofevent, state) select details device_state timeofevent > '2001-01-01 12:01:01.000' , timeofevent < '2001-01-01 12:15:59.000' , state = 'connected'; if want know if device connected entire time, need implement client side logic.

How to do exception handling on multiprocessing python -

i use multiprocessing in python code. python code imports pysnmp , multiprocessing. half of time code runs smoothly. unfortunately half of other time code doesn't work , shows exception "pyasn1.error.pyasn1 error: type tagset". code first creates "multiprocessing.dummy.pool(numofthreads)" number of threads. calls "p.map(sendsnmpget, [iprange + '.' + str(x) x in range(1,256)])" takes function "sendsnmpget" thread function, , calls function 255 times values of "1-255". code: from pysnmp.entity.rfc3413.oneliner import cmdgen pysnmp.proto.rfc1902 import integer, ipaddress, octetstring import multiprocessing.dummy import multiprocessing def snmpget(ip, community, oid, version = 1): generator = cmdgen.commandgenerator() comm_data = cmdgen.communitydata('server', community, version) # 1 means version snmp v2c transport = cmdgen.udptransporttarget((ip, 161),timeout=0.5,retries=2) real_fun = getattr(gene...

date - Displaying the timezone properly in XSLT -

was using below tag displaying timezone working fine until when daylight saving has happened , our server in uk displaying time 01/04/2015 03:43:00 pm + 0100 , have timezone displayed, please advice. tag used previously: date:format-date(date:date-time(), 'dd/mm/yyyy hh:mm:ss z') regards arvind if "properly" mean want displayed "bst" (for british summer time) there isn't enough information in date/time value - time-zone offset of +1 occurs in many different timezones near greenwich meridian. you're using exslt library formatting dates , times. based on java's simpledateformat class, try luck timezone designator z instead of z . alternatively, if you've got access xslt 2.0, can use format-datetime() function. suffers same problem (the datetime value stores offset, doesn't tell name of timezone). can give processor clue setting 5th argument of format-datetime() "europe/london", in case might abl...

javascript - jQuery: get clicked button values -

i need values of jquery button when form submitted. form , jquery i'm using below, it's not working. i need value of data-url . jquery code $("#addagency").submit(function(event) { var val = $("button[type=submit][clicked=true]").attr('data-url'); alert(val); }); html code <form id="addagency"> <button type="submit" data-url="test.php"> </form> thanks in advance. try $("#addagency").submit(function(event) { var val = $(this).find("button[type=submit]").data('url'); alert(val); });

regex - Perl, regular expression, matching exactly 2 spaces does not work -

working on parser sta/ssta timing reports. following cases of "arrival time" occurrence possible: arrival time 3373.000 - arrival time 638.700 | 100.404 arrival time report the goal match cases 1st , 2nd, ignore 3rd case. i tried 2 matching patterns in perl code: 1) if (m/^-?\s{1,2}arrival\stime/) { ($sta_data{$file}{$path}{arrival_time}) = m/\sarrival\stime\s+(.*)\s+$/ } 2) if (m/^-\sarrival\stime/ || m/^\s{1,2}arrival\stime/) { ($sta_data{$file}{$path}{arrival_time}) = m/\sarrival\stime\s+(.*)\s+$/ } both of them pick 3rd case well. not understand why. defined 1 or 2 space characters \s{1,2} , no more that. 3rd line contains more 2 whitespace character should not match pattern. how possible? the data have published not same used in test. this program checks both of regex patterns against data copied directly edit of original post. neither pattern m...

Error with JQuery DataTables oCol is undefined dialog -

i using jquery datatables populate data in 2 separate tables in same page. however, getting following error: ocol undefined ..in dialog box. please me solve this.this code: <table class="assignment"> <tr> <th>available product license types</th> <th></th> <th>assigned product license types</th> </tr> <tr> <td class="leftcontent"> select: <a href="#" onclick="return aslm.datatables.selectall ($('#availableproductlicensetypetable'));">all</a>, <a href="#" onclick="return aslm.datatables.selectnone($('#availableproductlicensetypetable'));">none</a> <table id="availableproductlicensetypetable" class="display small noshadow"> <thead> <tr> <th>id</th> <th>name</th> <th>view only</th> </tr> ...

c# - HP Fortify - Dead Code stored in Asp.net Temp Files -

is there possible fix dead code identified fortify when scanning asp.net mvc 3 project? code identified "dead' in generated files, stored in asp.net temp files folder. have 173 of these findings showing in our scan results. using version 6.10 of hp fortify scanner, latest rulepacks. i came across article mitigates fortify dead code in mvc. appearantly, out of box fortify scans the mvc website if standard asp.net application. modify fortify properties file open {fortify_install_dir}\core\config\fortify.properties , uncomment following: com.fortify.vs.skipaspprecompilation=true , also, set following property false (default value true). com.fortify.vs.requireaspprecompilation=false build project build project normal in visual studio copy build artifacts copy build artifacts /bin directory @ root of project following location - c:\windows\microsoft.net\framework{frameworkverion}\temporary asp.net files{yourprojectname} project named “yourproject.web” b...

ListView grid in React Native -

Image
i'm building simple app in react native fetches listings remote json source , displays them on screen. so far, using excellent example here, i've managed results display using listview components in rows (i.e. 1 result per row, see screenshot). need results display in grid, i.e. 3 6 items per row, depending on screen size , orientation. what best way these results grid? can use listview this, or one-per-row results? i've tried playing around flexbox styles but, since react doesn't seem accept % values , listview doesn't accept styles, haven't yet had success. you need use combination of flexbox , , knowledge listview wraps scrollview , takes on properties. in mind can use scrollview's contentcontainerstyle prop style items. var testcmp = react.createclass({ getinitialstate: function() { var ds = new listview.datasource({rowhaschanged: (r1, r2) => r1 !== r2}); var data = array.apply(null, {length: 20}).map(number.call...

html - My header image isn't responsive -

i'm making website course in webdesign , 1 criteria responsive (resize content fit screen size). in site every image , text paragraph size according screen sizes full hd iphone size.. except header image stays locked in place when scale down, when it's down mobile resolution have scroll right see image. here's html , css codes header image: html: <div class="container_14"> <div class="grid_12"> <a href="index.html"> <p align="center"><img src="images/logo2.png"></p> </a> </div> </div> css: .container_14 { margin-left: auto; margin-right: auto; width: 1200px; } .container_14 .grid_12 { width:97.5%; height:90px; } img { max-width: 100%; } link code random same size images.. http://jsfiddle.net/hac4cfrn/ if want .container_14 adapt various screens stay @ 1200px width if there’s enough space, use @media query: ...

java - ESAPI for XSS prevention not working -

i working on fixing cross site scripting issues in our code in jsps. below original code //scriplet code <% string userid = request.getparameter("sid"); ...%> and in same jsp have <input type = hidden name = "userid" value = "<%= userid %>" /> i have made changes include esapi-2.1.0.jar in lib , esapi.properties, validation.properties in classpath. made below changes scriplet code fix above code //scriplet code <% string userid = esapi.encoder().encodeforhtml(request.getparameter("sid")); ...%> i thought fix issue when scan code using fortify, these lines again highlighted having xss issue. please if guys have idea on how should handled. thanks. ------- update thanks lot @avgvstvs. insightful.follwd guidelines, not sure if missng somethn. code - string usersid=esapi.encoder().encodeforhtmlattribute(request.getheader("janus_sid")); sessio...

gulp - Generate .sass automatically and livereload -

var gulp =require('gulp'), sass = require('gulp-ruby-sass') minifycss = require('gulp-minify-css'), sourcemaps = require('gulp-sourcemaps'), jshint = require('gulp-jshint'), uglify = require('gulp-uglify'), imagemin = require('gulp-imagemin'), rename = require('gulp-rename'), concat = require('gulp-concat'), notify = require('gulp-notify'), cache = require('gulp-cache'), livereload = require('gulp-livereload'), autoprefixer = require('gulp-autoprefixer'), del = require('del'); gulp.task('styles', function() { return sass('./public/styles/sass/style.sass') .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1')) .pipe(gulp.dest('./public/styles/css/')) }); //clean gulp.task('clean', function(cb) { del([...

c# - Why won't JsonConvert deserialize this object? -

i have json: { "cutcenterid":1, "name":"demo cut center", "description":"test", "isavailable":true, "e2customerid":"110000", "numberofmachines":2, "machines":[] } i have following poco: public class cutcenter { int cutcenterid { get; set; } string name { get; set; } string description { get; set; } bool isavailable { get; set; } string e2customerid { get; set; } int numberofmachines { get; set; } } i try following line of code json set above json , _cutcenter member variable. _cutcenter = jsonconvert.deserializeobject<cutcenter>(json); after _cutcenter set defaults. why? doing wrong? your members private. try this. public class cutcenter { public int cutcenterid { get; set; } public string name { get; set; } public string description { get; set; } public bool isavailable { get; set; ...

Can't get planetary.js to work -

so have been on plantary.js page, ran though checks, installed asked etc. cannot site load. googled, , looked here well. have used quickstart said well. doing wrong? not versed in jquery although have working knowledge of , believe installed correctly (i'm running other jquery works fine. code: <html> <head> <script type='text/javascript' src='http://d3js.org/d3.v3.min.js'></script> <script type='text/javascript' src='http://d3js.org/topojson.v1.min.js'></script> <script type='text/javascript' src='planetaryjs.min.js'></script> </head> <body> <canvas id='globe' width='500' height='500'></canvas> <script type='text/javascript' src='yourapp.js'></script> </body> </html> js (yourapp.js): var planet = planetaryjs.planet(); // can remove statement if `world-110m.json` // in same path ...

java - Null Pointer Exception with objectinputstream -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i'm trying read list of names , phone numbers in. the program keeps throwing nullpointerexception. why doing this? int i=0; datab[] b = null; //b = null; // name of file open. string filename = "datt.dat"; try { // use reading data. byte[] buffer = new byte[1000]; fileinputstream fileis = new fileinputstream("datt.dat"); objectinputstream input = new objectinputstream(fileis); for(i=0; i<b.length; i++) b[i]=(datab)input.readobject(); input.close(); b null, b.length throws exception

angularjs - Animating ng-repeat index changes using custom directive -

this forked plunker shows 2 ng-repeat s each displaying array list. each list item uses custom directive animate whenever or down arrow clicked. the first list, records changes array item values animates correctly second, records changes array item indexes not. can suggest how edit directive animate second list correctly? the way move elements triggers incorrect animation. try this function arraymove(arrayvar, from, to) { var item = arrayvar.splice(from, 1).pop(); arrayvar.splice(to, 0, angular.copy(item)); } you need make (deep) copy of element preserve properties $$hashkey used angularjs track objects.

java - Deleting multiple rows in Excel using Apache POI -

Image
i have excel sheet table of 75 rows. in 76th row have total function of each column =sum(a1:a75) , =sum(b1:b75) in 77th 92th rows have excel chart takes a1:a75 , b1:b75 values if use apache poi populate 75 rows, looks great. (i using xssfworkbook) if use apache poi populate 30 rows, delete rows 31 75. run problems. were delete these rows in excel total functions update, , excel chart updates use a1:a30 , b1:b30, , excel chart moves row 31. i mirror behaviour using apache poi this have tried xlstable.shiftrows(75,91,-45) (rows 75 91 apache row equivalents of excel rows 76 92 , include total function , chart) i have tried for (int = 75; > 30; i--) { row r = cellutil.getrow(i, xlstable); xlstable.removerow(r); } and for (int = 30; < 75; i) { row r = cellutil.getrow(i, xlstable); xlstable.removerow(r); } these cause sheet become messy #ref errors. imagine want may not possible poi, , need build entire sheet requisite amount of rows, , ad...

DeezerConnect.setAccessToken() method is missing in latest Deezer Android SDK 0.10.17 Beta -

today replace old stable deezer sdk version(v0.10.16) latest sdk (v0.10.17), when observed new sdk class deezerconnect.class not have setaccesstoken() method anymore. this useful me logging different users, different deezer accounts, because made accesstoken persistent on server each user, , setting deezerconnect.class when user reentered in application. is there other way set acces token deezerconnect? indeed setaccesstoken not public anymore in v0.10.17, it's mistake. please note though sdk 0.10.17 still in beta of today.

php - Extending calendar functionality to accept years -

Image
i'm working on event scheduler site , stuck i'm using months table (with id & month headers) group results month. due this, if try schedule event january 2016, puts month choose intended, understandably puts 2015. i'm looking on extending beyond end of current year , adding functionality different years. i happily use method using current table setup, tips or suggestions appreciated. current code follows: <?php include 'includes/connect.php'; include 'includes/header.php'; $curmonth = date("n"); ?> <b>upcoming trip information:</b><br><br> <?php $res = mysql_query("select * months order id"); while ($rows = mysql_fetch_array($res)) { if($rows['id'] >= $curmonth ){ $monthname = $rows['month']; ?> <table cellpadding="0" cellspacing="3" width="100%"> <tr> <td> <?php $tid = $_get['transporter']; $check = mysq...

javascript - Json callback single post by id -

i have problem single post page wordpress , show on mobile jquery page. need full list of posts; , on click, need open single post. this code list of posts: $.getjson("http://www.mcaps.at/redesign/api/get_posts/?post_type=reference_member", function posts(data) { var output='<ul data-role="listview" data-inset="true" data-divider-theme="c">'; $.each(data.posts, function(key,ref){ output += '<li class="show-more" >'; output += '<a href="#blog-post" onclick="showpost(' + ref.id + ')">'; output += '<h3>' + ref.title + '</h3>'; output += '<img src=" ' + ref.thumbnail + ' " />'; output += '</a>'; output += '</li>'; }); output+='</ul>'; $('#referenzen-content').html(output); }); how s...

ember.js - Subscribe to DOM events within Ember app -

i've got ember cli based blog. resize <img> inside posts upon clicking them using function inside application-controller. i rely on on('init') , ember.run.later , feels dirty. how can improve subscription code below? import ember 'ember'; export default ember.arraycontroller.extend({ imagescaling: function() { ember.run.later((function() { //subscribe actual event ember.$(".post-content img").on("click", function(){ // resize here }) }), 3000) }.on('init') }); if you're inserting of images inside ember templates, can use action helper: <img {{action 'scaleimages' on='click'}} src='' /> i realize that's not case though. way i've dealt dom interactions in past override application view set , tear down event handler there. can avoid ember.run.later call modifying jquery event listener. here's how it: // app/views/applicat...

php - Apache keeps forcing non-UTF-8 character set -

Image
i having character encoding problem web page works in local once uploaded remote server doesn't works properly. i have simple textarea use update mysql database row utf-8 encoded text. pages html5 , use utf-8 encoding. <!doctype html> <html> <head> <meta charset="utf-8"> ... also database , tables encoded utf8 database charset , utf8_general_ci database collation . when submit form , see updated textarea info database, see messed character. in local (but connecting same remote database), fine. this textarea <textarea class="form-control" name="info" required><?=htmlentities(getinfo($mysqli));?></textarea> and function output result function getinfo ($mysqli) { if ($result = $mysqli->query("select info settings limit 1")) { $row = $result->fetch_assoc(); $result->free(); } return $row["info"]; } i have impression remote web server o...

How do I get meaningful error messages for nested scala unit equality matchers? -

i want assert equality in scalatest of case classes contain array. (so built-in equality matchers case classes not applicable.) example: case class example(array: array[double], variable: integer) test stub: val = example(array(0.1, 0.2), 1) val b = example(array(0.1, 0.2), 1) should equal (b) fails expected. implement equality trait: implicit val exampleeq = new equality[example] { def areequal(left: example, right: any): boolean = right match { case other: example => { left.array should contain thesameelementsinorderas other.array left.variable should other.variable true } case _ => false } } which works. other option implement equality trait == @ places of "should be" , in case false @ 1 place return false, else true. problem both when running test error message both "example" objects not equal (if not) see in element differ. how achieve this? thank help! [update] in practice example ...

compilation - Is lua called from redis interpretted or compiled? -

redis supports lua scripting. using eval command, can execute lua script in redis. lua script compiled or interpretted when redis calls lua script? lua scripts sent lua library execution compiled lua vm instructions before execution. these instructions interpreted lua vm.

symfony - Clearing form collection entirely -

i have issue symfony 2.6 form collections. removing elements collection works, when @ least 1 present. if last element removed dom (leaving collection container empty), no elements removed collection after handling request. example: i have form collection "children" , 2 children, "a" , "b". remove child "b" dom, save, removechild called, child removed. remove child "a", save, nothing happens - after refreshing form child still present. when dumping main entity after form has handled request, child present in it's collection well. did have similar problem , found solution? you can 2 methods : as in symfony doc : form collection doc or doctrine annotation : doctrine orphanremoval doc but don't forget cascade={"remove"} annotation

java - GWT deferred binding not working after compilation -

i trying implement deferred binding using generators. when testing deferred binding in dev mode works expected, when switching production deferred binding not working reason. have following classes public class generatortest implements entrypoint { //should modified generator public static class generatortestprefs extends preferencesimpl { ... } ... } public class preferencesimpl implements preferences { ... } public interface preferences { public void load(string key, storage storage); public void store(string key, storage storage); } and following definition in gwt module.xml <generate-with class="com.xxx.xxx.gwt.generator.server.preferencesgenerator"> <when-type-assignable class="com.xxx.xxx.gwt.generator.client.preferences"/> </generate-with> i added log classes created generatortestprefs prefs = gwt.create(generatortestprefs.class) in case of dev mode, in log file, see gwt is using class created g...

c# - Suppressing right-click context menu on canvas -

i have canvas , when user right clicks on it, context menu appears. have checkbox, , when box checked, don't want context menu appear. reason that, when checkbox checked, first 2 right clicks user drop ellipses @ 2 points of right clicks. right though, context menu popup on 2 right clicks. here's relative code: <window x:class="testproj.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:testproj" xmlns:localconverters="clr-namespace:testproj" x:name="this" height="650" width="1091" loaded="this_loaded" closing="this_closing"> <window.resources> <local:booltovisibilityconverter x:key="converter"/> </window.resources> <grid height="auto"> <grid.resources> ...

.Net Framework 4.5.3 missing from targeting list in visual studio 2013 -

i have installed .net framework 4.5.3 on machine visual studio not showing version in targeting list. thing happening loading project needs .net framework 4.5.3 . while loading, vs tells me have either change 4.5 or download version required. choosing download option opens browser link: http://go.microsoft.com/fwlink/?prd=12485&pver=12&sbp=targetpackmissing&plcid=0x409&o1=.netframework,version=v4.5.3 which not open , redirects me microsoft home page. any solutions?

changing field in a set object in mongodb -

i have document in mongo: { id: objectid, list: [ { id: internalobjectid1, enabled: true }, { id: internalobjectid2, enabled: false }] } i need change enabled field. how can it? use positional $ operator . suppose have following document in collection list element value array of embedded documents: { "_id" : objectid("551be1a04db8a16ac729432e"), "list" : [ { "id" : objectid("54f43159c922ac0b4387ef9c"), "enabled" : true }, { "id" : objectid("54f43159c922ac0b4387ef9d"), "enabled" : false } ] } the following update value of enabled field in embedded document id of 54f43159c922ac0b4387ef9d true : db.collection.update( { "_id": objectid("551be1a04db8a16ac729432e"), "list.id": ob...

sql - Inserting data in another table having different data structure in oracle -

i have table table1 item_code desc month day01 day02 day03 fg0050bcyl0000cd cyl head feb-15 0 204 408 fg00186cyl0000cd power unit feb-15 425 123 202 i want insert data in table table2 table1 in such way. item_code month date quantity fg0050bcyl0000cd feb-15 01-feb-2015 0 fg0050bcyl0000cd feb-15 02-feb-2015 204 fg0050bcyl0000cd feb-15 03-feb-2015 408 fg00186cyl0000cd feb-15 01-feb-2015 425 fg00186cyl0000cd feb-15 02-feb-2015 123 fg00186cyl0000cd feb-15 03-feb-2015 202 please tell me how achieve via pl sql the following should close: begin arow in (select * table1) loop insert table2(item_code, month, "date", quantity) values (arow.item_code, arow.month, to_date(arow.m...

jsf - Validation password doesn't work in p:dialog -

i'm using primefaces 4.0 , i'm trying use dialog change password. used password component job n't work in dialog works fine when i'm not using dialog. here code <h:form> <p:dialog widgetvar="changepw" resizable="true" appendto="@(body)" modal="true" closable="false" id="changepw"> <p:panel header="change password"> <p:messages id="messages" showdetail="true" showsummary="false" autoupdate="true" /> <h:panelgrid columns="2" id="matchgrid"> <h:outputlabel for="pwdnew" value="new: *" /> <p:password id="pwdnew" value="#{passwordbean.newpw}" feedback="true" match="pwdconf" required="true" ...

sql - Cannot insert multiple lines in Sqlite using C# -

i know simple question cannot find answer can me. i'm using c# in order connect sqlite database , insert data. here code : private void opendb() { this.m_handle = new sqliteconnection("data source=" + m_filename + ".sqlite3;version=3;"); this.m_handle.open(); } private void closedb() { this.m_handle.close(); } private void createdb() { this.opendb(); string query = "create table streamingurl ([url] varchar(255) not null, [daterequest] text not null);"; sqlitecommand command = new sqlitecommand(query, this.m_handle); command.executenonquery(); this.closedb(); } public void addstreamingurl(string url) { this.opendb(); string query = "insert streamingurl (url, daterequest) values ('" + url + "', datetime('now', 'lo...

Share Maven run configurations with other developers using Intellij IDEA -

we have following project setup: maven, eclipse, subversion. eclipse launch configurations in separate docs folder next pom.xml . launch configurations run mvn clean install -pdev or mvn tomee:run -pl something-ear the thing shared run configuration picked ide , shown in external tools run commands. way, every developer checks out project has access run build. we have similar using intellij idea, haven't found equivalent. have considered far: share run scripts my first idea replace launch configurations run scripts. not figure out how have run scripts run inside intellij idea way maven goal executed. share idea project configuration the idea project configuration (specifically .idea/runconfigurations ) inside checked out directory not solution. have (speaking 1 idea project different idea modules depending on task @ hand: developer might need multiple idea modules (and sub-modules) in same idea project an idea project consisting of following modules not unusal...

asp.net - Call server side dropdown list onchange function from javascript -

is there way call server side drowndown list on change event call javascript.. <script> // change value of asp.net dropdown list // call onchange event of dropdown list </script> you can try adding web methods in code behind can called through javascript or jquery ajax.

java - Connect bluetooth from android to computer(paired devices) -

so, want application connect pc , use android touch pad. iv been doing lot of research on net, didn't find anywhere how connect phone pc. made pair device function , else, need connection method, or @ least how done. here code: public class mainactivity extends activity { private bluetoothadapter adapter; private intent turnon; private set<bluetoothdevice> paireddevices; private listview lv; private button on,off,paireddevice,discoverable,neardevices; private list<bluetoothdevice> discovereddevices = new arraylist<bluetoothdevice>(); private handler mhandler; private static final uuid my_uuid = uuid.fromstring("04c6093b-0000-1000-8000-00805f9b34fb"); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); initialize(); buttonfunc(); find(); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if...