assembly 2,768
c++ 47,922
java 29,793
pascal 1,795
perl 1,611
program 802
programming 677
python 14,203
shell-scripting 1,803
vb.net 19,220
visual-basic-6 9,830
xml 1,318

Hello, I am learning Tkinter. As a part of the learning process I am building a Notepad clone in order to become familiar with Tkinter widgets. I am pretty close to completing it - I added about 90% functionality to the application - but I face two problems: 1) The text widget has a default fixed size (80x25 chars I believe). If I resize the root window at a greater size, the text widget stays at the initial size. This is an undesirable behavior - I expect/want the text to resize along with the root. Now, I came with something …

Member Avatar
Member Avatar
+0 forum 4

Hi guys, I am having an issue finding duplicates in an arrayList. Here is some code studentRecords.add(new Student("Jo", "Pip", "JP000", LocalDate.of(1999,9,23), Sex.FEMALE)); studentRecords.add(new Student("Tara", "Bot", "TB345", LocalDate.of(1991,9,1), Sex.FEMALE)); studentRecords.add(new Student("Mara", "Lewart", "ML456", LocalDate.of(1988,5,23), Sex.FEMALE)); studentRecords.add(new Student("Anna", "Clarke", "AC010", LocalDate.of(1999,1,1), Sex.FEMALE)); studentRecords.add(new Student("Frank", "Boia", "FB300", LocalDate.of(2001,8,13), Sex.MALE)); studentRecords.add(new Student("Anna", "Clarke", "AC010", LocalDate.of(1999,1,1), Sex.FEMALE)); studentRecords.add(new Student("Jo", "Pip", "JP000", LocalDate.of(1999,9,23), Sex.FEMALE)); This is the list of student records stored in an ArrayList. I have to make sure that I identify the duplicates and store the duplicates in another arrayList, duplicateRecords for the sake of argument. Now, the first thing I tried was to …

Member Avatar
Member Avatar
+1 forum 4

how can i print 3 values(without knowing their string\number size) in same column using cout? i'm using these code: cout <<"\n" << "show tokens\n"; for(unsigned int i=0;i<Tokens.size(); i++) { cout << "Token: " << Tokens[i].Token <<right<<setw(20-Tokens[i].Token.size())<< "Type: " << Tokens[i].Type <<setw(40) << fixed << "Position Line: " << i<<"\n"; } but i know the 'token' size, but not the type size. so what you can advice me?

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I'm a little stuck with something here. Basically I have a a method which, given a List of Students will have to filter out those who are younger than 60yrs old and should return a List of Students who are over 60yrs old but I want this to be a list of Optionals rather than just a List of Students. THe difficulty is that I can't find a way to return a list of optionals like List<Optional<Student>>. I can return an optional if I use things like findFirst() or findAny() `return studentList.stream().filter(x -> x.getAge() > 60).findAny();` or i …

Member Avatar
Member Avatar
+0 forum 4

I am currently creating a product lookup system for a project of mine, however from reading around it has come to my attention that an OLEDB connection will not handle the SQL query below as it will not handle more than a simple "SELECT, FROM". Table: tbl_ProductInformation Field: Product_Name CurrentEntry = Variable storing the users entry [CODE] "SELECT Product_Name FROM tbl_ProductInformation WHERE Product_Name LIKE '*" & CurrentEntry & "*'" [/CODE] The outcome of this query is then put into a listbox. Is there anyway to make the OLEDB SQL query work so that the returned entries will correctly narrow down …

Member Avatar
Member Avatar
+0 forum 16

At the risk of making a total fool of myself... I got very excited when I discovered that Java's "only opaque rectangular windows" limitation has been removed. Full release is intended for Java 7, but working methods can be accessed thru com.sun.awt.AWTUtilities in recent releases of Java 6 (I'm using update 20). I put together this little demo that adds some animation to the effects to give a hint of the potential. It runs for me under Windows 7 Home Premium; I just had to adjust Eclipse's compiler settings to warn rather then error for access rule violations. I'd be …

