So I am trying to make my own version of chmod using C, the modifications are to make lowercase add permissions while uppercase remove permissions (instead of using + or - to add and remove). Also, I am trying to print a help message and exit if the command cannot be properly parsed, or there is no file specified. In the case I cannot change permissions (like in the instance I am not the user owner of the file) it should mark that file as having an exit status of 2. I have two versions, the first works ok, still …

Member Avatar
Member Avatar
+0 forum 1

I'm having an issue with coding a script that enables a logged in user to change his/her password. But when the form is submitted, a strange, blank page is displayed. There's no error message. Can you guys please, help me to resolve this issue? I'm not yet proficient in PHP and need all the insight I can get, to get my script to work fine. Here is the modifypass.php file: <?php // configuration require("../includes/config.php"); // if form was submitted if ($_SERVER["REQUEST_METHOD"] == "POST") { // validate submission if (empty($_POST["curpassword"])) { apologize("You must provide your current password."); } else if (empty($_POST["newpassword"])) …

Member Avatar
Member Avatar
+0 forum 11

login.php <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="main.css" /> <link rel="stylesheet" type="text/css"href="menu.css" /> <title>iWebTechnik</title> <link rel="shortcut icon" href="image/favicon.ico" type="x-icon" /> <link rel="icon" href="image/favicon.ico" type="x-icon" /> <style type="text/css"> <!-- .style1 {font-family: Arial, Helvetica, sans-serif} --> </style> <link href="a.css" rel="stylesheet" type="text/css" /> <script src="js-image-slider.js" type="text/javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <link href="conatiner2.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style3 { font-family: "Times New Roman", Times, serif; font-size: 16px; color: #FFFFFF; } .style4 {color: #CCCCCC} --> </style> </head> <body> <?php include('header.php'); ?> <div id="header1"></div> <div id="wrapper"> <div id="navigator"> <ul …

Member Avatar
Member Avatar
+0 forum 2

I'm a beginner to vb6.. I'm doing a attendance project. I'm using datagrid to view the details from database. i'm trying to update the database through datagrid. can any one help please.. i've searched every where data adapter is used to update. i can't find anyother sources..

Member Avatar
+0 forum 0

Hi! I have a form in Drupal that is filled up by an user and sent as email to the server. I have created a new module to modify the values in the form after the user submit it and to send them to the server with new values. Here is my code: function medilux_cm_form_alter (&$form, $form_state, $form_id) { if ($form_id == "webform_client_form_59") { $form['#submit'][] = 'medilux_custom_webform_submit'; } } function medilux_custom_webform_submit($form, $form_state){ foreach($form_state['values']['submitted'] as $key => $value){ $form_state['values']['submitted'][$key] = 'new_value_' . $key; }; } Please advise what is wrong in this code.

Member Avatar
Member Avatar
+0 forum 1

Hi, I would like to know how I would modify the close (X) button in the GUI. For example, I would like to be able to have the user click on it and the program to bring up a message box from the MessageBox::Show() function that I type in. This is in a CLI project in Visual C++ 2010.

Member Avatar
Member Avatar
+0 forum 1

#include <iostream> #include <windows.h> #include <fstream> #include <string> using namespace std; class Entry { public: char name[50]; int id; float sal; bool b; Entry *next; void clear(Entry *head,Entry *tail) { while(head!=NULL) { head=tail->next; delete tail; tail=head; } } }; int main () { ifstream myfile1; ofstream myfile2; char *buff="",temp[256]=""; int i,length; Entry *head=NULL,*tail=NULL,*e=new Entry(); do { cout<<"Enter ur option"<<endl; cout<<"1.Load data into file"<<endl; cout<<"2.Save data into file"<<endl; cout<<"3.Read data from file"<<endl; cout<<"4.Close the file"<<"\n"; cin>>i; switch(i) { case 1: if(head==NULL) { head=tail=new Entry(); } else { if(head->next==NULL) head->next=tail->next=new Entry(); else tail->next=new Entry(); tail=tail->next; } if(head==tail) { head->next=tail->next=NULL; } cout<<"Enter name\t"; …

Member Avatar
Member Avatar
+0 forum 2

I am using PHP Simple HTML DOM Parser * [Manual] to fetch data from websites. Now what i wanna do is to remove first three words from all span which has `class="yeah"` from the fetched content So i have implement this code but it has a problem: foreach($html->find('span.yeah') as $xdat) { $x_des = implode(' ', array_slice(explode(' ', strip_tags($xdat)), 0, 3)); $result = str_replace($x_des, ' ', $result); $result = str_get_html($result); } Though it delete first three words from all `<span class="yeah">` but the problem is, this modify full fetched content. But i wanna modify only those data whose are in `<span …

Member Avatar
Member Avatar
+0 forum 2

Hi All, I have the following mobile re direct script working on one website, but not another, For some reason I am getting the error - Can not modify headers information - header already sent - etc etc On line 20 Any ideas why this would work for one website and not the other ? ` <?php //Config $url = "http://m.domain.com"; //detection $ua = strtolower($_SERVER['HTTP_USER_AGENT']); //Android if(strstr($ua,'android')) { // &amp;&amp; stripos($ua,'mobile') !== false) { header('Location: '.$url); exit(); } //iOS if(strstr($ua,'iphone') || strstr($ua,'ipod') || strstr($ua,'ipad')); { header('Location: '.$url); exit(); } //BlackBerry if(strstr($ua,'lackerry') || strstr($ua,'playbook')) { header('Location: '.$url); exit(); } //WindowsPhone if(strstr($ua,' …

Member Avatar
Member Avatar
+0 forum 26

Hello, im new to asm, and im trying to code some kind of notepad. At the moment, my program create a file, and open a file. Now i want to be able to edit the opened file. I ve thought in one option: When i open the file, it shows it in the console, so one option is to give the user the option of modify the console text, and then, when i need to save the file, take all the text in screen and rewrite it over the original txt. I know how to give the user the option …

Member Avatar
+0 forum 0

i have a script which will fetch content from a website, what i wanna do is modify all that links. Suppose: $html = str_get_html('<h2 class="r"><a class="l" href="http://www.example.com/2009/07/page.html" onmousedown="return curwt(this, 'http://www.example.com/2009/07/page.html')">SEO Result Boost <b> </b></a></h2>'); so, is it possible to modify or rewrite it in this way> <h2 class="r"><a class="l" href="http://www.site.com?http://www.example.com/2009/07/page.html">SEO Result Boost <b> </b></a></h2> I have read it's manual but can not understand how to figure it ( http://simplehtmldom.sourceforge.net/#fragment-12 ) Is It Possible, Any Idea?

Member Avatar
Member Avatar
+0 forum 5

can anyone kindly help me in writing a program for creating an address book. Its kinda urgent and I ll be really grateful. program description: develop a program for an address book.single entry in an address book is called a contact, which can have any of the following fields, 1. first name 2. last name 3. nickname 4. email1 5. email2 7. phone1 8. phone2 9. address 10.website 11.birthday 12.notes a contact must have at least one of the first four fields to be valid.in the address book the user should be able to 1.add a contact 2.display all contacts …

Member Avatar
Member Avatar
+0 forum 2

can anyone kindly help me in writing a program for creating an address book. Its kinda urgent and I ll be really grateful. program description: develop a program for an address book.single entry in an address book is called a contact, which can have any of the following fields, 1. first name 2. last name 3. nickname 4. email1 5. email2 7. phone1 8. phone2 9. address 10.website 11.birthday 12.notes a contact must have at least one of the first four fields to be valid.in the address book the user should be able to 1.add a contact 2.display all contacts …

Member Avatar
Member Avatar
+0 forum 3

Write and test a function to meet this specification: squareEach(nums) nums is a LIST of numbers. Modifies the list by squaring each entry. [CODE]def squareEach(nums): for number in nums: number = number ** 2 return number def main(): nums = [3,4] print(squareEach(nums)) main()[/CODE] The output in this case is 9... I tried moving the return statement back one tab, but then the output would be 16. I need it to print both 9 and 16.

Member Avatar
Member Avatar
+0 forum 3

Hello, I am working on a program for school and this is my first experience with arrays of objects. I am passing the array of objects into a function, and from within that function I am running another function that takes an individual object from the array as an arguemnt and then modifies some of its variables (the variables are public). It takes all of the arguemnts fine and no errors come up, however when I access the variables from within my main, they are not the modified versions that they are when accessed in my function. So overall my …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am attempting to read in a CSV file, modify certain arrays and output it into a new file. It works fine on a mac, however on Windows it does not do anything. Any ideas what im doing wrong? Code posted below; [CODE] open(FILE,"file.csv") or die $!; open(TARGET,"> newfile.csv") or die $!; while($line = <FILE>){ chomp($line); next unless($line =~ m/\S+/); @array = split("‰",$line); if ($array[3] == 2) { $array[3] = "Read"; } $line = join("‰",@array); print TARGET $line ."\n"; } close FILE; close TARGET; [/CODE] Thank you for your help, Tango

Member Avatar
Member Avatar
+0 forum 22

I need some help with sizing an image in height. My page is tzr.ro, and as you can see in some browsers such as explorer and chrome the image height differs. So i have this small piece of code that i need to adjust: img { max-width : 350px; height : 100%; border : none; } So if you could give me a hint on how to modify this, I'd appreciate it :) Thanks!

Member Avatar
Member Avatar
+0 forum 3

I'm taking an advanced C++ class now, and everything up to now has been pretty simple (mostly review stuff), but now we got to binary file io and it's kicking my butt. This program is supposed to read from a file called "Hardware.dat" (or create it if it doesn't exist), and allow the user to manipulate the data by adding a new record, modifying an existing record, deleting a record, and display all the records. Each record contains the record number, name, quantity, cost, and a flag telling if it's active or not. Adding a record is no problem. Modifying …

Member Avatar
Member Avatar
+0 forum 5

Hello i have created a webpage for a project using jsp in netbeans. I have created a listbox. I want it to display data from database(MS-access) and I should then be able to modify data in database like I should be able to change an entire record through the listbox when i enter the id(field) when i enter the id it should show the data of all the fields in a listbox and then i can should be able to change the entries in the database.

Member Avatar
Member Avatar
+0 forum 2

Hello , I would like to modify this script a bit . It is a video upload script for my site . The php content contains all the neccessary fields and upload via browse files only . I would like to make it another optional such as remote/url upload . There have to be 2 optional uploads , whether via browse file or url upload . The php script is below : - [CODE] {literal} <script type="text/javascript"> var video_allowed_extensions = /(avi|mpg|mov|asf|mpeg|xvid|divx|3gp|mkv|3gpp|mp4|rmvb|rm|dat|wmv|flv|ogg)$/i; </script> {/literal} <script type="text/javascript" src="{$baseurl}/js/jquery.upload-0.1.php"></script> <div id="content"> {include file="memberside.tpl"} <!-- RIGHT --> <div class="right span-653"> <div class="box"> <div class="bsub">&nbsp;</div> …

Member Avatar
Member Avatar
+0 forum 8

Hi there, I got this annoying problem... I have to create dynamically an image control that has got to be accesses later through javascript. In other words, I got an image that was created in the page code, and using javascript I got to be able to work with it The image ID of a previously created image is uxTimerImage, and I've tried accessing it with the following code: [CODE] uxTimerImage = new Image(); uxTimerImage.ID = "uxTimerImage"; ... this.Controls.Add(uxTimerImage); ClientScript.RegisterClientScriptBlock(this.GetType(),"timer", "var timerObject1 = document.getElementById('" + uxTimerImage.ID + "');"+ "var timerObject2 = document.getElementById('<%= uxTimerImage.ClientID %>');"+ "var timerObject3 = document.getElementById('uxTimerImage');", true);[/CODE] The …

Member Avatar
Member Avatar
+0 forum 3

I have a set of text files in a folder. I want to read each file, convert the contents of the file to lowercase, remove punctuations and save them all in another directory with the same filenames. How can i do that???

Member Avatar
Member Avatar
+0 forum 2

Hi! I'm looking for a way to search and replace certain strings in a database table I have. Those are the commands I execute now from within phpmyadmin: [CODE]UPDATE `feeds` SET `title` = REPLACE(`title`,"ă","a") UPDATE `feeds` SET `title` = REPLACE(`title`,"î","i") UPDATE `feeds` SET `title` = REPLACE(`title`,"ÅŸ","s") UPDATE `feeds` SET `title` = REPLACE(`title`,"Å£","t") UPDATE `feeds` SET `title` = REPLACE(`title`,"â","a") UPDATE `feeds` SET `text` = REPLACE(`text`,"ă","a") UPDATE `feeds` SET `text` = REPLACE(`text`,"î","i") UPDATE `feeds` SET `text` = REPLACE(`text`,"ÅŸ","s") UPDATE `feeds` SET `text` = REPLACE(`text`,"Å£","t") UPDATE `feeds` SET `text` = REPLACE(`text`,"â","a")[/CODE] The problem is I cannot do this every day and I need …

Member Avatar
Member Avatar
+0 forum 13

The End.