132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for aabbccbryanmark

print "enter a number: "; $in = <>; chomp $in; print &prime($in); print "\n"; sub prime{ for($i=2;$i<($_[0]/2+1);$i++){ if($_[0]%$i ==0){return "not prime\n"} } return "prime\n"; } is this code for c++ language?..

Software Development c++
Member Avatar for WaltP
0
301
Member Avatar for ariez88

Hello, I have published version 1.3 of an smart client application on my intranet. The deployment goes fine. However, when I try to install the application on my system from intranet I encounter following problems. A. "The publisher can not be verified. Are you sure you want to install this …

Software Development vb.net
Member Avatar for danielgr
0
186
Member Avatar for lloydy76

Hi there, im new to c# and have been trying to create a calculator without a switch statement, using the operator 'op' as a variable, but i cannot get it to work, here is my current code: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; …

Software Development c c# c++
Member Avatar for samsylvestertty
0
6K
Member Avatar for jjjmikalord

hello there, is there anyone who can tell me hwo to actually check whether an an int array element is a null or not? in java, I tried (array[i]==null) or (array[i].equals("")) but it seems that the compiler will tell me that int is incomparable to null or string everytime I …

Software Development java
Member Avatar for stultuske
0
732
Member Avatar for danielgr

I'm trying to figure out how to use a class. I have created a class: Public Class bicluster Public Property Vec As String Public Property left As String Public Property right As String Public Property distance As Double Public Property id As String Public Sub New(ByVal Vec As String, Optional …

Software Development vb.net
Member Avatar for danielgr
0
133
Member Avatar for 47pirates

In my desktop application whenever execute the code to backup my database from java application the app goes on waiting state may be for password , which we have to enter while backing up from command line. But i've provided the username and password of database in the code. Why …

Software Development java mysql
Member Avatar for rajesh1158
0
3K
Member Avatar for brad.ward.33

In this assignment, I am having to insert user information to tables that we have created and I am having this error that keeps on telling me " Code No: 80040e14 Code Message: IDispatch error #3092 Error Source: Microsoft OLE DB Provider for SQL Server Error Description: The name 'Br' …

Software Development c++ open-source sql
Member Avatar for brad.ward.33
0
374
Member Avatar for Labdabeta

I have two bounding boxes defined by the following values: m1.min.x;//the min x value of model 1 m1.min.y;// " " y " " " " m1.min.z;// " " z " " " " m1.max.x;// " max x " " " " m1.max.y;// " " y " " " " m1.max.z;// …

Software Development c++ image
Member Avatar for Labdabeta
0
667
Member Avatar for gem.gonzales.9

#include <stdio.h> #define p printf #define s scanf main() { int q,num[2000],sum,i,a,b; float mul,t,grade,quiz,d; { p("enter the the total quiz:"); s("%f",&t); p("enter the no. quiz:"); scanf("%d",&q); p("enter five no sepeerated by enter :\n"); for(i=0;i<q;i++) s("%d",&num[i]); sum=0; for(i=0;i<q;i++) sum=sum+num[i]; p("the sum of array :%d",sum); mul=sum/t; p("\ntotal:%f",mul); grade=mul*100; p("\n total is: %f",grade); …

Software Development c
Member Avatar for Vish0203
0
116
Member Avatar for bohm13rit

I can't seem to figure out how to reverse the order of the letters in a string. This is what i have so far... [code] [COLOR=Blue]public String reverse(String normal) { //reverse the letters in string char last; //last letter of string int leng = 0; //length of string int i; …

Software Development java
Member Avatar for teachMyself
0
957
Member Avatar for zeroflee09

## Sub-Heading Here ## > im working with time in and time out app which compute all of the hours that you've been working. > and i got this error.! i dont know how to fix these. plss help me im a beginner. > > error: variable th1 might not …

Software Development java
Member Avatar for zeroflee09
0
307
Member Avatar for Zeref

Hi guys. I'm trying to access some User interface files (.glade) which are in a subdirectory. from gi.repository import Gtk import os path=os.getcwd+'/ui/main.glade' def hurr(): builder=Gtk.Builder() builder.add_from_file(path) # get UI file window=builder.get_object('winlet') window.show() hurr() Gtk.main() This works if i use only 1 glade file, but i have multiple .glade files …

