132,723 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Gribouillis

This python script prints all the columns of an sqlite database which path is given as argument.

Software Development python sqlite
4
877
Member Avatar for mike_2000_17

Following up on a discussion on [this thread](http://www.daniweb.com/software-development/cpp/threads/470519/looping-using-recursion/), I did some tests on the performance of recursion vs. iteration, and some interesting things happened, so I thought I would share the results. I'm gonna structure this a bit like a lab-report, because that's really the best way to put it. …

Software Development c++ programming-construct seo
Member Avatar for Tumlee
4
686
Member Avatar for deceptikon

In my job I tend to write a lot of Windows services. Due to this I've pared it down to bare essentials so that the code is as simple as possible, but still fully functional for the needs of each service. What this generally means is I *don't* use the …

Member Avatar for deceptikon
4
414
Member Avatar for vegaseat

The code sample shows how to get an image from the internet and show it in a Tkinter label widget.

Software Development image python tkinter
Member Avatar for Nils_1
4
2K
Member Avatar for vegaseat

The code shows you how to create a persistent to file dictionary of data using the python module shelve.

Software Development python
Member Avatar for Gribouillis
4
887
Member Avatar for rotten69

Hi everyone, I consider myself as a java beginner because I haven't been involved in a lot of projects. I'm opening this thread to raise awareness that we don't have java projects thread primarily for beginners and it could help advanced java programmers in terms of practising their java knowledge. …

Software Development java
Member Avatar for renato.francia
4
870
Member Avatar for vegaseat

In today's environment where just about anyone can snoop around your e-mail, it is prudent to securely encrypt your more private writings. This little Python program will make it easier to do so.

Software Development encryption python
Member Avatar for vegaseat
4
456
Member Avatar for vegaseat

Just a code sample that allows you to play your midi or mp3 music files with Python and module pygame.

Software Development audio python
4
2K
Member Avatar for kingsonprisonic

This module is for validating textboxes.... After using this module in your project you can simply validate all of your text boxes like [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AssignValidation(Me.TextBox1, ValidationType.Only_Digits) AssignValidation(Me.TextBox2, ValidationType.Only_Characters) AssignValidation(Me.TextBox3, ValidationType.No_Blank) AssignValidation(Me.TextBox4, ValidationType.Only_Email) End Sub [/CODE]

Software Development email vb.net
Member Avatar for Iamateur
4
1K
Member Avatar for riahc3

Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In …

Software Development api daniweb-api daniweb-bug java
Member Avatar for peter_budo
4
878
Member Avatar for riahc3
Member Avatar for vegaseat

This Python snippet shows how to control a VPython visual 3D sphere with Tkinter GUI toolkit button clicks.

Software Development gui image python tkinter
4
3K
Member Avatar for vegaseat

A simple code example to calculate the monthly payment on a mortgage loan. Takes a look at Python's newer print and format functions.

Software Development python
4
9K
Member Avatar for vegaseat

Jython is a version of Python that can use the extensive Java library. Jython uses Python syntax and avoids the rather ugly syntax (at least for Pythonions) of Java. Here we apply it to bring up an image from a file.

Software Development image java java-swing python
4
722
Member Avatar for vegaseat

Let's say you have a whole bunch of nicely named lists and want to save them all and their names in a pickle file. One solution can be to store these lists and their names in a Bag container class and pickle the bag instance object. Now you can use …

Software Development python
Member Avatar for Lardmeister
4
253
Member Avatar for peter_budo

Simple code to see if array of primitives has duplicates. The aim is to only check if there are any duplicates, but not to check what element is repeated, or its position etc. PS: Do you know some handy snippet? Don't way, post it!

Software Development java
Member Avatar for odoepner
4
973
Member Avatar for mrnutty

[URL="http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books/"]List of free programming books[/URL]. Enjoy and happy new year!

Software Development c++
Member Avatar for YAMNA MIDHAT
4
135
Member Avatar for sandeepparekh9

Turn you Monitor off from your application.

Software Development
Member Avatar for bhagawatshinde
4
233
Member Avatar for Gribouillis

Sometimes, you just want to run a system command from python and capture its output. Currently, the standard way to do this is to call the subprocess.Popen with convenient arguments and use the communicate method. After writing such code a few times, I wrote this little Command class to ease …

Software Development python
Member Avatar for deonis
4
3K
Member Avatar for TrustyTony

How about doing some effort instead of immediately voicing your desperation to Daniweb for 1001st tictactoe problem? Here is some ideas for those young spirits (I did not say newbies ;) ) 1. What is this search box here over in right hand corner? 2. What a heck is this …

Software Development python seo
Member Avatar for Azmah
4
775
Member Avatar for vegaseat

Probably the simplest way to get into multimedia with Python is the webbrowser module. This works with both Windows and Unix systems, and selects the default browser you have installed. But that is not all: if you give it the name of a multimedia file it will select the default …

Member Avatar for e-papa
4
1K
Member Avatar for Narue

This is an example of using a binary index file to speed up random access of lines in a file. The file is indexed one time, where the position of the start of each line is stored in an index file. Subsequent requests for a get the position from the …

Software Development c++ file-system
4
366
Member Avatar for jeffcogswell

[ATTACH=RIGHT]17350[/ATTACH]Since the release of the second edition of Parallel Studio this month, I've spent a good amount of time with it, trying out the new features. First, what's Parallel Studio? It's an add-in for Microsoft Visual Studio that gives you a large set of features for writing parallel code that …

Software Development c++ open-source visual-studio
Member Avatar for saahiloberoy
4
674
Member Avatar for Saleh

where can i find out a detailed information about [B]How to write a header file[/B] ?

Software Development c++
Member Avatar for JCRARY
4
277
Member Avatar for daviddoria

Hi all, I have started a wiki that I hope to make the "unofficial Daniweb wiki". Its mission is to present short, compilable answers to many commonly asked questions here on the forum. [url]http://programmingexamples.net[/url] I have seeded it with a handful of basic operations. Please feel free to edit, add …

Software Development c++
Member Avatar for Bench
4
151
Member Avatar for NathanOliver

Hey All This code is for matching a string with a wildcard in it to another string. If you want to have a Astrix in the first string be counted as a character and not as a wildcard put a \ in front of it. I have tested it for …

Software Development c++
Member Avatar for NathanOliver
4
488
Member Avatar for vegaseat

A little late for April 1, but here is the secret code ... [code]searchEngineNames = [] for c in range(ord('A'), ord('Z')+1): name = chr(c)+'ing' searchEngineNames.append(name) # pick #1 print(searchEngineNames[1]) [/code]

Software Development python
Member Avatar for TrustyTony
4
110
Member Avatar for neoeinstein

I am very new to C++ and have written only basic algorithms. In school we use turbo c++ compiler but now i have to attend a workshop for which I need to be able to use a gnu compiler and I do not know how to change my programs for …

Software Development c c++
Member Avatar for neoeinstein
4
684
Member Avatar for vegaseat

This program uses the Python win32 extension module to get information on disk or flash drives for Windows machines. Specify the drive with its letter. If no drive letter is specified, the current drive is applied.

Software Development hard-drive microsoft python
Member Avatar for Gribouillis
4
3K
Member Avatar for mrnutty

The function adds two large numeric string together, like "12345667" + "12345678" = ? It does not have complete error checking, I'll leave that up to you. It should work but I am prone to bugs, so do advise if bugs are found. Included are also helper function that helps …

Software Development c++
Member Avatar for mrnutty
4
619
Member Avatar for happygeek

First Google expressed an interest in the [URL="http://www.itwire.com/content/view/20370/53/"]web browser client[/URL] market, and then the [URL="http://www.itwire.com/content/view/26281/53/"]operating system market[/URL] and now it has launched its own open source systems programming language. [URL="http://golang.org/"]Google Go[/URL] is being touted as 'expressive, concurrent, garbage-collected' and promises to produce fast code, fast. According to Google a typical …

Software Development c++ golang google
Member Avatar for Nick Evan
4
437
Member Avatar for avirag

Hi i have created this thread for general information of Google.....!! Can anyone tell me how does Google works, I want to know the algorithm that works behind that, i mean how the Google search is working. Can anyone give me the idea regarding this............... Every answer is appreciated.........

Software Development algorithm google
Member Avatar for Diamonddrake
4
149
Member Avatar for Salem

This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include …

Software Development c ubuntu
Member Avatar for frk
4
585
Member Avatar for Aia

You have a problem with your code. You need help. You are in a hurry. What can you do? Post for help at Daniweb as fast as you write, correct?. Wrong. The first thing you should do is to read the rules on posting and specially how to properly make …

Software Development c
4
2K
Member Avatar for 勾玉

This project is a cross-platform Kafka GUI client. A star would be appreciated to support the open-source effort by the author. Thank you! # Features of Kafka-King * View the list of cluster nodes, dynamically configure broker and topic settings. * Support for consumer clients to consume messages from specified …

Member Avatar for elary
3
91
Member Avatar for rproffitt

https://thehill.com/policy/technology/4162573-ai-art-cant-earn-copyright-judge-rules/ give us a preview that those that use AI, ML, GPT and such may be on uncertain ground if they want to copyright the code. You may not be aware that most of the online AI/ML/GPT systems keep copies of what you generate. So if you are creating code …

Member Avatar for Reverend Jim
3
266
Member Avatar for rproffitt

From https://www.reddit.com/r/ProgrammerHumor/comments/wupbvb/python_runtime/ ![image_2022-08-22_115014356.png](https://static.daniweb.com/attachments/1/23876285d9d923cc038ee98e099d4a8f.png) As time passed it looked to me that Python evolved past a C framework.

Software Development c python
Member Avatar for Dani
3
417
Member Avatar for willianrc

Im trying to populate Listbox with Columns but I didn't get success. Below is my code. I populated Listbox with text file: on users.txt: 1|Jhon|street 3|12/03/1985 2|Peter|strt2|29/09/2009 3|Scoby|street 1|11/02/2001 Here is my code to populate , as you can see there's delimiter "|". Public Sub Pathway(way As Variant) 'SET DATABASE …

Software Development microsoft visual-basic
Member Avatar for SCBWV
3
1K
Member Avatar for joshi1984

Hi, I had a longer break, but now I want to continue working on my little project to make my work easier. I have an Excel file which I converted to CSV because there is no Excel on the target system. I would like to search for a number or …

Software Development vb.net visual-basic
Member Avatar for jamesfilipson
3
809
Member Avatar for vivan_1

I'm trying to manage Splunk with Chef and ran across a problem when using Chef to programmatically start/stop/restart the Splunkforwarder service: The request did not respond to the start or control request in a timely fashion. - ControlService: The service did not respond to the start or control request in …

Software Development java javascript
3
72
Member Avatar for moosh101

Hello everyone! I am writing a program for the birthday paradox that runs trials 10,000 times. I want to show that when N people are in a room, there is a 50% chance that there will be a duplicate birthday. I want to create an empty set, then add to …

Software Development java
Member Avatar for toneewa
3
575
Member Avatar for dimitrilc

## Introduction ## When working on Android with Kotlin, you might have ran into property delegates on a few occasions, such as `activityViewModels()` from `androidx.fragment.app` or `remember()` from `androidx.compose.runtime`. In this tutorial, we will learn what property delegates are and how to create them ourselves. ## Goals ## At the …

3
170
Member Avatar for nextsmm

Is it necessary to have computer or laptop to test the code? Did you ever seen anyone who can be perfect or master in coding whit cell phone?

Software Development c++ java sql
Member Avatar for DGPickett
3
236
Member Avatar for dimitrilc

## Introduction ## `launch()` and `async()` are two of the most common coroutine builders to use in Kotlin, but they are somewhat different in usage. `launch()` returns a `Job` object, which can be used to cancel or perform other operations on the underlying coroutine. If our coroutine lambda returned a …

Software Development github ide
3
371
Member Avatar for dimitrilc

## Introduction ## In this tutorial, we will look at the RxJava `mergeWith()` and `concatWith()` operators. Amongst others, they are used to combine Observables together. All of the RxJava operators have ambiguous names, and behave differently, so let us take a look at 2 operators, `mergeWith()` and `concatWith()`, to see …

Software Development file-stream github ide java
3
1K
Member Avatar for dimitrilc

## Introduction ## RxJava 3 includes 5 core classes: 1. Flowable, 2. Observable, 3. Single, 4. Completable, 5. Maybe. This tutorial aims to teach the basic concepts behind Observable, which serves as a foundation for understanding the other 4 classes. ## Goals ## At the end of the tutorial, you …

Software Development file-stream github ide java
3
2K
Member Avatar for dimitrilc

## Introduction ## With coroutines in Kotlin, we are able to execute suspending functions without blocking the current thread. By default, most coroutine builder functions use the `Dispatchers.Default` context, but it is also possible to use other implementations of `CoroutineContext`. In this tutorial, we will learn about the 2 `CoroutineDispatchers`: …

Software Development github ide multithreading
3
156
Member Avatar for dimitrilc

## Introduction ## The `java.nio.file.Files` class includes many convenient methods to read file attributes, but sometimes these convenient methods just are not enough to meet our needs. In this tutorial, we will go over 5 ways to use the `Files` class to read file attributes so you can choose the …

Software Development file-system github ide java operating-system
3
305
Member Avatar for dimitrilc

## Introduction ## When working with an application with a global user base, there is usually a need to display text, numbers, currency, date, and time in multiple localized formats. For example, the **en-US** (*English-USA*) version of the date September 22, 2021 is written as 22 сентября 2021 г. when …

Software Development finance github ide java
3
216
Member Avatar for dimitrilc

## Introduction ## Although not included in the headlines, the release of JDK 17 also added 3 sets of new methods to the class `java.lang.Process`: 1. `inputReader()` to read from stdout. 2. `inputWriter()` to write to stdin. 3. `errorReader()` to read from stderr. In this tutorial, we are going to …

Software Development cybersecurity java python
3
2K

The End.