vb net reload filterbox from list saved from settings

558fe5180e0e8fc922d31c23ef84d240

Hi, I have a issues, I have to load again the listbox, after filtering trought a textbox if a string is the same. I tried this code, but doesn't work at the is null or empthy, how can I reload it by a cicle for?

 Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
        Dim items = From it In ListBox1.Items.Cast(Of Object)()
                    Where it.ToString().IndexOf(TextBox3.Text, StringComparison.CurrentCultureIgnoreCase) >= 0
        Dim matchingItemList As List(Of Object) = items.ToList()
        ListBox1.BeginUpdate()
        ListBox1.Items.Clear()
        For Each item In matchingItemList
            ListBox1.Items.Add(item)
        Next
        If String.IsNullOrEmpty(TextBox3.Text) Then
            ListBox1.Items.AddRange(My.Settings.userlist.ToString)
        End If
        ListBox1.EndUpdate()
    End Sub

2muchcoffee reached Global Top 1000 Company rating

Featured Imgs 23
2muchcoffee reached Global Top 1000 Company rating

There’s no such thing as too much when it comes to the 2muchcoffee team. We’re a Ukrainian-based company that’s the all-around technology partner that’s ready to help you elevate your business. We have vast experience working on different technologies like JavaScript, Ionic, Angular, Nest.js, Next.js, Flutter, REST API, and more.

In honor of our impact, we’ve been recently recognized as a Clutch Global Top 1000 Company this 2021!

2muchcoffee reached Global Top 1000 Company rating

Clutch is a data-driven B2B platform headquartered in the heart of Washington DC. All year round, analysts from the platform research through the different B2B industries to determine which service providers lead their respective markets. Following their 2021 evaluation, Clutch ranks 2muchcoffee as one of the top-performing service providers because of our dedication, market position, and our clients’ success.

This recognition is such a great boost for our confidence! We will continue to aim even higher, and we hope to achieve more momentous milestones like this in the future!

“We are on the right path! Our plan for 2022?  to be recognized among the best 100.” — Chief Executive Officer of 2muchcoffee

Thank you so much to each and every one of our clients! We attribute this wonderful award to you and your team. Without your support, we wouldn’t be here today. If it weren’t for your appreciation and success, 2muchcoffee wouldn’t be a five-star company!

2muchcoffee reached Global Top 1000 Company rating

“2muchccoffee is very diligent which translates to the high quality they deliver. The team’s professionalism, code quality, and responsiveness are their main strengths. Also, this software company is very customer-centric and gave us the impression that they understood the requirements from start to finish.” — Co-Founder & CEO, Scholyr

“2muchcoffee team is communicative and responsive to requests, which results in a supportive partnership. The whole team was very easy to work with. They demonstrated a lot of technical expertise and a very strong understanding of the project and its aims.” — Co-Founder, Health Technology CompanyDo you have an idea for your next project? Not sure what tech stack or business model to choose?

Don’t hesitate to share your thoughts and the 2muchcoffee team will assist you in any inquiry.

How to Display Your Form in a Single Line in WordPress (Easy Way)

Category Image 091

Do you want to display your form in a single line?

Single line forms give you more flexibility with form placement. This means you can easily add forms to high traffic areas of your site and improve your conversions.

In this article, we’ll show you how to display your form in a single line in WordPress easily.

How to display your form in a single line in WordPress (easy way)

Why Display a Single Line Form in WordPress?

Single line forms give you more flexibility when choosing where to place your forms. Since this style of form is only a single line, they don’t take up much space and can easily be integrated with your existing content. 

Email newsletter sign up forms are often displayed in a single line above or below blog post content. Single-line forms also work well on landing pages, contact pages, and other important pages on your website.

Beyond generating more subscribers and leads, you can turn any kind of form into a single line form. For example, it might make sense to display your contact form in a single line to save space on the page. 

That being said, let’s show you how to display a single line form on your WordPress website.

