Latest Posts

I did consider using WTS. And although that provides all that you mentioned, it still didn't appeal to me.
Thank you for your reply. Truly. But not what I was asking for.

I suggest you use the Windows Task Scheduler to run your program at the given interval rather than relying on your program to continue running in the background. Using WTS would cover you if your program were to be interrupted for any reason (reboots, etc.). Plus it simplifies your code.

Oxiegen 88 Basically an Occasional Poster

Hi!
It's been a while since I last posted here.

I've just gotten started with Windows Service, and have created a sort of 24/7 service to update a database.
But because it's my very first project (besides the tutorial one) I feel that I could use some assistance in checking it over.

The intent is to have it run a method from a class at about once every 24 hours.
If anyone of you clever people could spare a moment to see if I've made mistakes.
(Ignore the database connections. Those work)

Imports System
Imports System.Timers
Imports System.Runtime.InteropServices
Public Class FileRenamerSrv
    Private thetvdb As clsTheTVDBv2

    <DllImport("advapi32.dll", SetLastError:=True)>
    Private Shared Function SetServiceStatus(ByVal handle As System.IntPtr, ByRef serviceStatus As ServiceStatus) As Boolean
    End Function

    Public Enum ServiceState
        SERVICE_STOPPED = &H1
        SERVICE_START_PENDING = &H2
        SERVICE_STOP_PENDING = &H3
        SERVICE_RUNNING = &H4
        SERVICE_CONTINUE_PENDING = &H5
        SERVICE_PAUSE_PENDING = &H6
        SERVICE_PAUSED = &H7
    End Enum

    <StructLayout(LayoutKind.Sequential)>
    Public Structure ServiceStatus
        Public dwServiceType As Integer
        Public dwCurrentState As ServiceState
        Public dwControlsAccepted As Integer
        Public dwWin32ExitCode As Integer
        Public dwServiceSpecificExitCode As Integer
        Public dwCheckPoint As Integer
        Public dwWaitHint As Integer
    End Structure

    Public Sub New()
        InitializeComponent()
    End Sub

    Public Sub OnDebug()
        OnStart(Nothing)
    End Sub

    Protected Overrides Sub OnStart(ByVal args() As String)
        Dim serviceStatus1 As ServiceStatus = New ServiceStatus
        serviceStatus1.dwCurrentState = ServiceState.SERVICE_START_PENDING
        serviceStatus1.dwWaitHint = 100000
        SetServiceStatus(Me.ServiceHandle, serviceStatus1)

        InitializeDatabase()
        PreLoadUpdate()

        thetvdb = New clsTheTVDBv2()

        Dim timr As Timer = New Timer
        'timr.Interval = 60000
        timr.Interval = TimeSpan.FromHours(24).TotalMilliseconds
        AddHandler timr.Elapsed, AddressOf Me.OnTimer
        timr.Start()
        OnTimer(Nothing, Nothing)

        serviceStatus1.dwCurrentState = ServiceState.SERVICE_RUNNING
        SetServiceStatus(Me.ServiceHandle, serviceStatus1)
    End Sub

    Protected ...
Dani 1,932

DaniWeb is nearly twenty years old, making us older than SO. We’re community forums while they are strictly Q&A. We try to focus more around the community and the people and getting to know each other.

Hello i want to upload an audio file(.mp3). The file is uploaded on the folder, the value is inserted on the db (MySql) so far so good. But when i try to play the file on the uploads folder is says its corrupted or extension is wrong.the value is not base64 is the original name of the file

html

           <form [formGroup]="form" (ngSubmit)="onSubmit()"> <input type="file" name="avatar"     (change)="onFileSelect($event)" /> <button type="submit">Upload</button> </form>

ts

 onSubmit() {
const formData = new FormData();
formData.append('avatar', this.form.get('avatar').value);

this.group_id = 0;
this.media.tags = this.hashes;
this.media.audio = formData;
this.media.browser = true;
this.userData.uploadAudio(this.media, this.group_id ).subscribe(
  (res) => {
    this.uploadResponse = res;
      console.log(res);
  },
  (err) => {  
    console.log(err);
  }
);
 }

php

$mediaData = $request->post('media');
$name = $mediaData['audio'];
$uri =  substr($name,strpos($name,",")+1);
$encodedData = str_replace(' ','+',$uri);
try 
{
    $name = md5(time() . rand(1, 1000));
    if(!file_put_contents('uploads/' . $name.'.mp3', $decodedData)) 
    {
    }
}
catch(Exception $e)
{
}
$name = $name . '.mp3' ;

How should i give space between my output numbers while i am storing them in an array ?Like if i ask user to enter numbers and one entered 12345 ,i want to display them as 1 2 3 4 5

OK. Now I see what it does. Kewl.

Have you looked at Unity for game development? There are lots of tutorials available.

beddu commented: Yes, I did. Never took it seriously, but I played a little with it too! +0

Hi
Unlike certain other sites we welcome and encourage discussion and opinions. Anything goes, just keep it legal and don't insult other members.
What would you like to talk about?

beddu Newbie Poster

Hello everyone!

I registrered an account on this community years ago and I don't remember why, actually O_O
At first glance looked like an alter ego of SO, but looking better into details I feel a different athmosphere, kind of friendly environment.

