CoderFunda
  • Home
  • About us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • About us
  • Home
  • Php
  • HTML
  • CSS
  • JavaScript
    • JavaScript
    • Jquery
    • JqueryUI
    • Stock
  • SQL
  • Vue.Js
  • Python
  • Wordpress
  • C++
    • C++
    • C
  • Laravel
    • Laravel
      • Overview
      • Namespaces
      • Middleware
      • Routing
      • Configuration
      • Application Structure
      • Installation
    • Overview
  • DBMS
    • DBMS
      • PL/SQL
      • SQLite
      • MongoDB
      • Cassandra
      • MySQL
      • Oracle
      • CouchDB
      • Neo4j
      • DB2
      • Quiz
    • Overview
  • Entertainment
    • TV Series Update
    • Movie Review
    • Movie Review
  • More
    • Vue. Js
    • Php Question
    • Php Interview Question
    • Laravel Interview Question
    • SQL Interview Question
    • IAS Interview Question
    • PCS Interview Question
    • Technology
    • Other

12 September, 2024

Getting Authentication error when connecting to another private repo from the github actions workflow

 Programing Coderfunda     September 12, 2024     No comments   

I'm using the self-hosted runner in the GitHub actions workflow. Facing issue when running the terraform init command. It throws the Authentication error. I'm using PAT to connect to the other repo.
terraform:
runs-on: self-hosted
needs: determine_scope
if: needs.determine_scope.outputs.deploy == 'yes'
environment: ${{ inputs.environment }}
env:
TF_VAR_snowflake_account: ${{ vars.SNOWFLAKE_ACCOUNT }}
TF_VAR_snowflake_username: ${{ vars.SNOWFLAKE_USERNAME }}
TF_VAR_snowflake_role: ${{ vars.SNOWFLAKE_ROLE }}
TF_VAR_snowflake_private_key_passphrase: ${{ secrets.SNOWFLAKE_PASSPHRASE }}
TF_VAR_snowflake_private_key: ${{ secrets.SNOWFLAKE_PRIVATE_KEY }}

defaults:
run:
working-directory: ${{ inputs.path }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Login to Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZ_CREDENTIALS }}

- name: JSON Parse
id: parse
env:
AZJSON: ${{ secrets.AZ_CREDENTIALS }}
run: |
ARM_CLIENT_ID=$(echo $AZJSON | jq -r '.["clientId"]')
ARM_CLIENT_SECRET=$(echo $AZJSON | jq -r '.["clientSecret"]')
ARM_TENANT_ID=$(echo $AZJSON | jq -r '.["tenantId"]')
ARM_SUBSCRIPTION_ID=$(echo $AZJSON | jq -r '.["subscriptionId"]')
echo ARM_CLIENT_ID=$ARM_CLIENT_ID >> $GITHUB_ENV
echo ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET >> $GITHUB_ENV
echo ARM_TENANT_ID=$ARM_TENANT_ID >> $GITHUB_ENV
echo ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID >> $GITHUB_ENV

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: latest

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Configure Git Credentials
run: |
git config --global credential.helper store
echo "
https://x-access-token:${{ secrets.GIT_PAT }}@github.com" > ~/.git-credentials
env:
GIT_PAT: ${{ secrets.GIT_PAT }}

- name: Terraform Init
run: terraform init -backend-config="${{ inputs.backend_config }}"



error:


You said:
I'm getting this error in terraform init


│ Error: Failed to download module
│
│ on main.tf line 124:
│ 124: module "tag_associations" ***
│
│ Could not download module "tag_associations" (main.tf:124) source code from
│ "git::
https://github.com/g/platform-terraform.git?ref=main": /> │ error downloading
│ '
https://github.com/g/platform-terraform.git?ref=main': /> │ /usr/bin/git exited with 128: Cloning into
│ '.terraform/modules/tag_associations'...
│ remote: Invalid username or password.
│ fatal: Authentication failed for
│ '
https://github.com/g/platform-terraform.git/' />

