Click here to Skip to main content
15,861,366 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: English to Arabic language change integrate in html Pin
Andre Oosthuizen28-Feb-23 1:43
mveAndre Oosthuizen28-Feb-23 1:43 
Questionwhy doesn't the file I have submitted appear in the email? Pin
rahmat_ hasibuan10-Feb-23 4:03
rahmat_ hasibuan10-Feb-23 4:03 
AnswerRe: why doesn't the file I have submitted appear in the email? Pin
Andre Oosthuizen10-Feb-23 5:33
mveAndre Oosthuizen10-Feb-23 5:33 
AnswerRe: why doesn't the file I have submitted appear in the email? Pin
jschell10-Feb-23 10:01
jschell10-Feb-23 10:01 
QuestionWhat is the capability of Django to handle large amounts of data? Pin
Karl Shady26-Jan-23 19:44
Karl Shady26-Jan-23 19:44 
AnswerRe: What is the capability of Django to handle large amounts of data? Pin
jschell2-Feb-23 7:58
jschell2-Feb-23 7:58 
GeneralRe: What is the capability of Django to handle large amounts of data? Pin
Gulshan Negi6-Feb-23 19:53
professionalGulshan Negi6-Feb-23 19:53 
GeneralI am trying to send confirmed Person and Vehicle images to telegram. Pin
sesipod29-Dec-22 6:22
sesipod29-Dec-22 6:22 
I have been working on a script trying to get images sent over to a telegram group. Though I assume it's requiring the use of http://localhost:32168/v1/vision/detection and this does not seem to be working. I have given it my best shot if anyone else can shine some light on this.


# Set the path to the folder of images
$imageFolderPath = "C:\images"

# Set the endpoint URL for the CodeProjectAI detection service
$endpointUrl = "http://localhost:32168/v1/vision/detection"

# Get a list of all the image files in the specified folder
$imageFiles = Get-ChildItem $imageFolderPath -Filter *.jpg,*.png

# Iterate through each image file
foreach ($imageFile in $imageFiles) {
  # Read the image file into a byte array
  $imageBytes = [System.IO.File]::ReadAllBytes($imageFile.FullName)

  # Encode the image byte array as base64
  $imageBase64 = [Convert]::ToBase64String($imageBytes)

  # Set the POST body for the detection request
  $requestBody = @{
    image = $imageBase64
    objects = @("human", "vehicle")
  } | ConvertTo-Json

  # Make the POST request to the detection service
  $response = Invoke-RestMethod -Method Post -Uri $endpointUrl -Body $requestBody -ContentType "application/json"

  # Check the response for detected objects
  if ($response.objects) {
    # If objects are detected, send the image to the Telegram group using CURL
    # Replace YOUR_CHAT_ID and YOUR_BOT_TOKEN with the chat ID and bot token for your Telegram group
    $curlCommand = "curl -s -X POST https://api.telegram.org/botYOUR_BOT_TOKEN/sendPhoto -d chat_id=YOUR_CHAT_ID -d photo=`"$($imageFile.FullName)`""
    Invoke-Expression $curlCommand
  }

  # Delete the image file
  Remove-Item $imageFile.FullName
}


modified 11-Jan-23 10:19am.

QuestionLooking for testers Pin
Alberto Enrique Franco Ferreiro24-Nov-22 9:15
Alberto Enrique Franco Ferreiro24-Nov-22 9:15 
AnswerRe: Looking for testers Pin
Richard Deeming24-Nov-22 21:45
mveRichard Deeming24-Nov-22 21:45 
GeneralRe: Looking for testers Pin
Alberto Enrique Franco Ferreiro25-Nov-22 5:51
Alberto Enrique Franco Ferreiro25-Nov-22 5:51 
QuestionHosting Question Pin
Kevin Marois21-Nov-22 6:41
professionalKevin Marois21-Nov-22 6:41 
AnswerRe: Hosting Question Pin
Richard Deeming21-Nov-22 21:55
mveRichard Deeming21-Nov-22 21:55 
GeneralRe: Hosting Question Pin
Kevin Marois24-Nov-22 7:26
professionalKevin Marois24-Nov-22 7:26 
GeneralRe: Hosting Question Pin
Richard Deeming24-Nov-22 21:43
mveRichard Deeming24-Nov-22 21:43 
GeneralRe: Hosting Question Pin
Kevin Marois29-Nov-22 17:11
professionalKevin Marois29-Nov-22 17:11 
QuestionJavascript Pin
Yuvraj Singh Nov202216-Nov-22 21:40
Yuvraj Singh Nov202216-Nov-22 21:40 
AnswerRe: Javascript Pin
Richard Deeming16-Nov-22 23:24
mveRichard Deeming16-Nov-22 23:24 
AnswerRe: Javascript Pin
Sam Hobbs18-Nov-22 11:59
Sam Hobbs18-Nov-22 11:59 
JokeRe: Javascript Pin
Richard Deeming20-Nov-22 22:38
mveRichard Deeming20-Nov-22 22:38 
JokeRe: Javascript Pin
Jeremy Falcon15-Dec-22 12:50
professionalJeremy Falcon15-Dec-22 12:50 
AnswerRe: Javascript Pin
Jeremy Falcon15-Dec-22 12:51
professionalJeremy Falcon15-Dec-22 12:51 
QuestionNeed a simple *everything centered* html template Pin
Member 149874928-Nov-22 16:15
Member 149874928-Nov-22 16:15 
AnswerRe: Need a simple *everything centered* html template Pin
Richard Deeming8-Nov-22 21:44
mveRichard Deeming8-Nov-22 21:44 
GeneralRe: Need a simple *everything centered* html template Pin
Member 1498749210-Nov-22 17:25
Member 1498749210-Nov-22 17:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.