CodeCapition1's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
57 (0.04 per day)
Joined:
23-September 10
Profile Views:
4,009
Last Active:
User is offline Feb 05 2014 08:27 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Dodge
Dream Kudos:
0

Latest Visitors

Icon   CodeCapition1 has not set their status

Posts I've Made

  1. In Topic: linux, run program when network connection is estabilished

    Posted 3 Feb 2014

    well monitoring in a way yess i realize that the OS has built-in functions to monitor for a connection and do something if it detects a connection, and i may just have to hack that function to get it to do what i want. but i am really looking to monitor for a connection and if one is detected on a specific NIC that has established its self a connection with a device that has an IP address of 169.254.1.1 then execute a configuration script or if it has an IP address of 10.0.0.1 execute another script that will set the device back to factory defaults (giving it an IP address of 169.254.1.1 again) and then when it reboots and connects execute the configuration script. i have one of my NIC's set for connections to the modems and programmed with all the various IP addresses of the various modems and routers we use, so i guess if i only ever use that card i could just monitor for connections on eth3 and then call my script but i would like to make this not "machine configuration specific". i know at the end of the year i am getting a new office and new tech to go with it so i want to make it as universal as i can. this may be a simple and easy task i just don't know what keywords to search for to get me started( i have tried many times with multiple search topics).

    P.S. Dont be sorry for trying to share knowledge or trying to figure out a solution to a problem. you were just following basic troubleshooting practices, start at the beginning and work forward to a solution( although you didnt ask if i had the modem plugged in so not quit at the beginning but close enough)
  2. In Topic: linux, run program when network connection is estabilished

    Posted 3 Feb 2014

    i figured that comment would come up, a few months ago you gave me the same response to a different topic i posted both dealing with the same modems. but yes you are correct that is the 'no server' address that is assigned on many different devices. the modems we use come with that address (169.254.1.1) from the factory. part of my configuration script sets the IP address to our networks scheme which happens to be 10.0.0.1 for the modems and 172.29.x.x for all other devices that do not go to customers installation location. sorry to throw you off with that but i work for a W.I.S.P. based in southern Missouri and Motorola choose that default factory address on their own accord. nothing i can do to change that fact but i am responsible for changing the default address before any device gets sent out in to the field.
  3. In Topic: harvest part of a session variable name to use as data for another var

    Posted 22 Oct 2013

    Andrewsw,
    Your completely right I am pulling the part of the variable name I need in $name I just didn't think about it that way until you asked me to revise me pseudo first I will explain better:
    My session array variable 'invform' was using the actual inventory part number as the array key and it was holding a number(the reduction in inventory count) as the value. I was looking to send one session variable to my function, having my function split out the variable and harvest the actual name of the variable in to another variable and using that as the key in my update query to set the value of that part number.
    Because you can't send this query to a database
    ( UPDATE inventory SET in_stock = $_SESSION['invform']['hammer001'] WHERE part_num = $_SESSION['invform']['hammer001'])

    Now for the solution:

    By using one element of my session array and splitting it with a for each loop I will essentially be parsing the needed information out as my $key => $value where the $key is the part number and the $value is the amount of inventory reduction so my pseudo was close to what I was needing to do but I didn't think to try my example before I used it As an example.

    So if I change

    UpdateQTY($_SESSION['invform']['hammer001'])

    to:

    updateQTY($name, $value)

    my SQL will then be

    UPDATE inventory SET in_stock = $value WHERE part_num = $name

    Which is totally doable

    Thanks for the help
  4. In Topic: harvest part of a session variable name to use as data for another var

    Posted 22 Oct 2013

    Ok so after a little more research and taking with our resident guru, I have found out about "variable variables" I will look at trying to implement that in the morning, but until then after finding a few posts related to my question it appears most people only use this process for debugging. But I do feel my need is legitimate and not too far fetched. But I think I'm going to try the $key => $value method it's just going to take me a while to get the function right
  5. In Topic: Insert an update query into a database field?

    Posted 25 Sep 2013

    well i just completly spaced on the fact of adding extra spaces and rewording it so it was not a "real" sql statement. i was focused on the fact that i was told to get the statement in the DB. thanks for the "duh" answer. sometimes i feel like i should not even be behind a keyboard. and as for the PDO i was told about that in a recent topic i posted but had not made it that far yet, thanks now that i have read some about it it seams like it should work ok. like you said all the values in the SQL are also being submitted to the DB in the same row even so im with you why do you need it in there twice? but i dont get to make the decisions i just get to follow orders. thanks for all the help.

My Information

Member Title:
D.I.C Head
Age:
29 years old
Birthday:
October 7, 1984
Gender:
Location:
Springfield, MO.
Full Name:
K. Tye Jackson
Years Programming:
2
Programming Languages:
Basic Understanding:
CSS, Python, Java, JavaScript,
Good knowledge:
HTML, PHP, C, C++, VB, HTML
And any more i can learn along the way, Any suggestions on what i should study up on next let me know

Contact Information

E-mail:
Click here to e-mail me
Facebook:
http://www.facebook.com/samsondatye?v=photos#!/samsondatye
Twitter:
CodeCapition1

Friends

Comments

CodeCapition1 has no profile comments yet. Why not say hello?