Posts

Showing posts from February, 2014

javascript - Customer parameter are not going through for file delete -

i have setup directly upload image s3 bucket , using fine uploader that. i trying send filename parameter (to end point) while deleting file. given below callback snippet . ondelete: function(id) { $(this).setdeletefileparams({ filename: this.getname(id) }); } it working fine newly uploaded files, have files through initiallist (option) , when try delete them filename param not going through. you not using jquery wrapper correctly. 1 of many reasons why i have suggested avoiding jquery , jquery wrapper , "vanilla" api more intuitive. you've left out code, looks declaring event handler property of callbacks config object, means can avoid jquery wrapper entirely. ondelete: function(id) { var name = this.getname(id); this.setdeletefileparams({filename: name}, id); } but code not necessary, fine uploader s3 sends name of object in s3 "key" parameter delete request .

c# - Settings randomly not available -

i've started visual c#, surprising success, i've run issue, drives me crazy. this problem applies i've tried write , i've not yet managed formulate successful google search answer question. i use tabs form, various tabs "work" plus 1 tab contains bunch of textboxes config data, servername, logins, , on. i've managed save settings using builtin settings feature. now here's problem: launch application, access settings tab, enter settings, close application. when restart application previous settings retained. far good. however, these textboxes contain correct info whenever click on settingstab, return empty string when accessed method. behaviour random, launch application, settings can accessed, close it, restart settings gone, next time they're there gone again. but, if access settings tab, prior running method fine. does make sense anyone? define application settings , assign them textboxes in settings tab , save them properties....

java - I downloaded FDFToolkitForJava , and I put the JAR file in my classpath. How exactly you create a FDF template? any step by step document? -

how create fdf template. using template when input data suitable template , pdf should generated. 1) user designs template in ms word. (assume last name, first name) 2) should able use template , type in last name , firstname. 3) pdf should generated based on template , data input given. trying use adobe fdf , insights appreciated because need fillable pdf form in order use fdftoolkit, first create such form in acrobat, starting word file. when done, fill out, , export data fdf. and that's how fdf has like. as fdftoolkit reading , interpreting fdfs, in experience, easier assemble fdf according strings, , not bother fdftoolkit.

iteration - Loop over List to fetch key & value pairs using Java -

this response receive: [{rollno=1066276530, rollvalue=1815401000238}] this cast list<map<string, string>> leadids . want iterate these leadids key & value pairs. have tried in way, returning key "1066276530" , value "rollno", whereas expecting key "1066276530" , value "1815401000238". here code for (map<string, string> map : leadids) { (map.entry<string, string> entry : map.entryset()) { string rollno = string.valueof(entry.getvalue()); string rollvalue = string.valueof(entry.getkey()); log.info("[status search] roll no:" +rollno + " roll value:" + rollvalue); } } look @ log statement. have switched around number , id: log.info("[status search] application id :"+applicationnumber+ " application number :"+appid); should be: log.info("[status search] application id :"+appid+ " application...

Twilio click-to-call user can hear but not be heard -

i'm using twilio click-to-call conference calls. there chrome user in portugal able hear call couldn't speak. his microphone works when speak him skype. qiqochat apparently connected microphone, because couldn't connect skype until closed app (apparently release mic). how recommend troubleshoot this? worked 20 other users fine not one.

Fitting a student t distribution in R using fitdistr() yields error “non-finite finite-difference value” -

reproducable example give mentioned error code every time is: (note without set.seed, error comes every time) library(mass) set.seed(seed = 1) data<-rnorm(n = 10000,mean = 0.0002,sd = 0.001) fitdistr(x = data,densfun = "t") the error message is: error in stats::optim(x = c(-0.000426453810742332, 0.000383643324222082, : non-finite finite-difference value [2] in addition: warning message: in log(s) : nans produced the problem "non-finite finite-difference value". fitdistr not give me result. my knowledge: researched , apparently mean parameter negative during iteration. , solution provide better or @ least different starting value. not figure out how , not sure if issue. my question: a) why error message , b)how can fix in r, can fit student-t distribution distributed data?

android - Text input field doesn't work on smartphone -

i'm developing application in html5 i'll turn in android app (using webview) via ludei framework. have php page, hosted on website, part of app. created link sidebar menu of app shows page. when try write in text field of php page, can type numbers not letters. if try open same page smartphone browser, works great without errors! what can do!? problem of app... i tried using form style, , include php page iframe, still doesn't work... doesn't differences between text input field, e-mail input field, url input field... shows classic querty... thanks in advice =) code of php page: <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" /> <meta name="apple-mobile-web-app-capable" cont...