Member Avatar
Member Avatar
+2 forum 9

HI everyone, _SBLOCK *allocateMemBlock(size_t size) [ _SBLOCK *block = (_SBLOCK*)sbrk(0); void *memadr = (void*)sbrk(0); void *allocate_mem = (void*)sbrk(BLOCK_SIZE + size); if(allocate_mem == (void*)-1) [ return NULL; ] else [ block->next = NULL; block->isfree = false; block->size = size; block->memoryAddress = memadr+BLOCK_SIZE; return block; ]

Member Avatar
Member Avatar
+0 forum 7

Hi! I want to learn programming. I'm 14 years old and very fond of computing. The only problem I face is *Which programming language should I learn?* or should I learn *Programming* i.e I learn the basics of programming so that I will be capable of learning any programming language. Also, when you recommend me one of the choice I stated above then please give me resources for learning e.g book names or some websites which will start me learning from scratch. Furthermore, I want to state that I want to create cool games, softwares or even Operating Systems from …

Member Avatar
Member Avatar
+0 forum 9

Anybody who knows how to change word or character in kanji to katakana or vice-versa. I'm using 2 textbox to do this, the first textbox is for katakana and the second textbox is for kanji. What i wanted to do is, whatever i typed in the kanji textbox it will be converted to its corresponding katakana value in the first textbox or vice-versa. Is this possible in vb.net or do i need to use third party software / dll / activeX to be able to do this, anyone please give me a good idea how to deal with this problem. …

Member Avatar
Member Avatar
+0 forum 14

Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? Mostly because learning new things keeps my brain active. And besides, nobody on Daniweb seems to be asking questions about vb.Net anymore. So I thought I'd give it a try. After a few weeks of puttering I managed to learn enough Python to rewrite all of my vbscripts (stop laughing, …

Member Avatar
Member Avatar
+5 forum 13

[I]Last project for the semester and it's late!!! I am in need of some logic with this one....It seemed simple, but now it's out of control. My array with the ASCII converter works, but I can't seem to develop a complete output function to output this 'counter simulator.' Here's the problem and my code thus far:[/I]My mother always took a little red counter to the grocery store. The counter was used to keep tally of the amount of money she would have spent so far on that visit to the store, if she bought all the items in her basket. …

Member Avatar
Member Avatar
+1 forum 3

Hi, I have an idea of building an API for **Machine-to-machine payments.** The API will enable to assign wallets to connected devices, record available amounts of something valuable, as well as all incoming and outgoing movements of value. Would love to hear back from developers who are seeking to address the issue of M2M payments. * Which challenges around M2M payments are you trying to solve? * Which technology do you use? Appreciate your feedback a lot!

Member Avatar
+1 forum 0

i'm creating a program using Code Blocks with GNU\GCC compiler. i'm using Windows 10 with Windows Defender. my program create a txt files(instead a text files, we can speak binary files too), but the Windows Defender can delete the file(and i have sure), for avoid these problem i must disable the Windows Defender. my question is: can i compile my program(even using a compiler\linker flag) for avoid the Windows Defender problems? ok.... i can disable the Windows Defender and make an exception.... but if i share my program, the new user will get the same problem :( can anyone advice …

Member Avatar
Member Avatar
+0 forum 16

I'm using a fairly standard MSI mobo with Intel Core i5-6400 processor and 64 GB RAM. So: Which programming language (besides assembly) is the most effective to use in this configuration when I want to do calculations/modelling trying to find the least number of combinations to fullfill some predefined conditions. More specific I have i.e. 5 sets of combinations each containing three different states: A, B and C. This gives me a total number of 243 combinations. Theoretically it is possible to reduce this number of combinations to 23 so that no matter what combination of the original 243 you …

Member Avatar
Member Avatar
+1 forum 19

Programming Exercise ATM Machine In this assignment you will create a program that allows a user to do the following: 1) Create a bank account by supplying a user id and password. 2) Login using their id and password. 3) Quit the program. Now if login was successful the user will be able to do the following: 1) Withdraw money. 2) Deposit money. 3) Request balance. 4) Quit the program. If login was not successful (for example the id or password did not match) then the user will be taken back to the introduction menu. This is what your program …

