Latest Programming Posts

hai, my project title is student's feedback generation 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

Hi dude,
I would like to prefer Macandro's airbnb clone script which has the above mentioned CMS in their script

i second the point about internet chat. As an ex-pat I often deal with (inbound!) call centers in a language thst is not my native language. I find that much easier in text than in voice. Where we are dealing with a problem I also find it invaluable to have a hard cooy if exacttly who said what.

If it is a incoming call centre (as opposed to one of those abusive ones mentioned above) then make sure it has support (i.e. internet chat) capability for those of us who are hearing impaired. This is especially important if your operators have an accent thick enough to cut with a knife.

And if it is one of those abusive ones then die with festering boils.

@JamesCherrill. I wish I had kept the photos a buddy sent me of such a center in the most populous democratic country in the world (It's not USA.)

They were giving a tour and they pointed out their biggest productivity booster to him. It was an industrial ceiling fan. No air conditioning. A true sweat shop. Yes, it was a sort of Hell on Earth.

JamesCherrill commented: Hell’s too good for them +15

If you are thinking of setting up an outbound cold calling centre then i sincely wish a horrible death on everyone involved. 10 cold calls a day made my life so disrupted that in the end i had to give up my land line. Cold callers are the scum of hhe earth. How do you sleep at night?

maybe you need to flush/close the output stream explicitly?

Hi Solomaliar!

Here is a break down of the best approach to setting up the software (and required hardware) environment for your new Call Center:

  1. If you will be runing a Windows network in the center, get Windows Server 2019
  2. Obtain a license for telephony software. I used to work with the TelViva system. You can monitor, record, transfer, patch into etc etc all from a server-based endpoint. Note: This can be installed for you in the Cloud, rather than your on-site server for better security and disaster recovery prospects
  3. Get a POE (Power over Ethernet) Switch (or set of switches) - this transfer both data and electricity (12V, I think) over the ethernet cabling
  4. Get VOIP Telephone handsets. Each handset has 2 ethernet ports: 1 for your PC/Laptop and another for the main network
  5. Set your phone IP addresses and corresponding names up in your TelViva (or other) server-based telephony management system - this makes life a lot easier later, especially if you have over 20 telephones
  6. Depending on your call center use case, get each caller a laptop - this for loading and reviewing scripts, capturing customer info while on a call, and running special Call Center software (like SalesForce)
  7. Look into getting primary Call Center software, like SalesForce. There are cheaper options out there, but always beware of cheap software. They are usually cheap for a reason
  8. Make a deal with Microsoft for your server and laptop (client) machines, ...
Solomaliar commented: Thank you very much for sharing your valuable experience. +0

Hello everyone,

I want to put my string[] (array uni dimensional) of values in to excel row and every time the first number of this array was different of "500", the program will add another row with the values on the excel sheet.

I only have on the program to system reads a file and next save it to an array, show to user the values, create a workbook and sheet without anything and just this.

Workbook machine = new Workbook();
Worksheet sheet = machine.Worksheets[0];

string[] numbers = System.IO.File.ReadAllLines(@"..txt.txt");

for (int i = 0; i < numbers.Length; i++)

Can you help me please?

hi good day guys,
i'm having a trouble with fetching the data i have a list of folder outside like in the picture below


when i click the first folder the picture below shows the output it has duplicates


i want to know what's the problem with my code why it duplicates the folders. can someone help me out. please... thank you in advance

here's my code



Try this code :

const date1 = new Date('7/13/2010');
const date2 = new Date('7/18/2010');
const diffTime = Math.abs(date2 - date1);
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); 