c++ - IONA ORBIX Corba::SystemException with Minor Code 12003 -

i receiving corba::unknown systemexception minor code: 12003 when attempt invoke api defined in idl file supplied me. i running iona orbix 3.3 , have looked in programming documentation , cannot find associated systemexception minor code 12003. know causing exception? thanks.

1080x1080 photos via Instagram API -

http://www.theverge.com/2015/7/6/8899807/instagram-1080p-pictures-photo-upload the verge made known latest app versions of instagram uploading photos in 1080x1080 resolution. these photos can sourced via html when browsing site's source code. can these accessed via official instagram api? , if so, how? not sure why getting down-voted, no, resolution not returned api @ moment. however, can "guessed" other resolutions returned api, change @ time. example, given standard resolution json: "standard_resolution": { "url": "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s640x640/e35/sh0.08/11370971_837216559694773_771634899_n.jpg", "width": 640, "height": 640 } remove size part ( s640x640 here) , 2 paths follows ( e35/sh0.08 picture, different yours) end url 1080x1080 : https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/11370971_837216559694773_771634899_n.jpg this ...

Add Dynamic Flex Tables with unique names in Java GWT -

i need create dynamic flex tables unique names. consider example, flextable ft1= new flextable(); flextable ft2= new flextable(); flextable ft3= new flextable(); flextable ft4= new flextable(); i want each flex table created unique name.how can done dynamically? options each of widgets: ft1.getelement().setid("id1"); ft1.getelement().setpropertystring("name", "name1"); ft1.getelement().setattribute("name", "name1");

Can I fix Groovy indenting in Vim? -

