199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for LastMitch

I'm new to this forum but I do read posts as a non-member and I learn a lot from reading other posts from other member. I'm having problem understand how to write the code correctly. I can't seen to figure out the international shipping cost but for domestic it works. …

Member Avatar for LastMitch
2
200
Member Avatar for ddanbe

Start a new console application and fill in the about 70 lines of code in the Program.cs file. Run and enjoy!

Member Avatar for ddanbe
2
408
Member Avatar for riahc3

Hey I wanted to make a thread for not only myself but for others to give a "thank you" to anyone who has helped them. In my case, without some suggestions here, I would have been stuck for days on a single thing and not be able to advance further. …

Member Avatar for stultuske
2
85
Member Avatar for Comatose

One of the most important things to understand when automating office, is that it's heavily [search]OOP[/search], and therefore you are forced to work with objects. In order to create an object that is external to your application (for example an office application, whereas a button or textbox would be internal …

Member Avatar for DJ-DOO
2
1K
Member Avatar for CppBuilder2006

this program contains a template function that can calculate determinant of any n by n matrix using permutations. it can be run in Visual C++ 2010 Express.

Member Avatar for aruldave
2
461
Member Avatar for lxXTaCoXxl

I used a label inside my snippet just to test it; but this will simply increment and decrement a float value by 0.2f between the values specified in the conditionals. I have it updating between 8f and 15f. Must be run on a timer (make sure the interval is low …

Member Avatar for lxXTaCoXxl
2
176
Member Avatar for vegaseat

Take a look at a typical Windows GUI frame (form) with a menubar, statusbar, panel, label and buttons. Set the font and size of text, click the buttons to create some events. All of this and much more is in the free wxPython package.

Member Avatar for pyphil
2
284
Member Avatar for rotten69

I created a foreign key on a table just using this statement. When I wanted to drop it, phpMyAdmin didn't allow me to do so. Would anyone suggest a nice way of getting away with it? [code] ALTER TABLE `likes` ADD CONSTRAINT (fk_user_id) FOREIGN KEY REFERENCES `users` (user_id); [/code] This …

Member Avatar for rotten69
2
6K
Member Avatar for PdotWang

I want to create 100 buttons in a Form. This is what I just tested. When you finish the following steps, you will see it is very nice. Enjoy. Step 1, Create a Form called Form1. Step 2, Add a TableLayoutPanel called TableLayoutPanel1. Step 3, Make it 10 X 10 …

Member Avatar for jaimin4829
2
975
Member Avatar for khizer03

in a form i have a listbox which has many items and one button,when we execute the project and while execution when i click a items from the listbox it will display the clicked item on the button but the problem i have is how to display the same clicked …

Member Avatar for codeorder
2
270
Member Avatar for simplypixie

I just thought I would re-iterate something that I have mentioned a few times in my replies to threads on here in that if your code isn't working, one of the first things to do is actually test your query in the database (i.e. through phpMyAdmin). The reason I am …

Member Avatar for rotten69
2
148
Member Avatar for |-|x

I originally posted this over on the [URL="http://wordpress.org/support/topic/incorrect-page-content-passed-to-plugin-in-firefox"]WordPress forums[/URL], and got no responses. Eventually I figured out what the problem was and fixed it, but thought I'd repost here in case anyone else is experiencing similar issues (I couldn't find any related articles in my initial search on the symptoms.) …

Member Avatar for cereal
2
206
Member Avatar for Gribouillis

This snippet defines a function walk() which generically performs a depth-first traversal of a tree, using preorder, inorder or postorder rules. Here, genericity means here that there are no hypotheses on what the tree nodes are or the implementation of the tree. Walk() only needs an arbitrary object used as …

Member Avatar for Gribouillis
2
1K
Member Avatar for Gribouillis

This snippet defines a simple decorator to post-process a function's return value through a sequence of filters. As a first application, the decorator can transform a generator function into a function returning a sequence type (list, tuple, dict).

Member Avatar for Gribouillis
2
573
Member Avatar for ariffin246

Hi Everyone. I am totally new here and this is my first post.. I have tried many place, since i could get any solution. I have no choice then posting here. basically, i have one delete form, where i will load the firstname from a table in access(hardcode) to listbox. …

Member Avatar for jhade
2
124
Member Avatar for TrustyTony

This is similar to earlier posts in DaniWeb by vegaseat, but it demonstrates getkey with withdrawn tkinter, restart inside object by re-calling it's __init__ method.

Member Avatar for TrustyTony
2
2K
Member Avatar for Gribouillis

Any sequence of python strings can be disguised to look like a file opened for reading, which can then be passed on the fly to functions expecting such an input file. This code snippet defines the necessary adapter class. The obtained file-like objects store only one string of the sequence …

