Hi all, Im starting to use composer, and have installed a few packages - This thread is about illuminate/database component. Im clearly misunderstanding something about how i can use the autoloader. I have the following directory structure: -app -assets -vendor index.php [Request goes to index.php] - This file includes composers autoloader (psr-4) composer.json composer.lock Inside -app, I have this structure: -app --controllers --models --views --framework ---core ----config ----database [containing database.php] So, in the index.php file i first include the autoloader, then I require('app/framework/core/database/database.php') In database.php I have this use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; $capsule->addConnection([ 'driver' => 'mysql', …

Member Avatar
Member Avatar
+0 forum 1

So the code is this but I can't figure out the problem. I included the error alongside with it. using System; public class SavingAccount { public static decimal interestRate = 0.02M; public string Name { get; set; } public decimal Balance { get; set; } public SavingAccount(string n) { Name = n; } public SavingAccount(string n, decimal b) { Name = n; Balance = b; } public void DisplayInfo() { Console.WriteLine("Account name: {0}\nAccount balance: {1}\nInterest Rate: {2}", Name, Balance, interestRate); } } public class Testing { public static void Main(string[] args) { SavingAccount acct1 = new SavingAccount("Peter Chen"); SavingAccount acct2 …

Member Avatar
Member Avatar
+0 forum 4

This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated The project ask for to validate ISBN 10 Number. There would be 10 digits with 1-9 being Numbers, but Number 10 is an x. This is What I have so far: This is the input page or html page: <form method="POST" action="Process10ISBN.php"> <p>Enter the ISBN 10: <input type="text" name="isbn10" /></p> <input type="submit" name="Submit" value="Submit" /> </form> This is what I have so far for the Procssing page to validate ISBN 10: <?php if …

Member Avatar
Member Avatar
+0 forum 1

Don’t know if this is ever been done before, or even if it is a good way to do it. I’ll just await your comments if any. What I mostly found on the web is that if you want to define a polynomial you need to have an array containing the coefficients. The place of the coefficient in the array determines the power of the unknown, you have to include a 0(zero) in the array for the powers that are not in your polynomial. So I tried to do it using a list of tuples, with one element containing the …

Member Avatar
+0 forum 0

Hi, I'M using the simple grid theme and I want to add a LinkedIn social media button on the top right that linkS to my LinkedIn profile. Most of the other main networks are built in to the theme So that you only have to add a link to your profile, but LinkedIn isn't included. I actually managed to figure out how to add The LinkedIn field to the theme. The only problem is I cant get the LinkedIn image icon to display. There is a broken iage displaying and this is even linking to my LinkedIn profile. I just …

Member Avatar
Member Avatar
+0 forum 1

I've got a file that includes various php files with a rewrite framework. I'm importing a class and registering it, and it functions for all code on that page. However when I try to require() a file, it does not seem to have access to the class. require __DIR__.'/lib/UserApp/Autoloader.php'; // Include UserApp Library require __DIR__.'/lib/UserAppWidget/Autoloader.php'; // Include UserApp Widget, friendly-ifying API UserApp\Autoloader::register(); UserApp\Widget\Autoloader::register(); use \UserApp\Widget\User; User::setAppId("XXXXXX"); ... // Post for login $router->post('/login', function() { if(!User::authenticated()){ require('db_handlers/login.php'); }else{ header("Location: dashboard"); } }); The code to check if the user is logged in correctly works, but the included file references the same …

Member Avatar
Member Avatar
+0 forum 2

Hello! I have a friend that is really interested in programming, I'm going to try to teach him this summer. I'm posting this to begin a discussion on how I think I'm going to acheive this so he has the best understanding of everything down the line. The title of this is a metaphor, bottom rung of the ladder being low level computer stuff, top rung being high level/scripting languages. Most times when I see someone self taught or learning, they start or started with a high level language, like Python, Some form of BASIC, or PHP. I find this …

Member Avatar
Member Avatar
+1 forum 18

Is this code correct? function gotoPage(id) { ("html, body").animate({ scrollTop: $("."+id).offset().top }, 2000); } What I am trying to do is. That I created DIVs, with 100% of height, they have certain classes `.`. I included jQuery, and I wanted to click on anchor and scroll to that certain page. `<a href="#" onClick="gotoPage(id that I want scroll to)">Lipsum</a>` Does it work? Nope. What's wrong with it?

Member Avatar
Member Avatar
+0 forum 1

Error 6 error C2143: syntax error : missing ';' before ')' c:\users\datacompress.cpp 214 1 Error 8 error C2039: 'putSymbol' : is not a member of 'std::basic_ofstream<_Elem,_Traits>' c:\users\datacompress.cpp 291 1 Error 9 IntelliSense: class "std::basic_ofstream<char, std::char_traits<char>>" has no member "putSymbol" c:\users\datacompress.cpp 291 12 #include <fstream> #include <string> #include <iostream> #include <ostream> using namespace std; ifstream infile ("File.txt", ios::in | ios::binary); ofstream outfile("Fileoutput.txt", ios::out|ios::binary); int freq; unsigned char symbol; char leftLeaf; char rightLeaf; void hufftree(); int compare; int* lptr; int* rptr; char root; void putSymbol(char * code); void putBit(); class NODE { friend class TREE; private: int freq; int symbol; char * …

Member Avatar
Member Avatar
+0 forum 7

The End.