Posts

Showing posts from April, 2013

php - Laravel date input field default time value -

i trying display default time value within input field. reason current time showing in source code not displayed in view. my form: <div class="form-group"> {!! form::label('published_at', 'publish on') !!} {!! form::input('date','published_at', carbon\carbon::now()->format('h:i'), ['class' => 'form-control']) !!} </div> sourcecode: <div class="form-group"> <label for="published_at">publish on</label> <input class="form-control" name="published_at" type="date" value="15:58" id="published_at"> </div> what's wrong here? trying current time , date.

c# - GetMusicProperties Isn't Getting Correct Album Artist -

i'm making 2 separate calls artists , albums user's music library. artists: list<artist> _artists = new list<artist>(); var folderlist = await knownfolders.musiclibrary.getfoldersasync(commonfolderquery.groupbyartist); foreach (var folder in folderlist) { var props = await folder.properties.getmusicpropertiesasync(); var thumbnail = await folder.getthumbnailasync(thumbnailmode.musicview, 256); if (!string.isnullorempty(props.artist)) { var artist = new artist { id = props.artist, name = props.artist, creationdate = folder.datecreated.datetime, thumbnail = thumbnail }; _artists.add(artist); } } and albums: list<album> _albums = new list<album>(); var folderlist = await knownfolders.musiclibrary.getfoldersasync(commonfolderquery.groupbyalbum); foreach (var folder in folderlist) { var props = await folder.properties.getmusicpropertiesasync...

python - How to get django queryset results with formatted datetime field -

i've django model has foreign keys associated other models. each model having same field names(attributes) created_at , updated_at in every django queryset results i'll getting datetime values. model.objects.all().values('created_at') but want format datetime field "dd-mm-yyyy hh:mm:ss" , trim down milliseconds in django query results. if use "extra" , and date_trunc_sql following command dt = connection.ops.date_trunc_sql('day','created_date') objects.extra({'date':dt}).values('date') which works fine. if query following, raising ambiguous statement error. objects.extra({'date':dt}).values('date', 'x', 'y', 'z') how overcome problem? got solution. data = list(model.objects.extra(select={'date':"to_char(<databasename>_<tablename>.created_at, 'yyyy-mm-dd hh:mi am')"}).values_list('date', flat='true...

parse.com - Twilio - The From phone number xxx is not a valid, SMS-capable inbound phone -

i want use twilio verifying phone number of users registering on app. backend, have parse. i tried send sms using test credentials, far received success message, but, didn't received sms! i've tried switch live credentials; however, received following: { "code": 141, "error": { "status": 400, "message": "the phone number +12025550162 not valid, sms-capable inbound phone number or short code account.", "code": 21606, "moreinfo": "https://www.twilio.com/docs/errors/21606" } } i've tried replace "from" phone number alphanumeric sender id, didn't work too! what should in case? twilio developer evangelist here. firstly, test credentials don't send messages, there test making api requests properly. note they work specific numbers , on few endpoints . in order send sms messages twilio , need buy , use number twilio ...

python/django- number comparison (>) does not work -

this weird. have django program , calling py file views. file read excel , find correct number index given number(target). it keeps telling me "target number out of range" should not, print out numbers. for target in target_list: print target, df[pin_num][end], df[pin_num][0] if target > df[pin_num][end] or target < df[pin_num][0]: print target, df[pin_num][end], df[pin_num][0] print target > df[pin_num][end] print target < df[pin_num][0] return "target number out of range" the console(using pycharm) show: 23925.85 24472.9 23876.0 23925.85 24472.9 23876.0 true false target number out of range how ever happen? 23925.85 smaller 24472.9 ... , have print out need compare. so @rawing mentioned in comments, added print type(target), type(df[pin_num][end]), type(df[pin_num][0]) and showed target string. so added : target=float(target) this solve problem. ...

android - Createloader not being called -

i'm facing peculiar problem, have 2 separate activities, if required both might call 1 fragment inserting data in local db. since fragment common kept should be. working , in 1st activity. utter dismay when try same thing other activity never works. i debugged , found whenever i'm calling initloader method, didn't go createloader method. doesn't matter whether use force load or not doesn't work, comes down directly loadfinished method. i'm pretty confused why work 1st activity , why not work second, anyway fragment can call correct? edit: two activities opening same fragment, inside fragment there loader insert data in local db using asynctask loader. since same fragment loader id same, doing getactivity().getsupportloadermanager().destroyloader(loader.getid()); at end of loadfinshed loader id removed. , not case 1st activity started @ first, if go second 1 doesn't work, if go other 1 works. createloader not called goes directly loadfinshe...

c# - Referencing a Library file stored on TFS -

i have created reference library (dll) contains testing utilities use multiple users. library stored on our tfs users can contribute , gain access it. however, seems way each user reference library create copy of library on local machine , make reference location. whenever makes changes library, user must make new copy of file onto local machine. in mind, seems silly. there way each user can reference library within tfs itself, rather having create new copy of each time there changes made? create nuget package. if search around sharing code between solutions, advice. tfs not network drive.

Programatically reading / writing Google Hangouts SMS -

how can read , respond sms messages google hangouts number programmatically? have read lot of conflicting information whether or not it's possible use jabber / xmpp google hangouts, , so-called "hangouts api" seems work creating google app , not meant use of 1 person. want work current google account, creating new google app not option. tdryer's hangups helpful library found doing this.

.htaccess - Website breaking after 301 Redirect -

quite of newbie question here our web developer left our (small) company , has left in bind. we (2 days ago) redirected our site newer , mobile friendly model , working quite time. whatever reasons management deemed needed roll site original model , site breaking whenever type in http://www.example.com . however, https:// works fine, , seems has htaccess file -- being project manager, coding comes second in terms of skill. if helps our site www.mauriprosailing.com -- still trying figure out why "www" , "http" breaking site. if needed can post .txt of our htaccess if helps. i appreciate , apologize if broad of question! solution: granted may not apply -- problem not within htaccess file caching of server. server not pulling right .css file therefore causing "explosion" of our site , found purging of cached files did trick.

javascript - Phonegap cordova 404 not found on Android -

i'm making application need use distant http server. in browser have no trouble ajax/inappbrowser/iframe when build , running in android doesn't work anymore. i used distant chrome debugger , noticed request returning 404 not found cache, i'm guessing application not have right make request on web. searched solution can't figure out come from. here config.xml: <?xml version='1.0' encoding='utf-8'?> <widget id="foo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>foo</name> <description> foo </description> <author email="dev@cordova.apache.org" href="http://cordova.io"> </author> <content src="index.html" /> <plugin name="cordova-plugin-whitelist"/> <access origin="*" /> <allow-intent href="*" /> <allow-navig...

openedx - devstack installation error: bower not found -

i tried install openedx devstack using dogwood.3 release. in provision steps error: default: stderr: /bin/sh: 1: /edx/app/programs/programs/node_modules/.bin/bower: not found here's steps followed: curl -l https://raw.github.com/edx/configuration/master/vagrant/release/devstack/vagrantfile > vagrantfile vagrant plugin install vagrant-vbguest export openedx_release="named-release/dogwood.3" vagrant the vm can't start service. any idea please? regards,

vb.net - QBSDK Can not connect in debug environment -

i have proven application uses qbsdk 13. working in mid june. picking again after interruption. verion information qb enterprise solutions accountant 16.0 installed on dev machine microsoft visual studio professional 2015 version 14.0.24720.00 update 1 running win10 my primary symptom call sessionmanager.beginsession never comes back. (as type this, call has been pending 30 minutes) some additional symptoms if delete 3rd party app permissions, not re prompted them. if include filename in openconnection, (not always) error trying open connection w/ 2 instances of qb running. here things have done debug problem i have tried 2 different qb files have verified "qbxml test +" works qb file(s) accessing have deleted 3rd party app permissions , let qb request them again verified projects in solution built x86 uninstalled qbsdk13 , reinstalled it. the fact qbxmltest works , project doesn't, tells me uninstalling quickbooks , sdk wont help. reinstalled qb...

java - Neo4j Spring Data example missing annotation @Indexed -

trying run neo4j spring data example on http://projects.spring.io/spring-data-neo4j/ <dependencies> <dependency> <groupid>org.springframework.data</groupid> <artifactid>spring-data-neo4j</artifactid> <version>4.1.2.release</version> </dependency> </dependencies> and @nodeentity public class movie { @graphid long id; @indexed(type = fulltext, indexname = "search") string title; person director; @relatedto(type="acts_in", direction = incoming) set<person> actors; @relatedtovia(type = "rated") iterable<rating> ratings; @query("start movie=node({self}) match movie-->genre<--similar return similar") iterable<movie> similarmovies; } but @indexed(type = fulltext, indexname = "search") not seem exist in <artifactid>spring-data-neo4j</artifactid> have add else pom ? or...

nuget - Microsoft Bot Builder with .NET 4.5? -

i trying install microsoft bot builder nuget package project targets .net framework 4.5. when click install, following error: could not install package 'microsoft.bot.builder 3.0.1'. trying install package project targets '.netframework,version=v4.5', package not contain assembly references or content files compatible framework. more information, contact package author. is there version of bot builder package compatible .net version 4.5? or out of luck , have change target framework of applicaton? the last version of framework supported 4.5 1.1.0 , after version framework targeted .net 4.6. you can command install-package microsoft.bot.builder -version 1.1.0 and install version, or can change project use .net 4.6, or compile source , see if can compile under .net 4.5.

pandas - Multiple Linear Regression in Python (PatsyError: model is missing required outcome variables) -

i running following code regression in python , error (patsyerror: model missing required outcome variables). how fix it? thanks y = spikers['grade'] x = spikers[['num_pageview', 'num_video_play_resume', 'eng_proficiency', 'english']] model = smf.ols(y,x).fit() model.summary() i had similar problem trying run sm.logit on outcome variable 'y' binary (0s or 1s): let data in pandas data frame called 'data: import statsmodels.formula.api sm x = ['age','sex','x1','x2','x3','x4'] logit = sm.logit(data['y'],data[x]) result = logit.fit() print result.summary() traceback (most recent call last): file "<ipython-input-xxx>", line 1, in <module> logit = sm.logit(data['y'],data[x]) file "c:\...\statsmodels\base\model.py", line 147, in from_formula missing=missing) file "c:\...\statsmodels\formula\formulatools....

javascript - JQuery UI resizable if <div> resized -> all siblings move too -

Image
hi use jquery ui resizable , jquery ui draggable of 3 div elements. the basic dom tree looks this: so blue , red siblings , orange parent. if resize blue vertically red automatically changes position vertical space between them stays same. problem not apply draggable , can change vertical distance dragging blue , red around every time resize blue vertically red moves too. if make blue bigger vertically -> red moves down, not want optimatically can make blue bigger vertically until hits border of red , thats it. i tried several .css styles nothing works here current .css use: hi comments, find solution: jquery ui resizable adds .css attribute position:relative; every resizable <div> element. explain myself this: "relative: element positioned relative normal position, 'bottom:20px' adds 20 pixels element's bottom position" this means normal position of red directely under blue, because of draggable adde...

How to delete user from multiple projects in team project collection of TFS 2013 -

am getting error while deleting user contributor list of multiple projects in team project collection of tfs 2013 using tfssecurity /g- groupidentity memberidentity [/collection:collectionurl] [/server:serverurl] error: multiple identities found matching 'contributors'. please specify following identities i want delete user projects of collection @ time. can advise me thanks in advance add project name, should trick: tfssecurity /g- “[team project name]\contributors” n:datum1\jpeoples /server:http://adatumcorporation:8080

apache - Why 404 page is not showing using .htaccess? -

i using following .htaccess code showing error message using 2 php page called 404.php , not-found.php when page not found in server. unfortunately it's not working. it's should show 404.php or not-found.php page if page not found. .htaccess code : options -multiviews errordocument 404 /not-found.php errordocument 500 /404.php rewriteengine on rewriterule ^(?:zones/)?update/(\w+)/?$ update.php?z=$1 [l,qsa,nc] rewritecond %{request_filename} !-d rewritecond %{request_filename}.php -f rewriterule ^(.+?)/?$ $1.php [l]

javascript - How can I get the ID from checkbox of <div> framework -

i doing seat reservation project , using framework checkbox doing this. trying save row , column of each seat session error notice: undefined index: occur. here code of checkbox using: seat reservation code . i did try code name of each seat. html: <form method="get"> <div id="1_2" role="checkbox" value="80" aria-checked="false" focusable="true" tabindex="-1" class=" seatnumber" name="a2html" method="get">2</div> </form> php: <?php if(isset($_get["btncheckout"])) { $a2php = $_get['id']; $_session["a2"] = $a2php; print_r($_session["a2"]); } ?>

c# - How to remove database columns from default asp.net mvc application? -

i trying learn asp.net , hence want create project using default project in visual studio > asp.net project > mvc project. customize in bits , try learn asp.net. i ran , registered user , able open database explorer. here there many columns "emailconfirmed" , "twofactorauth" etc did not need, wanted delete them. deleted them database(localdb), keep getting errors invalid column name "emailconfirmed" etc. how make sure totally gone project good. believe there in c# code somewhere, don't know in file. and have extremely important question, silly question. code in default project tells whenever submit form, data should go corresponding database columns? mean code says stuff sqlconnection conn = new sqlconnection(connectionstring) etc. just leave columns. if don't want use them, don't. there's no reason delete them. .net identity takes care of database calls. way you're going see db calls , rid of columns implement o...

jquery - Navigation bar - positioning -

i having heck of time trying navigation bar stay put on screen sizes/ browsers / etc... i have tried : header#top #logo { display: none!important; } #header-top, #header-space { display: none!important; } #header-outer { z-index: 10000!important; } #top nav > ol { position: fixed; width: 100%; top:25%; left: 0px; } .nav { position:fixed; top:25%; } none of seems have solid effect on positioning, have tried position:left , played of dimensional options, based on other suggestions (position:left) has locked @ top of page, though nav sit underneath header image , never, ever, reason move, not 1 little pixel, don't know if possible, insight appreciated. side note: if can css, outstanding

vb.net - System.Runtime.InteropServices.COMException once and again -

i don't know why / when happens, error message bugs me each year: exception thrown: 'system.runtime.interopservices.comexception' in mscorlib.dll additional information: com class factory component clsid {c70f08f3-3f2a-477d-9f7a-b5463e973bdc} couldn't access due following reason: 80040154 class not registered (exception of hresult: 0x80040154 (regdb_e_classnotreg)). i don't remember how solve each time occurs. think recompile ocx component , add again. however, strange because can use ocx component in vb6. why should not accessibly in .net then? can explain might happening here? thank you. hard guess without supporting code in op, symptoms consistent ocx having changed clsid whatever reason (for example, due interface changes). in case: rebuilding ocx re-registers @ end, right class registered; re-adding reference ocx updates referenced clsid correct one. as why works in vb6, reference has somehow been updated already. how happened ...

java - Spring Thymeleaf how to bind values of checkboxes to a collection field -

i want generate, or bind, project object in spring using html form processed thymeleaf. works far, rolesneeded list field filled roles ticking checkboxes isn't working, yet. the project class package com.floriantoenjes.instateam.model; import javax.persistence.*; import java.util.list; @entity public class project { @id @generatedvalue(strategy = generationtype.identity) private int id; private string name; private string description; private string status; @manytomany private list<role> rolesneeded; @manytomany private list<collaborator> collaborators; public project() { } public int getid() { return id; } public void setid(int id) { this.id = id; } public string getname() { return name; } public void setname(string name) { this.name = name; } public string getdescription() { return description; } public void setdescr...

android - E/libEGL: cache file failed CRC check -

in application there mainactivity contains many buttons clicking on activity created image. click on image simple animation zoom. , there problem: 2 images of @ frequent click crash activity (not app) error e/libegl: cache file failed crc check i compared images, approximately same size , resolution. jpg format. error raise two. error not happen on physical devices (i tested three) on xiaomi redmi note 2 i googled error , found this: // check file magic , crc size_t cachesize = filesize - headersize; if (memcmp(buf, cachefilemagic, 4) != 0) { aloge("cache file has bad mojo"); close(fd); return; } uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); if (crc32c(buf + headersize, cachesize) != *crc) { aloge("cache file failed crc check"); close(fd); return; } from opengl lib egl what error means , how fight it?

algorithm - Breadth First Search queue -

i looking @ assignment: consider 2 vertices , b simultaneously on fifo queue @ same point during execution of breadth first search s in undirected graph. which of following true? the number of edges on shortest path between s , atmost 1 more number of edges on shortest path between s , b. the number of edges on shortest path between s , atleast 1 less number of edges on shortest path between s , b. there path between , b. possible answers: a) 1 only b) 1 , 2 only c) 2 only d) 1, 2 , 3 i know how solve , m having doubt in meaning of statement ...that simultaneously on fifo queue @ same point during execution of breadth first search... what exact meaning of this? as @beaker commented, there typo in assignment. word same should read some : consider 2 vertices , b simultaneously on fifo queue @ some point during execution of breadth first search s in undirected graph. by definition of breadth-first...