Member Avatar for Gribouillis
2
1K
Member Avatar for Tom Gunn

CSV is more than just comma delimited fields. There are quoting and white space rules too. This is a short function as an example of a complete way to read CSV records line by line.

Member Avatar for moonlight01
2
370
Member Avatar for OmniX

I have tried to research this and im always running into old articles. What I have come across are (possibly more): md5, sha1, hash, crypt and mcrypt Now I have used md5/sha1 before and have 32/40 character long strings the others I dont know too much about but in short, …

Member Avatar for Stefano Mtangoo
2
2K
Member Avatar for mameemonster

i'm new to this c programming. all i wanna do is to make the user to enter the number of student, then input the name and address of the student. later i want it to print the name and the address. the program crashes after i input all the name …

Member Avatar for WaltP
2
440
Member Avatar for ddanbe

The VS designer is a wonderful tool to use and saves you lots of time. One drawback though. If you have a lot of the same controls and you want to change some properties of it at runtime, you got some coding to do. Say you want to change the …

Member Avatar for Teme64
2
945
Member Avatar for veledrom

Hi, I want to authenticate user if he/she successfully logged in before or not, in every pages. Obviously on top of the pages I have to call a function or another page to run that function to carry out checks but, I really don't know what kind of code I …

Member Avatar for Stefano Mtangoo
2
118
Member Avatar for cwarn23

Please post a list of ideas for tutorials that can be written for the php section. Please bear in mind the tutorials are to be kept relatively small so don't ask for something that may take pages upon pages of text to explain. Thanks.

Member Avatar for diafol
2
131
Member Avatar for peter_budo

Sometimes one line of tool tip is not enough. You may want to try and play around with JToolTip, but if you in hurry this "little hack" can be handy. With little of HTML plus CSS code you can work out various formats (font, colour, alignment, size etc.).

Member Avatar for peter_budo
2
508
Member Avatar for TrustyTony

Picked up from old thread but currently applicable (the IBAN number became more widely required actually this year in Finland). The style was quite alien for modern Python coders, so I massaged the code to my own liking. I removed many temporary variables, as for my opinion they did not …

Member Avatar for TrustyTony
2
416
Member Avatar for TrustyTony

Here is example how data can be summed to dictionary or you can use numpy.histogram to sum the data as weights of the categorized data.

Member Avatar for Stackheuw
2
2K
Member Avatar for ddanbe

