Jump to content
Stef's Coding Community

jbwebdesign

Member
  • Content Count

    167
  • Joined

  • Last visited

Community Reputation

-1 Poor

About jbwebdesign

  • Rank
    Advanced Member
  • Birthday 07/25/1989

Profile Information

  • Gender
    Male
  • Location
    New York
  • Interests
    Web Development

Contact Methods

  • Website
    http://www.affordablewebdev.com
  1. Hello, I am working on creating an angular js directive for using HTML5 Canvas My goal is to output a canvas and use Font Awesome icons for writing inside of the canvas. My code is the following, however the problem i have is that the font awesome icons don't seem to render: angular.module('myApp') .directive('customButtonCanvas', ['$document', function($document) { return { restrict: 'A', scope: { width : '=', height : '=', options : '=' }, link: function(scope, element){ console.log(scope); console.log(element); //first lets
  2. Hello guys, i am trying to create an api request but the problem i have is that the code is not written in PHP. they only have Ruby and Python samples. can someone please help me so that i can create a request to the api with PHP. import hashlib import hmac import urllib2 import time API_KEY = 'YOUR-API-KEY' API_SECRET = 'YOUR-API-SECRET' def get_http(url, body=None): opener = urllib2.build_opener() nonce = int(time.time() * 1e6) message = str(nonce) + url + ('' if body is None else body) signature = hmac.new(API_SECRET, message, hashlib.sha256).hexdigest() opener.addheaders =
  3. Hello, i have been researching some real time functionality and i would like to create a realtime website. something that can function similar to an auction. for this, i would like to use web sockets but i can't figure out how to use web sockets with php. can anyone help me? i have some code below..... server.php #!/php -q <?php /* >php -q server.php */ error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); $master = WebSocket("localhost", 8752); $sockets = array($master); $users = array(); $debug = false; while(true){ $changed = $sockets;
  4. I've just looked into some realtime stuff and it looks like Websockets can be good for what i am looking to do. does anyone know weather websockets is the best way for me to go?
  5. Try to use the foreach loop for the entire table....for example: <?php foreach($rotadetails as $rotadetail): ?> <table align="center" border=0 cellspacing=0 cellpadding=0 width=633> <tr> <td colspan=7 valign=top style="height:4px; "></td> </tr> <tr align="center"> <td width="70" rowspan="2">Week <?php echo $i; ?></td> <td width="80" colspan=1 bgcolor="#DBE5F1">Breakfast</td> <td width="80" colspan=1 bgcolor="#DBE5F1">Lunch</td> <td width="80" colspan=1 bgcolor="#DBE5
  6. well what i am trying to do is take the TABLE and convert it into a php array so that i can insert it into a MySQL database.
  7. hello everyone, i am working on a script and i want to do the following i have a table that looks like this... <table> <tr> <td>Tuesday</td> <td>12/31</td> <td>New Years Eve</td> <td>Test</td> <td>Apples</td> <td>Oranges</td> <td>Bananas</td> </tr> <tr> <td>Monday</td> <td>12/30</td> <td>New Years Eve EVE</td> <td>Test</td>
  8. Hello everyone, I am working on a website and i am using AJAX. I am sending requests to the server constantly to have a "LIVE" FEED. I am sending an ajax request to the server to reload a table constantly and another one to reload a different piece of data constantly etc. is there anything bad with doing this? will this run slow if i start to have more traffic?
  9. Hello everyone, i am working on a website that uses facebook api to login with facebook. However i am having a problem with the Javascript and PHP sdk. The problem is that i keep getting an unexpected error which basically expires the facebook Auth Token and then it logs the user out of the website then logs them back in. The code that i am using is below.... <?php require 'facebook.php'; $facebook = new Facebook(array( 'appId' => 'MY_APP_ID_HERE', 'secret' => 'MY_APP_SECRET', 'cookie' => true )); // See if there is a user from a cookie $user = $facebook
  10. Hello everyone, I have been thinking of making a casino (poker) game for iOS/Android/Website/facebook etc. Basically i want a clone of Zynga Poker app for iphone. The problem is that i'm not sure where to start. Does anyone have any suggestions on where i could start to make an app exactly like Zynga Poker?? I don't have much knowledge about Servers or Application Security. Also, if i need to hire a team to make this work, what type of job positions would be needed?
  11. yes there is khanahk but sometimes when you have a Large database to import, that will not work because of php's limitations. so the best solution for that is to run a LOAD DATA query on the SQL.
  12. For anyone who is trying to do something similar to what i have to do which is to LOAD a large database onto phpmyadmin..... here is what i did to solve my issue..... 1.) Login to cPanel and white list your ip address. ( go to the mysql remote access and enter your ip address) 2.) Download a program called MySQL Work Bench 3.) Connect to MySQL Workbench using the ip address that shows on on the left side of your cPanel (in my case it's a shared ip address because i am on a shared hosting account) 4.) After you have connected, create a table with the same fields that appear
  13. hello, i am trying to load a large CSV file in the database and it's not working can someone please tell me what i'm doing wrong?? here is my query for the SQL LOAD DATA LOCAL INFILE '/tmp/2012-8-StandardAreaCodeDatabase.csv' INTO TABLE targets FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (State,NPANXX,LATA,ZipCode,ZipCodeCount,ZipCodeFreq,NPA,NXX); but i get the following error: #2 - File 'tmp/2012-8-StandardAreaCodeDatabase.csv' not found (Errcode: 2)
  14. i have no idea what the problem was..... but i found a way around it. by the way, i think the switch case statement is working correctly. i am trying to say that if the $_SERVER['HTTP_USER_AGENT'] contains any of the following: ipad, iphone, android, ipod, webos then return is mobile. so that i can re-direct the user to a mobile compatible website. Thanks for your help
×
×
  • Create New...