When I use the github hosted runner (ubuntu-latest) it works fine. But when usig the self-hosted runner. it throws above error
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

11 September, 2024

how can I integrate continuous data and static data using random forest machine learning model?

 Programing Coderfunda     September 11, 2024     No comments   

I am using random forest regression model to predict groundwater level changes. I am using continuous inputs (timeseries data) such as GRACE, Precipitation, Maximum temperature, Minimum temperature, NDVI as well as static data such as land elevation, hydraulic conductivity, slope, sand percent. When I added static inputs to continuous inputs, the model gave high importance to static inputs and neglected continuous inputs. How I can fix this problem.


I got a prediction but the problem in feature importance the model gave high importance to static inputs and no importance for continuous inputs which is wrong. how can I fix this?
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Spring boot app (error: method getFirst()) failed to run at local machine, but can run on server

 Programing Coderfunda     September 11, 2024     No comments   

The Spring boot app can run on the online server. Now, we want to replicate the same app at the local machine but the Spring boot jar file failed to run and had the below error.


I read Compilation error on List.getFirst(): cannot find symbol?
The answer stated the issue caused by the different java version of the online server and the local machine. But I checked they both used java 21.


Error message
JSONWebMvcConfigurer.java:
java: cannot find symbol
symbol: method addFirst(com.alibaba.fastjson2.support.spring6.http.converter.FastJsonHttpMessageConverter)
location: variable converters of type java.util.List
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

VS Code feels less

 Programing Coderfunda     September 11, 2024     No comments   

So I decided to move from PHPStorm to VS Code, because 2 PHPStorm reasons:

