Posts

Showing posts from March, 2014

hadoop - Oozie Java Action System.out -

i have oozie java action. after completition of job, can't find system.out.println output in oozie log. i'm looking @ web console "job log" screen. see log output there related oozie job not system.out.println output. how can configure oozie can see outputs of `system.out.println? you should override log4j.properties inside hadoop jar file: -d log4j.configuration=path_to_file (with spacebar) for instance: oozie job -oozie "$oozieserverurl" -config $ooziepath/coordinator.properties -d log4j.configuration=path_to_file -run -verbose

linux - Make cannot find present cross compiler -

i'm using make file compile kernel arm/xilinx platform. i'm setting env variable cross_compile make file use. i'm trying use cross compiler, present on system, called arm-xilinx-linux-gnueabi-gcc setting env var in following ways; export cross_compile=/opt/xilinx/sdk/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi- export cross_compile=arm-xilinx-linux-gnueabi- the make file should append gcc . the error given both is make: /opt/xilinx/sdk/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: command not found scripts/kconfig/conf --silentoldconfig kconfig make: /opt/xilinx/sdk/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: command not found chk include/config/kernel.release chk include/generated/uapi/linux/version.h chk include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' date. cc kernel/bounds.s /bin/sh: 1: /opt/xilinx/sdk/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: not found make[1]: *** [k

jquery - Java - Http Framework to Post XML Files -

i want learn java / java ee , therefore decide rewrite javascript application build in jquery, can send xml files against rest api. simplified looks like: var core = { senddata : function() { jquery.ajax({ url : "/test", method : "post", contenttype : "application/xml; charset=utf-8", data : json.strinigfy(xmlfeed), success : function(data) { // todo }, error : function() { // todo } }); } } i want build java application, can post xml files against rest api. rest api nescessary, xml file post request payload. tried jsoup, can not send xml files in way. there java framework, makes easier me build first java application? i found an article might you. suggests apache httpclient or jersey client. httpclient better focused on specific need because jersey server-side rest implementations, ,

exchangewebservices - Microsoft Exchange Java API get messages based on date and number in folder -

i have program has method. public list<message> getmessages(int start, int end, date earliestdate) throws messagingexception { using java ews api how messages folder using these variables. instance if wanted 50th-70th message in inbox or want messages 10-20 starting on specific date. date can null doesn't matter much. i doubt efficient method possible oh well. public list<message> getmessages(int start, int end, date earliestdate) { if (start < 1 || end < 1 || end < start) { throw new messagingexception(string.format(locale.us, "invalid message set %d %d", start, end)); } int length = end - start; itemview view = new itemview(length); finditemsresults<item> findresults = null; try { if (earliestdate == null) { findresults = mservice.finditems(mfolder.getid(), view); } else{ search

How long are new instances of Java stored? -

this question has answer here: life cycle of local java objects created during method call 4 answers garbage collection on local variable 3 answers so lately i've had question: how long object stored when create new instance of it? i'm asking how being stored. example: public void inituser(player player) { user u = new user(ally, player.getuuid()); u.sethealth(20); } (user being object) so how long u stored? java clean after i'm done it? (after #sethealth called)? thanks. there special part of java runtime called garbage collector takes care of destroying objects when no longer in use. application can allocate memory object via explicit , implicit ways under object creation, can not explicitly free memory . to signal jvm

c++ - Do i need to delete a object that was constructed with new and placement -

class foo{ //some member public: int bar; } int main(){ char* buffer = new char[100]; foo* f = new(buffer)foo(); //do have delete f; //or delete[] buffer; //enough } sure have delete if delete of foo has major effect on system lets simple storage object place compleatly inside of buffer , has no deconstructor delete other things. do have delete object places new inside of buffer or enough delete buffer? if have call delete on every object inside of buffer, why have todo this? i read: what-uses-are-there-for-placement-new , says you should not deallocate every object using memory buffer. instead should delete[] original buffer. the correct way destroy object explicit destructor call: f-> ~foo(); usually placement new used memory on stack. in case, it's heap allocation, need free buffer using form of delete matches new . delete[] buffer;

ios - Swift: How to remove border from segmented control -

how remove outside border of segmented control in xcode? i've set divider image wanted follow mock of app need have segmented control without outer border. you can remove both borders , dividers using below function. create uisegmentedcontrol extension: for swift 2.2: extension uisegmentedcontrol { func removeborders() { setbackgroundimage(imagewithcolor(backgroundcolor!), forstate: .normal, barmetrics: .default) setbackgroundimage(imagewithcolor(tintcolor!), forstate: .selected, barmetrics: .default) setdividerimage(imagewithcolor(uicolor.clearcolor()), forleftsegmentstate: .normal, rightsegmentstate: .normal, barmetrics: .default) } // create 1x1 image color private func imagewithcolor(color: uicolor) -> uiimage { let rect = cgrectmake(0.0, 0.0, 1.0, 1.0) uigraphicsbeginimagecontext(rect.size) let context = uigraphicsgetcurrentcontext() cgcontextsetfillcolorwithcolor(context, color.c

sql server - How can I return rows from an SQL query where one unique ID satisfies conditions in different rows? -

i have table users has foreign key in other table, usershavesocialmediafans . usershavesocialmediafans has columns: socialmediaid, userid, fancount i need find users have fan count greater (or less than) amount for each social media. admins need able filter out users might have @ least 6 facebook fans , 7 twitter followers. it super easy when had information in user table: userid, ..., facebookfans, twitterfollowers, ... ---0--, ---, -----10-----, ------1000------, ... then, select userid users facebookfans > # , twitterfollowers > #; however, data each user split multiple rows , don't know how handle logic. feel there must simple answer, can't think of right now. you need join usershavesocialmediafans table twice it. example, if wanted more 1,000 facebook fans, , more 10 twitter fans, following: select distinct u.userid users u join usershavesocialmediafans f on f.userid = u.userid

r - Subsetting every x amount of columns as separate sites -

i need function recognises every x amount of columns separate site. in df1 below there 8 columns, 4 sites each consisting of 2 variables. previously, have used procedure answered here selecting column sequences , creating variables . set.seed(24) df1 <- as.data.frame(matrix(sample(0:20, 8*10, replace=true), ncol=8)) i need calculate column sum total each variable obtained. colsums <- as.data.frame(t(colsums(df1))) i subsequently split dataframe using technique... lst1 <- setnames(lapply(split(1:ncol(colsums), as.numeric(gl(ncol(colsums), 2, ncol(colsums)))), function(i) colsums[,i]), paste0('site', 1:4)) list2env(lst1, envir=.globalenv) and organise 1 dataframe... combined <- as.matrix(mapply(c,site1,site2,site3,site4)) rownames(combined) <- c("site.1","site.2","site.3","site.4") whilst technique has been great on smaller dataframes, there substantial

imagefilter - RenderScript Sobel lmplementation, different in- and output types -

i want implement sobel filter in renderscript uchar4 input allocation , float[] output allocation. not quite sure whether possible use different types input , output allocations in renderscript. want develop solution myself, grateful advice on best renderscript structure takle problem. somewhere read, possible use float attribute ((kernel)) root(uchar4 *v_in, uint32_t x, uint32_t y) { } would recommend such approach or can done without using kernel, i.e. function? in advance. my rs code sobel (x direction) looks follows: #pragma version(1) #pragma rs java_package_name(com.example.xxx) #pragma rs_fp_relaxed rs_allocation gin; int32_t width; int32_t height; float __attribute__((kernel)) sobelx(uchar4 *v_in, uint32_t x, uint32_t y) { float out=0; if (x>0 && y>0 && x<(width-1) && y<(height-1){ uchar4 c11=rsgetelementat_uchar4(gin, x-1, y-1); uchar4 c21=rsgetelementat_uchar4(gin, x, y-1); uchar4 c31=rsgetelementat_uchar4(gin, x+1, y-1);

android - Espresso won't find View when included with androidTestCompile -

this darn strange. have activity viewpager hosts couple of of fragment s, first 1 has radiobutton id android:id="@+id/backjudgeradionbutton" . i have espresso test looks this: import android.test.activityinstrumentationtestcase2; import model.gamesetup; import ui.setupactivity; import weigl.fm.refwatch.r; import static android.support.test.espresso.espresso.onview; import static android.support.test.espresso.action.viewactions.click; import static android.support.test.espresso.matcher.viewmatchers.withtext; /** * created asco on 8/7/15. */ public class setupactivityespressotest extends activityinstrumentationtestcase2<setupactivity> { public setupactivityespressotest() { super(setupactivity.class); } @override protected void setup() throws exception { super.setup(); getactivity(); } public void testuserroleisset() { onview(withid(r.id.backjudgeradionbutton)).perform(click()); assert

linux - TCP/IP: set socket option for keep-alive after connection has been established -

is possible set socket's so_keepalive option (tcp keep alive interval , tcp keep alive value) after hypothetical application level handshake? or have set before call accept ? i'm concerned interoperability between linux, windows , ecos lwip stack, information both platforms appreciated. as ejp said, can set time. man page says: setsockopt() manipulate options socket referred file descriptor sockfd . you can set or unset so_keepalive this int ioption = 1; // turn on keep-alive, 0 = disables, 1 = enables if (setsockopt(sockethandle, sol_socket, so_keepalive, (const char *) &ioption, sizeof(int)) == socket_error) { cerr << "set keepalive: keepalive option failed" << endl; } you can read tutorial more details.

android - How to inflate custom ViewPager -

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="center_vertical" >`` <com.example.sumit.myapplication.custom_viewpager android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/pager_threee" xmlns:android="http://schemas.android.com/apk/res/android" /> </linearlayout> the related java code is: import android.support.v4.view.viewpager; viewpager vp; private static double latitude = 0.0; private static double longitude = 0.0; private static string country = ""; private static string locality = ""; private static string areacode = ""; private static string my_id = "0"; list<fragment> fragments = new arraylist<fragment>(); fragment frag_public_list;

Large number of objects in python (autobahn websocket) -

i using autobahn websockets project , got know creates instance particular websocket connection. when have large number of connections in millions, how can manage these many objects? should serialize , deserialize objects on runtime?

Unable to start logstash using mongoDB config? -

i using logstash-1.5.2 mongodb 3.0.4. , trying start logstash below configuration not working. input{ stdin{ } } output { mongodb { database => "logdb" collection => "plain" uri => "mongodb://localhost:27017" } } i facing below errror : ./logstash -f conf/mongo.conf the error reported is: uninitialized constant mongo::uriparser please help. the problem caused bug in latest version of logstash-output-mongodb. please see issue reported on github . can fixed changing few lines inside mongodb plugin. (please careful, hacky solution neither supports authentication nor remote servers.) change lines of mongo.rb file mentioned here . (path should /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-mongodb-0.1.4/lib/logstash/outputs/mongodb.rb can find exact path in error message.) replace: uriparsed=mongo::uriparser.new(@uri) conn = uriparsed.connection({}) if uriparsed

android - New Line in my sqlite column -

hi, guys! first of all, i'm newbie. have column in database called definition . in column there many sentences. line break (paragraph) after each sentence. don't know how this. tried type \n after sentence, nothing happens. me? there source code: dictionarydatahelper public class dictionarydatabasehelper extends sqliteopenhelper { final static string dictionary_database="dictionary"; final static string item_id_column="id"; final static string word_column="word"; final static string definition_column="definition"; final static string create_database_query="create table "+dictionary_database+" ( "+ item_id_column+" integer primary key autoincrement, "+ word_column+" text , "+ definition_column+" text)"; final static string on_upgrade_query="drop table "+dictionary_database; context context; public dictionarydatabasehelper(context context, string name, c

MYSQL AND PHP FULL TEXT SEARCH -

i have following 2 queries: $s_name = $this->input->post('check_sur_name'); $sql = "select * patient match(s_name) against ('$s_name' in boolean mode ) or match(f_name) against ('' in boolean mode)"; $query = $this->db->query($sql); $query = $query->result_array(); echo json_encode($query); and second one: $sql = "select * patient match(s_name) against ('mugabe' in boolean mode ) or match(f_name) against ('' in boolean mode)"; $query = $this->db->query($sql); $query = $query->result_array(); echo json_encode($query); the second script runs , gives me feedback first 1 keeps failing, please advise have done wrong in first script?

css - intermitent lines between :before and :after elements on certain Zoom measurements. -

Image
.green-right:before{content:"";width: 0; height: 0;border-left: 9px solid transparent;border-right: 5px solid #53c6d3;border-bottom: 9px solid transparent;border-top: 9px solid transparent;position: absolute;top:0; left:-14px;} .green-right {margin:5px 0px 5px -6px; width:12px;height:18px; left:50%; cursor:pointer; float:left;background-color:#53c6d3;position: relative; padding:0 !important;} .green-right:after{content: ""; z-index:1;width: 0; float:left;position: absolute;left: 12px; border-left: 5px solid #53c6d3;border-right: 9px solid transparent;border-bottom: 9px solid transparent;border-top: 9px solid transparent;} the above code creates element: as can see, on screen widths, i"m getting these white lines between before , after elements. how prevent happening? here codepen: codepen when zoom in , out, can see unwanted line / lines.

javascript - Look for Promise bluebird code review for node.js -

when , need use new promise(function<function resolve, function reject> resolver) -> promise my sample code: userinfo.js var promise = require('bluebird'); var winston = require('winston'); var _ = require('lodash'); var request = promise.promisify(require("request")); exports.getweather = function (data) { var cityname = data.userprofile.city; return request("http://0.0.0.0:3003/api/weather/bycity?city=" + cityname).spread(function (res, body) { var result = json.parse(body).data; return _.merge(data, result); }); }; exports.getuserprofile = function (userid) { return new promise(function (resolve, reject) { request("http://0.0.0.0:3003/api/userprofile/getuserprofile?id=" + userid).spread(function (res, body) { var result = json.parse(body).data; resolve(result); }); }) }; exports.getevents = function (data) { var cityname = data.

How to unit test a Windows 10 app in Visual Studio? -

Image
how can unit test windows 10 app in visual studio 2015? i created blank app universal windows project , added new unit test project solution, when try add reference uwp app in test project, error saying 'unable add reference project "project name"'. right click on solution , choose add > new project . select unit test app (windows universal) . make sure don't select unit test library or unit test project . must universal one. should generate base class work with. you'll want add reference main project. this, right click on test project , select add > reference , choose main project. should able create classes main project test.

java - How can I make an i18n compliant EnumTypeAdapter? -

i'm working on nice solution internationalize enums gson deserialize (.tojson). for have it: private static final class genericenumtypeadapter<t extends enum<t>> extends typeadapter<t> { private resourcebundle bundle = resourcebundle.getbundle("messages"); private class<t> classoft; public genericenumtypeadapter(class<t> classoft) { this.classoft = classoft; } public t read(jsonreader in) throws ioexception { if (in.peek() == jsontoken.null) { in.nextnull(); return null; } return enum.valueof(classoft, in.nextstring()); } public void write(jsonwriter out, t value) throws ioexception { out.value(value == null ? null : bundle.getstring("enum." + value.getclass().getsimplename() + "." + value.name())); } } the problem of solution is: each enum should register new adapter: gsonbuilder.registertypead

java - Find the whole word from a Sentence with matching String -

i trying filter whole word sentence. like example text : question programming language. search text : pro result should : programming basically want whole words sentence. i referred how find whole word in string in java also. searching matching words , not characters i appreciate help thanks do regex: like about pro.*?\b will match pro , characters , word boundary (a whitespace or punctuation mark). way don't have make multiple substrings (which costly operation).

vb.net - How do I pass a value from one TextBox to another TextBox in a different form? -

currently have textbox on first form called txtuserid , want pass value of textbox called useridtextbox on second form. but when try run code below, nothing gets passed textbox on second form. i'm wondering how can pass value 1 form form? here code: private sub cmdlogin_click(sender object, e eventargs) handles cmdlogin.click try if cn.state = connectionstate.open cn.close() end if cn.open() cmd.commandtext = "select userid,state registration userid= " & _ "'" & txtuserid.text & "' , state='" & txtpw.text & "'" dim dr oledb.oledbdatareader dr = cmd.executereader if (dr.hasrows) while dr.read ' problem: ' code shows 2nd form useridtextbox value doesn't change? dim obj new sale obj.useridtextbox.text = txtuserid.text

mongodb - EC2 Volume Attachment Error (Unix) -

i trying follow 10gen documentation standing mongodb on ec2 instance . encountering error when trying attach newly created volumes instance. i trying run command $ ec2-attach-volume vol-dac9c92f -i i-19f359db -d /dev/sdh2 the error receive following client.invalidparametervalue: value (/dev/sdh2) parameter device invalid. /dev/sdh2 not valid ebs device name. and relevant part of documentation this $ (i=0; \ > vol in $(awk '{print $2}' vols.txt); \ > i=$((i+1)); \ > ec2-attach-volume $vol -i i-11eee072 -d /dev/sdh${i}; \ > done) this command executes (notice absence of id number) $ ec2-attach-volume vol-dac9c92f -i i-19f359db -d /dev/sdh if point out may doing wrong appreciative. -james the device attached instance mapped different device name based on type of virtualization. if instance pv (paravirtual), volumes can mapped /dev/sdxy x device letter , y numeric (as used partitions) - can use /dev/sdh2 . however, hvm insta

java - Why is there no mapToInt() in the OptionalInt class? -

the intstream class has map() , maptoobj() , maptolong() , maptodouble() methods, methods seem missing optionalint class. is there reason methods missing? rather obtusely can do optionalint oi = optionalint.of(1); oi.ifpresent(i -> intstream.of(i).map(j -> j + 1).foreach(system.out::println)); however not clear why optionalint doesn't have same methods intstream although note optional has subset of stream

c - 'Character Array' of integers to 'Integer array' -

my requirement : taking (unknown number) of integers input user , store them in numeric array. eg: input: 25 3 4 78. want them stored in numeric array, num as num[0] = 25 num[1] = 3 num[2] = 4 num[3] = 78 . . . what did : stored input in character array. gets(arr); //takes input command prompt , stores in string then i'm trying find spaces , separate characters, turns out double digit number(say,25) stored 2 , 5 not 25 . how achieve this? well, did not show code, i'll not provide code, i'll more happy provide flow-chart. define 1 array large enough (maybe change dynamic allocation later). take input user ( not command line arguments ) using fgets() . use strtok() tokenize input using space delimiter. if non-null token received, use strtol() convert token int or long . if strtok() returned null means you've got tokens , input empty, finish up, got int array.

python - zmq PUBhandler could not be used in __init__() method -

i have class mylogger sending messages log server using pubhandler . an exception gets raised when mylogger instanced in logworker.init() method (like version 1), however, ok if mylogger instanced in logworker.log_worker() method (version 2). any suggestions appreciated. import logging multiprocessing import process import os import random import sys import time import zmq zmq.log.handlers import pubhandler class mylogger(object): '''''' def __init__(self, port, handler=none): self.port = port self.handler = handler or self._construct_sock_handler() self.logger = logging.getlogger() self.logger.setlevel(logging.info) if not self.logger.handlers: self.logger.addhandler(self.handler) def _construct_sock_handler(self): context = zmq.context() log_sock = context.socket(zmq.pub) log_sock.connect("tcp://127.0.0.1:%i" % self.port) time.sleep(0.

C# Deserialize of XML into entity -

i'm trying deseaqralize xml document list of car objects, coming null. here's sample xml document based on post: how deserialize xml document <?xml version="1.0" encoding="utf-8"?> <cars> <car id="1"> <stocknumber>1020</stocknumber> <make>nissan</make> <model>sentra</model> </car> <car id="2"> <stocknumber>1010</stocknumber> <make>toyota</make> <model>corolla</model> </car> <car id="3"> <stocknumber>1111</stocknumber> <make>honda</make> <model>accord</model> </car> </cars> required classes: [serializable()] public class car { [system.xml.serialization.xmlattribute("id")] public int id { get; set; } [system.xml.serialization.xmlelement("stocknumber")] public string stocknum

c# - Why string type is not converting to int type? -

i want add 2 numbers. getting values button in textbox. succeeded in splitting string substrings , store values of these substrings in variables. not able convert string type integer type. results in concatenation not in addtion. note : using mvc perform task. , in model value1 , value2 string type in model here code snippet: if (button == "1"){ if (model.textbox == "" || model.textbox == null || model.textbox.tolower().contains("please enter value")){ model.textbox = "1"; } else { model.textbox += "1"; } } if (button == "2") { if (model.textbox == "" && model.textbox == null) { model.textbox = "2"; } else { model.textbox += "2"; } if (button == "+") { if (model.textbox == "" && model.textbox == null){ model.errormsg = "please enter number "; } else { model.textbox +

sql server - How can remove spaces from the both side of a column -

i have table t1, t1 table should contain column lname . value of lname have space on both side. i want retrieve name lname , remove spaces both side. help me. you can use ltrim , rtrim in conjunction remove spaces both sides select rtrim(ltrim(lname)) lname t1 see msdn documentation on function https://msdn.microsoft.com/en-us/library/ms177827.aspx sql fiddle demonstration http://sqlfiddle.com/#!6/ec068/1

c# - MonoTouch - Could not load NIB in bundle: 'NSBundle' -

Image
getting error saying not load nib in bundle: nsbundle when sub classed pageviewcontroller attempts load/display. (see attached file screen shot) i have tried deleting viewcontrollers , associated code , recreating them again scratch. i have shut down iphone simulator , xamarin , restarted them in hope issue related to: could not load nib in bundle - inspiration needed no avail. can point out possibly going wrong please? note: onboardinghome , onboardingpage viewcontrollers created within ios designer , sub classes created each. vc_onboardinghome.cs using foundation; using system; using system.codedom.compiler; using uikit; namespace performance { partial class vc_onboardinghome : uiviewcontroller { private uipageviewcontroller pageviewcontroller; private int pagecount = 3; public vc_onboardinghome (intptr handle) : base (handle) { } public override void viewdidload () { base.viewdidload (); vc_onboardpage firstpage = n

c++ - How can I implement this autoscope template object better? -

i have idea auto-scoped type clean resources when leave scope or containing object destructed. this currently: template <typename resource, typename deleteor> struct autoscope { resource m_resource; deleteor const& m_deleteor; autoscope(resource resource, deleteor const& deleteor) : m_resource(resource) , m_deleteor(deleteor) { } operator resource() { return m_resource; } ~autoscope() { m_deleteor(m_resource); } }; template <typename resource, typename deleteor> autoscope<resource, deleteor> make_autoscope(resource resource, deleteor deleteor) { return autoscope<resource, deleteor>(resource, deleteor); } a couple of potential/real problems see/have come across. for each resource handled, there deletor object or pointer created. i'm not sure if optimizer junk , inline deletor functor or function pointer autoscope object not larger resource handle. i'm

objective c - Forwarding call to foreign -init method -

situation for project of mine, i'm building kind of extension. extension must have class implements method declaration - (id)initwithbundle:(nsbundle *)bundle . issue my extension has multiple classes, host app badly written calls - (id)initwithbundle:(nsbundle *)bundle on different classes, randomly. i'm not willing reduce number of classes, solution left somehow forward caller class implement - (id)initwithbundle:(nsbundle *)bundle (a bit http 302). found many resources on forwarding calls, not such thing forwarding -init method... init allowed return object other itself. while highly recommend fixing calling code (i can't imagine case allowing code calls "randomly" reasonable idea), if want return other object init , works this: - (id)initwithbundle:(nsbundle *)bundle { // don't implement this, let's return class return [[otherclass alloc] initwithbundle: bundle]; } arc deal throwing away. the caller has wrong type

asp.net mvc - DNX vs DNX Core -

Image
i have started simple "kick tires" asp.net mvc (beta) project in vs2015 , having issue wrapping head around dnx , dnx core references. in example trying use datetime.toshortdatestring() , have intellisense dnx core enabled. i understand because isn't implemented in dnx core , can wrap compiler directives around it. is correct approach? differences between 2 platforms documented anywhere? finally, if i'm windows, iis time shop dnx core offer or should first task to remove project.json file? i guess answer depends. dnx vs dnx core dnx runs on top of today's .net framework (as mono), , has access full .net 4.5.2 (now .net 4.6) bcl. has been added .net since 1.0. dnx core runs ontop of coreclr stripped down version of .net framework. things missing, things never coming on coreclr various reasons. don't know of specific list of coming / not coming. can poke around on corefx , coreclr github projects see there. now question be

Spring Single Page Application: CSRF token changing silently after login, logout etc -

as know, in spring+javascript single page application, need send csrf token client in way. a recommended way have csrfheaderfilter described in spring guide . following approach, when application start, send request server, fetching token. but see under events login or logout , spring security changes token. csrfheaderfilter comes beforehand, , can't detect change. hence, needing send request following such events. i tried peeping @ spring security code find if there way send changed token along these login or logout requests, request saved. but, not find way. liked know if sending dummy request after login , logout etc., doing, looks solution. or, maybe there better way? if there no way avoid redundant request, wondering if becomes ticket spring security come after possible.

linux - Daemon won't kill children that are reading from a named pipe -

i've written bash daemon keeps eye on named pipe, logs sees on file named $log_file_basename.$date , , creates filtered version of in $actionable_log_file : while true date=`date +%y%m%d` cat $named_pipe | tee -a "$log_file_basename.$date" | grep -p -v "$exceptions" >> "$actionable_log_file" done pkill -p $$ # here it's should kill it's children exit 0 when daemon running, how process table looks: /bin/sh the_daemon.sh \_ cat the_fifo_queue \_ tee -a log_file.20150807 \_ grep -p -v "regexp" > filtered_log_file the problem when kill daemon (sigterm), cat, tee, , grep processes spawned daemon not collected parent. instead, become orphans , keep on waiting input on named pipe. once fifo receives input, process input instructed , die. how can make daemon kill children before dying? why aren't dying pkill -p $$ ? you want setup signal handler script kills members of process group (its child

unit testing - python selenium ide generated unittest, exporting using nose (xunit) with multiple cases using same browser -

so code below webdriver python code generated selenium ide on firefox. have other code generated long , wanted keep simple , short. so problem want generate test case each line in test_ function need go in order, don't want create multiple test functions. have tried doing using yield functionality ( explained here http://nose.readthedocs.org/en/latest/writing_tests.html ) doesn't passed loading web browser up. it's kinda hard explain since don't have actual code below. i exporting results using nosetests --with-xunit , letting jenkins deal xml. when run code , @ xml, contains 1 large block of text output , thats in 1 tag, not separated. so there way generate separate test cases still go through instructions sequentially. 1 solution have send in first instruction (driver.get(self.base_url + "/")), first 1 , second one, first, second, third. don't think best way. also know assertions , of stuff unittest, need way have each web browser action test