Software Development python user-interface
Member Avatar for solivier
0
159
Member Avatar for triumphost

How can I iterate a buffer with a stride? For example, I saved the pointer to a vertex buffer for later use. I've got the stride, the pointer, and triangle count for vertices. I want to iterate my pointer using this info to get the vertices. I'm doing it wrong …

Software Development c++ opengl
Member Avatar for triumphost
0
312
Member Avatar for Pyler

#include <iostream> #include <string> using namespace std; double distance(double x[],double y[]){ return sqrt((y[0]-x[0])*(y[0]-x[0])+(y[1]-x[1])*(y[1]-x[1])); } int main(){ double d; double x[]={1,2}; double y[]={4,3}; cout<<distance(x[2],y[2])<<endl; //cout<<d<<endl; cin.get(); return 0;} why wont it work I also tried d=distance(x[],y[]); cout<<d<<endl; but it wont work either

Software Development c++
Member Avatar for NathanOliver
0
84
Member Avatar for umesh T20

Hi All, I want to develop search engine for torrent search from variuos sites. I seen many search engine on web e.g torrent-finder,torrent harvester . which can seach fortorrent file which matches with given keyword .These sites search for torrent file from many sites. I want to developed program same …

Software Development
Member Avatar for john61484
0
178
Member Avatar for letterG

Hi again, I ran to some problems in input some codes but i'm quite sure that my code is correct but the output is not what I expect it to be, this is my code: #include<iostream> #include<string> #include<sstream> using namespace std; struct movie{ string title; int year; }; struct info{ …

Software Development c++
Member Avatar for letterG
0
162
Member Avatar for KasmIR

Hello, I try to compilate this progam! It return "Error 4 error C2664: 'LoadLibraryExW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR' c:\users\andrei\documents\visual studio 2010\projects\test\test\test.cpp 282 1 test Error 3 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'LPCSTR' to 'LPCWSTR' c:\users\andrei\documents\visual studio 2010\projects\test\test\test.cpp 200 1 test …

Software Development c visual-studio
Member Avatar for deceptikon
0
244
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> struct data { int n; }**value; int main() { int m,c=0; printf("enter the number: "); scanf("%d",&m); value[1]->n=m; for(value[2]->n=0;value[2]->n<=value[1]->n;value[2]->n=value[2]->n+1) { c=c+value[2]->n; } printf("%d",c); } it takes the value and compiler stops working

Software Development c
Member Avatar for WaltP
0
516
Member Avatar for SHASHWATH

I have used queue but I cant figure out how to write code to display horizontal(bfs) and vertical binary search traversal

Software Development c display queue
Member Avatar for WaltP
0
209
Member Avatar for shkr

i have the log file with byte dump and also structures.. using byte data as input i need to print the values of structures in user readable format..can anyone post the code.. here is txt file.. 002c2a54:00000000 00001389 11950000 00000000 00000000 00002b74 0000011c 00000000 002c2a74:01010100 01000000 0e600384 00000000 00000384 00000000 …

Software Development c data-structure user-interface
Member Avatar for Sokurenko
0
295
Member Avatar for saranyak

How many bytes are used in integer pointers??

Software Development c
Member Avatar for sepp2k
0
105
Member Avatar for newbie1234

any book or guide for c++ socket programming? Thanks in advance

Software Development c c# c++ socket-programming
Member Avatar for L7Sqr
0
337
Member Avatar for Vish0203

Is there any way to create an installer using C programming..? I want embed all the files of a software created by me in an exe file, which will extract all the things to a desired folder or drive. I heard that we can make batch file(package).. but how to …

Software Development c
Member Avatar for Vish0203
0
253
Member Avatar for phorce

Hello, I'm trying to write the Cooley Turkey algorithm for an FFT. Now, The algorithm works well, but, only for 2 numbers - Nothing else. For example, I have used an online FFT calculated, entered the same data and got the same results. Here is the code for the algorithm: …

Software Development algorithm c++
0
126
Member Avatar for AquaNut

Hi All, Wondering if anyone can point me in the right direction.. I have looked at various snippets but nothing seems to be what I need. I have a tab delimited text file in the form of: Title: Ms Forename: Fred Middle Name Initials: Surname: Bloggs Employment Type: Permanent Employee …