What polar coordinates are is explained [url=http://en.wikipedia.org/wiki/Polar_coordinate_system]here[/url]. I wanted to draw some polar functions myself, so I changed my [url=http://www.daniweb.com/software-development/csharp/code/217204]plotting class [/url] a bit and added a polar struct to a new project.. Just posted code for the Plot class and the polar point structure here. You can find an …

2
1K
Member Avatar for alwaysLearning0

Hi, I was thinking of writing this post as a reply of [URL="http://www.daniweb.com/software-development/cpp/threads/375854"]Need small example for compile time polymorphism and runtime polymorphism in c++.[/URL] But later decided to open this new thread as some expert may want to give some expert opinion on this. On the above mentioned thread, mike_2000_17 …

2
203
Member Avatar for Gribouillis

A functor, or function object is sometimes a convenient way to encapsulate helper functions and data needed to achieve a small task, and also to share data between calls to the same function. This snippet defines a base class [b]functor[/b] which permits an easy functor creation for python 2.

Member Avatar for TrustyTony
2
724
Member Avatar for ryan_vietnow

hey guys,does anyone here know some tutorial on how to upload video files?tutorial in Adobe is quite confusing.Thanks..

Member Avatar for mina gharache
2
166
Member Avatar for Momerath

As a companion article to my [URL="http://www.daniweb.com/code/snippet349081.html"]Permutation Generation[/URL], I now present Combination generation. This snippet will do a lazy generation of the combinations of a set of objects. Each combination has a grouping size (number of items in each combination). If you need a different grouping size, you'll have to …

Member Avatar for codeholic
2
1K
Member Avatar for chubakueno

I've been attempting to do a basic XOR encoder but I got this problem: Everytime the result of the XOR operation is 10, the app writes 0xA 0xD, and I can't avoid this. Code: [CODE] #include <iostream> #include <fstream> #include <stdio.h> using namespace std; char* readfile(char * filename,int* size){ int …

Member Avatar for chubakueno
2
177
Member Avatar for 44shooter

Hello everyone. I have been struggling with my programming class from day one. I still can't seem to grasp the complete logic on how to write code. Anyhow, I have an assignment due that I am stuck on. Here is the assignment: In this exercise, you code an application that …

Member Avatar for TheClan
2
2K
Member Avatar for peter_budo

For these whom may be interested in new stuff about Java 7 here is web broadcast from few days back [URL="http://www.oracle.com/us/corporate/events/java7/index.html"]Java 7 Celebration Webcats[/URL] PS: Didn't watch it yet so have no idea if any good :D

Member Avatar for jwenting
2
164
Member Avatar for ddanbe
Member Avatar for happygeek

News reports suggest that March has been a good month for lovers of, and developers for, the Android operating system in pretty much every regard. That good news comes at the expense of the Apple iPhone and iOS we are led to believe, which appears to be losing the fight …

Member Avatar for wtstalin88
2
813
Member Avatar for dx135

You can use a decorator to modify the function object once, by assigning initial values to some new attributes. Then use these attributes as you would use static variables in other languages. Here is the result: (1, 1, [1]) (3, 2, [1, 2]) (6, 6, [1, 2, 3]) (10, 24, …

2
511
Member Avatar for vegaseat

Hello, I am vegaseat, the goofy moderator from the Python forum of DaniWeb. I wanted to know if anyone in the Java forum has played around with Java based Python, also known as Jython. Jython uses easy to learn Python syntax and can use the Java libraries. To make a …

Member Avatar for bumsfeld
2
494
Member Avatar for blackrusader

Basically, it is an open source software creation application that revolves around databases (similar to Microsoft Visual studio in some aspects but with python as the language). The user will be able to create forms with a drag and drop GUI builder, create an SQLite database and add functionality to …

Member Avatar for blackrusader
2
324
Member Avatar for jeffcogswell

I've been using jQuery for a few years now, and the more I use it, the more I like and appreciate it. It seems like I'm always finding new ways to use it, and usually those new techniques result in me writing less code and ultimately being more productive. On …

Member Avatar for twiss
2
584
Member Avatar for sngapoonage

Hi everyone, I use the ADO.Net SqlConnection, SqlCommand and SqlDataReader for all of my database interaction within my DAL. When I do a SELECT statement I cycle through my reader in a while loop and store each row in custom objects I have created. It seems to me like nobody …

Member Avatar for pitic
2
136
Member Avatar for Xcelled194

One of the things that always irked me about C# is its lack of an InputBox function. In VB, You can simply do [CODE=VBNET]response = InputBox("Enter your name")[/CODE] Unfortunately, there is no C# equivalent. Sure, you can call the VB one, but doesn't that kind of defeat the purpose of …

2
1K
Member Avatar for ddanbe

I mostly use Console or Forms applications in VS for my projects. Did anyone among you ever use an Empty Project when starting a new one? Well, it is as clean as you can get with Visual Studio! The world is at your feet! I use it mainly to test …

Member Avatar for ddanbe
2
969
Member Avatar for abelLazm
Member Avatar for abelLazm

Add this code any where in your main form and You will be able to disable the [B]X[/B] button on a winForm

2
504
Member Avatar for vegaseat

The tkSnack sound module was developed at KTH in Stockholm, Sweden. A great module to generate sound, play and analyze sound files and speech. It was written using Tkinter and its native TCL language. Alas, the latest release is from 2005. However, the important file tkSnack.py can be converted to …

Member Avatar for vegaseat
2
4K
Member Avatar for Rockpile

Hello, is this a bug? I get different results when I run this from command prompt and IDLE. [CODE] name = input('Hello what is your name: ') print('Hello ' + name + '.') [/CODE] From IDLE, it works correctly. The result shows as Hello Bob. If I run the program …

Member Avatar for vegaseat
2
448
Member Avatar for TrustyTony

[URL="http://www.pyside.org/"]PySide[/URL]: Python for Qt 1.0 released! The PySide team is thrilled to announce the release of PySide: Python for Qt version 1.0.0. In addition to the source code release, project community packagers have already released binary packages [developer.qt.nokia.com] for all major Linux distributions, Microsoft Windows, Mac OS X, and Nokia’s …

Member Avatar for e-papa
2
420
Member Avatar for Seattle Slim

I see some comments about Objective C or Cocoa however their does note seem to be a specific area for such comments. Objective C would be a good listing below the other languages. Any serious OSx iPad or iPhone developers would look here first for information. Since there is more …

Member Avatar for jon.kiparsky
2
392
Member Avatar for ddanbe

The DataGridView class is huge and complex. It is a beast I'm still struggling with, but once you learn to comprehend it, I find it most rewarding! Some try to circumvent it by using listboxes and the lot. Why don't get your feet wet with this as basic as it …

Member Avatar for ddanbe
2
1K

The End.