Posts

php - Copy & Paste URL Link -

php - Copy & Paste URL Link - does know how re-create url of current page , "paste" url automatically href tag this: <a href="--paste here--">click</a> thanks lot. you utilize following: <?php echo '<a href="http://'. $_server['server_name'] . $_server['request_uri'].'">this page</a>; ?> altough not re-create paste should current url of page. http://php.net/manual/en/reserved.variables.server.php php url hyperlink copy

SQL 2008 R2 SP2 Linked Server - Exclude certain databases -

SQL 2008 R2 SP2 Linked Server - Exclude certain databases - i have linked server , exclude 4 databases in link. there way "hide" them? users access via advertisement groups in. revoke advertisement groups? i set databases offline , disappeared linked view. these there reference only, made sense. sql linked-server

PHP echo not displaying inside of HTML tags -

PHP echo not displaying inside of HTML <h3> tags - on page, have bunch of info fetched sql database via php pdo. $query=$pdo->prepare("select `balance`,`followers`,`following` `users` `username`=?"); $query->bindvalue(1,$logged); $query->execute(); $followerslist=$query->fetch(); $userbalance=$followerslist['balance']; ?> <div class="span4"> <h3> <?=$userbalance;?> </h3> </div> the above displays nothing. blank. however, when remove <h3> tags, works! if echo $userbalance; outside of <h3> block, works well. if alter $userbalance equal random text instead of info set sql table, works within <h3> block. reason refuses display info coming sql table. yet, whenever echo "followers" , "following" within same <h3> blocks, works. clear, "balance" numerical value. found problem! inside "bootstrap.css...

java - OneToMany and JoinColumn annotations is separate -

java - OneToMany and JoinColumn annotations is separate - i'm using hibernate 3.2.1. in entity class i've seen annotations @onetomany , @joincolumns used together. these mean in separate? instance mean if annotated our entity class follows: @entity @table(name = "player_account") public class playeraccount { @id @generatedvalue(strategy = generationtype.identity) @column(name = "id") private int id; @manytoone(targetentity = player.class, fetch = fetchtype.eager) //without @joincolumn private player player; //get, set } please see says hibernate documentation it: http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/ need 2.2.5.2. many-to-one section: @joincolumn attribute optional, default value(s) in 1 one, concatenation of name of relationship in owner side, _ (underscore), , name of primary key column in owned side. java spring hibernate spring-mvc

javascript - Google Visualization, can you assign the color of the slice based on a column's value? -

javascript - Google Visualization, can you assign the color of the slice based on a column's value? - i trying next assign color based on value, not working, assigning default values. methods works other chart types. bear in mind cannot utilize color in options because rows can come in different order. ideas? var info = new google.visualization.datatable(); data.addcolumn('string', 'status'); data.addcolumn('number', 'count'); data.addcolumn({type: 'string', role: 'style'}); data.addrow(['failure', 8,'color:#ee4a49']); data.addrow(['warning', 1,'color:#e3d157']); data.addrow(['success', 1,'color:#45b7af']); http://jsfiddle.net/zys27/15/ based on current api think may need preprocess info before passing google charts. var info = new google.visualization.datatable(); data.addcolumn('string', 'status'); data.addco...

javascript - Jquery Get Response Data Error -

javascript - Jquery Get Response Data Error - i have code calls buy.php , makes purchase , shows results. store.php <h4 class="result">result:</h4> function buy(id) { $.ajax({ method: "get", url: "buy.php?id="+id+"", success: function (data) { $(".result").html(data); } }); } buy.php (after many check finally) echo 'purchase successful!'; or echo 'purchase failed!'; when store.php calls buy.php this shows jquery makes request not buy.php page ( store.php ) , when phone call purchase function content on current page duplicates. why doing so? help? the url alternative ajax url , not url . javascript case-sensitive. function buy(id) { $.ajax({ method: "get", url: "buy.php?id="+id+"", // here ^ success: function (data) { $(...

javascript - get first word in java script websockets -

javascript - get first word in java script websockets - i using websockets in java script , string manipulation on message receive other end of websocket. strip off characters first word in message. illustration if message lets go party manipulate string lets . thinking go through string index index until nail first white space. not sure syntax in javascript. sound right or there improve way it? sorry if trivial quite new javascript. simple: var themessage = 'hello world!'; var thefirstword = themessage.split(' ')[0]; // 'hello' javascript string websocket substring