collapse collapse

* Who's Online

  • Dot Guests: 54
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11163
  • stats Total Topics: 1699
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 248

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Pederson

Pages: [1]
1
Humor / CSI mistake :D
« on: July 25, 2010, 06:48:31 pm »
here is a funny CSI NY i think mistake

3
C++ / Javascript Injection
« on: April 18, 2010, 12:59:41 am »
Ok this tutorial is about Javascript injections via URL

if you are familiar with js(Javascript) then you have a head start ;D

ok to start a js injection in the URL type

   
Code: Javascript
  1. javascript:
then give a js command such as

   
Code: Javascript
  1. javascript:alert('hello world');
that would execute a the command alert giving you a window saying "hello world"

How can you use this?

whatever command you put after is exituted you could use it to
   I. Change form Values
      
Code: [Select]
< form action="http://www.website.com/submit.php" method="post">
<input type=hidden name="to" value="admin@site.com" />
<!--more fields-->
      
      format is
Code: Javascript
  1. javascript:void(document.forms[].forumname.nextnamesifany.vlaue="");
      
      lets say you want that e-mail sent to you, you would imput something like this
      
      
Code: Javascript
  1. javascript:void(document.forms[0].to.value="your@email.com");
      
      void() changes whatever you input in the function temperarily
      
      document.forms[0].to.value=""
      
      document is something you must include
      
      in js everything starts counting at 0 so, this is the first form (forms[0])

      to is the name of the form

      value="" changes the value temperarily for only you
      
      to check your work on this do something like this:
      
      
Code: Javascript
  1. javascript:alert(document.forms[0].to.value);

   II. Cookie editing?
      
      thats right you can use js injections to edit your cookies
      to see your cookies you can use this injection

      
Code: Javascript
  1. javascript:alert(document.cookie);

      the editing format is document.cookie="field = value"

      if this field doesnt exist you are going to create it

      lets say you look at your cookie and you see Authorized = no

      you could get authorization with this injection

      
Code: Javascript
  1. javascript:void(document.cookie="Authorized = yes");

   If you know js you can use anyother funtion you want with it (as far as i know)

   If you dont know js... Google is your best friend!
        
        Remember this is just the basics the rest, you look up or ask people for help :D





[edited name=Pederson date=1271570534][/edited]
[edited name=Celestialkey date=1271570725][/edited]
[edited name=Celestialkey date=1271570867][/edited]
[edited name=Celestialkey date=1271570904][/edited]

4
php / PHP help MVC
« on: April 06, 2010, 11:28:01 pm »
controller
Code: PHP
  1.          function state_item()
  2.         {
  3.                 $uri3 = $this->uri->segment(3);
  4.                 $uri4 = $this->uri->segment(4);//both for pages
  5.  
  6.  
  7.                 $this->load->model('item_model');
  8.                 $data['rows'] = $this->item_model->get_state($uri3, $uri4);//database querry
  9.                 $data['numrows'] = $this->item_model->get_rows($uri3);//for page navigator
  10.                
  11.                 $this->load->view('state_view', $data);
  12.         }
model
Code: PHP
  1. function get_state($uri3, $uri4)
  2.         {
  3.                 $limit = $uri4;
  4.                 $limit = $limit * 15;
  5.                 $limit = $limit - 15;
  6.  
  7.                 $q = $this->db->get_where('items', array('state_id' => $uri3), 15, $limit);
  8.  
  9.                 if($q->num_rows() > 0)
  10.                         {
  11.                                 foreach($q->result() as $row)
  12.                                 {
  13.                                         $data[] = $row;
  14.                                 }
  15.                                 return $data;
  16.                         }
  17.                        
  18.  
  19.         }
  20.  
View
Code: PHP
  1. foreach($rows as $item)
  2.         {
  3.        
  4.                 echo anchor('listings/item/'.$item->state_id.'/'.$item->item_id, $item->title);
  5.                 echo "&nbsp;&nbsp;-&nbsp;&nbsp;$";
  6.                 echo $item->price;
  7.                 $count = $count + 1;//for pages
  8. ?><br />
  9. <?php
  10.         }
  11. //page coding
  12. ?>
  13.  

