132,726 Archived Topics
Remove Filter ![]() | |
I have no idea what went wrong with my most recent code, but I suspect it has something to do with the following so I'll start there. Did I do something wrong in this? [CODE]cards=['1','1','1','1','2','2','2','2','3','3','3','3','4','4','4','4','5','5','5','5','6','6','6','6','7','7','7','7','8','8','8','8','9','9','9','9','A','A','A','A','K','K','K','K','J','J','J','J','Q','Q','Q','Q'] import random random.shuffle(cards) h1=[] for card in cards[1:7]: h1.append(card) cards.remove(card)[/CODE] Software Development programming-construct python | |
[CODE]#include<conio.h> #include<stdio.h> main() { char name[20]; scanf("%s",&char); if(char=="name") { printf("u entered name"); } else { printf("not name"); } }[/CODE] but it is printing not name when im entering name plzz check for the problem Software Development c | |
[CODE]#include<stdio.h> int main() { char ch; if(ch = printf("")) printf("It matters\n"); else printf("It doesn't matters\n"); return 0; }[/CODE] Here according to me, the expression inside "if" will be true becoz we have used "=" sign and not "==" sign. but the output is "It doesn't matters".how is it so? Software Development c | |
Hi guys.. The method createScreenCapture() in Robot class made me to post this question. The method works absolutely fine and it does the functionality of capturing screen as it asked to do. Now the problem comes here when i take the snapshot of my screen while i play a game. … Software Development java | |
Hi! I have recently started using linux and I was recommended gcc compiler. I have written a basic program just to see if it works. And it doesn't. I am trying to compile it with Terminal, and with the following command :[CODE]gcc ~/Desktop/C++/test.cpp -o testing)[/CODE] My program it responds with: … Software Development c++ | |
-First post Woot!- Alright, here's the problem; I'm building a _very_ simple Terminal-like program. The only problem is that in a normal Terminal (be it in Linux or Windows' "Command Prompt") there is no definitive number of inputs that you can input, for instance; you can either type "dir", or … Software Development c++ | |
Hello. I am developing a class manipulater in which I add and delete some fields and methods. I have a main class which is connected to GUI. Whenever I change a class, I have to restart the GUI in order to get the changes applied. I would like to gently … | |
Methods: public class metod { public static String computation1 { JOptionPane.showMessageDialog(null," Area of a Circle"); String n = JOptionPane.showInputDialog(null,"Enter a Number"); int num = Integer.parseInt(n); int form1 = (3.14 * (num*2)); JOptionPane.showMessageDialog(null,"… is "+form1); } public static String computation2 { JOptionPane.showMessageDialog(null,"… of a Trapezoid"); String h = JOptionPane.showInputDialog(null,"Enter Height"); int … Software Development java java-swing | |
How to encrypt and decrypt database plz help me its very urgent Software Development vb.net | |
Hi everyone. I spent a lot of time figuring out how to get my code to check for user errors and types. I finally got it set up properly, but now I'm getting an error. A number is required on my input. If someone doesn't enter a number or leaves … Software Development python | |
Hi all, I am trying to extract some text from a HTML page using regex. [CODE]<html> ...some code.... <B><FONT color="green">TEXT to BE EXTRACTED 1</FONT></B><br> <P> <B><FONT color="green">TEXT to BE EXTRACTED 2</FONT></B><br> <P> <B><FONT color="red">TEXT to BE EXTRACTED 3</FONT></B> ....some code.... </html> [/CODE] I want to make a script which will … | |
Umm I created a code which will create many results with specific ints(integers).I use Code::Blocks as my compiler.The code works inside the compiler,but when I go to the saved folder and run the batch file this is what happens-I enter a number and press enter and it simply closes itself!@What's … Software Development c++ | |
[CODE] #include<stdio.h> #include<conio.h> #include<string.h> int x; char name[20]; main() { printf("Exercise no. 10 ESN 211-9A MWF 7:30-9;30\n\n"); printf("Enter your age:\n"); scanf("%d",&x); if (x<18) printf("UNDERAGE!\n\n"); else if (x==18) printf("STUDENT LICENSE POSSIBLE\n\n"); else printf("PROFESSIONAL LICENSE AVAILABLE\n\n"); printf("Enter the result of your drug test: \n"); scanf("%s",&name); if ( name == "positive" ) printf("HOLD … Software Development c | |
I'm currently working with the NotifyIcon, and ContextMenus in the notify icon, and was wondering if it is possible to call an event when something is dropped onto the icon. For instance, if I had document.docx, and I dragged it from explorer onto the icon, it would then save it … Software Development visual-basic | |
Hi, i would like to know if there is a function in c that allows me to search for a specific character in a file, and how to use it. Thanks in advance Software Development c | |
Hello , I would like to enquire if how could I put MYSQL Row to a TextBox ? Here is my code [CODE]Private Sub Form1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MySqlConnection = New MySqlConnection MySqlConnection.ConnectionString = "server=localhost;Port=3306; user id =root; password=****; database=visualbasic" MySqlConnection.Open() Dim Myadapter As … Software Development mysql visual-basic | |
| |
I made this simple program for a 2 player TiCTacToe game. But It doesnt seem to be working properly. I cant understand whats going wrong here! Please help... [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MainFrame extends JFrame { JButton [][] buttons= new JButton[3][3]; JTextField statusBar; GamePanel panel; Integer … Software Development java java-swing | |
VC++ 10 gives error when libraries and headers related to libcurl are added to project.Even if curl.h is not included in the code, C2065 undeclared identifier _SH_DENYNO //this is in xiosbase... the above error comes. Is there a problem as there is no libcurl version for vc++ 10? ....libcurl works … Software Development c++ | |
So, I want to save an HBITMAP to different image file formats like BMP,PNG and JPEG. I believe that the most simple way to do it is by using GDI+. So here is what I came up with. [CODE]Gdiplus::Bitmap bmp(hbmpImage,(HPALETTE)0); CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); bmp.Save(L"D:\image.png",&pngClsid,NULL);[/CODE] The problem is that it … | |
I have the following 2 files: RPM.dll [CODE=C]#include "stdafx.h" #include <windows.h> #include <iostream> #include <stdio.h> char name[70]; HINSTANCE hInst; DWORD DLLFunc,DLLFunc2; HWND hWnd; extern "C" __declspec(dllexport) void myRPM(HANDLE hProcess,LPCVOID lpBaseAddress,LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead) { __asm { mov edi, edi push ebp mov ebp, esp jmp [DLLFunc] } } extern "C" … Software Development c++ visual-studio | |
How would I extract the public and private key and put them into seperate blobs? So after I use if (!CryptGenKey(hProv, CALG_RC4, CRYPT_EXPORTABLE, &hSessionKey)) It puts the Keys into SessionKey, but what if I want to extract both the public and private key from hSessionKey, how can i do this? Software Development c++ | |
I am still unable to get OpenGL Vertex Buffer Objects to work. I will just show you the code I have written so far: 3dglgui.h (I think this should be fine): [CODE]#ifndef CLASS_NAME #define CLASS_NAME "OpenGL Windows Class"//This can be overwritten to specify a unique class name #endif //Header Guards … | |
The point of the program is to read from the file and then output to the other file, we HAVE to use an array as well as a function to do this. The problem I am running into is well... several problems. When I try to run the program I … Software Development c++ | |
What is the difference between "G1" and "G1 " Particularly in this context if (memcmp (buf, "G1", 2) == 0) if (memcmp (buf, "G1 ", 3) == 0) Is this correct for "G1 "? Software Development c++ | |
[CODE]#include <iostream> #include <string> #include <windows.h> using std:: cout; using std:: cin; using namespace std; int main() { unsigned long n; char Answer; string mystr; do { do { cout << " What is your name? "; getline (cin, mystr); cout << "Hello " << mystr << ".\n"; cout << … Software Development c++ | |
I've been having some trouble making the knights tour (getting a knight to go around a chessboard without touching the same square twice) work correctly. Right now the max amount of moves I can get out of it is 59. I can't figure out any reason why it shouldn't go … Software Development c++ | |
Can someone help me? after exiting the program.. the student record.txt becomes empty after i restart the program.. so far Im only after the name, last name, and student id because i dont want to confuse myself more but if someone could teach me here i might implement other datas.. … Software Development c++ | |
hi there please see my header file and cpp file, when i compile them i get these error classes.cpp:86.1: error: "vehicle::vehicle" names the constructor, not the type classes.cpp:172.1: error: "driver::driver" names the constructor, not the type here is my header file [code]#ifndef CLASSES_H_INCLUDED #define CLASSES_H_INCLUDED #include <iostream> #include <string> using … Software Development c++ | |
[CODE]int main() { int num=2; int i=0; int user_num,x; cout<<"enter a number(number>4)"<<endl; cin>>user_num; int a[100]; for (i=0;i<100;i++) { a[i]=0; } while(num<=user_num) { x=2; while(x<=num) { if(num%x==0) { break; } x++; } if(x==num) { a[i]=num; i++; } num++; } int b[100]; for (i=0;i<100;i++) { b[i]=a[i]; } for (i=0;i<100;i++) { for(int j=1;j<100;j++) … Software Development c++ | |
Gi I have a DataGridView which populates from an SQL query just fine in default mode using these table names [CODE][firstName] [varchar](20) NOT NULL, [lastName] [varchar](20) NOT NULL, [rentpaid] [decimal](18, 0) NOT NULL, [datePaid] [date] NOT NULL, [propRef] [varchar](10) NOT NULL, [rentDue] [decimal](18, 0) NULL,[/CODE] I have edited the column … Software Development vb.net | |
Hi, How can I dynamically find all of the linklabel within a form, then get the linklabel name? Software Development vb.net ![]() | |
need some help turning this single linked list into a circular linked list. I am completly lost on how to get the first node and link it to the last one [CODE]#include <iostream> using namespace std; struct node { int Item; node* Next; }; // end struct node* Head; typedef … Software Development c++ linked-list | |
Hi all , here is my code for GET request to a http site, but it keeps taking memory nor releasing it, here is the code: [CODE] while(1) { hSession = WinHttpOpen( L"Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); if (hSession) hConnect = WinHttpConnect( hSession, L"lalala.com", … Software Development c++ motherboards-cpu-ram | |
Hi der i want to download visual studio......i m facing trouble in downloading.........help me to find out link to get it Software Development vb.net visual-studio | |
How to take input in a array in Java? my code is.... [CODE] String[] array=null; Scanner sc = new Scanner(System.in); System.out.println("How many Numbers:"); String r = sc.nextLine(); Scanner sc1 = new Scanner(System.in); System.out.println("Enter Number:"); for (int m = 0; m < r.length(); m++) array=sc1.next();[/CODE] I cant do this. Please help. Software Development java | |
Hi so i'm working on a project in c#. I have hundreds of xml files and I need to extract 6 values from each of the xml files and somehow display them on an excel datasheet. Here is an example of the xml file: [code] <XAxisCalib> <Max>288.93</Max> <Min>-48.08</Min> <MaxS>200</MaxS> <DfTHt>0</DfTHt> … Software Development c# microsoft-office xml | |
I have some program ideas that I would like to build for PC, Mac, and Linux/Unix. The process I have in mind is to write the core libraries in C++, then program each UI based on OS. Windows: C# Mac: Objective-C and Cocoa Linux/Unix: C++ and GNome/Gtk But, I only … | |
I was looking up the stack, and trying to implement it in an array, and came across this code: [code=C++]void push(STACK *ps, int x) { if (ps->size == STACKSIZE) { fputs("Error: stack overflow\n", stderr); abort(); } else ps->items[ps->size++] = x; } [/code] I know what it all does, except the … Software Development c++ | |
I have my project done in NetBeans, and it runs fine with no errors. However, when I try to compile the main class it says : C:\Users\Lynn\Documents\NetBeansProjects\EmployeeInfo\src\employeeinfo>javac Emp loyeeInfo.java EmployeeInfo.java:35: cannot find symbol symbol : class Name location: class employeeinfo.EmployeeInfo Name saveInfo; ^ EmployeeInfo.java:83: cannot find symbol symbol : class … Software Development java java-netbeans open-source | |
Hi I have a form which populates a TextBox I want to use the textBox.text to then load a gridView with the results something like [CODE]Private Sub TextBoxId_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxIdSearchExist.TextChanged Dim cmd As New SqlCommand("select * from pay Where t_id='" + tId.Text + … | |
Hello Everyone, I`m New to java. I need to search a jtable when i`m typing in a jtext field.As an example if i`m serchin my jtable by customer id and in j table it has customer id`s like 10021 and 10022 when i have typed"1002" the jtable should show both … Software Development java | |
I am starting this thread to gather some useful information before i start my work I am working on a project which takes user information and store it in database.. Now each user has seperate department's. I simply want to attach the user information to pre-configured outlook with department email.... … | |
why this code is not working?, error: non-static variable jTextField1 cannot be referenced from a static context [CODE]try{ Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sample", "", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT name FROM testtable"); while (rs.next()){ String n = rs.getString("name"); jTextField1.setText(n); } stmt.close(); con.close(); }catch(Exception e){ [/CODE] Software Development java | |
Hi, I just started programming in Java, and now i tried to compile a file with the Mac Terminal (Command-line), but it did only give me an error which i couldn't explain, because this code did work in Eclipse compiler. Here's my code: [code="java"] class HelloWorldApp { public static void … Software Development java | |
I created a regform as a program but my problem is the total units is not displayed.....how can I make it compute the total units and display it........ here is the code that I made... [CODE]import java.io.*; public class regform { public static void main(String args[])throws IOException { BufferedReader br= … Software Development java | |
Hi, I wrote this code to add 10 numbers and find their average. It will not out put average. What am I doing wrong? Thanks for the help. [CODE]#include <iostream> using namespace std ; int main ( ) { double Sum; double Average; double Numbers[10]; int K; Sum = 0; … Software Development c++ | |
hye.. I have a database call student which consists of all students information and also student id.. i have created a form that admin have to insert all the data about student.. then after admin click a save button, i want to display all the information also with the student … Software Development display open-source | |
I'm having trouble with my C++ assignment because when I run the program I can't type more than one word on the "Enter your street name" line or it won't work. My teacher said something about "getline" but he really lost me. Here is what I have. Please help! [code] … |
The End.