Posts

sql server - Crystal Reports does not put linked view into FROM clause causing "The multi-part identifier xxx could not be bound" -

i've stuck crystal reports 2008 (12.0.0.683) project. i have added 1 more view in database expert existing (working) report. it's (the view) linked main table. it's linked left outer join (not enforced, =). on runtime sends query sql server column additional view put select clause view name not put clause. causes "the multi-part identifier xxx not bound" error. understend error cannot force cr use view in clause. not think there special view (more views linked in report). did face similar problem? please give tips. in advance! ps. query goes sql server (seen sql profiler) like: select newview.col1, newview.col2, maintable.col1, maintable.col2, subtable.col1, subtable.col2 -- no [newview] anywhere in clase maintable inner join subtable on (.. = ..) .. = .. finally i've found solution. there "show sql query.." in crystal reports apps. in query view i've found 1 of tables taken database (test db instead ...

bash - How to prompt to the user while performing a find>replace in unix -

i'm trying write script works microsoft words find>replace function. first asks 2 inputs user. first 1 strings found , second 1 strings replace old ones. though pretty straight forward, want count number of things replaced , echo user confirms these specific number of replacements. how can that? far have search>replace function: for file in `find -name '*.sdf.new'`; grep "$search" $file &> /dev/null sed -i "s/$search/$replace/" $file done while read -u 3 -r -d '' file; n=$(grep -o "$search" "$file" | wc -l) read -p "about replace $n instances of '$search' in $file. ok? " ans if [[ $ans == [yy]* ]]; sed -i "s|${search//|/\\\\|}|${replace//|/\\\\|}|g" "$file" fi done 3< <(find -name '*.sdf.new' -print0) there's tricky stuff going on here: the output find command send while loop on file descriptor 3, , ...

c++ - What is wrong with this solution of mine for the PKU Judge ID 1003? -

here link problem id 1003 of pku judge: http://poj.org/problem?id=1003 all need problem calculate sum of harmonic progression , compare variable have inputted i getting right answers sample input cases, don't know why answer not getting accepted? getting 'wrong answer' result. part in problem says "the input consists of 1 or more test cases, followed line containing number 0.00 signals end of input" don't know how 0.00 part, taking single input, didn't understand how that? here solution: #include<iostream> using namespace std; int main() { float c; float sum = 0; cin >> c; short int = 1; while(1) { sum += (float)1/(i+1); if(sum >= c) { cout << << " card(s)"; break; } i++; } return 0; } the input consists of 1 or more test cases, followed line containing number 0.00 signals end of input. each test...

neo4j - relationship types in py2neo -

how can can type of relationship cypher query in py2neo? have piece of code works. def print_row(row): a,b = row print (a["name"] + " " + b["name"]) cypher.execute(graph_db, "start a=node(1) match (a) - [] - (b) return a,b", row_handler=print_row) this way can print out nodes connected input node (1). rock paper rock scissors however print type of relationship these nodes have. for instance: rock beats scissors rock beaten_by paper what tried (and failed) follows: def print_row(row): a,b,r = row print (a["name"] + r["type"] + b["name"]) cypher.execute(graph_db,"start a=node(1) match (a) -[r]->(b) return a,b,r", row_handler=print_row) how can py2neo? you need use cypher type function ( http://docs.neo4j.org/chunked/milestone/query-functions-scalar.html#functions-type ). code this: def print_row(row): a, r_type, b = row print(a["name"] ...

java - Probabilistic Latent Semantic Analysis -

i looking tutorial or implementation of plsa in java. there similar question in link https://stackoverflow.com/questions/16396463/probabilistic-latent-semantic-analysis-indexing-in-java , however, there no reply query swell. have watched talk on plsa thomas hoffman, can't seem head around implementation. appreciated. well according wikipedia : p(w,d) = \sum_c p(c) p(d|c) p(w|c) = p(d) \sum_c p(c|d) p(w|c) that formula need implement. further, em algorithm need. if don't understand algorithm or function cannot consumer of it.

Publish on Tomcat from Eclipse -

i have problem when publishing web project on tomcat. i've got error: !entry org.eclipse.wst.server.core 4 0 2013-07-17 14:22:41.293 !message not publish server. !stack 0 java.lang.nullpointerexception @ org.eclipse.wst.common.componentcore.internal.util.virtualreferenceutilities.getdefaultprojectarchivename(virtualreferenceutilities.java:81) @ org.eclipse.jst.j2ee.componentcore.j2eemodulevirtualcomponent.getjavaclasspathreferences(j2eemodulevirtualcomponent.java:338) @ org.eclipse.jst.j2ee.componentcore.j2eemodulevirtualcomponent.getnonmanifestrefs(j2eemodulevirtualcomponent.java:242) @ org.eclipse.jst.j2ee.componentcore.j2eemodulevirtualcomponent.getreferences(j2eemodulevirtualcomponent.java:166) but if turn off maven's resolve dependencies workspace in web project works fine. any idea thanks zlaja i have used m2e plugin instead of m2e-wtp. after installing m2e-wtp works fine. zlaja

xml element is being returned as object HTMLCollection -

i have xml document returns list of map markers. <markers> <marker name="marker 1 name" theid="100"> <content>text goes here</content> </marker> <marker name="marker 2 name" theid="101"> <content>other text goes here</content> </marker> ... </markers> i have javascript read through list of markers , returns attributes variables name , theid . <script> ... var xml = parsexml(data); var markernodes = xml.documentelement.getelementsbytagname("marker"); (var = 0; < markernodes.length; i++) { var name = markernodes[i].getattribute("name"); var theid = markernodes[i].getattribute("theid"); var content = markernodes[i].getelementsbytagname("content"); ... </script> however cannot javascript return contents of element tag content . in place of text content message [object htmlcollection] . kind enough me fix please? t...