Tuesday, 15 February 2011

c - incompatible types in assignment of ‘int’ to ‘int [(((sizetype)(((ssizetype)m) -1)) 1)]’ -



c - incompatible types in assignment of ‘int’ to ‘int [(((sizetype)(((ssizetype)m) -1)) 1)]’ -

the next c code gives error:

incompatible types in assignment of ‘int’ ‘int [(((sizetype)(((ssizetype)m) -1)) 1)]’

on lines phone call recursive functions:

int mergesort(int arr[], int n) { if (n > 1) { int m = (int)(n / 2); int a1[m]; // array 1 --> 1 m int a2[n-m]; // array 2 --> m + 1 n int temp = m+1; (int = 0; < n; i++) { if (i == m) break; a1[i] = arr[i]; a2[i] = arr[temp++]; } a1 = mergesort(a1, m); //error happens here, assigning //integer integer array. a2 = mergesort(a2, n - m); arr = merge(a1, a2); } homecoming arr; }

what error mean?

there several errors:

c++ doesn't back upwards variable length arrays (a1[m]) - utilize std::vector instead. even if did, arrays can't reassigned, a1 =... illegal even if could, couldn't assign single int them. mergesort returns int (why that?)

c sorting

c++ - Using a function as the second argument of a 'for' loop -



c++ - Using a function as the second argument of a 'for' loop -

this question has reply here:

should iterate vector iterator or access operator? 4 answers

let's assume have next code:

for(std::vector<int>::iterator = vect.begin(); != vect.end(); ++i) { //do smth here }

is vect.end() going re-called each iteration? if yes, how should iterate vector then?

having function called within logical look (second argument of loop) bad practice?

yes, will. however, if compiler can determine value returned vect.end() never change, of course of study optimize out. however, if want avoid doing sure, alter code to:

for(std::vector<int>::iterator = vect.begin(), end = vect.end(); != end; ++i) { //do smth here }

you should, of course, create sure code doesn't rely on end() beingness checked on every iteration. example, if doing vect.erase(i) on elements in vector, need create sure got new end() iterator every time (and create sure assign result of erase i).

c++

Perl hash of arrays column name as keys -



Perl hash of arrays column name as keys -

i trying create hash of arrays using result of sql query: eg.

column1:

1 2 3 4

column2:

a b c d

desired result:

my %by_col = ( 'column1'=>['1','2','3','4'], 'column2'=>['a','b','c','d'], );

i able result array of hashes using:

while ($hash_ref = $sth->fetchrow_hashref()) { force @$hash_array_ref, { %$hash_ref }; }

but can't figure out other way round.

thanks!

while (my $row = $sth->fetchrow_hashref()) { $col_name (keys(%$row)) { force @{ $by_col{$col_name} }, $row->{$col_name}; } }

arrays perl hash

using google map API or usual API for compiling android project in V2? -



using google map API or usual API for compiling android project in V2? -

in google map android v1 project, should compiled google maps api not ordinary api. wonder if same story google map android v2 also?

no, maps v2 has no dependency on original maps sdk add-on. welcome set plain android build target on project , skip <uses-library> element. maps v2 has own set of dependencies, notably on opengl es 2.0+ , existence of play services framework.

android google-maps

sql server - ms sql smo:how to script foreign key WITHOUT "Alter table MyTable check constraint MyForeignKey" -



sql server - ms sql smo:how to script foreign key WITHOUT "Alter table MyTable check constraint MyForeignKey" -

i see server 2008 generated script:

alter table [mytable] check add together constraint [fk_mytable_id] foreign key([id]) references [mytable2] ([id]) on update cascade on delete cascade go alter table mytable check constraint [fk_mytable_id]

last statement redundant, script works fine without it. generate scripts of foreign keys using smo , want avoid lastly string. can it?

the check constraint section ensures constraint enabled. shouldn't necessary should enabled initial statement.

this question looks similar on stackoverflow: t-sql foreign key check constraint

sql-server foreign-keys smo

First Image in Wordpress Post Will Not Center -



First Image in Wordpress Post Will Not Center -

in of posts (not of them), first image keeps floating right event though have set in <center></center> tags. can help me figure out why happening. illustration here: http://renegadechicks.com/twelve-inspiring-centerpieces-3

below css:

/* theme name: styleweekly theme uri: http://cloverthemes.com/ author: http://cloverthemes.com/ author uri: http://cloverthemes.com/ description: style weekly version: 1.2 tags: magazine, beauty, style, fashion */ /* =reset default browser css. based on work eric meyer: http://meyerweb.com/eric/tools/css/reset/index.html -------------------------------webs------------------------------- */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pbackgre, a, abbr, acronym, address, big, cite, code, del, dfn, font, ins, kbd, q, s, samp, small, strike, sub, sup, tt, var, dl, dt, dd, ol, ul, li,article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section,fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, br { border: 0; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; margin: 0; outline: 0; padding: 0; vertical-align: baseline; } :focus { /* remember define focus styles! */ outline: 0; } body { line-height: 1; } ol, ul { list-style: none; } table { /* tables still need 'cellspacing="0"' in markup */ border-collapse: separate; border-spacing: 0; } caption, th, td { font-weight: normal; text-align: left; } blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; } img { border:5px solid #fbdddf; } img.centered, .aligncenter, div.aligncenter { display: block; margin-left: auto; margin-right: auto; } img.alignright { padding: 4px; margin: 0 0 2px 7px; display: inline; } img.alignleft { padding: 4px;im margin: 0 7px 2px 0; display: inline; } .alignright { float: right; } .alignleft { float: left; } .box img { display: block; margin: auto; } img { display: block; width: auto; margin: auto; } little {font-size:11px;} /* floating ---------------------------------------------------------------- */ .alignleft { float: left; margin: 0 10px 10px 0; } .alignright { float: right; margin: 0 0 0 10px; } .aligncenter { display: block; margin: 0 auto 10px; } .left{float:left;} .right{float:right;} /* clear floats ---------------------------------------------------------------- */ .clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } * html .clearfix { zoom: 1; } /* ie6 */ *:first-child+html .clearfix { zoom: 1; } /* ie7 */ /* global -------------------------------------------------------------- */ body { color: #444; font-family: "segoe ui","helvetica","arial",sans-serif; font-size: 16px; line-height: 1.5em; background: #000 url("images/graphicbg.jpg") no-repeat top center; } #inner { background-color: #fff; border: 3px solid #f10c6a; padding: 20px} #logos { display:none; } #linkwithin_logo_0 { display: none; padding-below: 5px; } #post-131 .st_facebook_large, #post-131 .st_twitter_large, #post-131 .st_pinterest_large, #post-131 .st_linkedin_large, #post-131 .st_email_large, #post-131 .st_sharethis_large, #post-131 .st_fblike_large {display: none;} .stmainservices st-facebook-counter { padding-bottom:15px; } .c-1 { float: left; padding-top: 20px;width:650px} .c-1 .bd { background: none} h1,h2,h3,h4,h5,h6 {color:#cc0066; font-weight: normal;font-family:georgia,"times new roman",times,serif; padding-bottom: 10px; } h1 { font-size: 40px; } h2 { font-size: 30px; } h3 { font-size: 30px; padding-top: 5px; } h4 { font-size: 30px; } h5,h6 { font-size: 30px; } pre,code,kbd,samp,tt {mos font: 16px/1.385 "courier new", monospace, serif; } /* hyperlinks ------------------------------------------------------------ */ a, a:visited { } a:hover { text-decoration: underline; } img { border: 5px solid #fbdddf; } .imagelogo { border:none; } h1 a,h2 a,h3 a,h4 a, h5 a, h6 { text-decoration: none; color: # } h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover { text-decoration: underline; color: #0ac6f5; } /* input form & textarea ---------------------------------------------------------------- */ input, textarea { border-color: #ccc #efefef #efefef #ccc; border-width: 1px; border-style: solid; color: #777; padding: 6px; } input:focus { background: #ffffff; } /* color -------------------------------------------------------------- */ a, a:visited, #logo .site-title { color: #cc0066;border:none !important; } #nav, #nav li li a, #nav li li a:link, #nav li li a:visited{ text-transform:uppercase; } .home-columns h3, .home-columns h4, a:hover {color: #0ac6f5;} .home-columns {text-decoration:none;} #nav li {color:#000000;} #nav li a:hover { color:#0ac6f5; } #nav li li a:hover, #nav li li a:active{background:rgba(0, 0, 0, 0.50);text-transform: uppercase;} #nav li li a, #nav li li a:link, #nav li li a:visited { } #nav { } #nav ul li{ } #nav ul li { color: #fff} #nav ul li ul li,#nav ul li ul li { border: none; } /* padding ---------------------------------------------------------------- */ .pl20{padding-left:20px;} .pl10{padding-left:10px;} .pb10{padding-bottom:10px;} .pb20{padding-bottom:20px;} .pr20{padding-right:20px;} .bd{background: url("images/dot.png") repeat-x scroll left bottom transparent;} /* header ---------------------------------------------------------------- */ #header { } #header .wrap { /*background: url("images/topbanner.png") no-repeat scroll 350px 43px transparent;*/ margin: 0 auto; overflow: hidden; width:1012px; padding: 40px 0 20px 0px; border-bottom: 1px solid #fff; } #logo h1, h1{ font-size: 35px; line-height: 40px; } #logo { float:left; } #logo .site-title , .site-title a{ color: #009999; font-weight: normal; font-family: "georgia"; display: block; float: left; font-size: 48px; line-height: 50px; margin: 0; padding: 10px 0 0; text-decoration: none; width: 380px; } #logo .site-title a:hover { text-decoration:none; } #description { color: #ffffff; font-size: 12px; font-style: italic; font-weight: normal; margin: 0; padding: 0 0 0 10px; display: block; height: 0; overflow: hidden; width: 0; } #header-right{ padding: 0px 0 0; float:right; width:270px; } /* nav ---------------------------------------------------------------- */ #nav{border-bottom-style: inherit;height: 36px; text-transform: uppercase; width:1012px; } .menu-main-container, .menu{margin:0 auto; } #nav li .sf-sub-indicator{ width: 11px; height: 32px; top: 18px; right: 0px; text-indent: -9999px; overflow: hidden; position: absolute; } #nav li a:hover .sf-sub-indicator{ } #nav li li .sf-sub-indicator { top: 12px; } #nav ul { float: left; list-style: none; margin: 0; } #nav .sub-menu { } #nav .sub-menu .sub-menu{ background: transparent !important; } #nav li { float: left; list-style: none; padding: 0; } #nav li { display: block; font-family: helvetica,sans-serif; text-transform: uppercase; font-size: 14px; font-weight: 400; line-height: 20px; margin: 0; padding: 11px 19px; position: relative; text-decoration: none; } #nav .current-menu-item { } #nav li a:hover, #nav li a:active { } #nav li li a, #nav li li a:link, #nav li li a:visited { font-size:12px; line-height: 20px; width: 132px; margin: 0; padding:7px 21px 7px 13px; text-transform:uppercase; position: relative; } #nav li li a:hover, #nav li li a:active {color:#fff; } #nav li ul { z-index: 9999; position: absolute; left: -999em; height: auto; width: 166px; margin: 0; padding: 0; background:#c06; text-transform:uppercase; } #nav li ul ul { margin: -35px 0 0 166px; } #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul { left: -999em; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { left: auto; } #nav li:hover, #nav li.sfhover { position: static; } #nav li span { color:#999; display: block; font-size: 10px; line-height: 14px; } /* main ---------------------------------------------------------------- */ #wrapper{margin:0 auto; width:1012px; padding:0px;}h2 #home-third-left{width:660px;} #home-sidebar{width:300px; float:right;} #content-sidebar{width:980px;} #content{width:660px; float:left; min-height:600px;} /* homepage elements ---------------------------------------------------------------- */ #home-top .a-left ul{margin-left:-3px;} #home-top .a-left li{float:left; padding-left:4px;} #home-second h3{font-size:32px;} #home-top .entry-excerpt p{font-size:13px; font-family:georgia,"times new roman",times,serif; line-height:22px;width:205px;float:left} #home-top {padding-bottom: 36px;} .a-left h3 {padding:10px 0px 10px 0px;font-family: 'cookie', cursive;} .a-left h3 a{color:#000000; font-size:45px;} .a-left{padding-bottom: 5px;} .a-left{width:660px;} .a-right p{padding:0 40px 10px 10px;} .a-right{width:300px; } .home-post{padding-bottom:15px;margin-bottom:20px; min-height: 135px !important;font-size: 13px;line-height: 22px;} .home-category { float:left; width:635px; } .home-category h2{font-size:40px;padding-bottom:20px;} .small{font-size:10px; color:#999;} .b-1{width:638px; float:left; padding-right: 4px;padding-top: 25px;} .b-2{width:400px; float:left;} .firstpost{padding-bottom:10px;margin-bottom:5px;} .firstpost .entry-excerpt {font-size: 13px;line-height: 22px} .b-3{width:445px;float:right; /*font-size:11px; line-height:18px;*/} .b-1 h3 {line-height:28px;} .c-1-post {width:200px; margin-left: 20px;margin-bottom:5px} .c-1 h3{font-size:13px !important;padding-top:5px !important;line-height:20px;padding-bottom: 0px !important;} .c-2-1{width:260px;} .c-2-1 h3, .c-2-2 h3, .c-3 h3, .d-1 h3{font-size:26px; padding-bottom:10px;} .c-2-2{width:380px; } .c-2-2-post{margin-bottom: 15px;min-height: 100px !important;padding-bottom: 15px;} .c-2-2 p{line-height:22px;font-size:13px} .c-3-left, .c-3-right{width:320px;} .featured-left{float:left; width:320px;} .block-small-item{ height: 90px; margin-bottom: 13px; overflow: hidden; padding-bottom: 13px; width:320px} .block-meta { color: #888888; display: block; font-size: 11px; margin-bottom: 4px; } .block-meta { color: #888888 !important; } .block-meta a:hover { color: #333333 !important; text-decoration: none; } /* post page style ---------------------------------------------------------------- */ .breadcrumbs {background: none repeat scroll 0 0 #f6f6f6;color: #666666;font-size: 11px;margin: 0 0 10px;padding: 3px 15px; display:none;} .entry-content p{color: #464646;font-family: georgia,sans-serif; margin: 0 0 16px; line-height:24px; font-size: 13px;} .entry-title{margin-bottom:13px;margin-top: 3px;background: url("images/dot.png") repeat-x scroll left bottom transparent;} .entry-title h1 { color: #000000!important; } .entry-content h2, .entry-content h3{ font-size: 32px;} .entry-content ol, .entry-content ul {margin: 0;padding: 0 0 20px;} .entry-content ol {margin: 0;} .entry-content ul li {list-style-type: square;margin: 0 0 0 10px;} .entry-content ol li {list-style: decimal outside none;margin: 0 0 0 25px;} .entry-content ol ol, .entry-content ul ul {padding: 0;} .entry-content li{padding:0 0 5px 0;} .entry-content .wp-caption-text{color: #666666;font-size: 11px;font-style: italic;line-height: 16px;margin: 0;text-align: center;} .post-meta { background-color: #f6f6f6; border-radius: 5px 5px 5px 5px; clear: both; color: #666666; font-size: 11px; padding: 7px 10px 5px; margin-bottom: 15px; display: none; } .entry-content clearfix { padding-top: 10px; } .post-info { font-size: 12px; margin-bottom: 10px; display: inline; float: left; padding-bottom: 15px; font-family: verdana; color: black; } .linkwithin_posts { background: none !important; border: none !important; padding-right: 5px !important; } .linkwithin_hook { background: none repeat scroll 0 0 transparent; color: #; font-weight: bold; letter-spacing: -0.25px; line-height: 45px; margin-bottom: 10px; } .linkwithin_text { color: #cc0066; font-size: 38px; padding-left: 10px; } .linkwithin_title { color: #464646!important; font-family: verdana, sans-serif !important; font-size: 12px !important; line-height: 14px !important; text-decoration: none; } .linkwithin_title:hover { color: #c06!important; text-decoration: underline !important; } .post-info .post-author { background: url("images/post-author.png") no-repeat scroll left center transparent; padding: 5px 16px 3px 61px; font-size: 12px; font-style: italic; } .post-info .time { font-style:italic; }en .post-comments { background: url("images/post-comments.png") no-repeat scroll left center transparent; padding: 6px 20px 6px 40px; } #disqus_thread { padding-top: 50px; } .cat{ background: url("images/icon-categories.png") no-repeat scroll left top transparent; padding: 3px 0 3px 22px; display: none; } .tags{ background: url("images/icon-tags.png") no-repeat scroll left top transparent; margin: 0 0 0 10px; padding: 3px 0 3px 20px; display: none; } blockquote {background: url(images/q.png) no-repeat;border: none;margin: 5px 15px;padding: 15px 20px 10px 40px;} blockquote p {color: #666;font-style: italic;} .page-template-page-fullwidth-php #content{width:980px;} #social{width:660px; padding:10px 0 5px; display:none;} /* pre- next ---------------------------------------------------------------- */ #nav-below {padding-bottom:20px;} .nav-previous a, .nav-next {background: none repeat scroll 0 0 #0197b2;color: #ffffff;float: left;width: 100px; font-weight: bold;display: block;font-size:12px;line-height:26px;font-family:arial,verdana,sans-serif; height: 25px;text-align: center;width: 80px;overflow: hidden;} .nav-previous a:hover, .nav-next a:hover{background:#009999;} #nav-below .nav-previous a, #nav-below .nav-next { padding: 0 10px; width: 45%; } .nav-previous { float: right; } .nav-next { float: left; } .nav-next a:hover, .nav-previous a:hover { text-decoration: none; } /* related posts ---------------------------------------------------------------- */ .related-posts{ font-size:12px; line-height:18px;} .relateimage img {border: 1px solid #eeeeee; height: 150px; width: 150px;} .listing {float: left; padding-left: 20px; width: 150px; } .related-posts-title { color: #0091a8; margin:20px 0 10px 22px; padding-bottom: 15px;} /* sidebar ---------------------------------------------------------------- */ #sidebar{ display: inline; float: right; line-height: 20px; width: 300px; } #sidebar h4, #latest-posts h4 { /*background-color: #0ac6f5;*/ background: url("images/banner.jpg") no-repeat top center; color: #fff; font-size: 36px; text-align:center; line-height: 38px; padding: 7px 0px 0px 3px; margin: 0 0 5px; } #sidebar p{margin-bottom:10px;} .widget-wrap { margin: 0 0 10px; } .widget{ margin: 0 0 30px; } .widget-area ul li { border-bottom: 1px dotted #cccccc; list-style-type: none; padding: 0 0 5px 5px; word-wrap: break-word; font-size: 13px; } .widget-area li li, .widget-area li li li{ border-bottom: 0 none; list-style: square outside none; margin: 0 0 0 20px; padding: 5px 0 0 0; } #sidebar .flickr-photos li{ float: left; background:none; list-style-type: none; padding:8px; } #sidebar .twitter h4{ background: url("images/tt.png") no-repeat scroll left center transparent; line-height: 30px; padding: 0 0 0 40px; } #sidebar_left{ float: left; width:160px; #sidebar_left { text-decoration:none !important;} } a:-webkit-any-link { text-decoration:none !important;} } #header-right a:-webkit-any-link { padding-right: 15px; } #sidebar_right{ float: right; width:120px; } .twitter h4 { background: url("images/tt.png") no-repeat scroll left center transparent; padding: 0 0 6px 35px;} /* archive ---------------------------------------------------------------- */ .archive .post img, .search .post img {width:150px; height:auto;} #archive-title {padding-bottom:15px; font-size:22px; display:none;} /* search ---------------------------------------------------------------- */ input[type="button"], input[type="submit"] { border: none;color: #ffffff;cursor: pointer;font-size: 13px;font-weight: normal;text-decoration: none; } input[type="button"]:hover, input[type="submit"]:hover {background-color: #565656; } input, select, textarea,.sticky, .taxonomy-description {border: 1px solid #dddddd;} #search {width: 265px; padding-left: 18px; padding-top: 5px; padding-bottom: 10px;} #search .s { background: #c06; border: medium none; color: #fff; font-size: 12px; padding: 5px 8px; width: 157px;float: left; } #search .search-submit{background: url("images/s.png") no-repeat scroll center center transparent; border: medium none; cursor: pointer; float: right; height: 28px; margin: 0; right: 0; top: 0; width: 39px;} #search div { background: #c06; height: 27px; position: relative; border: 2px solid #0ac6f5; } /* pagination ---------------------------------------------------------------- */ .ct-paginate {padding: 10px 0 20px 0; overflow:hidden; clear:both; font-family: arial;} .ct-paginate {border:1px solid #eee; margin-right:5px; padding:4px 8px; text-align:center; text-decoration:none;} .ct-paginate .ct-title {color:#555; margin-right:4px;} .ct-paginate .ct-gap {color:#999; margin-right:4px;} .ct-paginate a:hover, .ct-paginate a:active, .ct-paginate .ct-current {color:#fff; background: url("images/navbg.png") repeat scroll 0 0 #333333;border:1px solid #ddd; margin-right:5px;padding:4px 8px;} /* footer ---------------------------------------------------------------- */ .footer-info {padding:30px 0;} .footer-info .right{width:1012px;text-align:center;} /* =comments ------------------------------------------------------------------ */ #comments {padding:20px 0 0 0;} #comments h3,#respond h4{color: #0091a8; } #comments a{ text-decoration:none; } #comments a:hover{ text-decoration:underline; } #comments input:hover, #commentstextarea:hover{ background: #f5f5f5; } #commentform { margin: 5px 10px 0px 0px; } #commentform textarea { width: 90%; padding: 5px; font-size:13px } #respond:after { content: "."; display: block; height: 0px; clear: both; visibility: hidden; } #commentform p { margin: 20px 0; } #commentform #submit, .wpcf7-submit{ -moz-box-shadow:inset 0px 1px 0px 0px #fbafe3; -webkit-box-shadow:inset 0px 1px 0px 0px #fbafe3; box-shadow:inset 0px 1px 0px 0px #fbafe3; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f03c96), color-stop(1, #cc0066) ); background:-moz-linear-gradient( center top, #f03c96 5%, #cc0066 100% ); filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#f03c96', endcolorstr='#cc0066'); background-color:#f03c96; -moz-border-radius:17px; -webkit-border-radius:17px; border-radius:17px; border:1px solid #ee1eb5; display:inline-block; color:#ffffff; font-family:arial; font-size:13px; padding:6px 24px; text-decoration:none; text-shadow:1px 1px 0px #ff0080; } #commentform #submit:hover, .wpcf7-submit:hover { background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ef027d), color-stop(1, #ff5bb0) ); background:-moz-linear-gradient( center top, #ef027d 5%, #ff5bb0 100% ); filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#ef027d', endcolorstr='#ff5bb0'); background-color:#ef027d; } #commentform #submit:active { position:relative; top:1px; } .commentlist { margin: 0px; padding: 0px; } .commentlist ol { margin: 0px; padding: 10px; } .commentlist li { margin: 15px 0; padding:15px; list-style: none; } .commentlist li ul li { margin: 10px; } .commentlist p { margin: 10px 5px 10px 0px; padding: 0px; } .commentlist li ul li { font-size: 12px; } .commentlist li .avatar { background-color: #ffffff; border: 1px solid #eeeeee; box-shadow: 0 0 2px rgba(0, 0, 0, 0.1); float: left; margin: 0 10px 0 0; padding: 3px; } .commentlist cite, .commentlist cite { font-style: normal; font-size: 14px; } .commentlist p { } .commentmetadata { font-weight: normal; padding:5px 0 0 0; } .alt { margin: 0px; padding: 10px; } .children { margin: 0px; padding: 0px; } .nocomments { text-align: center; margin: 0px; padding: 0px; } .commentmetadata { font-size: 11px; margin: 0px; display: block; } .navigation { display: block; text-align: center; margin-top: 10px; margin-bottom: 40px; } .thread-alt { background: #ffffff; margin: 0px; padding: 0px; } .thread-even { background: #ffffff; margin: 0px; padding: 0px; } .depth-1 { border: 1px solid #bbbbbb; margin: 0px; padding: 0px; } .even, .alt { border:1px solid #eeeeee; border-radius: 5px 5px 5px 5px; } em.date, .comment strong { font-weight:normal; color:#9e825f; line-height:24px; display:block; font-style: normal; } /* socialmedia ---------------------------------------------------------------- */ /* additional ---------------------------------------------------------------- */ /* styling posts ---------------------------------------------------------------- */ .one_half, .one_third, .two_third, .three_fourth, .one_fourth { float: left; line-height: 21px; margin-bottom: 20px; margin-right: 4%; } .one_half { width: 48%; } .one_third { width: 30.6%; } .two_third { width: 65.3%; } .one_fourth { width: 22%; } .three_fourth { width: 74%; } .last { clear: right; margin-right: 0 !important; } .dropcap { color: #383838; float: left; font-size: 40px; margin-right: 6px; padding-top: 7px; position: relative; text-transform: uppercase; top: 5px; } .highlight1 { background: none repeat scroll 0 0 #f6f67a; } .highlight2 { background: none repeat scroll 0 0 #000000; color: #cccccc; } .mosaic-block { float:left; position:relative; overflow:hidden; width:210px; height:120px; /*background:#111 url(images/progress.gif) no-repeat center center; -webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5);*/ border-radius: 15px; } .mosaic-backdrop { display:none; position:absolute; top:0; height:100%; width:100%; /*background:#111;*/ } .mosaic-overlay { display:none; z-index:5; position:absolute; width:100%; height:100%; background:#111; } .bar .mosaic-overlay { bottom:-100px; height:40px; background:url(images/bg-black.png); } .details{ margin:3px 10px; color:#eee; font-size:11px;} .footer-links-copyright, .footer-links-copyright a{ color:#0ac6f5; font-size:11px;padding-right:10px;} .attachment1{ text-align:center;} #content .gallery img, #gallery-listing img{background: none repeat scroll 0 0 #dddddd;border: 5px solid #ffffff; box-shadow: 0 1px 2px #cccccc;margin: 5px; padding: 1px; max-width:160px; height:auto;} #content .cb_pin_images { margin-left: auto !important; margin-right: auto !important; } .entry-content img {max-width:100%; height:auto; border: 5px solid #fbdddf;} .first-thumb img { box-shadow:5px 5px 1px #888;} .hfeed img.thumbnail { float: left; height: 160px; } .archive .hfeed article { margin-left: 20px; float:left; width: 470px;} }

i changed html first image

<center><a href="http://renegadechicks.com/wp-content/uploads/2013/02/centerpiece15.jpg <img class="size-full wp-image-10673 aligncenter" alt="centerpiece15" src="http://renegadechicks.com/wp-content/uploads/2013/02/centerpiece15.jpg" width="361" height="559"> </a></center>

to in chrome:

<p style="clear: both;"> <a href="http://renegadechicks.com/wp-content/uploads/2013/02/centerpiece15.jpg"> <img class="size-full wp-image-10673 aligncenter" alt="centerpiece15" src="http://renegadechicks.com/wp-content/uploads/2013/02/centerpiece15.jpg" width="361" height="559"> </a> </p>

and seemed center fine. reason had toggle text-decoration on tag off on work...

basically, replaced < center > tags < p> tags , made sure clear floats set before hand.

wordpress image css-float centering

sql server - Substring - T-SQL -



sql server - Substring - T-SQL -

i have string get's inserted table. size , content of string varies.

i want characters between 2 known words (_ part1id = , _ part2id =).

i want in between these 2 strings whole string.

i have tried this approach getting before _ part2id =.

anyone know how create work in given conditions?

thank you

try:

with (select 'abc_ part1id =efg_ part2id =jkl' a) select a, substring(a, charindex('_ part1id =',a)+len('_ part1id ='), charindex('_ part2id =',a)-charindex('_ part1id =',a)-len('_ part1id ='))

sql sql-server sql-server-2008 tsql