199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for bumsfeld

This program uses Python module re for splitting a text file into words and removing some common punctuation marks. The word:frequency dictionary is then formed using try/except. In honor of 4th of July the text analyzed is National Anthem of USA (found via Google).

Member Avatar for sujit.shakya.3
2
2K
Member Avatar for vegaseat

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

Member Avatar for vegaseat
2
681
Member Avatar for vegaseat
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.

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]

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.

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 …

Member Avatar for Takuramatthew
2
12K
Member Avatar for happygeek

Fast food chain KFC has had more than its fair share of Kentucky Fried WHAT? myths busted over the years. However, some of the stories turn out to be genuine such as the [breaded and deep fried kidney](http://www.huffingtonpost.com/2013/01/07/ibrahim-langoo-brain-kidney-kfc_n_2425917.html) that was discovered by Ibrahim Langoo in a KFC in Colchester, England …

Member Avatar for peter_budo
2
997
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 …

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.

2
1K
Member Avatar for cereal

Hello, I've an array with different type of values: int, null, strings, arrays. I'm trying to remove nulls and empty strings, but I want to save ints, even when it equals to zero, so I tried with `array_filter()`, by default it will remove `0`, `''` and `null`, but by applying …

Member Avatar for cereal
2
435
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 …

2
258
Member Avatar for Sp!ke

This little snippet will teach you all about arrays and arrays of arrays, and so on and so forth.

Member Avatar for LastMitch
2
231
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 …

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 …

Member Avatar for snippsat
2
385
Member Avatar for <M/>

I found a resource that can help some people learn programming a bit better. The resources are provided by Harvard (presented by their students) and I watch a couple of their videos and they were really good. So I thought I should share it with you guys. Here is the …

Member Avatar for pritaeas
2
111
Member Avatar for 72dpi

Case switching is a neat way to make your site a bit more dynamic. it gives you the ability to show blocks of information "on the fly". By attaching the variable name "Content" to our link, we pass that condition in the query string. Note that on the last link, …

Member Avatar for michel.cote
2
1K
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.

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 …

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

Member Avatar for Jx_Man
2
188
Member Avatar for pritaeas

Here's my base class and class for the unauthenticated DaniWeb API calls. Not every method has all features implemented yet, and it's not been fully tested either. Here's how to start using it: include 'DwApiBase.class.php'; include 'DwApiOpen.class.php'; $dwapi = new DwApiOpen(); $result = $dwapi->GetMemberActivityPoints(94719); $result = $dwapi->GetMemberEndorsements(94719); $result = $dwapi->GetMemberReputationComments(94719); …

Member Avatar for pritaeas
2
435
Member Avatar for diafol

OK, as promised, here's an updated 'quick(!) and dirty' class for retrieving and setting data via the Daniweb API. It allows the extraction of data based around: # DATA RETRIEVAL & SETTING # ## non-OAuth ## * forums * articles * posts * members * activity points * endorsements * …

Member Avatar for LastMitch
2
563
Member Avatar for asifalizaman

Can any one tell me that which tool is the best for me for the mobile develoment also which language is the must for me to first learn thanks for reading guys

Member Avatar for peter_budo
2
211
Member Avatar for deltascrow

Some people will say that modern languages are the reason behind the production of generations of "inferior" programmers of late. Because they provide a lot of things in hand, people tend not to delve into the basics and learn the insides... Do you agree, or disagree? Please share your views …

Member Avatar for mike_2000_17
2
193
Member Avatar for asifalizaman

what is the difference b/t PHP and ASP.net php is the server side scripting language and ASP.net is i think same as php but specific to Microsoft .am i right kindly explain differenc

Member Avatar for jkon
2
250
Member Avatar for asifalizaman

hi!guys Today i want to learn from you.. where to start PHP and what tool is the best for me .i am a beginer and i want to expert in PHP so what you suggest me Thanks for reading

Member Avatar for diafol
2
293
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 …

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 …

Member Avatar for bumsfeld
2
287
Member Avatar for asifalizaman

hi!guys i think you all will be fine,..........Today i want to know from you what is the difference b/t PHP and XML also which is best ,which language i start learing first and what's relation are among b/t two languages..My poin of view is PHP is hypertext preprocessing language used …

Member Avatar for asifalizaman
2
537
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 …

Member Avatar for JamesCherrill
2
345
Member Avatar for pritaeas

Wasn't sure yet whether to post this publicly. I've adjusted the PHP code snippet for the OAuth. Curl allows you to trap a redirect and this snippet just shows how to do that for the token. The regex searches for the redirect url in the returned header, it can be …

Member Avatar for pritaeas
2
558
Member Avatar for ipster

#Web app state management# The current state of the user interface determines which application actions are enabled and thus which html elements are enabled for the user to invoke them. Classes are used in the html to indicate elements that need to be managed. Then jQuery is used to configure …

Member Avatar for LastMitch
2
359
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 …

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 …

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..

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 …

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.

Member Avatar for bumsfeld
2
630
Member Avatar for cereal

> There is a vulnerability in certain CGI-based setups (Apache+mod_php and nginx+php-fpm are not affected) that has gone unnoticed for at least 8 years... read more: http://www.php.net/archive/2012.php#id2012-05-03-1

Member Avatar for LastMitch
2
525
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 …

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 …

2
364
Member Avatar for code_rum

Here is my code: $(document).ready(function () { $(".submit-text").click(function () { var startdate = $("#startdate").val(); /*This line returns mm/dd/yyyy */ var starttime = $("#starttime").val(); /*This line retruns hr:min AM/PM */ var dtstart = new Date("startdate" + starttime); alert(dtstart); }); }); ****On alert it displays invalid date... but if I use.. var …

Member Avatar for code_rum
2
177
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 …

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.

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 …

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.

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 >>>

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 …

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.

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.

2
3K

The End.