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

23 August, 2023

Best way to show small notifications to users

 Programing Coderfunda     August 23, 2023     No comments   

I know there is the whole Notifications logic in Laravel but I think it’s overkill for what I want to achieve: I’m looking for a package/some basic logic that allows me to show a small dismissable notification to users. For instance a one time modal like “new: you can now do X with Y [ ] Dont show this again” Should I use Database Notifications for this or is there a more elegant solution? submitted by /u/biinjo [link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

22 August, 2023

Append a child element to the custom web component in the constructor function

 Programing Coderfunda     August 22, 2023     No comments   

I have defined a custom element in JS. I wanna initialize it in its constructor for example append a template element as its child. but as you know, the browser throws an error that says: Failed to construct 'CustomElement': The result must not have children that means I can't append any child element to the custom element in its constructor. I know that it can be solved if I create a shadow DOM, and then append elements to it, but I don't wanna use shadow DOM in every part of my app; and one another option is to append elements to the custom element in the connectedCallback method, whereas it's invoked every time that the custom element mounts to the DOM, and I think it's not such cool actually. How can I fix that problem without using shadow DOM and connectedCallback method? thanks the custom component: class ProductItem extends HTMLElement { constructor() { super() this.appendChild(template.cloneNode(true)) } } customElements.define('product-item', ProductItem) const template = document.createElement('article') template.innerHTML = ` Add ` export { ProductItem }
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

21 August, 2023

SQL Query Error - Error Source: .Net SqlClient Data Provider

 Programing Coderfunda     August 21, 2023     No comments   

Error Message: The SELECT permissions was denied on the object 'quote', database 'oneview', schema 'dbo'. I am relatively new to SQL and the developer I am learning from is only part time and very hard to get a hold of unfortunately. Can anyone help me understand what is wrong with the Query below and suggest any fixes that might be needed? SELECT licenseEntitlement.entID, licenseEntitlement.entStartDate, licenseEntitlement.entEndDate, quote.quoteId, quote.accountId, quote.clientId, quote.clientName, quote.contactName, quote.contactEmail, quote.extReference, quote.purchaseOrderNumber, quote.linkedTicket FROM licenseEntitlement INNER JOIN quote ON quote.quoteId = SUBSTRING(licenseEntitlement.entComments, 12, PATINDEX('% Created%', licenseEntitlement.entComments) - 12) WHERE (licenseEntitlement.entType = 'AVS') AND (licenseEntitlement.entComments LIKE 'OV Order + %') AND (licenseEntitlement.entEndDate < '7/1/2014') ORDER BY licenseEntitlement.entEndDate
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

20 August, 2023

My react-native project brakes after installing react-native-image-picker but it works fine if i uninstall it

 Programing Coderfunda     August 20, 2023     No comments   

My React Native project brakes after installing react-native-image-picker but it works fine if I uninstall it. It brakes with this error message. import undefined.ImagePickerPackage; ^ C:\Users\uchen\Documents\My Company\Afriguest\frontend\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:8 6: error: cannot find symbol new ImagePickerPackage(), ^ symbol: class ImagePickerPackage location: class PackageList` I have tried manual linking even though its react-native v68 and it still didnt work. but the app runs well if I uninstall it.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

The token request was rejected by the remote server

 Programing Coderfunda     August 20, 2023     No comments   

error:invalid_granterror_description:The token request was rejected by the remote server.error_uri:
https://documentation.openiddict.com/errors/ID2147 I could not solve the error. can you help me?
https://github.com/openiddict/openiddict-samples/tree/dev/samples/Velusia I included the above example in my project. The above example works. but it doesn't work in my project I'm having a problem on the Authorization Server side. output : OpenIddict.Server.OpenIddictServerDispatcher: Information: The authorization response was successfully returned to '
https://localhost:5031/callback/login/local' using the query response mode: { "code": "[redacted]", "state": "pyjEcCmIurWYNUbVW6px20XAGcB3QLqMZZMlbuqvQFI", "iss": "
https://localhost:4001/" }. OpenIddict.Server.OpenIddictServerDispatcher: Information: The request URI matched a server endpoint: Token. OpenIddict.Server.OpenIddictServerDispatcher: Information: The token request was successfully extracted: { "grant_type": "authorization_code", "code": "[redacted]", "code_verifier": "HzyYo3QH9MTL4b63E7-R9z7-S9VIF8O3SOMSkMqNJR4", "redirect_uri": "
https://localhost:5031/callback/login/local", "client_id": "dkgshared", "client_secret": "[redacted]" }. OpenIddict.Server.OpenIddictServerDispatcher: Information: The response was successfully returned as a JSON document: { "error": "invalid_grant", "error_description": "The specified token is invalid.", "error_uri": "
https://documentation.openiddict.com/errors/ID2004" }.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

19 August, 2023

The instance of entity type '' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked

 Programing Coderfunda     August 19, 2023     No comments   

Hi I am using Abp Framework with .net 7 and I have this service that has one to many relationship in the dto of the entity i have list and when I send rquest from swagger to this sevice i get this error The instance of entity type 'B' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values. This is my model ` public class A: AuditedAggregateRoot { public required string Name { get; set; } public virtual ICollection Bs{ get; set; } = new List(); } public class TaxAddressIdentity : AuditedAggregateRoot { public required string Phone { get; set; } public required Guid AId { get; set; } public virtual A A { get; set; } } ` And this is my dto `public class CreateUpdateADto: EntityDto { public string Name { get; set; } public ICollection Bs{ get; set; } }` And this is the service `public interface IAAppService : ICrudAppService< ADto, Guid, AGetListInput, CreateUpdateADto, CreateUpdateADto> { } public class AAppService : CrudAppService, IAAppService { }` And this is the mapping i am using in side the file ProjectNameApplicationAutoMapperProfile CreateMap(); CreateMap(MemberList.Source); can you give me any hekp please? i try every thing but still git the same error
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

18 August, 2023

Search for Jobs on LaraJobs from Raycast

 Programing Coderfunda     August 18, 2023     No comments   

Search LaraJobs is a Raycast extension for searching open positions instantly and navigating to the job listing from your command launcher. The post Search for Jobs on LaraJobs from Raycast appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

17 August, 2023

Laravel transactions: Why and how to use them with real-life use cases

 Programing Coderfunda     August 17, 2023     No comments   


https://kodekrush.com/laravel-transactions-why-and-how-to-use-them-with-real-life-use-cases/ submitted by /u/DumitruCaldare [link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

16 August, 2023

Laravel Volt / Folio Beta 5 is out, now with named routes

 Programing Coderfunda     August 16, 2023     No comments   

Discover Laravel Folio's route naming and multiple Volt blade directives. The post Laravel Volt / Folio Beta 5 is out, now with named routes appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Shorten URLs in Your Laravel App with the Cuttly Package

 Programing Coderfunda     August 16, 2023     No comments   

Cuttly Service is a Laravel Package that provides a convenient wrapper to the Cuttly API, a URL shortener service. The post Shorten URLs in Your Laravel App with the Cuttly Package appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

15 August, 2023

Digging Into Livewire 3 Forms

 Programing Coderfunda     August 15, 2023     No comments   

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

14 August, 2023

The Laracon AU 2023 schedule is here

 Programing Coderfunda     August 14, 2023     No comments   

The schedule for the last Laracon of 2023 is here for your perusal and delight. The post The Laracon AU 2023 schedule is here appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

13 August, 2023

why getElementById It returns different every time in console

 Programing Coderfunda     August 13, 2023     No comments   

I'm new in js and i'm wondering why every time getELementById() returns different in console for example : index.html : The message script.js : let h1Elem = document.getElementById("header"); console.log(h1Elem); result in console for sometimes : The message and sometimes : h1#header accessKey : "" align : "" ariaAtomic : null ariaAutoComplete : null ariaBrailleLabel : null... By definition of W3School I expect getElementById() it to return an element with a specified value, but sometimes it doesn't
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

12 August, 2023

Convert Numbers to Words in Laravel with SpellNumber

 Programing Coderfunda     August 12, 2023     No comments   

SpellNumber is a package to convert words in Laravel easily using the PHP INTL extension. The post Convert Numbers to Words in Laravel with SpellNumber appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

11 August, 2023

dynamically open dropdown in vue

 Programing Coderfunda     August 11, 2023     No comments   

how do i open up a dynamically created dropdown using native vue and javascript? {{item}} under my methods i have tried these to no avail: openDropdown () { let el = this.$refs.dropdown; // this doesnt work el.click(); // this doesnt work el.setAttribute('visible', true); // this also doesnt work el.style.show = true; } any tips or tricks would be helpful, thanks! This has to use native Vue. i understand JavaScript wont suffice on its own, but there has to be a way that Vue is able to do this. And i cannot use jQuery
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

10 August, 2023

Bolt is a Laravel Form Builder for the TALL Stack

 Programing Coderfunda     August 10, 2023     No comments   

Bolt is a Laravel form builder for your users, made with Filament and the TALL stack. It enables your users to create custom forms with many configuration options. The post Bolt is a Laravel Form Builder for the TALL Stack appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

09 August, 2023

Infrastructure management for several high-traffic PHP applications

 Programing Coderfunda     August 09, 2023     No comments   

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

08 August, 2023

Can we implement tap and pay with NFC in apple without using Apple Pay?

 Programing Coderfunda     August 08, 2023     No comments   

I want to implement tap and pay with an IOS device...But couldn't-find any good resources for doing this... There is plenty of resources for Android but not for IOS. If there are any resources, please share it over here. I really appreciate it. Thanks
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

07 August, 2023

Weekly /r/Laravel Help Thread

 Programing Coderfunda     August 07, 2023     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

Companies using graphql & laravel?

 Programing Coderfunda     August 07, 2023     No comments   

Hey there, I’m wondering if you know of any companies (or are part of one) using graphql with laravel at scale. I’m basically looking for people to discuss common problems and solutions in that kind of set up. Both backend and frontend. (I’m at a startup called Worksome, where we use graphql—via lighthouse— laravel and vue) Cheers submitted by /u/dimgshoe [link] [comments]
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

06 August, 2023

Python: Finding the Number of Items in Combinations of Categories

 Programing Coderfunda     August 06, 2023     No comments   

Using Python, reading data from an xml file, I am trying to find how many items exist in different combinations of "usage" cagegories. 30 20 20 What I'd like Python to do is go through the XML, extract all the usage names and generate all the different combinations of possibilities, but it's not the XML I am having trouble with, it's the Python. Some usage categories, may not be in the same order. They might be [office, school, town] instead of [town, office school]. They might contain other words, too, like military, police, village, etc. I can get Python to build me a list of all the possible usage names, but I can't figure out how to build a list of all the combinations of usage names. Each would be and example of a list or a list within a list: [Hunting, Coast] [Coast, Hunting, Village] [Industrial, Farm] [Village, Farm, Town, Hunting] This gets the usage categories, but I don't know how to put them in a unique list and ensure they aren't duplicated. import xml.etree.ElementTree as ET types = ET.parse('types.xml') rootTypes = types.getroot() useList = [] for itemTypes in types.findall('./type'): for usage in itemTypes.findall("usage"): use = (usage.get("name")) if use in useList: continue else: useList.append(usage.get("name"))
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

05 August, 2023

Diana Scharf's "Inertia.js" talk from Laracon

 Programing Coderfunda     August 05, 2023     No comments   

Watch Diana Scharf's "Inertia.js" talk to gain a deep understanding of using Inertia.js to create modern, single-page applications with a familiar Laravel development experience. The post Diana Scharf's "Inertia.js" talk from Laracon appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

04 August, 2023

How to search all the amazon connect customer profiles using API?

 Programing Coderfunda     August 04, 2023     No comments   

everyone. I am struggling with searching all the amazon connect customer profiles at once by using rest API. I already know the API that retrieve one or more than two customer profiles via specific key name such as profile ID or account ID etc. However not list all customer profiles. Here's my javascript code for searching one profile. session.profileClient.searchProfiles({ "DomainName": "", // required "KeyName": searchKey, // required "Values": [searchValue] // required }).then((res) => { console.log('Success response: ' + JSON.stringify(res)); }).catch((errorResp) => { console.log('Error response: ' + JSON.stringify(errorResp)); }); In this code, I have to put 3 parameters(domainName, keyName, value) and get one or two more results but all the results. Any help in the right direction on how to list all Amazon Connect Customer Profile would be greatly appreciated. I hope to get all the amazon connect customer profile list. I hope to get all the amazon connect customer profile list.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

03 August, 2023

Laravel Prompts is Now Available in Laravel 10.17

 Programing Coderfunda     August 03, 2023     No comments   

The Laravel team released v10.17 with Laravel Prompts, a config:show Artisan command, a Collection method to ensure types and more. The post Laravel Prompts is Now Available in Laravel 10.17 appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox. ---
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

02 August, 2023

Scramble 0.8.0 – Update of Laravel Open API documentation generator

 Programing Coderfunda     August 02, 2023     No comments   

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

01 August, 2023

Facing overflow issue with react slick

 Programing Coderfunda     August 01, 2023     No comments   

I am using react slick for slider and that slider cards contain dropdown that have lot of options. When the dropdown is open half of the dropdown is cropped not able to view the full dropdown code pen: https://codepen.io/gtm18/pen/YzRdaML (demo with jQuery) $(document).ready(function(){ $('.carousel').slick({ slidesToShow: 3, dots:true, centerMode: true, }); });
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

31 July, 2023

How do you get a double-column unique key as foreign key?

 Programing Coderfunda     July 31, 2023     No comments   

I have the following two tables in MariaDB 11.0.2: CREATE TABLE `Languages` ( `Name` char(49) DEFAULT NULL, `ISO_639_1` char(2) NOT NULL, `Language_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Main_Flag` varchar(20) DEFAULT NULL, PRIMARY KEY (`Language_ID`), UNIQUE KEY `Languages_UN` (`ISO_369_1`,`Main_Flag`) ) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; and CREATE TABLE `Tests` ( `Test_ID` int(11) unsigned NOT NULL AUTO_INCREMENT, `Test_Name` varchar(50) DEFAULT NULL, `ISO_639_1` char(2) NOT NULL, `Main_Flag` varchar(20) DEFAULT NULL, PRIMARY KEY (`Test_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; but I cannot assign the double column unique-key to their counterparts: MariaDB [my_db]> ALTER TABLE Tests ADD CONSTRAINT Test_Language_FK FOREIGN KEY (ISO_639_1, Main_Flag) REFERENCES Languages(ISO_639_1, Main_Flag); ERROR 1005 (HY000): Can't create table `my_db`.`Tests` (errno: 150 "Foreign key constraint is incorrectly formed") There are no anomalies in the index of the Test table: MariaDB [my_db]> show index from Tests; +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored | +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Tests | 0 | PRIMARY | 1 | Test_ID | A | 37 | NULL | NULL | | BTREE | | | NO | +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ 1 row in set (0,001 sec) What is holding me back? The data types are the same and the collation and charsets are also a match.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Compare rows from the Sqlserver table with the indexes generated in the Array

 Programing Coderfunda     July 31, 2023     No comments   

I have a single TBResult table in Sql Server 2014, with 2,500 saved Results per Contest Number, following format: private Label[] LabelResult = new Label[15]; // dynamically created I need to compare each new draw generated in the [LabelResult] array with the database records and know the number of hits I would have with 11 numbers, how many hits with 12 numbers, how many hits with 13 numbers, how many hits with 14 numbers and how many hits there would be with 15 numbers. like a lottery where you choose 15 numbers from 01 to 25 and win the prize according to the number of numbers you hit. OBSERVATION: the Numbers entered in the array will not be saved in the Database, I only need the comparison with the Results Table. I need it to appear like this in the EX Labels: Summary: You would have scored 11 hits in 250 contests. You would have scored 12 hits in 55 contests. You would have scored 13 hits in 6 contests. You would have made 14 hits in 1 contest. You wouldn't have done 15 hits. try this way but got no results private int NewCount() { ContestResult c = new ContestResult(); int response= 0; DALConexao cx = new DALConexao(DadosDaConexao.StringDaConexao); cx.Open(); StringBuilder query = new StringBuilder(); query.AppendLine("SELECT _01, _02, _03, _04, _05, _06, _07, _08, _09, _10, _11, _12, _13, _14, _15 form TBResult," ); query.AppendLine("SELECT value FROM " + LabelResult [0].Text + LabelResult [3].Text + LabelResult [2].Text + LabelResult [4].Text + LabelResult [4].Text + LabelResult [5].Text + LabelResult [6].Text + LabelResult [7].Text + LabelResult [8].Text + LabelResult [9].Text + LabelResult [10].Text + LabelResult [11].Text + LabelResult [12].Text + LabelResult [13].Text + LabelResult [14].Text ); query.AppendLine(" WITH T AS( SELECT *, MatchCount = (SELECT COUNT(*) FROM(SELECT * FROM(VALUES[_01],[_02], [_03], [_04], [_05],[_06], [_07], [_08], [_09], [_10],[_11], [_12], [_13], [_14], [_15]"); query.AppendLine(")V(V)) T) FROM TBResult) SELECT *, RunningTotalForMatchCount = ROW_NUMBER() OVER(PARTITION BY MatchCount ORDER BY Contest) FROM T ORDER BY Contest"); SqlCommand cmd = new SqlCommand(query.ToString(), cx.ObjetConexao); cmd.CommandType = System.Data.CommandType.Text; response= = cmd.ExecuteNonQuery(); cmd.Connection = cx.ObjetConexao; return response; } my Class Generate randoms in order and not repeated. private void ShowArray() { int[] OrganizedNumbers = new int[15]; Array.Sort(OrganizedNumbers); for (int i = 0; y < 15; i++) { LabelResult[i].Text = OrganizedNumbers[i].ToString("D2"); } } private void Generator() { RandomClass rnd = new RandomClass(); int[] luckyNumbers = rnd.non-repeatingGenerator(15, 1, 25); Array.Sort(luckyNumbers ); Control[] controls = LabelResult for (int i = 0; i < controls.Length; i++) { int value = (luckyNumbers [i]; controls[i].Text = value.ToString("D2"); } }` my button would be like this private void btnGenerateArray_Click(object sender, EventArgs e) { ShowArray(); //int operationsPerformed = NewCount(); //if operationsPerformed == 11) //{ // lblResult11.Text = operationsPerformed.ToString(); //} //else if operationsPerformed == 12) //{ // lblResult12.Text = operationsPerformed.ToString(); //} //else if operationsPerformed == 13) //{ // lblResult13.Text = operationsPerformed.ToString(); //} //else if operationsPerformed == 14) //{ // lblResult14.Text = operationsPerformed.ToString(); //} //else if operationsPerformed == 15) //{ // lblResult15.Text = operationsPerformed.ToString(); //} } My model is like this: public class ContestResult { public ContestResult() { this.Contest = 0; this._01 = 0; this._02 = 0; this._03 = 0; ... this._14 = 0; this._15 = 0; } public ContestResult(int Contest, int _01, int _02, int _03, int _04, int _05, int _06, int _07, int _08, int _09, int _10, int _11, int _12, int _13, int _14, int _15) { this.Contest = contest; this._01 = _01; this._02 = _02; this._03 = _03; ... this._14 = _14; this._15 = _15; } private int contest; public int Contest { get { return this.contest; } set { this.contest = value; } } private int _01; public int n_01 { get { return this._01; } set { this._01 = value; } } private int _02; public int n_02 { get { return this._02; } set { this._02 = value; } } private int _03; public int n_03 { get { return this._03; } set { this._03 = value; } } ... private int _14; public int n_14 { get { return this._14; } set { this._14 = value; } } private int _15; public int n_15 { get { return this._15; } set { this._15 = value; } } } I'm new to this topic and I want to learn; I researched a lot and I didn't find something that answers my question.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

30 July, 2023

Authentication not granted for service principal token in MS Fabric API using Python

 Programing Coderfunda     July 30, 2023     No comments   

I am trying to connect to OneLake API in Microsoft Fabric using Python in VScode. So far I have * Registered an app in Azure with these API permissions * Then created a secret for my service principal * Then I try to get the token with this function, using azure.identity: from azure.identity import ClientSecretCredential, AuthenticationRequiredError def get_access_token(app_id, client_secret, directory_id): try: # Create the ClientSecretCredential using the provided credentials credential = ClientSecretCredential( client_id=app_id, client_secret=client_secret, tenant_id=directory_id #scope="https://storage.azure.com/.default" ) # Use the credential to get the access token token = credential.get_token("https://storage.azure.com/.default").token return token, credential except AuthenticationRequiredError as e: print("Authentication failed. Please check your credentials.") raise e except Exception as e: print("An error occurred while getting the access token:") print(str(e)) raise e access_token, credential = get_access_token(app_id, client_secret, directory_id) It seems I get the token fine and all. But there is something wrong with the permissions or scope or access. Because when I run this function to check for connection i get status code 400 def check_connection_with_onelake(access_token): base_url = "https://onelake.dfs.fabric.microsoft.com/9c3ffd43-b537-4ca2-b9ba-0c59d0094033/Files/sample?resource=file" token_headers = { "Authorization": "Bearer " + access_token } try: response = requests.put(base_url, headers=token_headers) if response.status_code == 200: print("Connection with OneLake is successful.") else: print("Failed to connect with OneLake. Status code:", response.status_code) except requests.exceptions.RequestException as e: print("An error occurred while checking the connection:", str(e)) # Assuming 'access_token' is already defined and contains a valid access token check_connection_with_onelake(access_token) * I also added the app's service principal to users in the Fabric workspace as an admin Where am I missing access and how do I grant the correct access? references: https://learn.microsoft.com/en-us/fabric/onelake/onelake-access-api https://amitchandak.medium.com/on-premise-python-code-to-local-sql-server-data-to-microsoft-fabric-lakehouse-using-token-d15b8795e349
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

29 July, 2023

Android - get imageView XY coordinates

 Programing Coderfunda     July 29, 2023     No comments   

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
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...
  • Features CodeIgniter
    Features CodeIgniter There is a great demand for the CodeIgniter framework in PHP developers because of its features and multiple advan...
  • Laravel Breeze with PrimeVue v4
    This is an follow up to my previous post about a "starter kit" I created with Laravel and PrimeVue components. The project has b...
  • 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...
  • Fast Excel Package for Laravel
      Fast Excel is a Laravel package for importing and exporting spreadsheets. It provides an elegant wrapper around Spout —a PHP package to ...

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