Member Avatar
Member Avatar
+0 forum 15

Hi All, Any suggestions on how could we attach the NLog.config to a docker-compose.yml file so that it generates an “NLog_Internal.txt” on the host machine and we can see all the application logs in that file? In other words, is there a way we could extract the logs of an application running inside a Docker container using NLog on a specified location (local disk or cloud)? I have tried creating an ASP.NET Core application with the following NLog.config file: <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwConfigExceptions="true" internalLogLevel="Trace" internalLogToConsole="true"> <variable name="dockerlogDirectory" value="/data/logs/app"/> <targets> <target xsi:type="File" name="ownFile" fileName="${dockerlogDirectory}/MyCustomLog-${shortdate}.log" layout="${longdate}|${logger}|${uppercase:${level}}|${threadid}:${threadname}|${message} ${exception}" …

Member Avatar
Member Avatar
+0 forum 1

import java.util.Scanner; import java.util.Random; class Lottery { // MISSING CODE } public class LotteryDemo { public static void main(String[] args) { int[] userPicks = new int[5]; int matching; // Create a Scanner object for keyboard input. Scanner keyboard = new Scanner(System.in); // Create a Lottery object. Lottery lotto = new Lottery(); // Get the user's picks. for (int digit = 1; digit <= 5; digit++) { System.out.print("Enter digit " + digit + ": "); userPicks[digit-1] = keyboard.nextInt(); while (userPicks[digit-1] < 0 || userPicks[digit-1] > 9) { System.out.print("ERROR. Enter a single digit (0 - 9): "); userPicks[digit-1] = keyboard.nextInt(); } } …

Member Avatar
Member Avatar
+0 forum 3

For this particular sub I type the customer id in a text box and then click the button, then I'm trying to get the relative information pertaining to that id. Not sure what I am doing wrong. Comes back with an error message of system.data.sqlclient.sqlexception Recursive common table expression '[customers]' does not contain a top-level UNION ALL operator. Private Sub FillByCustomerIDToolStripButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles FillByCustomerIDToolStripButton.Click Try Dim customerID As Integer = CInt(CustomerIDToolStripTxtBox.Text) ' LOAD THE CUSTOMERS TABLE WITH THE SELECTED CUSTOMER. Dim id = Me.CustomersTableAdapter.FillByCustomerID(Me.DatabaseDataSet.customers, customerID) If Me.DatabaseDataSet.customers.Count > 0 Then For Each row As …

Member Avatar
Member Avatar
+0 forum 2

Hi All, i would need some advice from you guys from this forum to solve the reading of the CSV file that i had. for example, i have a file which consist of about 2000 records (below are the example of the records) 10/10/2013 10:25:09 AM,5.89,45,264.83,PTTTT 10/10/2013 10:25:13 AM,5.89,2000,11780.00, Some of the records are with the "PTTTT" and some dont. So how do i read the records for the part until 4th column and elimiate the PTTTT column ? Thanks

Member Avatar
Member Avatar
+0 forum 5

[CODE]#include <iostream> using namespace std; int main() { int a,b,c, ope; cout<<"enter a value" << endl; cin >> a; cout<<"enter b value" <<endl; cin >> b; cout<<"enter operation (+ - * / and %)"; cin>> ope; if (ope == +) { c=a+b; cout<< c; break; } if (ope == -) { c=a-b; cout<< c; break; } else if (ope == *) { c=a*b; cout<< c; break; } else if (ope == /) { c= a/b; cout<< c; break; } else if (ope == %) { c=a%b; cout<< c; } else cout<<"entered wrong input"; return 0; } [/CODE] whats wrong with …

Member Avatar
Member Avatar
+0 forum 10

Is there a library that has a function that will take (theta,phi) and return (x,y,z)? Thanks, Dave

Member Avatar
Member Avatar
+0 forum 13

I am supposed to sort an array in ascending order..I have tried but then i cant get the results i want.I also tried to look it up in this forum but i still can't get it...Here is part of the code:[ICODE]void sort() { int size=10; int j,temp,i; for(i=0;i<(size-1);i++) { for(j=i+1;j<size;j++) { if(queue[i]>queue[j]) { temp=queue[i]; queue[i]=queue[j]; queue[j]=temp; } } } cout<<"Status: sorting done."<<endl; }[/ICODE] The result i getting is zero for everything...Please help me..

Member Avatar
Member Avatar
-1 forum 12

I want to develop a piece of software that other developers can use in their projects. It has to be active at runtime however, and perform some standard functionality every time the application runs. It is essentially software that provides extra functionality to the application developer and its users... I'm not sure how I might do this, and my google-fu has not been strong enough to find a definite answer.

Member Avatar
Member Avatar
+1 forum 3

Are there any differencies between these two code ? if (!a.equals("")) { editDate.setText(a) } and if (a!="") { editDate.setText(a) }

Member Avatar
Member Avatar
+1 forum 3

How do I process the xamarin forms that connect to SQL Server and export data to the listView ? I'm looking for this simple example. What do I find on google ?

Member Avatar
Member Avatar
+1 forum 2

Hi guys, I wonder if this is something I could do on this forum. I've never worked with REST, so I thought that it could be a good exercise to try to develop a very small and simple Java application and try to make use of REST as well. I found a brief which seems simple enough, I'll share it with you (I'm happy to change this of course if you think it's useful as for me it's just practice). As a Rest Client I want to submit new orders for bricks So I can start customers’ orders Given A …

Member Avatar
Member Avatar
+0 forum 50

Because Microsoft will be removing vbScript in the next version of Windows, I have been busy converting my utility vbScripts into Python. Part of this is a library of functions that I keep in `D:\include`. I'd like to maintain this system in Python, but the import process is rather clumsy. I have to import sys sys.path.insert(0,r'D:\include') Only after that can I import a file. The documentation is somewhat obtuse but I gather my best option is to add the file `D:\include__init__.py`. As long as that folder is known to Python I could then do from include import myfile1 to include …

Member Avatar
Member Avatar
+0 forum 6

I'm reading data from SQLite database table. If the SQLiteDataReader encounters a negative double an InvalidCastException is thrown. Here is my code. public void DBToArray() { string stm = "SELECT * FROM mtable"; SQLiteCommand cmd = new SQLiteCommand(stm, sqlcon); SQLiteDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { Console.WriteLine( rdr.GetInt32(0) + " " + rdr.GetString(1) + " " + rdr.GetString(2) + " " + rdr.GetString(3) + " " + rdr.GetInt32(4) + " " + rdr.GetDouble(5) + " " + /* -5.0 no good */ rdr.GetString(6) + " " + rdr.GetString(7) ); } } Just wondering if anyone has encountered and solved this …

Member Avatar
Member Avatar
+0 forum 3

Hi! We are a 4 member group for our thesis and we already have submitted 5 topic proposals yet nothing was accepted...and here are the topics: enrollment system, gadgets on track, employment resource system, subdivision technical entry pass Now, I need a help for new ideas that can be developed through visual studio and it can be a web-based or window-based projects. Hope you can help me Thanks in advance!

Member Avatar
Member Avatar
+0 forum 37

Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current standard compliant compilers should have <chrono>, <thread>, <random>, and to_string() in suppliment to those more deprecated functions. This is a very simple, high speed method of generatinga alot of randomized junk data onto your drive. Make sure you have about 300MB of RAM available for the overhead. An older non-SSD might croak. Useful for making old files unrecoverable by overwriting the old space on a drive. Doesn't go …

Member Avatar
Member Avatar
+2 forum 1

The End.