0 0 0 0 0 0 <p>{"An error occurred while making the HTTP request to https:xxx/webservice/SOAP/2.0/service. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."}</p> <p> </p> <p>Error while try to call webservice.</p> <p>Do I have to add any certificate. If yes,Which one and steps to install</p> 0 <p>I have simple search using PHP and MySQL</p> <p>it works perfectly for English text ,but for Arabic text will not retrieve any data with out any Error</p> <p>while executing same MySQL on Database "PhpMyAdmin" it works perfectly</p> <p>Result.PHP</p> <hr> <pre><code>&lt;?php if(!isset($_POST["search"])){$_POST["search"]="";} echo $search=$_POST["search"]; $servername = "localhost"; $username = "aramtryf_laravel"; $password = "Reha@2015"; $dbname = "aramtryf_laravel"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn-&gt;connect_error) { die("Connection failed: " . $conn-&gt;connect_error); } $sSQL= 'SET CHARACTER SET utf8'; mysqli_query($conn,$sSQL); $sql = " SELECT * FROM oldorgs WHERE org_name like '%$search%' "; $result = $conn-&gt;query($sql); if ($result-&gt;num_rows &gt; 0) { // output data of each row while($row = $result-&gt;fetch_assoc()) { echo "&lt;tr&gt; &lt;th scope='row'&gt;".$row["org_name"]."&lt;/th&gt; &lt;td&gt;".$row["gov"]."&lt;/td&gt; &lt;td&gt;".$row["sector"]."&lt;/td&gt; &lt;td&gt;".$row["email"]."&lt;/td&gt; &lt;/tr&gt;"; } } $conn-&gt;close(); ?&gt; </code></pre> 0 <p>Could you please tell me Why I am not getting updated value in angular js .I am always getting “undefined” ?? Why I do like this here is my code</p> <p><a href="http://plnkr.co/edit/Utsg7Zr8fsg7zzX5Naib?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/Utsg7Zr8fsg7zzX5Naib?p=preview</a> i am adding custom validation using custom directive</p> <p>Requirement </p> <blockquote> <p>It should display error when user enter “First” name it check “last name” length if it less then <code>4</code> .it should show error.Same in last name if user enter “last name” then check “first name” length is less than 4 .if yes it should show error</p> </blockquote> <p>I do the following steps</p> <ol> <li>Type "a" in first field (it become red which is fine).</li> <li>but when I type "abcderff" in last name why <strong>first name is red</strong> ??</li> </ol> <p>.directive("testfirst", function() { return { restrict: "A", require: 'ngModel',</p> <pre><code> link: function(scope, element, attributes, modelVal) { modelVal.$validators.testfirst= function(val) { console.log(attributes.last) console.log((attributes.last &amp;&amp; attributes.last.length &lt; 4)); if(val.length &gt; 0 &amp;&amp; !(attributes.last &amp;&amp; attributes.last.length &lt; 4)){ return false } return true }; scope.$watch("val", function() { modelVal.$validate(); }); } }; }).directive("testlast", function() { return { restrict: "A", require: 'ngModel', link: function(scope, element, attributes, modelVal) { modelVal.$validators.testlast= function(val) { if(val.length &gt; 0 &amp;&amp; !(attributes.first &amp;&amp; attributes.first.length &lt; 4)){ return false } return true }; scope.$watch("val", function() { modelVal.$validate(); }); } }; }); </code></pre> 0 0 <p>I am trying to save some data using GraphQL which contains backslash in its input.<br> For example, while creating a table I want to keep table name as <strong>IndianCars</strong></p> <p>Below is the body of HTTP post call:</p> <pre><code>{"query":"mutation { createTable(input:[{name:"IndianCars"}]) { id } }"} </code></pre> <p><strong>Note: name is a string that's the reason I have added "" to escape.</strong></p> <p>But GraphQL is throwing an error: </p> <p><strong>'SyntaxError: Unexpected token ' in JSON</strong> </p> <p>I have tried with replacing it, </p> <pre><code>value.replace(//g, ''); </code></pre> <p>but I want to create the table with the exact same name as <strong>IndianCars</strong><br> I just want to escape it from the HTTP post-call, but in DB it must save the exact input that we are sending.</p> 0 0 0 0 <p>When I use an iterator to go over elements of an entry set, I can't reference elements that have been previously been iterated over. Here's the more specific problem:</p> <pre><code>public void adjSetter(HashMap&lt;ArrayList&lt;Integer&gt;,miniSquare&gt; mp) { Iterator it = mp.entrySet().iterator(); while (it.hasNext()) { System.out.println("Hi~!"); Map.Entry pair = (Map.Entry)it.next(); ArrayList&lt;Integer&gt; lis=(ArrayList&lt;Integer&gt;)pair.getKey(); System.out.println(lis.get(0) + " " + lis.get(1) + "Yerr"); miniSquare minSqua=(miniSquare)pair.getValue(); if((minSqua.yCord!=600)){ lis.set(1,minSqua.yCord+50); minSqua.topSquare=mp.get(lis); System.out.println("This Square is " + minSqua.xCord + " " +minSqua.yCord + " and its top square is " + lis.get(0) + " " + lis.get(1) + " And it's actually " + minSqua.topSquare.xCord + " " + minSqua.topSquare.yCord ); } if(minSqua.yCord!=250){ lis.set(1,minSqua.yCord-50); minSqua.bottomSquare=mp.get(lis); System.out.println("This Square is " + minSqua.xCord + " " + minSqua.yCord + " and its bottom square is " + lis.get(0) + " " + lis.get(1) + " And it's actually " + minSqua.bottomSquare.xCord + " " + minSqua.bottomSquare.yCord ); } if(minSqua.xCord!=550){ lis.set(1,minSqua.yCord); lis.set(0,minSqua.xCord+50); minSqua.rightSquare=mp.get(lis); System.out.println("This Square is " + minSqua.xCord + " " + minSqua.yCord + " and its right square is " + lis.get(0) + " " + lis.get(1) + " And it's actually " + minSqua.rightSquare.xCord + " " + minSqua.rightSquare.yCord ); lis.set(0,450); lis.set(1,450); //The error line System.out.println(mp.get(lis).xCord+ "Yerd");} if(minSqua.xCord!=200){ lis.set(1,minSqua.yCord); lis.set(0,minSqua.xCord-50); minSqua.leftSquare=mp.get(lis); System.out.println("This Square is " + minSqua.xCord + " " + minSqua.yCord + " and its left square is " + lis.get(0) + " " + lis.get(1) + " And it's actually " + minSqua.leftSquare.xCord + " " + minSqua.leftSquare.yCord );// This line throws a null pointer exception if the other problem line is deleted } } } </code></pre> <p>After going through the element with key (450,450), the line</p> <pre><code>lis.set(0,450); lis.set(1,450); </code></pre> <p>yields a null pointer exception. Can anyone help understand how to fix this, or even what the problem really is? I'm sorry if there's insufficent information as is or if the code is hard to read.</p> 0 <p>I just dont want any user will logout from website after once they will login ( now i am facing some problem that user will logout after sometime )</p> <p>here is my code (login.php)</p> <pre><code>if(isset($_POST['login'])){ $user_name = mysql_real_escape_string($_POST['user_name']); $user_pass = mysql_real_escape_string($_POST['user_pass']); $user_pass = md5($user_pass); $admin_query = "select * from admin_login where user_name='$user_name' AND user_pass='$user_pass'"; $run = mysql_query($admin_query); if(mysql_num_rows($run)&gt;0){ $_SESSION['time_user_name']=$user_name; echo "&lt;script&gt;window.open('index.php','_self')&lt;/script&gt;"; } else { echo "&lt;script&gt;alert('User name or password is incorrect')&lt;/script&gt;"; } </code></pre> <p>}</p> <p><strong>header.php</strong> </p> <pre><code>session_start(); if(!isset($_SESSION['time_user_name'])){ header("location: login.php"); }else { include_once('connect.php'); include_once('function.php'); $user_real_name = $_SESSION['time_user_name']; $sql = "select * from admin_login Where user_name = '$user_real_name'"; $result = mysqli_query($con, $sql); while($row = mysqli_fetch_assoc($result)) { $user_real_id = $row["user_id"]; $user_real_email = $row["email"]; $role = $row["role"]; } </code></pre> <p>I am not getting where to set a time and prevent the logout , any clue </p> 0 <p>I'm new to react native. i'm working on navigation. the problem is in header text is not getting in center. i have try this </p> <pre><code>static navigationOptions = { title: "Help", alignSelf: 'center', marginLeft: 50, headerLayoutPreset: 'center', textAlign: 'center', justifyContent:"center", headerStyle: { backgroundColor: '#a01b1b', textAlign: 'center', headerLayoutPreset: 'center', justifyContent:"center", }, </code></pre> 0 <p>i have two tables, <strong>Student table</strong> which have column (id, family_id,name,class,section) <strong>Family table</strong> which have column (family_id, mobile_no, profession)</p> <p>-- i have created two models. <strong>student model:</strong></p> <pre><code>class student extends Model { } </code></pre> <p>and <strong>family model</strong></p> <pre><code>class family extends Model { public function student() { return $this-&gt;hasMany('Appstudent'); } } </code></pre> <p>-- i am able to show all data from student table, my controller is:</p> <pre><code>public function index() { $finddata = student::orderBy('id', 'asc')-&gt;get(); return view('students.index')-&gt;with('finddata', $finddata); } </code></pre> <p>-- <strong>what i tried</strong> in family model:</p> <p>return $this->hasMany('Appstudents');</p> <p><strong>what i want;</strong></p> <ul> <li>i want to connect family model with student model..</li> <li>index page will have all students name only. which i have already done</li> <li>when i click on student name it should show, all information about particular student, and his family information. right now it's only showing information from student table.</li> </ul> 0 0 0 <p>The script is supposed to extract reviews of some product on amazon and store it in a text file "userReviews.txt". </p> <p>Errors im getting: Error in if (grepl("&lt;|>", x)) { : argument is of length zero Error in eval(lhs, parent, parent) : object 'productPage' not found Error in eval(lhs, parent, parent) : object 'productPage' not found Error in writeLines(c(title), fileConn) : invalid 'text' argument Error in eval(lhs, parent, parent) : object 'productPage' not found Error in eval(lhs, parent, parent) : object 'productPage' not found Error: object 'userReviewsPage' not found Error in userReviewsPage : object 'userReviewsPage' not found</p> <p>R script:</p> <pre><code>library("rvest") library("xml2") library("methods") library("stringr") #myArgs is reference to the url of the amazon product. myArgs &lt;- commandArgs(trailingOnly = TRUE) productPage &lt;- read_html(myArgs) #productPage &lt;- read_html('http://www.amazon.in/Apple-Macbook-MD101HN-Mavericks-Graphics/dp/B00DKMCB20/ref=sr_1_1?ie=UTF8&amp;qid=1465156754&amp;sr=8-1&amp;keywords=mac+book') #specs &lt;- productPage %&gt;% html_nodes(".col1 .label") %&gt;% html_text() #capture.output(productPage %&gt;% html_nodes(".col1 .label") %&gt;% html_text(), file="specs.txt",append=FALSE); #print(specs) #capture.output(productPage %&gt;% html_node("#title_feature_div") %&gt;% html_text(), file="product-title.txt", append=FALSE) capture.output(productPage %&gt;% html_nodes(".col1 td") %&gt;% html_text(), file="specs.txt",append=FALSE); #scrae title title &lt;- NA while(is.na(title)) { title &lt;- productPage %&gt;% html_node("#revMHLContainer h2") %&gt;% html_text() print(title) } #write title #NOTE this file should already exist fileConn&lt;-file("product-title.txt") writeLines(c(title), fileConn) close(fileConn) #scrape specifications # specifications &lt;- productPage %&gt;% html_node(xpath='//*[@id="prodDetails"]/div[2]/div[1]/div/div[2]/div/div/table') %&gt;% html_table() # fileConn&lt;-file("specifications.txt") # paste(c(specifications), fileConn) # close(fileConn) #scrape image image &lt;- NA while(is.na(image)) { image &lt;- productPage %&gt;% html_node("#landingImage") %&gt;% html_attr("src") # image &lt;- sub('.', '', image) capture.output(str_replace_all(image, "[rn]" , ""), file="imageData.txt", append=FALSE) } userReviewsPage &lt;- productPage %&gt;% html_nodes(".a-link-emphasis") %&gt;% html_attr("href") #print(userReviewsPage[1]) userReviewsPage = userReviewsPage[1] while (userReviewsPage != "http://www.amazon.in") { allReviews &lt;- read_html(userReviewsPage); capture.output( allReviews %&gt;% html_nodes(".review-text") %&gt;% html_text(),file="userReviews.txt", append=TRUE) userReviewsPage = allReviews %&gt;% html_nodes(".a-last a") %&gt;% html_attr("href") userReviewsPage = paste("http://www.amazon.in",userReviewsPage,sep="") Sys.sleep(3) } </code></pre> -2 <p>I want to convert string "hello world" to some integer value and get back "hello world" string from converted integer value. I tried but getting issue while converting int to string.</p> <p>I converted the string to an integer using this code:</p> <pre><code>char str[50]; int i, len; int result=0; printf("Enter string to be converted: "); gets(str); len = strlen(str); for(i=0; i&lt;len; i++){ result = result * 10 + ( str[i] - '0' ); } printf("%dn", result); </code></pre> <p>and then I tried converting it back like this:</p> <pre><code>printf("%dn", result); int rem; int j = 0; char result_str[50]; while (result !=0) { result = result - '0' ; rem = result%10 ; result = result/10; result_str[j] = 'a' + (rem -1); printf("%c",result_str[j]); j++; } printf("result string = %s",result_str); </code></pre> 0 <pre><code>var obj = [{ "distance": 7000, "rating": 2, "name": 'a' }, { "distance": 3470, "rating": 1, "name": 'b' }, { "distance": 3470, "rating": 2, "name": 'c' }, { "distance": 3480, "rating": 5, "name": 'd' }, { "distance": 3490, "rating": 3, "name": 'e' }, { "distance": 4000, "rating": 3, "name": 'f' }]; </code></pre> <p>I am looking to get the output sorted by <strong>distance</strong> and if distances are nearer to each other by a value (eg. 10), then sort by <strong>rating</strong>.</p> <p>I have tried many ways but nothing works. </p> <pre><code> obj.sort(function(a, b) { return (a["distance"] - b["distance"]); }); obj.sort(function(a, b) { return (b["distance"] - a["distance"] &lt;= 10 ? 0: 1) || b["rating"] - a["rating"]; }); </code></pre> <p>In above code, first i tried to sort by distance and then if distance difference is less than 10, i sort by rating. But this does not works correctly. </p> <p>JSBin link - <a href="https://jsbin.com/nawiderebu/edit?html,js,console" rel="nofollow noreferrer">https://jsbin.com/nawiderebu/edit?html,js,console</a></p> <p>I would like to get output as follows:</p> <pre><code>[ { "distance": 3470, "rating": 2, "name": 'c' },{ "distance": 3470, "rating": 1, "name": 'b' }, { "distance": 3480, "rating": 5, "name": 'd' }, { "distance": 3490, "rating": 3, "name": 'e' }, { "distance": 4000, "rating": 3, "name": 'f' },{ "distance": 7000, "rating": 2, "name": 'a' } ] </code></pre> 0 0 -1 1 <p>I'm using <code>d3.js</code> and I have some circles and some text related to each circle. I want the overflowed text to be ellipsised. </p> <p>I've tried with css </p> <pre><code>white-space: nowrap; overflow: hidden; text-overflow: ellipsis; </code></pre> <p>But it doesn't work. How should I do?</p> <pre><code> node.append("text").attr("id", "text") .attr("dx", function(d) { return (d.size * (-100)) ;}) .attr("dy", function(d) { if(flag==1) { flag=0; return -(d.size * 57); } else{ flag=1; return ((d.size * 100) + 5); } }) .text( function(d){ return d.name;}) .style("opacity", 1); </code></pre> 0 0 0 0