Software Development vb.net vbscript
Member Avatar for razree
0
2K
Member Avatar for thechampp

1.I need someone to check if the program i wrote is correct. "Write a program to calculate the sum (with accuracy of 0.001): 1 + 1/2 - 1/3 + 1/4 - 1/5 + ..." -> The code of the task is below. 2.I have one more question for example if …

Software Development
Member Avatar for thewebhostingdi
0
166
Member Avatar for dakaboguy

Im having trouble with nested for loops. I have have a SQL database with a few tables i need data pulled from. So in my first for loop i search for all materials in a product, i insert the data into a datatable then i do the for each dr …

Software Development dataset vb.net
Member Avatar for Reverend Jim
0
178
Member Avatar for Mobyguy77

Hello! Being my first post on Daniweb 'n' all, I'd like to apologies if this is in the incorrect section. This isn't why I'm here, though. I am a moderator on a fairly huge forum and thus we get roughly over 1500 reports for rule-breaking posts per day across all …

Software Development gui vb.net
Member Avatar for G_Waddell
0
123
Member Avatar for Formby

I've had this problem many, many times. And it's always turned out to be a small typo or "" around an integer, but I just cannot find what's wrong with my SQL Statement this time! [CODE]SELECT Card_ID FROM Payment WHERE Customer_ID = 12 AND Card_Number = 1231231231231231[/CODE] The table and …

Software Development sql vb.net
Member Avatar for kvprajapati
0
1K
Member Avatar for vstl

And I want to show the different words in two text files and make them bold, show on the screen. my code compiles when entering a word show the common words in two txt files and underlined them. instead of entering the word, I want to read a txt file, …

Software Development file-system java java-swing
Member Avatar for Taywin
0
841
Member Avatar for HibaPro

Private Sub CalculateDeductionPer() Dim FixSumPer As Double Dim i As Integer If DataGridView1.Rows(i).Cells(9).Value Is Nothing = True Then For i = 0 To Me.DataGridView1.RowCount - 1 FixSumPer += DataGridView1.Rows(i).Cells(9).Value Next i = i + 1 End If Deduction.Text = FixSumPer End Sub this is my code to sum some cols …

Software Development vb.net
Member Avatar for Gé48
0
66
Member Avatar for phil.robison.5

I am having a lot of trouble with the game I am supposed to be creating, so I'm going to put it out here for the many minds smarter about this stuff than I am to see if they can let me know whats wrong... I am brand new to …

Software Development java regex
Member Avatar for JamesCherrill
0
265
Member Avatar for jumboora

Hi, I want to copy all the video files from one directory (source folder) to another directory (destination folder) which i have already done. Code is given below. Now i want to put some condition. For Example, I want to read first the text file (videoID.txt)in which all the video …

Software Development video
Member Avatar for Mike Askew
0
190
Member Avatar for notconfirmed

Hello, I have a problem to this html code.I want to get only the data inside the href,but the data is dynamic. <a title="Click here to see docket information" href="/ccm/do/docket?county=65&amp;data=eedd78d10fd9da341e05b25b48b62013">652012CC000006CCXXXX</a> I am not really familiar in regex.I am using this code to extract the html inside the href. MatchCollection m1 …

Software Development c# html-amp regex
Member Avatar for Mike Askew
0
1K
Member Avatar for vikas_3r

I not going to print any document.I want to retrieve details of usb-printer.How can i get connected with usb- printer with c# programming to retrieve details?

Software Development c# printer
Member Avatar for C#Jaap
0
515
Member Avatar for 3e0jUn

For some reason , my code keeps returning a false reply even if the string is in the file. Here's my code: def check(self): self = str(self) if self in config_file: print ('Account exists') if self not in config_file: print ('Account doesn't exist')

Software Development python
Member Avatar for Gribouillis
0
167
Member Avatar for B204

hello frnds!! i want to know which things in programming slows the running process of program..... i want that my program should run in minimum time.....

Software Development java
Member Avatar for stultuske
0
77
Member Avatar for fasna

In the pencil-and-paper game, Tic-tac-toe, 2 players take turns to mark 'X' and 'O' on a board of 3x3 squares. The player who succeeds in marking 3 successive 'X' or 'O' in vertical, horizontal or diagonal stripe wins the game. Write a function that determines the outcome of a tic-tac-toe …