some pages dont have anything to input to the foreach so, error

5
php / CodeIgniter
« on: February 13, 2010, 02:40:24 am »
so I have been trying to use http://codeigniter.com/ for my website...  and I was watching this http://net.tutsplus.com/videos/screencasts/codeigniter-from-scratch-day-1/ to get the info to make it I just thought for those who use PHP that it might be a nice framework.. I have problems with the e-mail but its late... like I said I thought that you might like the framework

6
php / mysl query in php not working
« on: February 05, 2010, 01:48:43 pm »
I know i havent been on in a wile its because there really arent any internet coding posts and thats what ive been doing a lot latly with this new site and this my sql query wont work... any ideas why?
Code: PHP
  1. <div id="states" class="states">
  2.  States<br />
  3. <?php
  4.         $states = mysql_query("SELECT `state_id`, `name` FROM `states` ORDER BY `name` ASC");
  5.  
  6.         foreach($states as $state){
  7. ?>
  8.                 <a href="index.php?state=<?php echo $state['state_id']; ?>"><?php echo $state['name'];
  9.  
  10. ?></a><br />
  11. <?php
  12.         }
  13. ?>
  14. </div>
  15.  

7
XHtml/Html / Tables
« on: December 05, 2009, 10:36:08 pm »
Tables are used mostly for formatting OR to make a layout
since the highlighting failed heres the code without
Code: [Select]
<html>
<head>
<title>Pederson's Tables</title>
</head>
<body>
<table align="center" border="1" width="200">
<tr>
 <th>Measurement</th>
 <th>volume</th>
</tr>
<tr>
 <td>1 inch </td>
<td>56 inches</td>
</tr>
</table>
<table border="0" align="center">
<tr>
 <td><img src="http://www.codeproject.com/KB/WPF/AnnotatingAnImageInWPF/ImageAnnotation_xray.png" /> </td>
 <td><img src="http://www.codeproject.com/KB/WPF/AnnotatingAnImageInWPF/ImageAnnotation_xray.png" /> </td>
</tr>
<tr>
 <td colspan="2" align="center"><img src="http://www.codeproject.com/KB/WPF/AnnotatingAnImageInWPF/ImageAnnotation_xray.png" /> </td>
 <td></td>
</tr>
</table>
</body>
</html>

The <table> tag defines a table is going to be used. The <tr> tag means table row so, it defines a new row in the table. The <th> tag defines a new table header (almost the same as <td> but its bolded). the <td> tag defines a cell.
you can merge cells with the (row or col)span="number of cells" atribute. This merges a cell verticly(row) or horizontaly(col). Put <td> tags there as place holders because if you want to continue the table it wont register the <td>'s

Tables for formatting should be used only before CSS once you know it use CSS


[edited name=Pederson date=1260079759][/edited]

8
XHtml/Html / Images and links
« on: December 05, 2009, 10:31:04 pm »
Okay here is how you put links to other sites and images from the internet onto your site

Code: [Select]
<html>
<head>
<title>Pederson's links and images</title>
</head>
<body bgcolor="gray">
<center>
<font color="#000000">
<p> this is a random paragraph...</p> <br />
<a href="http://celestialcoding.com/index.php?board=83.0">CelestialCoding.com</a><br />
this is a link to CelestialCoding.com<br /><br />
<img src="http://w3schools.com/images/h_logo.gif" border="0" /> <br />
This is how you post an image... now lets mix the two together<br /><br />
<a href="http://w3schools.com"><img border="0" src="http://w3schools.com/images/h_logo.gif" /></a><br />
This is an image link
</font>
</center>
</body>
</html>

in the image tag (<img>) you may notice I used /> to close it. This is the same as closing it like this ></image> just with less typing...
The href in the <a> tag is tells the computer were to go in the a tag. whats printed inbetween the <a> tag and the closing tag is displayed as the link so, when you put an image there you get an image link :D




[edited name=Pederson date=1260125243][/edited]
[edited name=Nathan Adams date=1261711074][/edited]

