Quantcast
Channel: Programming Forums
↧

Why do my prepared statements not work with my Dbh.php file?

So I'm trying to get a prepared statement to work with my Dbh.php file which is the db connection file Dbh.php <?php class Dbh { private $servername ; private $username ; private $password ; private...

View Article


Coding involving pointers and dynamic arrays

Hello, I want to create a list of unique words from the file and display the list in alphabetical order along with the number of times it has appeared. I cannot use vectors or any existing data...

View Article


What's a good first language for a 15-year old?

A friend of mine has a son aged 15 who is interested in learning to program. The boy's uncle showed him Delphi (which is the uncle's language of choice), and he was interested, but only to a point. I...

View Article

decimal number move minus sign from end to beginning

Hi What is the best way to search a string find all occurrences of decimal numbers with trailing minus and move the minus to the left eg. "451.00- 451.00- 1 abc 6234.07- 123 778.9" would be: "-451.00...

View Article

TimeOutError: cannot connect to Gmail SMTP

I cannot connect to the smtp.gmail.com. Is anyone can point me to the right direction? Thank you. import smtplib try: connection = smtplib.SMTP("smtp.gmail.com") connection.starttls() except...

View Article


IsNumeric Returns False for """150"""

The title is correct. For some reason "150" in a string line gets converted to """150""" by VB. Why? and when you use IsNumeric it returns false. It is within a string in a text file....

View Article

safe = False in DRF

I am learning the Django REST framework. I am confused about why safe=False or True when rendering data? please help me.

View Article

.Net, Cors and WSL

I spent today around 9-10 hours trying to get this to work, tried everything I could find on google. I have a project with the following structure: IdentityServer (.Net Core) Api (.Net 5.0) and The...

View Article


xlsxwriter - how to use set_row for formatting

