Daily Archives

Articles indexed Saturday September 29 2012

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • Add results from MySQL?

    - by NardCake
    Not quite sure how descriptive that title was but this is what I want to do. I scripted a URL shortener today and it's working fine, I just want to add some stats on the bottom of it saying how many links there are and how many clicks there are. Now everytime a user clicks one of the links it +1 the column in the database then it redirects the user. I want to query that and add all of those numbers together from each row. I attempted a while loop which im not surprised didn't work: while($rows = mysql_fetch_assoc($check_count)){ $clicks = $rows['clicks']; $clicks = $clicks+$clicks; } If you don't understand please ask and if you do understand it means alot for any response!

    Read the article

  • Opencart not working

    - by user1588341
    I can go to http://www.sunnybrookfs.com/sstore/upload/ and it works awesome. But when I change the physical path in the basic settings for this website in the iis manager to the sstore/upload/ directory only text shows up. No images can be found or css style sheets. So basically www. sunnybrookfs. com/ goes to my xampp page, then I can access my OpenCart by going to http://www.sunnybrookfs.com/sstore/upload/. If I want www.sunnybrookfs.com to point to my store it does not work. Any suggestions? Thank you.

    Read the article

  • listView.setAdapter doesn't work

    - by Bowiz2
    I have a listview called quotesList, and I am trying to use an adapter to put information in it. Here is my code: ListView listView = (ListView) findViewById(R.id.quotesList); String[]values={"Android","iOS","Windows Phone","Other Stuff"}; ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, android.R.id.text1,values); listView.setAdapter(adapter); The only error that Eclipse shows is in the listView.setAdapter(adapter) line. The bold represents where the red squiggly is. Syntax error on token "adapter", VariableDeclaratorId expected after this token The period after listView gives an error as well, but I'm pretty sure its just related to the other error, as its a syntax error. Syntax error on token(s), misplaced construct(s) Thanks in advance!

    Read the article

  • Why "constructor-way" of declaring variable in "for-loop" allowed but in "if-statement" not allowed?

    - by PiotrNycz
    Consider this simple example: /*1*/ int main() { /*2*/ for (int i(7); i;){break;} /*3*/ if (int i(7)) {} /*4*/ } Why line-2 compiles just fine, whilst line-3 gives the error? This is little strange to me why if-statement is in this aspect treated worse than for-loop? If this is compiler specific - I tested with gcc-4.5.1: prog.cpp: In function 'int main()': prog.cpp:3:7: error: expected primary-expression before 'int' prog.cpp:3:7: error: expected ')' before 'int' I was inspired by this question [UPDATE] I know this compiles just fine: /*1*/ int main() { /*2*/ for (int i = 7; i;){break;} /*3*/ if (int i = 7) {} /*4*/ }

    Read the article

  • why am i getting an error SyntaxError : invalid syntax for this code

    - by eragon1189
    This is a code in python which calculates f (x) =? ((-1)*x)/(x*x+n*n) n from 1 to infinite.... correct to 0.0001, for the range 1 < x < 100 in steps of 0.1.But i am getting an syntax error,as i am new to programming in python... from scipy import * from matplotlib.pyplot import * x=arange(0.1,100,0.1) f=zeros(len(x)) s=-1 for n in range (1,10000): t=s*x/(x*x+n*n) f +=t s =-s if max(abs(t))< 1e-4 break for xx in c_[x,f]: print "%f %f" % (xx[0],xx[1])

    Read the article

  • iOS - How to iterate through list of files on website directory

    - by svjim
    On iOS, I am looking for the proper way to return the URLs for a list of files that are in a directory. /images 1.jpg 2.jpg 3.jpg ... I know the URL for the directory and know all the files in the directory will be of type jpeg. It is not clear to me how to properly format the NSURLRequest to return the list of files in the images directory. Once the list is returned, I will iterate through it to return the individual images.

    Read the article

  • PHP PDO Username Availability Checker

    - by John Bernal
    I'm building a registration page that uses JQuery's validator plugin to validate the form. For the username, i used the remote method. So here's my jquery+html code: fiddle And here's Available.php: <?php $usr = $_POST["username"]; $link = new PDO('mysql:***;dbname=***;charset=UTF-8','***','***'); $usr_check = $link->prepare("SELECT * FROM Conference WHERE Username = :usr"); $link->bindParam(':usr', $usr); $usr_check->execute(); if($usr_check->rowCount()>0) echo "false"; else echo "true"; ?> So I have a test account in my database with the username: user. When I tried to submit my form with the same username, it didn't display the error saying "username taken" which means the php isn't correct. Any ideas where I went wrong? Thanks

    Read the article

  • LINQ query to find if items in a list are contained in another list

    - by cjohns
    I have the following code: List<string> test1 = new List<string> { "@bob.com", "@tom.com" }; List<string> test2 = new List<string> { "[email protected]", "[email protected]" }; I need to remove anyone in test2 that has @bob.com or @tom.com. What I have tried is this: bool bContained1 = test1.Contains(test2); bool bContained2 = test2.Contains(test1); bContained1 = false but bContained2 = true. I would prefer not to loop through each list but instead use a Linq query to retrieve the data. bContained1 is the same condition for the Linq query that I have created below: List<string> test3 = test1.Where(w => !test2.Contains(w)).ToList(); The query above works on an exact match but not partial matches. I have looked at other queries but I can find a close comparison to this with Linq. Any ideas or anywhere you can point me to would be a great help.

    Read the article

  • Double Linked List header node keeps returning first value as 0

    - by Craig
    I will preface to say that this is my first question. I am currently getting my Masters degree in Information Security and I had to take C++ programming this semester. So this is homework related. I am not looking for you to answer my homework but I am running into a peculiar situation. I have created the program to work with a doubly linked list and everything works fine. However when I have the user create a list of values the first node keeps returning 0. I have tried finding some reading on this and I cannot locate any reference to it. My question is then is the header node(first node) always going to be zero? Or am I doing something wrong. case: 'C': cout<<"Please enter a list:"<<endl; while(n!=-999){ myList.insert(n); cin>> n;} break; I now enter: 12321, 1234,64564,346346. The results in 0, 12321, 1234, 64564,346346. Is this what should happen or am I doing something wrong? Also as this is my first post please feel free to criticize or teach me how to color code the keywords. Anyway this is a homework assignment so I am only looking for guidance and constructive criticism. Thank you all in advance So I cannot figure out the comment sections on this forum so I will edit the original post The first section is the constructor code: template <class Type> doublyLinkedList<Type>::doublyLinkedList() { first= NULL; last = NULL; count = 0; } Then there is my insert function : template <class Type> void doublyLinkedList<Type>::insert(const Type& insertItem) { nodeType<Type> *current; //pointer to traverse the list nodeType<Type> *trailCurrent; //pointer just before current nodeType<Type> *newNode; //pointer to create a node bool found; newNode = new nodeType<Type>; //create the node newNode->info = insertItem; //store the new item in the node newNode->next = NULL; newNode->back = NULL; if(first == NULL) //if the list is empty, newNode is //the only node { first = newNode; last = newNode; count++; } else { found = false; current = first; while (current != NULL && !found) //search the list if (current->info >= insertItem) found = true; else { trailCurrent = current; current = current->next; } if (current == first) //insert newNode before first { first->back = newNode; newNode->next = first; first = newNode; count++; } else { //insert newNode between trailCurrent and current if (current != NULL) { trailCurrent->next = newNode; newNode->back = trailCurrent; newNode->next = current; current->back = newNode; } else { trailCurrent->next = newNode; newNode->back = trailCurrent; last = newNode; } count++; }//end else }//end else }//end Then I have an initialization function too: template <class Type> void doublyLinkedList<Type>::initializeList() { destroy(); } Did I miss anything?

    Read the article

  • Get object from arraycollection

    - by Nll
    I have a problem about to get an object from arraycollection of objects with Id,so I do : protected $_rootObject; public function __construct(myClasse $rootObject) { $this->_rootObject= $rootObject; } public function getObjectById($id) { $value = null; foreach($this->_rootObject as $root) { if ($id == $root->getId()) { $value = $root; break; } } return $value; } Then the function return "NULL" so it's dosn't work...

    Read the article

  • How should I link two items with MouseMovementListeners?

    - by user1708810
    I'm working on a program that will display two "views" of the same set of items. So I need to have something set up so that when the top down view is changed, the side view is updated (and vice versa). Here's a brief outline of the relevant code so you can get an idea of my structure so far: public class DraggableComponent extends JComponent { //Contains code for MouseMovementListener that makes the item draggable } public class ItemGraphic extends DraggableComponent { //Code to render the graphic } public class Item { private ItemGraphic topGraphic; private ItemGraphic sideGraphic; } I'm able to get each graphic to display fine in my GUI. I can also independently drag each graphic. I'm missing the "linking." Some ideas I've been thinking about: Have one listener for the whole GUI. Loop through each Item and if the cursor is within the bounds of either graphic, move the other graphic. I'm concerned about the efficiency of this method. Multiple "paired" listeners (not quite sure how this would work, but the idea is that each graphic would have a listener for the other paired graphic)

    Read the article

  • Capacity Allocation

    - by user1708730
    I am new to VB in Excel. I have a unique requirement for capacity allocation which I want to automate using excel VB and facing hard time doing so, hope you can help. The objective is to maximize profit by allocating maximum capacity to those products which have highest profit potential first. Every Month I get demand along with backlogs of previous month. I need to allocate capacity to backlogs of previous month first and then only the remaining capacity for fresh demand. There are two primary constraints: 1.The number of working days in a month (variable) 2. Not all products can be made on every production line and out of same product may be different for each production line Also there will be losses whenever there is a change over from one SKU to another depending upon the Variant Type and size of next product. If there is variant change then 8 hours of production loss needs to be accounted and 4 hours in case of size change(8 hours in case of both). I have attached sample data(Actual data has 10 production lines and 50 products) https://rapidshare.com/files/1822719405/Sample%20Data.xlsx?bin=1 Thanks in advance for help!

    Read the article

  • What is the purpose of AnyVal?

    - by DaoWen
    I can't think of any situation where the type AnyVal would be useful, especially with the addition of the Numeric type for abstracting over Int, Long, etc. Are there any actual use cases for AnyVal, or is it just an artifact that makes the type hierarchy a bit prettier? Just to clarify, I know what AnyVal is, I just can't think of any time that I would actually need it in Scala. When would I ever need a type that encompassed Int, Character and Double? It seems like it's just there to make the type hierarchy prettier (i.e. it looks nicer to have AnyVal and AnyRef as siblings rather than having Int, Character, etc. inherit directly from Any).

    Read the article

  • Loop to check all 14 days in the pay period

    - by Rachel Ann Arndt
    Name: Calc_Anniversary Input: Pay_Date, Hire_Date, Termination_Date Output: "Y" if is the anniversary of the employee's Hire_Date, "N" if it is not, and "T" if he has been terminated before his anniversary. Description: Create local variables to hold the month and day of the employee's Date_of_Hire, Termination_Date, and of the processing date using the TO_CHAR function. First check to see if he was terminated before his anniversary. The anniversary could be on any day during the pay period, so there will be a loop to check all 14 days in the pay period to see if one was his anniversary. CREATE OR replace FUNCTION Calc_anniversary( incoming_anniversary_date IN VARCHAR2) RETURN BOOLEAN IS hiredate VARCHAR2(20); terminationdate VARCHAR(20); employeeid VARCHAR2(38); paydate NUMBER := 0; BEGIN SELECT Count(arndt_raw_time_sheet_data.pay_date) INTO paydate FROM arndt_raw_time_sheet_data WHERE paydate = incoming_anniversary_date; WHILE paydate <= 14 LOOP SELECT To_char(employee_id, '999'), To_char(hire_date, 'DD-MON'), To_char(termination_date, 'DD-MON') INTO employeeid, hiredate, terminationdate FROM employees, time_sheet WHERE employees.employee_id = time_sheet.employee_id AND paydate = pay_date; IF terminationdate > hiredate THEN RETURN 'T'; ELSE IF To_char(SYSDATE, 'DD-MON') = To_char(hiredate, 'DD-MON')THEN RETURN 'Y'; ELSE RETURN 'N'; END IF; END IF; paydate := paydate + 1; END LOOP; END; Tables I am using CREATE TABLE Employees ( EMPLOYEE_ID INTEGER, FIRST_NAME VARCHAR2(15), LAST_NAME VARCHAR2(25), ADDRESS_LINE_ONE VARCHAR2(35), ADDRESS_LINE_TWO VARCHAR2(35), CITY VARCHAR2(28), STATE CHAR(2), ZIP_CODE CHAR(10), COUNTY VARCHAR2(10), EMAIL VARCHAR2(16), PHONE_NUMBER VARCHAR2(12), SOCIAL_SECURITY_NUMBER VARCHAR2(11), HIRE_DATE DATE, TERMINATION_DATE DATE, DATE_OF_BIRTH DATE, SPOUSE_ID INTEGER, MARITAL_STATUS CHAR(1), ALLOWANCES INTEGER, PERSONAL_TIME_OFF FLOAT, CONSTRAINT pk_employee_id PRIMARY KEY (EMPLOYEE_ID), CONSTRAINT fk_spouse_id FOREIGN KEY (SPOUSE_ID) REFERENCES EMPLOYEES (EMPLOYEE_ID)) / CREATE TABLE Arndt_Raw_Time_Sheet_data ( EMPLOYEE_ID INTEGER, PAY_DATE DATE, HOURS_WORKED FLOAT, SALES_AMOUNT FLOAT, CONSTRAINT pk_employee_id_pay_date_time PRIMARY KEY (EMPLOYEE_ID, PAY_DATE), CONSTRAINT fk_employee_id_time FOREIGN KEY (EMPLOYEE_ID) REFERENCES EMPLOYEES (EMployee_ID)); error FUNCTION Calc_Anniversary compiled Warning: execution completed with warning

    Read the article

  • Which SQL statements to execute with intersection / junction tables

    - by user1455103
    Here a simplified database layout One condo can hold multiple properties (flats, garage boxes, etc) - 1->n relationship One owner can have multiple properties in the same condo and properties can have more than one owner (m->n changed to 1->n with the junction table) One condo can have multiple owners - 1->n Some additional clarification: A owner is a member of a condo. A condo is made of properties belonging to owners BUT a owner is not linked to a property directly (there can be no relation between a property and a owner for a certain time BUT there will ALWAYS be a relation between a owner and a condo). Reason for this: the agent managing the condo will first create a list of owners and a list of properties. It is only later thet he will "link" each property to one or multiple owners (or inversely) I'm quite new to SQL. What SQL statements should I execute to: SELECT, for a specific condo (WHERE condition), the properties and their respective owners (all properties should be listed even if owners are null) SELECT, for a specific condo (WHERE condition), the owners along with their properties (all owners should be listed even if properties are null) UPDATE / DELETE existing owners (I'm uncertain about how to handle the operation for the junction tables. Should I first check if there is an entry in the junction table or not ?) UPDATE / DELETE existing properties (same concern) INSERT new owners (should I use two different SQL statements depending if the owner should be linked to a property or NOT - IF condition ?) INSERT new properties (same question as above) Could you be as clear and generic as possible so that it can be reused ? :-)

    Read the article

  • iOS 6: UUIDString on iPhone 3GS

    - by gpiazzese
    I've been working on ASIdentifierManager framework to get the new UUIDString, the identifier should replace in iOS 6 the UDID, and can be stopped or not by the user for Settings. Everything is ok on simulators and iPhone 4S, but on iPhone 3GS (it's iOS 6 updated!) I'm getting as UUIDString the following: 00000000-0000-0000-0000-000000000000 This is how I'm getting it: if ([ASIdentifierManager sharedManager]) NSLog(@"%@", [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]); Does anyone know why? Have you encountered this problem? Thanks

    Read the article

  • How to make a jquery datePicker button image unclickable

    - by Farzana
    I have a jquery UI datePicker in my page. I have a text box on which the date is displayed. The code is: $("#cal").datepicker({ minDate: new Date(), defaultDate: new Date(), buttonImage: '/images/calendar.gif', constrainInput: false, closeText: 'Close', showButtonPanel: true, showButtonText: 'Choose a date', buttonImageOnly : true, showOn : 'button' }); $("#till").datepicker('setDate', today); I want to disable this on some conditions. I use the following code to disable: $("#cal").datePicker('disable'); It blacks out the text box but the image is still clickable. The problem is in IE, the date picker pop up comes up but does not close when the image button associated with the date picker is clicked. I also tried to bind a onclick function with the image to make it non-clickable. But that does not work as well. How can make the date picker image button non-clickable when the date picker is disabled. Any help would be appreciated. Thanks, Farzana

    Read the article

  • CakePHP: Missing database table

    - by Justin
    I have a CakePHP application that is running fine locally. I uploaded it to a production server and the first page that uses a database connection gives the "Missing Database Table" error. When I look at the controller dump, it's complaining about the first table. I've tried a variety of things to fix this problem, with no luck: I've confirmed that at the command line I can login with the given MySQL credentials in database.php I've confirmed this table exists I've tried using the MySQL root credentials (temporarily) to see if the problem lies with permissions of the user. The same error appeared. My debug level is currently set to 3 I've deleted the entire contents of /app/tmp/cache I've set 777 permissions on /app/tmp* I've confirmed that I can run DESCRIBE commands at the commant line MySQL when logged in with the MySQL credentials used by by the application I've verified that the CakePHP log file only contains the error I'm setting in the browser window. I've tried all the suggestions I could find in similar postings on SO I've Googled around and didn't find any other ideas I think I've eliminating the obvious problems and my research isn't turning anything up. I feel like I'm missing something obvious. Any ideas?

    Read the article

  • Setting the paper size

    - by rajaneesh
    Please help me how to set paper size in c# code . i am using api printDocument .. my code is ppvw = new PrintPreviewDialog(); ppvw.Document = printDoc; ppvw.PrintPreviewControl.StartPage = 0; ppvw.PrintPreviewControl.Zoom = 1.0; ppvw.PrintPreviewControl.Columns = 10; // Showing the Print Preview Page printDoc.BeginPrint += new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint); printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage); if (ppvw.ShowDialog() != DialogResult.OK) { printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint); printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage); } printDoc.PrinterSettings.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("a2", 5.0,5.0); printDoc.Print();

    Read the article

  • HELP Retrieving the url parameter from a JSON store from a EXTJS ComboBox

    - by Newbie
    I am having a problem retrieving the parameters from the url section of a json store for a combobox in EXTJS from my code behind page in c#. The following is the code in the store: var ColorStore = new Ext.data.JsonStore( { autoLoad: true, url: '/proxies/ReturnJSON.aspx?view=rm_colour_view', root: 'Rows', fields: ['company', 'raw_mat_col_code', 'raw_mat_col_desc'] }); And the following code is in my code behind page: protected void Page_Load(object sender, EventArgs e) { string jSonString = ""; connectionClass.connClass func = new connectionClass.connClass(); DataTable dt = func.getDataTable("sELECT * from rm_colour_view"); //Response.Write(Request.QueryString["view"]); string w = Request.Params.Get("url"); string z = Request.Params.Get("view"); string x = Request.Params.Get("view="); string c = Request.Params.Get("?view"); string s = Request.QueryString.Get("view"); string d = Request.Params["?view="]; string f = Request.Form["ColorStore"]; jSonString = Serialize(dt); Response.Write(jSonString); } The string w has gives the following output: /proxies/ReturnJSON.aspx but all the others strings return null... How can rm_colour_view from the datastore then be retrived??? Any help would be appreciated! Thanks

    Read the article

  • First Impressions of a MacBook (from a PC guy)

    - by dgreen
    Disclaimer: I've been a PC guy my entire working career. I'd probably characterize myself as a power user. Never afraid to bust out the console line. But working with a Mac is totally foreign to me. So for those Mac guys who are curious, this is how your world appears from the outside to a computer literate person :)My Macbook Air has arrived! And it's a thing of beauty:First, the specs: 13" MacBook Air, 2.0GHz Core i7 processor. Upgraded to 8GB of RAM for an additional $100, SSD flash storage  = 256GB. The plan is ultimately to use this baby for some iOS development but also some decent lifting in Windows with Visual Studio. Done a lot of reading  and between VMWare Fusion, Parallels and Bootcamp...I'm going to go with VMWare Fusion for $49.99And now my impressions (please re-read disclaimer before proceeding!):I open the box and am trying to understand exactly how the magsafe connector works (and how to disconnect it).  Why does it have two socket outlet plugs? Who knows.  I feel like Hansel in Zoolander. The files are "in" the computer.Stuck in my external hard drive (usb). So how do I get to the files? To the Googles!Argh...it can't read my external NTFS drive. Fat32 can't support field over 4GB…problematic since some of my existing VMWare image files are much larger than 4GB. Didn't see this coming.Three year old loves iPhoto. Super easy to use. Don't even know what I'm doing but I've already (accidentally) discovered the image filtering options. Fun stuff.First thing I downloaded ever => Chrome. I need something to ground me, something familiar. My token, if you will (sorry, gratuitous Inception joke).Ok, I get it… Finder == windows explorer. But where is my hierarchical structure? I miss the tree :(On that note, yeah…how do I see what "path" my files reside in? I'm afraid to know the answer. You know what scares more though…this notion of a smart folder. Feel like the godfather - just get the job done, I don't care how you handle it, I don't want to know...just get it done. What the hell is AirDrop?Mail…just worked. Still in shock that they have a free client for yahoo mail (please no yahoo jokes).mail -> deleting a message takes 5 seconds. Have they heard of async?"Command" key instead of "Control" ok, then what the $%&^! is the control key for then"aliases" == shortcuts I thinkI don't see the file system. And I'm scared. All these things I'm downloading…these .dmg files (bad name) where are they going? Can't seem to delete when they're doneUgh...realized need to buy a mini-to-vga adaptor if I want to use my external monitor ($13 on ebay, $39 in apple store).Windows docking is trickiest for me…this notion of detached windows with a menu bar at the top. I don't like this paradigm, it's confusing. But maybe because I've been using Windows for too long.Evernote, Dropbox desktop clients seem almost identical…few quirks here and there I need to get used to.iTunes is still a bit gross. In a weird way it's actually worse on a Mac if thats possible. This is not the MacBook's fault…this is a software design issue. Overall: UI will take some getting used to. Can't decide if this represents the future and I'm stuck in the past…or this is the past and I've been spoiled by the future (which would be Windows…don't be hating I happen to be very productive in Win7)  So there you go - my 90 minute first impression of the MacBook universe.

    Read the article

  • TCP dies on a Linux laptop

    - by Roman Cheplyaka
    Once in several days I have the following problem. My laptop (Debian GNU/Linux testing) suddenly becomes unable to work with TCP connections to the internet. The following things continue to work fine: UDP (DNS), ICMP (ping) — I get instant response TCP connections to other machines in the local network (e.g. I can ssh to a neighbour laptop) everything is ok for other machines in my LAN But when I try TCP connections from my laptop, they time out (no response to SYN packets). Here's a typical curl output: % curl -v google.com * About to connect() to google.com port 80 (#0) * Trying 173.194.39.105... * Connection timed out * Trying 173.194.39.110... * Connection timed out * Trying 173.194.39.97... * Connection timed out * Trying 173.194.39.102... * Timeout * Trying 173.194.39.98... * Timeout * Trying 173.194.39.96... * Timeout * Trying 173.194.39.103... * Timeout * Trying 173.194.39.99... * Timeout * Trying 173.194.39.101... * Timeout * Trying 173.194.39.104... * Timeout * Trying 173.194.39.100... * Timeout * Trying 2a00:1450:400d:803::1009... * Failed to connect to 2a00:1450:400d:803::1009: Network is unreachable * Success * couldn't connect to host * Closing connection #0 curl: (7) Failed to connect to 2a00:1450:400d:803::1009: Network is unreachable Restarting the connection and/or reloading the network card kernel module doesn't help. The only thing that helps is reboot. Clearly something is wrong with my system (everything else works fine), but I have no idea what exactly. I don't know how to reproduce this, but as I said, it happens every several days. My setup is a wireless router that is connected to the ISP via PPPoE. Any advice?

    Read the article

  • CentOS tftp server is broken

    - by Mike Pennington
    I'm trying to run tftpd from xinetd on CentOS 6; however, I can only tftp from localhost. I have a file in /opt/tftpboot/fw.test.conf that I can retrieve if I tftp to localhost: [mpenning@localhost ~]$ tftp localhost tftp> get fw.test.conf tftp> quit [mpenning@localhost ~]$ ls fw.test.conf [mpenning@localhost ~]$ However, I cannot receive this file if I tftp to eth1 on this server (the address on eth1 is 172.16.1.4). [mpenning@localhost ~]$ sudo tshark -i eth1 udp and host 172.16.1.5 Running as user "root" and group "root". This could be dangerous. Capturing on eth1 0.000000 172.16.1.5 -> 172.16.1.4 TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000 5.000133 172.16.1.5 -> 172.16.1.4 TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000 10.000184 172.16.1.5 -> 172.16.1.4 TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000 15.000297 172.16.1.5 -> 172.16.1.4 TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000 20.000331 172.16.1.5 -> 172.16.1.4 TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000 ^C5 packets captured [mpenning@localhost ~]$ I have the following xinetd configuration: [root@localhost mpenning]# cat /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /opt/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } [root@localhost mpenning]#

    Read the article

  • environment variables generated by at command

    - by Jordan Arseno
    I'm inspecting /var/spool/cron/atjobs/a001cf01570e44 with cat, after running the at command from PHP using exec(). It looks like at has prepended the script with lots of APACHE environment variables. #!/bin/sh # atrun uid=33 gid=33 # mail www-data 0 umask 22 APACHE_RUN_DIR=/var/run/apache2; export APACHE_RUN_DIR APACHE_PID_FILE=/var/run/apache2.pid; export APACHE_PID_FILE PATH=/usr/local/bin:/usr/bin:/bin; export PATH APACHE_LOCK_DIR=/var/lock/apache2; export APACHE_LOCK_DIR LANG=C; export LANG APACHE_RUN_USER=www-data; export APACHE_RUN_USER APACHE_RUN_GROUP=www-data; export APACHE_RUN_GROUP APACHE_LOG_DIR=/var/log/apache2; export APACHE_LOG_DIR PWD=/home/jordanarseno/webroot/public_html/myapp; export PWD cd /home/jordanarseno/webroot/public\_html/myapp || { echo 'Execution directory inaccessible' >&2 exit 1 } curl -k http://localhost/myapp/crons/this_action/3 The last line is the only real command I sent along with at via stdin. What is the purpose of these variables? Where is this procedure stored?

    Read the article

  • Error Installing ruby with RVM Single User mode on Arch Linux

    - by ChrisBurnor
    I've just installed RVM on ArchLinux x64 in single user mode via the recommended install script curl -L https://get.rvm.io | bash -s stable I've also installed all the requirements listed in rvm requirements However, I'm having trouble actually installing any version of ruby. And getting the following error: arch:~ % rvm install 1.9.3 No binary rubies available for: ///ruby-1.9.3-p194. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Fetching yaml-0.1.4.tar.gz to /home/christopher/.rvm/archives % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 460k 100 460k 0 0 702k 0 --:--:-- --:--:-- --:--:-- 767k Extracting yaml-0.1.4.tar.gz to /home/christopher/.rvm/src Prepare yaml in /home/christopher/.rvm/src/yaml-0.1.4. Configuring yaml in /home/christopher/.rvm/src/yaml-0.1.4. Error running ' ./configure --prefix=/home/christopher/.rvm/usr ', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/configure.log Compiling yaml in /home/christopher/.rvm/src/yaml-0.1.4. Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/yaml/make.log Please note that it's required to reinstall all rubies: rvm reinstall all --force Installing Ruby from source to: /home/christopher/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection... ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /home/christopher/.rvm/src/ruby-1.9.3-p194 ruby-1.9.3-p194 - #extracted to /home/christopher/.rvm/src/ruby-1.9.3-p194 Skipping configure step, 'configure' does not exist, did autoreconf not run successfully? ruby-1.9.3-p194 - #compiling Error running 'make', please read /home/christopher/.rvm/log/ruby-1.9.3-p194/make.log There has been an error while running make. Halting the installation. The log files are as follows: arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/configure.log __rvm_log_command:32: permission denied: arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/yaml/make.log make: *** No targets specified and no makefile found. Stop. arch:~ % cat ~/.rvm/log/ruby-1.9.3-p194/make.log make: *** No targets specified and no makefile found. Stop.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >