Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
6
Posts with Downvotes
6
Downvoting Members
5

64 Posted Topics

Member Avatar for vizz
Member Avatar for phoenix254

How can i return an array from function in c++.. I have this code: #include <iostream> #include <string> using namespace std; int ordincreasente(int num[], int len){ int curMax,curMin,ordinato[len]; for(int i=0; i<(len-1); i++){ for(int j=i+1; j<len; j++){ if(num[i]<num[j]){ swap(num[i], num[j]); } }//end second loop }//end first loop for(int i = 0; …

Member Avatar for 2teez
0
669
Member Avatar for phoenix254

Hi I am new in php programming and learning this i have found a small problem.I am trying to creating a file called lib.php, where i add all my files jquery lib downloaded in /js and css files.My directory look like this: ** -practise + /css + /js + /images …

Member Avatar for bigtalk
0
663
Member Avatar for phoenix254

Hi, I Have this php code: <?php //require('dbconnection.php'); $conn = mysqli_connect('localhost','root','','user_registration'); if (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " . mysqli_connect_error(); }else{} ; function getUsers() { //return require('online-users.txt'); $getAllUsers = mysqli_query($conn,"SELECT * FROM login"); if($getAllUsers === FALSE) { die(mysqli_error()); // TODO: better error handling } while($rows=mysqli_fetch_array($getAllUsers)){ echo $rows["firstname"]; } …

Member Avatar for cereal
0
12K
Member Avatar for phoenix254

How can i create a custom protocol with ws scheame ? ex: ws://localhost/echo or ws://localhost:8080/echo with node js ?

Member Avatar for mcglk
0
153
Member Avatar for Djipson Steven