I am a software developer, tried a little bit of every field, worked mostly for industrial automation (when I call that "software development" I feel uncomfortable) but then converted myself into freelancer during the day and startupper during the night. I know C++, C#, studied but never actually used Python, and then web techs both front and back end, I am no genius, I am just quite quick to learn what I need for the next project... I played also with graphics programming and the "old fashioned" DirectX (up to 9.x) and OpenGL (up to 4.0) with relative success and my childhood dream was (and still is) to make a videogame, maybe, one day. Everyone needs an utopic dream to keep going, right?

So instead of looking around and trying to invent a new way to enter this somehow interesting community, I decided to ask to all of YOU:
Can you people tell me if I am in the right place and why? :-D

Looking forward to your wellcome...bye!

When search engines calculate the relevance of a site to a keyword, they consider the number of QUALITY inbound links to that site. So we should not be satisfied with merely getting inbound links, it is the quality of the inbound link that matters. So it is imortant ot have so many quality backlinks for SEO.

An XML sitemap is specifically written for search engine spiders. A search engine spider can quickly and easily extract all the important pieces of information about your site by looking at the XML file. An HTML sitemap enables lost human users to find a page on your site that they are looking for. Remember that search engines reward sites that are easy to use and that, in many cases, you can improve your site’s ranking by improving your user experience. It may be the case that you provide a better user experience by providing an HTML sitemap.

Breadcrumbs are an essential element of an SEO friendly website because: They make navigation easier – that's the main role of breadcrumbs and this is why users love them.

Reduce the size of the images you have used into your website. You can use https://tinypng.com/ to compress your websie images.

I don't understand. This method worked for me and helped 115 members of the Microsoft Community. I found it here

https://cutt.ly/Vr0JcN7

I don't see how holding down SHIFT changes anything.

Use Alt HTML Tag in your images for optimize for search engine.

Breadcrumbs are a very useful tool for enriched user experience, especially when your site has a complex hierarchy that deters users from digging deeper. They also help the search engines to understand the internal structure of your site, casting an overall positive impact on the SEO of your website

The four types we’ll discuss here are:

Meta Keywords Attribute - A series of keywords you deem relevant to the page in question.
Title Tag - This is the text you'll see at the top of your browser. Search engines view this text as the "title" of your page.
Meta Description Attribute - A brief description of the page.
Meta Robots Attribute - An indication to search engine crawlers (robots or "bots") as to what they should do with the page.

Artificial Intelligence is about creating intelligent machines to perform cognitive tasks. The ability of these machines to think like humans would keep improving when they have sufficient data to identify patterns and trends. Digital Marketing (DM) is an expertise that extensively revolves around data and analytics. The ability to figure out the right insights from data is crucial to the success of any online initiative. With a massive increase in the amount of data and its sources, it’s logical to believe that AI has a vital role to play in digital marketing.

Thanks all

I downloaded an app that was supposed to revert the file management to Window 7 version. It did not work. Nothing changed.

I searched the Internet. This is what I found. It works: When selecting 'Name' in the 'Sort By' options, hold down the Shift key while selecting 'Name'. It works beautifully and instantly.

Too bad MS didn't see the benefit of putting this shift/name option in the View options. Or maybe they just didn't have room after filling the menu banner with all sorts of junk.

rproffitt commented: Thank you. Will have to read up more about this feature. What else is there? +0
Dani 1,932

In what guide? Are you just spamming??

Dani 1,932

Welcome!!

Dani 1,932

Oh, the latest version of Google Chrome also now supports <img loading="lazy"> to lazy load images without javascript.

Dani 1,932

An HTML sitemap is just a regular webpage on your site that links to all of your pages for the benefit of your users. Googlebot will crawl this page and, essentially, also find all the other pages you link to.

A plain text sitemap file is a plain text list of all of the URLs on your site, one per line. They can be submitted to Google Search Console so that Googlebot wil get a list of all of the pages of your site you think are important to crawl.

An XML sitemap is an XML file of all of the URLs on your site you think are important to crawl. The added benefit of using an XML sitemap (which is Google's recommended format) is that you can additionally specify the priority of the page (compared to the other pages on your site) and the last time the page was modified, to give Googlebot some additional information to help with their crawl efforts.

That's 12 lines of code. Which one failed?

I'd write that this is a doomed project because no one uses Excel as a backend for the database. At least not more than a few times before they understand why.

This reminds me of the person selling death sticks from Star Wars.

I want to use Excel as my backend. (new developer)
You want to go home and rethink your life. (Jedi Master)

Also, check out the community rules at https://www.daniweb.com/welcome/rules

Do provide evidence of having done some work yourself if posting questions from school or work assignments

I'm new to vb.net
I wan to to make a retrieval of image into picturebox. This is my code:
All declaration has been initialize

Cmd= New sqlcommand ("select * from tblretrieveimages", con)
dt= New DataTable
sda = New sqlDataAdaptar(cmd)
sda.fill(dt)

Texbox1id = dt.rows(0)(0).tostring
Texbox1name = dt.rows(0)(1).tostring
Texbox1des = dt.rows(0)(2).tostring

Dim img() as byte
img()=dt.rows(0)(3)

Dim ms as New system.IO.Memorystream()
Picturebox1.image = image.FromStream(ms)

But whenever i make query, I'm still getting error, indicating the "Parameter is not Valid"!!!

hai, my project title is student's feedback generation vb.net is front end and excel as back end.
i have one text box and combobox. to get row value from excel sheet and display into combobox
when the text box value matches the cell value