tfsbuild - Powershell: The specified path, or filename, or both, are too long - Directory Excludes -

Image
we’ve been running script fine previously, we’ve been getting issues (see below error) our config transform step our tfs build. $servicefiles = get-childitem $localworkspace -recurse | {$_.extension -eq ".exe"} we switched using gulp compile our css , js has given “node_modules” folder. looks it’s trying crawl these folders , gets directory length limit. i’ve tried various suggestions i’ve found googling , other related questions on so, none seem working me, it’s still hitting same error (and assume isn’t excluding these folders) this example of modified version i've tried using exclude folders $excludeddirectories = @("*node_modules*", "*packages*", "*common*"); write-verbose $localworkspace # services config types (service configs named same assmebly .exe) $servicefiles = get-childitem $localworkspace -recurse -exclude $excludeddirectories | ?{$_.extension -eq ".exe" -and $_.fullname -notmatch '*node_modules*...

odatalib - Does OData lib support @odata.nextLink on expanded feeds? -

i using odatalib parse odata v4 feeds , entries. 1 of odata feeds returns payload expanded associations this: { "@odata.context":"https://myfeed.com/api/data/v8.1/$metadata#accounts(name,account_tasks)","value":[ { "@odata.etag":"w/\"596351\"","name":"account 1","accountid":"5f4c87e4-4952-e611-80dd-c4346bacfc18","account_tasks":[ ],"account_tasks@odata.nextlink":"https://myfeed.com/api/data/v8.1/accounts(5f4c87e4-4952-e611-80dd-c4346bacfc18)/account_tasks" } ] } note element "account_tasks@odata.nextlink": provides link expanded data. none of odatalib classes seems expose property. is property exposed odatalib or it's not supported? it supported in odl, can find in https://github.com/odata/odata.net/blob/odatav4-6.x/src/microsoft.odata.core/odatafeedbase.cs#l49-l65 public uri nextpagelink ...

