Posts

Showing posts from July, 2010

Laravel 5 Events and Queue -

as mentioned in laravel docs ( http://laravel.com/docs/5.1/events#defining-listeners ), can make listener queued. makes possible run events in asynchronous manner. i went more deep this, , found out can have event fired in separate laravel installation, long use same queue instance(beanstalkd in case) , share same listener (the listener class should defined in both installations). now need more information regarding this. is ok? mean, works now, considered "hack"? there library or way this? how can have distributed events using this? mean, when fire event somewhere, there listeners fired somewhere else. not on same installation, , of them has fired. not achievable current setup. i think i'm looking distributed event system laravel, i'm not sure... you don´t need queue achieve this. had similar problem , solve @ way: if want send events frontend on machine recommend use broadcasting events . can use redis or pusher. if want send events b

c++ - std::ifstream issue when running outside of IDE -

i have function works fine when running inside of visual studio debugging environment (with both debug , release configurations), when running app outside of ide, end-user do, program crashes. happens both debug , release builds. i'm aware of differences can exist between debug , release configurations (optimizations, debug symbols, etc) , @ least aware of differences between running app inside visual studio versus outside of (debug heap, working directory, etc). i've looked @ several of these things , none seem address issue. first time posting so; can find solution existing posts i'm stumped! i able attach debugger , oddly enough 2 different error messages, based on whether i'm running app on windows 7 versus windows 8.1. windows 7, error access violation , breaks right on return statement. windows 8.1, heap corruption error , breaks on construction of std::ifstream. in both cases, of local variables populated correctly know not matter of function not b

haskell - How to prevent profiling dependency issue before Genesis -

it know profiling large packages require destroying , rebuilding world . however, there anyway avoid when starting fresh? how can enable benchmark , profiling first time install ghc platform on new machine?

function - R: cannot open file 'specdata/001.csv': No such file or directory -

i'm pretty new r, , after researching error extensively, i'm still not able find solution. function created in r determine complete cases in directory 332 .csv files. complete <- function(directory, id = 1:332) { s <- vector() (i in 1:length(id)) { path <- c(paste(directory, "/",formatc(id[i], width=3, flag=0),".csv",sep="")) data <- c(read.csv(path)) s[i] <- sum(complete.cases(data)) } dat <- data.frame(cbind(id,nobs=s)) return(dat) } when want test function, giving following command (specdata directory .csv files stored) complete("specdata", 1) i keep getting following error: error in file(file, "rt") : cannot open connection in addition: warning message: in file(file, "rt") : cannot open file 'specdata/001.csv': no such file or directory i checked working directory i checked files within directory cannot detect problems there. thi

java - Where to start when trying to retrieve data with requests and responses coded in XML and HTTP is the protocol -

to start, newbie programmer , have taken on summer job after finishing first year in college year. have been asked write code program requests , responses coded in xml. have been told requests made via post command , both request parameters , responses carried out in body of http sent , received specific url. have been given command format example: <?xml version="1.0" encoding="utf-8"?> <cmd action="read_val" user="username" password="*****"> <val cid="0" node="1" vid="100" set="5" nodetype="16"/> </cmd> i have searched high , low , have found loads of different information on topic there technical me @ moment. need 'baby steps' help. small company , there no other programmers ask questions , advice. i learning java in college , have used site many times , have found useful. can open sockets, bind sockets etc in java , read in da

javascript - How to add height and width to Jquery function -

i working jquery script found online ticketing software. adds functionality of adding videos wiki. problem not set height or width video possible can done code? if ($('#ideditarticle')) { var videos = $('a[href$=".m4v"], a[href$=".mp4"]'); $.each(videos, function(i, video) { $(video).parent().prepend('<video src="'+$(video).attr('href')+'" controls></video><br/>'); }); } here output in html <p> <a border="0" class="fb_attachment" href="default.asp?pg=pgdownload&amp;pgtype=pgwikiattachment&amp;ixattachment=136818&amp;sfilename=paragon%20invoice%203.mp4" rel="nofollow" title="">paragon invoice 3.mp4</a></p> even if possible manually add html. can't add inline css elements. tried wrapping div won't take inline style deletes upon submission. can add height , width jquery code a

Multiple linear regression for a dataset in R with ggplot2 -

Image
i testing make analysis of sentiment on dataset. here, trying see if if there interesting observations between message volume , buzzs, message volume , scores... there dataset looks like: > str(data) 'data.frame': 40 obs. of 11 variables: $ date time : posixct, format: "2015-07-08 09:10:00" "2015-07-08 09:10:00" ... $ subject : chr "mmm" "ace" "aes" "afl" ... $ sscore : chr "-0.2280" "-0.4415" "1.9821" "-2.9335" ... $ smean : chr "0.2593" "0.3521" "0.0233" "0.0035" ... $ svscore : chr "-0.2795" "-0.0374" "1.1743" "-0.2975" ... $ sdispersion : chr "0.375" "0.500" "1.000" "1.000" ... $ svolume : num 8 4 1 1 5 3 2 1 1 2 ... $ sbuzz : chr "0.6026" "0.7200" "1.9445" "0.8321

database - PHP mysqli adding multipe entries for one insert -

the following short php code should adding 1 entry database table. when run find 3 identical entries. mysql server version: 5.5.39 - mysql community server php/5.4.31 <?php // connect temp db $db_host = "localhost"; $db_username = "root"; $db_password = ""; $db_name = "tempdb"; // create connection $conn = new mysqli($db_host, $db_username, $db_password, $db_name); if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } $mysqlstr = " insert tempproduct ( `productname`, `merchantid`, `merchant`, `mylink`, `thumbnail`, `bigimage`, `price`, `retailprice`, `category`, `subcategory`, `description`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `lastupdated`, `productstatus`, `manufacturer`, `partnumber`, `merchantcategory`, `merchantsubcategory`, `shortdescription`, `isbn`, `upc`, `sku`, `crosssell`,

dns - How do you convert a textual domain into an IPv6 in Java? -

how can convert textual domain ( dns ) www.abc.com equivalent ipv6 address fe80:0000:0000:0000:0202:b3ff:fe1e:8329 ? i tried using inet6address ended ipv4 address. example: inet6address.getbyname("www.abc.com").gethostaddress(); gave me like: 129.42.38.1 so i'm not sure issue in this.

mean stack - How to Query Subdocuments of 1 Schema that match the contains of another Model Subdocument Schema -

i writing mean stack application defines 2 (2) models. var job = db.model('job', { ... kind: { baby: false, pet: false, house: false, } }); var person = db.model('person', { ... kind: { baby: false, pet: false, house: false, } }); i create kind field sub-document since getting stored in field input of type checkbox in angularjs app. my question relates query of job person has same kind equal true. for example, if person has checked baby , pet in profile query jobs have baby , pet true. is way store checkbox inputs html form in mongodb? if so, query string achieve results. if not, correct way store checkbox inputs in mongodb? i dont know amount of data involved in people , jobs collections neither purpose of query/main objective of app. based on that, here thoughts: have angular service data people , jobs collections , store app loads. everytime checkbox checked/unchecked u

ios - Can't insert object in the array, that I want add to User Defaults -

i have initialization of array var defaults = nsuserdefaults.standarduserdefaults() var initobject: [cpaymentinfo]? = defaults.objectforkey("paymentdata") as? [cpaymentinfo] if initobject == nil { initobject = [cpaymentinfo]() defaults.setvalue(initobject, forkey: "paymentdata") } defaults.synchronize() and have controller, contains 2 text labels , 2 buttons: save , cancel (both calling segue) if sender as? uibarbuttonitem == savebutton { var defaults = nsuserdefaults.standarduserdefaults() var payments: [cpaymentinfo]? = defaults.objectforkey("paymentdata") as? [cpaymentinfo] var newpaymentitem: cpaymentinfo? if discriptionfield.hastext() { newpaymentitem = cpaymentinfo(value: (valuefield.text nsstring).doublevalue, discription: discriptionfield.text) } else { newpaymentitem = cpaymentinfo(value: (valuefield.text nsstring).doublevalue)

java - How to integrate javascript in vaadin (eg OpenStreetMap)? -

is possible create javascript elements openstreetmap or jquery inside vaadin application? because vaadin websites created programming in java , letting compiler autocreate dom , javascript out of it? so, possible @ all? you can create such integration abstractjavascriptcomponent the basic idea here subclass class, annotate @javascript pull in needed js libs. write @ least global function, sets lib in dom (you have <div> @ disposal). component can hold state, server side can call defined functions on client (while sending e.g. state) , client can call server functions (params passed json). the wiki has example how include such component

recursion - How do I break results sets into smaller subsets for subtotaling/hierarchical purposes in PHP? -

i have sizable results sets being returned mysql db need break smaller sets either: adding numbers within subsets subtotaling purposes; or for creating hierarchical table. the tricky part though need divide results set more once, , number of subdivisions can change per table. example, might have break results set year , month in order produce subtotals each year/month combination. i'm trying write php function can take results set , columns split data on , produce new results set divided up. example, if split data year , month, i'd want have following structure returned: array( 'divider' => 'year', 'sets' => array( [0] => array( 'divider' => 'month', 'sets' => array( [0] => array(), //row returned db [1] => array(), //row returned db [2] => array(), //row returned db ... ) ), [1] => array( 'divider' => 

objective c - iOS Basic Auth completion error first time -

i have implemented piece of code basic auth , doesn't work on first time: func dorequestwithbasicauth(completion : (success : bool, html: string?, error : nserror?) -> void) { if let user = self.user { let loginstring = nsstring(format: "%@:%@", user.login!, user.pwd!) let logindata: nsdata = loginstring.datausingencoding(nsutf8stringencoding)! let base64loginstring = logindata.base64encodedstringwithoptions(nil) let url = nsurl(string: user.service!.geturl()) let request = nsmutableurlrequest(url: url!) request.httpmethod = "post" request.setvalue("basic \(base64loginstring)", forhttpheaderfield: "authorization") nsurlconnection.sendasynchronousrequest(request, queue: nsoperationqueue.mainqueue()) {(response, data, error) in if error == nil { let htmlstring = nsstring(data: data, encoding: nsutf8stringencoding) completion(

Converting Oracle query to MySQL query. all_indexes -

i'm trying convert oracle query mysql query. my oracle query has this: create or replace procedure myproc() iname all_indexes.index_name%type; oname all_indexes.owner%type; begin // end; how can port mysql, since mysql doesn't have all_indexes public environment variable? just use varchar datatype create or replace procedure myproc() begin declare iname varchar(50); declare oname varchar(50); // end; you can query information_schema.statistics obtain names od indexes select * information_schema.statistics demo: http://sqlfiddle.com/#!9/88321/1

php - Difference between $em->find(..) and $em->getRepository(..)->find(..) -

there entity /** * @orm\entity(repositoryclass="some\namspace\customrepository") * @orm\table(name="image_type") */ class myentity{...} and customrepository extends entityrepository override methods find or findall documentation says: // $em instanceof entitymanager $user = $em->find('myproject\domain\user', $id); essentially, entitymanager#find() shortcut following: $user = $em->getrepository('myproject\domain\user')->find($id); link:doctrine-orm.readthedocs.org but customrepository works $em->getrepository('entities\myentity')->find($id) using $em->find('entities\myentity',$id); ignoring overrided methods in customrepository so bug? or there's difference between construcions? how can overide find , finall , ... methods entity without overriding entitymanager? edit (1) using composer: "require": { "doctrine/orm": "~2.4" }, fin

xlsx to XML conversion php code for Codeigniter -

Image
i looking php code converts xlsx(excel) xml file. looked everywhere couldn't anything. great if can guide me or share me her/her code? thanks, given tip mark baker gave can give guide how use phpexcel library first of download phpexcel here . open zip file , extract entire content within classes folder third party folder your third party folder shoud like after create library named excel.php , place direct libraries folder - file shoud looke like <?php if ( ! defined('basepath')) exit('no direct script access allowed'); require_once apppath."/third_party/phpexcel.php"; class excel extends phpexcel { public function __construct() { parent::__construct(); } } now have load library like $this->load->library("excel"); and phpexcel available intended purpose example can use reader object like $objreader = phpexcel_iofactory::createreader($inputfiletype); $objphpexcel = $objreader->l

how to add variable in array element in php? -

code: public $img_config = array('thum_img' => array( 'image_ratio_crop' => true, 'image_resize' => true, 'image_x' => 175, 'image_y' => 240 ), 'small_img' => array( 'image_ratio_crop' => true, 'image_resize' => true, 'image_x' => 110, 'image_y' => 35 ), 'parent_dir' => 'productimages', 'target_path' => array( 'thum_img' => www_root . 'productimages' . ds . 'thum' . ds, 'small_img' => www_root . 'productimages' . ds . 'small' . ds ) ); this not work. www_root . 'productimages' . ds . 'thum' . ds, , www_root . 'productimages' . ds . 'small' . ds reason of error. doing wrong? http://docs.php.net/language.oop5.properties says: properties [...]

php - Creating select from wordpress dropdown -

i using function below output categories onto form other inputs. <?php wp_dropdown_categories();?> how able use option selected dropdown , give name can posted along other form items? <?php wp_dropdown_categories( $args ); ?> <?php $args = array( 'show_option_all' => '', 'show_option_none' => '', 'option_none_value' => '-1', 'orderby' => 'id', 'order' => 'asc', 'show_count' => 0, 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 'id' => '', 'class' => 'p

java - Android Voice Control - don't get all words -

i have problem voice control. if “select”, voice control recognizes , returns word = “select”. if “bar code”, voice control recognizes nothing , returns word = “”. but problem “bar code” ! every word (“next”, “forward”…) works. maybe know can solving problem. thanks

arrays - Notice: Trying to get property of non-object in C:\xampp\htdocs\xxxx\xxx\blog.php on line 36 1:00 am, January 1 -

i trying build blog site php , mongodb. built homepage in comment page errors this: fatal error: call undefined function mongoid() in c:\xampp\htdocs\mydoc\kazma\comment.php on line 11. here code: <?php $id = $_post['article_id']; try { $mongodb = new mongo(); $collection = $mongodb->myblogsite->articles; }catch (mongoconnectionexception $e) { die('failed connect mongodb '.$e->getmessage()); } $article = $collection->findone(array('_id' => mongoid($id))); $comment = array( 'name' => $_post['commenter_name'], 'email' => $_post['commenter_email'], 'comment' => $_post['comment'], 'posted_at' => new mongodate() ); $collection->update(array('_id' => new mongoid($id)), array('$push' => array('comments' => $comments))); header('loca

json - Appending url direct in mvc controller -

having problem since deployed app. lot of pages aren't loading because if have either configured wrong created wrong. i have line in controllers: return json(new { ok = true, newurl = (@url.content("~/maintenance/_titledetails")) }, "application/json", jsonrequestbehavior.denyget); (based use in view works. loads url as http://ip..../~/maintenance_titledetails and such failing because there should app name ~ is. this works view put razor specific. having same issue html generated links also. can point me in right direction please best way of doing this? edit have tried capture context in c# failed also. system.web.httpcontext curcontext = system.web.httpcontext.current; return json(new { ok = true, newurl = (curcontext + ("/maintenance/_titledetails")) }, "application/json", jsonrequestbehavior.denyget); http://162.168.0.1/system.web.httpcontext/maintenance/_titledetails 404 (not found) edit 2 wo

eclipse - How do I hide Menu whose children are hidden? -

i have menus on main menu in eclipse 4 application project children contributed of fragments different plugins. have applied permissions on sub-menus according logged in user. problem after no sub-menu of menu has permission , none of them visible still menu visible. want hide menu. suggestions. update: class model processor , plugin.xml public class menuprocessor { public menuprocessor(){} @execute public void execute(@named("application_luna.menu.contract(fo)") mmenu menu) { if(menu.getchildren().isempty()) menu.setvisible(false); } } <extension id="com.swte.approval.ui.fragment" point="org.eclipse.e4.workbench.model"> <fragment uri="fragment.e4xmi"> </fragment> <processor apply="always" beforefragment="false" class="com.swte.approval.ui.menuprocessor1"> <element id="application_luna.menu.contra

python - Mininet script for generic Tree topology with custom bandwidth links -

previously created mininet topology using command: sudo mn --topo tree,depth=2,fanout=5 --controller=remote,ip=10.0.0.1,port=6633 --switch ovsk,protocols=openflow13, --link tc,bw=1,delay=10ms i need specify custom bw values different links. how make tree in generic way, specifying depth , fanout values treenet mentioned here ? need setlink(int value, src, dest) modify links of tree created. till have this: #!/usr/bin/python functools import partial mininet.cli import cli mininet.link import tclink mininet.log import setloglevel mininet.net import mininet mininet.node import ovskernelswitch mininet.node import remotecontroller mininet.topo import topo mininet.util import dumpnodeconnections class mynet( topo ): def __init__( self ): "create custom topo." # initialize topology topo.__init__( self ) # add hosts h1 = self.addhost( 'h1' ) h2 = self.addhost( 'h2' ) ... h

javascript - How to prevent the insertion of rows/columns in Handsontable? -

i'm using handsontable ( http://handsontable.com/ ). want keep ability drag corner of cell have don't want user drag past table itself, creating more rows and/or cells. how achieve this? i've tried following doesn't anything: allowinsertrow: false you can define maxrows , maxcols have respective maximum number of rows , columns pre-defined. way, user cannot add new rows or columns. var hot = new handsontable(container, { maxrows: 2, maxcols: 4 }); also, pay attention not include minsparerows option , hide context menu.

gcc - how to override functions from stdlib -

i override strcpy , supply own implementation, in strcpy want , call original strcpy. how can that? i'm working on linux, compiling gcc, read built in functions provided gcc, i'm not sure if that's way need, tried use flag -fno-builtin-strcpy, , in strcpy call __builtin_strcpy, somehow doesn't work expected , cause problemes: char *strcpy(char *dest, const char *src) { if(......) { ----do something--- } return __builtin_strcpy(dest,src); } i guess might able playing linking order or excluding standard libraries not that. if sw has long life , multiple maintainers, there maintenance problems @ point. why don't create new strcpy instead? char *my_new_strcpy(char *dest, const char *src) { if(......) { ----do something--- } return strcpy(dest,src); } and use need. or not meet requirements?

shell - Use "Touch -r" for several files with automator -

i use "macos x yosemite (10.10.4)" i've converted video mts files mov files using quicktime, new file created doesn't preserve original creation date. filea.mts --> creation date: 07/02/2010 10:51 filea_converted.mov --> creation date: today 8:35 i'd change creation date attribute of several files, using date of original files. know can using terminal "touch" command in order this: touch -r filea.mts filea_converted.mov touch -r fileb.mts fileb_converted.mov as have more 200 files change creation date, possible automate using automator script shell action, or other way? like in bash shell - in terminal (untested): #!/bin/bash orig in *.mts; # generate new name old 1 new="${orig/.mts/_converted.mov}" echo touch -r "$orig" "$new" done save above in file called dodates , type in terminal chmod +x dodates # make script executable ./dodates # run

SQL query to ignore case in where condition -

i trying run below sql query.$1 passing parameter. need case insensitive. eg: test.sql server1.net , test server1.net ( both values should taken, think below query takes parameter in lowercase default) requirement is, irrespective of case, whatever values have given, query should process. please ? select * act_msgs m,node_name nn msg_name '%test%' , nn.node_name = '$1' in tsql can use upper function as: declare @vartest varchar(100); set @vartest = upper('test') select * act_msgs m,node_name nn upper(msg_name) '%' + vartest +'%' , nn.node_name = '$1'

ios - UITableView Selection Issue -

i have uitableview 3 sections. , have radio buttons in each cell of each section. need select 1 radio button in each sections @ time. means need select 3rd cells radio button in section1 , 1st cells radio button in next section , on. bt problem if select 1 radio button in 1 section , if try select other cells in other section, previous selected radio button replaced newly selected radio button.and add radio buttons cells accessoryview. please me. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ uitableviewcell *cell=[tableview dequeuereusablecellwithidentifier:@"cell"]; if (cell==nil) { nsarray *nib=[[nsbundle mainbundle]loadnibnamed:@"nib" owner:self options:nil]; cell=[nib objectatindex:0]; } cell.my_label.text=@""; cell.labelkwd.hidden=true; uibutton *newradiobutton; newradiobutton = [uibutton buttonwithtype:uibuttontypecustom]; newradiobutton.

sql - Any way to avoid a union in this Oracle query? -

i have table this: +-------+--------------+--------------+-------------+-------------+-------------+-------------+ | study | point_number | date_created | condition_a | condition_b | condition_c | condition d | +-------+--------------+--------------+-------------+-------------+-------------+-------------+ | 1 | 1 | 01-01-2001 | 1 | 1 | 0 | 1 | | 1 | 2 | 01-01-2001 | 0 | 1 | 1 | 0 | | 1 | 3 | 01-01-2001 | 0 | 1 | 0 | 0 | +-------+--------------+--------------+-------------+-------------+-------------+-------------+ the condition_a, b, c , d used classify data points groups. each unique combination of columns group. each group, want retrieve last 200 rows. at moment have this: select * my_table point_number <= 200; in order each group do: select * my_table point_number <= 200 condition_a = 1 , cond

recursion - Python recursive file renaming -

i pretty new python , attempting create python script able recursively rename every file in directory including subdirectories. every time run script i'm getting error oserror: [errno 2] no such file or directory the directory contains text files , folder other files. does know why keeps happening? code: import os path = "example path here" new_filename= "" = 0 filenames = os.listdir(path) # line needed? dir,subdir,listfilename in os.walk(path): filename in listfilename: += 1 new_filename = 'filename' + str(i) src = os.path.join(path, filename) dst = os.path.join(path, new_filename) os.rename(src, dst) i'm issue stems joining new paths "path" variable rather current directory returned walk . import os path = "example path here" new_filename= "" # isn't c, don't need pre-declare variable. = 0 filenames = os.listdir(path) # line needed? # not ca

Need help regarding add to card fly animation in android -

Image
is there library available in android fly image specific area , disappear of shopping apps when user clicks on add cart, particular product flies cart(some sort of animation). how stuff yes, there nice library here looking for. have used , can assure job perfectly. its light-weight , simple use too. add dependency, dependencies { compile( 'com.dk.animation.circle:library:0.1.0@aar') } and run it, this, new circleanimationutil().attachactivity(mainactiviy.this).settargetview(mtargetview).setdestview(mdestview).startanimation(); hope helps you.

vba - Print mail item as pdf -

i attempting save of mail items within folder in outlook pdf. sub pdfconversion() dim outapp object, objoutlook object, objfolder object, myitems object, myitem object dim psname string, pdfname string set outapp = createobject("outlook.application") set objoutlook = outapp.getnamespace("mapi") set objfolder = objoutlook.getdefaultfolder(olfolderinbox).folders("pdf conversion") set myitems = objfolder.items each myitem in myitems myitem.printout copies:=1, preview:=false, activeprinter:="adobe pdf", printtofile:=true, _ collate:=true, prtofilename:="c:\users\lturner\documents\" & myitem.subject & ".pdf" next myitem end sub i using outlook 2007, doesn't have option save mails pdf, hence i'm attempting use .printout method. using above receiving "named argument not found" error. i've looked elsewhere on internet, cannot seem find solution.

java - I get this error in Hadoop, Could not locate executable null\bin\winutils.exe -

i new hadoop system , running following error when attempting file system of hadoop (hdfs) setup hadoop running on ubuntu server 15.05. , java program running on windows using java connect , add files hadoop system. the error is: 15/07/14 11:23:30 warn util.nativecodeloader: unable load native-hadoop library platform... using builtin-java classes applicable 15/07/14 11:23:30 error util.shell: failed locate winutils binary in hadoop binary path java.io.ioexception: not locate executable null\bin\winutils.exe in hadoop binaries. with following line reference: filesystem hdfs = filesystem.get(new uri("hdfs://10.0.0.1:54310"), configuration); update: answered own question after spending 3 hours googling problem, if else experiences problem found answer here i downloaded winutils.exe , placed in c:/bin/winutils.exe i added following line project @ start of function system.setproperty("hadoop.home.dir", "c:\\winutil\\&qu

java - JBOSS - Previos execution of timer is still progress,timer state is IN_TIMEOUT -

i using jboss eap 6.4 . have schedule schedulers in scedulerbean using ejb @shedule annotation follows. here shedulerbean dependson startupbean. @singleton @dependson("startupbean") public class schedulerbean { private logger logger = loggerfactory.getlogger(schedulerbean.class); private schedulerinterface schedulerinterface; @postconstruct public void initialize() { // initialization } @schedule(second = "1/1", minute = "*", hour = "*",persistent = false) public void runschedulers() { logger.info("ejb scheduler pulse start @ : " + new date()); try { schedulerinterface.pulseeverysecond(); logger.info("ejb scheduler pulse end @ : " + new date()); } catch (exception e) { logger.error("error in ejb scheduling : ", e); } } } but, repeatedly getting following warning during jboss deployment. can 1 tell me w

excel - VBS Doesn't stop running -

i have scheduled task launches vb script in turn runs macro within excel. runs fine (as in results want), however, scheduled task remains 'running' , therefore doesn't start again next morning. vb script follows: option explicit dim xlapp, xlbook set xlapp = createobject("excel.application") set xlbook = xlapp.workbooks.open("c:\mypath\my file.xlsm", 0, true) xlapp.run "mymacro" xlbook.close xlapp.quit set xlbook = nothing set xlapp = nothing wscript.quit the end of macro (all preceding code work , saves csv output required): workbooks("my file.xlsm").activate worksheets("outputs").select 'activeworkbook.save 'activeworkbook.close - line cause vbs fail after creating csv application.screenupdating = true application.displayalerts = true end sub how terminate vb script stop scheduled task running? unfortunately realized: workbooks(&q

c# - Dropdownlist in edit mode of a gridview -

in application in c#, when edit row in gridview choose new data dropdownlist. i populating dropdown this: <asp:templatefield headertext="gender"> <itemtemplate> <asp:label id="gender" runat="server" text='<%# eval("gender").tostring() %>'></asp:label> </itemtemplate> <edititemtemplate> <asp:dropdownlist id="ddl_genderlist" runat="server"> <asp:listitem value="" text="---"></asp:listitem> <asp:listitem value="m" text="m"> </asp:listitem> <asp:listitem value="f" text="f"> </asp:listitem> </asp:dropdownlist> </edititemtemplate> </asp:templatefield> but when press 'edit' button template , enters in 'rowupdating' event, selected value dropdownlist every time first

c# - wpf window holds old data after reopening -

i have window displaying a flowdocument binded richtextbox in view. make document use collections a different viewmodel. the first time open window works expected, second time or time after still holds data first time window opened , looks generatereport method doesn't fire again. how can rid of old data , make generatereport method gets updated data. this viewmodel looks like public class reportviewmodel : viewmodelbase { private string _shotlistreport; public string shotlistreport // name property { { return _shotlistreport; } set { _shotlistreport = value; raisepropertychanged(""); } } public reportviewmodel (shotlistviewmodel shotlistviewmodel) { shotlist = shotlistviewmodel.allshots; scenelist = shotlistviewmodel.scenecollectionview; generatereport(); } public listcollectionview scenelist { get; set; } public observablecollection<shot> shotlist { get; set; } priv

split in java for csv file with random content for last field -

split in java csv file last field content including splitter symbol. sample input line. 2010-10-06 09:02:10,498 [renderingqueue] info [renderingqueue]: waiting next command... . .. so far used blank separator (6 fields, 5 separations) . thought separating on blank fine untill last field (6) after - - [renderingqueue]: ---- ( = field 5) field 6 should contain afterwards. in sample line field 6 contains "waiting next command..." . field 6 can contain blanks , semicolon, double point,words , : etc.. of length . split statement specify 5 splits , afterwards in field 6 . beforehand. my code : while ((line = br.readline()) != null) { // // split line array of 1 dimension string [] splittedline = new string [6]; splittedline = line.split(" ",5); // // show content in console (for test purposes) // for(int i=0; i<5; i++){

mysql - how to insert record to database with checkbox other option in php? -

Image
i have form : i confused how put database. have code : echo "<form action='insert.php'>"; $data = array("rice","fish","pizza","other"); for($i=1; $i<5; $i++){ echo "<input type='text' name='food[]' value='$i' class='food'><label>$data[$i]</label>"; } echo "<input type='submit' value='ok'>"; echo "</form>"; <script> $(".food").change(function () { if (this.checked && this.value=='4') { $(this).next("label").after("<p id='other-text'><input placeholder='please enter food' type='text' name='otherfood[]' /></p>") } else { $("#other-text").remove(); } }); </script> database: order id id_food other ---------------------

javascript - Populate select menu onChange -

i have bootstrap select menu want populate onchange select menu. think have problems returning data php. select menu: <div class="col-md-6" style="width:100%;margin-bottom: 10px;"> <div class="input-group" style="width:100%;"> <span style="width:50%;" class="input-group-addon" id="basic-addon1">municipality *</span> <select class="selectpicker" name="object_municipality" id="object_municipality"> <option value="0" selected="selected" >municipality *</option> </select> </div> </div> javascript function (called onchange select menu) populate select menu: function populate_obcina(value) { if (window.xmlhttprequest) { xmlhttp=new xmlh

Does R automatically remove '.' from data.frame column names? -

does d1$patient....age = d1$patient....age ? i'm guessing these simple concept causes behaviour. reliable behaviour predictable? ie: if name data.frame column a...b can references $a ? the example provided in source doesn't explain i'm seeing in r. from http://biostat.mc.vanderbilt.edu/wiki/pub/main/svetlanaedenrfiles/regexprtalk.pdf d1 = data.frame(id...of....patient = c(1, 2), patient....age = c(3, 4)) d1$patient....age #[1] 3 4 d1$patient #[1] 3 4 d1$age #null d1$id...of....patient #[1] 1 2 d1$id #[1] 1 2 d1$id...of #[1] 1 2 names(id) #null names(d1) #[1] "id...of....patient" "patient....age" r's $ operator accepts unambiguous prefix of column name referring column. has nothing . s. for example, try: d1$id...of....patient # [1] 1 2 d1$id...of....pati # [1] 1 2 d1$id...o # [1] 1 2 this true whether or not there dots in column name: mtcars$disp , mtcars$dis , , mtcars$di return disp column of mtcars dataset. (however,

objective c - Backwards compatibility of Swift for versions back to iOS 5 -

this question has answer here: swift ios 5 deployment target [duplicate] 2 answers i haven't studied objective-c yet, except basics. backward compatibility, ios app work example ipod touch 3rd gen. (ios 5) , new iphone 6 (ios 8) also. in case need use swift yet? edit: idea @ moment make cheap apps ios, android , windows phone developing countries , others well. why i'm interested in backward compatibility (not swift development), because there people buy used devices , still might able buy apps devices. when asked question uncertain how far can go ios versions. swift's min deployment target ios 7. so, no, if want support ios 5 (which completely nuts imho), you'll need use objective c. also, doesn't apple remove support objective c in near future, there no need switch swift anyway, still free decide language prefer.

android - How to filter list view using search edittext with JSON url -

am using edittext search form json url datas, give search field. search each letter type on edittext filter listview , @ same time listview reload, if edittext empty show current list. how please me... @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.electronic_main); search = (edittext) findviewbyid(r.id.text_search); listview = (listview) findviewbyid(r.id.listview); search.addtextchangedlistener(new textwatcher() { @override public void beforetextchanged(charsequence s, int start, int count, int after) { } @override public void ontextchanged(charsequence s, int start, int before, int count) { arraylist<hashmap<string, string>> arraytemplist = new arraylist<hashmap<string, string>>(); string searchstring = search.gettext().tostring().tolowercase(locale.getdefault()); listview.sett

reporting services - SSRS drill through report -

i creating 2 ssrs reports. first report lists names of of elements in dataset. so, when click on of element of first report second report should display definition of element. second report's dataset contains definition of elements. when click on element name first report, should pass name second report. how should this? click on textbox field, , select action property select "go report" action, specify subreport "add" paramter, , pass field's value it something =parameters!yourelements.value see here https://msdn.microsoft.com/en-us/library/ms159847(v=sql.90).aspx