Quantcast
Channel: DaniWeb Code Topics
Browsing all 225 articles
Browse latest View live

Convert Swagger file to Model

We have a Swagger file for our API, but in our API documentation, we want to show valid responses for each endpoint. I coded up this little recursive function in PHP which takes our Swagger file and...

View Article


HTTP Redirect in PHP

If you need your PHP script to redirect to a different website, you can send an HTTP header to do that. Remember, header() must be called before any actual output is sent, which includes not just...

View Article


Write to file in PHP

There are two ways to write to a file in PHP. You can either open a stream, and write to it in parts, or you can use file_put_contents() which is much more convenient, with the trade off being that it...

View Article

Log 500 errors to a file

You might be familiar with the dreaded blank page when your PHP script doesn't work. Here's how to spit out errors to the screen, instead of getting just a blank page, as well as logging errors to a...

View Article

DaniWeb Connect PHP OAuth

This is the code behind the demo at https://www.daniweb.com/connect/oauth/demo

View Article


Image may be NSFW.
Clik here to view.

How to fix sumarizing leave time and sickness time proportionally?

In mysql database i created "leave" table: CREATE TABLE `leave` ( `ID_LEAVE` int(11) NOT NULL, `ID_WORKER` int(11) NOT NULL, `BEGIN_DATE` datetime DEFAULT NULL, `END_DATE` datetime DEFAULT NULL );...

View Article

To create login program in python

Login program

View Article

How to insert new row in datagridview with database update??

In this case I display values into datagridview from Projects table which it has only 2 columns: PROJECT_NAME VARCHAR ID INT // Which is hidden in datagridview, and as AUTOINCREMENT I have already...

View Article


Image may be NSFW.
Clik here to view.

How to extract Cell Numbers from long strings

This was a query raised by one of a forum members at another site, where he had a worksheet filled with random numbers, and I have already answered that query at my post here. You may go through that...

View Article


VB.net prohramming

Hi guys, Am developing a clinical management system in VB.net and using Microsoft Access for the database. Everything else is working very well. But the login code is not working. It's throing an...

View Article

Generate randomized 256MB files onto your drive.(C++)

Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current...

View Article

tk scale widget: why does higher resolution reset start value?

Hi, I'm having trouble with a tk scale widget. So far no one at the python forum has an answer so I found this site. As long as the resolution is set to 1, the start value can be anything I want but...

View Article

Printing scrollable panel containing many contrlls

The panel has controls like labels, text boxes, list view and pictures boxes. which is probably more than four pages. I have tried all my best still i cant print all the pages. i surf online for help...

View Article


Periodic Table in Turbo CPP

Hey! I am really stressed out about my TURBO CPP project. I wrote a program on periodic table using file handling. when i compiled it crashed and not the project is unusable. I want to submit it at...

View Article

Image may be NSFW.
Clik here to view.

Ul Loop is not working in Google Chrome

Hi, Phrases on video is getting stacked up on each other after some iteration. Please help. Here is the link: http://responsivemts.com I have attached the screenshot for your reference. Thank you,

View Article


Please help me to creating code for my images in LARAVEL

Please help me to creating code for my images from form to public folder and retrieve it on my view trough database This is my form: {{csrf_field()}} Your Email Your Tp Number Subject Your Message

View Article

Code for a Hotel; to book into the hotel

I want a calender to appear, making it so that the customer can chose the dates.

View Article


Make a given number odd or even

There are times when you need to make sure your counter starts at an odd or even number. Even is pretty simple - counter = counter + modulus(counter). If counter is even it stays, if it's odd it gets...

View Article

this is a test to recreate a bug

this is a test

View Article

how listview retrieve all image from mysql database

i have a database at mysql and i already save image and use search button to retrieve image from mysql database to picture box, vb.net , i dont have a code how listview retrieve all image from mysql...

View Article
Browsing all 225 articles
Browse latest View live


Latest Images