c# - How to write POST method with binary input for Microsoft Cognitive Service API -

microsoft cognitive services api supports 2 input methods within post body: raw image binary or image url. using online test console api, know http request should like. `post https://api.projectoxford.ai/vision/v1.0/analyze?visualfeatures=faces http/1.1 content-type: application/json host: api.projectoxford.ai content-length: 125 ocp-apim-subscription-key: •••••••••••••••••••••••••••••••• {"url":"someimageurl"}` i making request unitywebrequest , have far is string url = "https://api.projectoxford.ai/vision/v1.0/analyze?visualfeatures=faces"; unitywebrequest www = new unitywebrequest(url, "post"); www.setrequestheader("content-type", "application/json"); www.setrequestheader("ocp-apim-subscription-key", apikey); how include byte[] image request? i have figured out www unity, not unitywebrequest. i succeeded code: // add www headers needed wwwform form = new wwwform(); var headers...

how to get the ColorID of a Google Calendar Event in JavaScript -

i want write script duplicate events 1 google calendar another, events colored in bold red . as stands now, can duplicate events between multiple calendars, don't know how colorid event, bold red events being duplicated. such thing possible in javascript of using google script? i searched multiple times in past days, can find answers based on php. honest, can't imagine such thing not possible through javascript of google script. here script wrote far: function myfunction() } var calendarsource = calendarapp.getcalendarbyid("calendaridprimarycalendar@gmail.com"); var calendardest = calendarapp.getcalendarbyid("calendaridduplicatedcalendar@group.calendar.google.com"); var today = new date(); //deze variabele bevat de datum van vandaag var halfyear = new date(new date(today).setmonth(today.getmonth() + 6));//deze variabele bevat dat datum van vandaag + 6 maanden var eventtocopy = calendarsource.getevents(today, halfyear)...