Creating Your Single Line Form in WordPress

For this tutorial, we’ll be using the WPForms plugin to create a single line form. It’s the best lead generation plugin for WordPress used by over 5 million websites.

WPForms

You can use the drag and drop builder to quickly create any form for your site. Plus, it integrates with popular email marketing tools so you can easily grow your email list.

There is a premium version of the plugin with many more features, but we’ll use the lite version for this tutorial since it lets you create a simple form and connect it to Constant Contact for lead generation.

First thing you need to do is install and activate the plugin. For more details, see our beginner’s guide on how to install a WordPress plugin

After that, go to WPForms » Add New in your WordPress admin panel and give your form a name. Then, you need to choose your form template.

We’ll select the ‘Opt-In Form’ template. Simply hover over the template and click the ‘Use Template’ button.

Select form template

This brings up the drag and drop form builder.

You’ll see that the template we chose automatically includes the name and email fields and a submit button.

WPForms drag and drop form builder

Every field can be edited by clicking on them and making changes in the left hand column.

You can also drag and drop the fields to change their order.

WPForms form editor panel

Once you’re done customizing the fields, you can display your form in a single line.

To do this, go to Settings » General and then click on the ‘Advanced’ drop down tab.

Go to form advanced settings

Next, type ‘inline-fields’ in the ‘Form CSS Class’ box (without quotes).

This will apply that CSS class to the form. Since WPForms includes styling for the ‘inline-fields’ class, it will automatically make your entire form display nicely on a single line.

Add inline CSS class

After that, you can make your form even smaller by hiding the field labels.

Simply click on the ‘Fields’ navigation option, then select the ‘Advanced’ menu option, and click the ‘Hide Label’ toggle to turn it on.

Hide form labels toggle

Then, you need to do the same thing for all of the form field labels.

After that, in the same ‘Advanced’ section, you can enter text into the ‘Placeholder’ box. 

This tells your users what each form field is for. 

Add form placeholder text

Once you’re done customizing your form, make sure to click the ‘Save’ button to save your changes.  

If you’re using your form to generate leads, then you can connect your form to your email marketing provider. For more details, see our guide on how to create an email newsletter the right way. 

Adding Your Single Line Form to Your WordPress Website

Now, it’s time to add your single line form to your website. You can add it to any page, post, or widget area.

We’re going to add it to an existing page, but the process will be similar if you’re adding it to another area of your WordPress blog.

Simply open up the page where you want the single line form to display, click the ‘Plus’ add block icon, and search for ‘WPForms’.

Add WPForms block

Then, click on the ‘WPForms’ block to add it to your site.

This brings up a drop down box to choose the single line form you created earlier.

Select single line form from drop down

Once you choose your form, the plugin will load a preview of your form inside the content editor. Then, click the ‘Update’ or ‘Publish’ button to make your new form live.

Now, you can visit your website to see your new form in action. 

Single line form example

We hope this article helped you learn how to display your form in a single line in WordPress. You may also want to see our guide on how to get a free email domain, and our expert picks of the best virtual business phone number apps with free options.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Display Your Form in a Single Line in WordPress (Easy Way) first appeared on WPBeginner.

Uncaught Error: Call to undefined function mysql_query()

558fe5180e0e8fc922d31c23ef84d240

Hi I have this PHP Code -

<?php
require_once ("../include/initialize.php");
     if (!isset($_SESSION['ACCOUNT_ID'])){
      redirect(web_root."index.php");
     }

$action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] : '';