i trying use vim groovy code @ work. doesn't seem handle autoindents when semicolons not used. i've found few questions related ruby , javascript same issues, none of fixes find work me. have filetype plugin indent on in .vimrc, , not set cindent , autoindent , or smartindent . i've tried running setlocal nocindent nosmartindent in groovy buffer , reindenting file ggvg= in case there's plugin setting behind scenes, , still gets wrong. for example, on small sample (from personal libgdx sandbox app i'm writing in groovy) @override void render () { gdx.gl.glclearcolor(0.75f, 0.75f, 0.75f, 1) gdx.gl.glclear(gl20.gl_color_buffer_bit) batch.begin() batch.draw(img, 0, 0) font.draw(batch, "testing", 300, 400) batch.end() } notice indents after annotation, opening brace, , first line of function. .vimrc complex, can post link dotfiles if thinks help. vim doesn'...

javascript - How can I validate a field client-side using HTML5 that is read only? -

i have input field launches datepicker. make work on mobile device, i've made field read only. means can launch date picker on click (or tap) using jquery, , tap doesn't open keyboard on mobile device. however - readonly attribute bypasses html5 validation mechanisms. can add either mimics html5 validation , feel, keep consistency, or forces html5 validation despite field being readonly ? edit : i'm looking validating field filled in (required) , preferably fits date format. readonly fields cannot have required attribute, contain value. look @ html5 standard drafts

Chmoding a series of files bash script -

i have faced question , looking possible solution(s): write bash script run command chmod 644 on files /tmp/test28 , /tmp/test29 ... /tmp/test48 , except /tmp/test32 and may find related exercises? looking resources, if possible please. you can use seq command. using example above code except /tmp/test32 x in `seq 28 48` if [ ${x} -ne 32 ] touch /tmp/test${x} fi done of course want change touch command chmod command appropriate. didn't have files used touch create them quickly. sort of resources looking for?

javascript - Cannot hide all div contents -

i'm making collapsible/expandable divs, similar accordions, if click specific title, contents related title appear. , if click on different title, opened contents close before revealing current contents clicked title, 1 contents section open @ time. i've got sorted out. <div class="container"> <div class="title">one</div> <div class="content">content one</div> </div> <div class="container"> <div class="title">two</div> <div class="content">content two</div> </div> <div class="container"> <div class="title">three</div> <div class="content">content three</div> </div> <div class="container"> <div class="title">four</div> <div class="content">content four</div> </div> however, i'...

sql - Set value of the column to default for NULL values -

i have table column has default value 0. when null inserted table, want set default. as insert query generic , used other databases too, cannot make changes insert statement. can have constraints or case statement on create table, default 0 value inserted whenever null passed. if can not change insert statement have no way other creating instead of insert trigger : create trigger trtablename on schemaname.tablename instead of insert begin insert tablename (columna, columnb, ...) select isnull(columna, 0), isnull(columnb, 0), ... inserted end

batch file - Set Icons Folder For Movie Collection Automatically using command Prompt -

i have movie collection contains 150+ movies in own folder.i want set movie poster icon.cant manually folders,is there command prompt script it. the script must support folder spaces. thank you no custom icons specified in hidden file called desktop.ini in each customised folder. desktop.ini file read if folder has either system or read attributes set. this desktop.ini [.shellclassinfo] iconresource=c:\users\user\documents\pictures\new folder\internet explorer wallpaper (2).bmp,0

android - Differences rendering a gradient using a FBO in GLES2 and GLES3 -

i'm using jogl part of cross platform app. i'm requesting gles2 gl profile used. i've got fbo bound , content drawn it, before unbinding & drawing backing texture screen - pretty standard draw-to-texture stuff. i've got 3 different types of drawing i've tested far, block colour shader, gradient shader, , texture shader. of these working far when drawn default frame buffer across devices. hardware involved in tests: linux laptop: renderer: mesa dri intel(r) sandybridge mobile. version: opengl es 3.0 mesa 10.1.3. gl profile: glprofile[gles2/gles3.hw]. android samsung galaxy s3: renderer: mali-400 mp. version: opengl es 2.0. gl profile: glprofile[gles2/gles2.hw]. android samsung tab 4: renderer: mali-t628. version: opengl es 3.0. gl profile: glprofile[gles2/gles3.hw]. when testing rendering texture using fbo, i'm getting odd behaviour gradient shader only, , on galaxy tab 4. happens don't visual result drawing content of fbo, not cle...

java - Maven plugin "mark invalid" in Eclipse (Mars - 4.5.0) -

this question has answer here: maven:failed execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources 5 answers i have newly created maven project imported eclipse. eclipse complaining 1 of plugins: <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-resources-plugin</artifactid> <version>2.7</version> <configuration> <encoding>utf-8</encoding> </configuration> </plugin> i'm using embedded 3.3.1/1.6.0.20150526-2031 version of maven inside eclipse. here's error: mark invalid (org.apache.maven.plugins:maven-resources-plugin:2.7:resources:default-resources:process-resources) org.apache.maven.plugin.mojoexecutionexception: mark invalid @ org.apache.maven...

java - receiving and returning methods -

i trying write simple program calls various methods prompts user city , state name , population gives percentage of population. i've gotten of code down keep getting 1 compiler error says "error: cannot find symbol, variable: citypercstate" can tell me whats wrong in code? import java.util.scanner; public class cityorozcob52 { // begin class private static scanner input = new scanner(system.in); public static void main(string[] args) { // begin main method string city, state; float citypopulation, statepopulation; cityname(); statename(); citypopulation(city); statepopulation(state); citypercstate(citypopulation, statepopulation); displaycitystatestats(city, state, citypopulation, statepopulation, citypercstate); } // end main method public static string cityname() { string city = ""; system.out.printf("what name of city:"); city = input.nextline(); return city; }...

SQL Server - query between 2 different servers (could not be bound) -

this question has answer here: sql linked server join query 1 answer my aim to find field 1 servers database table in other servers database table the problem using below event, unable use where/and table wants join, when implement join in, states "could not bound" when there field common name below query using tailored make generic select customerdatabase.dbo.oldcustomertable.customerid, customerdatabase.dbo.oldcustomertable.firstname, customerdatabase.dbo.oldcustomertable.surname, customerdatabase.dbo.oldcustomertable.dob customerdatabase.dbo.oldcustomertable inner join [remoteservername\customerdatabasenew].customerdatabasev2.dbo.newcustomertable on customerdatabase.dbo.oldcustomertable.customerid = [remoteservername\customerdatabasenew].customerdatabasev2.dbo.newcustomertable.customerid ...

html - CSS - How to stack divs by columns of 2 -

i have variable number of divs, should displayed on 2 lines, follows [1] [3] [5] [7] [2] [4] [6] ... i looked @ column-count property, it's not need, fixes number of columns, whereas in case should dynamic. (what need similar line-count property, doesn't seeem exist). is there pure css solution, or should make container divs every groups of 2 vertical divs? thanks, edit : here simplified code of case. actually, set height property on container div, shouldn't article divs stacked @ 2 ? they're overflowing container. <html> <head> <link rel="stylesheet" type="text/css" href="test.css"> </head> <body> <div class="container"> <div class="article">a</div> <div class="article">b</div> <div class="article">c</div> <div class="article">d</div> <div class="article">e</div...

