Posts

Showing posts from August, 2014

sql - SAP B1 Query Returns "Must declare scalar variable " error -

i attempting create drop down menu limit query results item buyer following sql code. however, keep getting error stating need declare scalar variable @itembuyer, despite fact declared , set in code. declare @itembuyer varchar(30) set @itembuyer= /* t3.ownercode */ '[%1]' declare @sql varchar(max) set @sql = 'select t3.[docnum] docnumber, t3.[cardcode] vendorcode, t3.[cardname] vendorname, t3.ownercode buyerid, t2. [itemcode] itemno, t2.[u_cpm_legitemno] legacyitemnumber, t2. [dscription] itemdescription, t2.[u_cpm_confdate] poconfirmdate, t2.[opencreqty] creditmemoamount [dbo].[oitg] t0 , [dbo]. [oitm] t1 inner join [dbo].[por1] t2 on t2.[itemcode] = t1. [itemcode] inner join [dbo].[opor] t3 on t3.[docentry] = t2. [docentry] (t2.[opencreqty] > (0 ) ) , (t2.[u_cpm_confdate] null ) , (t3.[ownercode] = @itembuyer)' exec(@sql) i tried declaring , setting variable below: declare @item...

angular - ng build -prod returns error -

i'am using angular cli build , run angluar2 app. when run: ng server goes fine. when run ng build -prod throws error: error in unexpected directive 'observablecomponent in /users/projectname/dev02/dashboard-app/src/app/book/observable.component.ts' imported module 'bookcomponent in /users/projectname/dev02/dashboard-app/src/app/book/book.component.ts'. please add @ngmodule annotation. error in ./src/main.ts module not found: error: can't resolve './$$_gendir/app/app.module.ngfactory' in '/users/projectname/dev02/dashboard-app/src' @ ./src/main.ts 3:0-74 @ multi ./src/main.ts here code observable.component.ts: import { component, oninit } '@angular/core'; import { observable } 'rxjs'; import { bookservice } '../_service/book.service'; import { book } './book'; @component({ selector: 'app-observable', templateurl: 'observable.component.html', styleurls: ['observable.comp...

angular - Handling null response from server -

i have ngif condition check response data. getting null response when there no data. want show "no data found " if it's null. tried ngif="!addresses" it's not working how handle this? template: <div class="col-md-9 col-sm-9 col-xs-9 *ngif="(!addresses )"> <div class="col-md-9 col-sm-9 col-xs-9"> no data found </div> </div> component: getdata(id){ this.service.getdata(id) .subscribe(addresses => this.addresses = addresses) this.oncehttp = !this.oncehttp; } response : null service: getdata(id){ const eurl='http://localhost/angular/getdata.php?id=' const url= `${eurl}${id}` return this.http.get(url) .map(this.extractdata) .catch(this.handleerror) } i getting null value server. can tell me doing wrong?...

c# - TestStack/White API -

i'm trying automate application using teststack/white api (which based on microsoft's ui automation library). the problem following: at point of automation, have deal "dialog" window, looks separate process, if @ "windows task manager". no matter how try access "dialog window" (class, id, text, controltype, etc.) i'm not able access it. you can find uispy image , code below... using uispy - dialog information using (var disclaimer_app = application.attach(@"pathtoexecutable")) using (var disclaimer_window = disclaimer_app.getwindow(searchcriteria.byclassname("#32770"), initializeoption.nocache)) { var iaccept_button = disclaimer_window.get<button>(searchcriteria.bytext("i accept")); iaccept_button.click(); } # i've tried application.launch, application.attachorlaunch. # looked sure di...

typescript - Casting results from Observable.forkJoin to their respective types in Angular 2 -

let have component in angular 2 needs load 2 different things server before page displayed. i'd of things fire off , call 1 event handler when come telling page isloaded = true. let's have service class looks this. export class myservice { getstronglytypeddata1(): observable<strongdata1[]>{ return this.http.get('http://...').map((response:response) => <strongdata1[]>response.json()); } getstronglytypeddata2(): observable<strongdata2[]>{ return this.http.get('http://...').map((response:response) => <strongdata2[]>response.json()); } } then have component uses service class this. export class mycomponent implements oninit { isloaded = false; stronglytypeddata1: strongdata1[]; stronglytypeddata2: strongdata2[]; constructor(private myservice:myservice){ } ngoninit(){ var requests [ this.myservice.getstronglytypeddata1(), this.myservice.getstronglytypeddata2(...

go - How can this pattern result in a deadlock? -

i have (lru) cache object , encounter deadlock... how possible? type cache struct { mutex *sync.mutex ... } func (this *cache) init() { // guaranteed called once, in main() this.mutex = &sync.mutex{} } func (this *cache) f1() { // pattern accessing mute, @ top of function of 'cache' needed. this.mutex.lock() defer this.mutex.unlock() ... } func (this *cache) f2() { this.mutex.lock() defer this.mutex.unlock() ... } in every function mutex appears, accessed pattern only. , yet... deadlock. how come possible? note: code has been running on production server 10 months , first time that. edit : f1() can call (indirectly) f2() deadlock based on answers. true in code doesn't happen, wonder deadlock may occur if 1 method of cache calls method, , both contain lock() call. see example: func (this *cache) f1() { this.mutex.lock() defer this.mutex.unlock() this.f2() } func (...

plot - Plotting faces individually in r with aplpack -

i'm using function faces() of library aplpack , , working great, when try plot 1 face (row), function graphic default face. mean, when try graphic row row face same. need plot each face individually , keep them in png or jpg file, use them later or in application. code i'm using follow: install.packages("aplpack", dependencies = t) library(aplpack) faces(mtcars) newcar<- mtcars[1,] faces(newcar) thanks, hope can me.

android - java.text.ParseException: Unparseable date for "hh:mm a" -

this question has answer here: java.text.parseexception: unparseable date: “01:19 pm” 6 answers i struggling converting date "hh:mm a" "hh:mm" in android. while don't errors on simple java application, error on android. here code: string time = "02:00 pm"; string formattedtime = ""; simpledateformat displayformat = new simpledateformat("hh:mm"); string parseformats[] = new string[]{"hh:mm", "hhmm", "hh:mm a", "hh a"}; (string parseformat : parseformats) { simpledateformat formatting = new simpledateformat(parseformat); try { date date = formatting.parse(time); formattedtime = displayformat.format(date); system.out.println(formattedtime); } catch (parseexception e) { system.out.println(parseformat); e.printstacktrace(); ...

java - app crashing at FirebaseInstanceId.getInstance().getToken() -

i´m trying token using firebaseinstanceid.getinstance().gettoken() in mainactivity.java when use method token, app stars crashing. here's oncreate() method @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toast.maketext(mainactivity.this, firebaseinstanceid.getinstance().gettoken(), toast.length_short).show(); } build.gradle (project level) buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.1.0' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: delete) { delete rootproject.builddir } build.gradle (app level) apply plugin: 'com.android.application'...

javascript - Running into "Script Error" while trying to track unhandled errors with Google Tag Manager -

i trying set google tag manager team manage errors occur on our app, i'm running trouble in relation well-known feature of browsers obfuscate error information security reasons. if browser has loaded scripts different domains, browsers overwrite error information such generic "script error" error message , no information such line number etc might make error's provenance clear. (see here , here accounts of problem). what means unhandled error occurs in system try pipe google tag manager precious little information. at moment, problem seems unsolvable because understand browser obfuscate errors if 1 script loaded different domain (which makes sense security point of view). since 1 of scripts load different domain google tag manager itself, , not great idea try host code yourself, hard prevent browser obfuscating errors. i'm stumped now. has here found way around problem? think 1 option proprietary tools sentry or tracker, i'm looking diy solution,...

javascript - Turbolinks with request loading -

in vue.js 2.0 project use turbolinks. document.addeventlistener('turbolinks:load', () => { let app = new vue({ el: '#app', mixins: [turbolinksadapter], data() { return { showmodal: false } } }); }); so question how detect post request. before used turbolinks had this: $("form").submit(() => { $("#submit").addclass("is-loading"); return true; }); but that's not working anymore because not refresh entire page anymore. any idea how working again?

python - Display callable attribute from related model in Django admin -

i have next models: class basemodel(models.model): def admin_link(self): url = reverse( 'admin:%s_%s_change' % (self._meta.app_label, self._meta.model_name), args=(self.pk, ) ) return '<a href="{url}">{name}</a>'.format( url=url, id=str(self) ) admin_link.allow_tags = true admin_link.short_description = _('admin link') class account(basemodel): pass class order(basemodel): account = models.foreignkey( 'base.account', on_delete=models.do_nothing, related_name='orders', verbose_name=_('account'), null=false ) and created admin model order model: class orderadminmodel(admin.modeladmin): fieldsets = [ (_('order'), {'fields': [ 'account__admin_link', ]}) ] when go order change page, getiing error: fielderror @ /admin/base/order/1475d5d6-135...

javascript - EXTJS 4.2 Create tooltips for each form fields in a fieldset -

i trying create tooltip each field in form. added listener in form: defaults : { listeners : { boxready: function (field) { field.el.on({ mouseover: function (e) { if(field.tooltip !== undefined) { var tip = field.up('form').formtooltip; tip.update(field.tooltip); tip.showat(e.getxy()); } } , mouseout: function () { field.up('form').formtooltip.hide(); } }); } } } further have actual tooltip: formtooltip: ext.create('ext.tip.tooltip',{ delegate: '.x-form-field-wrap', renderto: ext.getbody() }) ...

endianness - C/C++ code to convert big endian to little endian -

i've seen several different examples of code converts big endian little endian , vice versa, i've come across piece of code wrote seems work, i'm stumped why does. basically, there's char buffer that, @ position, contains 4-byte int stored big-endian. code extract integer , store native little endian. here's brief example: char test[8] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; char *ptr = test; int32_t value = 0; value = ((*ptr) & 0xff) << 24; value |= ((*(ptr + 1)) & 0xff) << 16; value |= ((*(ptr + 2)) & 0xff) << 8; value |= (*(ptr + 3)) & 0xff; printf("value: %d\n", value); value: 66051 the above code takes first 4 bytes, stores little endian, , prints result. can explain step step how works? i'm confused why ((*ptr) & 0xff) << x wouldn't evaluate 0 x >= 8. this code constructing value, 1 byte @ time. first captures lowest byte (*ptr) & 0xff and...

build - Android source framework modify rebuild but become effective in emulator -

i modify /framework/base/services/core/java/com/android/server/am/activitymanagerservice.java logcat output string. and try use different ways rebuild it: make -jn top folder or mmm /framework/base -jn or mmm /framework/base/services -jn and new output file in /out/target/product/generic_x86/system/framework/x86/services.odex and update system.img make snod then try restart emulator, or adb remount adb sync , or kill system_server process but sadly, no matter kinds of methods use, emulator output original string.(so angry) i extract new output system.img new services.odex file, , use oat2dex.jar decompile java code, , indeed see string has changed in it. so why when run emulator, won't become effective...

python 3.x - Add values of a column to each other in pandas -

i have df let's 4 cols a,b,c,d(in real 50+ cols). wish add values of cols each other. ex:- df['a'][0]=df['a'][0]+df['a'][1] , on df['b'][0] ... . col1 col2 col3 1 222 abc b 2 433 dfg c 3 111 tyu d 4 222 iop should become :- **col1** col2 col3 3 222 abc b 5 433 dfg c 7 111 tyu d 4 222 iop i have created loop , after modification assigning result respective cols. for k,g in colindividual.iteritems(): if(k+1<len(colindividual)): print(g+colindividual[colindividual.index[k+1]]) however, being new python world don't know correct , beautiful way code logic. impact performance in future df might increased more 50 columns. please me here? kind help. df['col1'].rolling(2).sum().shift(-1).fillna(df['col1']) output: col1 col2 col3 3.0 222 abc b 5.0 433 dfg c 7.0 111 tyu d 4.0 222 iop ...

Appcelerator Titanium: How do I change SearchView colors on Android? (hintText and cross icon) -

i have searchview dark , hinttext , cross icon black, want set color of these 2 things white. i using custom theme android nothing searchview. how custom theme xml file looks like: <resources> <style name="theme.myapp" parent="@style/theme.appcompat.light.darkactionbar"> <item name="android:spinneritemstyle">@style/myspinneritem</item> <item name="android:actionbarstyle">@style/searchviewtheme</item> </style> <style name="searchviewtheme" parent="theme.appcompat.light.darkactionbar"> <item name="android:textcolorprimary">#ffffff</item> <item name="android:textcolorsecondary">#ffffff</item> <item name="android:textcolorhint">#cccccc</item> </style> <style name="myspinneritem" parent="@android:style/widget.textview.spinneritem"> <item name=...

javascript - Add selected for jQuery to change a second select list based on the first select list option -

i use the code below " use jquery change second select list based on first select list option " change second select list based on first select list option. works well. how can assigning "selected" attribute option on code both selects. javascript: $(document).ready(function () { "use strict"; var selectdata, $states; function updateselects() { var cities = $.map(selectdata[this.value], function (city) { return $("<option />").text(city); }); $("#city_names").empty().append(cities); } $.getjson("updateselect.json", function (data) { var state; selectdata = data; $states = $("#us_states").on("change", updateselects); (state in selectdata) { $("<option />").text(state).appendto($states); } $states.change(); }); }); html: <!doctype html> <html> <head> <title></title> <script src...

android - How to handle my JSON string from Google Sheets API v4 in Java -

i'm new google sheets api , seems can't make progress. i have google spreadsheet , i'm using api url json data: https://sheets.googleapis.com/v4/spreadsheets/spreadsheetid/values/01jul2017!a1:t?key=apikey this end giving me this: { "range": "'01jul2017'!a1:t2828", "majordimension": "rows", "values": [ [ "name", "school", "subschool", "descriptor" ], [ "acid arrow", "conjuration", "creation", "acid" ], [ "air walk", "transmutation", "", "air" ] ] } now problem can't find how handle data. i'm used reading json data keys (e.g. "school":"conjuration") can use following: spell.setschool(jsonobjectspell.getstring("school")); can me out or put me in ...

algorithm - How to calculate sum of this series modulo m fast? -

so came across problem need calculate this: 1 k +(1+p) k +(1+2*p) k +.....+(1+n*p) k % p where p prime , k number strictly less p. p less 500 , n*p range upto 10 9 the solution think iterate first last term , calculate modulo using exponentiation costly looking faster algorithm. is possible faster? for integer m , (1+m*p)^k % p == 1 . thus, computing (1^k + (1+2*p)^k + (1+3*p)^k + ... + (1+n*p)^k )% p is same computing (1 + 1 + 1 ... + 1) % p where there n + 1 terms in parentheses. the answer (n + 1)%p .

php - Want to manage mongoldb user on CodeIgniter using Parse Rest API -

database: mongodb backend framework: codeigniter want manage default user table backend. using parserestapi know mongodb not allow update user without session. there way can manage users created app , delete/create new users. yes can parse rest api for exmaple delete user: use delete http verb , call that: note : need pass session token or master key curl -x delete \ -h "x-parse-application-id: yourappid" \ -h "x-parse-rest-api-key: yourapikey" \ -h "x-parse-session-token: sessiontoken" \ -h "x-parse-master-key: yourmasterkey" \ https://api.example.com/1/users/<objectid> in php can write: $ch = curl_init('https://api.example.com/1/users/<objectid>'); curl_setopt($ch, curlopt_customrequest, "delete"); curl_setopt($ch, curlopt_returntransfer, tru...

excel - Networkdays in VBA for a range of dates -

i'm trying run code in vba checks 2 column full of start dates , end dates , fills in 3rd column corresponding workdays between dates. for = 2 n cells(i, f) = application.networkdays(c, d) next above have tried already. cant show n in case function finds end of imported data (that works). application defined error. if remove application. says networkdays not defined sub or function. for = 2 50 cells(i, "f") = application.networkdays("c", "d") next if run above populates 3rd column #value (50 being example n) for = 2 50 cells(i, "f") = application.networkdays(c, d) next if run above column full of 0. how can work? seems simple yet vba seems programmed make impossible! same issue on excel 2013, 2010 , 2016 you need go row row in formula. cells(i, "f") = application.networkdays(cells(i, "c"), cells(i, "d"))

sql server - Is it possible create a copy of Entity Framework context's Instance to make parallel queries -

stack: angularjs, web api, entity framework, sql server. i need query sql server parallel queries result faster. i using web api , can split query separate web api calls, creates new copy of database context every web api call, but wondering if it's possible inside 1 web api call . ( assume need create separate copy of context every parallel query, entity framework not allow call multiple queries in parallel same instance of context). i using unity di container creating context's instance. well, can set-up container create new instance per call... on unity, suggest create named entry (using perresolvelifetimemanager ) , leave existing 1 rest of application (just segregate approaches)... oh , remember dispose of these new contexts manually!

python - Flattening nan values causes errors -

i trying flatten python3 list has nan in , causing error. the code using flatten list is def flatten(x): if isinstance(x, collections.iterable): return [a in x in flatten(i)] else: return [x] from flatten (an irregular) list of lists . works great lists [1,[123,132], 1] doesn't work on list [nan, ['fiction', 'flash', 'short-story'], nan, nan, nan] nans come empty spaces in pandas dataframe. i error runtimeerror: maximum recursion depth exceeded in cmp

Element not visible - Selenium - Java Webdriver -

i'm trying fill form on website , unable find element listed in code. my code: new webdriverwait(driver, 30).until(expectedconditions.visibilityofelementlocated(by.xpath("/html/body/div[1]/form/div/div/input[1]"))); driver.findelement(by.xpath("/html/body/div[1]/form/div/div/input[1]")).sendkeys("test"); relative website code: <body> <div id="pf_form" class="pf_formcontainer"> <form id="pf_1" class="form formboxshadow" style="height: 1600px; width: 1800px; display: block; left: 0px; top: 30px;"> <div id="pf_4container" class="pagecontainer" style="left:0px;top:0px;z- index:0;position:absolute"> <div id="pf_4" class="page" tabindex="" name="pf_4" style="width: 1800px; height: 1600px; background-color: rgb(255, 255, 255); display: block;"> ...

javascript - How can I localize jquery? -

i used jquery datepicker, works fine. workout used local files jquery, localized german output (mittwoch vs wednesday, mai vs may...) fine. i'd use autocomplete. fine jquery, had include online version of jquery, somehow overides local settings. eversgthing works fine, datepicker english again. can localize script or there ger version? tsunami some: code <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> <title>www.olivereikel.de - rem-o reminder online</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="icon" type="image/ico" href="../mainimages/remo_favicon.ico"> ...

r - Access webservices using RCurl CurlPerform: Getting HTTP 500 error -

i trying use webservice using rcurl package. this webservice ' https://ngcsi.contigohosting.com/entrader_dev/wcfservices/tradingservice.svc ' has lot of methods can accessed authentication , hence passing user name , password in header. h=basictextgatherer() headerfields = c(c(accept="text/xml", accept="multipart/*", 'content-type' = "text/xml; charset=utf-8"), soapaction = "https://ngcsi.contigohosting.com/entrader_dev/wcfservices/tradingservice.svc?wsdl") body = '<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://entrader.contigoenergy.com/contigo.entrader.service">\ <soapenv:header>\ <wsse:security soapenv:mustunderstand="1"\ xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">\ <wsse:usernametoken wsu:id="usernametoken-37"\ xmlns:wsu=...

python - cx_Freeze: cannot input ExcelFormulaParser -

so trying compile code .exe using cx_freeze. here code using compile it... from cx_freeze import setup, executable import sys import numpy.core._methods import numpy.lib.format xlwt import excelformulaparser additional_mods = ['numpy.core._methods', 'numpy.lib.format'] setup(name='reconapp', version='0.1', description='xyz.script', options = {'build_exe': {'includes': additional_mods}}, executables = [executable("reconciliation_application.py")]) the code compiles enter image description here with no errors. when go run .exe program launches , closes error. i notice not inside xlwt module excelformulaparser not know error is. any suggestions? try add xlwt library setup options, i.e. import sys, os cx_freeze import setup, executable build_exe_options = {"packages": ["numpy", "matplotlib", "xlwt"]} setup( name = "app...

Redirect after register wordpress -

im doing website in wordpress. im pretty new. but got issue, how change redirect in registration form, instead profil edit homepage of web. thanks help, mymek if understood correctly trying redirect user after successful registration home page. try adding following code functions.php inside themes folder. this redirect user home_url() upon successful registration. add_filter( 'registration_redirect', 'my_redirect_home' ); function my_redirect_home( $registration_redirect ) { return home_url(); }

go - Difference between InDelta and InEpsilon -

from documentation: https://godoc.org/github.com/stretchr/testify/assert#indelta indelta asserts 2 numerals within delta of each other https://godoc.org/github.com/stretchr/testify/assert#inepsilon inepsilon asserts expected , actual have relative error less epsilon and code seems identical in purpose: func indelta(t testingt, expected, actual interface{}, delta float64, msgandargs ...interface{}) bool { af, aok := tofloat(expected) bf, bok := tofloat(actual) if !aok || !bok { return fail(t, fmt.sprintf("parameters must numerical"), msgandargs...) } if math.isnan(af) { return fail(t, fmt.sprintf("expected must not nan"), msgandargs...) } if math.isnan(bf) { return fail(t, fmt.sprintf("expected %v delta %v, nan", expected, delta), msgandargs...) } dt := af - bf if dt < -delta || dt > delta { return fail(t, fmt.sprintf("max difference between %v , ...

.net - Missing namespace on the same version of framework -

i have 2 same applications based on .net core. first on docker container, have 1.0.4 version of .net core. second on virtual machine ubuntu 16.0.4 have 1.0.4 version of .net core too. the problem when want use claims on docker container based application, claims namespace cannot found, on ubuntu vm, ok. why that? both applications uses same .net core framework why can't find claims namespace on docker container? it may sounds weird but, have 3 solutions, in first solution claims namespace available, on rest doestn't there csproj files. <project sdk="microsoft.net.sdk.web"> <propertygroup> <targetframework>netcoreapp1.1</targetframework> </propertygroup> <itemgroup> <folder include="wwwroot\" /> </itemgroup> <itemgroup> <packagereference include="automapper" version="6.1.1" /> <packagereference include="microsoft.aspnetcore...

php - PDF have too many items +100, Any Solution? -

i hope can me problem have when exporting many elements in pdf file. when export it, file created , generated on single sheet, , there 100 products or more pdf file see nothing. can me this? or has happened before? help. <?= gridview::widget([ 'dataprovider' => $dataprovider, 'filtermodel' => $searchmodel, 'showpagesummary'=>false, 'responsivewrap'=>true, 'condensed'=>true, 'pjax'=>false, //deshabilitado por doble pjax 'striped'=>true, 'hover'=>true, 'panel'=>['type'=>'primary', 'heading'=>'recibos'], 'toolbar'=>[ '{export}', '{toggledata}' ], 'export' =>[ 'target'=>'_self', 'fontawesome' => true, 'label' => 'exportar', 'dropdownoptions' => [ ...

JSON API Document de-serializing and serializing using Spine Swift Library -

i'm using spine a swift library working json:api i want understand how serialize data take full advantage of json api's i'm using serializer achieve as: let serializer = serializer() serializer.registerresource(mymodel.self) what have got ? let document = try! serializer.deserializedata(data) //data response nsdata i'm able json api document included relationships , data as document.included for i'm casting mymodel required data mymodel = document.included[0] as! mymodel as not intended way utilize json :api, suggestions , missing ?

Script paths into Azure Data Factory DataLakeAnalytics u-sql pipeline -

i'm trying publish data factory solution adf datalakeanalyticsu-sql pipeline activity following azure step step doc ( https://docs.microsoft.com/en-us/azure/data-factory/data-factory-usql-activity ). { "type": "datalakeanalyticsu-sql", "typeproperties": { "scriptpath": "\\scripts\\111_risk_index.usql", "scriptlinkedservice": "premiumazuredatalakestorelinkedservice", "degreeofparallelism": 3, "priority": 100, "parameters": { "in": "/df_input/consodata_prelios_consegna_230617.txt", "out": "/df_output/111_analytics.txt" } }, "inputs": [ { "name": "premiumdatalakestorelocation" } ], "outputs": [ { "name": "premiumdatalakestorelocation" } ], "policy"...

excel - Copy sheet INCLUDING comments -

i looking copy sheet 1 workbook workbook is, including comments. far, have not found simple way this. code works copying , pasting contents of sheet workbook without comments: sub copyorrefreshsheet(destwb workbook, sourcews worksheet) dim ws worksheet on error resume next set ws = destwb.worksheets(sourcews.name) on error goto 0 if ws nothing sourcews.copy after:=destwb.worksheets(destwb.worksheets.count) else ws.unprotect password:="abc123" ws.cells.clearcontents ws.range(sourcews.usedrange.address).value = sourcews.usedrange.value2 end if end sub i sure take 1 line of code fix problem, not know how. thank in advance. try change: ws.range(sourcews.usedrange.address).value = sourcews.usedrange.value2 to: sourcews.usedrange.copy ws.range(sourcews.usedrange.address).pastespecial(xlpasteall)

r - How to plot Row.names on x axis with x and y columns on y axis? -

Image
i have 3 columns, row.names , x , , y . how plot row.names on x axis x , y on y axis, compare lines of x vs y ? row.names x y 1 bare_nuclei na na 2 bland_chromatin 5.979253 2.100437 3 clump_thickness 7.195021 2.956332 4 marginal_adhesion 5.547718 1.364629 5 mitoses 2.589212 1.063319 6 normal_nucleoli 5.863071 1.290393 7 single_eipthelial 5.298755 2.120087 8 uniformity_cell_shape 6.560166 1.443231 9 uniformity_cell_size 6.572614 1.325328 let's use ggplot2 : r/ggplot2 needs have data in "long" format (meaning 1 observation per row) create many types of graphs. we use melt make transformation, using row.names id.vars : melt(data,id.vars="row.names") . assign row names x axis, , column generated melt , called value y values. finally, use geom_bar color x , y values, , split them...

linux - ZF3 Nginx Serve index.php As Download File -

i installed debian 8 nginx , php 7 creating endpoint zendframework. when follow website have add these virtual host config in nginx. did see code below: server { listen 80; listen [::]:80; root /var/www/endpoint/html/public; server_name my_ip; location / { index index.php try_files $uri $uri/ @php; } location @php { # pass php requests fastcgi server (php-fpm) on 127.0.0.1:9000 fastcgi_pass 127.0.0.1:9000; fastcgi_param script_filename /var/www/endpoint/html/public/index.php; include fastcgi_params; }} but when visit website downloading index.php instead of executing index.php. i hope can me resolving issue. i think need replace fastcgi_pass value socket path instead of server address , port. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; then restart php7-fpm type command sudo systemctl restart php7-fpm

Obtain count of unique combination of columns in R dataframe without eliminating the duplicate columns from the data -

i have following data : b c d e 1 130 288 6 80 57299 2 288 130 6 57299 80 3 288 130 6 57299 80 4 288 130 6 57299 80 5 288 130 6 57299 80 6 288 130 6 57299 80 7 288 130 6 57299 80 8 288 130 6 57299 80 9 288 130 6 57299 80 10 130 288 6 80 57299 i want obtain count of unique combination of these columns , append frequency column existing dataframe without eliminating duplicate rows. following want b c d e freq 1 130 288 6 80 57299 2 2 288 130 6 57299 80 8 3 288 130 6 57299 80 8 4 288 130 6 57299 80 8 5 288 130 6 57299 80 8 6 288 130 6 57299 80 8 7 288 130 6 57299 80 8 8 288 130 6 57299 80 8 9 288 130 6 57299 80 8 10 130 288 6 80 57299 2 trying df_0 <- count(df, a,b,c,d,e) %>% ungroup() gives me b c d e freq 1 130 288 6 80 57299 2 2 288 130 6 572...

c# - How to send data from view to controller by "id"? -

i put first steps in asp. net , mvc , can not jump on 1 issue. how can transfer data 2 class = "selectpicker" controller? here's code , attempts to: model: public class allocatingcodesinmachinesmodel { public list<string> machinelist { get; set; } public list<string> codescounterlist { get; set; } public int numbersofavaiblecodes { get; set; } } controller: [httpget] public actionresult allocatingcodesinmachines() { int numbersofavaiblecodes = //get data db; var codescounter = //get data db.tolist(); var machinelist = //get data db.tolist(); model.machinelist = machinelist; model.codescounterlist = codescounter; model.numbersofavaiblecodes = numbersofavaiblecodes; return view(model); } [httppost] public actionresult allocatingcodesinmachines(allocatingcodesinmachinesmodel model) { var option1 = model.codescounterlist; var option2 = model.machinelist; return view(); } public actionresult t...

javascript - Webpack 2 - Supress chunk files -

Image
as putting output on load balancer (not using sticky), need place output of these files without chunks (neither hashes). these main 2 files webpack configuration. webpack.common.js const path = require('path'); const webpack = require('webpack'); const htmlwebpackplugin = require('html-webpack-plugin'); const extracttextplugin = require('extract-text-webpack-plugin'); const helpers = require('./helpers'); const static_translation_map = require('../translationmap.json'); module.exports = { entry: { app: ['./src/public/main.ts'], vendor: './src/public/vendor.ts', polyfills: './src/public/polyfills.ts' }, output: { path: helpers.root('dist/public') }, module: { rules: [ { test: /\.ts$/, loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'angular2-router-loader...