Posts

Featured post

apache - VirtualHosts not working? -

i can't seem virtualhosts working... think i'm clueless i'm doing. httpd.conf namevirtualhost * <virtualhost *> servername localhost documentroot "/applications/mamp/bin/mamp" <directory "/applications/mamp/bin/mamp"> options indexes followsymlinks includes execcgi allowoverride none order allow,deny allow </directory> </virtualhost> # rev.dev <virtualhost *> servername revcms.dev documentroot "/users/manuel/sites/rev" <directory "/users/manuel/sites/rev"> options indexes followsymlinks includes execcgi allowoverride none order allow,deny allow </directory> </virtualhost> etc/hosts ## # host database # # localhost used configure loopback interface # when system booting. not change entry. ## 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0....

math - transfer the co-ordinates error in function -

i trying transfer coordinates of points new generated system coordinates the original points in original system in top left corner .... i wrote following function transfer coordinates using formal got question pre_question question has 2 photos show mean , sign each part the problem , getting negative value w ! can please check function , let me know problem thanks { cvpoint transfer_coordinate (cvpoint pt1 , cvpoint pt2 , cvpoint pt3 , cvpoint pt4 , cvpoint origin , cvpoint current) { // pt1 , pt2 ==> points in line z // pt3 , pt4 ==> points in line w double a1 , a2 , b1 , b2 , d1 , d2; d1= sqrt(pow((pt1.x - pt2.x),2.0)+ pow((pt1.y - pt2.y),2.0)); d2= sqrt(pow((pt3.x - pt4.x),2.0)+ pow((pt3.y - pt4.y),2.0)); a1 =(pt1.y-pt2.y)/d1; b1 =(pt2.x-pt1.x)/d1; a2 =(pt3.y-pt4.y)/d2; b2 =(pt4.x-pt3.x)/d2; cvpoint new_point; //z = -sqrt(a1^2+b1^2)*(a2*(x-x0)+b2*(y-y0))/(a2*b1-a1*b2) //w = sqrt(a2^2+b2^2)*(a1*(x-x0)+b1*(y-y0))/(a1*b2-a2*b1) //z new_point.x = -r...

c - Creating a two-dimensional array of fixed-length strings (character arrays) -

so i've been trying create object in c 2 columns of empty char arrays. contents resemble char * strings[3][2] { {"thing1", "value1"} {"thing2", "value2"} {"thing3", "value3"} } ...except actual char *s empty arrays fixed length, rather initialized strings, i.e. each string "char string[6]". i've been searching time i'm coming dry. happen know syntax creating such object? maybe this: typedef char sixchars[7]; sixchars strings[3][2] = { { "thing1", "value1" } , { "thing2", "value2" } , { "thing3", "value3" } };

c# - Castle Windsor instance configuration -

i trying implement configuration (from distributed cache) injection using castle windsor message handler. the configuration of single instance straight forward, i'm not sure best way provide different configuration multiple instances, injected same class i have following class hierarchy, , injection working ok, cant create different configurations iadapter instances: public interface iadapter { void send(string message) string receive(); } public interface imsmqadapterconfig { string queuename {get;set;} } public class msmqadapter { private readonly imsmqadapterconfig _config; public imsmqadapter(imsmqadapterconfig config) { _config = config; } public void send(string message) { string queuename = _config.queuename; // queuename } } public class messageprocessor { private readonly iadapter _input; private readonly iadapter _output; public messageprocessor(iadapter input, iadapter output) ...

git - Push commit to 2 different remote branches? -

i have 2 remote branches, branch , branch b. consider case checkout branch a, made commit , pushed. now, want push same commit branch b. these 2 branches pretty different cannot user rebase , can i? because if git rebase rebase changes 1 branch another, need 1 commit. how can that? ps. in stupid way: checkout branch b, cherry pick last commit branch a, , push b (remote). way don't need switch branch b. that git cherry-pick for. since branches different each other , don't want merge or rebase 1 commit, option.

uitableview - Create and use custom prototype table cells in xamarin ios using storyboard -

Image
is possible create , use 'custom' prototype table cells in xamarin ios (monotouch) using storyboard? i find stuart lodge explaining method using xib/nibs: http://www.youtube.com/watch?feature=player_embedded&v=vd1p2gz8jfy let's answer question! looking one. :) 1) open storyboard have viewcontroller tableview: add prototype cell (if there no cell added before): customize cell want (in case there custom uiimage , label): remember set height of cell. select whole tableview , properties window select "layout" tab. on top of properties window should see "row height" - put appropriate value: now select prototype cell once again. in properties window type name of class (it create code-behind class it). in case "friendscustomtableviewcell". after provide "identifier" cell. can see "friendcell". last thing set "style" property set custom. "name" field should empty. once click ...

r - How to include a \perp symbol in a ggplot2 annotation? -

i put annotation : e \perp c using ggplot2 annotate("text", label = ...) . i searched quite thorougly on web managed lone symbol using annotate("text", label = "symbol('\136')", parse = t) . does have solution ? plotting code page: p <- ggplot(df, aes(x = gp, y = y)) + geom_point() + geom_point(data = ds, aes(y = mean), colour = 'red', size = 3) p+geom_text( aes(x="b", y=-0.4, label = "e(y)*symbol('\\136')*b" ), parse = true) after getting work able annotate(text"...) working: p+annotate("text", 1, -0.4, label="e(y)*symbol('\\136')*b", parse=true) the tricks: mix quoting characters did use plotmath syntax i'm guessing might not have used. edit: * not quoting character. if anything, should called linking character. in plotmath syntax every "atom" or function call needs separated (or "linked-to" de...