listview - Implement an Expandable Android Recycler View with Sticky Headers, Search Function, Alphabetical Side Selector and Swipable Items/cards? -

this seems specific question relevant real world apps. often requirements application entails listview or future proof sake recyclerview has following: stickyheaders search functionality an alphabetical sectionindexer fast scroll swipable items functions expandable so there few libraries can single tasks on list: stickyheadersrecyclerview stickheaderslistview swipeablelistview sectionindexerfastscroll however these libraries don't work , can't extend each other. there ideas how have functionality of these classes together?

javascript - Prevent form submitting when pressing enter from a text input, using Vue.js -

i using vue.js in app , have text input within form <div id="myvueform"> <form> <input type="text" v-on="keyup:addcategory | key 'enter'"> <!-- more form fields --> <button type="submit">submit form</button> </form> </div> in vue instance have following new vue({ el: '#myvueform', methods: { addcategory: function(e) { if(e) e.preventdefault(); console.log("added new category, thanks!"); } } }); despite preventdefault(); call, when user presses enter whilst on text input form still submits (although addcategory() method fire). behaviour can demonstrated in this fiddle . i know can use jquery catch event , prevent submit, i'd see if it's possible in vue seems quite common usage. the submit fired on keydown. use keydown instead of keyup. <input type="text" v-o...

jquery - `ngAnimate` - integration issue -

