132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

Just a little fun with Python's named tuple, behaves like a class but is much leaner.

Software Development python
Member Avatar for vegaseat
2
681
Member Avatar for vegaseat

Applying the famous Gauss algorithm to determine the date of Easter for a given year.

Software Development algorithm python
Member Avatar for vegaseat
2
1K
Member Avatar for vegaseat

Using the PySide GUI toolkit will make selecting, copying and pasting encrypted and decrypted text somewhat easier. Not ideal yet, but it will be a good start for those of you who are not very familiar with GUI programming.

Software Development encryption gui python
Member Avatar for Lardmeister
2
531
Member Avatar for sandeepparekh9

Simple Encryption and Decryption Function using rijndael algorithm. Imports this: Imports System.Security Imports System.Security.Cryptography Imports System.IO Imports System.Runtime.InteropServices Imports System.Text.RegularExpressions Imports System.Text Source : [snipped]

Software Development algorithm encryption vb.net
Member Avatar for Reverend Jim
2
10K
Member Avatar for vegaseat

This short snippet shows you how to preprocess a text to remove punctuation marks, then do a word frequency count using Counter() from the Python module collections. Finally, two sorts are applied to display words with matching frequency in alphabetical order.

Software Development python
2
670
Member Avatar for Riteman

Am developing a software for submission as project. As a part of it, am planning to create a Phonebook package. I created a database in access and i integrated it in VB.Net. Information: Database name : Contacts.accdb DataTable : Contacts Contents in table : First Name,Last Name, Phone, Address... Platform …

Software Development seo vb.net visual-studio
Member Avatar for Takuramatthew
2
12K
Member Avatar for Dimonai

Hello to all, I'm have been porgramming console applicactions in C# to learn the language. Today I was curious in windows forms, and started a project. After searching in the web/youtube I see people putting all the code on the button code(when doubble click), BUT I saw there the same …

Software Development c c# c++ microsoft oop
Member Avatar for Dimonai
2
2K
Member Avatar for vegaseat

Uses the PySide GUI toolkit's QtMultimedia module to play a specified sound. You can change frequency/pitch and volume of the sine wave.

Software Development gui python
2
1K
Member Avatar for happygeek