angularjs - Views from app not updating/refreshing -

im using http-server, problem views arent updating well, restarted server, , takes long browser update, annoying, online tried it, when using http-server gets problem. there better way rining local server in nodejs disable browser cache. loads , somehow doesn't update when template changed

Does a Powershell script using system.managment.automation would still run after its C# host die? -

i want add powershell capabilities c# program , have embedded system.managment.automation.dll assembly reference. have found on stackoverflow 2 ways call powershell scrit c# : using runspaces: not using runspaces: powershell powershell = powershell.create(); powershell.addscript("my script"); powershell.invoke(); according this website , seems powershell instance tied c# host. the powershell runtime invoked runspace , will, default, process commands synchronously , deliver results of processing host application can returned user. furthermore, powershell script uses embedded system.managment.automation.dll assembly , not system-wide one, script logically stop c# host. does powershell script still run after user close program ? 2 methods ? ps: want support powershell v2. let's take in reverse chronology: what 2 methods ? there's no such thing running powershell code " not using runspaces". the simple explanatio...

How can I debug FireFox when it won't load local add-on? -

i'm working on browser extension/add-on. have working in chrome, i'm trying working in firefox. when try load in current version of firefox visiting about:debugging , selecting manifest.json on mac 47.0.1, silently fails. i've found success installing firefoxdeveloperedition, there way?