switch ($action) {
    case 'add' :
    doInsert();
    break;

    case 'edit' :
    doEdit();
    break; 

    case 'delete' :
    doDelete();
    break;

    case 'photos' :
    doupdateimage();
    break;

    case 'checkid' :
    Check_StudentID();
    break;

    }

    function doInsert(){
        if(isset($_POST['save'])){


        if ($_POST['StudentID'] == "" OR $_POST['Firstname'] == "" OR $_POST['Lastname'] == ""
            OR $_POST['Middlename'] == "" OR $_POST['CourseID'] == "none"  OR $_POST['Address'] == "" 
            OR $_POST['ContactNo'] == "") {
            $messageStats = false;
            message("All fields are required!","error");
            redirect('index.php?view=add');
        }else{  

            $birthdate =  $_POST['year'].'-'.$_POST['month'].'-'.$_POST['day'];

            $age = date_diff(date_create($birthdate),date_create('today'))->y;

            if ($age < 15){
            message("Invalid age. 15 years old and above is allowed.", "error");
            redirect("index.php?view=add");

            }else{
                // error message 
                // duplicate student id
                 // date_format(date_create($_POST['BirthDate']),'Y-m-d'); 

                $sql = "SELECT * FROM tblstudent WHERE StudentID='" .$_POST['StudentID']. "'";
                $res = mysql_query($sql) or die(mysql_error());
                $maxrow = mysql_num_rows($res);
                if ($maxrow > 0) { 
                    # code... 
                    message("Student ID already in use!", "error");
                    redirect("index.php?view=add");
                }else{
                    $stud = New Student(); 
                    $stud->StudentID        = $_POST['StudentID'];
                    $stud->Firstname        = $_POST['Firstname']; 
                    $stud->Lastname         = $_POST['Lastname'];
                    $stud->Middlename       = $_POST['Middlename'];
                    $stud->CourseID         = $_POST['CourseID']; 
                    $stud->Address          = $_POST['Address']; 
                    $stud->BirthDate        = $birthdate;
                    $stud->Age              = $age;
                    $stud->Gender           = $_POST['optionsRadios']; 
                    $stud->ContactNo        = $_POST['ContactNo'];
                    $stud->YearLevel        = $_POST['YearLevel'];
                    $stud->create();

                                // $autonum = New Autonumber();  `SUBJ_ID`, `SUBJ_CODE`, `SUBJ_DESCRIPTION`, `UNIT`, `PRE_REQUISITE`, `COURSE_ID`, `AY`, `SEMESTER`
                                // $autonum->auto_update(2);

                    message("New student created successfully!", "success");
                    redirect("index.php");

                }

            }
         }
        }

    }

    function doEdit(){
    if(isset($_POST['save'])){

        if ($_POST['StudentID'] == "" OR $_POST['Firstname'] == "" OR $_POST['Lastname'] == ""
        OR $_POST['Middlename'] == "" OR $_POST['CourseID'] == "none"  OR $_POST['Address'] == "" 
        OR $_POST['ContactNo'] == "") {
            $messageStats = false;
            message("All fields are required!","error");
            redirect('index.php?view=add');
        }else{  

            $birthdate =  $_POST['year'].'-'.$_POST['month'].'-'.$_POST['day'];

            $age = date_diff(date_create($birthdate),date_create('today'))->y;
            if ($age < 15){
               message("Invalid age. 15 years old and above is allowed.", "error");
               redirect("index.php?view=view&id=".$_POST['StudentID']);

            }else{

          // echo  $_POST['optionsRadios']; 
                $stud = New Student(); 
                $stud->StudentID        = $_POST['IDNO'];
                $stud->Firstname        = $_POST['Firstname']; 
                $stud->Lastname         = $_POST['Lastname'];
                $stud->Middlename       = $_POST['Middlename'];
                $stud->CourseID         = $_POST['CourseID']; 
                $stud->Address          = $_POST['Address']; 
                // $stud->BirthDate     = date_format(date_create($_POST['BirthDate']),'Y-m-d');  
                $stud->BirthDate        = $birthdate;
                $stud->Age              = $age;
                $stud->Gender           = $_POST['optionsRadios']; 
                $stud->ContactNo        = $_POST['ContactNo'];
                $stud->YearLevel        = $_POST['YearLevel'];

                $stud->studupdate($_POST['StudentID']);



                message("Student has been updated!", "success");
                redirect("index.php?view=view&id=".$_POST['StudentID']);
            }


        }


    }

} 

    function doDelete(){

        if (isset($_POST['selector'])==''){
        message("Select the records first before you delete!","error");
        redirect('index.php');
        }else{

        $id = $_POST['selector'];
        $key = count($id);

        for($i=0;$i<$key;$i++){

            $subj = New Student();
            $subj->delete($id[$i]);


                // $id =    $_GET['id'];

                // $subj = New Student();
            //      $subj->delete($id);


        }
            message("Student(s) already Deleted!","success");
            redirect('index.php');
        }


    }
    function doupdateimage(){

            $errofile = $_FILES['photo']['error'];
            $type = $_FILES['photo']['type'];
            $temp = $_FILES['photo']['tmp_name'];
            $myfile =$_FILES['photo']['name'];
            $location="photo/".$myfile;


        if ( $errofile > 0) {
                message("No Image Selected!", "error");
                redirect("index.php?view=view&id=". $_GET['id']);
        }else{

                @$file=$_FILES['photo']['tmp_name'];
                @$image= addslashes(file_get_contents($_FILES['photo']['tmp_name']));
                @$image_name= addslashes($_FILES['photo']['name']); 
                @$image_size= getimagesize($_FILES['photo']['tmp_name']);

            if ($image_size==FALSE ) {
                message("Uploaded file is not an image!", "error");
                redirect("index.php?view=view&id=". $_GET['id']);
            }else{
                    //uploading the file
                    move_uploaded_file($temp,"photo/" . $myfile);



                        $stud = New Student();
                        $stud->StudPhoto    = $location;
                        $stud->studupdate($_POST['StudentID']);
                        redirect("index.php?view=view&id=". $_POST['StudentID']);


                    }
            }

        }

    function Check_StudentID(){


        // $stud = New Student();  
        // $res = $stud->single_student($_POST['IDNO']);

        $sql = "SELECT * FROM tblstudent WHERE StudentID='" .$_POST['IDNO']. "'";
        $res = mysql_query($sql) or die(mysql_error());
        $maxrow = mysql_num_rows($res);
        if ($maxrow > 0) { 
            # code...
            echo "Student ID already in use!"; 
        }


    }

