Thursday, 15 September 2011

css - framesets and frame in SAS changing the height -



css - framesets and frame in SAS changing the height -

i updating , old site using framesets. in right 70% column attempting forcefulness height accommodate drop downwards menu. reason when give frame id , height ignored. ideas why may happening? in sas environment, , i've never seen utilize use framesets.

<frameset cols="30%, 70%"> <frame src="left"> <frame src="right" id="betall"> </frameset>

a html frameset cannot used display on screen. it's placeholder split windows in multiple frames. frameset consists of 2 columns both 100% of height viewport.

if want add together drop downwards menu, need add together html-file contains displayed content. in illustration either left or right.

css height frame sas frameset

java - First characters being lost when reading from InputStream -



java - First characters being lost when reading from InputStream -

i have next code:

public class interface { public void exec(){ seek { _inputstream.read(); bufferedreader br = new bufferedreader( new inputstreamreader( _inputstream )); system.out.println( br.readline() ); } grab (ioexception e) { } } public void setinputstream( inputstream inputstream ){ _inputstream = inputstream; } private inputstream _inputstream; } public class run { public static void main(string[] args) { interface ui = new interface(); ui.setinputstream( new bytearrayinputstream( "2 4 n".getbytes( charset.defaultcharset() ) ) ); ui.exec(); } }

whenever run code though, printed out

" 4 n"

the first character has been lost. happening stream , can prevent it?

_inputstream.read();

consumes 1 character doesn't go bufferedreader. discarded character yourself. delete line , should fine.

java stream

algorithm - Directed maximum weighted bipartite matching allowing sharing of start/end vertices -



algorithm - Directed maximum weighted bipartite matching allowing sharing of start/end vertices -

let g (u u v, e) weighted directed bipartite graph (i.e. u , v 2 sets of nodes of bipartite graph , e contains directed weighted edges u v or v u). here example:

in case:

u = {a,b,c} v = {d,e,f} e = {(a->e,7), (b->d,1), (c->e,3), (f->a,9)}

definition: directionalmatching (i made term create things clearer): set of directed edges may share start or end vertices. is, if u->v , u'->v' both belong directionalmatching v /= u' , v' /= u may u = u' or v = v'.

my question: how efficiently find directionalmatching, defined above, bipartite directional weighted graph maximizes sum of weights of edges?

by efficiently, mean polynomial complexity or faster, know how implement naive brute forcefulness approach.

in illustration above maximum weighted directionalmatching is: {f->a,c->e,b->d}, value of 13.

formally demonstrating equivalence of problem other known problem in graph theory valuable.

thanks!

note 1: question based on maximum weighted bipartite matching _with_ directed edges relaxation allowed edges in matching share origin or destination. since relaxation makes big difference, created independent question.

note 2: maximum weight matching. cardinality (how many edges present) , number of vertices covered matching irrelevant right result. maximum weight matters.

note 2: during research solve problem found paper, think helpful others trying find solution: alternating cycles , paths in edge-coloured multigraphs: survey

note 3: in case helps, can think of graph equivalent 2-edge coloured undirected bipartite multigraph. problem formulation turn into: find set of edges without colour-alternating paths or cycles has maximum weight sum.

note 4: suspect problem might np-hard, not experienced reductions haven't managed prove yet.

yet example:

imagine had

4 vertices: {u1, u2} {v1, v2}

4 edges: {u1->v1, u1->v2, u2->v1, v2->u2}

then, regardless of weights, u1->v2 , v2->u2 cannot in same directionalmatching, neither can v2->u2 , u2->v1. u1->v1 , u1->v2 can, , can u1->v1 , u2->v1.

define new undirected graph g' g follows.

g' has node (a, b) weight w each directed border (a, b) weight w in g g' has undirected border ((a, b),(b, c)) if (a, b) , (b, c) both directed edges in g

http://en.wikipedia.org/wiki/line_graph#line_digraphs

now find maximal (weighted) independent vertex set in g'.

http://en.wikipedia.org/wiki/vertex_independent_set

edit: stuff after point works if of border weights same - when border weights have different values more hard problem (google "maximum weight independent vertex set" possible algorithms)

typically np-hard problem. however, g' bipartite graph -- contains cycles. finding maximal (weighted) independent vertex set in bipartite graph not np-hard.

the algorithm run on g' follows.