I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error.


 public void createPDF(String pdfFileName,String myString) throws FileNotFoundException{
        Document doc = new Document() ;
        PdfWriter docwriter = null;

            docwriter = PdfWriter.getInstance(doc, new FileOutputStream("C:\\Users\\hp430\\Desktop\\barcodes\\"+pdfFileName));
            doc.addAuthor("Saboor Siddique");
            doc.addTitle("Barcode Test");

            PdfContentByte cb= docwriter.getDirectContent();

            Barcode128 code128 = new Barcode128();

            Image code128Image = code128.createImageWithBarcode(cb, null, null);
            code128Image.setAbsolutePosition(10, 700);

        catch(DocumentException dex){
Biiim 116 Junior Poster

I've been working on a project using Morris JS and since there was no solution out there for the Y axis scaling that I could find I wanted to posted where I got.

Note you will need morris JS & Moment JS to run it.

You just need a div with the id "home_chart_0" and it should run. It rounds the max value up, compares it to the min value rounded down and divides it by 10 and spreads over 10 lines.

The properties "yLabelFormat" & "numLines" in Morris JS are not documented but exist.

Let me know if you have something worked out on the Y scaling.

var ajaxData.weekending = moment();
var graphData = [
    {period: moment(ajaxData.weekending).clone().subtract(7,'d').format("Y-MM-DD"), value: 20, quota: 10}
    ,{period: moment(ajaxData.weekending).clone().subtract(6,'d').format("Y-MM-DD"), value: 30, quota: 20}
    ,{period: moment(ajaxData.weekending).clone().subtract(5,'d').format("Y-MM-DD"), value: 53, quota: 30}
    ,{period: moment(ajaxData.weekending).clone().subtract(4,'d').format("Y-MM-DD"), value: 61, quota: 40}
    ,{period: moment(ajaxData.weekending).clone().subtract(3,'d').format("Y-MM-DD"), value: 64, quota: 50}
    ,{period: moment(ajaxData.weekending).clone().subtract(2,'d').format("Y-MM-DD"), value: 68, quota: 60}
    ,{period: moment(ajaxData.weekending).clone().subtract(1,'d').format("Y-MM-DD"), value: 80, quota: 70}
    ,{period: moment(ajaxData.weekending).format("Y-MM-DD"), value: 85, quota: 80}

var graphYMAX = 85;
var graphYMIN = 0;

var graphPlotYMIN = 0;
var graphPlotYMAX = 0;
var graphPlotYDIFF = 0;
var graphYPlotNumLen = 0;
var graphYPlotRounder = 0;
var graphYPlotNumTop = 0;

if(statUpsidedown == 1){
    graphPlotYMIN = graphYMAX;
    graphPlotYMAX = graphYMIN;
    graphPlotYDIFF = graphPlotYMIN - graphPlotYMAX;
    graphYPlotNumLen = Math.ceil(Math.log10((graphPlotYDIFF) + 1));
    graphYPlotRounder = (10**graphYPlotNumLen)/10;
    graphYPlotNumTop = Math.ceil(graphPlotYMAX/graphYPlotRounder)*graphYPlotRounder;
    graphYPlotNumBot = Math.floor(graphPlotYMIN/graphYPlotRounder)*graphYPlotRounder;
    graphPlotYMIN = graphYMIN;
    graphPlotYMAX = graphYMAX;
    graphPlotYDIFF = graphPlotYMAX - graphPlotYMIN;
    graphYPlotNumLen = Math.ceil(Math.log10((graphPlotYDIFF) + 1));
    graphYPlotRounder = (10**graphYPlotNumLen)/10;
    graphYPlotNumTop = Math.ceil(graphPlotYMAX/graphYPlotRounder)*graphYPlotRounder;
    graphYPlotNumBot = ...

A few things.

  1. seems to noted same issue. Doesn't seem to be just you.
  2. looks very active. If you feel this is a bug, try there.

I take it you added the "following code" I linked to and it did nothing.

Paraskevas_1 commented: Yes I posted this on Reddit but nobody helped me :( +0

Thanks for the feedback a lot.
I think that the problem is not in the langdetect and I think that there is a problem with the listener.
I tried stopping the active listener when language is changed and starting a new one but nothing got fixed.
I thought that starting a new listener would change the result and make it equivalent to the input languge ( :( didn;t work).

Hi there,
I'm a bit related to the topic and had some previous experience with call centers. I used to work with Voiptime automated phone dialing solution for cold calling. Three things come to mind when I think about proper tools for a new call center: best software, good evaluation procedure, and good call scripts.
Below I've listed must have solutions to run call center campaigns:
For Inbound Call centers:
Automatic Call Distributor
Interactive Voice Response
Computer Telephony Integration
For Outbound call centers:
Avatar Predictive dialer
Power Dialer
Progressive Dialer
Preview Dialer
Hope this helps!

Solomaliar commented: I appreciate sharing your experience regarding the topic with me) +0

Thanks for the reply, and yes professional team is crucial for any startup. I'm more interested in software solutions to help them increase efficiency and improve organization at the call center.

This is strictly a guess. I'd want to see what langdetect is doing. Also read and try implementing the code on the URL to follow after the text:
"To enforce consistent results, call following code before the first language detection:"

Hi everyone,
I am working on a project (just started) in PYTHON and I want to create a keylogger for 2 languages english and greek. For this I have created the below (it is under "construction") code.

from pynput.keyboard import Key, Listener
from langdetect import detect
from pynput import keyboard

def on_press(key):
    global string

    if key == keyboard.Key.esc: #if button escape is pressed close the program
    elif key ==
        string = ''.join([string,str(key).replace("'","")])

controller = keyboard.Controller()
# Collect events until released

listener = keyboard.Listener(on_press=on_press)

I run it and all good until I change the language. (please see the screenshots+explanations).



In the first picture I started typing in english and the printed result was in english but when I changed in greek the printed result remained english.
In the second picture I started in greek and the printed result was in greek, but when I change in english the result remains greek.

How can I solve this problem in order to take the same language result after an input language change?
Any help or advice would be great!
Thanks in advance.

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in F:\xampp\htdocs\ajax\server.php on line 55
// Retrieve comments from database
$sql = "SELECT * FROM comments";
$result = mysqli_query($conn, $sql);
$comments = '<div id="display_area">'; 
while ($row = mysqli_fetch_array($result)) {
$comments .= '<div class="comment_box"> <span class="delete" data-id="' . $row['id'] . '" >delete</span> <span class="edit" data-id="' . $row['id'] . '">edit</span> <div class="display_name">'. $row['name'] .'</div> <div class="comment_text">'. $row['comment'] .'</div> </div>';
$comments .= '</div>';


Essential? How about operators who speak the target language clearly and fluently?

Hi everybody,
What tools should I consider for a new call centre? Suggest the essentials that are necessarily required for a Call Center to have.

Define "wrong". What is it supposed to do, and what part doesn't work, any errors perhaps?

class Post {
private $user_obj;
private $con;

public function __construct($con, $user){
$this->con = $con;
$this->user_obj = new User($con, $user);

public function submitPost($body, $user_to) {
$body = strip_tags($body); 
$body = mysqli_real_escape_string($this->con, $body);
$check_empty = preg_replace('/\s+/', '', $body);

if($check_empty != "") {

$date_added = date("Y-m-d H:i:s");
$added_by = $this->user_obj->getUsername();

if($user_to == $added_by) {
    $user_to = "none";

    $query = mysqli_query($this->con, "INSERT INTO posts VALUES('', '$body', '$added_by', '$user_to', '$date_added', 'no', 'no', '0')");
    $returned_id = mysqli_insert_id($this->con);
    $num_posts = $this->user_obj->getNumPosts();
    $update_query = mysqli_query($this->con, "UPDATE users SET num_posts='$num_posts' WHERE username='$added_by'");


        public function loadPostsFriends() {
        $str = ""; //String to return 
        $data = mysqli_query($this->con, "SELECT * FROM posts WHERE deleted='no' ORDER BY id DESC");

        while($row = mysqli_fetch_array($data)) {
                $id = $row['id'];
                $body = $row['body'];
                $added_by = $row['added_by'];
                $date_time = $row['date_added'];

                //Prepare user_to string so it can be included even if not posted to a user
                if($row['user_to'] == "none") {
                $user_to = "";              
            else {

            $user_to_obj = new User($con, $row['user_to']);         
            $user_to_name = $user_to_obj->getFirstAndLastName();
            $user_to = "to <a href='" . $row['user_to'] ."'>" . $user_to_name . "</a>";

                //Check if user who posted, has their account closed
                $added_by_obj = new User($this->con, $added_by);    
                if($added_by_obj->isClosed()) {

            $user_details_query = mysqli_query($this->con, "SELECT first_name, last_name, profile_pic FROM users WHERE username='$added_by'");          
            $user_row = mysqli_fetch_array($user_details_query);
            $first_name = $user_row['first_name'];
            $profile_pic = $user_row['profile_pic'];

            $date_time_now = date("Y-m-d H:i:s");
            $start_date = new DateTime($date_time); //Time of post
            $end_date = new DateTime($date_time_now); //Current time    
            $interval = $start_date->diff($end_date); //Difference between dates    
            if($interval->y >= 1) { 
                if($interval == 1)          
                    $time_message = $interval->y . " year ago"; ...

Write Java from scratch.

Do unit testing. Only test one small module at a time. Once that passes, do unit test of next small module that relates to the first module. By process of elimination a very large set of programs can be tested thoroughly this way.

Testing is never complete. There is always something that was not tested.

rproffitt commented: The 737-MAX story is one that we should have on its own. Was not a GUI problem. +15

A Global variable is defined outside all functions.The scope of a global variable is the whole program and It can be used and changed at any part of the program after its declaration.
By making class and class member Public you can use it in any part of program using inheritance.when your variable is global you can use it directly without use of inheritance but in some scenario you don't want to make variable is accessable to all function or method that's why we use public .
hope it helps!

Sorry no. But I did read and it appears you have to configure a data source through the ODBC Administrator. I didn't see you mention this work.

Magic8Computing Newbie Poster

Does anybody know how i can connect a PHP web site to an OpenEdge Progress Database.

I have the following as a connection file that when I run it does not error but there is also nothing to say it has connected either.

I have System DSN 32bit ODBC connection call Live_Vision that I am calling.


  if ($conn_id=odbc_connect("Live_Vision","vision","vision", SQL_CUR_USE_ODBC)){

    echo "connected to DSN";

    if($result=odbc_do($conn_id, $sql)) {

    } else {

      echo "can not execute '$sql' ";


    echo "closing connection $conn_id";


    } else {

      echo " can not connect to DSN";


Just for clarity, doesn't seem to mean there is delay. Since this appears to be dependent on the user's phone, PC or such maybe the issue is not your code.