Well, I've been learning Java and I managed to create an FTP client that uploads and downloads files from a server. Oddly, the thing I can't figure out is how to do an FTP delete. Can anyone help me on that? I don't want to use an API or someone else's class. (How would I learn from that? ;) I've tried looking through some existing API's for hints, but their too complicated for me to figure out. You have to go from function to function in tons of files and I still don't get it. Any help or suggestions would …

Member Avatar
Member Avatar
+0 forum 21

Hi, i'm using vb.net and i have connected a database to it. As per my interface i should add, delete,go back,go next and save my records. All the buttons work apart from delete. The problem is i do not know the codes for deleting a particular record during the run time, can anyone help me out with the codes and steps of deleting a particular record.

Member Avatar
Member Avatar
+0 forum 14

As it seems to come up often enough I figured I'd throw together a quick snippet outlining basic methods for data manipulation in SQL Server using C#. In all examples the coder will need to substitute their own connection string details and variables. I utilised parameters for 3 of the examples but they can just as easily be replaced by direct references to dynamic controls in your application if desired. The benefit of parameters, however, is that they set the 'type' of the variable being passed and add an additional level of type checking to the app. I'm hoping I …

Member Avatar
Member Avatar
+2 forum 13

Hi, im using vb2010 with MS Access 2013. I have this form that displays ID values from database into a listbox And when an ID is clicked the details that correspond with that ID are displyed into textboxes. Screenshots : Forms : http://imgur.com/a/NrTTD Display details : http://imgur.com/a/twF7P The delete button does delete the data from database but im having trouble with the form as when the data is deleted the "deleted" data is still displayed on the form. How do i refresh the forms so it does not display the deleted data after deletion? Delete Button Private Sub btn_delete_Click(ByVal sender …

Member Avatar
Member Avatar
+0 forum 2

Hi, i want to delete a column from a file. the file is like : 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 if i want to remove any column the outout should be like ( suppose 4): 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 i have used swk command, but its not giving the desired output: its giving some extra delimeters: awk 'BEGIN{FS=OFS="|"}{$4="";gsub(FS,"")}1' file please help

Member Avatar
Member Avatar
+0 forum 12