Software Development python
Member Avatar for Gribouillis
0
336
Member Avatar for newbie26

hi.how can i filter dates from the database in crystal report syntax? i tried {tblname.datetimefield} >= format(text1,"yyyy-mm-dd") and (tblname.datetimefield} <= format(text2,"yyyy-mm-dd"). but this gives me error, "a date is required here". my database field is in datetime data type.with format 0000-00-00 i also tried Date({tblname.datetimefield} )>= format(text1,"yyyy-mm-dd") and Date({tblname.datetimefield} <= …

Software Development visual-basic
Member Avatar for newbie26
0
167
Member Avatar for Oneryavuz

i need to filter my table between 2 dates but it makes wrong filtering really i dont understand why. but it might be my wrong codes here is my codes... what should i do? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim da As New …

Software Development sql vb.net
Member Avatar for Oneryavuz
0
162
Member Avatar for coolikedat99

I was trying to create a program that would require the correct password to be put in in order for it to display something. I was able to make a program that would require the right password to display a certain thing. But the problem is that it can only …

Software Development c++
Member Avatar for coolikedat99
0
166
Member Avatar for scott.richardson.988373

I have checked various examples and it appears that my problem is a bit more complex than what I have been able to find. So I'd greatly appreciate your help. I'm a stress engineer and I like to present my results as VRML (WRL) files. I recently discovered how to …

Software Development python
Member Avatar for scott.richardson.988373
0
194
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> struct rithish { int roll; char name; }*s[20]; void main() { struct rithish *s; int i; for(i=0;i<2;i++) { printf("\n\n\t Enter roll : "); scanf("%d",&*s[i].roll); printf("\n\n\t enter name: "); scanf("%s",&*s[i].name); } } is it possible to do structure variable as pointer to array

Software Development c
Member Avatar for Schol-R-LEA
0
122
Member Avatar for pato

Hey, I'm new to Python, as well as this message board, and I was wondering what some of the most useful and frequently-used commands are. I've so far only learned while, if, print, input # and words, and can make some basic programs only. I've previously had experience in TI83 …

Software Development python
Member Avatar for PythonHelper
0
1K
Member Avatar for hmagnum

while (HullShipA > 0 && HullShipB > 0 && HullShipC > 0) { // do whatever i wanna do } Console.Writeline("End Game"); So i'm kinda new to c# but here is the deal: In this simulation, ships attack eachother for damage and the way it is, as soon as 1 …

Software Development c c# c++
Member Avatar for hmagnum
0
116
Member Avatar for triumphost

What are the last 4 values for? (m[0], m[4], m[8], m[12]) (m[1], m[5], m[9], m[13]) (m[2], m[6], m[10], m[14]) (m[3], m[7], m[11], m[15]) I've looked everywhere and cannot figure out what m[3], m[7], m[11], m[16] are for (ModelView Matrix).. It says to ignore them but I can't just ignore them …

Software Development c++ opengl
Member Avatar for mike_2000_17
0
161
Member Avatar for charles.haselden.3

I am trying to build a tic tac toe program for an assignment. My trouble is making a dynamic array, I am new to c and my understanding of pointers and malloc is still very limited. I would like a resource I could read or an explination of how malloc …

Software Development c
Member Avatar for deceptikon
0
270
Member Avatar for kristo5747

Hello, I have a script that "validates" a ZIP file that look like this > AAA_20120801.zip => > x~back end~20120801.TXT > y~time in~20120801.TXT > z~heat_chamber~20120801.TXT > AAA_20120801.ctl My task is to compare its contents (i.e the list of files contained inside) with the control file that is provided inside the …

Software Development file-system os-x shell-scripting
Member Avatar for kristo5747
0
132
Member Avatar for kelvin_8188

how to find the radius using the center point only... the only given point is the center point... how to get or calculate for the radius...

Software Development html-css vb.net
Member Avatar for Reverend Jim
0
200
Member Avatar for idislikemacs

I'm done with my tic-tac-toe program, but now I want to ask a simple question to the winner of the match to make the victory absolute. Would I need a while loop? I also feel my code is too messy, how can I enhance/improve it? Thank you! #include <iostream> using …

Software Development c c# c++
Member Avatar for Ancient Dragon
0
315

The End.