Posts

amazon web services - S3 and apache mod_proxy with basic authentication -

i'd redirect s3 bucket in ssl basic authentication of files (apk files) apache mod_proxy. ssl , mod_proxy work, basic authentication ignored. <virtualhost *:443> servername resources.mydomain.jp <filesmatch "\.apk$"> order deny,allow setenvif user-agent ".*android.*" allow_ag options followsymlinks allow env=allow_ag deny authtype basic authname "secret zone" authuserfile /etc/httpd/.htpasswd require user xxx_customer </filesmatch> sslengine on sslproxyengine on sslprotocol -all +sslv3 +tlsv1 sslciphersuite all:!adh:rc4+rsa:+high:+medium:-low:-sslv2:-exp sslcertificatefile conf.d/xxx.cer sslcertificatekeyfile conf.d/xxx.key sslcacertificatefile conf.d/xxx.cer proxypass / http://resources.mydomain.jp.s3-website-ap-zone-1.amazonaws.com/ proxypa...

powershell - This solution contains one or more assemblies targeted for the global assembly cache -

Image
i having sharepoint site deployed through sharepoint powershell. wsp build through visual studio 2013. all projects in solution not signed assemblies(project->right click->properties->signing->sign assemblies check box unchecked). taking wsp of solution publishing , deploying sharepoint using sharepoint powershell. when try this, getting following error: when googled solution. many of them suggesting check 'sign assemblies' check box. don't want do, because facing other issues packages install through nugget. sign libraries of solution go properties of project click signing tab , check sign libraries options , create new strong name file or without password , rebuild , deploy.

Change font size on axis for excel chart with powershell -

Image
i want change font size axis values 11 9 on chart: the chart whole worksheet & have tried run macro tool , replicate in there change font size. vba: activechart.axes(xlvalue).select selection.format.textframe2.textrange.font .baselineoffset = 0 .size = 11 end i unable reproduce in powershell. have tried: $excel = new-object -comobject excel.application $ws = $excel.workbooks.open('file.xlsx').sheets('chart') $ws.axes().item(1).format.textframe2.textrange.font.size = 11 $ws.axes().item(2).format.textframe2.textrange.font.size = 11 but textframe2 object isn't initialized. i'm pretty stuck on how proceed. thanks

php - How can I loop over this multi dimensional array? -