find connected components of g', h_1, h_2, ..., h_k for each h_i 2-coloring (say reddish , blue) of nodes. cookbook approach here depth-first search on h_i alternating colors. simple approach color each vertex in h_i based on whether corresponding border in g goes u v (red) or v u (blue). the 2 options nodes select h_i either reddish nodes or bluish nodes. take colored node set higher weight. example, reddish node set has weight equal h_i.nodes.where(node => node.color == red).sum(node => node.w). phone call higher-weight node set n_i. your maximal weighted independent vertex set union(n_1, n_2, ..., n_k).

since each vertex in g' corresponds 1 of directed edges in g, have maximal directionalmatching.

algorithm graph complexity-theory matching

vb.net - Using RS utility to deploy report using database driven directories -



vb.net - Using RS utility to deploy report using database driven directories -

i trying utilize rs utility on vb.net script deploy study loop through table has list of reports, folders, datasources, linked reports, roles , on. possible phone call rs utility within vb.net code or add together libraries enable sqlconnection in vb code? have 2008 r2 sql server.

in terms of rs utility, don't have many options. books online:

you not declare namespaces within script file. scripting environment makes several useful microsoft .net framework namespaces available you: system.web.services, system.web.services.protocols, system.xml, , system.io.

see format reporting services script file.

so in sense can't reading table database, if that's intention. read config file perhaps, these no real alternative extend utility's functionality.

your other alternative interact study server web service straight in own code , not utilize rs utility.

vb.net reporting-services

wpf - Silverlight - Find Controls by Name (string) -



wpf - Silverlight - Find Controls by Name (string) -

i serach way find controls string property:

private void animationcallback(string objectname, string value) { }

is possible find command in animation callback method property "objectname"?? (e.g. ellipse1)

the command should become color in status value property. type of command unknown.

thank you

if method defined in type derived frameworkelement, findname method should want.

wpf silverlight silverlight-4.0 silverlight-5.0

asp.net - How can I write a unit test against a WebPartBase class and mock out the controls? -



asp.net - How can I write a unit test against a WebPartBase class and mock out the controls? -

i have bunch of webpartbase classes i'm trying invoke method on. of methods phone call controls on ui. want stub out controls somehow exception doesn't thrown when attempting set values on them. know of way this? fine if initialized i'm not sure how initialize them without running web server.

my test code looks this. intializeonadd() method on kpiwebpartbase , kpiwebpartbase inherits webpartbase.

[testmethod] public void invokeallwidgets() { var user = new user("adminqaphi"); user.customerid = testconfig.clientid; var classes = typeof(kpiwebpartbase) .assembly .gettypes() .where(t => t.issubclassof(typeof(kpiwebpartbase)) && !t.isabstract ); foreach (var c in classes) { console.writeline(c.name); var instance = (kpiwebpartbase)activator.createinstance(c); foreach (var billingmetric in enum.getvalues(typeof(billingmetric))) { instance.currentuser = user; instance.billingmetric = (billingmetric)billingmetric; if (instance startendkpiwebpartbase) { var startendkpi = (startendkpiwebpartbase)instance; startendkpi.startdate = new datetime(2007, 1, 1); startendkpi.enddate = new datetime(2008, 1, 1); } instance.initializeonadd(); } } }

i create interfaces them (if possible) , utilize moq create mocks or stubs external dependencies.

what behavior invokeallwidgets() test?

response comment: think should mock database well, test "internal" logic of code(unit). otherwise en testing database, , guess not want to. , if phone call database, happens if info in changes? fail tests? if think doing integration tests , not unit tests. in unit test seek mock external dependencies , test own logic (what can go wrong?). if code don't allow test like, alter it!

asp.net unit-testing tdd web-parts

How would I replicate this input text effect where they're almost a merged box in CSS/HTML? -



How would I replicate this input text effect where they're almost a merged box in CSS/HTML? -

saw image on dribbble. how create effect in css? i'm referring 2 input fields beingness merged , having not-full-width divider between them.

something this:

#inputwrap { border: 1px solid #aaa; background: #fff; width: 180px; padding: 10px; margin: 20px; } #inputwrap input { border: none; width: 160px; padding: 5px 10px; outline: none; } #inputwrap input:first-child { border-bottom: 1px solid #aaa; }

http://jsfiddle.net/2thfg/

html css