[![Perforce Software](/attachments/small/0/b6af75be8ad198722ef5cae5061023d5.jpg "align-right")](http://www.perforce.com) Perforce Software has today shared five essential tips for software development teams to consider by way of spring cleaning the development environment. These management guidelines are designed to help maintain well-organized codebases as well as improving the overall development process. Randy DeFauw, senior product manager at Perforce …

Member Avatar for CCHIndiaStore
2
401
Member Avatar for happygeek

DaniWeb, the 10 year old IT discussion community with more than a million members, is always looking forward and never stops introducing new features and functions for users. When spammers managed to get the better of the (highly customised) vBulletin forum platform which had been driving DaniWeb since the get …

Software Development android api daniweb-api ios json vbulletin
2
258
Member Avatar for HumblePie

#I am not grasping this exercise; Please help with some explanations. Q: Write a method that accepts an array of numbers as a parameter. The method should multiply each number by five, and display the results. Call this method, passing to it an array of any three integers. THIS IS …

Software Development
Member Avatar for ddanbe
2
165
Member Avatar for otengkwaku

this is a very simple app the helps yous to keep track of time. It says the time very 15 minits, by the way you can change it. it uses pyttsx which can be dowloaded and install. copy this code and save it as sayTheTime.pyw and double click it. it …

Software Development python
Member Avatar for snippsat
2
385
Member Avatar for JamesCherrill

Java SE JRE 7 update 21 is now available, with fixes for dozens of security-related issues. Immediate installation is highly recommended. Head on over to Oracle's Java download page and grab it now. There is also a version for Java 6 users, if any such animals still exist.

Software Development java oracle
Member Avatar for jwenting
2
181
Member Avatar for L7Sqr

Hello. This code snippet is a basic calculator. The general concept is that the calculator accepts infix expressions as strings, converts them to reverse polish notation by way of the shunting-yard algorithm and then evaluates the resulting expression. I tried to encapsulate the functionality of each piece so that, in …

Software Development algorithm c++
Member Avatar for happyuk
2
6K
Member Avatar for imBaCodes

Can Anyone here can tell me How to create a Date Picker in MS EXCEL using MACRO. And Binding it with a Button onClick Event. Thank You

Software Development visual-basic
Member Avatar for Jx_Man
2
188
Member Avatar for asifalizaman

hi!guys i hope you all will be fine . Today i want to know from you about the Java Application? According to my views or my knowledge may be i am wrong.There are two types of application in java which is **1. Java Stand-alone Application 2. Java Applet Application** I …

Software Development java web-browser
Member Avatar for stultuske
2
252
Member Avatar for jellyworms

Hi, I just started learning python a few days ago...and I'm already stuck on something easy TT.TT I have a Tab-Separated-Values data.tsv file that contains 3 columns (country name, area, and population). here's a snippet of my current tsv file country area population MACAU 28.2 578025 MONACO 2 30510 SINGAPORE …

Software Development file-system python
Member Avatar for bumsfeld
2
287
Member Avatar for JamesCherrill

Here's a simple thing that I can't find a simple solution for - so any suggestions will be very welcome... I have a `Map<String, MyClass>` and if it has more than 1 entry I let the user pick a MyClass instance by displaying the keys. No problem there. If it …

Software Development java
Member Avatar for JamesCherrill
2
345
Member Avatar for vegaseat

Scientists and deficit spenders like to use Python because it can handle very large numbers. I decided to give it a test with factorials. Factorials reach astronomical levels rather quickly. In case you can't quite remember, the factorial of 12 is !12 = 1*2*3*4*5*6*7*8*9*10*11*12 = 479001600, that is 479 million …

Software Development python
Member Avatar for sneekula
2
5K
Member Avatar for Begginnerdev

Upon resizing an anchored combobox - I noticed the text was always selected. This sparked the initiative to fix this problem. (Microsoft decided not to) So by extending the combobox class we can fix this. The following class can be dropped into a form for designer manipulation or as a …

Software Development vb.net
2
276
Member Avatar for nok.nee21

I'm planning to develop a system that can connect through online sql database and a website connected on the same sql database.. Can anyone help me.. Please response..

Software Development sql vb.net
Member Avatar for nok.nee21
2
129
Member Avatar for happygeek

According to new research from Kaspersky Lab, in the form of a report called [Evaluating the threat level of software vulnerabilities](http://media.kaspersky.com/documents/business/misc/Kaspersky_Lab_Report_Software_Vulnerabilities_final.pdf), 72% of Java users haven't switched to the latest, safest, version despite highly publicised vulnerabilities and resulting security exploits. ![dweb-java011](/attachments/small/0/dweb-java011.jpg "align-right") And it's not just Java, the report also …

Software Development adobe cybersecurity flash java
Member Avatar for JamesCherrill
2
474
Member Avatar for bumsfeld

This shows the code for one simple crypt of text by swapping two adjoining characters each. You can make that more complex if you like. Can also be used for one nice riddle.

Software Development encryption python
Member Avatar for bumsfeld
2
630
Member Avatar for maxbummber

I was proposed a project that sounds like this. Consider a set of logical gates like AND, OR, XOR or NOT. Allow for building any logical circuit by connecting such gates. Provide input (0/1) to a number of gates and collect the results at the output of some of the …

Software Development java
Member Avatar for maxbummber
2
294
Member Avatar for ddanbe

These are (I guess) the most basic printing instructions in C#, to let some printed paper coming out of a printer. Start a new Forms application, drop a ComboBox, a Label and a Button on the form. Implement a form Load and a Button Click event and fill in the …

Software Development printer
2
364
Member Avatar for Reverend Jim

One of the things I have been steadfastly avoiding is writing code to print stuff. Most of what I want to print is from withing apps like Outlook or Word that already provide that functionality. But I finally ended up having to bite the bullet. What I ended up with …

Software Development vb.net visual-basic
Member Avatar for tinstaafl
2
3K
Member Avatar for hg_fs2002

I am trying to use such a hexadecimal floating constant "0x0.DAB789B" in java but it gives me java.lang.NumberFormatException. How can I convert hexadecimal float constant to decimal? I know how to convert hexadecimal **int** constant but that does not work for float constant.

Software Development java
Member Avatar for tux4life
2
680
Member Avatar for deceptikon

I've needed to write sample code using conio.h over the years, but my compilers don't support all of it (most notable being clrscr() and gotoxy()). So I wrote a conio simulator class to help me. Not all of the conio.h functions are present, such as cgets() and cscanf(), because I …

Software Development c++
2
1K
Member Avatar for vegaseat

A function to take a text and extract the string between two given substrings. Allows you to find the nth occurence. Also safeguards against dead ends.

Software Development python
2
1K
Member Avatar for TrustyTony

Notice that if you negate a boolean value with `not` in comparison with other boolean value or similar, you should put it inside a pair of parenthesis, otherwise you get syntax error: >>> 0 == not 1 SyntaxError: invalid syntax >>> 0 == (not 1) True >>>

Software Development python
Member Avatar for ZZucker
2
188
Member Avatar for deceptikon

C++ conversion of [this C snippet](http://www.daniweb.com/software-development/c/code/445012/simple-interactive-menu) for a simple interactive menuing system. The code shows three files: * menu.h: The header file for the menu class. * menu.cpp: Implementation of the menu class. * main.cpp: A sample driver that uses the library. The menu library is fairly generic in that …

Software Development c++
Member Avatar for tinstaafl
2
3K
Member Avatar for vegaseat

If you draw shapes that are closely spaced and shifted, you can create interesting interference patterns, so called moire patterns. Here is an example using the Python module PyGame to do the drawing.

Software Development python
2
728
Member Avatar for vegaseat

If you want a window with a menubar, toolbar, statusbar, dock and central widgets, you can use the PySide GUI toolkit's QMainWindow. To use the more traditional box and grid layouts, you simply add a QWidget instance as the central widget. Here is an example.

Software Development gui python
2
3K
Member Avatar for nanodano

[B]Introduction[/B] Hello everyone. This little code snippet shows you how to read in scan codes from the keyboard. It is slightly different than reading in a regular character. When you use the [INLINECODE]getch()[/INLINECODE] function, it is normally returning an ASCII value. Some keyboards have extra keys though. These include the …

Software Development c++
Member Avatar for thendrluca
2
6K
Member Avatar for vegaseat

A Python code example to find an approximate value for x in f(x) = 0 using Newton's method.

Software Development mathematics python
Member Avatar for dashing.adamhughes
2
7K
Member Avatar for JamesCherrill

Hello all. I'm currrently working on a GUI that needs to support dragging some application-specific objects from a selection area onto a work area (JPanel). It's currently working in a "click where to place the object, then click the Add button" mode, but that's not good enough. The obvious approach …

Software Development gui java java-swing oracle
Member Avatar for JamesCherrill
2
1K
Member Avatar for Ancient Dragon

I'm trying to write a simple program that detects when files are changed in a folder (for another question here). It has a standard Windows with a TextBox and a couple buttons. Upon program start it calls .NET function FileSystemWatcher then sets up four event handlers for it. What I …

Software Development vb.net
Member Avatar for Reverend Jim
2
2K
Member Avatar for starlight09

hi I'm trying to sort 3 numbers from lowest to highest that the user enters...ex ...2 , 4, 6. I have a problem with finding(calculating the middle) number. this is what i have [CODE]//create a Scanner Scanner scanner = new Scanner(System.in); //Prompt the user to enter three floating-point numbers System.out.println("Please …

Software Development java
Member Avatar for Taywin
2
9K
Member Avatar for Gribouillis

This snippet is easy: it defines an immutable wrapper around a sequence type (list, deque, etc) which allows a class, function or module to expose a read only version of a sequence to the outer world. A constant wrapper around mapping types could also be defined in a similar manner.

Software Development api cybersecurity python
Member Avatar for Gribouillis
2
578
Member Avatar for bhemlhie

How to connect a vb6 executable files to A website?

Software Development visual-basic
Member Avatar for sara93
2
579
Member Avatar for jrcagle

Generators are essentially dynamic sequences, making their official debut in Python 2.5. That got me to thinking: can we make a circular list with them? Why yes, we can...

Software Development python
Member Avatar for vegaseat
2
191
Member Avatar for vegaseat

An approach to create multiple GUI buttons (or other widgets) using list comprehension. In this case I used the Tkinter GUI toolkit that comes with the Python installation.

Software Development gui python tkinter
Member Avatar for Ene Uran
2
484
Member Avatar for PrimePackster

Well Guys! I was learning how to read and write class objects from & to file respectivily. And here is a small code that i made...... As far as the code goes its all well.... And i am getting what i want.... But what i want to know is, **where …

Software Development c++ file-system ios
Member Avatar for Ancient Dragon
2
193
Member Avatar for vegaseat

Just a small example showing how to draw circles with PySide (public PyQT). I used LightShot to capture the display, which gives you a link to the picture. http://prntscr.com/kw6b6

Software Development python
2
10K
Member Avatar for skiboy209

I thought i would share this with the community wrote most of it in school but the ai i wrote at home enjoy!

Software Development c++ gaming
Member Avatar for PalashBansal96
2
256
Member Avatar for bernaprog

hi, I'm trying to calculate the percentage of an ammount of boxes in C. Ex: 4400. I have the next code: [CODE=c++]#include<iostream.h> #include<conio.h> main() { double a=2400; double b=8000; double per=0; per=2400*100/8000; cout<<per; getch(); } [/CODE] and return a negative value. I try to asign values at differents variables like: …

Software Development c++
Member Avatar for Ancient Dragon
2
121
Member Avatar for starletcharmed

Hi, can anyone help me with my code? Im trying to reverse my string using stack... but when it compiles and put in a string and press enter... nothing happens... Any suggestions? [CODE]#include <iostream> #include<stack> #include<string> using namespace std; int main() { stack <string> s; string a; cout << "Enter: …

Software Development c++
Member Avatar for d_a_y_o
2
4K
Member Avatar for abd2

hi, this is the code: #include <stdio.h> main() { int m1, m2, m3, m4, m5, per; printf("Enter marks in five subjects\n"); scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5); per=(m1+m2+m3+m4+m5)/5; if(per>=60) printf("first division\n"); if((per>=50) && (per<60)) printf("second division\n"); if((per>=40) && (per<50)) printf("third division\n"); if(per<40) printf("fail\n"); } this is the output for: [root@localhost lbin]# gcc -o division division.c …

Software Development c file-system
Member Avatar for kimchong
2
2K
Member Avatar for vegaseat

This Python Tkinter GUI toolkit code draws a shape, and shows you when and where the mouse has been clicked within the shape.

Software Development gui python tkinter
2
4K
Member Avatar for Michael27
Member Avatar for Michael27
2
249

The End.