assembly - Difference in ABI between x86_64 Linux functions and syscalls -

the x86_64 sysv abi 's function calling convention defines integer argument #4 passed in rcx register. linux kernel syscall abi, on other hand, uses r10 same purpose. other arguments passed in same registers both functions , syscalls. this leads strange things. check out, example, implementation of mmap in glibc x32 platform (for same discrepancy exists): 00432ce0 <__mmap>: 432ce0: 49 89 ca mov %rcx,%r10 432ce3: b8 09 00 00 40 mov $0x40000009,%eax 432ce8: 0f 05 syscall so register in place, except move rcx r10 . i wondering why not define syscall abi same function call abi, considering similar. the syscall instruction intended provide quicker method of entering ring-0 in order carry out system call. meant improvement on old method, raise software interrupt ( int 0x80 on linux). part of reason instruction faster because not change memory, or change rsp point @ kernel stack. ...

c# - How do I validate a checkbox value in ASP.NET MVC? -

Image
i have following viewmodel public class reportfilters { [required] public datetime { get; set; } [required] public datetime { get; set; } [required] public int userid { get; set; } public bool iscorrect { get; set; } } i pass either value 1 or 0 when call route iscorrect modelstate.isvalid returning false. this started happen after added public bool iscorrect { get; set; } here how controller action [httppost] [validateantiforgerytoken] public jsonresult gettotals([bind(include = "from,to,userid,iscorrect ")] reportfilters reportfilters) { if (modelstate.isvalid) { somemodel results; if(reportfilters.iscorrect) { results = conn.database.sqlquery<somemodel>(somequery, from, to).tolist(); } else { results = conn.database.sqlquery<somemodel>(someotherquery, from, to).tolist(); } return json(results, jsonrequestbehavior.allowget...

Piping histograms in dplyr (R) -

Image
is possible pipe multiple graphs in dplyr. this working: birdsss = data.frame(x1 = 1:10,x2 = 21:30,x3 = 41:50) birdsss%>% with(hist(x1, breaks = 50)) but not working: birdsss%>% with(hist(x1, breaks = 50)) %>% with(hist(x2, breaks = 50)) %>% with(hist(x3, breaks = 50)) error in hist(x2, breaks = 50) : object 'x2' not found i've tried: birdsss%>% with(hist(x1, breaks = 50)) & with(hist(x2, breaks = 50)) & with(hist(x3, breaks = 50)) and birdsss%>% with(hist(x1, breaks = 50)) ; with(hist(x2, breaks = 50)) ; with(hist(x3, breaks = 50)) what solution print multiple columns in 1 line? something like: birdsss%>% with(hist(x1:x3, breaks = 50)) i'm using longer pipe (filter(), select(), etc.) , finish multiple graph. simplified code here. lapply to put of comments above answer, simplest way make histogram of each variable is # let's put them in single plot p...

Start Dialog without prompt in bot (for C#) -

i'm building bot microsoft bot framework, v3, in c# , trying have dialog start , "welcome" user instructions before enter input. dialog repeat every time user completes form. i'm attempting use formflow options: formoptions.promptinstart still having welcome message appear after enter input. not sure if deprecated v1 or i'm not doing right. advice?? my classes below: messagescontroller: internal static idialog<myclass> makerootdialog() { return chain.from(() => formdialog.fromform(myclass.buildform, options: formoptions.promptinstart)) .do(async (context, order) => {//some actions here } }); } myclass.cs : [serializable] public class myclassdialog : idialog<object> { public async task startasync(idialogcontext context) { context.wait(messagereceivedasync); } public async task messagereceivedasync(idialogcontext context, iawaitable<imessageactiv...

visual studio code - Is there any extension of VScode that find node_modules -

if type require('... find module installed, there extension find module(snippet) on vscode ? yes, there npm intellisense extension.

Android Toolbar with Spinner with white text and white popup background? -

Image
i've been trying add spinner toolbar failed achieve want. this have far. as can see on screen shots, spinner's selected text color black (i want white) while popup has white background text color black (this ok). here's code. <android.support.v7.widget.toolbar android:id="@+id/bottom_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/themeoverlay.appcompat.light" android:layout_alignparentbottom="true"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_co...

mysql - Selecting Max TimeStamp values for each ID within a Parameterized View -

mysql version 5.5.49, on linux mint (ubuntu 14.04.1 based) the people table contains of family: jed, david, sarah, , luke. cars table contains 2 cars own. carpeople table contains entry each person rides in car, , contains keys associate personid carid. last cardata table, contains color of car, personid of last painted car, image of paint job, date of paint job, , url see image. this strange example, idea people associated specific car id's can paint or ride in car. example data inserted has jed (1) , david (2) riding in car 1, while david (2), luke (3), , sarah (4) ride in car 2. the following query result must contained in view, parameter passed in references personid: show carid, imageurl, , people ride personid, latest dataentrytime each carid. my people_concat column isn't outputting correct results, can fix later. my main issue can't figure out how output data row max dataentrytime each carid within view. changes have tried result in 1 row being o...

MySQL If Statement and Increment -

Image
i having issues mysql if statement creates group rank. here mysql statement: select encode, enname, quscore, @scorerank := if(@currathlete = encode, @scorerank + 1, 1), @currathlete := encode ranking order encode, quscore desc it gives following output '1004277','ashe','1628','1','1004277' '1004277','ashe','1309','1','1004277' '1004277','ashe','1263','1','1004277' '1004277','ashe','648','1','1004277' '1004277','ashe','645','1','1004277' '1004277','ashe','1628','1','1004277' '1015934', 'sabina', '544', '1', '1015934' '1015934', 'sabina', '455', '1', '1015934' '1015934', 'sabina', '276', '1', '1015934' '1015934', ...

java - Why is catching checked exceptions allowed for code that does not throw exceptions? -

in java, methods throw checked exceptions ( exception or subtypes - ioexception, interruptedexception, etc) must declare throws statement: public abstract int read() throws ioexception; methods not declare throws statement can't throw checked exceptions. public int read() { // not compile throw new ioexception(); } // error: unreported exception java.io.ioexception; must caught or declared thrown but catching checked exceptions in safe methods still legal in java: public void safemethod() { system.out.println("i'm safe"); } public void test() { // method guarantees not throw checked exceptions try { safemethod(); } catch (exception e) { // catching checked exception java.lang.exception throw e; // can throw... checked exception? } } actually, no. it's bit funny: compiler knows e not checked exception , allows rethrow it. things bit ridiculous, code not compile: public void test() { // guarantees not throw ch...

javascript - PubNub Presence Repeating 403 Forbidden Error -

i'm trying use pubnub presence in app , i'm getting repeating forbidden error. have permissions enabled in pubnub admin portal. here subscription code: var initsettings: pubnub.iinitsettings = { publish_key: "mypubkey", subscribe_key: "mysubkey", uuid: "myuuid", auth_key: "myauthkey" }; this.pubnub = pubnub(initsettings); console.log(this.pubnub); var subscribesettings: pubnub.isubscribesettings = { channel: "chat", presence: this.userconnected, message: this.processmessage }; this.pubnub.subscribe(subscribesettings); this userconnected callback: userconnected = (m: any) => { var herenowsettings: pubnub.iherenowsettings = { channel: this.channelstring, callback: (message: any) => { this.channelcount++; } }; this.pubnub.here_now(herenowsettings); }; i repeating error says pubnub-3.7.14.js:2644 http://ps17.pubnub.com/subscri...

java - Gson FieldNamingStrategy with multiple policies -

i want map underscored field(such this_field_to_mapped ) camelcase( thisfieldtomapped ). so created gson object gsonbuilder , coded new class implemented fieldnamingstrategy , someclass . and i'd run gson.fromjson {"thisitem" : "hello", "this_field_to_mapped":1} , console log had printed out this. replaced : thisitem replaced : thisfieldtomapped hello 0 thisitem mapped well, thisfieldtomapped had printed 0. how can map underscored field camelcase ? here's code. someclass public static class someclass { public string thisitem; public int thisfieldtomapped; } underscoretoupper public static class underscoretoupper implements fieldnamingstrategy { public string translatename(field f) { string name = f.getname(); pattern p = pattern.compile("[_][a-z]{1}"); matcher m = p.matcher(name); while (m.find()) { system.out.println("match...

access mySql via multiple ssh in java -

i'm new ssh , have question. have connect via ssh gateway , within ssh session i've ssh server. can connect mysql server. ssh <gateway> ssh -l3306:db02:3306 username@db02 then can configure putty , heidysql access mysql database. far, good. but want access mysql database via java code. googled , found code use jsch. so, below result of code. when run code, session okay, portforwarding okay. but part giving me error: connection con = drivermanager.getconnection("jdbc:mysql://localhost:"+nlocalport, strdbuser, strdbpassword); this error: java.sql.sqlexception: access denied user 'dbuser'@'gateway.appl.local' (using password: yes) it seems port forwarding not done because of error shows connect gateway: 'dbuser'@' gateway .appl.local' after succesfull port forwarding should show this: dbuser'@'**db02**.appl.local import com.jcraft.jsch.jsch; import com.jcraft.jsch.jschexception; import com.jcr...

json - response with status 200: ok -

i trying figure out how plot data local '.json' file using angular2-highcharts example. i followed example in ' https://www.npmjs.com/package/angular2-highcharts ' first understand how plot .json data , worked. took data available example , created local .json file (copied content ' https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=jsonp_callback ' in notepad , saved utf-8 encoding .json file), , replaced file path json request this. when though, error - response status 200. constructor(jsonp : jsonp) { //jsonp.get('https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=jsonp_callback').subscribe(res => { jsonp.get('./data.json').subscribe(res => { this.options = { title : { text : 'aapl stock price' }, series : [{ name : 'aapl', data : res.json(), tooltip: { ...