?>

And I am getting this error - Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\attendancemonitoring\student\controller.php:58 Stack trace: #0 C:\xampp\htdocs\attendancemonitoring\student\controller.php(11): doInsert() #1 {main} thrown in C:\xampp\htdocs\attendancemonitoring\student\controller.php on line 58

I needed help im new .

Defensive CSS

Category Image 052


Ahmad Shadeed nails it again with “Defensive CSS.” The idea is that you should write CSS to be ready for issues caused by dynamic content.

More items than you thought would be there? No problem, the area can expand or scroll. Title too long? No problem, it either wraps or truncates, and won’t bump into anything weird because margins or gaps are set up. Image come over in an unexpected size? No worries, the layout is designed to make sure the dedicated area is filled with image and will handle the sizing/cropping accordingly.

There is no such thing as being a good CSS developer and not coding defensively. This is what being a CSS developer is, especially when you factor in progressive enhancement concepts and cross-browser/device unknowns.

To Shared LinkPermalink on CSS-Tricks


Defensive CSS originally published on CSS-Tricks

On Yak Shaving and md-block, a new HTML element for Markdown

Category Image 091

Lea Verou made a Web Component for processing Markdown. Looks like there were a couple of others out there already, but I agree with Lea in that this is a good use case for the light DOM (as opposed to the shadow DOM that is normally quite useful for web components), and that’s what Lea’s does. The output is HTML so I can imagine it’s ideal you can style it on the page like any other type rather than have to deal with that shadow DOM. I still feel like the styling stories for shadow DOM all kinda suck.