* PHPStorm Laravel Idea is a paid plugin :( Yes I know 30 days for free. I've been doing that for years now.
* PHPStorm is slow, bulky and takes a lot of Memory.




and several, but not limited to, VS Code reasons:

* It's fast.
* You can spawn cursors w/o switching to some column mode.
* Template shortcuts like "nav.w-full.bg-ping-600".
* Developers tend to use it and if I see video explaining or showing examples, nice to see the same editor.
* A lot of customization and tuning is possible.




How it's going you might ask?



Not easy. It's a nightmare some would say.

* I had to google and install a lot of Extensions. Then I had to deal with errors from said Extensions. Uninstall some of them. Then maybe install a couple back. I uninstalled a pack extensions and that removed all said extensions. I still don't know if I have all Laravel/Vue extensions and if I might need to change them later because of a different project... So many unknowns, where's the PHPStorm you just install and use. That's it.
* Quick fix is not working. Even after installing Volar, ESLint or Laravel extensions and going through all the settings the OpenAI suggested. Not Vuejs, not Laravel quick fix is working. Insane.
* In VSCode/Laravel project you can move or rename a file and nothing will be updated.
* I'm missing a PHPStorm panel where you could double-tap a ctrl and have a list of commands to execute in the terminal.
* VSCode does not have scratch files. Installed an Extensions. That doesn't work either.
* Missing the Laravel Idea make form for Models, Controllers, etc. I now have to either answer a lot of questions from Command Palette or run it manually from the terminal.
* If I ctrl-click "UserController@update" from the terminal, that doesn't work either. I have to delete the @\update to open the UserController.php file.
* PHPStorm has a very nice open modal: Open Class, Open fiile, actions, etc. I can't open a PHP class in VSCode.
* PHPStorm has a Local History modal, where I can go back in time while editing file and maybe re-do something or copy old code.
* I think I forgot a couple issues while writing this but I will end this rant by saying PHPStorm had all configurations in one place. I could configure and run php serve, npm dev, debug, etc all in 1 place. VSCode depends on extensions and whether they add commands to Command Palette.




Atm bootstrapping a full-stack developer to a VSCode feels challenging. Not to mention there's people who won't bother going through configuration or troubleshooting for VSCode. They would simply install PHPStorm and start using it. That's my friend. He's an iphone user. submitted by /u/darknmy
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

How to Not Turn Your Laravel App into a Circus

 Programing Coderfunda     September 11, 2024     No comments   

submitted by /u/amashq
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Lazy JSON Pages: scrape any JSON API in a memory-efficient way

 Programing Coderfunda     September 11, 2024     No comments   

Lazy JSON Pages v2 is finally out! 💝

Scrape literally any JSON API in a memory-efficient way by loading each paginated item one-by-one into a lazy collection 🍃

While being framework-agnostic, Lazy JSON Pages plays nicely with Laravel and Symfony 💞


https://github.com/cerbero90/lazy-json-pages


https://preview.redd.it/c7853u6ec3od1.png?width=2244&format=png&auto=webp&s=08d5394aefaf2058af278de631722bccabc24f03


https://preview.redd.it/dv5jmu6ec3od1.png?width=2096&format=png&auto=webp&s=c648dcc639f393d7bd8c0035b2f12ae13dd9450e


https://preview.redd.it/tm6b7v6ec3od1.png?width=1852&format=png&auto=webp&s=d5c55c167de093ac98aaf38e376cf7fed1f60f65


https://preview.redd.it/vkrl5u6ec3od1.png?width=2056&format=png&auto=webp&s=1d6513c44251e4d0684e77199a8879d093cab0d9 submitted by /u/cerbero90
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

10 September, 2024

Truncating Production Tables Live On Stage with Verbs (Daniel Coulbourne)

 Programing Coderfunda     September 10, 2024     No comments   

submitted by /u/ichthuz
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

error when trying to join many upset plots in only one plot using grid.arrange in r

 Programing Coderfunda     September 10, 2024     No comments   

I'm trying to join many upset plots in only one image in r, I can generate the plots individually but when I use grid.arrange (from gridExtra) to join them like this:
grid.arrange(plot1, plot2)



it gives this error:
Error in gList(...): only 'grobs' allowed in 'gList'



I think this is happening because the plot is an 'upset' class, I tried to transform them into a ggplot using ggplotGrob() but it gives:
Error in UseMethod("ggplot_build"): no applicable method for 'ggplot_build' applied to an object of class upset"
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

pip install itself fails with "No module named 'distutils'"

 Programing Coderfunda     September 10, 2024     No comments   

I use Windows 11 and Python 3.12.5 64-bit, installed from
https://www.python.org/downloads/ />

I'm trying to install requirements from some repo, but this fails:
PS C:\Data\Repos\myrepo> pip install -r .\requirements.txt
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\jonathanb\AppData\Local\Programs\Python\Python312\Scripts\pip.exe\__main__.py", line 4, in
File "C:\Users\jonathanb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\jonathanb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\autocompletion.py", line 9, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\jonathanb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "C:\Users\jonathanb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\cmdoptions.py", line 18, in
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'



From several questions on this site (best one) I understand distutils was removed in Python 3.12, and if I want to use them I should run pip install setuptools. I tried that, and it failed the same way.


So question: How can I use pip to restore requirements?
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Are `elf.h` structures packed?

 Programing Coderfunda     September 10, 2024     No comments   

Quoting the man page:



All data structures that the file format defines follow the
"natural" size and alignment guidelines for the relevant class.
If necessary, data structures contain explicit padding to ensure
4-byte alignment for 4-byte objects, to force structure sizes to
a multiple of 4, and so on.



But since aligment is implementation defined I imagine that is not a good
pratice suppose that the structures are allways packed.


For example, the following (pseudocode) can falls in some systems/compilers:
unsigned char e_ident[EI_NIDENT]; // Supposing that sizeof(unsigned char) == sizeof(uint8_t)
Elf32_Ehdr *ehdr;
// First read the e_ident
fread(e_ident, EI_NIDENT, 1, file_ptr);
// Now read the ELF header
if(e_ident[EI_CLASS] == ELFCLASS32){
ehdr = malloc(sizeof(Elf32_Ehdr));
memcpy(ehdr->e_ident, e_ident, EI_NIDENT);
fread(&(ehdr->e_type), sizeof(uint8_t), sizeof(Elf32_Ehdr) - (size_t)EI_NIDENT, file_ptr);
}



On negative answer for the main question, there is some portable way to ensure that elf.h structures are packed?


NOTE: I'm using the elf.h from musl.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

API WOOCOMERCE (INSERT PRODUCT) - Whitespace on attributes (options)

 Programing Coderfunda     September 10, 2024     No comments   

I have the following problem.


I'm uploading a product via api rest v3.


I have the problem loading attribute options


If I use a space option, it separates the terms.


If Gravina Di Catania loads, Gravina takes me then Di and then Catania


If I do the test on postman everything is ok


If I make the call via Php no.


how do i fix it?


I put double quotes in the string.


I used addslashes


i tried doing JSON ENCODE of options array
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

09 September, 2024

Does it cost money to read from aws s3 in Python?

 Programing Coderfunda     September 09, 2024     No comments   

There are certain operations that I am doing in Python and I would like to know if any of these are charging my company or me money. I will give three examples.



* Using s3fs to read a file




import s3fs
s3 = s3fs.S3FileSystem()
path = "s3://my-bucket/foo/bar.txt"
text = s3.read_text(path)




* Using s3fs to glob for files




import s3fs
s3 = s3fs.S3FileSystem()
bar = "s3://my-bucket/foo/*"
my_paths = s3.glob(bar)




* Reading a file with pandas




import pandas as pd
path = "s3://my-bucket/foo/bar.csv"
my_df = pd.read_csv(path)



Is someone getting charged money when I do any of these three things?
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Don't undo what you haven't done. Avoid this subtle, but insidious little bug.

 Programing Coderfunda     September 09, 2024     No comments   


https://aaronfrancis.com/2024/dont-undo-what-you-havent-done-430ac590 submitted by /u/aarondf
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Pest v3 Now Available

 Programing Coderfunda     September 09, 2024     No comments   

submitted by /u/nunomaduro
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Laravel Password Hashing With Salt

 Programing Coderfunda     September 09, 2024     No comments   

submitted by /u/valerione
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Theo (t3dotgg) rage-baiting about Laravel without reading the docs

 Programing Coderfunda     September 09, 2024     No comments   

Theo - t3.gg on X: "Apparently "logs" is a PAID FEATURE on the official recommended way to set up Laravel locally???
https://t.co/l6yEb3qd50" / X

Okay so I watched his stream regarding Laravel, and he didn't put much effort to read the docs other than installation page and is already spreading negativity on Twitter/X regarding Laravel.

Any thoughts? Is Laravel docs that confusing for a beginner? submitted by /u/TastyInternet
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

08 September, 2024

Weekly /r/Laravel Help Thread

 Programing Coderfunda     September 08, 2024     No comments   

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

* What steps have you taken so far?
* What have you tried from the documentation?
* Did you provide any error messages you are getting?
* Are you able to provide instructions to replicate the issue?

* Did you provide a code example?

* Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.






For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the /r/Laravel community! submitted by /u/AutoModerator
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

nextjs google sign in

 Programing Coderfunda     September 08, 2024     No comments   

I'm just curious about sign-in/authentication libraries like for example is clerk and Lucia.


right now I'm using nextAuth with a simple sign in to google, the process is opening console.cloud.google, and doing a few setups to get the GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET for getting permissions and once access is granted i would be able to modify,create folders,upload files & delete files/folders on my google drive
.


So my curiosities is, can i use other authentication libraries like clerk and lucia, to get a equivalent of GOOGLE_CLIENT_SECRET & GOOGLE_CLIENT_ID= in which can grant me access to my google account?


Hope my question makes sense to y'all
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Why Postgres query is not using column in Index Condition but uses it in Filter condition

 Programing Coderfunda     September 08, 2024     No comments   

I am running a simple join query, where the table incident_tracker_details is covered by a suitable index. The query is slow because it doesn`t use all the columns in Index Condition, but does use the column as a Filter leading to a large heap searches


Query:
SELECT
relevant_incidents_per_inventory_item.inventory_id,
tracker_id
FROM
relevant_incidents_per_inventory_item
JOIN
incident_tracker_details
ON
incident_tracker_details.incident_id = relevant_incidents_per_inventory_item.incident_id
WHERE
incident_tracker_details.company_id = :companyId
and incident_tracker_details.division_id = :divisionId
AND incident_tracker_details.value > 0



the index in use:
create index companyid_divisionId_incidentId_idx
on incident_tracker_details (company_id, division_id, incident_id)
where (value > 0) include (tracker_id);



the relevant_incidents_per_inventory_item does not have any relevant indexes and the table is very small (few hundreds of rows).


the actual query plan:
QUERY PLAN
Hash Join (cost=6901.58..6913.72 rows=1 width=8) (actual time=90.663..315.278 rows=522 loops=1)
Hash Cond: (incident_tracker_details.incident_id = relevant_incidents_per_inventory_item.incident_id)
-> Index Only Scan using companyid_divisionId_incidentId_idx on incident_tracker_details (cost=0.57..12.68 rows=6 width=16) (actual time=0.039..202.787 rows=246774 loops=1)
Index Cond: ((company_id = '777704491747470679'::bigint) AND (division_id = '777795770460846005'::bigint))
Heap Fetches: 124039
-> Hash (cost=6900.88..6900.88 rows=10 width=8) (actual time=86.704..86.709 rows=259 loops=1)
...not relevant part
Planning Time: 0.518 ms
Execution Time: 315.402 ms



Why is the "incident_id" not part of the Index Cond? this leads to retrieving all the rows under companyId, divisionId , and then the engine has to filter all the rows for those having incident_tracker_details.incident_id = relevant_incidents_per_inventory_item.incident_id


I expected to see all the columns used in the Index Condition, leading to fast retrieval of only the relevant data
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

SQL Server options to handle a large table, from the options listed below [closed]

 Programing Coderfunda     September 08, 2024     No comments   

I have a SQL Server database with a table that contains 50 million rows, I expect the row count to growth to 700 million rows by the end of my processing cycle. The current table performs well, and it’s been tuned with the appropriate indexes.


In order to scale the database, and for performance, I am considering the implementation partitioned tables, however, I keep reading about downsides. I wanted about your experiences and preferred approach between the options listed below, in the context of implementation ease, efficiency and subsequent maintenance:



* Partitioning table

* Indexed views

* Sharding

* Filtered indexes

* Partitioned views

* In-Memory OLTP
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Sonatype Nexus OSS 3.69.0 Npm Issue

 Programing Coderfunda     September 08, 2024     No comments   

I am using a Nexus (3.69.0 oss) Docker image with Maven, npm, and Docker repositories feeded in it. This image needed to be deployed across different environment and use as an artifact central.


For Maven and Docker, it is working fine.


But when it comes to npm, when I use the Nexus container with these image on my local machine without internet access, everything works as expected., However, when I run the same setup in another environment(aws ec2 with 8CPU,32GB RAM), also without internet access, I encounter issues with npm.


Specifically, npm takes about five minutes to retrieve a single package. The npm repository is a combination of both proxy(2k dependencies) and hosted repositories(7 artifacts), and I have artifacts stored in both. Despite this, I am seeing significant delays.


To install a single package, it is taking around 4-5 minutes. instead, 1-2 seconds in local.


I have confirmed that npm ping works correctly, and I can download npm artifacts using wget with no problems. However, npm install is where the issue occurs.


Could you please help me understand why this is happening and how it can be resolved?


In logs also I cannot see any., regarding delays.,


Configuration details:
some packages are in hosted repo, and some are in proxy cached, I kept negative cache to 0, and turned off it, meatda age and max component ages to -1., to use the caching always…No routing rules, and no firewalls enabled etc.


and this is the data that I am using in to create proxy npm repo:
{
“name”: “‘$npm_proxy_repository_name’”,
“online”: true,
“storage”: {
“blobStoreName”: “default”,
“strictContentTypeValidation”: true
},
“cleanup”: {
“policyNames”: [
“string”
]
},
“proxy”: {
“remoteUrl”: “
https://registry.npmjs.org”, /> “contentMaxAge”: -1,
“metadataMaxAge”: -1
},
“negativeCache”: {
“enabled”: false,
“timeToLive”: 0
},
“httpClient”: {
“blocked”: false,
“autoBlock”: false,
“connection”: {
“retries”: 10,
“userAgentSuffix”: null,
“timeout”: 120,
“enableCircularRedirects”: false,
“enableCookies”: false,
“useTrustStore”: false
},
“authentication”: null
},
“routingRule”: “string”,
“replication”: {
“preemptivePullEnabled”: false,
“assetPathRegex”: “string”
},
“npm”: {
“removeNonCataloged”: false,
“removeQuarantined”: false
}
}



It’s a mysterious question still for us , why it is working in local mcahine, not in the aws server,


FYI, using the nexus server and npm client server, both are in same machine
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

07 September, 2024

Shiny downloadButton Status: Waiting for print(obj, file) execution before updating status

 Programing Coderfunda     September 07, 2024     No comments   

I have a shiny app that generates and saves a report when the user clicks a button.
I want to show the save status in the button by changing its label and icon.


I am using a downloadButton to allow the user to specify the location and file name. The report is an officer word document saved using print(obj, target).


The expected flow is:



* user clicks button

* button changes to "Saving..."

* file dialogue opens

* user selects file name/location

* r attempts to save the document

* if the save is successful (i.e., no errors)the button changes to "Saved"

* otherwise, button changes to "Save Failed"






The actual flow is:



* user clicks button

* button changes to "Saving..."

* file dialogue opens

* button changes to "Saved"

* user selects file name/location

* ...






The script does not wait for the user to select the file or see if the file saves correctly before changing the status to "Saved." In this case, the file is saving correctly, but the script has no way of knowing that before it prints to target, and it cannot print to target until the user provides the file name/location.


How may I revise this so that the status change is related to whether or not the file was saved without error?
library(shiny)
library(shinyjs)
library(officer)

ui
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Are there any Laravel courses or reading materials where the author shares experiences that I can't find in the documentation?

 Programing Coderfunda     September 07, 2024     No comments   

Hello everyone,
I recently bought Laracasts. It's nice, but it felt like documentation for lazy people. I already knew most of the things they covered just by reading the documentation (e.g., Filament).

Are there any courses or reading materials where people mainly share their experiences instead of simply rephrasing the documentation? I don't have a specific goal—I'm just looking to spend my spare time learning more about Laravel.

I often come across blog posts, videos, etc., for other programming languages like Java or Python that talks about real world problems and how those people solve those problems with the tools frameworks or languages provide, and I want to find similar content for Laravel or PHP in general.

but most of the content i find is already in the documentation.

For example, I’ve never seen much content on massively scaling Laravel queues.

note: this post is not intended to bash laracasts or say its not good or bash authors who wrote tutorials/make videos about laravel etc. i am simply looking for something different. submitted by /u/desiderkino
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Kotlin spread operator for an array of functions does not satisfy Java Function... function argument definition

 Programing Coderfunda     September 07, 2024     No comments   

I need an overlay function around AssertJ extracting assertion.
Its current implementation:
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.groups.Tuple

fun checkObjectsHaveExactPropertyValue(
objectsList: List,
properties: Array,
expectedPropertyValue: R
) {
assertThat(objectsList)
.extracting(*properties)
.containsOnly(Tuple.tuple(expectedPropertyValue))
}



I want to be able to pass multiple property extractors as properties argument of my function. Then they are supplied to .extracting method.


And this is there code check and compilation error is:
Kotlin: None of the following functions can be called with the arguments supplied:
public open fun \ extracting(p0: Function\!): AbstractListAssert\! defined in org.assertj.core.api.ListAssert
public final fun extracting(vararg p0: Function\!): AbstractListAssert\! defined in org.assertj.core.api.ListAssert
public open fun extracting(vararg p0: String!): AbstractListAssert\! defined in org.assertj.core.api.ListAssert
public open fun extracting(p0: String!): AbstractListAssert\! defined in org.assertj.core.api.ListAssert
public open fun \ extracting(p0: ThrowingExtractor\!): AbstractListAssert\! defined in org.assertj.core.api.ListAssert



I don't see where I messed up.


I also tried following to debug typing:



* .extracting(properties[0], properties[1]) - compiles, function typing is correct, but not what I need

* different Iterable types (List, ArrayList, ...) - same error

* vararg properties: Function1 - same error

* properties: Array R> - same error






I expect there is correct typing for the argument of my function, so I can use overloaded method extracting(vararg Function!) defined in org.assertj.core.api.ListAssert.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Do you know someone who is helping PHP community and deserve sponsoring? (nominate)

 Programing Coderfunda     September 07, 2024     No comments   

Based on recent prosperous news around PHP, I realize many of those projects were started by sole developers, once unknown 🙏

I want to give back love and sponsor couple developers, who grow our PHP community grow ❤️

Do you know someone like that? Let me know:
https://docs.google.com/forms/d/15sUIo3PnN4oLlaxKg6so8zYClrXjh8F3F2kzV5np3YU/ submitted by /u/Tomas_Votruba
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Good vector database options with Laravel

 Programing Coderfunda     September 07, 2024     No comments   

I have recently doing a lot of Python work because of AI/ML requirements in my company. And to be honest from personal interest as well.

Now, with python there are so many vector db options (OS) LIKE Faiss, chroma db etc.

I can find good resources to learn about them as well. For example chromadb has great documentation.

Can anyone guide me which are options for Laravel? I don't want to have postgresql. Just because I have heard that the pgsql vector extension is not that performent compared to chroma or faiss submitted by /u/amitavroy
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

06 September, 2024

Learn to Fly with Laravel Reverb | Joe Dixon at Laracon US 2024 in Dallas, TX

 Programing Coderfunda     September 06, 2024     No comments   

submitted by /u/octarino
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Prezet: Markdown Blogging for Laravel

 Programing Coderfunda     September 06, 2024     No comments   

submitted by /u/amalinovic
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Let's build a Twitter clone with Livewire 3 & Laravel Reverb | 7 - Displaying Retweets

 Programing Coderfunda     September 06, 2024     No comments   

submitted by /u/Tilly-w-e
[link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Python Web scraping [D:websockets.client] > GET %s HTTP/1.1 [D:websockets.client] > %s: %s doesn't show all the results

 Programing Coderfunda     September 06, 2024     No comments   

I'm trying to make web scraping with Python 3.10, and the library requests-HTML 0.10.0.


I attach the code:
from requests_html import HTMLSession

url = '
https://bodysolid-europe.com/collections/all' />
s = HTMLSession()
r = s.get(url)

r.html.render(sleep=1)

products = r.html.xpath('/html/body/div[2]/div[2]/div', first=True)

for item in products.absolute_links:
r = s.get(item)
print(r.html.find('header.product-header', first=True).text)



When I try to extract information from the URL by Xpath, in the console shows the next output:
[D:urllib3.connectionpool] Starting new HTTPS connection (%d): %s:%s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:asyncio] Using proactor: %s
[D:websockets.client] = connection is CONNECTING
[D:websockets.client] > GET %s HTTP/1.1
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] < HTTP/1.1 %d %s



It doesn't show all the information from the items, only a little bit, like these:
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe
Best Fitness Dumbbell Rack BFDR10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Bench BFFID10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Mountain Climber BFMC10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe
Best Fitness Multi-Station Gym BFMG30
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Center Drive Elliptical BFE1
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Olympic Bench BFOB10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Functional Trainer BFFT10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Leg Developer and Preacher Curl Attachment BFPL10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Inversion Table BFINVER10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe



The most of the output are only:
D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s



I don't know what the problem is. I already installed the pyppeteer==1.0.0, because previously, I had this:
NoSuchKey. The specified key does not exist. No such object: chromium-browser-snapshots/Win_x64/1181205/chrome-win.zip



but now it's showing the "[D:websockets.client] < %s
[D:websockets.client] < %s"


I need to fix that error with the output to get the information from the URL by web scraping.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Meta

Popular Posts

  • Write API Integrations in Laravel and PHP Projects with Saloon
    Write API Integrations in Laravel and PHP Projects with Saloon Saloon  is a Laravel/PHP package that allows you to write your API integratio...
  • Credit card validation in laravel
      Validation rules for credit card using laravel-validation-rules/credit-card package in laravel Install package laravel-validation-rules/cr...
  • iOS 17 Force Screen Rotation not working on iPAD only
    I have followed all the links on Google and StackOverFlow, unfortunately, I could not find any reliable solution Specifically for iPad devic...
  • C++ in Hindi Introduction
    C ++ का परिचय C ++ एक ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग लैंग्वेज है। C ++ को Bjarne Stroustrup द्वारा विकसित किया गया था। C ++ में आने से पह...
  • Send message via CANBus
    After some years developing for mobile devices, I've started developing for embedded devices, and I'm finding a new problem now. Th...

Categories

  • Ajax (26)
  • Bootstrap (30)
  • DBMS (42)
  • HTML (12)
  • HTML5 (45)
  • JavaScript (10)
  • Jquery (34)
  • Jquery UI (2)
  • JqueryUI (32)
  • Laravel (1017)
  • Laravel Tutorials (23)
  • Laravel-Question (6)
  • Magento (9)
  • Magento 2 (95)
  • MariaDB (1)
  • MySql Tutorial (2)
  • PHP-Interview-Questions (3)
  • Php Question (13)
  • Python (36)
  • RDBMS (13)
  • SQL Tutorial (79)
  • Vue.js Tutorial (68)
  • Wordpress (150)
  • Wordpress Theme (3)
  • codeigniter (108)
  • oops (4)
  • php (853)

Social Media Links

  • Follow on Twitter
  • Like on Facebook
  • Subscribe on Youtube
  • Follow on Instagram

Pages

  • Home
  • Contact Us
  • Privacy Policy
  • About us

Blog Archive

  • September (100)
  • August (50)
  • July (56)
  • June (46)
  • May (59)
  • April (50)
  • March (60)
  • February (42)
  • January (53)
  • December (58)
  • November (61)
  • October (39)
  • September (36)
  • August (36)
  • July (34)
  • June (34)
  • May (36)
  • April (29)
  • March (82)
  • February (1)
  • January (8)
  • December (14)
  • November (41)
  • October (13)
  • September (5)
  • August (48)
  • July (9)
  • June (6)
  • May (119)
  • April (259)
  • March (122)
  • February (368)
  • January (33)
  • October (2)
  • July (11)
  • June (29)
  • May (25)
  • April (168)
  • March (93)
  • February (60)
  • January (28)
  • December (195)
  • November (24)
  • October (40)
  • September (55)
  • August (6)
  • July (48)
  • May (2)
  • January (2)
  • July (6)
  • June (6)
  • February (17)
  • January (69)
  • December (122)
  • November (56)
  • October (92)
  • September (76)
  • August (6)

Loading...

Laravel News

Loading...

Copyright © CoderFunda | Powered by Blogger
Design by Coderfunda | Blogger Theme by Coderfunda | Distributed By Coderfunda