199,114 Archived Topics
Remove Filter ![]() | |
The basic set-up is: [CODE=python] class A(): def __init__(self): self.var = 1 @staticmethod def do_stuff_with_var(self): # A method which uses self.var ... class B(A): def __init__(self): A.__init__(self) b1 = B() b2 = B() list_of_B_instances = [b1, b2] for instance in list_of_B_instances: instance.do_stuff_with_var(instance) [/CODE] However the last line of code raises … | |
Ive got the email program itself working fine. It interacts with a database to get the "subscriber list" as the people it sends it too. My problem now is i need to fix it to be able to send .pdf files. I have found a couple of scripts that work … | |
Hey there, I have a simple question: How can I read three characters by three characters from a string (character array) in C? Thanks for your help. | |
hi plz help. Trying since 1 week. acwl1 line we james line rx sijith fff xw nisha nnn w /sijith line r /Arjun line w vineeth line r acls2 faculty x arrr line2 w Rahul line3 wx Arjun line1 m /Tom line wr ac01l2 lineN w aclM1 line1 rw Ram … | |
IN THE NAME OF GOD HELLO TO ALL i wanna build a program that when it run, in one form equal rows in a DB , build button and with every button clicked, run program that addressed in programaddress column. i build buttons and assign to a array of button. … | |
This is my code that I'm using: [code=C]void create_project_go() { FILE *fp; FILE *fopen("/usr/lib/htmlexamples/default.html", "r"); };[/code] and i get this error: [code]/home/miguel/Documents/packing/create_project.c||In function ‘create_project_go’:| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|39|warning: unused variable ‘fp’| /home/miguel/Documents/packing/create_project.c||In function ‘get_project_info’:| /home/miguel/Documents/packing/create_project.c|46|warning: … | |
I am writing a program that uses structure named movieData to store the following information about a movie: Title Director Year Released Running Time (in minutes) The program should create two movieData variables, store values in their members, and pass each one, in turn, to a function that displays the … | |
Hi guys, I will keep this post short in order that I first confirm that I am in the right place. Basically, I want to begin a personal project to build a GUI program to play the card game 500. I have completed one year of university programming with a … | |
hi people, i am currently doing database C# using visual C sharp express and i am really new towards database programming. I actually taken my database from mc access using oledbconnection. One of the column in my database contain many words seperated by a comma in each particular row. I … | |
can anyone plz tell me how can we implement hash tables with chaining i mean insertion using link lists! i have to submit it on 22 and i haven't got a clue how to do it! | |
Am having problem calling a simple stored proc to insert data from a java program. The insert statement works fine when called directly with prepare statement. But when I use call it through a strored proc I get an error. jar file is ojdbc5.jar. - oracle10g. Then i tried another … | |
and it looks like this: [CODE] void Functions(int s) { s += 5; } [/CODE] then can i call it somehow in c, c++, or cocoa something similar to [CODE] void DoSomething(int s) { Function* function = myfile.readFunction(Functions); execute(function(s)); } [/CODE] any help would be appreciated thanks in advance | |
Hello All, I am not knowledgeable in VB nor in MS Access, so kindly excuse my ignorance. I received an MS Access database which is unable to open on my computer (for whatever reason), but is able to open on 5 different computers. At first I thought it was an … | |
Hi Every Body I am new born in C++ I am facing and error for last 3 days I tried my best with all what I knew but FAILED..... Error is - " Linker Error: Undefined Symbol Library::code in module PRGDONE.CPP" I am using Turbo C++ 3.0 of Borland Here … | |
Hi All, Does anyone know which file manipulation library is faster between c's FILE and c++'s fstream? I would suppose that c++'s fstream would be the faster but I just wanted to see some expert advice/opinion on this. I googled the internet without finding anything concrete. If there is any … | |
Hi Forum, I am a total newbie, so please be gentle!! I am trying to extract data in many text files that looks like this: 0.0 -0.9 0.3 -0.4 0.6 -1.0 0.9 0.3 These colums always appear on the same line number. What I want to do is to get … | |
Hi, I am testing a PHP web site offline using XAMPP server application. The website runs great, but the only problem is that the .css is not running. The odd thing is that if I am online and I test the website locally the .css file works, but if I … | |
For some reason my shutdown function that i'm making won't work. I get this error: In function `void shutdown()': expected `,' or `...' before numeric constant Here is my coding: #include <windows.h> void shutdown(); void shutdown() { BOOL WINAPI ExitWindowsEx(UINT EWX_REBOOT, DWORD SHTDN_REASON_MAJOR_HARDWARE); return; } int main() { shutdown(); } … | |
Hi PHP community. I have a PHP script on Linux (CentOS 5.2) which produces a "failed to open stream: No such file or directory" which I am out of ideas on how to solve. I am on the verge of reverting to Perl. The line generating the code is: [icode]$fh2 … | |
![]() | Hi folks, first of all sorry to say I ain't got any sample code and couldn't find anything obvious from Google and searching forums. Anyone got any ideas about integrating Joomla (latest version) session handling with a bog standard session_start/$_SESSION['user'] (etc) custom pages. Here's the explanation: I wrote a site … |
From the point of view of a command line programmer (whose been at it for 25 years) what is the difference between MFC and .net? | |
hello, I wanna create a struct in python. the struct needs to have a char and an array of chars. eg. (ruby code): [code] Somestruct = Struct .new(:character, :characterArray) structure = Somestruct.new(" ", []) [/code] How do I do this. I made a Trie in ruby and now I wanna … | |
here is my code with problems: [code=php]$url = 'somesite/somepage'; $str = file_get_contents($url); preg_match('/\w(\d*).*?\$/',$str,$matches); print_r($matches[0]);[/code] the goal is to type in any webpage and get its source code into $str and then find the first appearance of the symbol $ in the string and return only the number closest to that … | |
this is my code and it says i have problem in line 5 which i couldnt solve . can anyone please help me with this soon! [code=java]import java.text.*; public class SavingsAccount { private double static annualInterestRate; //declare static variable private double savingsBalance; //instance variable public SavingsAccount(double bal); //constructor { savingsBalance= … | |
hi, does anyone know a secure way to login to another page with username and password. i found numerous on google but i don't know which one is good. if anyone has any good source codes please help. | |
Hi all. I am just beginning with PHP and I'm having some trouble installing PHP5 with Apache 1.3.29. Both finally seem to be installed and running after some tweaking of the httpd.conf file AddModule comand. However when I run a php file in my browser (IE) I get a message … | |
Hi Folks I need to modify a .txt file using a C program. The file contains name and phone number of my friends like below: Mark 07915588623 Phill 07542535698 Claire 07825698745 ... ... . . ... If one of my friends phone number is changed (i.e. Claire 07985413791), how could … | |
Write a program to compute the aritmetic mean (average), median, and mode for up to 50 test scores. The data are contained in a text file. The program will also print a histogram of the scores. The program should start with a function to read the data file and fill … | |
Hi, There is this link -> [url]http://data.giub.uni-bonn.de/openrouteservice/php/DetermineRoute_rajan.php?Start=7.0892567,50.7265543&Via=&End=7.0986258,50.7323634&lang=en&distunit=YD&routepref=Fastest&avoidAreas=&useTMC=false&noMotorways=false&noTollways=false&instructions=true[/url] ! where I need to extract text, perhaps -> <xls:Instruction>[B]Drive half left on Kaiserstraße[/B]</xls:Instruction> <xls:distance value="[B]284[/B]" uom="YD"/> (bold text). On using something like this : [code] $url="url_just_shown_above"; $output = file_get_contents($url); $xml = simplexml_load_string($output); echo $xml->xls:RouteInstruction->xls:Instruction."<br />"; [/code] I am getting error -> Parse … | |
I cannot seem to figure this out. This part of a larger script that I am writing. I have a list that looks like this. The fields are servername, port and program. How do I sort it to get a tally of what servers are listening on what ports. This … | |
hello. i have a page where if you don't select an option an alert message is displayed(i'm using javascript and php). when the user clicks 'ok' the parent page is refreshed. i don't want this(the refreshing). can anyone tell me what to do? | |
Hi, I've having a bit of difficulty with an update statement. The following select statement returns 34 records... [CODE] select b.* from budget as b inner join ntime t on b.feeearnerkey=t.feeearnerkey inner join date d on t.datekey=d.datekey inner join acts a on t.activitykey=a.activitykey where a.activitycode in (11,12,13,14,15,16,17,18) and b.fiscalmonth=d.fiscalmonthnum and … | |
I'm having a problem deciding how to handle a situation. I'll briefly explain whats going on before I ask the question(s). I have a viewObject (bean) and what it does is display information that is gathered. To keep it from getting too complicated I'll say I have 3 jLabels. One … | |
is it possible to use try catch exception inside while loop? [code=java]while(username_ctr <= 5){ try{ user1 = str_div[username_ctr].indexOf("open_pm_tab",username_start); user2 = str_div[username_ctr].indexOf("')", user1); user3 = str_div[username_ctr].lastIndexOf(',', user2) + 3; str_username[username_ctr] = str_div[username_ctr].substring(user3, user2); //System.out.println(str_div[username_ctr].substring(user3, user2)); username_ctr++; }catch(Exception e){ slash1 = str_div[username_ctr].indexOf("</font", 0); slash2 = str_div[username_ctr].lastIndexOf('*', slash1); //System.out.println(slash1); //System.out.println(slash2); //System.out.println(str_div[username_ctr].substring(slash1, slash2)); //System.out.println(str_div[1].substring(slash2,slash1)); … | |
listen i jst want to do internal mapping of my university...for that purpose i dnt understand how to locate different sides of my university...as in university u have classrooms ,library,canteens...etc... so if any new person enter in my university i jst give them thz map so that he can go … | |
I a newbie on using the phpmailer. Correct me if i wrong. I create a html index page that a submit form. When i fill up the detail on the form press send it will send mail to my email account using phpmailer function. Question why i cant recieve the … | |
[code]$(document).ready(function() { var childrenEle; function toggleReq() { $('fieldset.fieldsetClass').each(function() { id = $(this).attr('id'); $("#" + id).children().not("div,legend").each(function () { var divEle = $("div").attr('id'); if($(this).attr('class') == 'required') { $(this).css("display","block"); } else { $(this).css("display","none"); } }); }); } function toggleAll() { $('fieldset.fieldsetClass').each(function() { id = $(this).attr('id'); $("#" + id).children().each(function () { $(this).css("display","block"); }); }); … | |
I am having a small problem locating any information on this little problem on the net so I am coming here for help AGAIN. I have a VB6 project that has a combobox. This is needing to display data from my SQL db. I have it displaying the data fine. … | |
Hi, I am trying to do something like this:- [CODE]1 10 20 30 ##########|##########|########## rect 1 rect2 rect3 5 ########### 15 user rect - (transparent and temporary based on user mousedrag) [/CODE] Now If a user clicks suppose in the middle of rect1 and drags it to the middle of … | |
hi all i have two dynamic drop downs of dealer id and category id which work properly with window.location [code] var dealerid; function getList(xyz) { window.location='manage_products.php?category_id=' + xyz; } function getProducts(dealer_id) { var catid=document.form1.category.value; window.location='manage_products.php?dealer_id=' + dealer_id + "&category_id="+catid ; } [/code] but now i want to add static drop … | |
I'm having a problem parsing a webpage to extract data from a table. Ideally I'm trying to extract the table with id="ctl00_ctl00_MainContent_PM_MainContent_gv_Portfolio" (see html below) I don't have a problem entering the website and downloading the html, it's beautiful soup that's tripping me up. My python code and downloaded html … | |
I am using vb.net 2005 (express) and can't quite figure out how to do this. I have an application that reads in a bunch of data from a file into the appropriate variable arrays like I want. I used a simple solution that I found here on DaniWeb to read … | |
I have 2 mysql tables companies and owner. 1 company can have multiple owners. So far I can insert the company and one owner just fine. But I am having a hard time inserting more owners on the same company. I don't fully understand how to get my value out … | |
Hello I am getting this error message WebException: The request failed with HTTP status 401: Unauthorized.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431289 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 Dashboard.Crm_Deployment.CrmDeploymentService.Execute(DeploymentServiceRequest Request) in C:\Downloads\Dashboard\Dashboard\Dashboard\Web References\Crm_Deployment\Reference.cs:79 Dashboard._Default.Page_Load(Object sender, EventArgs e) in C:\Downloads\Dashboard\Dashboard\Dashboard\Default.aspx.cs:136 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 … | |
Hi all, i've found several x86 codes checking if the string is palindrome or not. but i need something different. a procedure which receives the starting address of a text (in SI) stored in data segment and returns the number of palindrome words in the text into CX. Only word … | |
Hi guys, I'm new to programming and am trying to get better by writing "useful" things. Here is a very simple stock portfolio tracker that I started yesterday. It is not very complex and I feel like I'm not really improving my skills since it uses mostly beginner concepts, but … | |
I'm starting to experiment around with Java Web Start since applets have some limitations. I'm using Net Beans and it's working fine except that I get this pop-up when I run it: [quote] The application's digital signature cannot be verified. Do you want to run the application? [/quote] It would … | |
I'm having a problem with my countdown timer and am figuring that I'm missing something obvious. All I'm trying to do here is get my jLabel to countdown from 60 to 0. [code] ActionListener refreshListener = new ActionListener() { int counterLimit = 60; public void actionPerformed(ActionEvent e) { javax.swing.Timer refreshTimer … | |
So I am writing a voice activated recording program, and one of the things I would like it to do is plot the current and past volume level on a JPanel. Write now I am simply reading one byte from the audio buffer, converting it to an int, taking its … | |
I'm using python & i am trying to match ";" in a line: [CODE] for page in css: f = open(page, "r") lines = f.readlines() count = 1 obcount = 0 ebcount = 0 probwithfile = False for line in lines: [B]if not re.match("^{$", line) or not re.match("^}$", line): if … |
The End.