I need to know XY coordinates of an ImageView. This coordinates will be used to position a new ImageView on an RelativeLayout overlay that should have the same position of starting ImageView.
Summerize:
1) ImageView1 = getcoordinates XY
2) button click
3) Overlay RelativeLayout that cover entire window. ImageView1 will be behind this RelativeLayout overlay
4) Create ImageView2 in RelativeLayout overlay that should be positioned exactly on ImageView1
Any help? Thanks
29 July, 2023
28 July, 2023
python search with image google images
Programing Coderfunda
July 28, 2023
No comments
i'm having a very tough time searching google image search with python. I need to do it using only standard python libraries (so urllib, urllib2, json, ..)
Can somebody please help? Assume the image is jpeg.jpg and is in same folder I'm running python from.
I've tried a hundred different code versions, using headers, user-agent, base64 encoding, different urls (images.google.com, http://images.google.com/searchbyimage?hl=en&biw=1060&bih=766&gbv=2&site=search&image_url={{URL To your image}}&sa=X&ei=H6RaTtb5JcTeiALlmPi2CQ&ved=0CDsQ9Q8, etc....)
Nothing works, it's always an error, 404, 401 or broken pipe :(
Please show me some python script that will actually seach google images with my own image as the search data ('jpeg.jpg' stored on my computer/device)
Thank you for whomever can solve this,
Dave:)
27 July, 2023
The State of Laravel 2023 survey started
Programing Coderfunda
July 27, 2023
No comments
26 July, 2023
Access to a database from a Spark job in synapse
Programing Coderfunda
July 26, 2023
No comments
I'm working within a Synapse workspace.
I have a linked service to a oracle database in a private network (10.x.x.x)
I have a SparkJob which is trying to connect to that database with the oracle thin client and the default method in the spark library, i.e. spark.read.jdbc, and it can not reach it.
Is it possible for the spark job to reach the database?
I've tried to open firewall connections but can not find from where to where because the Spark pool is in a virtual network for which I don't know the network segment.
25 July, 2023
Feature Flagging in Laravel - New Article
Programing Coderfunda
July 25, 2023
No comments
My team and I wrote a blog on Feature Flagging in Laravel, including Laravel Nova.
This blog post is tailored for both technical professionals, such as developers and software engineers, seeking to leverage feature flagging techniques to optimize their development workflow. Additionally, it is equally relevant for non-technical specialists, like marketing professionals, who aim to gain insights into how feature flagging can enhance A/B testing, user engagement, and business strategies.
Throughout this article, we will delve into feature flagging's implementation within Laravel, a widely adopted PHP framework, and thoroughly explore its vast array of benefits, including gradual rollouts, A/B testing capabilities, risk mitigation, and harmonious integration with continuous deployment pipelines.
If you're curious, you can read more here: https://www.binarcode.com/blog/feature-flaggin-laravel submitted by /u/SilvieVonT
[link] [comments]
24 July, 2023
Laravel: "Impossible to create the root directory" when storing file
Programing Coderfunda
July 24, 2023
No comments
I'm trying to store a file via AJAX to public folder in laravel, however when I submit the form I get the following message:
" message: "Impossible to create the root directory \"C:\xampp\htdocs\Restaurante1\storage\app\C:/xampp/htdocs/Restaurante1/public/img\".", exception: "League\Flysystem\Exception", file: "C:\xampp\htdocs\Restaurante1\vendor\league\flysystem\src\Adapter\Local.php"
I'm trying to store the file into the following folder inside public directory: public > img >uploads
This is my JQuery code:
console.log('new slider button clicked');
var formData = new FormData();
formData.append('title', $('#sliders_title').val());
formData.append('body', $('#sliders_body').val());
formData.append('isVisible', $('#sliders_isVisible').is(':checked') ? 1 : 0);
formData.append('image', $('#sliders_image').prop('files')[0]);
$.ajax({
async: true,
url: '/sliders',
type: 'POST',
data: formData,
dataType: 'JSON',
processData: false,
contentType: false,
success: function (data) {
$('.form_valid_container').html('✓ '+ data.success +'');
form.trigger("reset");
console.log(data.success, data.errors);
},
error: function (data){
var errors = data.responseJSON;
console.log(errors);
$.each(errors , function(){
$('.form_error_container').html('✘ '+ errors.message +'')
});
}
});
My controller method:
public function store(StoreSlider $request)
{
$uploadFile = $request->file('image');
//generate random filename and append original extension (eg: asddasada.jpg, asddasada.png)
$filename = str_random(6).'.'.$uploadFile->extension();
// storing path (Change it to your desired path in public folder)
$path = 'img/uploads/';
// Move file to public filder
$uploadFile->storeAs(public_path($path), $filename);
$slider = new Slider();
$slider->title = $request->title;
$slider->body = $request->body;
$slider->image = $path.'/'.$filename; // So that you can access image by url($slider->image);
$slider->isVisible = $request->isVisible;
$slider->save();
return response()->json([
'success' => 'Diapositiva guardada correctamente',
'slider' => $slider,
]);
}
EDIT: This is my config/filesystems
23 July, 2023
How to Use React.js in Laravel 10 [Step-by-step Guide]
Programing Coderfunda
July 23, 2023
No comments

