Posts

Showing posts from April, 2014

javascript - Why does form action call not keep input file when using back button? -

function validate_form() { //..... validation , other stuff go here ... } <form name="read" id="read" action="test2.php" method="post" enctype="multipart/form-data" onsubmit="return validate_form();"> <input type="file" name="pac" /> <input type="submit" name="submit" value="submit" /> </form> in above example, if hit browser button, input file remains. function validate_form() { //..... validation , other stuff go here ... document.read.action = "test2.php"; } <form name="read" id="read" action="" method="post" enctype="multipart/form-data" onsubmit="return validate_form(this);"> <input type="file" name="pac" /> <input type="submit" name="submit" value="submit" /> </form>...

Image files in Rails app disappear after subsequent pushes to Heroku -

i seeing odd in rails app, using gem / blog engine called line blog posts. in blog posts, can upload images in line, , images stored in table linespicture . everything fine locally, , works when push live heroku. in other words, can write 3 blogs pictures in each blog post, images stored in linespicture table, , load normally. then, if push local branch heroku thereafter, images no longer show in post , error [alt text] comes instead. checking source of post, still linked internal image file: <div class="article_content"> <p><p><img src="/uploads/lines/picture/image/5/aac_divisions.png" alt="alt text"/></p> i assumed meant image no longer in table, if run heroku run rails console , linespicture.last , image still there: linespicture.last linespicture load (1.2ms) select "lines_pictures".* "lines_pictures" order "lines_pictures"."id" desc limit 1 =>...

rust - How do I implement a trait for all types for which Default is implemented plus for raw pointers? -

this question has answer here: why “conflicting implementations of trait” f32 not implement ord? 1 answer how there conflicting implementation of `from` when using associated type? 1 answer conflicting implementations of trait in rust 1 answer why trait implementation box<t> conflict fn()? 1 answer implement trait iterator+clone: conflicting implementations 1 answer i want implement trait foo types default implemented, plus raw pointers: use std::ptr; trait foo<t> { fn value() -...

node.js - Jenkins not generating test report files -

i using pipline build , run unit tests. here pipeline: pipeline { agent stages { stage('build') { steps { sh ''' ./system/fuge/ci/docker-up.sh ./system/fuge/ci/docker-down.sh ''' } } stage('test') { steps { sh ''' ./system/fuge/ci/docker-up-test.sh ''' } } } post { { junit 'build/reports/**/*.xml' } } } and thiss error: [pipeline] // stage [pipeline] stage [pipeline] { (declarative: post actions) [pipeline] junit recording test results [pipeline] } [pipeline] // stage [pipeline] } [pipeline] // node [pipeline] end of pipeline error: no test report files found. configuration error? finished: failure anyone know problem? i use node.js, lab.js testing ...

openerp - What text editors does --dev reload with work -

i'm following odoo's documentation use --dev all parameter when run odoo-bin , in order have python models updated when change source code without me having restart server. according documentation, reload flag (which part of all ) doesn't work text editors. i've been using sublime text, , doesn't seem work because model changes don't take effect until restart server. there good, commonly used text editor work reload parameter, or there list of text editors work it? if running odoo command line via standard ./odoo-bin --dev reload command should not have issues long have libs setup. make sure monitor log errors. requires watchdog library installed via pip install watchdog . take @ (currently line 943) of core files https://github.com/odoo/odoo/blob/10.0/odoo/service/server.py see how dev reload works: def start(preload=none, stop=false): ... watcher = none if 'reload' in config['dev_mode']: if watch...

My tag <form:erros path=" "/> isn't been reconized by eclipse -

i have add necessaries dependenceis , lib add in file jsp. don't know else do. can me? <%@ page language="java" contenttype="text/html; charset=utf-8" pageencoding="utf-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://www.springframework.ortitle hereg/tags/form" prefix="form"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="s" %> <html> head> <meta charset="utf-8"> <title>insert title here</title> </head> <body> <form:form action="/casadocodigo/produtos" method="post" commandname="produto"> <div> <label>titulo</label> <input type="text" name="titulo"> <form:erros path="titulo"/> </div> u added head tag ...

c# - Parsing Multidimensional JSON Array with Name Value Pairs using Newtonsoft Json.NET -

i having difficulty deserializing json string sent javascript asp.net 4.52 c# web api storing database. json string originated multidimensional javascript array battleship game writing. data represents cell positions ship on x/y coordinate grid. in array/string have 5 ships , each ship have varying number of x/y positions (in form of name-value pairs example: row 3; column 3) string below data received c# webapi , represents multiple dimension javascript array data being sent via ajax httppost shipandpositions (my json string): var shipandpositions = "[\"ship5\",[{\"row\":4,\"col\":6},{\"row\":5,\"col\":6},{\"row\":6,\"col\":6}],\"ship4\",[{\"row\":3,\"col\":8},{\"row\":3,\"col\":9},{\"row\":3,\"col\":10},{\"row\":3,\"col\":11}],\"ship3\",[{\"row\":8,\"col\":2},{\"row\":8,\...

javascript - Prevent react-waypoint scroll position from reseting to top after fetching and appending items -

i have component structured below. uses react-waypoint fetch , render additional cards once user reaches end of card collection. componentdidmount() { const { actions, user } = this.props; if (!user) return; actions.getconnections(user.guid, 0, default_fetch_row_count) .then(({ data }) => { this.setstate({ fullyloaded: data.length < default_fetch_row_count, firstloaded: true }); }); } loadmoreconnections(rows = default_fetch_row_count) { const { user, connections, actions } = this.props; const { fullyloaded } = this.state; if (fullyloaded) return; return actions.getconnections(user.guid, connections.length, rows, true) .then(({ data }) => { this.setstate({ fullyloaded: data.length < rows }); }); } showconnections() { const { user, connections, actions } = this.props; return ( connections.map((co...

How to force Android decoder to decode frame to RGB -

do manufacturers force color format on hardware decoders? seems android mediacodec decodes frame yuv on nexus 7 , 9. there way force color format decoded frame rgb instead? why manufacturers have proprietary color formats (as case nexus 7's qualcomm)? thanks the yuv color formats hardware decoders use more efficient. example, frame in yuv420 half size of same frame in rgb.

python - Shading background based on groups above/below a line -

Image
suppose have scatterplot kind of line (least squares regression line, knn regression line, etc.) through it, this. want shade upper region of plot reddish, , lower region of plot blueish, give indication of how line doing classifier points. similar mimic example effect plot elements of statistical learning ( hastie et al ) , (chapter 2, page 13). how can achieve effect matplotlib? i know how set rectangular regions of plot different colors axhspan , axvspan (see this answer ), have been struggling set different plot colors based on regions above , below line . code replicate current mock plot import numpy np import matplotlib.pyplot plt plt.style.use('seaborn-notebook') np.random.seed(17) grp1_x = np.random.normal(1, 1, 100) grp1_y = np.random.normal(3, 1, 100) grp2_x = np.random.normal(1.2, 1, 100) grp2_y = np.random.normal(1.2, 1, 100) ######################################## ## least squares plot plt.scatter(grp1_x, grp1_y, lw = 1...

java - The T-SOAP request format requires that a unique identifier be present as identified by the WS-Addressing [message id] property -

entirely new xml, t-soap request , xslt transformations,any 1 please let me know how solve below error. the error message is: the t-soap request format requires unique identifier present identified ws-addressing [message id] property. means ws-addressing messageid soap header element must present , value must non-empty. value detected in current request message is: null the t-soap request format requires header section identifies message being sent taleo connect client. can expressed using ws-addressing [reply endpoint] property. the t-soap format using ws-addressing [reply endpoint] property identify message being send taleo connect client requires presence of ws-addressing replyto soap header element , value equal ' http://www.taleo.com/ws/integration/toolkit/2005/07/addressing/queue '. value detected in current request message is: [...] anyone please share knowledge on xml,xslt , t-soap request

.net - How to clear IE cache for specific site using C# not using JS or jQuery -

i want clear ie cache site using c# . having windows application uses webbrowser control login specific site. but, not storing cache using program , ie default. trying understand https://msdn.microsoft.com/en-us/library/windows/desktop/aa384026(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa384049(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa383983(v=vs.85).aspx but couldn't find solution out of it. you can use class clear ie cache public static class webbrowserhelper { #region winapi [dllimport("wininet", entrypoint = "deleteurlcacheentrya", setlasterror = true)] public static extern bool deleteurlcacheentry(intptr lpszurlname); [dllimport("wininet", setlasterror = true)] public static extern bool deleteurlcachegroup(long groupid, int dwflags, intptr lpreserved); [dllimport("wininet", entrypoint = "findfirsturlcacheentrya...

node.js - Could anyone explain the difference between the two users in mongodb3.4.5 -

//the first user { "_id" : "admin.guguji55", "user" : "guguji55", "db" : "admin", "roles" : [ { "role" : "readwrite", "db" : "test" } ] } //the second user { "_id" : "test.guguji66", "user" : "guguji66", "db" : "test", "roles" : [ { "role" : "readwrite", "db" : "test" } ] } i create 2 users,the 'guguji55' not connect test database,but 'guguji66' it.i don't know why.my nodejs connection code below: mongoclient.connect('mongodb://guguji66:du****kuan****@localhost:27017/test', function(err, db) {}); //the first user { "_id" : "admin.guguji55", "user" : "g...

Error:(42, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.1 -

Image
i tried changing sdk version , everything, no luck seems error wants stay. when app: compact 25.0.1 says change newer version , tried changing occurs new error. and newer version of app: compact v7 26.0.1 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compilesdkversion 26 buildtoolsversion "25.0.2" defaultconfig { applicationid "com.example.jithendra.kotlinexample" minsdkversion 15 targetsdkversion 26 versioncode 1 versionname "1.0" testinstrumentationrunner "android.support.test.runner.androidjunitrunner" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } sourcesets { main.java.srcdirs += 'src/main/kotlin' } } buildscript { ext.kotlin_version = '1.1.4' repositories { jcenter() mavencentral() }...

change img src in each 5 sec with three photo with Jquery -

images sf.jpg sf2.jpg sf3.jpg change above img src in each 5 sec in first 5 sec image should sf.jpg in second 5 sec image should sf2.jpg in third 5 sec image should sf3.jpg and should work repeatdly forever check below code snippet. i have altered alt attribute after 2 secs. in code replace alt src. $(window).on('load', function() { let src = ['image_1.jpg', 'image_2.jpg', 'image_3.jpg', 'image_4.jpg']; let = 1; setinterval(function() { $('img').prop('alt', src[i]); if (i !== src.length) i++; else = 0; }, 2000); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <img src='image_1.jpg' alt='image_1.jpg' width='200' height='200' /> hope, works you. :) :)

python - Django Form and Database -

i working width django now. don't make sense that. i want id , password form , check if password form correct compare password of database. following codes. please me. models.py from django.db import models class doctor(models.model): doctor_id = models.charfield(max_length=16, primary_key=true) clinic_id = models.foreignkey(clinic) doctor_email = models.charfield(max_length=64) doctor_password = models.charfield(max_length=32) doctor_name = models.charfield(max_length=32) create_date = models.datetimefield(auto_now_add=true) modify_date = models.datetimefield(auto_now=true) forms.py from django import forms .models import doctor class loginform(forms.form): class meta: model = doctor fields = ('doctor_id', 'doctor_password',) views.py from django.shortcuts import get_object_or_404, render django.http import httpresponse django.shortcuts import render django.contrib.auth.decorators import login_required .fo...

python - Scrape Pinboard recursively with Scrapy - “Spider must return Request” error -

in effort hone python , spark graphx skills, have been trying build graph of pinboard users , bookmarks. in order so, scrape pinboard bookmarks recursively in following fashion: start user , scrape bookmarks for each bookmark, identified url_slug, find users have saved same bookmark. for each user step 2, repeat process (go 1, ...) despite having tried suggestions several threads here (including using rules), when try implement logic, following error: error: spider must return request, baseitem, dict or none, got 'generator' which suspect has mix of yield / return in code. here quick description of code: my main parse method finds bookmark items 1 user (also following previous pages bookmarks of same user) , yields the  parse_bookmark  method scrape these bookmarks. class pinspider(scrapy.spider): name = 'pinboard' # before = datetime after 1970-01-01 in seconds, used separate bookmark pages of user def __init__(self, user=...

textfield - in java Calculator what should be coding of decimal point button ,i want to check if there is already dot in string so else add a dot in string -

if(!".".contains(jtextfield.gettext())) { jtextfield.settext(jtextfield.gettext()+ "."); jtextfield.setbackground(color.magenta); } else { jtextfield.settext(jtextfield3.gettext()); jtextfield.setbackground(color.green); }

java - ViewPager for Images in SpanableString -

i have images in spannablestrig , loaded them textview through html.imagegetter.i want show these images viewpager when click on image. what have tried: have created arraylist , added imageurls urlspan.class , imagespan.class, added arraylist pageradapter. problem facing when click on image1 viewpager works fine , opens image1 in viewpager when click on image2 viewpager opens image1 , have swipe image2.. please me.

python - Access xml element attribute with <!..> -

this question has answer here: get cdata using xml.etree.elementtree 1 answer i want write small program read data xml file , write csv. work element tree. the xml files have origin in application mobile phones , this: <waypoint><name><![cdata[poi 2017-07-03 09:37:11nass]]></name> <coord lat="47.220430" lon="8.951071"/></waypoint> i not have problem access coord-root , content (longitude , latitude). how can access information of name: [cdata[poi 2017-07-03 09:37:11nass]] ? my code looks far: for poi in pois: tree = etree.parse(rootwayp + poi) root = tree.getroot() child in root: childchild in child: print(childchild.tag, ':', childchild.attrib) i think need implement reading method name-content, bracket not include information there. have tried access informa...

c++ - The values are getting stored in "arr" correctly but garbage values are getting stored in "str". I do not understand why -

Image
the values getting stored in "arr" correctly garbage values getting stored in "str". not understand why. checked many times , seems right me. #include <iostream> using namespace std; int main() { int test,n,arr[50],str[20][20],i,j,k; t = 0; j = 0; cin>>test; //test cases while(test>0){ cin>>n; //number of elements in test case for(i=0;i<n;i++) cin>>arr[i]; //array of elements for(i=0;i<n;i++){ cout<<"arr = "<<arr[i]<<"\n"; str[i][j] = arr[i]; // storing arr in str } cout<<"\n"; str[i+1][j] = 0; j++; test--; } for(i=0;i<j;i++){ for(k=0;str[i][k]!=0;k++) cout<<<<str[i][k]; // printing str cout<<"\n"; } return 0; } there lot of mistakes main 1 indexing of 2d array a 2 dime...

BizTalk Server to consume SOAP web methods without orchestrations -

using biztalk server 2013, want read (pull) data web service , push onto sharepoint back-end system. web service exposes web methods in soap. biztalk has default soap adapter. however, seems read soap messages, biztalk needs know xml schema expect. hence orchestration in biztalk required map inbound xml schemas web service methods expected outcome. orchestrations seem overkill scenario. there way pull soap web services using message based routing (i.e. biztalk admin console) only? i think basic http adapter can in case. though soap adapter available, microsoft recommends using wcf basichttpadapter instead. refer here: microsoft blog

c++ - Connecting overloaded signals and slots in Qt 5 -

i'm having trouble getting grips new signal/slot syntax (using pointer member function) in qt 5, described in new signal slot syntax . tried changing this: qobject::connect(spinbox, signal(valuechanged(int)), slider, slot(setvalue(int)); to this: qobject::connect(spinbox, &qspinbox::valuechanged, slider, &qslider::setvalue); but error when try compile it: error: no matching function call qobject::connect(qspinbox*&, <unresolved overloaded function type>, qslider*&, void (qabstractslider::*)(int)) i've tried clang , gcc on linux, both -std=c++11 . what doing wrong, , how can fix it? the problem here there two signals name: qspinbox::valuechanged(int) , qspinbox::valuechanged(qstring) . need tell qt 1 want pick, casting right type: connect(spinbox, static_cast<void (qspinbox::*)(int)>(&qspinbox::valuechanged), slider, &qslider::setvalue); i know, it's ugly ...

Which download should you choose when you want install Service Pack 1 to get Visual Studio? -

i wanted visual studio windows 7. turns out have have service pack 1. have 64-bit operating system. cannot update , service pack 1. downloads perfectly. installation process stops @ same point. decided service pack 1 website. shows lot of downloads. big. wanted know download should choose.

Matlab periodogram to Python scipy.periodogram -

i want convert eeg 14 sensors data time domain frequency domain so, have mat lab code convert time domain frequency domain when use python scipy.periodogram function output data totally different so, please provide me appropriate code python same output eeg 14 sensors data in csv [ https://pastebin.com/1alsekhp ] mat-lab code ` x=x(:,1:640); #x(14 sensors,640 samples each sensor) fs=128; n=640; k=1:1:14 original_data=x; window=hamming(n); psd_data(k,:) = 2*periodogram(original_data(k,:),window,0:fs/2,fs); end ` matlab output data link [ https://pastebin.com/shqdxehs ]

r - Applying sum / mean / etc. to a list -

in r why can apply mean / sum / etc. 1-d vector not 1-d list? how can perform such operations on list? examples: > myvector <- c(1,2,3,4) > myvector [1] 1 2 3 4 > sum(myvector) [1] 10 > mylist <- list(1,2,3,4) > mylist [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 [[4]] [1] 4 > sum(mylist) error in sum(mylist) : invalid 'type' (list) of argument i think best option use unlist reduce list vector, , call function. created following wrapper function this: call_function_on_list = function(func, l) { func(unlist(l)) } l = c(1,2,3,4) call_function_on_list(mean, l) # [1] 2.5 call_function_on_list(sd, l) # [1] 1.290994 call_function_on_list(sum, l) # [1] 10

javascript - How to append whole set of model to formdata and obtain it in MVC -

how pass whole set model object through formdata , convert model type in controller? below i've tried! javascript part: model = { eventfromdate: fromdate, eventtodate: todate, imageurl: imgurl, hotnewsdesc: $("#txthtdescription").val().trim(), }; formdata.append("model",model); then pass through ajax, string, , if check value of request.form["model"] result same, received string , value "[object object]" is there way pass model through formdata , receive in controller? if view based on model , have generated controls inside <form> tags, can serialize model formdata using var formdata = new formdata($('form').get(0)); this include files generated <input type="file" name="myimage" .../> and post using $.ajax({ url: '@url.action("youractionname", "yourcontrollername")', type: '...

python - How to display a 2D list in this form? -

how can convert 2d list this? lista=[[1, 2, 3],[3, 4, 5],[8, 5, 9]] listb=[[1 2 3] [3 4 5] [8 5 9]] as pointed out, have same representation of 1 list in python, list list conversion doesn't make sense. however, if want list string conversion - ways output list nice string, have option of pprint , or pretty-printing. module standard library seems pretty close you're looking for: import pprint l = [[1, 2, 3],[3, 4, 5],[8, 5, 9]] pprint.pprint(l, width=12) gives output [[1, 2, 3], [3, 4, 5], [8, 5, 9]] now i've had artificially reduce maximum width bit lists short pprint , default, not consider them worth shortening. also, if want string representation in program, can use pprint.pformat in pretty same way, except returns string: import pprint l = [[1, 2, 3],[3, 4, 5],[8, 5, 9]] s = pprint.pformat(l, width=12)

angular - Why all Directives and Pipes must be in module's declarations? -

any directives , pipes must in module's declarations. why can't added component level , instead have @ module level? why angular team has put restriction? the angular team talked reasons deprecating component-level directives here when introduced modules. deprecation the ability import directives , pipes components deprecated. means after deprecation following properties removed: @component.directives , @component.pipes . why keeping @component.directives / pipes causes following issues: two scopes it creates 2 scopes: module scope , component scoped. module scoped similar how es6 modules work. result, easy explain user. have have dev ergonomics. component scope unique , harder explain. breaks es6 mental model having component scope breaks es6 mental model. in es6 use token have import module. tokens don't appear out of nowhere. easy explain use material component need import right module. becau...

c++ - Cannot cast from vector<T> to T -

i have function takes arguments of type t such: constexpr inline const bool isreflex(const t x1, const t y1, const t x2, const t y2, const t x, const t y) calling function items form vector yiels error c2664: cannot convert argument 1 'vector<t, std::allocator<_ty>>' 'const t' : vector<t>* v = new vector<t>; // not creating vector myself, demonstration. // real vector passed const vector<t>* function executing following: if (isreflex(v[i-2], v[i-1], v[i], v[i+1], v[i+2], v[i+3])) // ^^^^^^ error this makes little sense me, not passing vector rather contents. causing behaviour? edit ouch. this because v not vector, pointer vector. therefore, need dereference operator: if (isreflex((*v)[i-2], (*v)[i-1], (*v)[i], (*v)[i+1], (*v)[i+2], (*v)[i+3])) the reason error message may not entirely clear [] operator applies pointers well, , behaves dereference operator offset. in other words, c++ compiler treats ...

Define base10 RGB alpha channel for Racket 2htdp/world -

i have image pulled tileset using in racket 2htdp/world program. i can grab tile want, background not enumerated name, blue. want "hollow" pixels same color background without editing tileset image editor. is there way make color in image transparent specifying rgb value? i want "hollow" pixels same color background then need use mask transparent can both transparent , in background color.

android - How to start something when voice call starts? -

Image
i have built full voice recorder application. i start recording when voice call starts on phone, how can detect calls state? tried code , didn't work me. i need know hot start recording when voice call starts (incoming , outgoing). here example of need. declare receiver in androidmanifest <receiver android:name=".incomingcall"> <intent-filter> <action android:name="android.intent.action.phone_state" /> </intent-filter> </receiver> give read phone state permission in androidmanifest <uses-permission android:name="android.permission.read_phone_state"/> create class incomingcall extends broadcastreceiver class import android.content.broadcastreceiver; import android.content.context; import android.content.intent; import android.telephony.phonestatelistener; import android.telephony.telephonymanager; import android.util.log; import android.widget...

php - Why echo's output needs to be separately put in quotes for placeholder's string in input field? -

i generating string placeholder dynamically via php echo function & if don't put quotes around php tags output takes first word of string. why so? placeholder=<?php echo "hello world"?> outputs hello in input field placeholder="<?php echo "hello world"?>" (note quotes around php tags) outputs hello world in input field. same happens value attribute of input field. this due how placeholder attribute constructed. you should conform standard of putting value in between quotation marks (see this example proof). it requires values put in between quotations if wish add spaces value. so imagine when this: <input type="text" placeholder=<?php echo "hello world"?> > you returning in html file: <input type="text" placeholder=hello world > it reads 'hello' it's value , html sees 'world' attribute. why need put value in between quotes signify e...

rendering - How to get correct SourceOver alpha compositing in SDL with OpenGL -

Image
i using fbo (or "render texture") has alpha channel (32bpp argb) , clear color not opaque, example (r=1, g=0, b=0, a=0) (i.e. transparent). rendering translucent object, example rectangle color (r=1, g=1, b=1, a=0.5), on top of that. (all values normalized 0 1) according common sense, imaging software such gimp , photoshop, several articles on porter-duff compositing, expect texture fully transparent outside of rectangle white (1.0, 1.0, 1.0) 50 % opacity inside rectangle. like (you won't see on website): instead, background color rgb values, (1.0, 0.0, 0.0) weighted overall (1 - sourcealpha) instead of (destalpha * (1 - sourcealpha)). actual result this: i have verified behavior using opengl directly, using sdl's wrapper api, , using sfml's wrapper api. sdl , sfml have saved results image (with alpha channel) instead of merely rendering screen sure it's not problem final rendering step. what need produce expected sourceover result, eith...

hdfs - Spark Streaming program to process a file with more than 10 lines -

i need solve problem program should process files have lines greater 10. below code: val sparkconf = new sparkconf().setappname("spooldirspark") val ssc = new streamingcontext(sparkconf, seconds(2)) val lines = ssc .filestream[longwritable, text, textinputformat]("hdfs:///loclahost:8020/avin") .map{ case (x, y) => (x.tostring, y.tostring) } val data = lines.count() ssc.start() ssc.awaittermination()

ssl - How to send a sslsocket to a running process -

this question has answer here: pass connected ssl socket process 1 answer the first process receive , send data (to complete authentication) after accept sslsocket, send sslsocket process. i know multiprocessing.reduction.send_handle can send socket, didn't work sslsocket. please help. this not possible. ssl sockets in python implemented using openssl. each ssl socket in python there user space state managed openssl. transferring ssl socket process need internal ssl state transferred too. but, python has no direct access state because uses openssl library libraries api , can not transfer it.

javascript - angular Scope variable is not binding in to iframe -

Image
i creating hidden iframe printing data, code not working properly, want show data in iframe using angular scope variable bellow code. // print attached contract documnet function print(imagedata) { var hiddenframe = $('<iframe style="display: none"></iframe>').appendto('body')[0]; hiddenframe.contentwindow.printandremove = function () { hiddenframe.contentwindow.print(); $(hiddenframe).remove(); }; $scope.testobj = 'testing'; var element = $compile('<div> {{testobj}} </div>')($scope); // var element = $compile($('<div> <img ng-src="{{ vm.contractdetails.contractattachment.imagesrc }}" class="img-thumbnail img-responsive img-height " style="height:500px;cursor:pointer;" /> </div>'))(printscope); var htmldocument = "<!doctype html>" + "...