i have installed angular using bower . here bower.json { "name": "tcp", "version": "1.0.0", "dependencies": { "jquery": "~2.1.4", "angular": "~1.4.1", "angular-animate": "~1.4.1" }, "resolutions": { "angular": "~1.4.1" } } and initiating angular-animate in app.js this: (function () { "user strict"; angular.module("tcpapp", ["ngroute","ngresource", "nganimate"]) .config(function ($routeprovider, $locationprovider) { $routeprovider .when ("/", { templateurl : "views/login/login.html", controller : "logincontroller", classname : "login" }); $routeprovider .when ("/home", { templateurl...

image processing - How can I find the thickness of a ROI traced via imfreehand in Matlab? -

i faced task take roi on image traced via imfreehand function , determine thickness of roi, preferably @ points. has ever faced similar tasks before, or implemented imagej plugin called "local thickness"? information on description , mathematical algorithm can found here , more details under "documentation". what solution?

android - What is the use of a ...-v21.xml? -

i developing app android version 4.0 , up. updated appcompat 22.2.0 seeing these references ...-v21 / v22.xml's on web. used for? make difference? in advance! i had themes.xml in values-v21 folder a res/values-v21/ directory contains resources used when device running app on api level 21 or higher. if device running on older version of android, res/values-v21/ directory ignored. what used for? make difference? they used provide different versions of resources different versions of android. in case of themes.xml file, api level 21+ device have theme inherits theme.material . however, theme not exist on older devices. if have theme in res/values/ tries refer theme.material , app crash on older devices. so, instead, put theme in res/values/ work on devices supporting (e.g., theme.holo minsdkversion of 11 or higher), , override theme in res/values-v21/ instead use theme.material . you can see in this sample app , theme.apptheme (my app's the...

f# - F sharp saving record type into access db -

i have following record type "tbl" , contain lists or seq. how can save/update "tbl" existing access db table using f sharp field names specified below. type tbl= { p:string; in:system.datetime; ex:system.datetime; b:string; cc:string; gg:double; pr:double; de:double; pre:double; deu:double; prpl_deduc:double; gur:double; gc:double; prp:double; pda:double; pro:double} let conn = new oledbconnection( @"provider=microsoft.ace.oledb.12.0; data source=t:\test.accdb; persist security info=false;" ) conn.open() let sql="insert test select * " tbl let dadapter = new oledbdataadapter(sql,conn) dadapter.update there's couple of things come mind here. firstl...

java - Android Soft Keyboard Disrupt's My Layout -

i know ton of questions on topic have been asked none seem work me. have linear layout an edit text , icons below when keyboard pops covers icons , half edit text. my manifest file: <activity android:name="com.social.pages.post" android:windowsoftinputmode="statevisible|adjustresize" android:screenorientation="portrait" > </activity> my layout file: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/feed_bg" > <linearlayout android:id="@+id/stories_post_entire" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/story_post" android:layout_centerhorizontal="true" android:background="@draw...

Java sphinx throws exception -

i working on java sphinx speech, , getting exception below while compiling code. never got guidance solve exception. if know, kindly guide me. thanks. property exception component:'wordpruninglookaheadsearchmanager' property:'loader' - attempt set unregistered property you can put try { ///your code }catch(e){ } in catch can show reason of exeption e .

Typescript dynamic class methods -

problem how can 1 add type checking dynamically created class method? example given simple property class. class property { value: any; name: string; constructor(name: string, value: any) { this.name = name; this.value = value } } and entity class class entity { name: string; properties: property[]; constructor(name: string, properties: property[]) { this.name = name; this.properties = properties; this.properties.foreach((p: property, index: number) => { this[p.name] = (value: string): => { if (value) { this.properties[index].value = value; } return this.properties[index].value; } }, this); } } important part: this[p.name] = function ... (we don't know name of method @ "transpile" time). we following error when transpiling javascript: var car = new domain.entity( 'car', [ new domain.property('manufacturer', 'ford'), ...

C# vs C++ 32 bit vs 64 bit compiler performance -

i writing performance-critical program , hesitate between c# more familiar or visual c++. i've run several benchmark tests specific kind of operations need use , results puzzle me: (the reference these tests c++ win32 build) by reference c# 32 : 50% slower, c# 64 : 4% slower by value c# 32 : 21% slower, c# 64 : 1% faster building x64 in visual c++ 20-30 slower building win32 same compiler options (optimized speed). i amazed @ how 64-bit c# compiler performs compared 32-bit counterpart. why same not happen in visual c++? 64-bit compiler not optimized 64-bit? in benchmark pass object has several imbricated structs attributes. benchmark consists of series of 50 imbricated if statements test booleans contained in structs. there no long types involved. can post code if needed, thought maybe don't know compilers. edit : c++ win32 compiled /mt best performance. i've tried compiling x64 /md , performance 6 times slower. i remember when ran same test on similar pie...

ubuntu - Android studio set up -

i'm trying install android-studio on ubuntu 14.04 64 bit. installation stops @ point saying build-tools-19.1.0,sys-img-x86-addon-google_apis-google-19 , 3 more sdk components not installed do have solution?

c - find and then delete the longest occurring sequence of 0 in an array -

my array has 0 n 1 . arr[]={00111000011} need find , delete longest sequence of 0 , count remaining elements in array. int longestsequence(int[] arr, int size) { int longest = 0; int length = 1; (int = 1; < size; i++) if (arr[i] == arr[i - 1]) { length++; } else { length = 1; } if (length > longest) { longest = length; } return longest; int count = 0; (int = 1; < size; i++) { if (arr[i] == 0) count++; } if (count > longest) longest = count; } if have understood correctly assignment function can following way shown in demonstrative program below. @ least can used base own function #include <stdio.h> #include <string.h> size_t longestsequence( int *a, size_t n ) { int *longest_start = a, *longest_end = a; int *start; int found = 0; int *current = a; ( ; current != + n; ++...

r - Mean per group in a data.frame -

this question has answer here: aggregate / summarize multiple variables per group (i.e. sum, mean, etc) 4 answers i have data.frame , need calculate mean per group (i.e. per month , below). name month rate1 rate2 aira 1 12 23 aira 2 18 73 aira 3 19 45 ben 1 53 19 ben 2 22 87 ben 3 19 45 cat 1 22 87 cat 2 67 43 cat 3 45 32 my desired output below, values rate1 , rate2 group means. please disregard value, have made example. name rate1 rate2 aira 23.21 12.2 ben 45.23 43.9 cat 33.22 32.2 this type of operation aggregate designed for: d <- read.table(text='name month rate1 rate2 aira 1 12 23 ...

ios - Word wrapping for a UILabel not created in IB? -

i trying create uilabel entirely in code, not ib. i want x,y corner position , width fixed, height vary according how text being presented, , text wrap , centered. text populated elsewhere. (it won't more 2 lines long though) i have got far, not sure how make height variable , text wrap: instructlabel = uilabel(frame: cgrectmake(screenwidth/2-350, screenheight-screenheight*0.2, 700, 50)) // guess don't want 50 height here though? instructlabel.backgroundcolor = uicolor.blackcolor() instructlabel.preferredmaxlayoutwidth = 700 // conflict above or override? instructlabel.linebreakmode = .bywordwrapping instructlabel.textalignment = nstextalignment.center instructlabel.text = "" instructlabel.font = fontsmall instructlabel.textcolor = uicolor.whitecolor() self.addsubview(instructlabel) you should use cgrectgetmidx , cgrectgetmidy constants instead of calculating screenwidth , screenheight values. instructlabel = uilabel(frame: cgrectmake(cgrectg...

jquery - The name 'Request' does not exist in the current context, ajax url and response data member -

here function called controller: public actionresult executerule(string rawsql, list<pdsmatchruleparam> parameters) { var da = new dataaccess(); var rulesql = rulerawsql.replace(@"{key}", "@pkey"); var dbparameters = new list<dataaccess.dbparameter>(); dbparameters.add(new dataaccess.dbparameter("pkey", dbtype.ansistring, 4000, parameters[4].defaultvalue)); var dt = da.select(rulesql, dbparameters.toarray()); // required eliminate "a circular reference detected while serializing object of type 'system.reflection.runtimemodule'" exception var db = jsonconvert.serializeobject(dt, formatting.none, new jsonserializersettings() { referenceloophandling = newtonsoft.json.referenceloophandling.ignore }); var result = new jsonresult() { contenttype = "appl...

postgresql - How to setup docker architecture -

i'd have following configuration: docker containers |||||||||||| |||||||||||| |||||||||||| | | | | | | | | | | | | | | <--> | | <--> | | | | | | | | | | | | | | |||||||||||| |||||||||||| |||||||||||| nginx web server postgres with following setup: nginx change nginx.conf add appropriate sites-available entry link config sites-enabled postgresql setup user login , password web server clone repository build release version run server process i have couple of questions well: a) how pass secrets docker api keys, passwords , on? b) possible clone repo docker or there other way that? c) how , deploy such applications? d) setup possible? this setup common docker. i'd recommend using docker-co...

using Actions for html select box in selenium java -

Image
i trying select item html select box using selenium phantomjs driver org.openqa.selenium.interactions.actions along taking screen shot see whether moves mouse cursor specified item in select box far tried below code no success: (i have placed comment on each block of actions below) lblstatus.settext("selecting gender..."); wait.until(expectedconditions.presenceofelementlocated(by.xpath("//select[@name='gender']"))); //for moving mouse pointer on select box mouse.movetoelement(driver.findelement(by.xpath("//select[@name='gender']"))).perform(); //for performing click on select box, assuming here selectbox show dropdown items mouse.click(driver.findelement(by.xpath("//select[@name='gender']"))).perform(); //for moving mouse pointer on male option (but not yet clicked or selected) mouse.movetoelement(driver.findelement(by.xpath("//select[@name='gender']/option[@value='male']"))).perform(); ...

php - Laravel 5 error when composer update -

[symfony\component\debug\exception\fatalerrorexception] class 'illuminate\broadcasting\broadcastserviceprovider' not found how solve error? i new laravel framework this worked me: delete /vendor folder delete composer.lock run composer install make sure composer.json file has "laravel/framework": "5.1.*"

IME Consecutive Input code for Samsung TV -

i need create login panel in samsung tv app. in ux guide, can see consecutive input can solve problem. this ux guide referred. http://www.samsungdforum.com/uxguide/2014/05_text_input.html#ux-05 this current code <form name="xxx" id="xxx"> <label for="username">username : </label> <input type="text" name="username" id="username" maxlength="15" required /> <label for="password">password : </label> <input type="password" name="password" id="password" maxlength="10" required /> <input type="button" id="uvsubmit" value="enter" name="submit" /> </form> // js var imebox = new imeshell_common(); document.getelementbyid('username').focus(); imebox.onshow(); have done before.? hope can assist me solve this. thanks in...

twitter bootstrap - How can I make an Ajax Actionlink to call a bootbox dialog? -

i have table containing loop inside mvc view page. each row has delete button contains this: @ajax.actionlink("delete", "deleterecord", new { id = item.id }, new ajaxoptions { insertionmode = insertionmode.replace, updatetargetid = "divlist" }) | it works fine, i'd implement confirm dialog. found bootbox can used modal confirm dialogs i'm not sure how can implement this: // 1. when clicked, confirm <a class="alert" href="#">delete</a> <script> $(document).on("click", ".alert", function (e) { bootbox.confirm("are sure?", function (result) { if (result == true) { // 2. actionlink depending on id } }); }); any kind of appreciated. ajaxoptions() has 'confirm' option can set confirm message. ajaxoptions opts = new ajaxoptions() { confirm = "are sure?" } but should not use ajax.actionlink if w...

java scala interoperability -

let have scala lib needs used java programs not in future. when comes collection , every goodies may have in scala. rather create methods specific java in class, or in line single responsibility principle, create bunch of static object provide method convert object in there scala version using explicit conversion, asjava. if there way convert asjava within java way easier, don't know if package of explicit conversion can used within java. doubt feel use type class augment functionality. is there java help. what best practice here. many in advance. calling scala code java trickier other way around. can use asjava java if reference scala standard library. type classes, implicits compiler substitutes automatically. in java there no implicits, obviously, need pass right instance (which cumbersome doable). here's example of (it's converting java map scala 1 should work other way around): convert java.util.hashmap scala.collection.immutable.map in java . ...

javascript - I can't seem to get list.js to filter items with multiple categories -

i'm using list.js sort list of items category. it's easy make work if each list item fits in 1 category, struggling making sort correctly if assigned more 1 category. this have far on codepen.io basically, want able tag things both beverage , game. i'm not cycling through array i've created each item's categories correctly... ever acknowledges first item? there isn't in docs of list.js how use in manner. found issue list.js maintainer marked closed seemed related, told person ask on here, that's i'm trying. https://github.com/javve/list.js/issues/189 i think problem for (var i=0, j=trythis.length; i<j; i++) { if (trythis[i] == selection) { return true; } else { return false; } } if first category fits, return true, if first not fit return false, preventing more compares. you should not return false within loop after loop, when know no category match. ===== update featurelist.filter(function(item) { this ca...

excel - Argument not optional error when returning dictionary -

i have following code in vba , i'm trying capture dictionary object returned first function parents in line says "set parents = parents()" keep getting argument not optional error. everyone on internet says it's because set keyword missing in case isn't. appreciated, thanks! public function parents() dictionary dim filenum integer dim dataline string dim filepath string set parents = new dictionary filepath = application.activeworkbook.path & "\parents.txt" filenum = freefile() open filepath input #filenum while not eof(filenum) line input #filenum, dataline parents.add dataline, 1 wend end function public sub computechanges() . . dim parents dictionary, adjustments dictionary, inner dictionary, changes dictionary set parents = parents() . . end sub i suggest changing function sub , passing pre-declared dictionary object in parameter. public sub constr...

c - Unexpected behaviour, Garbage prints after string -

i trying animate strings before terminating application. called attached piece of code so. keeps on printing garbage till core dumped. here code.. int terminate_msg(int quit_flag) { char server_msg[] = "\napplication not alive"; char exit_msg[] = "\nterminating application...\n"; char *ch; int = 0; if(quit_flag == 1) { printf("%s%s", server_msg, exit_msg); while((ch = server_msg + i) != null) { printf("%c",*ch); fflush(stdout); usleep(100000); i++; } = 0; sleep(2); while((ch = exit_msg + i) != null) { printf("%c",*ch); fflush(stdout); usleep(100000); i++; } sleep(2); } return 0; } output: application not alive terminating application... application not alive terminating application... ���І�js�dx��lx���p�dx��x��$���p l�uz��d~�]p�up��is�...

java - Does Android studio layout editor shows custom view properties? -

Image
i have compound view consists of 2 buttons , 1 text view. want edit properties of these child views in android studio layout editor can't. shows basic properties no properties of custom view. does android studio layout editor shows limited number of properties set default? possible edit properties of custom view there, without manually editing xml files? thanks in advance!! as described in http://developer.android.com/training/custom-views/create-view.html#customattr have add new ressource (res/values/attrs.xml). <resources> <declare-styleable name="piechart"> <attr name="showtext" format="boolean" /> <attr name="labelposition" format="enum"> <enum name="left" value="0"/> <enum name="right" value="1"/> </attr> </declare-styleable> </resources> within view have refere...

javascript - Angular directive isolate scope: scope function won't execute -

i'm having trouble understanding how define functions used (or inside of) directive has isolate scope. in following code, why doesn't $scope.foo() function execute? there correct way should approaching problem? i'm looking make button visible if user logged in, , thinking directive nice way encapsulate/isolate functionality. <!doctype html> <html> <head> <script src="https://code.angularjs.org/1.4.2/angular.js"></script> <script> angular.module('myapp', []) .directive('myscopeddirective', function() { return { scope: {}, // <!-- isolate scope breaks things controller: function($scope) { // isolate scope prevents function being executed $scope.foo = function() { alert('myscopeddirective / foo()'); }; } }; }); </script> </head> <body> <div ng-app="myap...

Error in case in mysql for creating procedure -

create procedure temp (in empid int) begin declare emptype varchar; select emptype = qoute(emptype) dms_document id = empid; select emptype case when emptype = 'p' select doctype dms_report pilot = 1 else select 'no documents required' end case end; this query creating procedure in mysql, getting error in case statement please hlep me why error coming how declare case statement why error coming in workbench creating procdure here formatted procedure use delimiter delimiter // create procedure temp ( empid int) begin declare var_etype varchar(36); select emptype = qoute(emptype) dms_document id = empid; select emptype, case when emptype = 'p' doctype else 'no documents required' end dms_report pilot = 1; end// delimiter ;

apache - .htaccess deny php files from all except index -

i have .htaccess file following contents: <ifmodule mod_rewrite.c> rewriteengine on setenv http_mod_rewrite on rewritebase /wsproject/ options -indexes directoryindex index.php rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewritecond %{request_filename} !-l rewriterule ^(.+)$ index.php?url=$1 [qsa,l] </ifmodule> i want hide users: directory structure , private files, while enable public files: *.js, *.html, *.css, *.swf, *.jpg , other stuff. want .php files accessible file system, except index.php in root dir. i want serve request via http written (abstract) mvc url pattern like: www.domain.com/lang/controller_name/action_name/arg1/arg2/././argn , being rewritten .htaccess, , public *.html, *.js ...etc files. while options -indexes hides file listing, not prevent undesirable request e.g.: www.domain.com/library/bootstrap.php being served. whereas deleting/commenting out rewritecond %{request_fi...

html - javascript function to color using color array and for loop -

i have created function create html elements json object. have created array of 3 different colors , want loop through array, using each color @ time color part of sentence formed html elements. there 2 roles in particular object (ie. singlejsonobj.roles.length equal 2). trying print first html element "darksalmon" , next 1 "forestgreen" loops. is, however, printing both role names "darksalmon". please see code below. missing? function createhtmlelementsforrolenumbers (singlejsonobj, xml) { // result returned var finalxml; var colorarr = ["darksalmon", "forestgreen", "brown"] // block of html elements created var htmlforrolenumbers = ""; ( var i=0; i< singlejsonobj.roles.length; i++) { // each time creating 1 html element. // e.g. if length above 2, create 2 h4 elements. htmlforrolenumbers = htmlforrolenumbers + "<h4><br> - a(n) ...

c++ - How do I make libpcap/pcap_loop non-blocking? -

i'm using libpcap sniff traffic in promiscuous mode int main() { // stuff printf("opening device: %s\n", devname.c_str()); handle = pcap_open_live(devname.c_str(), 65536 , 1 , 0 , errbuf); if (handle == null) { fprintf(stderr, "couldn't open device %s : %s..." , devname.c_str(), errbuf); return 1; } printf(" done\n"); pcap_loop(handle , -1 , process_packet , null); // here run thread stuff. however, pcap_loop blocking return 0; } i'd add external thread other stuff. how change code above make non-blocking? when use non-blocking mode on libpcap have use pcap_dispatch, note, pcap_dispatch can work in blocking or in non-blocking mode, depends how set libpcap, set libpcap work in non-blocking have use function pcap_setnonblock : int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf); the difference between blocking , non-blocking not loop runs forever, in blockin...

bash - Shell : get function's body by it's name -

i use zsh (sometimes bash ). thing have multiple shell scripts , i've got no idea how code small function printing function code it's name (with highlighting; use pygmentize -g ). here's small example of want get: $ getfunc "somefunc" # my_little_hacks.sh somefunc () { # function code } is clean , efficient way in shell or awk without using nl , cat in best time available shell interpreter? it improbable function have word function in it's body except when there nested ones there. next impossible has { or } legally unpaired inside quotes. declare -f funcname ...will retrieve code function funcname in both bash , zsh. thus: getfunc() { declare -f "$@" | pygmentize -l bash }

mongodb - How to query for Time less than another Time object in Volt with volt-mongo? -

i working on volt app needs compare times. using model looks this: class punchcard < volt::model field :punchtime end i can save instances of model time object punchtime , see persisted mongodb isodate() objects. far. when want query database using less criteria, can see volt , volt-mongo turning call: store.punchcards.where({"punchtime" => {"$lt" => punchtime}}).then... (where "punchtime" time object) mongo query: db.punchcards.find({"punchtime": {"$lt": "2015-07-08t10:25:05-0700"}}) which returns no results though should. when trace insert call when saving instance of punchcard model, see time object not stringified: [info] task storetasks#save in 11.557ms args: "punchcards", ["punchcards", "[]"], {"user_id"=>"925b0eb84bc3d2185d1c693a", "punchtime"=>2015-07-08 16:38:49 -0700, "punch_status"=>"out", "...