so im trying loop on array of categories , sub-categories im having trouble foreach loop . once i've got array working im going create menu if hover on category, sub categories appear. put way, im hopeless @ logic side of things :| array along loops i've tried: $categories = array( 'arr' => array( 'cat'=>'sport', 'subcats'=> array( "surfing", "basketball", "nfl", "afl" ) ), 'arr' => array( 'cat'=>'automotive', 'subcats'=> array( "cars", "f1", "bikes", "etc" ) ), 'arr' => array( 'cat'=>'comedy', 'subcats'=> array( "stand up", "pranks", "...", "test" ...

ios - Regular spacing with AutoLayout -

this question may seem simple autolayout expert, still out of own usual autolayout usage. used play .top , .bottom , .left , .right , .centerx , .centery attributes. how do when dealing few objects? for example, if have 5 uilabel(s), , want them vertically aligned, regular spacing. x-axis part, easy: myxconstraint = nslayoutconstraint(item: label1, attribute: .centerx, relatedby: .equal, toitem: superview, attribute: .centerx, multiplier: 1.0, constant: 0.0); with constraint 1 on each of 5 labels, vertically aligned. but how should write other constraints, label1 appears @ top, label2, label3 ….. label5. , want space @ top, 1 @ bottom , spaces between each consecutive label same value. create 6 spacer views. refer here .

javascript - How to bind data from Controler to chartjs line chart to create it as dynamic? -

i using chart.js create chart data recive using linq query in controler , return values json far have tried , isnt getting values of json, here have tried far:- this controller:- [httppost] public jsonresult monthlyturnover(string info) { var list = (from c in nmsdc.datasends c.userid == session["userid"].tostring() && c.rcommission != null && c.dt.month == datetime.now.month group c new { c.userid, c.dt.date } g1 orderby g1.key.date descending select new monthlyturnoverchart { amount = g1.sum(item => item.value), nooftransaction = (int)g1.count(), //date = g1.key.date.toshortdatestring() }).tolist(); return json(list, jsonrequestbehavior.allowget); } and view , javascript follows:- <div class="col-md-6" style=...

How to install ruby on rails -

i newbie ruby on rails, here trying install ruby on rails on windows 7 64 bit. installed ruby installer , installed rails. , created new app files. when start rails server showing following errors. how can rid of these errors , start developing ruby application? c:\users\walnut\desktop > bundle install fetching gem metadata https://rubygems.org/............ fetching version metadata https://rubygems.org/... fetching dependency metadata https://rubygems.org/.. resolving dependencies................. using rake 10.4.2 using i18n 0.7.0 installing json 1.8.3 native extensions gem::installerror: 'json' native gem requires installed build tools. please update path include build tools or download devkit 'http://rubyinstaller.org/downloads' , follow instructions @ 'http://github.com/oneclick/rubyinstaller/wiki/development-kit' error occurred while installing json (1.8.3), , bundler cannot continue. make sure `gem install json -v '1.8.3'` succeeds be...

c# - Convert AM/PM to small case letters -

i have string start's 7/28/2015 4:00 end's 7/31/2015 4:30 am . i want should convert am/pm am/pm pragmatically in c#... please me me! use string.tolower method this: datetime.now.tostring().tolower();

PHP parse error "syntax error, unexpected '['" -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers i confused because wrote code , in virtual server php worked fine when download on server got parse error , don't know how deal it. error on line 8 $tosearch ,parse error: syntax error, unexpected '[' here code : <?php function decodename($name) { if (substr($name,0,2)=="p_") { $name = substr($name,2); } $tosearch=["_c_","_s_","_q_","_d_","_p_","_e_","_lp_","_rp_","_"]; $toreplace=[",","/","\"",".","-","=","(",")"," "]; ($i=0; $i<count($toreplace); $i++) { $name = str_replace($tosearch, $toreplace, $name); } retur...

All messages in out queue failed to be delivered to broker when kafka brokers restarted -

i working on c++ kafka client: librdkafka. lib here https://github.com/edenhill/librdkafka/blob/master/examples/rdkafka_example.cpp . program writing 2000000 messages broker. during process, restarted broker. sometimes, no messages failed delivered broker. times 100,000 messages failed delivered broker. queue.buffering.max.messages=100000 . it seems messages in out queue lost? error rdkafka::message delivery report: local: unknown partition . i found new problems:(1) sometimes, 200 messages sent broker twice.(2) sometimes, message sent broker already, dr_cb() called. told me message failed delivered broker. trying figure out whether problem of broker or client. has similar problems? in fact, need reliable transmission , delivery reports between client , broker server. considering using c client now. not sure whether problem happens again... the log of broker is: [2015-07-21 17:48:33,471] info 0 elected leader (kafka.server.zookeeperleaderelector) [2015-07-21 17:48...

.net - How can I determine the methods contributing to high memory utilization from dump files? -

i have several .dmp files containing memory captured our .net application hosted in iis, , want run them through kind of analyzer tell me methods contributing unexplained high memory utilization our application. i have tried debugdiag analysis tools come visual studio. can manage produce list of objects in memory, have no idea method generating objects. can direct me application can me figure out, or possibly instruct me on how use debugdiag or visual studio this? i have hit google as possible, have not been successful @ finding answers looking for. willing purchase tool if takes, confirmation whatever purchased able answer questions. tl;dr: it's not possible dump files. a good dump contain .net objects, can see types increasing, object not have call stack attached. in native world (c++), there feature of heap manager attach call stack object. it's called create user stack database , can enabled gflags tool, part of debugging tools windows . such f...

html - Accidently Moved Public_Html to a folder in CPANEL X -

i accidentally moved public_html in folder wd, public_html cant moved home can moved folder. i using cpanelx if have root access of server can move public_html directory /home directory otherwise can not move , yes, need contact hosting support restore on original path.

import - How to execute only some functions from other python modules? -

[problem] want execute functions other python modules [input] module 1, module 2 module 1 includes: function called ( def a) function called ( def b) [module 2] includes: from module1 import b current: function , function b executed. desired: function b should executed. if have ideas please share. if import module has code outside class/function, code run. if module calls function outside definition, runs. consider not calling function in module file.

ios - 2 arrays into one dictionary while maintaining the indexes -

i have 2 separate arrays want import dictionary. order extremely important because both arrays must match in index struct myvariables { static var users:nsarray! static var img:nsarray! } var data = searchvc.getdata() myvariables.users = data.users; //array 1 (key) myvariables.img = data.img; //array 2 // goal insert these arrays dictionary while maintaing matching indexes on both arrays // dictonary (myvariables.img, key: myvariables.users) the key in dictionary in swift must hashable . i.e., not anyobject . assuming can replace of untyped swift arrays, or cast them so: struct myvariables { var users:array<anyobject> var img:array<string> } then can iterate through 1 array using preferred swift method , access second using indexing: var dictionary = dictionary<string, anyobject>() (index, element) in enumerate(myvariables.img) { dictionary[element] = myvariables.users[index] }

node.js - Approach of sending private messages to specific clients in SocketIO and Android -

i have problem sending private messages using socketio on nodejs server , android on client side. messages not reach specific endpoint have assigned , not understand why is. know each time user connects socketio, assigned specific socket id save in object alongside socket object using client name identifier. so: // register client server, providing username socket.on('init', function(data) { console.log("userid assigned socket: " + data.userid); // store reference socket id // data.userid identifier find respective client want send message to. connectedsockets[data.userid] = { id: socket.id, usersocket : socket }; // store reference socket console.log("new connected socketid: " + connectedsockets[data.userid].id + " socket object: " + connectedsockets[data.userid].usersocket); }); when sending private message, want retrieve object send respective person so: // send message user socket.on('privatemessage', function(data)...

VIM undo: Why does the cursor jump to the wrong position when undoing `undojoin`? -

edits: i've simplified function , clarified question. original question still available further down page. crossposted onto vim_dev mailing list: https://groups.google.com/forum/#!topic/vim_dev/_rz3uvxbwsq reported bug neovim: https://github.com/neovim/neovim/issues/6276 why cursor positioned differently in following 2 examples: [correct cursor position] following test produces expected result substitution change joined previous change in buffer (addition of line 3), cursor position correctly restored second line in buffer. normal ggiline 1 full of aaaa set undolevels=10 " splits change separate undo blocks normal goline 2 full of bbbb set undolevels=10 normal goline 3 full of cccc set undolevels=10 undojoin keepjumps %s/aaaa/zzzz/ normal u [incorrect cursor position] following test produces unexpected result: substitution change joined previous change in buffer (addition of line 4), cursor position incorrectly restored first line in buffer (should ...

php - How to merge these two queries into one? -

quite simply... how can merge these 2 queries one? $sql = "update `data` set `views` = `views` + 1 `id`=$id , `source`='$source' , `keyword`='$keyword'"; $sql = "update `settings` set `count` = `count` + 1 `id`=$id"; edit: also, there's matter of first time data entered, when data update not yet exist in data table. my insert query: $sql = "insert `_data` (`id`, `source`, `keyword`, `views`) values ($id,'$source','$keyword',1)"; is possible combine insert of new data 1 table, update table? i suggest use prepared statements. $sql = "update data, settings set data.views = data.views+1, settings.count = settings.count+1, data.id = $id , data.source = $source , data.keyword = $keyword , settings.id = $id";

Change onclick event to onhover on export option in datatables -

i'm working jquery datatables , tabletools extension in export option working fine had requirement of instead of onclick should show dropdown menu on hover of export button. i tried these bootstrap dropdown hover nothing works. i believe not possible because of tabletools functionality implemented using adobe flash. due flash security restrictions there no way programmatically trigger export pdf or csv other let user click on button. see this answer more details.

go - Adding a method for existing type in Golang: how to rewrite return value's type -

i want extend existing goquery.selection type own method , able use package's selectors. know cannot "patch" existing method -- need create new one. how can force existing package functions use new type? i'm missing in general or there's no "nice" way , it's better use function? package main import ( "fmt" "github.com/puerkitobio/goquery" ) type customselection goquery.selection func (s *customselection) custommethod() int { return 1 } doc.find("*").each(func(i int, s *goquery.selection) { fmt.println(s.custommethod()) // not works since still "goquery.selection" // how can result customselection type here? }) since inheritance not supported, best practice embed non-local type own local type, , extend it. in design patterns lingo better known composition: https://en.wikipedia.org/wiki/composition_over_inheritance

How do you I register for Electronic Data Interchange (EDI) ISA number? -

i receive 850 purchase order. in return, need generate , send 997 response, include isa/gs number. , register isa id? thanks in advance edi systems typically limited in scope between few or 2 different organizations. these organizations need decide beforehand on how of full edi specification they're going use, , how they're going specify ids. see here . also, see here . looks duns numbers or variants on them common choices ids. so organization , others need figure out if you're going use duns number or ad-hoc made numbers or what.