199,112 Archived Topics
Remove Filter ![]() | |
ok i have a perl script [CODE]use strict; use warnings; open(my $in, ">>", "log.txt") or die "cant open log.txt $!" ; my @files = <*>; foreach my $file (@files){ print $in $file . "\n"; } close $in or die "$in $!";[/CODE] it gets the filenames that are in the same … | |
guys i just wanted to know that can we study algorithms with out studying discrete maths first? | |
![]() | So I have a class file. Inside the class is a void which is started in the Program.cs. I used 'LavaSurvival.Init("properties/lava.properties")' in the Program.cs. I'm only pretty new to coding, so it's probably something I didn't know XD. The problem is that I continue to get this error: Type: IndexOutOfRangeException … |
Hi All I want to create a service application with Delphi that can connect to SQL DataBase I can create service application but the ADOQuery don't work inside the service Is any one that can tel me what should I Do? Thanks | |
Hi all I need to calculate CRC for my file..The algorithm is CRC-16.. I have a binary file with me.. I have also calculated checksum for the whole file . Now my doubt is for calculating checksum for any file do we need to calculate CRC for each and every … | |
what is the problem with this it is printing only the first node data :( .some one pls help me...[CODE]#include<stdio.h> #include<stdlib.h> struct node { struct node *prev,*next; int data; }; void create_list(struct node *list,int n) { struct node *n1,*n2; int i; n1=list; printf("enter the data for the 1 node:"); scanf("%d",&list->data); … | |
I am trying to implement the algorithm of a CRC check, which basically created a value, based on an input message. So, consider I have a hex message 3F214365876616AB15387D5D59, and I want to obtain the CRC24Q value of the message. The algorithm that I found to do this is the … | |
SyntaxError: invalid syntax (on else) Any help? [CODE]import re words = ['cats', 'cates', 'dog', 'ship'] for l in words: m = re.search( r'cat..', l) if m: print l else: print 'none' [/CODE] | |
Can anyone please explain me, step by step, each line of the following sorting algorithm which sorts the input lines numerically, if -n is given at the command line. (Program taken from the book "The C programming language, by brian kernighan and Dennis Ritchie" - Chapter 5. Section 5.11, page … | |
I currently have a small script I've written that basically takes an incremental backup of a folder which looks similar to this: [code] #!/bin/bash cp -ruf /home/folder4/subfolder/ /home/folder5/ cp -ruf /home/folder3/subfolder/ /home/folder4/ cp -ruf /home/folder2/subfolder/ /home/folder3/ cp -ruf /home/folder1/subfolder/ /home/folder2/ [/code] Now this runs fine, only updating the files that … | |
Hey guys, I'm having a problem with uploading files to a remote server. I just want the visitor to be able to upload a file, and have it go into the uploads directory of my website. My website root is "C:\tomcat\webapps\ROOT", and the uploads directory is at "C:\tomcat\webapps\ROOT\uploads". Both "upload.html" … | |
I just stumbled over this: [ICODE]mysql> select "abc" = 0; +-----------+ | "abc" = 0 | +-----------+ | 1 | +-----------+ 1 row in set, 1 warning (0.06 sec) mysql> show warnings; +---------+------+-----------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------+ | Warning | 1292 | Truncated incorrect DOUBLE value: … | |
Quite having a problem here... I have an array of student numbers put in a variable. And this variable will be use to an sql query. e.g. sql = "SELECT class FROM tbl_class WHERE studnum = '[COLOR="Red"]$array_studnum[/COLOR]'"; How can I get that specific student number inside an array for me … ![]() | |
I realize there are many ways to store large numbers in c++ (and by large I mean too large for long doubles), but none of them were really what I was looking for. I don't just need to store large numbers in which case I would use GMP or something, … | |
So i posted several days ago about an adding grades to an array, which i managed to figure out. This is the code I currently have. [CODE]public class Grades { public static void main (String[] args) { float result = 0; Scanner scan = new Scanner(System.in); int count = 0; … | |
hallo reader, im having a problem concerning recursion in C++. I ve encountered a problem that requires to find all the subsets of a set of intergers that gives a required sum, meaning.. Enter integers: 16, 3,3,13. Required sum: 19 The prog should output: 16+3=19 13+3+3=19 the maximum size of … | |
I describe my problem with following simple example. [CODE] function show(str) { if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); } else xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","data.php?q="+str,true); xmlhttp.send(); } [/CODE] here,i am getting some responsetext or result from data.php file through my request. In my … | |
hello all, i got project on online examination i want to fetch data dynamically from database. it must be like that once student loged in. he must gives answer for 1st Q. to go next Q. when they click on any of the buttons. next Q. must be fetch dynamically … | |
i have to use FLV file in my project so how to implement FLV files in windows form c#??? | |
I use the tipical function: .... Open file For Input As #1 ... ecc... to reading txt file line by line. But instead to init the redaing line by line... 1) I need to find, in position mid(line, 1,8), the string INIT0000 and strat the reading of lines from here … | |
[CODE] //a program to assign seats on each flight of the airlines’ only plane (capacity 25 seats) #include <iostream> using std::cout; using std::endl; using std::cin; #include<string> int main() { string Name; string idNumber; const int SEATS = 26; int plane[ SEATS ] = { 0 }, people = 0, economy … | |
[B]Input[/B] The first line contains the number of test cases t (1 ≤ t ≤ 5). Then t test cases follow, each test case consists of a line containing two integers n and k (0 ≤ n ≤ 100000, n < k ≤ 1018). [B]Output[/B] For each test case output … | |
I am using this code [CODE] Public Function Get_Settings(filename As String) As Boolean Dim recordlength As Integer recordlength = LenB(Settings) On Error GoTo erroropeningsettingsfile Open filename For Random Access Read As #1 Len = recordlength Get #1, 1, Settings Close #1 Get_Settings = True Exit Function erroropeningsettingsfile: Get_Settings = False … | |
Guys, How to make an scripts if itemnumber have no '-U' then i will place this on the right side while if there's an exising '-U' then no replacement to be done. [CODE] ItemNumber ------------------ P300-4410-DROIDERIS P300-4110-TOUR P333-4410-EVO-U P333-4129-8530PUR-U P333-4170-9330GRY-U P333-4110-8350-U RESULTS: ItemNumber ------------------ P300-4410-DROIDERIS-U P300-4110-TOUR-U P333-4410-EVO-U P333-4129-8530PUR-U P333-4170-9330GRY-U P333-4110-8350-U … | |
Hi :) Is there any way, using PHP, to display a mini-version of an external website ? What I'm trying to achieve is when my users enter a link, then it should automatically try to display the link's contents - but within a given height / width. Appriciate any feedback … | |
I want to give users full access to certain folders in the ProgramData folder. Can this be done with Delphi code? | |
Hi All, I have to deliver a secure web ASP.net site that after 20 minutes of inactivity wipes the users sessions and forces then to login again. I have set up all the necessary timeouts on the server and at the top of each of my master pages I have … | |
Can you input a string of text from the console window into a char array? Or do you have to save it in a string, and then do a "s1.getChars( 0, 5, charArray, 0 );" Also, I noticed that you can't initiate a char array using the same syntax as … | |
I've written a code tat reads x and y co ordinates from a txt file and drawlines on the panel. i need to save the written geometry on the panel as a jpeg image, can any one help me out wat should be written in the action listener part of … | |
Hi i need to create about 100 files in a numbered sequence like : file1.txt,file2.txt,file3.txt . so how can i create these files using c#. | |
[CODE] int i=5,j=10; printf("%d\n",(i=15)||(j=26)); printf("%d %d\n",i,j); [/CODE] THe output I expected was : 1 15 26 The actual output was: 1 15 10 In (i=15)||(j=26), shouldn't the brackets be done first?Isn't that the precedence order? So,first i must take 15 then j must take 26 then the || must be … | |
![]() | I am attempting to install ffmpeg-php on my Dreamhost VPS. It runs Debian. I am under the impression that it is quite easy using 'sudo apt-get install php5-ffmpeg' I have tried this, it appears to install fine. My problem is, I'm not sure where it installs and how I get … |
[CODE]import java.awt.*; import javax.swing.*; import java.sql.*; import javax.swing.text.MaskFormatter; import javax.swing.table.DefaultTableModel; import java.util.Vector; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; class MyFrame extends JFrame implements ActionListener,MouseListener{ Container c; JLabel lAccountNo,lAName,lDateofOpng,lAddress,lContactNo,lTotalBalance; JTextField tAName,tContactNo,tTotalBalance; JTextArea tAddress; JFormattedTextField tDateofOpng,tAccountNo; JButton bAdd,bNew,bDelete,bExit,bUpdate; DefaultTableModel mAccthld; JTable tAcctHld; MyFrame(){ c=getContentPane(); setSize(Toolkit.getDefaultToolkit().getScreenSize()); setTitle("Account Holder"); setLayout(null); lAccountNo=new JLabel("AccountNo."); … | |
Hey im working on a code where i need to get a certain column of a 2d array and create a 1d array with the information. The information im using is a product list in an aray in thsi format [barcode][price][stock] Now i need to grab the bar codes of … | |
hi, this might take some time ... the goal is a game developer , the problem is where to start . here's the story : i've been looking around on how to get start with developing games specifically for mobiles , i started reading opengl and animating + modeling with … | |
can anyone explain me how to use the inline function in c++ code with example? | |
Hi, can anyone guide me in the right direction with the following: I want to start a hosting reseller service, didnt find a relative category to post in but my question is related to php so... I want to develop a site where users can query available domain names, the … | |
Hi, I want to fill data in my combo box using Add range method. [CODE] cboFirst.Items.Add("Sunday") cboFirst.Items.Add("Monday") cboFirst.Items.Add("Tuesday") cboFirst.Items.Add("Wednesday") cboFirst.Items.Add("Thursday") cboFirst.Items.Add("Friday") cboFirst.Items.Add("Saturday") [/CODE] This is how im filling my combo with days. i want to do the Same but by using Add Range Method. Please guide how,its urgent. | |
My application get crashed as soon as I attempt to see Crystal Report. Environment: Windows 7 CRRuntime_64bit_13_0_1.msi (SAP Crystal report installed) .NET 4.0 WPF Application Can anybody tell me whats should be the reason of crash and what to do? | |
hi all.... i want to add 01+1 and my desired output is 02. my code is var t=01; var t2=t+1; alert(t2); the alert value is 2. I want 02....what will i do? thanks in advance.... | |
Alright, well I've already taken Java programming at Auburn University for my first programming class. I'm taking C programming this coming semester. I've been learning C all summer, and now I would like to try making simple games! I have DEV C++ as my compiler, but I'm not sure where … | |
Hallo good people, am looking for a nice code that i can wright or someone to guide me through to create notifications within my site. On top of the notifications to be displayed within my site when an event occurs within the db and therefore i would need the necessary … | |
Hello, I just started taking a VB class and I'm having an issue with the latest assignment. I'm supposed to design a program that calculates the cost, number of men and total time it will take to mow a lawn based on the size of the lawn. No problem. The … | |
how to generate id with character in php-mysql eg: LAKS01 LAKS02 LAKS03 | |
Hi all, pretty new to sql. have made code already for showing, adding and deleting data from database but can't seem to make the update work. any help is much appreciated. here's what I have: [CODE]<html><body><form action="update.php" method="post"> <label>Person ID:<br></label> <input type="text" name="personID" size="40" value="" maxlength="150" /> <label>Customer Name:<br></label> <input … | |
<?php $id=$result; $res=@mysql_query("Select * from t_stores where user_id='$id'"); print "<label>Select Company/Store </label>"; print "<select name=\"store_id\">\n"; print "<option value=''>\n"; while($row=mysql_fetch_assoc($res)){ $store_id=$row; $store_name=$row; print "<option value='$store_id'>$store_name\n"; $store=$_GET; // a noob way that above to get store_id but it wont work--> } ?> //how do i get the $store_id in the print above … | |
I have a table called [COLOR="Red"]school[/COLOR] and a table called [COLOR="red"]students[/COLOR]. I have a foreign key in [COLOR="red"]students[/COLOR] called [COLOR="Green"]school_id[/COLOR] which is connected with table [COLOR="Red"]school[/COLOR] , field [COLOR="Green"]id[/COLOR]. I made a form where field **[COLOR="green"]title[/COLOR]** appears to the registration form of the [COLOR="Red"]student[/COLOR]. The problem is that i want … | |
hi someone help me with this error:( Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\CDX\class_lib.php on line 57 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\CDX\class_lib.php on line 57 [CODE] <?php class contactdirectory{ private $db_host = 'localhost'; // Database … | |
In my full program. I managed to finish my own thesis project from a certain bookshop company. It's features has: 1.) CMS ( Catalog, Gross Revenue, Number of Users, Number of Orders, Contact details of customers, Multiple admin Accounts, update-able Currency Foreign Exchange (from Oanda.com), paypal module, one-to-one and one-to-many … | |
Hi, this works well on my localhost but when I upload it to my web server I get: Parse error: syntax error, unexpected T_STRING in /home/zupa/public_html/grafika.php on line 1 This whole xml thing is new to me and I really dont know why doesnt it work on my server (while … |
The End.