The story of how it came to be is funny and highly relatable. You just want to build one simple thing and it turns out you have to do 15 other things and it takes the better part of a week.

The demos on the landing page for <md-block> shoot over to CodePen using the prefill API. Figured I’d embed one here too:

To Shared LinkPermalink on CSS-Tricks

348: With Jhey

Featured Imgs 23

Jhey Tompkins is one of the most prolific CodePen creators out there! Find him as @jh3y on CodePen and @jh3yy on Twitter. His creations tend to have a twist of whimsey while being beautifully designed as well as pushing the platform in unique ways. You’ll always be surprised at a Jhey Pen! I talk with him about the creative process, problem-solving, and sharing what you learn.

Time Jumps

  • 00:37 Guest introduction
  • 04:57 The origins of the bear pen
  • 06:12 What’s your process?
  • 11:00 Sponsor: Notion
  • 12:46 Do you feel satisfied when a project is finished?
  • 15:04 Incorporating sound
  • 16:02 Working with Kent Dodds
  • 19:43 Starting with problem solving as an interest
  • 21:00 Video and streaming
  • 25:00 Working with Egghead
  • 29:49 Do you try to keep up with all the things?

Sponsor: Notion

For companies of all sizes, Notion provides one central and customizable workspace that can be tailored to fit any team and bring all teams together to get more done and move faster. Notion is an all-in-one team collaboration tool that combines note-taking, document sharing, wikis, project management, and much more into one space that’s simple, powerful, and beautifully designed. Find out how Notion may be the missing piece your team needs to grow, get more done, and delight everyone who uses it in the process.

The post 348: With Jhey appeared first on CodePen Blog.

IPWHOIS: A Fast and Accurate IP Geolocation API

Featured Imgs 30

Are you interested in dramatically improving your users’ experience on your website with customized features based on their location? You can do this by incorporating a fast and accurate IP geolocation API into your site, using it to adapt your content in location-specific ways for every visitor. IPWHOIS is used by thousands of developers for just such a scenario, so we want to take a closer look at what all they have to offer and how it can help you in your projects.

IPWHOIS: A Fast and Accurate IP Geolocation API

IPWHOIS can be used to determine the correct language, time, currency, advertising targets, and more for each person that lands on a website. It can filter traffic, customize content, help autocomplete forms, and more based on your website needs.

IP data is updated in real time using a a self-learning neural network with a multi-channel integration structure including RIPE, APNIC, ARIN, AFRINIC, and others with an average server response time of 90 milliseconds in most locations around the world. IPWHOIS servers are distributed worldwide for speed, reliability, and security. All data sent to and processed by their servers (excluding the free rate) is secured via 256-bit SSL encryption (HTTPS).

Key Features

  • Helps in providing accurate geolocation data
  • City or country relevant data
  • Threat intelligence data
  • ISP access
  • Browsable company information
  • Time zones
  • International data like currencies

IPWHOIS: A Fast and Accurate IP Geolocation API

Pricing

IPWHOIS pricing starts with a free plan that includes up to 10,000 requests per month for non-commercial use. This would be a good way to test the service before investing in a paid plan. All paid plans include SSL access, Geo DNS, Anycast-enabled servers, and technical support, with pricing based on the number of requests per month.

The cheapest (Pro) plan is $10.99 per month for 250,000 requests per month. Next tier is the Business plan at $29.99 per month for up to 2,000,000 monthly requests, followed by the Platinum plan at $79.99 per month for up to 10 million requests. You can select which option you think is best for your project and then upgrade or downgrade at any time based on your usage.

IPWHOIS example

Conclusion

Based on the overwhelmingly positive customer reviews, it is obvious that IPWHOIS is an outstanding service for utilizing location data to upgrade your visitors’ experience on your website or mobile app. By personalizing content based on the visitor’s location, you can improve behavioral factors by up to 70%. This is somewhat of a no-brainer – give IPWHOIS a try and see how it will improve your next project.