132,723 Archived Topics
Remove Filter ![]() | |
[B]1.[/B] Right click on your project name in solution explorer. [B]2.[/B] Point the cursor on [COLOR="Green"]Add[/COLOR] then choose [COLOR="Green"]Existing Item...[/COLOR] [B]3.[/B] Now go to the Location of your sound file and select that sound file. [B]4.[/B] Now select your sound file in solution explorer then Right click on it choose … Software Development asp.net c# file-system | |
[This post](http://joelgrus.com/2013/12/24/why-programming-language-x-is-unambiguously-better-than-programming-language-y/) by Joel Grus is both insightful and highly entertaining. Make sure to read the comments which are also witty and amusing. Software Development | |
Shows you how to get a Python object's memory size. Notice that there can be a difference between Python versions. Software Development motherboards-cpu-ram python | |
This is just a little something for those of you used to using the Eclipse IDE, it's syntax highlighting almost identical to Eclipse save a bit of enhancement. Eclipse doesn't highlight ints, octal and hex individually but DevC++ can, there are a few other things in there that promote very … | |
This snippet prints a python list of strings in multicolumn format (similarly to linux `ls` command). It uses module prettytable, available in [pypi](https://pypi.python.org/pypi/PrettyTable). Software Development python | |
A modal dialog is a window that you must respond to. The MessageBox for example is such a window. It is a handy tool for displaying a warning or other kind of message to the user. But, you can configure it only in a limited way. Xcelled194 did a good … Software Development html-css | |
Hi guys. I decided to post this simple Photo viewer application. Its strictly for beginners, and cab be improved. /** * * @author Neon Tetras */ import java.awt.Image; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.ImageIcon; public class ImageViewer extends javax.swing.JFrame { /** * Class constructor: ImageViewer */ public ImageViewer() … Software Development image java java-swing oracle | |
This example calculates timed x, y points of a projectile motion that can be used for plotting or other calculations. Software Development python | |
A Python sort with a helper function to allow for mixed order sort like age descending and weight ascending. Software Development python | |
Just another loan calculation, this time using a handy function in Python module numpy. Software Development python | |
The syntax of the [icode]str.format()[/icode] method described in [url=http://docs.python.org/library/string.html#formatstrings]the python 2.6 documentation[/url] looks both powerful and complex. The idea of this thread is to start a collection of nice formatting examples which will ease the task of mastering this function. Please post useful examples, and document them :) Software Development python | |
Java vulnerabilities have hardly been out of the news during the last year. Here at DaniWeb we've covered a number of the stories as they surfaced: [Java in the cross-hairs: the security debate rolls on](http://www.daniweb.com/software-development/java/news/445532/java-in-the-cross-hairs-the-security-debate-rolls-on), [Is Java 7 still insecure? Oracle Patch doesn't fix underlying vulnerability](http://www.daniweb.com/software-development/java/threads/432479/is-java-7-still-insecure-oracle-patch-doesnt-fix-underlying-vulnerability), [Update my insecure Java … Software Development cybersecurity java oracle | |
So you want to find out which day of the week you were born. Well at least some of us do. I actually wrote this program because my whole family was born on Sundays, and my friends didn't believe it! An oldie but goodie, moved from DeSmet C to Turbo … Software Development python | |
Here is a small--complete--program that includes a sub-routine that inputs two matrices and then multiplies them. Notes: * 1) I happen to like taking input from a text file. It eliminates the need to type input from the console, especially when debugging, it prevents the possibility of making typos. * … Software Development c++ mathematics matrix-multiplication | |
I have recently been interested in Java Swing and Game development, so naturally I began creating many different 2D games. During them I found myself having to rewrite much code, but eventually I decided to write some classes that would help me whenever I wanted to make a game. Here … Software Development gaming gui java java-swing | |
The wxPython Phoenix project can be used with Python version 2 and version 3. The project applies pretty much the familiar wxPython code. Here we are testing a dragable borderless frame. Software Development python | |
It is about time we start building a Sticky in this forum listing some resources so the newbies will have an easier time finding the information they need. I will start with these valuable links: x86 Assembly Language FAQs Wikipedia: Assembly Language Wikipedia: List of assemblers Links at Webster MASM … Software Development assembly | |
You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file. | |
A somewhat newer look at Peter Parente's pywin32 based speech engine. It will read text on your computer. Software Development python | |
A simple test of PySide's QFileDialog widget and its method getOpenFileNames. Use method getOpenFileName if you want just one file name. Software Development python | |
Simple code to show you how to display an image from a Web URL using the Tkinter Python GUI toolkit, the Python Image Library (PIL) and the data_stream created with io.BytesIO(). | |
I was going to post this in a thread, but it turned into something a bit more serious and may be useful as a code snippet. The code shows three files: * menu.h: The header file for the menu library. * menu.c: Implementation of the menu library functions. * main.c: … | |
FireEye security researchers are warning that they have [detected a new zero-day vulnerability](http://blog.fireeye.com/research/2013/02/yaj0-yet-another-java-zero-day-2.html) that is being used successfully in the wild against browser clients with both Java 6u41 and Java 7u15 installed. Given that the Java 7 update was only released a couple of weeks ago, this is yet more … Software Development cybersecurity data-structure java oracle | |
Last week saw the discovery of YAJE: Yet Another Java Exploit. Sadly, Java vulnerabilities are neither new nor uncommon and the bad guys are quick to exploit them in the wild. Some claim that Oracle is in too much of a rush to extricate itself from this unholy mess and … Software Development cybersecurity java oracle | |
So you want to find out which day of the week you were born. Well at least some of us do. I actually wrote this program because my whole family was born on Sundays, and my friends didn't believe it! An oldie but goodie, moved from DeSmet C to Turbo … Software Development c | |
If you have any particular topics that you'd like to see a code snippet for then please post your requests here. In order to avoid duplication of effort, if you feel inclined to respond to a request then please post here indicating that you will create the requested code snippet … Software Development vb.net | |
This snippet allows you to find the number of ordered permutations of items taken from a population of known size. It uses the well know algorithm with factorials. For very large populations you may want to use an approximation of factorials. | |
If you want to know the number of combinations of x things taken n at a time, you can use the Python module gmpy. The module gmpy is a C-coded Python extension module that supports fast multiple-precision arithmetic, very handy if x things reach a large number. Software Development python | |
As the title says, it's a simple trie class written in C++11. The only operations implemented are insert, remove, and search (both prefix and exact matches). I sort of abandoned the test/debug process, and while I'm somewhat confident that there aren't any serious bugs, I can't guarantee it. Use this … Software Development c++ | |
Just a different way to extract desired data from an xml code string. | |
Explore the Python module bisect to search a sorted list and insert elements in the proper location in a sorted list. | |
A short code to show you how you can download and display an image from the internet on Python's Tkinter GUI toolkit. | |
Just a simple Jython code to test drawing on the canvas. | |
hey, just looking for a bit of advice on code readability, i've figured out a new and i hope better way to handle collisions but the when reviewing the code it all just blurrs together for me so is there some format teckneuqies i can use so its easier for … Software Development c++ | |
There seems to be many ways to create a dictionary, which one do you prefer? Software Development python | |
You may want to call Python's list the answer to other computer languages' arrays. Here we take a look at the things you can do with lists, create an empty list, list the attributes and methods, load, append, count, insert, join, pop, remove, remove duplicate items, reverse, search, sort, establish … Software Development python | |
This PySide (PyQT) code sample shows you how to apply a StyleSheet to a GroupBox containing a number of RadioButtons. Software Development python | |
A little fun drawing with the Python module turtle. Well commented to help the beginner. Software Development python | |
Upon aiding a friend - I have decided to post the example used here. The following is a snippet that shows basic class inheritance. The source file as well as a test case can be found attached. You can test these classes with the following code: Dim cNew As New … | |
Just a quick heads-up, especially for anyone using Java in their web browser. There's a "widely exploited" vulnerability in Java that could allow bypassing normal security when a Java applet is run silently upon visiting a web site. (ie It's a bad one). Users are being widely advised to disable … Software Development java oracle web-browser | |
Explore Python's sqlite3 database module, create, write and read a database file. | |
This snippet shows you how to create a list of class instances. The class itself cannot be pickled, but the list of instances can. To use the pickled data file in another program, you have to recode the class in that program. Software Development python | |
[B]!USING PYTHON 3.1![/B] Hello DaniWeb! Today I'm going to be posting a [B]simple[/B] threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a … Software Development multithreading python | |
This Python code allows you to get selected statistics of a story text. It will count lines, sentences, words, list words and characters by frequency, and give the average word length. It should be easy to add more statistics using the dictionaries created. Software Development mathematics python | |
You can alternately show one of two lines drawn on the Tkinter canvas by simply moving them on and off the canvas screen. This beats a cumbersome create and delete cycle. | |
This python 2.7 snippet adds a thin layer of sugar on the itertools module's api, allowing many of its functions to be used as decorators and adding some new functions. Enjoy ! | |
There is always room for optimizing primelist functions. Here is an assortment timed with Python module timeit ... Software Development python | |
Below you'll find a small program. The challenge is to predict the output of the program, then explain why it gave the output it did. using System; using System.Collections.Generic; namespace Sample { class Program { static void Main(string[] args) { MyStruct a; a.a = 1; a.b = 2; Dictionary<MyStruct, int> … | |
Just a few more explorations using a Python class to mimic a C Structure or Pascal Record. Loading the record from a csv type data file, displaying the data and sorting and searching the data in various ways. Software Development data-structure pascal python | |
Hi all! This is a simple piece of code that I wrote about a year ago, in response to a question on Daniweb. I decided to infuse it with some C++11 magic, which led to a pretty sweet code snippet, full of neat little techniques you might want to use, … Software Development c++ |
The End.