Posts

c - How to get next certificate in chain -

i want parent certificate (or certificates in chain matter) windows certificate store (assuming know location of end certificate). need each 1 in order build own custom x509_store (using openssl ). i think proper course of action be: obtain first certificate using certfindcertificateinstore (done) get certificate chain using certgetcertificatechain (done) extract certificates chain (?) for each certificate in chain, convert using d2i_x509 (done) or obtain first certificate using certfindcertificateinstore (done) get parent certificate (if exists) (?) convert using d2i_x509 , go 2. (done) then create store. the question answer - how parent certificate or certificates in chain using windows certificate store? i'm missing more or less occult function here. as certfindcertificateinstore outputs chain context, 1 can access it's members using beautiful construction: chaincontext->rgpchain[0]->rgpelement[icertindex]->pcertcontext->...

amazon web services - Roles / Permissions to create EMR Cluster using aws cli -

i trying create cluster using aws emr command. call out dont have admin role of stuff. aws emr create-cluster --release-label emr-4.2.0 --instance-groups instancegrouptype=master,instancecount=1,instancetype=m3.xlarge instancegrouptype=core,instancecount=2,instancetype=m3.xlarge --service-role my_role--ec2-attributes keyname=my_key_pair,subnetid=subnet-xxxxxxxx,instanceprofile=my_role i trying run command on ec2 instance. success message cluster id displayed. machine terminates invalid role error message. if try see cluster state in aws console see many permission error messages. are there set of permissions required role / policies ensure creation of cluster out error ? i cant use --use-default-role don't have permission create role. i can give emr_defaultrole i'm using create emr with: { "version": "2012-10-17", "statement": [{ "effect": "allow", "resource": "*...

Javascript events/functions triggering not only from button, but from whole page, incremental game -

i'm trying make own little incremental game , have few buttons currently. buttons following: "ka-ching" - money clicking 3 buttons buying "autoclickers". my problem autoclickers 2 , 3 bought when enough money when click anywhere on site, "ka-ching" button. stopped happening ka-ching when using kaching(ev) {ev.stoppropagation();}; doesn't work others. my full code: https://jsfiddle.net/veix/sdh94o6m/19/ (interval doesn't work in jsfiddle reason, doesn't matter, isn't bug i'm having. jsfiddle doesn't have stoppropagation(); in question. also part of problematic parts (i think): //function buying hotdog function buyhd() { if (buyclicker(hotdog.cost, this)) { hotdog.clicks += 0.10; hotdog.cost *=hotdog.costincrease; hotdog.level++; var e = document.getelementbyid("hotdog-level"); e.innerhtml = "lvl " + hotdog.level; var e2 = document.getelem...

javascript - Is it possible to call a function ONLY on the first run? -

i developing app using telerik's nativescript. know whether it's possible call function first time app ran, not each consecutive run. my first thoughts ship 1 line text file content false . on first run check file , value. if false i'd run function , update text file content true , otherwise i'd let app continue normal. i think there must better, more efficient way this. ideas folks? i've no idea why you're getting these browser technology answers you're using nativescript want take @ application settings module. a value set application settings persist long app installed on device. if user re-installing app it'll (of course) reset. it's easy as: var appsettings = require("application-settings"); if(!appsettings.getboolean("hasrunned", false)) { // stuff want on first run // , set true appsettings.setboolean("hasrunned", true); }

How to get various types used in a C# project with Roslyn -

i analyzing converting existing c# library java. start need know types / built-in keywords used in existing c# library. mean, example public class csharpclass { int i; float j; console.writeline(string.concat("a","b")); } in class types/keywords used are, public int float console string my questions are, is there way this. hope can roslyn. can “localdeclarationstatementsyntax” variables. how parse “console” , “concat”. “sytax walker” parses tokens in class option? also how classes project file roslyn? you need semantics -- syntax text see , that's get, nothing more, nothing less. compilation project, can call getsemanticmodel give tree, , there can call gettypeinfo or getsymbolinfo (as appropriate, search online difference between these two) type information. as far getting compilation , if you're writing command line tool want use msbuildworkspace load project. if you're analyzing projects open in visual studio, us...

orm - How to implement one-to-many relationship with join table using sequelize-npm in node.js -

Image
i writing rest apis in node.js sequelize mysql orm. know, how achieve n:m relationship between 2 tables using sequelize association. defined here in official documentation of sequelize. i want achieve one-to-many relationship using join table. my approach achieve : parent.model.js module.exports = function(sequelize, datatypes){ var parent = sequelize.define('parent', { parent_id:{ type:datatypes.integer, field:'parent_id', primarykey: true, autoincrement: true, unique:true }, parent_name:{ type: datatypes.string, field: 'parent_name' }, }, { classmethods:{ associate:function(models){ parent.belongstomany(models.child, { through:'parent_child_mapping'...

What kind of Open Source License is Appcelerator Titnaium using? -

we had interesting lecture open source projects today @ work. went titanium github repository check kind of license titanium using, not find definite answer. the closest see there is: commercial support, licensing we give our software away free! in order that, have programs companies require additional level of assistance through training or commercial support, need special licensing or want additional levels of capabilities. please visit appcelerator website more information appcelerator or email info@appcelerator.com. but that's vague. commercial applications? payed applications? developer has open-source application in order meet oss requirements titanium? oss titanium uses? appcelerator titanium mobile copyright 2008-2013 appcelerator, inc. licensed under apache license, version 2.0 (the "license"); may not use file except in compliance license. may obtain copy of license at http://www.apache.org/licenses/license-2.0 unless...