This is the code to delete image in a folder... [CODE]<?php $path = "uploads"; if(isset($_POST['file']) && is_array($_POST['file'])) { foreach($_POST['file'] as $file) { unlink($path . "/" . $file) or die("Failed to <strong class='highlight'>delete</strong> file"); } header("location: " . $_SERVER['REQUEST_URI']); //redirect after deleting files so the user can refresh without that resending post info message } ?> <form name="form1" method="post"> <?php $path = "uploads"; $dir_handle = @opendir($path) or die("Unable to open folder"); while (false !== ($file = readdir($dir_handle))) { if($file == "index.php") continue; if($file == ".") continue; if($file == "..") continue; echo "<input type='CHECKBOX' name='file[]' value='$file'>"; echo "<img src='$file' alt='$file'><br />"; } …

Member Avatar
Member Avatar
+0 forum 4

this code will display all courses user has <h1>YOUR COURSES</h1> <form action="delete.php" method="POST"><ol> <?php $con=mysqli_connect("localhost","FYP","123","FYP"); $sql= mysqli_query($con, "SELECT C_Code FROM F_COURSES WHERE F_ID=".$_SESSION['userid']); while($row = mysqli_fetch_array($sql)){ echo "<li name='course'>".$row['C_Code']."<input type='submit' value='Delete'>";} ?></ol></form> I need when user click on delete button that course delete from F_courses <?php session_start(); if (! empty($_SESSION['logged_in'])) { $con=mysqli_connect("localhost","FYP","123","FYP"); $id=$_SESSION['userid']; $course=$_POST["course"]; $sql="DELETE FROM F_COURSES WHERE F_ID='$id' AND C_Code='$course'"; mysqli_query($con,$sql); header ("location: mycourses.php"); } else { echo 'You are not logged in. <a href="login.html">Click here</a> to log in.'; } Could you please help me how to correct my code Thank you

Member Avatar
Member Avatar
+0 forum 1

Hi. I'm working on my own CMS, i want the script to echo 3 posts in every page, and want the script to echo from the recent post and back to the oldest post. I mean like this: For example there is totaly 30 posts; First page => posts 30-29-28 Second page => posts 27-26-25 .... This is my script: <?php include('connection.php'); $error = FALSE; $result = FALSE; try { $row = $conn->query("SELECT MAX(id) AS last_id FROM Posts")->fetch(PDO::FETCH_OBJ); echo $row->last_id; echo "<hr>"; $last_id = $row->last_id; $total = $conn->query("SELECT COUNT(id) as rows FROM Posts") ->fetch(PDO::FETCH_OBJ); $perpage = 3; $posts = $total->rows; …

Member Avatar
Member Avatar
+0 forum 16

Hello friends! I want the script when user clicks the Delete botton to delete that post, a confirm message appears and ask if the user is sure to delete that post or not, if the user clicks the cancel button, nothing happen but if clicks the ok button, then the script delete that post. this is the main code: <?php include('connection.php'); try { $sql = "SELECT ID, Title, Author, Content FROM Posts"; $result = $conn->query($sql); echo "<h4>LOGGED IN AS: " . $_SESSION["Username"] . "</h4>"; echo "<p id='err_msg'></p>"; echo "<table cellspacing='0' cellpadding='20' border='1px solid black' border-collapse='collapse'>"; echo "<tr><th> POST ID </th><th> …

Member Avatar
Member Avatar
+0 forum 2

Hello. There is an html table in admin page, with head columns (POST ID | POST TITLE | POST AUTHOR | ACTION). And in each row, will contain a post id, a post title, a post author that gets from database. And in the Action column, there is a "delete" word that is a link with href="#" for now. I want the script when i click on the delete word in each rows, erase that row of data from the table of the database and from the html table. I don't know how should i do that. Just need guidance …

Member Avatar
Member Avatar
+0 forum 44

Group, I'm using the following code to read down to the third line of a text file. If it meets the criteria, I need to stop the read and then delete the file. However I'm finding it difficult to do this as everything I've tried has failed. Have you some thoughts on how I can do this? Do While objReader.Peek() <> -1 txtLine = objReader.ReadLine() programName = Trim(Microsoft.VisualBasic.Left(txtLine, 14)) If lineNo = 3 And programName = "(avl.allover)" Then fileSave = hotelFolder & "\Daily Reports\" & propertyNo & "Allover.txt" System.IO.File.Copy(fileName, fileSave, True) ' Stop the reading of the file and delete …

Member Avatar
Member Avatar
+0 forum 3

Hello everybody! There is a problem with my db table. For example i send 6 posts (with title, author and content) to the db table one after an other, so their post's id would be 1-2-3-4-5-6. Then if i delete the post number 6 and then write a new post (which it's id must be 7), after that when i echo all posts on the page to see them, i see posts with ids 1-2-3-4-5-7 !! How can i solve this problem? When i delete the post with id 6, the next post should be set there into id 6.

Member Avatar
Member Avatar
+0 forum 5

Hi everybody. What is the usage of `urljoin`? An example: >>> from urlparse import urljoin >>> url = urljoin('http://python.org/','about.html') >>> url 'http://python.org/about.html' I think the answer is that when we take a link from here `'http://www.python.org/` for example , it looks like this `<a href="/about/>about</a>`. So if i take the href part which is `/about/` here and use `urljoin` to join this string (of course with `.html`) to the main url which is `'http://python.org/'` here. Correct?! Of course i should delete those `/` and `/` from `/about/` first.

Member Avatar
Member Avatar
+0 forum 3

Hello all, my name is Marvin. I am working on obtaining my linux system administrator certificat. I created a file with a few sentences. The only task that I am having problems with is to delete word "and" using the vi last-line mode. I know hot do delet a word with out using the last-line mode by just moving to the word and typing 'x' until the word is gone. But this is not how I am supposed to do it. I have read the entire chapter on the vi section and I cannot find an example or the command …

Member Avatar
Member Avatar
+0 forum 3

Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i in numbers: print i del numbers[i] But it didn't work: File "./kivycal", line 83, in clear del numbers[i] TypeError: list indices must be integers, not str What can i do for that?

Member Avatar
Member Avatar
+0 forum 5

I have three files which when i click on delete should be removed. How am I able to use the unlink and realpath for my multiple files? public function delete() { $path_to_file = FCPATH . 'application/modules/admin/controllers/module' .'/'. $this->uri->segment(5).'.php'; $path_to_file_lang = FCPATH . 'application/modules/admin/language'.'/' .'english' .'/'. 'module/'. $this->uri->segment(5).'lang.php'; $path_to_file_view = FCPATH . 'application/modules/admin/views/template/module' .'/'. $this->uri->segment(5).'.tpl'; if (unlink(realpath($path_to_file), realpath($path_to_file_lang)) ) { echo "deleted" .' '. $path_to_file; echo "<br/>"; echo "deleted" .' '. $path_to_file_lang; echo "<br/>"; echo "deleted" .' '. $path_to_file_view; } else { echo "did not delete"; } }

Member Avatar
Member Avatar
+0 forum 4

![2680a256fcbf10c900499c36825b3e55](/attachments/large/4/2680a256fcbf10c900499c36825b3e55.png "2680a256fcbf10c900499c36825b3e55") In the above model I have an Images table which holds all the filenames relevant to the image. I have two relationship tables (Image_Has_People and Image_Has_Event). Both of these tables have an FK ImageID linked to the Image table's PK idImage. I'm wondering, if I set both relationship table's ImageID FK to On Delete Cascade, If I delete an entry in one of the relationship tables will that not also delete the image table entry too? What would I need to do in order that when I delete an Image entry from the Image table it also removes …

Member Avatar
Member Avatar
+0 forum 3

here is my code for delete Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click If MsgBox("Are you sure you want to delete this item?", vbYesNo + vbQuestion, "Delete") = vbNo Then Else If Me.DataGridView1.Rows.Count > 0 Then If Me.DataGridView1.SelectedRows.Count > 0 Then Dim x As Integer = Me.DataGridView1.SelectedRows(0).Cells("FNo").Value If Not cnn.State = ConnectionState.Open Then cnn.Open() End If 'delete data Dim cmb As New OleDb.OleDbCommand cmb.Connection = cnn cmb.CommandText = "DELETE FROM Food WHERE FNo=" & x cmb.ExecuteNonQuery() 'refresh data Me.RefreshData() 'close connection cnn.Close() End If End If End If End Sub it keep showing me error that **Column …

Member Avatar
Member Avatar
+0 forum 3

Hi guys, so i have a table populated by event details from database and i use a checkbox to select which event to be deleted: echo "<tr> <td><input type='checkbox' name='check[]' class='check' value='$id'>$name</a></td><td>$formatDate</td> </tr>"; my delete function: <?php if(isset($_SESSION['sess_user_id'])) { if(isset($_POST['del_event']) && isset($_POST['check'])) { require "connection.php"; $userid = $_SESSION['sess_user_id']; foreach($_POST['check'] as $del_id) { $del_id = (int)$del_id; $sqlqueer = "DELETE FROM event WHERE event_id IN ($del_id) AND euser_id IN ($userid)"; $deletion = $dbh->query($sqlqueer); if($deletion) { echo "<script type='text/javascript'>window.location.href='event.php';</script>"; } } } } ?> and it works fine. I wanna know how to call that delete function after a confirm dialog, something like …

Member Avatar
Member Avatar
+0 forum 15

I need to add a check box on the end of each value in my html table that will be checked if the user would like to remove that value from the mysql database, my current cod elooks like this: <?php $con = mysqli_connect("localhost", "root", "", "numbers") or die(mysqli_error($con)); // Check connection $result = mysqli_query($con,"SELECT * FROM usernumdata"); echo "<table border='1'> <tr> <th>First name</th> <th>Last name</th> <th>Phone Number</th> <th>Date Added</th> <th>Time Added</th> </tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['firstname'] . "</td>"; echo "<td>" . $row['lastname'] . "</td>"; echo "<td>" . $row['numb'] . "</td>"; echo "<td>" . …

Member Avatar
Member Avatar
+0 forum 13

Hi Dw How can I delete a registry key for other program, I just checked my registry and the virus was registered under the same registry key of my other program and now I want to use java as also part of learning java and the method of accessing and deleting a particular registry. Any suggestion, link, structure code will be appreciated. Thank you

Member Avatar
Member Avatar
+0 forum 11

Im trying to delete from multiple tables using full outer join like this: $del_id = (int) $del_id DELETE contact, child, spouse FROM contact FULL OUTER JOIN child ON child_name = c_name FULL OUTER JOIN spouse ON s_name = name WHERE contact_id = $del_id I get warning/notice: unknown table contact in multi delete. Why do I get this? My table is named correctly. Also if this is not the way to do it. Any guidance is much appreciated.

Member Avatar
Member Avatar
+0 forum 1

hey guys so im trying to delete a row using checkbox but i get an undefined index error = Notice: Undefined index: check in D:\Xampp\htdocs\EMS2\event.php . i think its because the checkbox is echoed(?)maybe? or is it something else that i overlooked? <tbody class="tbody-event-list-table2"> <?php require "connection.php"; $check = mysql_query("SELECT * FROM event") or die(mysql_error()); if(mysql_num_rows($check) > 0) { while($row = mysql_fetch_array($check)) { $id = $row['event_id']; $name = $row['event_name']; $start = $row['start']; $end = $row['end']; $venue = $row['event_venue']; echo "<tr> <td><input type='checkbox' name='check' id='check' class='check' value='$id'/><a href='' class='event-link'>$name</a></td><td>$start</td><td>$end</td><td>$venue</td>"; ?> <?php if(isset($_POST['del_event'])) { if(count($_POST['check']) !=0) { $array = array("check" => $_POST['check']); …

Member Avatar
Member Avatar
+0 forum 4

I want to null or remove array at the end of each loop. I already tried unset() or $array=array(); but its not working foreach($array as $key=>$value){ $dates[$value][]= $key; unset($dates) } Just tell me php function to null all array

Member Avatar
Member Avatar
+0 forum 2

I have a code that i want to throw an error if there is no items to delete or if there is items it proceeds with deleting the items, here is what i have so far: if (isset($_REQUEST['removeall'])){ if($_REQUEST['removeall'] == 1){ mysqli_query($mysqli,"DELETE FROM assets WHERE cust_id = $custID AND del_flag = 1 "); if(mysqli_query < 1){ $result = '<div class="alert alert-warning alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>No assets to delete</div>'; } $result = '<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>All Assets Deleted</div>'; } } Am i on the right track? Everytime i request it, it just says All Assets Deleted …

Member Avatar
Member Avatar
+0 forum 1

I'm quite new to python and am trying to make a kind of 20Q thing, but am struggling - anybody know how to delete a list from a set, or if not a list from a list? Thanks :)

Member Avatar
Member Avatar
+0 forum 5

I scanned my system with Malwarebytes today and located the directories of several viruses. I used NotePad++ to open the executable files and deleted all the code written therein and saved the change to the virus. I proceeded to delete the viruses with Malwarebytes; but, I wondered, had I left the viruses changed with no code, would they still be able to execute their program? My thought is, no. But, I would like to get a better understanding why or why not from those who understand computer viruses. The name of one virus specifically, Trojan.Happili, if that helps.

Member Avatar
Member Avatar
+0 forum 2

Hello. I have a php script that will backup my databases and ftp them to another server. All works fine via a cron job - but the backups are piling up and I'd like to add some code to the script to delete all the old backups - and just save the 5 newest backsup. I've added some code to the config file - but I don't know if the code is correct. I don't get any errors, but I figure that may be because I need to add some code to the script itself in order for it to …

Member Avatar
Member Avatar
+0 forum 2

Folder name such as da12e5154f6b530007fd9e got automtically created in my system... Can anyone please tell me why such folders get created and how can I delete it...

Member Avatar
Member Avatar
+0 forum 8

#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int menu,i; char ulang; FILE *pf; char karakter; int data[5]; char nama[30],alamat[40]; char buffer[1024]; do { printf("Menu Utama Data Kendaraan\n"); printf("--------------------------\n"); printf("1. Show Data \n"); printf("2. Add Data \n"); printf("3. Edit Data \n"); printf("4. Remove Data \n"); printf("3. Search Data \n"); printf("--------------------------\n"); printf("Insert your selection : "); scanf("%d",&menu); printf("\n----------------------------\n"); switch(menu) { case 1: { pf = fopen("D:/tugas/file/tugas/data.txt","r"); if (pf != NULL) { while ((karakter = getc(pf)) != EOF) { printf("%c",karakter); } } else { printf("Fatal erorr : File coba.txt cannot be opened"); exit(EXIT_FAILURE); } break; } case 2: { pf …

Member Avatar
Member Avatar
+0 forum 3

The End.