Posts

Showing posts from March, 2015

media player - Voice does not record when playing video in video view in android -

i developing application want start recording voice on button click, , want star playing video in video view @ same time. app works on androdi 4.2 , android 5.1 not work on latest device android 7.0. here code public class mainactivity extends activity { button start,stop,play; boolean recording=false; string press_value="exit"; private static final string audio_recorder_folder = "audiorecorder"; boolean let_start_recording=true; imageview startiv,profileiv; boolean recording_is_in_progress=false; videoview vv ; mediaplayer mplayer; relativelayout mainrel; ///new media player string audiosavepathindevice = null; mediarecorder mediarecorder ; random random ; string randomaudiofilename = "abcdefghijklmnop"; public static final int requestpermissioncode = 1; mediaplayer mediaplayer ; @suppresswarnings("deprecation") @override protected void oncreate(bundle savedinstan...

java google developer api not working from GUI environment -

i run java samples in eclipse environment. when tried run basic gui basicuploadapk sample did not worked , seems blocked in authentication request. my question if basicuploadapk sample working in console environment , not in gui environment? best regards, aurelian

php - How to run a win32 console application on Linux/Apache web-hosting? -

the executable uses 2 un-managed dlls & gives output on console. i'm running on xampp/localhost (on pc) & grabbing console output php's exec()/passthru() function. will run same way on typical apache/linux based web-hosting account? if not , can do? in php : <?php exec("tradelogin.exe",$output); //tradelogin.exe win32-console-app, //situated @ xampp/htdocs, couple of supporting binary files & dlls //(compiled on visual-studio-2015) echo $output[0]."<br/>"; echo $output[1]."<br/>"; ?> i can't tell if there permission problems (i'm on windows atm. can't try.) if want run way, need windows emulator (like wine example), , use like exec("wine tradelogin.exe 2>&1",$output); or full path may necessary. note execution of php code stop until program has finished running.

websocket - Watson Speech To Text Latency -

using websockets connect stt. working part. when streaming half hour newcast watson stt find respose time 1 2 seconds on average. periodically experience longer delays. 8 seconds, 10 seconds. things backed , delay can as 60 seconds or more! has else experienced behavior ? have suggestion on how overcome problem? thanks! the event reporting not ibm watson aware of. our customers typically happy latency of speech-to-text service. can please contact technical support through link can bottom of this? https://support.eu-gb.bluemix.net/gethelp/ btw. if can provide transaction-id of 1 of transactions in experienced long delays troubleshooting.

webpack - Vuejs in production: prefix static path -

context i'm building vuejs app , push in production. i've generated files using npm run build , i've uploaded on server (iis). i have lot of other applications on server , can't change how works. here fake example me explain issue: mydomain.com/app1 redirect web-app under folder app1 . add vuejs project i've created new folder - lets vueapp - , access via mydomain.com/vueapp . the thing : static paths generated vue not prefixed vueapp . paths in index.html not want : mydomain.com/static/** instead of mydomaim.com/vueapp/static/** vue request. i tell webpack prefix index.html 's path can't work. assetssubdirectory config/build.js gives possibility change assets sub directory (which static default). can set vueappprefix/static of course, doesn't work. expected: mydomain.com/vueapp/vueappprefix/static/* what get: mydomain.com/vueappprefix/static this obvious. of course can edit index.html hand or add script know if t...

bytecode - Can you "compile" PHP code? -

i know php compiled byte code before run on server, , byte code can cached whole script doesn't have re-interpreted every web access. but can "compile" php , upload binary-ish file, run byte code interpreter? after question asked, facebook launched hiphop php best-tested php compiler date (seeing ran 1 of world’s 10 biggest websites). however, facebook discontinued in favour of hhvm, virtual machine, not compiler. beyond that, googling php compiler turns number of 3rd party solutions. phalanger codeplex (download), wikipedia compiles .net (cil) phc compiles native binaries not active (february 2014) – last version in 2011, last change in summer 2013 roadsend php compiler github , github of rewrite free, open source implementation of php compiler compiles native binaries (windows, linux) discontinued since 2010 till contributors found – website down, stays on github last change 2012 bcompiler pecl extension of php experimen...

xamarin.forms - Changing image size relatively to the view in the ListView in Xamarin Forms -

i have listview contains image, image take size depending on view size or container size appears smaller on phones , bigger on tablets. know , can not access , element name inside listview, alternitive way achive that? use fillandexpand or fill values horizontaloptions , verticaloptions extentions.

html - Input Fields Do Not Resize Properly with Browser -

Image
ok, when resizing browser input fields not resize , overlap each other in middle , distorted before media script kicks in , sets 100%. text area width 100% not line forms. dealing contact form has been exhausting, , haven't tried figure out how send email yet lol... https://p.w3layouts.com/demos_new/template_demo/01-07-2017/my_design-demo_free/528613908/web/index.html bonus question: why input have wrapped in span or ignores parent divs boundaries?? per request, here jsfiddle script. https://jsfiddle.net/lxlux35m/1/ .block { width: 100%; background-color: #edeeef; padding: 50px 0; } .block:nth-of-type(odd) { background-color: #ffffff; } .block:after { content: ''; display: block; clear: both; overflow: hidden; zoom: 1; height: 0; } .blockwrapper { text-align: center; max-width: 60%; margin: 0 auto; } .blocksizer1, .bl...

syntax - Prolog: syntactically correct objects + relation vs. structure -

i'm new prolog , gradually working way through ivan bratko's 'prolog programming artificial intelligence' (4th ed.). when doing exercise 2.1. (page 39), fail see why 5(x,y) syntactically not correct, while +(north,west) correct. @ first thought had fact functor number (as thought atom), according book, atom can digit. thought problem arguments being variables, fail see why pose problem syntactical correctness. point me in right direction of explanation? furthermore wondering exact difference between relation , structure. while date(1, may, 2001) (on page 35) seen structure, wondering if can same earlier examples chapter 1. is, example, relation parent(pam,bob) first chapter so-called structure, or confusing things? thanks in advance. i fail see why 5(x,y) syntactically not correct, while +(north,west) correct. a single digit not atom, number. on page 33 section 2.1.1 atoms , numbers reads: atoms can constructed in 3 ways: 1. strings of l...

apache - NGINX HTTPS Server - SSL_ERROR_BAD_CERT_DOMAIN -

i have nginx server running on ec2 instance, , i'm implementing https on server. generated ssl certificate on site , put on server. restarted server , still runs right, got 2 problems (my domain hbesco.com.br, , that's common name put certificate request): it doesn't enter https default, goes http. also, if force https://hbesco.com.br , goes ok. https://www.hbesco.com.br , gives me following error: unable communicate securely peer: requested domain name not match server’s certificate. http strict transport security: false http public key pinning: false certificate chain: -----begin certificate----- (...) my nginx sites-available/default set bellow: server { listen 443 default_server; ssl on; ssl_certificate /usr/share/nginx/certificado-2048/certificadossl.crt; ssl_certificate_key /usr/share/nginx/certificado-2048/certificadossl.key; server_name hbesco.com.br; passenger_enabled on; rails_env production; ...

python - Duplicate static_placeholder makes placeholders uneditable -

Image
my site has newsbanner displayed on every page, have created static_placeholders manage content of it. however, banner has different on mobile, means i've created 2 sections, 1 displays large screen newsbanner , other section displays mobile version. content, however, same, have duplicated static_placeholder large screen section mobile section this: <div class="section no-padding"> <div class="row hide-on-large-only hide" id="announcement-mobile" style="background: linear-gradient(to bottom, #26a69a 0%, #26a69a 50%, #ffffff 50%, #ffffff 100%); "> <div class="col s12"> <div class="card"> <div class="card-image"><a class="btn-floating btn-flat waves-effect waves-default transparent hide-announcement" href="#!" style=""><i class="material-icons">close</i...

amazon web services - how to change existing kubernetes aws cluster with kops (change nodes type) -

i have deployed kubernetes cluster kops.... kops create cluster --state=${state_store} --cloud=aws --zones=eu-west-2a,eu-west-2b --node-count=2 --node-size=t2.small --master-size=t2.small ${name} is way change node-size after deployment? without deleting cluster... yes possible. you need run command: kops edit ig --name=change_to_cluster_name nodes this bring , editor screen similar to: apiversion: kops/v1alpha2 kind: instancegroup metadata: creationtimestamp: "2017-07-01t12:06:22z" labels: kops.k8s.io/cluster: url_of_cluster name: nodes spec: image: kope.io/k8s-1.6-debian-jessie-amd64-hvm-ebs- machinetype: m3.large maxsize: 7 minsize: 3 role: node subnets: - eu-west-1a you can make edit's machine type , min / max nodes required. once done, exit out of editor would. need run command: kops update cluster change_to_cluster_name --yes that'll begin update process - bear in mind instances going disappear , pods runni...

javascript - Need help p5.js and Atom Text Editor -

well started off atom , p5.js new javascript . here comes problem : when try run file shows me "sketch.js not .py file, exit" . checked the selection set javascript can't figure out wrong.. please ! well "sketch.js" default 1 comes "p5.js" , yes have installed "node.js" no issues , problem comes when edit "sketch.js" template , try run , shows saving , after says "sketch.js not .py file, exit" you using editor genie or runs python programs default. have installed node.js? if not install , browse directory using command prompt. run "c:\program files\nodejs\node.exe" file.js

aws sdk - How to get only the rows user has access in Dynamodb using batch get item? -

i'm trying protect rows of dynamodb table based on key. can accomplish using dynamodb:leadingkeys condition. works if make single getitem query. have several rows load/check access, , want query of them @ once, , receive rows user has access. for instance have following table in dynamo: accesstype | key public | private | b using following policy: { "sid": "restrictprivate", "effect": "allow", "action": [ "dynamodb:batchgetitem", "dynamodb:describetable", "dynamodb:getitem", "dynamodb:listtables", "dynamodb:query", "dynamodb:scan" ], "resource": [ "arn:aws:dynamodb:region:acc:table/keys" ], "condition": { "forallvalues:stringequals": { "dynam...

html - How do i change the color of my navbar that has a fixed position? -

i've been trying add "background-color" leaves big empty gap in between header img , header nav due position.without position, header nav wouldn't want (towards right) (i can't use bootstrap or whatever because not in syllabus , im starting out code) this code: header { margin-top: auto; height: 79px; overflow: hidden; } header img { float: left; position: fixed; z-index: 2; top: 0; } header nav { float: right; position: fixed; z-index: 2; top: 0; height: 79px; left: 542px; } <header> <a href="index.html"><img src="images/greylogo.png" alt="e r i" /></a> <nav> <ul> <li> <a href=#> home </a> </li> <li> <a href="aboutme.html"> me </a> </li> <li> <a href="events.html"> events </a></li> <li> <a href=...

apache - Evaluate my forecast using a Pipeline Model -

there part of code below ; know how can evaluate forecast ? if, want know importance of feature there trick use featureimportances of randomforestregressionmodel ? should directly switch randomforestregressionmodel , not using pipelinemodel ? i read using pipeline give better results that's why i'm using it. tried using regressionevaluator don't want. or should think simple , convert dataframe rdd , use regressionmetrics mean squared error. to summarize, need know best method evaluate forecast. val assembler = new vectorassembler() .setinputcols(array("customers", "year", "month", "dayofmonth", "dayofweek", "weekofyear", "dayofyear")) .setoutputcol("features") val limitdate = "2017-04-01" val trainingdata = df_2.filter(df_2("time").lt(lit(limitdate))) //trainingdata.printschema() val rf = new randomforestregressor() .setnumtrees(60) .setmaxdept...

r - Screeplot for variance after rda(mydata) in vegan -

i trying make 2 screeplots. 1. screeplot shows variance of each pc 2. plot shows relation of each variable pcx i used vegan pca: lui.c.v.pca <- rda(lui.c.v, scale=true) i tried 1 vegan guide , replaced x (2x) lui.c.v.pca: screeplot(lui.c.v.pca, bstick = false, type = c("barplot", "lines"), npcs = min(10, if (is.null(x$cca)) x$ca$rank else x$cca$rank), ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "component", ylab = "inertia", main = deparse(substitute(lui.c.v.pca))) error: object 'x' not found does know did wrong or how can easily? thanks!

javascript - How to be sure if a new field can be added to the pre-existing object or not? -

i'm c/python guy, shifted 'javascript' recently. basically, receive object (named context ) in function argument.the caller function's definition hidden me. need add field( type ) context . when add type context directly, doesn't reflect changes in 'context'. when try modify value of 1 of existing field of 'context', change reflected. then create 1 more object( new_obj ) , copy 'context' in 'new_object', tried add field in 'new_object', unsuccessful. behaviour, guess value not copied reference is. so need copy field field in new_obj , add new field 'type'. if create local object, new fields being added , object structure modified. so far good. wondering implementation of 'context' object in background caller function. mean if there 'const' type thing here(as in c, (random thoughts :p)), @ level applied i.e. there restriction of adding new fields or of changing values of existing fields. n...

ios - Error message 'ld: warning: directory not found for option' while installing and 'library not found for -l' with CocoaPods -

Image
i installed irldocumentscanner & objectivedropboxofficial impossible compile because of error message: i had dependancies problems or update problems using kind of tools. prefer integrate manually libraries instead of using cocoapods... i suggest remove pods using this: remove or uninstall library added : cocoapods and manually install libraries. seems more difficult, you'll save time anyway.

excel - VBA Create Multi Pivot Table -

code running no error pop-out, no pivot table showing in tab apple# , banana#.there must wrong. hope check code.. or teach me better way this. sub tabletesting() dim papplesheet, pbananasheet worksheet dim dapplesheet, dbananasheet worksheet dim applecache1, applecache2, bananacache1, bananacache2 pivotcache dim appletable1, appletable2, bananatable1, bananatable2 pivottable dim papplerange, pbananarange range dim lastrowapple, lastrowbanana long dim lastcolapple, lastcolbanana long 'apple on error resume next set papplesheet = worksheets("apple#") set dapplesheet = worksheets("apple") lastrowapple = dapplesheet.cells(rows.count, 1).end(xlup).row lastcolapple = dapplesheet.cells(1, columns.count).end(xltoleft).column set papplerange = dapplesheet.cells(1, 1).resize(lastrow, lastcol) set applecache1 = activeworkbook.pivotcaches.create _ (sourcetype:=xldatabase, sourcedata:=papplerange). _ createpivottable(tabledestination:=papplesheet.cells(1, 1), _ ...

html - Placing button on Bottom right corner of jsp page -

i want place button on bottom right corner of page. trying place without using external css in jsp page. topmargin , leftmargin not work. button position @ same place. <table topmargin="30" leftmargin="50"> <tr> <td><input type="button" value="close" onclick="closewindow();" /></td> </tr> </table> can please point me in right direction on this. tia if going use inside table, can design in such way last row last column should have the button. or if trying fo page in general try below code <div style="position:absolute;bottom:10px;right:10px; z-index:999" > <input type="button" value="close" onclick="yourfunction();" /> </div>

arrays - How to get all labels from the state REACTJS -

i have form created dynamically (not sure how created) know have clear form. what have done sone far: ... resetform: function() { this.updatevalue('id', ''); this.updatevalue('field_1', ''); this.updatevalue('field_2', ''); this.updatevalue('field 3', ''); this.updatevalue('field4', ''); }, ... i know don't want have manually type in each field name. know in console can this.state.fields , array of objects. label element each array value. thanks you should able resetform: function() { (var = 0; < this.props.fields.length; i++) { this.updatevalue(this.props.fields[i].label, ''); } }, i hope helps: happy hacking

xamarin - Is there a way to code a label and a switch in a ViewCell without using StackLayout? -

the application working on has labels , on right side switch. here's sample of xaml used achieve this: <viewcell x:name="ss"> <stacklayout verticaloptions="centerandexpand" padding="20,0,20,0"> <stacklayout orientation="horizontal" verticaloptions="centerandexpand"> <stacklayout horizontaloptions="startandexpand" verticaloptions="center"> <local:labelbodyrendererclass text="show subcategory" yalign="center" xalign="center" /> </stacklayout> <stacklayout horizontaloptions="endandexpand" orientation="horizontal"> <switch x:name="ssswitch" toggled="ssswitch" verticaloptions="center" /> </stacklayout> </stacklayout> </stacklayout> </viewcell> what find out if there more optimal way ...

python - Iterating through a loop at the same rate with different variables -

i trying figure out how iterate through loop @ same time. not sure if wording question properly. for example, need difference of column 1 both dataframes stored in calibrated power 0 [dbm] or column 4 of df. need column 2 stored in calibrated power 10 [dbm] column. @ moment, same data being copied columns 4-6 of df attenuator_power = [0, 10, 30] in range(1, 3): ydata_sans_att = df_sans_attenuator.iloc[:, i] ydata_df = df.iloc[:, i] j in attenuator_power: df['calibrated power {} [dbm]'.format(j)] = ydata_df - ydata_sans_att this how pair them: for i, j in zip(range(1,3), attenuator_power): ydata_sans_att = df_sans_attenuator.iloc[:, i] ydata_df = df.iloc[:, i] df['calibrated power {} [dbm]'.format(j)] = ydata_df - ydata_sans_att

c - Segmentation fault on strcat -

i have begun working on learning c language , have repeatedly run error in calling strcat function <string.h> module results in segmentation fault. i've searched answers online, including on this stackoverflow post , without success. thought community might have more personal insight problem, general solutions don't seem working. might user error, might personal issue code. take look. #include <stdio.h> #include <string.h> char * deblank(const char str[]){ char *new[strlen(str)]; char *buffer = malloc(strlen(new)+1); (int i=0; i<strlen(*str); i++){ if(buffer!=null){ if(str[i]!=" "){ strcat(new,str[i]); //segmentation fault } } } free(buffer); return new; } int main(void){ char str[] = "this has spaces in it."; char new[strlen(str)]; *new = deblank(str); puts(new); } i've placed comment on line i've traced segmentation fa...

hadoop - How to make file optional in Oozie workflow? -

suppose have workflow action need , use file hdfs if exists not fail otherwise. there way in workflow configuration? so, if have this: <action name="run"> <java> <main-class>ajavaprogram</main-class> ... <arg>-files</arg> <arg>properties.json</arg> ... <file>${concat(additionspath, "properties.json")}</file> ... </java> </action> it works fine long properties file exists in hdfs in right place, if doesn't, workflow fails. there way not fail if file isn't present copied hdfs? way make file optional workflow.xml? every action has 2 options <ok to="myshelljob"/> <error to="myshelljob"/> in error section mentioned next shell action name , instead of failing. continue next shell action. in shell action can check file exists or not. if file not exists, continue next action , i...

python - How does Spark handle Timestamp types during Pandas dataframe conversion? -

i have pandas dataframe timestamp columns of type pandas.tslib.timestamp. looked through pyspark source code 'createdataframe'( link source ) , seems convert data numpy record array list: data = [r.tolist() r in data.to_records(index=false)] however, timestamp types converted in process list of longs: > df = pd.dataframe(pd.date_range(start=datetime.datetime.now(),periods=5,freq='s')) > df 0 2017-07-25 11:53:29.353923 1 2017-07-25 11:53:30.353923 2 2017-07-25 11:53:31.353923 3 2017-07-25 11:53:32.353923 4 2017-07-25 11:53:33.353923 > df.to_records(index=false).tolist() [(1500983799614193000l,), (1500983800614193000l,), (1500983801614193000l,), (1500983802614193000l,), (1500983803614193000l,)] now if pass such list rdd, operations(not touching timestamp column) , call > spark.createdataframe(rdd,schema) // schema mentioning column timestamptype typeerror: timestamptype can not accept object 1465197332112000000l in type <type 'long'...

Adding space between Navigation bar and legend in pie chart(highcharts) -

http://jsfiddle.net/6kjuf1aa/ highcharts.chart('container', { chart: { width: 458, height: 98 }, title: { text: "" }, legend: { align: 'center', verticalalign: 'middle', layout: 'vertical' }, tooltip: { pointformat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotoptions: { pie: { startangle: 0, endangle: 360, center: ['10%', '80%'] } }, series: [{ type: 'pie', name: 'hi', innersize: '75%', data: [ { ...

if statement - Tic Tac Toe in swift - Winning line -

i followed tut me build tic tac toe game keep learning swift. in doing wanted add winning slashes whatever combination wins. in code have let winningcombinations = [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]] these buttons tags. i have created labels color bars no text slashes. connected them 1 @iboutlet weak var linefirstrow: uilabel! then hid label on storyboard. i have been trying things like let linerowone = [0, 1, 2] if linerowone = true { linefirstrow.ishidden = true } else { linefirstrow.ishidden = false } i know not correct. not entirely sure you're trying achieve, suspect solution on this: let winningcombinations = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]] let lineone = [0, 1, 2] if winningcombinations.contains(where: { $0 == lineone }) { // stuff }

ios - How do I link each user to their data in Firebase for Swift 3? -

i have created project integrated firebase. has signup , login features. have personal information form fill individual users. when users different, data shown users. need show information related linked users. person should able access his/her database. couldn't find proper solution in swift 3. from best can tell seems not referencing correct node in database. seeing of users data because variable messageref pointed @ /users . if you'd users see data need organize data when save messageitem is @ /users/{user_id} . access first getting user_id , reading it's new location ( /users/{user_id} ). so i'd change these lines this: override func viewdidload() { super.viewdidload() messageref = databaseref.child("users") // additional setup after loading view. } to this: override func viewdidload() { super.viewdidload() guard let user = auth.auth().currentuser else { return } messageref = databaseref.child(...

android - How can I complete my constructor? -

i have code: override fun oncreateoptionsmenu(menu: menu): boolean { menuinflater.inflate(r.menu.menu_search, menu) val searchitem = menu.finditem(r.id.action_search) val searchview = menuitemcompat.getactionview(searchitem) searchview //*** setonquerytextfocuschangelistener *** searchview.setonquerytextfocuschangelistener(object : view.onfocuschangelistener() { override fun onfocuschange(v: view, hasfocus: boolean) { } }) searchview.setonquerytextlistener(object : searchview.onquerytextlistener { override fun onquerytextsubmit(query: string): boolean { return false } override fun onquerytextchange(searchquery: string): boolean { adapter!!.filter(searchquery.tostring().trim { <= ' ' }) tvlistanimal.invalidate() return true } }) return true } the probl...

Youtube playlistItems do not return all items -

Image
i'm trying fetch whole youtube playlist, going wrong. looks playlistitems not return items. more precise, larger playlist returns 26 elements. edited this issue affect playlist "50+ videos" hover the fun fact affect youtube website when open following link whole playlist on right side https://www.youtube.com/watch?v=obwl2glmqc0&list=plhy8tb5u6n17r78u7usalqfcc8nbng8nc when same on "affected" playlist, ends on 26th element https://www.youtube.com/watch?v=p7zsbpk656s&list=rdqmxztl9gi53rg (additionaly "affected" playlist have shorter url) /edited f.i. https://www.googleapis.com/youtube/v3/playlistitems?part=snippet&maxresults=50&playlistid=rdzgey-ekngn8 returns /** * api response */ { "kind": "youtube#playlistitemlistresponse", "etag": "\"m2yskbqfythfe4irbtieogyyfbu/juh7dgrihxg9sc1xb0bkgzz5mqo\"", "pageinfo": { "totalresults": 2...

java - Alarm Manager and system time -

i want time time picker comparing system time. if both times compared , equal want show toast "time reached". have tried code. not working. calling toast before time reached. plus not working when app closed. suggestions or approach? if(code.contentequals("1")) { toast.maketext(getapplication(), "before hour: " + calendar.get(calendar.hour_of_day), toast.length_long ).show(); toast.maketext(getapplication(), "befor min: " + calendar.get(calendar.minute), toast.length_long ).show(); toast.maketext(getapplicationcontext(), "am pm "+ calendar.get(calendar.am_pm), toast.length_short).show(); done.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { if (build.version.sdk_int >= build.version_codes.m) { hour = timepicker.gethour(); toast.maketext(getapplicationcontext(), "if hou...

Scala lambda function not resolved when declares the type of parameter? -

when defining method in scala, found this def method1: int => int = (j: int) => j // works def method2: int => int = j => j // works def method3: int => int = j: int => j // error def method4: int => int = {j: int => j} // works can explain why method3 not work? there ambiguity in it? one possible explanation indeed restriction avoids ambiguity: x: => b understood anonymous function takes parameter x of type a , returns object b . or understood "casting" variable x type a => b . rare both of these valid programs, not impossible. consider: class foo(val n: int) val foo = new foo(0) val j: int => foo = new foo(_) def method1: int => foo = (j: int) => foo def method2: int => foo = j: int => foo println(method1(1).n) println(method2(1).n) this compiles , prints: 0 1

single sign on - ASP.Net Application SSO with ADFS -

my application in asp.net 4.0 webform version. application runs on saas based model. deployed on internet. one of client wants use adfs sso implementation. when user logged in domain local intranet , try open application deploy on internet should automatically logged application. process flow be user logged domain open browser , try open internet application authenticate user adfs , valid user return claims any blog or msdn - how configure adfs (we did @ our end when user redirected adfs again ask login adfs). how achieve this? you talking iwa - refer this (page down). note browser functionality. create rp trust here .

c# - Unit Testing - How to test long running external processes -

i have method calls method class in turn executes numerous private methods within second class. 1 method writes file picked external process, external process runs between 5 30 mins depending on needs processed, file produced picked application reads , returns data initial method called. i know described not "unit" method public, question need test in method , how mock call method within second class? or let method run whether 5 mins or 30 mins? class { public list<dataclass> methodundertest() { list<string> requireddata; secondclass b = new secondclass(); requireddata = b.generatefile(); //b.generatefile() executes number of private methods within secondclass, //this can treated service call. runs between 5 , 30 mins return requireddata.select(r => new dataclass{ property1 = r.substring(0,2), property2 = r.substring(3,5),...

jfrog cli - What's is the moduleId in nuget repository in artifactory server? -

i use jfrog cli. use these commands: jfrog.exe rt upload 'mypackage.1.0.0.0.nupkg' 'nuget_repo/org/module/' --url=**** --user=**** --password=**** --build-number=20170725.2.10 --build-name=build_mynuget jfrog.exe rt bce build_mynuget 20170725.2.10 jfrog.exe rt bp build_eit.framework 20170725.2.10 --url=**** --user=**** --password=**** this create build in artifactory contain 1 module. module contains mypackage. when go package information, , because use correctly layout configuration, can see module-id org:mypackage:1.0.0.0 my problem don't know how configure module of build. in fact don't understand difference between 2 module (module-id , module in build). why in build section, build id not same? thanks in advance. adrien

Chrome Devtools console autocomplete key shortcut change -

when use chrome devtools console, tab key used perform autocomplete when typing. can key changed? impartial towards enter since how eclipse/netbeans work. there option / extension / options file allow me change that? thanks in advance.

jira - Date math and formatting using JQL -

i need create jql filter uses current date , subtracts 2 months using fixversion (string). is there way (this pseudocode): fixversion = "'"+(now().month() - "2m").tostring()+"_2017" no, not possible out of box. fixversion not date field cannot perform date operations on in jql. for date fields, jira supports expressions these: duedate >= "2008/12/31" created >= "-5d" created > startofmonth("-1") however, can implement own custom jql function support this, either writing custom add-on or using (commercial) add-on script runner. for more info check: advanced searching - functions reference advanced searching - operators reference script runner on marketplace script runner - custom jql functions

jquery - Ajax get request returns Content-Type "text/javascript; charset=utf-8" cannot process -

i making following request: $.ajax({ url: url, method: "get", datatype: "jsonp", scriptcharset: 'utf-8', success: function (response) { alert("success: " + response); }, fail: function (response) { alert("fail: " + response); }, done: function(response) { alert("fail: " + response); }, }); the url looks like: https://www.somedomain.com/blah-150/lc-add.js?[form]email=secret@mail.com&[form]name=billleblanc&[form]postcode=e3n3p1&[form]emailstatus=verified&callback=? when request made can see in network tab of firefox successful , response (tab in ff) request looks like: ("success", "added", {"form_data":{"email":"secret@mail.com","name":"billleblanc","post...

mysql - no data show in table after adding search by date range and name in laravel -

i have 2 table "patient" , "booking" table, , there relationship "one many" between them, made search form in index_booking page user can type patient_name on search user name according condition search date range , there no data appear in form till search date , don't know why data show default according condition : this booking model class booking extends eloquent { public function patient() { return $this->belongsto('app\patient'); } public function user() { return $this->belongsto('app\user'); } } this patient model class patient extends eloquent { public function booking() { return $this->hasmany('app\booking'); } public function user() { return $this->belongsto('app\user'); } } and used code in index page of booking <div class="search1"> {!! form::open(['method'=>...

c# - Getting stored procedure output parameter with Entity Framework is throwing a mapping error: The data reader is incompatible with the specified -

Image
i working on legacy application , trying make call stored procedure returns integer getting mapping error. error one: the data reader incompatible specified if_insert_incidents_citizen'. member of type, 'intid', not have corresponding column in data reader same name. i tried change name _intid , knowing entity framework translates names starts @variable _variable . the weird thing if make use linqpad , make call stored procedure correct value of @intid this stored procedure: create procedure [dbo].[if_insert_incidents_citizen] @chvfolio varchar(50), @chvowner_name varchar(100), @chvowner_address varchar(100), @dtsdate_created smalldatetime, @intuser_id integer, @chvdescription varchar(250), @chvemail varchar(50), @intincident_type_id integer, @intincident_status integer, @intid int output set nocount on declare @interrorcode int declare @intapp_id int select @intincident_type_id = cast(pa...