i dont know if it is good or not that u can use also [skylink api](http://skylink.io/web/). it is webrtc.. and u can use video player or audio player or any real time app with this api.. and its easy

Member Avatar for phoenix254
0
140
Member Avatar for phoenix254

Hello everyone, I would like to ask you guys that suppose i have an app that i devloped in nodejs and listening on port (3000) , in client side i have added (var io = io.connect();)and domain name is www.domainname.com That node app I developed, I test im my local …

0
85
Member Avatar for phoenix254

Hi, I have just started learning nodejs. And i am using socket.io modules. I have write code where one user can send message to another specific user.. but my code is not working, idk why ? Here is my client side script --> var mysql = require("mysql"); var fs = …

Member Avatar for Taywin
0
263
Member Avatar for Habib_7
Member Avatar for Habib_7

$( "#myselect option:selected" ).text(); $( "#myselect option:selected" ).val(); $( "#myselect option:selected" ).click(function (){ ur code });

Member Avatar for phoenix254
0
316
Member Avatar for pro-tek

Bind creates a new function that will have **this** set to the first parameter passed to **bind()**. Here's an example that shows how to use bind to pass a member method around that has the correct** this**: var Button = function(content) { this.content = content; }; Button.prototype.click = function() { …

Member Avatar for phoenix254
0
251
Member Avatar for phoenix254

Hi, I have created real time script for my website. I wanted to ask u is it good or bad script? Here is my script: My php page:servr.php <?php set_time_limit(0); $con = mysqli_connect('localhost','root','') or die ("Could not connect to the Database"); mysqli_select_db($con,"msg") or die("Cannot find the database"); $last_id=null; while(1) { …

Member Avatar for jkon
0
281
Member Avatar for phoenix254

I have GT-i9000 device. I cannot open any app that is installed in my device. it gives me error when i open any app. Errors: when i open whatsapp i get error: Whatsapp com.process.whatsapp.. and close automatocally after pop up error. when i open playstore error: google process com.google.vending process …

Member Avatar for phoenix254
0
221
Member Avatar for phoenix254

Why my $last_id variable is null always ? i am using this scirpt for ajax..but i tried to excute without my ajax page,it works fine and the output give me `{"data_from_file":"ghjghj","timestamp":1441695735,"msg_id":"1190","reciver_id":"12","sender_id":"10"}` when i want to check my $last_id variable that was null, <?php set_time_limit(0); $con = mysqli_connect('localhost','root','') or die ("Could …

Member Avatar for phoenix254
0
274
Member Avatar for phoenix254

hi i have just started learning nodejs. i wrote this simple code var http = require("http"); var fs=require('fs'); var wbsocket = ('ws'); http.createServer(function(req, res) { res.write('2working'); }).listen(8889); console.log('listing to port 8080'); and run in cmd node filename.js in cmd doesnt give me any error and when i open webbrowser its …

Member Avatar for cereal
0
187
Member Avatar for phoenix254

Hello Guys, How can i check if it happend new events in server in real time without refreshing the page with js? I dont want to use node.js or ajax or html5 SSEs.

Member Avatar for phoenix254
0
172
Member Avatar for phoenix254

Hello I would like ask u guys that what does mean `$variablee = isset($_GET['timestamp']) ? $_GET['timestamp'] : 0;` ? what stand for `?` sign and this sign `: 0` ? please someone explain me this code ?

Member Avatar for Tpojka
0
184
Member Avatar for phoenix254

Hello, I would like to ask you that which is good library(angularjs jquery react blabla or simple js)/method/technique to get safe input value from users(to prevent csrf and xss or any other malicious) ? which is more safe `document.getElementById();`or` $('#id/.class');` and what is bind data? explain me this in poor …

Member Avatar for diafol
0
225
Member Avatar for phoenix254

What are the differences between **htmlspecialchars()**and **htmlentities()**. When should I use one or the other?Explain me in poor words

Member Avatar for diafol
0
266
Member Avatar for phoenix254

I am using jQuery and prototype libarary fro this project. I have this code so far: HTML: <div id="cnt"></div> <input type ="text" id="bla" name="tct"/> Javascript: if(e.keycode == 13){ var text = document.getElementById('#bla'); text= $('#bla').val(); //text.evaljson(); //I put a comment because it gives me error "badly formed json string" $('#cnt').append(text); } …

Member Avatar for diafol
0
315
Member Avatar for kenth21v
Member Avatar for phoenix254

I am trying to creating websocket with php and here is my connection that i used for create socket connection <?php if(!($sock = socket_create(AF_INET, SOCK_STREAM, 0))) { $errorcode = socket_last_error(); $errormsg = socket_strerror($errorcode); die("Couldn't create socket: [$errorcode] $errormsg \n"); } echo "Socket created \n"; //Connect socket to remote server if(!socket_connect($sock …

Member Avatar for jkon
0
538
Member Avatar for phoenix254

I am new in programming languages.I was trying to learn web socket with javascript to this [site](http://socket.io/get-started/chat/), but i am not understanding something that why i need to use **Package.json**. I tried to google a lot, but can not find something useful. One more thing if i create Package.json then …

Member Avatar for cereal
0
185
Member Avatar for phoenix254

I am new in programming language. I was trying to create an websocket connection, this is my all line of js var url="ws://localhost:8080/WebsocketTests/"; w= new webSocket(url); and i got this error: **C:\xampp\htdocs\WebsocketTests>node test1.js C:\xampp\htdocs\WebsocketTests\test1.js:3 w= new webSocket(url); ^ ReferenceError: webSocket is not defined at Object.<anonymous> (C:\xampp\htdocs\WebsocketTests\test1.js:3:8) at Module._compile (module.js:460:26) at …

Member Avatar for ryantroop
0
2K
Member Avatar for phoenix254

How can i get latest fresh data from server if in server happened new event (for exemple there are 2 users x,y and x send message to y and y get message without refresh page like fb chatsystem ) ? I dont want to use setInterval because it repeat all …

Member Avatar for pixelsoul
0
157
Member Avatar for phoenix254

Hi eveeryoone, Is it possible that span can have more the one id ? i am tring like this <span id="user Maxi">Maxi</span> <span id="user John">John</span> <span id="user Henry">Henry</span> <span id="user Max">Max</span> <span id="user Simon">Simon</span> #user{ text-align:center; display:inline-block; width:50px; height:20px; background-color:#9B59B6; margin:5px; border:4px solid #3498DB; color:#F1C40F; cursor:pointer; } but it isnt …

Member Avatar for Sam.Samual
0
172
Member Avatar for phoenix254

What is comet ? Is new programming language like php,js,ajax,python,c++ ecc.. or is it a plugin ? Tell me in summary please.

Member Avatar for drjohn
0
101
Member Avatar for phoenix254

HELLO i would like to ask that fetchAll() is good choice to retrieve all user message from database or i should use while loop? I asked this question because i worry about internet traffic..

Member Avatar for jkon
0
5K
Member Avatar for phoenix254
Member Avatar for phoenix254

HI I am getting this error: **Uncaught SyntaxError: Unexpected token function** in line setInterval(function(){ (line 5) Someone can tell me what i wrong done ? $.ajax({ type:"POST", url:'getmessage.php', data:{user_id:id}, setInterval(function(){ success: function(data){ $('.umsg'+id).append(data); }, }, 2000), });

Member Avatar for Vivek_13
0
242
Member Avatar for ramsiva
Member Avatar for phoenix254

I have a share button in my web page which is for sharing the post on facebook. Now the popup opens up and when I click on post it does not close the pop-up. I have implemented this as mentioned in How do I close the popup after I post …

0
108
Member Avatar for phoenix254

Hi everyone, why my 2nd,3rd,4th line arent working in js source ? $(document).ready(function(){ $('.cls').click(function(){ $('.mwindow').hide(); }); $('.frnd').on('click', function(){ var name=$(this).attr("id"); var div_mwindiow = document.createElement('div'); var div_hwindiow = document.createElement('div'); var span_hwindiow = document.createElement('span'); div_mwindiow.className ="mwindow"; div_hwindiow.className ="hwindow"; span_hwindiow.className ="cls"; var x = document.createTextNode('x'); span_hwindiow.appendChild(x); div_hwindiow.appendChild(span_hwindiow); var t = document.createTextNode(name); div_hwindiow.appendChild(t); div_mwindiow.appendChild(div_hwindiow); …

Member Avatar for Vivek_13
0
266
Member Avatar for phoenix254

Hi everyone, Here i upload my live [code](http://codepen.io/anon/pen/BNzBmK) HTMl source: `<span class="Maxi" id="frnd">Maxi</span> <span class="John" id="frnd">John</span> <span class="Henry" id="frnd">Henry</span> <span class="Max" id="frnd">Max</span> <span class="Simon" id="frnd">Simon</span> <div id="warp"> <div id="chatwindow"> <div id="chathead"> <span id="uname"></span> <div id ="close">&times;</div> </div> <div id="msgbody"> <textarea id="textar" ></textarea> </div> </div> </div> ` Js source $(document).ready(function(){ $('span').on('click', …

Member Avatar for phoenix254
0
235
Member Avatar for phoenix254

Hi someone can tell me why 4th line isn't working ? $('span').on('click', function(){ var name=$(this).attr("class"); $(name).click(function(){ $("#chatwindow").toggle("#hide"); });

Member Avatar for stbuchok
0
159
Member Avatar for phoenix254

Hi var div = document.createElement('div'); div.id = 'window'; var div2 = document.createElement('div'); div2.id = 'windowhead'; var span1 = document.createElement('span'); span1.id = 'name'; div2.appendChild(span1); var div3 = document.createElement('div'); div3.id = ('close'); div2.appendChild('div3'); div.appendChild(div2); document.body.appendChild(div); Can someone tell me why chorme console is giving me this error : Uncaught TypeError: Failed to …

Member Avatar for phoenix254
0
906
Member Avatar for phoenix254

Hello everyone, I am trying to create html like this **html code** <div id="windwo"> <div id="windowhead"> </div> </div> And this is my try **Js cose ** var div = document.createElement('div'); div.id = 'window'; var div = document.createElement('div'); div.id = 'windowhead'; document.body.appendChild(div); document.body.appendChild(div);

Member Avatar for stbuchok
0
189
Member Avatar for phoenix254

Hi everyone, my code is here [Click Here](http://codepen.io/anon/pen/XbdBLm) How i can get value of php variable in javascript, i have an div id=windowhead where i want to show username which i clicked <a class='users' href='#' >test</span></a> <a class='users' href='#' >test2</span></a> <a class='users' href='#' >Max</span></a> <a class='users' href='#' >John</span></a> <div id="warp"> …

Member Avatar for Aeonix
0
250
Member Avatar for phoenix254

Hi I need help here, please tellme why it snt working correctly Urgent ; THankss very much $('#windowhead').click(function(){ /*$("#fullwindow").css({ "height":20+"px" });*/ $("#fullwindow").slideToggle('css'({ "height":20+"px" })); });

Member Avatar for phoenix254
0
136
Member Avatar for phoenix254

Hi everyone, i have a small problem i paste my code [here](http://codepen.io/anon/pen/pJyvVE) My problem is this: i dont want my window div ( <div id="window"> Drag me </div>) cannot be drag out of warp div. html code <div id="warp"> <div id="window"> Drag me </div> </div> css code body{ margin:0; background-color:#e67e22; …

Member Avatar for lps
0
156
Member Avatar for phoenix254
Member Avatar for phoenix254
0
2K
Member Avatar for phoenix254

Can anybody tell me how can i calculate x decimal numbers of pi, if my input is 2 than output should be this 3.14 if my input is 4 then output is 3.141. I have tried code like this but doesnt work how i want. pi +=3+4/(k*l*m) - 4/(a*b*c); //+ …

Member Avatar for Ion_1
-1
2K
Member Avatar for phoenix254

Hello everyone, I need help here. So my problem is how I want to make an image slider where show user uploaded images from his directroy/folder/account whatever. I would like to create like this [image slider](http://postimg.org/image/hl3pdp3mr/). I tried to create it.... [here it is](http://postimg.org/image/g5vva37wv/). and my php code is like …

Member Avatar for Makara
0
446
Member Avatar for phoenix254

Someone can help me to find my error: $query=mysqli_query($con," SELECT * FROM item WHERE ITEM = $ITEM ") or die ( mysqli_error($con)); i reciveing this error,i dont know wherer is syntax error. *You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version …

Member Avatar for cereal
0
235
Member Avatar for phoenix254

Hi everyone, i need help here.. i want to calculate age of user.... but i am getting this error ****Catchable fatal error: Object of class DateInterval could not be converted to string in C:\xampp**** while($row=mysqli_fetch_assoc($data)) { $date=$row['Dateofbirth']; } $dob= new DateTIME($date); $interval=$dob->diff(new DateTIME);

Member Avatar for phoenix254
0
108
Member Avatar for phoenix254

HI everyone, I need help in c++. Problem : I want to write a program that calculate x digits of pi. Like if my input is 3 output should like this 3,14 or this 3,145 if my input is 10 output should like this 3,14529xxx or lik this 3,14529xxxx. I …

Member Avatar for phoenix254
0
261
Member Avatar for phoenix254

Hi everyone, Is there any way to redirect page without header and javascript ?

Member Avatar for phoenix254
0
260
Member Avatar for phoenix254

I have been trying to google and find out how to make a .php script that will make a an automatic slideshow of images from a folder, I've only managed to get the pictures to automatically show up on the php page, but I can't figure out how to make …

Member Avatar for phoenix254
0
121
Member Avatar for phoenix254

HI I want to make an image slider where show user uploaded images from his directroy his directory or folder. [Image slider like this.](http://postimg.org/image/hl3pdp3mr/)

Member Avatar for phoenix254
0
4K
Member Avatar for phoenix254

The End.