Hi, In the following code I want to bold the 1st 3 rows and from the 4th row bold all rows where cells in column A are not blank workbook = xlsxwriter.Workbook('demo.xlsx', {'strings_to_numbers':...

View Article


gcc find header files in current directories

I sometimes move my code around to various computers so I prefer to keep my header files in my current directory. Unfortunately it does not seem to be working. $ gcc *.c -Wall main.c:1:10: fatal error:...

View Article

Inserting Arab Charcters works directly with database but not with php

Good day everyone. Am trying to insert Arabian words/characters into database via php. I created my database and table with collations. CREATE DATABASE Arab CHARACTER SET utf8 COLLATE utf8_general_ci;...

View Article

How secure are PHP If Statements to not show something?

So below is my createthread.php file with the $FormText being the HTML for a form to submit Once submitted the form goes to upload.php I have this If Statement whereby if a User is not logged in and...

View Article

Can you use an OR/M with FP, or do you have to resort to SQL?

I've read a few books on FP, most notably "Functional Programming In C#" by Enrico Buonanno and Scott Wlaschin's "Domain Modeling Made Functional", and always see data access code done with SQL. They...

View Article


Is login being bypassed?

I am not a professional programmer. Some might say that I know enough to be dangerous. So forgive me if I appear to be struggling. I live on a road where all of the property owners are responsible for...

View Article

c programming description

How would you describe c programming to a person that does not know anything about computers?

View Article


C# trends towards terser code and people who like explicit code

With each succeeding version of the C# language, it looks like it supporting more tersely written code. I'm wondering how people who say that they like to write/read code that explicitly says what is...

View Article

define variable

QuoteHi, please advise how to resolve. I want to print the receiptno on a receipt and it prints "receiptno". I don't know how to define "receiptno" to use the value in the table. I'm working with...

View Article


Pthread help

Hello, I have pthread_t* mythread; mythread = (pthread_t*)malloc(sizeof(*mythread)); pthread_create(mythread, NULL, (void*)threadfunc, NULL); void threadfunc() { while (1) { sem_wait(&semaphore);...

View Article

Jack Dorsey steps down as Twitter CEO

Jack Dorsey steps down as Twitter CEO That was very unexpected.

View Article

Can we use custom types with Entity Framework Core?

Enrico Buonanno's book Functional Programming In C# suggests using custom types instead of primitive types in our models. So, a (very simple) Person class might look like this... public class Person {...

View Article

Application.StartupPath Is Wrong

When I run the code the Application.StartupPath points to the folder where the .exe lives. But when I am running a unit test it points to "C:\Program Files (x86)\Microsoft Visual...

View Article


Separating databases for Website?

This is a general question in PHP/SQL development If, say, I am checking if a user is banned from the site or I want to ban their ip address should I separate out the database to another database?...

View Article


Deserialize Complex Json into object using Marshmallow

Hello, I am trying to deserialize json into an object that has nested objects within it. I am able to deserialize the json into the root level object and the rest of the objects do have values, but I...

View Article

Python Flask - Datetime in Json issue in Unit Test vs Application

Hi everyone, I am having an issue with Datetimes in Python when it comes to using Flask for the Application and Unit Tests. For Example, I can send a json payload that looks like this {...

View Article

sending email thought MS365

Hi we just upgraded to office 365. One of the apps I created was sending emails with no problem. New I cant seam to send any emails through MS365. The error I receive is in the attachment. This is a...

View Article


Convert to C#: How to convert value with suffix & operator

Hi all, I have issue when convert to C#. From Visual Basic (VB) the value &H200& is valid. But in C# is error. When I google it, the prefix start with &H is Hexadecimal and should be...

View Article

Upgrading Symfony 3.4 to 5.4

When I go to https://localhost I get this error in the browser: File not found There are no logs generated. This is in Docker, and I'm ugrading Symfony on a working project. There's no way to show...

View Article

Can't find a file in a place it shouldn't be.

I have an error in my error list (Visual Studio Exterpsrise 2019, V 16.11.5) that says: "Could not find the file 'C:\Program Files (x86)\Microsoft Visual...

View Article

File Read from Flask Request - Is this Safe?

Hi everyone, I am trying to limit the file size a user can upload to our server I created some helper functions to make it a bit dynamic on the server side but my real question is how do we get the...

View Article



Run RefactoringMiner from the command line

Hello, how can I run RefactoringMiner from the command line for a project ( https://github.com/jfree/jfreechart ) ? I'm giving ./RefactoringMiner -a https://github.com/jfree/jfreechart but it says...

View Article

Image may be NSFW.
Clik here to view.

[PyQt] How do I draw lines on a widget?

I need some advice because I'm not sure about how to achieve this result. I've got a text file with a 2D coordinate on each row, like X2 Y5 X3 Y8 X6 Y-2 ... and I have to draw a line between each...

View Article

Login Seems to be Overridden

Howdy - fun issue here that's confusing me a little bit. My project's code is old, very old. It doesn't use a framework, and everything is "from scratch". I use just a simple cookie to determine...

View Article

Why is this wrong?

im trying to crate a script that takes an input as a string, then checks if it can call a function called hello from a module that's been imported. for example input "hello" can I run module.hello() i...

View Article


Sending out email after registration

Hi all I am currently tinkering around with PHP and created a login/registration system. Once the user has registered and the validation has been confirmed/data added the database it will send an email...

View Article

Is there a proper way to do this?

I posted the other day about searching for a method name from a string then executing that method fud that post find it here I have since found a hacky way to achieve this. Discord.py has a a number of...

View Article

Sending emails via gmail

Hi, I need to send emails from a C# app using gmail. I've had it working in the past but I think there may be some security issue getting in the way now. Here is the code I'm using : MailMessage mail =...

View Article


Using GIT to get remote coce

I do not know from the online tutorial if I am properly establishing a connection with a git repository that is on a network. All I have learned from a tutorial is how to set up a local repository, but...

View Article


Using GIT to get remote code

I am putting this in the C# group here because this is the latest programming language and one that I would assume would have the most users using some sort of version control system like git. I do not...

View Article

Image may be NSFW.
Clik here to view.

big margin in Twenty-twenty Theme (TT): how to solve this?

hello dear ArtificialSoldier, Martyr2, modi123_1 First of all: i hope that you are well and everything goes well at your hometown. I hope that your town is doing well with the pandemic-situation. And...

View Article

hashing content to validate authenticity.

Noticed this board is shitting down...damn i got a lot of help from here. When does the last day arrive? Moving on... Im trying to get the right hash of an input but i cant seem to figure out hwat im...

View Article

Database backup strategy (Docker)

Hi all! Happy new year! I am looking at a backup strategy for my web app and looking to talk through my options. It's basically some docker containers (mariadb, nginx, and a django DRF) with the DB...

View Article


If I don't have a portfolio, how can I get new clients?

Hello, I'm interested in establishing my web design business. I don't have a portfolio, as you know. Getting customers is difficult without a portfolio. I am aware that there is a method to create a...

View Article

Why Clojure is top?

Hello, Is Top Highly Paid Programming Languages to Learn in 2022 article OK? Why the Clojure programming language is top? Is Clojure programming language widely used? Thank you.

View Article


setup VSCode for Python-Coding

hello dear community, first of all: a happy new year to all of you. I wish you all a great and sucessful new year! i have VSCode running on a Linux-box (as VSCodium) - but at the office it runs also -...

View Article

Cloudmersive Virus Scanning for file....File Name Too Long

Hi everyone, I am trying to add an AV scanner for our API that accepts a user upload of a file. I am running into this issue OSError: [Errno 63] File name too long: I am not sure how to handle this...

View Article


How to use Nuget assembly as files with visual studio community

I am starting a new coding job with a new client. The problem I am having is that a lot of issues with namespaces that can not be found or maybe missing directives or an assembly reference. This, I...

View Article

Kaitenzushi (Facebook Puzzle Question) Java

Question: There are N dishes in a row on a kaiten belt, with the ith dish being of type D_i. Some dishes may be of the same type as one another. You're very hungry, but you'd also like to keep things...

View Article

Adding class attributes dynamically

So, I am pretty new to Python and what interests me at the moment is, how can I put a list inside class constructor and use that to create attributes in class? Let me give you example of what I want:...

View Article

How do I add an .EXE project to a solution of DLL's?

How do I add an .EXE project to a solution of DLL's? This is using Microsoft Visual Studio Professional I have been handed a solution file which contains three projects. But all three projects generate...

View Article


In a C# solution, how do I add an .EXE project to a solution of DLL

In a C# solution, how do I add an .EXE project to a solution of DLL project's? This is using Microsoft Visual Studio Professional. I have been handed a solution file which contains three projects. But...

View Article



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>