Posts

Showing posts from June, 2015

angularjs - Impossible to pass scope in http as data -

i want pass $scope.data data in $http-request . $scope.data not empty! $http({ method: 'put', url: url, data: $scope.data })... but when sending request data empty. try shortcut method from angular docs under shortcut methods section here $http.put(url, data, config) .then( function(response){ // success callback }, function(response){ // failure callback });

python - Efficient way to loop over Tags with Beautiful Soup -

i want extract information multiple xml tags structured alike. loop on every children append dictionary. there way avoid loop each tag (like sn , count in mwe). from bs4 import beautifulsoup bs import pandas pd xml = """ <info> <tag> <sn>9-542</sn> <count>14</count> </tag> <tag> <sn>3-425</sn> <count>16</count> </tag> </info> """ bs_obj = bs(xml, "lxml") info = bs_obj.find_all('tag') d = {} # want avoid these multiple for-loops d['sn'] = [i.sn.text in info] d['count'] = [i.count.text in info] pd.dataframe(d) consider following approach. there 2 loops sake of solution being dynamic (the thing change if want tag needed_tags list): from collections import defaultdict d = defaultdict(list) needed_tags = ['sn', 'count'] in info: tag in

javascript - How tell in vue js that a component is not a custom one (<menuitem>) -

i use vue.js , recognize component ( menuitem ) custom one. <menu type="context" id="viewercontextmenu"> <menuitem id="firstid"></menuitem> <menuitem id="secondid"></menuitem> <menuitem id="thidid"></menuitem> </menu> so, have warning in browser console: "unknown custom element: <menuitem> - did register component correctly? recursive components, make sure provide "name" option." the thing is, menuitem not custom component. see: http://www.w3schools.com/tags/tag_menuitem.asp how can tell vue.js that: either menuitem not custom component or don't check part of code. thanks lot. the thing it's menuitem it's not supported browsers, check compatibility https://developer.mozilla.org/es/docs/web/html/element/menuitem vue.js recognize custom element since browser doesn't recognize it. if it's not nec

php - How to hide "Deprecated: mysql_connect()" warning? -

i have problem.. well.. code using working dream message makes page awful deprecated: mysql_connect(): mysql extension deprecated , i want hide message page. possible , if so.. how? it shows message in page: <?php session_start(); include_once 'dbconnect.php'; if(isset($_session['user'])!="") { header("location: panel.php"); } if(isset($_post['btn-login'])) { $email = mysql_real_escape_string($_post['email']); $upass = mysql_real_escape_string($_post['pass']); $res=mysql_query("select * users email='$email'"); $row=mysql_fetch_array($res); if($row['password']==md5($upass)) { $_session['user'] = $row['user_id']; header("location: panel.php"); } else { ?> <script>alert('nimimerkki/salasana väärin, yritä uudelleen');</script> <?php } } ?> <!doctype html> <html> <head> <met

jcolorchooser - java custom colorChooserPanel -

i want create custom colorchooserpanel jcolorchooser in java swing. public class colorpanel extends abstractcolorchooserpanel { public void buildchooser() { setlayout(new gridlayout(1, 3)); makeaddbutton("red", color.red); makeaddbutton("green", color.green); makeaddbutton("blue", color.blue); } public void updatechooser() { } public string getdisplayname() { return "mychooserpanel"; } public icon getsmalldisplayicon() { return null; } public icon getlargedisplayicon() { return null; } private void makeaddbutton(string name, color color) { jbutton button = new jbutton(name); button.setbackground(color); button.setaction(new abstractaction() { private static final long serialversionuid = 1l; public void actionperformed(actionevent arg0) {

postgresql - How to get current query inside a transaction -

i tried current query pg_stats_activity didn't work expected. outside transaction works: pagetest=# select query pg_stat_activity pid = pg_backend_pid() , 1 not null; query ------------------------------------------------------------------------------------ select query pg_stat_activity pid = pg_backend_pid() , 1 not null; (1 row) pagetest=# select query pg_stat_activity pid = pg_backend_pid() , 2 not null; query ------------------------------------------------------------------------------------ select query pg_stat_activity pid = pg_backend_pid() , 2 not null; (1 row) pagetest=# select query pg_stat_activity pid = pg_backend_pid() , 3 not null; query ------------------------------------------------------------------------------------

angular - Not able to consume external webapi service from angular2 service -

my requirement create angular2 component consume external webapi service , generate bubblechart based on data received. have created dataservice component make http request. code dataservice below import { injectable } 'angular2/core'; import { http_providers, http, headers, response, jsonp_providers, jsonp } 'angular2/http'; import { configuration } './configuration'; import 'rxjs/add/operator/map' import { observable } 'rxjs/observable'; ///service class call rest api @injectable() export class dataservice { private dataserveractionurl: string; private headers: headers; result: object; constructor(private _http: http, private _configuration: configuration) { this.dataserveractionurl = "http://localhost:23647/api/extractorqueue/getextractorqueueslatest/"; this.headers = new headers(); this.headers.append('content-type', 'application/json'); this.headers.append(

BizTalk Flat file parsing Unexpected end of stream while looking for:',' -

i have csv file needs disassembled xml. it's normal looking csv header first row followed repeating records. rows delimited cr+lf , columns delimited commas. contain lots of columns rather pasting here, i've added link sample i'm using testing: input csv file . copy of flat-file xsd can found here: flat file schema within visual studio, can right-click schema, select "validate instance" , works file, producing following xml document: xml document i've created receive pipeline, i've added flat-file disassemble component. documentspecname property has been set strong name flat file schema. my problem is, when sample csv processed pipeline, following error in event log: reason: unexpected end of stream while looking for: ',' current definition being parsed po. stream offset error occured 2018. line number error occured 4. column error occured 0. can see went wrong? i able working removing header node schema. set "headers

java - Is there a convention for Javadoc linking class member variables to UI elements -

in large web application have been working on in java, various user inputs ui form elements stored in class structures. variable names typically created reflect data stored in them, on time , changes may no longer clear data element stores data ui form element. is there convention using javadoc track mappings between class data members , ui elements? i've started out saying instance variable lastname set form element label myworkflow.step1.lastname(referring properties file contains ui element labels). is approach or there more formalised convention on doing this?

Laravel use decoded JSON data as PHP Object -

i want use decoded json data php objects able used follows: return $data->title however im running few errors. able connect remote api url , requested data. $api = 'https://remote.api.url/dataset/list'; $json = file_get_contents($api); $data = json_decode($json, true); dd($data); when die , dump data see following: array:1 [▼ "data" => array:5 [▼ 0 => array:5 [▼ "id" => "qk4gtmb8" "title" => "ssa's palliative care has mhealth deficit " "image" => "http://gstatic.acfee.org/akamaihd/i/52fdb957187" "published_at" => "2016-06-10 08:05:00" "created_at" => array:3 [▼ "date" => "2016-06-07 05:48:34.000000" "timezone_type" => 3 "timezone" => "utc" ] ] 1 => array:5 [▶] 2 => array:5 [▶]

c# - Knockout not populating DateTime? when initial is null -

i'm using knockout bind view model view. multiple properties in view model nullable, such datetime? s. here's example: public class viewmodel { public int id { get; set; } public string name { get; set; } public datetime? creationdate { get; set;} } as can see, property creationdate nullable datetime . i'm binding property custom datepicker binder: ko.bindinghandlers.datepicker = { init: function (element, valueaccessor, allbindingsaccessor, viewmodel) { try { var jsondate = ko.utils.unwrapobservable(valueaccessor()); var value = parsejsondatestring(jsondate); var strdate = value.getmonth() + 1 + "/" + value.getdate() + "/" + value.getfullyear(); element.setattribute('value', strdate); } catch (exc) { } $(element).change(function () { var value = valueaccessor();

angularjs - filters stopped working ..shows blank page -

when click headers, not sort , table disappears angular.module('maniaapp') .controller('eventctrl', function ($scope,$location,$http) { $scope.sorttype = '_source.event_name'; // set default sort type $scope.sortreverse = false; // set default sort order $scope.searchevent = ''; // set default search/filter term var url = "http://api.loc/events/get-events"; $http.get(url).success(function api(data, status, headers, config){ $scope.events = data; }).error(function api(data, status, headers, config){ console.error(data, status, headers, config); }); here html <div class="container"> <!--<div ng-view=""></div>--> <div ng-controller="eventctrl"> <div class="alert alert-info"> <p>sort type: {{ sorttype }}</p> <p>sort reverse: {{ sortreverse }}</p> <p>se

android - Apache Cordova Execution failed for task ':compileDebugJavaWithJavac' -

after updates android studio , apache cordova apache cordova project not building. i new apache cordova, os x , android studio. in android studio when rebuild project following error in gradle console. failure: build failed exception. * went wrong: execution failed task ':compiledebugjavawithjavac'. > compilation failed; see compiler error output details. * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed in terminal when run command cordova --version prints out 4.0.0 , which javac prints out /usr/bin/javac echo $java_home prints nothing (an empty line). update: setting path of java_home , android_home in terminal though same errors shown below , after closing terminal java_home , android_home environment variables lost, set them export java_home=/library/java/javavirtualmachines/jdk1.8.0_51.jdk/contents/home , export android_home=/users/apple/library/android/sdk when try build project cordova cli no

linuxmint - Run scripts on start or end of xsession -

i trying find way run script on sleep before x session ends, because script requires active x session execute properly. storing script in /etc/pm/sleep.d did not work (and returned errors related non-existent x session). ideas put script? update in response comments king@death-star /etc/acpi $ cat 01_revert_kb_on_sleep #!/bin/bash touch ~/desktop/touchfile_my_script_acpi case "$1" in hibernate|suspend) sh -c "/home/king/desktop/scripts/rotate_desktop normal; /home/king/desktop/scripts/misc/my_keyboard on" 2> ~/desktop/revert_kb_error_log.txt ;; #thaw|resume) king@death-star /etc/acpi $ ls total 1mb drwxr-xr-x 3 root root 1mb jun 11 23:36 . drwxr-xr-x 163 root root 1mb jun 11 23:41 .. -rwxr-xr-x 1 root root 1mb jun 11 23:36 01_revert_kb_on_sleep king@death-star /etc/acpi $ ps -ef| grep acpid root 1070 1 0 23:41 ? 00:00:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket king 3499 2574 0 23:52 pts/2 00:00:00 grep --colou

sql server - counting with the right date c# -

i created application send email summary of service status , total number of service. email must send every 12 a.m. in each day example give summary shown in queries. problem, queries counting services include services have done in previous dates! how alter query make count every day i.e. summary of counts each date? appreciated! string connectionstring = @"data source= (localdb)\projects;initial catalog=databasee; integrated security=true;connect timeout=30;encrypt=false;"; sqldatareader reader; string sendmessage = @"select (select count (*) service done = 3) countdone, (select count(*) service undone = 5) countundone"; using (sqlconnection mycon = new sqlconnection(connectionstring)) { //open connection string mycon.open(); sqlcommand cmd = new sqlcommand(sendmessage, mycon); arraylist emailarray =

Angular 2 how to import components from a CDN -

i'm wondering how import components hosted somewhere else, cdn. if got link someone's cdn example: <script src="a-cdn-link.js"></script> component named mycomponent resides, in own component file, use import path? i know can use framework if included via cdn don't understand how make fetch correct path. haven't tried using cdn import angular2 i'm not quite sure how works. would have declare path via systemjs or similar service? could enlightment on matter. in fact, can include js files if use system.register('module-name', ... register explicitly named module. js files generated typescript ones leveraging outfile option of typescript compiler. if js files correspond anonymous system modules or commonjs / amd ones, need configure them within systemjs configuration. the following question give additional hints: how deploy angular 2 + typescript + systemjs app?

ruby on rails - Gravatar image not displaying -

i'm working through michael hartl's ruby on rails tutorial, , i've added code display user's gravatar image. doesn't display. this users helper module usershelper # returns gravatar (http://gravatar.com/) given user. def gravatar_for(user) gravatar_id = digest::md5::hexdigest(user.email.downcase) gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}" image_tag(gravatar_url, alt: user.name, class: "gravatar") end end and show.html.erb <% provide(:title, @user.name) %> <div class="row"> <aside class="col-md-4"> <section class="user_info"> <h1> <%= gravatar_for @user %> <%= @user.name %> </h1> </section> </aside> </div> this code when inspect element <img alt="humber" class="gravatar" src="https://secure.gravatar.com/av

progress db - Openedge 10.2B08 lruskips overhead -

i'm writing business case implementing lruskips parameter. know benefits (and sizeable). don't know performance overhead in terms of memory etc should consider downsides. need balanced viewpoint after all! openedge 10.2b08 various flavours of windows have not been patched linux. the feature eliminates overhead avoiding housekeeping associated maintaining lru chain. using not add memory requirements , reduces cpu consumption. instead of moving block head of lru chain every time referenced every x references. rather evicting block absolutely "least used" block "probably not used" evicted. the potential downside there could, theoretically, perverse case setting high might result in poor eviction decisions. iow "probably" part of things turns out untrue because aren't checking enough (you have converted -b management fifo queue). for instance, setting 1000000 -b of 1000 might not smart. (but bigger issue probably-b 1000) s

swing - Line Graph in Java(not a jfreechart) -

i have 2 sets of array x , y read .txt file , need put in line graph. far code: import java.awt.basicstroke; import java.awt.borderlayout; import java.awt.color; import java.awt.dimension; import java.awt.fontmetrics; import java.awt.graphics; import java.awt.graphics2d; import java.awt.point; import java.awt.renderinghints; import java.awt.stroke; import java.util.arraylist; import java.util.list; import java.util.random; import java.awt.font; import java.io.bufferedreader; import java.io.filenotfoundexception; import java.io.filereader; import java.io.ioexception; import java.util.logging.level; import java.util.logging.logger; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.jpanel; import javax.swing.swingutilities; public class drawgraph extends jpanel { private int width = 800; private int heigth = 400; private int padding = 25; private int labelp

rust - How do I disable an entire example based on features? -

my rust project has examples relevant features . i can ignore main function with: #[cfg(feature = "foo")] fn main() { but other statements depend on feature cause errors when run cargo test . have use number of cfg attribute statements on functions , use statements disable code depends on feature. is there way ignore entire example file based on feature configuration? also, because main hidden without feature, cargo test has error: error: main function not found so isn't solution. make more specific use of #[cfg] directive, providing both main() when foo enabled, , main() when foo not: extern crate blah; // other code still compile without "foo" feature #[cfg(feature = "foo")] fn main() { use blah::onlyexistswithfoo; // code requires "foo" feature } #[cfg(not(feature = "foo"))] fn main() { // empty main function when "foo" disabled }

how to fill custom list in Fragment in android? -

Image
i have fragment want create custom list view in when send parameters adapter it's giving me error. this code in fragment.. @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view v = inflater.inflate(r.layout.fragment_list, container, false); textview tv = (textview) v.findviewbyid(r.id.textview1); customadapter arrayadapter = new customadapter(getactivity(), r.layout.search_catagory_list, prgmimages, prgmnamelist); lv = (listview) v.findviewbyid(r.id.listview); lv.setadapter(arrayadapter); return v; } this mainhome.java package com.example.yasee.bitescene.fragments; import android.content.context; import android.net.uri; import android.os.bundle; import android.app.fragment; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.listview; import android.widget.textview; import com.example.yasee.bitescene.r; import com.examp

java ee - How to correctly setup distributed transactions in JBoss AS 7.1? -

my scenary: java ee application calls method ejb, both hosted in jboss 7.1.1 server. during insert , update operations in crud page, jsf application has save own data using own datasource , additionally save other data in other application calling ejb methods, use other datasource. both datasources configured use jta (jta checkbox marked in jboss datasource parameters); only during update operations , attempt save data throws exception. last parts of exception stack follows: caused by: java.sql.sqlexception: javax.resource.resourceexception: ij000457: unchecked throwable in managedconnectionreconnected() cl=org.jboss.jca.core.connectionmanager.listener.txconnectionlistener@14729cfa[state=normal managed connection=org.jboss.jca.adapters.jdbc.local.localmanagedconnection@6a370d1a connection handles=0 lastuse=1467805740289 trackbytx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.onepool@7a5d9cca pool internal context=semaphorearraylistmanagedconnectionpool@31c571ea

generating a 8 character password including lower case and upper case and numbers using python -

i want generate password including lower case , upper case , numbers using python should guarantee these 3 kinds has been used. far wrote not guarantee 3 kinds of characters being used. want divide 8 character 2 part. first 3 , last 5. make sure in firs part 3 kinds of character being used shuffle them next part dont know how code that. import random = 0 password = '' while < 8: if random.randint(0, 61) < 10: password += chr(random.randint(48, 57)) elif 10<random.randint(0, 61)<36: password += chr(random.randint(65, 90)) else: password += chr(random.randint(97, 122)) += 1 print(password) your question consists of 3 parts: divide 8 character 2 part - first 3 , last 5 - (string slicing) make sure in first part 3 kinds of character being used (validating passwords) shuffle characters (shuffling strings) part1: slicing strings here's tutorial teaching how slice strings using python .. in case, if

macros - What is `%setup -q` in RPM spec? -

if create .spec file vim, editor use skeleton it. quite handy! it bugs me generated %setup macro has -q flag not find anywhere. i didn't find mention on max-rpm guide page on macros , , not expanded rpmspec : rpmspec --eval '%setup' returns %setup , , -p not change anything. not mentioned in other relevant docs also. with further investigation noticed there's plenty of macros don't expanded rpmspec , if find plenty of macros in /usr/lib/rpm (on fedora). so i'm wondering: what -q for? how come cannot see expansions? missing something? the aforementioned max rpm guide claims existence of --test flag rpm -b commands. see on system there's no rpm -b , , job rpmbuild . in rpmbuild there's no --test flag. how see expanded scripts? what -q for? see https://docs.fedoraproject.org/en-us/fedora_draft_documentation/0.1/html-single/rpm_guide/index.html#id366540 it stands for: run quietly minimal output. how come cannot se

python - how to get the datetimes before and after some specific dates in Pandas? -

i have pandas dataframe looks like col1 2015-02-02 2015-04-05 2016-07-02 i add, each date in col 1, x days before , x days after date. that means resulting dataframe contain more rows (specifically, n(1+ 2*x), n orignal number of dates in col1 ) how can in proper pandonic way? output (for x=1 ) col1 2015-01-01 2015-01-02 2015-01-03 2015-04-04 etc thanks! you can way, i'm not sure it's best / fastest way it: in [143]: df out[143]: col1 0 2015-02-02 1 2015-04-05 2 2016-07-02 in [144]: %paste n = 2 (df.col1.apply(lambda x: pd.series(pd.date_range(x - pd.timedelta(days=n), x + pd.timedelta(days=n)) ) ) .stack() .drop_duplicates() .reset_index(level=[0,1], drop=true) .to_frame(name='col1') ) ## -- end pasted text -- out[144]: col1 0 2015-01-31 1 2015-02-01 2 2015-02-02 3 2015-02-03 4 2015-02-04 5 2015-04-03

php - focus on dynamically generated div -

i generating div in controller dynamically .there can n number of div's.i doing ajax , in response generating div.and on keydown want focus on div.i manage keydown effect.i tried focus not working. here div generated dynamically in controller echo '<div class="col-md-12 srch-result" style="cursor:pointer;text-indent:10px;padding:5px 0px 5px 3px" data-uid="'.$rows->user_id.'" data-uname="'.$rows->firstname." ".$rows->lastname.'">'.str_ireplace($keyword,'<b>'.$keyword.'</b>',$rows->firstname." ".$rows->lastname).'</div>' and code in view append result inside div $('#page_to').keyup(function(){ var keyword = $('#page_to').val(); $.ajax({ type:'post', url:'<?php echo base_url("user/userlist"); ?>', data:'key

java - hk2 inhabitant files are being overwritten by uber-jar assembly -

i'm trying build executable jar ( uberjar ) using maven-assembly-plugin . project uses hk2 provider dependency injection. @service s defined in project in of dependencies. hk2 service locator populated inhabitant files @ meta-inf/hk2-locator/default , generated @ compile/build time. i'm using hk2-metadata-generator . my problem default assembly strategy jar-with-dependencies unpacks before building jar. overwrites meta-inf/hk2-locator/default whatever unpacked last... result, service locator cannot find services. i have explored different solutions , looking guidance 1 best. 1. aggregate different inhabitant files during assembly i've created assembly descriptor combines inhabitant files one: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/plugins/maven-assembly-plugin/as

go - How to escape special characters (other than <>&'") in golang templates? -

go templates auto-escape 5 characters <>&' , " (see html.escapestring ) so code like check := func(err error) { if err != nil { log.fatal(err) } } t, err := template.new("foo").parse(`{{define "t"}}special chars: {{.}}{{end}}`) check(err) err = t.executetemplate(os.stdout, "t", "<>&' äåüöß") check(err) returns (as can check here: go playground ) special chars: &lt;&gt;&amp;&#39; äåüöß so how use golang templates render text may contain characters äåüöß? it's not escape these myself, because e.g. "ä" escapes "&auml;" means efter escape manually, golang escapes "&" character part of second time , "&amp;auml;" (but html-file should contain single escaped "&auml;" browser displays "ä"). these characters fine as-is in modern browsers, you'll need specify character encoding in webp

javascript - I want to create konvajs stage using angularjs directive can anyone help me -

i tried below code in controller , it's working fine, not have idea how convert below code directive. want create directive in angularjs , include index.html file. 'use strict'; //prepared stage object var preparedstage; //onload function call first when controller invkoed function onload() { var width = window.innerwidth; var height = window.innerheight; // first need konva core things: stage , layer preparedstage = new konva.stage({ container: 'container', width: width, height: height }); } //stage controller function stagecontroller($scope) { //load function onload(); //get prepared stage object. var stage = preparedstage; //get layer object var layer = new konva.layer(); //add laeyr onto stage stage.add(layer); // going draw special canvas element var canvas =

pandas - Set column name for size() -

i'm trying rename size() column shown here this: x = monthly.copy() x["size"] = x\ .groupby(["sub_acct_id", "clndr_yr_month"]).transform(np.size) but i'm getting is valueerror: wrong number of items passed 15, placement implies 1 why not working dataframe? if simple print copy: x = monthly.copy() print x this how table looks like: sub_acct_id clndr_yr_month 12716d 201601 219 201602 265 12716g 201601 221 201602 262 12716k 201601 181 201602 149 ... what try accomplish set name of column: sub_acct_id clndr_yr_month size 12716d 201601 219 201602 265 12716g 201601 221 201602 262 12716k 201601 181 201602 149 ... you need: x["size"] = x.grou

android - CardView halfway swipe in RecyclerView with ItemTouchHelper -

i want show user menu, under cardview, when he/she swipes it; want cardview stop on half-way during swiping; i've created myitemtocuchhelper class , overrided onchilddraw() method: public class myitemtocuchhelper extends itemtouchhelper.simplecallback { ..... private int mwidth = 128; // value calculated, let's 128 ... @override public void onchilddraw(canvas c, recyclerview recyclerview, recyclerview.viewholder viewholder, float dx, float dy, int actionstate, boolean iscurrentlyactive) { if (dx > mwidth) { dx = mwidth; } super.onchilddraw(c, recyclerview, viewholder, dx, dy, actionstate, iscurrentlyactive); } } @override public float getswipethreshold(recyclerview.viewholder viewholder) { return 0.01f; } what does, swipe animation stops on point (which wanted do); when view swiped, swipe distance set screen width automaticaly; mean when try swipe back, onchilddraw() method, cal

css - jumbotron background image doesn't show -

Image
i want show image in background doesn't show: <div class="jumbotron jumbotron-fluid background: url('/assets/img/mhacks.jpg') no-repeat center center;"> <div class="container text-sm-center p-t-3"> <h1 class="display-2">mona jalal</h1> <p class="lead">under construction</p> </div> </div> what see is: p.s.: in general how can debug such faults? here's jsfiddle: https://jsfiddle.net/e5qsnjdo/ with following code: <div class="jumbotron jumbotron-fluid style="background-image: url('/assets/img/mhacks.jpg') no-repeat center center;"> <div class="container text-sm-center p-t-3"> <h1 class="display-2">mona jalal</h1> <p class="lead">under construction</p> </div> </div> i these errors: move background property style

html - CSS with ASP.NET MVC Razor View. How to set page to device width? Meta tag is not working -

i have total 4 view pages, 1 page used main page , remaining 3 loading main page of partial view. works well. thing unable adjust page device width. though have added tag view port attribute. how can achieve this? to make sure understand correctly, want dynamically resize page based on size of device, right? not believe have ability override user settings when visit page; however, can references browser height , width using $(window).height() , $(window).width() , respectively. also, can set size of new page if user triggers event. window.open("https://google.com", "", "width=700,height=700");

javascript - Crossrider external js file not loading :PDFJS is not defined -

Image
below codes in extension.js. if @ codes, tried different ways load file extension. no matter what, getting vm3051:15 uncaught referenceerror: pdfjs not defined tried putting file in different locations. appapi.ready(function($) { console.log("pdf min js loading"); appapi.resources.includejs('jspdf.js'); // appapi.resources.includejs('js/jspdf.js'); // appapi.resources.includeremotejs('//cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js'); //$.globaleval(appapi.resources.get('//cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js')); console.log("done"); settimeout(function(){ alert(window.location.href); if(window.location.href.indexof(".pdf") > -1) { console.log("its pdf"); alert("pdf"); var doc = new jspdf(); }else{ alert($.trim($('div').find('h1,h2,h3,h4,h5,p,span').text())); } },6000); }); here