Posts

sql - SSIS Package What credential SSIS is running? -

i have package access excel file .xls. file located on network path. the packaged called store pass use32bitruntime = true. store called c# code. if file local file => package run successfully. if file network path => package run failed. checking network path: can access network path , open file manually successful. so question credential ssis package running? if runs under account logg-in sql , call store, should access file. it's not. turns out credential substituted own. after search quite long time, can't find answer. any on appreciated. this store execute ssis alter procedure [dbo].[execute_ssis_package] @folder_name varchar(100) ,@project_name varchar(100) ,@package_name varchar(300) --,@runaccount varchar(300) output ,@output_execution_id bigint output begin set nocount on; declare @execution_id bigint exec ssisdb.catalog.create_execution @folder_name, @project_name, @package_name, @use32bitruntime = t...

php - How secure is simple admin validation with if statement? -

i wondering how secure simple php script if statement admin password. say, have webpage want login edit content. if created html login script, retrieved credentials through post, , validated password , username through 'if' statement, such as if ($_post['pass'] = 'somepasswordwithalotof123456789' , $_post['user']) { .. stuff ... } i'm sure approach have major security issues, i'm curious go wrong i'm researching bit on writing secure php applications. reason why interested in approach, avoids database contact. also, aware of possibility of brute force attacks approach. thanks in advance. that secure how keep web server's ftp/filesystem access away users, no 1 able see script's source code. therefore, might want hash password before comparing. echo password_hash('somepasswordwithalotof1234567', password_bcrypt); this output: $2y$10$abapxe/k/mdqwzkrf7jhc.7z6gks0yfzdrgoxgxes24oh1/224b.c now, use ...

php - Http to https redirect not working for few pages -

following htaccess code working on home page. when enter my.example.com in url, htaccess redirects https://my.example.com when enter my.example.com/login , it's not redirecting https://my.example.com/login (i don't want www in domain name) <ifmodule mod_rewrite.c> rewriteengine on options +followsymlinks rewritebase / rewriterule ^$ app/webroot/ [l] rewriterule (.*) app/webroot/$1 [l] rewritecond %{http_host} ^[^.]+\.[^.]+$ rewritecond %{https}s ^on(s)| rewriterule ^https://%{http_host}%{request_uri} [l,r=301] </ifmodule> please let me know going wrong? thanks keep redirect rule before internal rewrite ones , fix syntax error in http->https error: rewriteengine on options +followsymlinks rewritebase / rewritecond %{https} off rewriterule ^ https://%{http_host}%{request_uri} [l,ne,r=301] rewriterule (.*) app/webroot/$1 [l]

angularjs - How to create promise? -

problem $window.print() called , not when promise success.how can create promise when data populated ? suggestion? 'use strict'; angular.module("printmodule").controller('printcontroller', ['$scope', '$window', '$q', function ($scope, $window, $q) { $scope.ticketpin = localstorage.getitem("pin"); $scope.payouttime = localstorage.getitem("payouttime"); $scope.payoutamount = localstorage.getitem("payoutamount"); var defer = $q.defer(); defer.resolve($scope.ticketpin); defer.resolve($scope.payouttime); defer.resolve($scope.payoutamount); defer.promise.then(function () { $window.print(); }) }]); function getfromlocalstorage (item, callback) { //to prevent errors if (callback) { return callback(localstorage.getitem(item)) ; } } var callback; callback = function (data) { //set variable data } //i make getfromlocalstorage f...

c# - Async Await top level handling -

i have 10 sql tables need extract data, process, , insert data table. don't want them in parallel, make use of io time. i have function: public async task promoteasync() { try { using (httransdb transactions = new httransdb()) using (zimportmaster importmaster = new zimportmaster()) using (zmasteraddress masteraddress = new zmasteraddress()) { // select out non error rows datatable dt = await httransdb.getvalidrowsasync(this.tableconfig.batchid, this.tableconfig.sourcetablename); // stuff // insert data using (httransdb transactionsdb = new httransdb()) { int result = await transactiondb.bulkcopyasync(dt); } } } catch (exception e) { // log exception , re-throw } } i run function in foreach loop each table: ...

php - Heroku and Mod_security: How to disable it -

i'm trying install piwik on heroku keep company's applications on same host. got other errors suppressed, 1 has stumped me: get request piwik.php failed. try whitelisting url http authentication , disable mod_security (you may have ask webhost). after making change, restart web server. heroku doesn't have guide on disabling mod_security , i've tried disabling through .htaccess file no luck. what whitelisting url http auth mean? easier configure hacking stack disable mod_security?

c++ - Linker error with static constant that doesn't seem to be odr-used -

the definition in standard odr-used pretty confusing when details (at least, me is). rely on informal definition of "if reference taken", except when lvalue-to-rvalue conversion available. integral constants, should treated rvalues, seems should excluded reference rule. here sample code failing link: class test { public: test(); static constexpr int min_value { 5 }; int m_othervalue = 10; }; test::test() { m_othervalue = std::max(m_othervalue, min_value); } int main() { test t; } and linker error get: clang++ -std=c++14 -o2 -wall -pedantic -pthread main.cpp && ./a.out /tmp/main-e2122e.o: in function `test::test()': main.cpp:(.text+0x2): undefined reference `test::min_value' clang: error: linker command failed exit code 1 (use -v see invocation) live sample: http://coliru.stacked-crooked.com/a/4d4c27d6b7683fe8 why definition of min_value required? it's constant literal value, compiler should optimize out std::max(m_oth...