9
XHtml/Html / One more list
« on: December 05, 2009, 10:25:31 pm »
This is a widely known list that is used on a lot of websites...

Code: Text
  1. <html>
  2. <head>
  3. <title>Pederson's new list</title>
  4. </head>
  5. <body bgcolor="#000000">
  6. <center>
  7. <font color="#00FF00">
  8. <p> this is a random paragraph...</p>
  9. </font>
  10. <select><!-- starts the drop down list-->
  11. <option> item </option><!--says whats in the list-->
  12. <option> item </option>
  13. </select>
  14. </center>
  15. </body>
  16. </html>

and <!-- is a comment --> and is used to make notes to yourself... this doesnt show up on the acual webpage... only in the source

the <select> tag starts the drop down list and what you put inbetween the <option> and </option> is what is going to be seen in the list... get in the habbit of closing all of your tags!

10
Request A Program or Tutorial / comunication with a network
« on: November 22, 2009, 01:10:34 am »
My friend and I were talking and he was telling me about a program me made in school and it could shut any computer down on a network and send messages to eachother ect. and I was wondering if anyone could make that because he sadly lost his files and can't remember how to make it so, please? lol

11
Introductions / Hey
« on: September 09, 2009, 09:41:02 pm »
Hey I'm Pederson lol and I don't have that much coding experience. That is because I am in high school, and haven't been able to get the more advanced books to learn it from. I know very basic C and am currently learning HTML from my school (web design). I am hopefully going to be a computer scientist when I grow older lol. There's a lot I can learn here and hope I learn a lot!

12
C / college lab
« on: September 09, 2009, 07:02:46 pm »
there is a random 64 in the last printed line help if you can !
Code: [Select]
/* Author:
 * Course: 2107
 * Section: 1 */

#include <stdio.h>

void evenOnLeft(int[], int);
void printA(int[], int);
void reverse(int[], int);
float average(int[], int);

int main(int argc, char **argv)
{
  int A[] = {9, 21, 321, 117, 27, 64, 13, 9, 12, 208};
  printA(A, 10);

  printf("The average of A[] is %f\n", average(A,10));

  reverse(A, 10);
  printA(A, 10);

  evenOnLeft(A, 10);
  printA(A, 10);

  return 0;
}

/* prints A[] inside parentheses with each value separated
 *    by commas to stdout */
void printA(int A[], int length)
{
printf("(");
int i;
for(i=0;i<length;i++){
printf("%d", A[i]);
if(i<length-1)
  printf(",");
}
printf(")\n");

}

/* returns the average of the items in A[] or 0.0 if A is empty */
float average(int A[], int length)
{
float avg = 0.0;
int i;
for(i=0;i<length;i++){
    avg += A[i];
}
avg = avg/length;
return avg;
}

/* Reverses the values in A[].  For example, if before the function,
 *    A[] contained [1,2,3,4,5], after the function, A[] contains
 *       [5,4,3,2,1] */
void reverse(int A[], int length)
{
int i;
        int temp;
for(i=0;i<length/2;i++){
temp = A[i];
         A[i] = A[length-1-i];
A[length-1-i]=temp;
   }

}

/* Moves all of the even integers in A to the left hand side of A
 *    and the odd integers to the right hand side
 *
 *       For example, if before the function, A[] contained [1,2,3,4,5],
 *          after the function A[] could contain [2,4,1,3,5] */
void evenOnLeft(int A[], int length)
{
int i;
  int even=0;
int temp;
for(i=0;i<length;i++){
  int k=0;
while(A[i]%2!=0){
if(A[length-1-k]%2==0){
temp = A[i];
A[i] = A[length-1-k];
A[length-1-k] = temp;
}
         k++;
}
}
}

Nathan - Added code tags


[edited name=Nathan Adams date=1252541053][/edited]

Pages: [1]

Donate


* Search


* Recent Posts

Image Comparison by Shishka
[May 15, 2017, 01:18:02 pm]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 pm]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 am]


Updates by Nathan
[October 30, 2015, 08:27:36 pm]


Re: Client-Server Messaging by Nathan
[October 25, 2015, 05:48:57 pm]