Posts

c# - Unable to get the added fields of Database after making changes -

c# - Unable to get the added fields of Database after making changes - i using linq sql approach manipulation database tables. stuck 1 problem, whenever adding new column existing tables have delete existing .dbml file of table solution , have add together 1 time again access of lastly added columns. i tried approach re-building project , solution still, doesn't work , pushes me above less-sensible steps. could help me out rid of issue? or way have changes adding .dbml file again. c# linq-to-sql

SQL Server: How to handle two different cases in Where clause -

SQL Server: How to handle two different cases in Where clause - i have stored procedure in sql server 2008 used fetch info table. my input parameters are: @category nvarchar(50) = '', @departmentid int my clause is: where a.departmentid = @departmentid , a.category = @category is there way can apply case statement (or similar) clause should check category match if @category not '' , otherwise select categories ? the thing think of here utilize following. technically works can't check exact category matches required here: where a.departmentid = @departmentid , a.category '%'+@category+'%' many help this, tim. you can modify where clause follow: where a.departmentid = @departmentid , (@category = '' or a.category = @category) sql sql-server case where where-clause

javascript - d3 text label format based on value -

javascript - d3 text label format based on value - i have chart need create label bold based on variable. not sure how in d3 accomplish this. think may need utilize .each function. line .style("font-weight", "bold") makes text labels bold want values made bold. ideas on right syntax this? g.append("svg:text") .each(function(d) { d.angle = (d.startangle + d.endangle) / 2; }) .attr("dy", ".35em") .style("font-family", "helvetica, arial, sans-serif") .style("font-size", "10px") //.style("font-weight", "bold") .attr("text-anchor", function(d) { homecoming d.angle > math.pi ? "end" : null; }) .attr("transform", function(d) { homecoming "rotate(" + (d.angle * 180 / math.pi - 90) + ")" + "translate(" + (r0 + 36) + ")...

regex - Trying to colorize Apache http wire logs using sed -

regex - Trying to colorize Apache http wire logs using sed - we have log files containing output apache http client. seeing output goes "over wire" , includes lines like: << http/1.1 200 request has succeeded the chevrons '<<' indicate incoming, in contrast '>>' outgoing content. using 'tail -f' follow these logs entertaining plenty thought useful exercise utilize sed colorize output according whether input or output. a simple test show mean: echo '<< http/1.1 200 request has succeeded' | sed -r -e 's_<<_\x1b[31;1m&\x1b[0m_i' -e 's_>>_\x1b[32;1m&\x1b[0m_i' for input, and echo '>> http/1.1 200 request has succeeded' | sed -r -e 's_<<_\x1b[31;1m&\x1b[0m_i' -e 's_>>_\x1b[32;1m&\x1b[0m_i' for output. so far, good. descent regex madness began when occurred me more useful highlight http response codes , colorize ...

regex - ignore special characters in find and replace command of perl -

regex - ignore special characters in find and replace command of perl - i using command perform find , replace system( "perl -pi -e 's/$arr3[$i]/$arr2[$i]/g' /opt/app/d1ebl1m5/dv02/cingbt02/j2eeserver/config/amss/application/properties/cscenvvar.properties_try"); the value of $arr3[$i] contains special characters -e , $ etc. can ignore special characters , treat look normal string you want my $search_pat = quotemeta($search); s/\q$search_pat\e/$replace/g or equivalent s/\q$search\e/$replace/ it's bad thought generate code, solution becomes system( perl => ( '-i', '-p', '-e' => ' begin { $s = shift(@argv); $e = shift(@argv); } s/\q$s/$e/g ', '--', $arr3[$i], $arr2[$i], '/opt/app/.../cscenvvar.properties_try', ) ); regex perl replace

c# - Display 50,000 cities in dropdown list in asp.net website -

c# - Display 50,000 cities in dropdown list in asp.net website - we displaying cities in dropdown list. when scroll downwards dropdown , select value, browser gets hanged up. please allow me know if there solution prepare it. <div class="customselectdiv custom-req" id="divcity" runat="server" visible="false"> <asp:dropdownlist id="ddlcity" runat="server" tabindex="10" class="customselect required" visible="false" autopostback="true" onselectedindexchanged="ddlcity_selectedindexchanged"></asp:dropdownlist> </div> and cities binding dropdown database. you're not going able add together 50000 records select box, i'd recommend looking city autocomplete 1 google offers. c# asp.net

javascript - parseInt changes the integer -

javascript - parseInt changes the integer - i trying pull number (72157648141531978), starts @ 21st character, out of title of page so: parseint(document.title.substring(21), 10); this returns string integer of 72157648141531980. can't seem figure out why changing lastly 2 numbers. help appreciated. according what javascript's max int? what's highest integer value number can go without losing precision? max value of integer 9007199254740992. i tried calculation on http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_parseint , can confirm problem. it looks issue parsing beyond max value , rounding lastly 2 figures. javascript integer substring parseint