RESTful - CodeIgniter 3.1.5 - Fatal Error, Call to undefined function factory - function

I'm trying to make "RESTful" using CodeIgniter 3.1.5 and libraries https://github.com/chriskacerguis/codeigniter-restserver
I get this error:
Fatal error: Call to undefined factory function () in D:\AppServ\www\restful\application\libraries\REST_Controller.php on line 857
A PHP Error was encountered
Severity: Error
Message: Call to undefined function factory ()
Filename: libraries/REST_Controller.php
Line Number: 857
Backtrace:
(Not my code, but it is example from codeigniter-restserver)

enter in line 61 of autoload.php
$autoload['libraries'] = array('database','Format');
I solved it that way.

Related

Receiving "invalid or does not take any parameters" when attempting to deploy a contract

here is my 2_deploy_contract.js syntax
const DerbyToken = artifacts.require("./DerbyToken.sol");
module.exports = function(deployer) {
// Deploy the Migrations contract as our only task
deployer.deploy(DerbyToken);
};
after I migrate the file using truffle I receive this error message
Error: Migration /home/cyraidz/token_sale/migrations/2_deploy_contracts.js invalid or does not take any parameters
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:55:1)
at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.3.5 (core: 5.3.5)
Node v10.19.0
Add a newline at the end of "2_deploy_contract.js"

undefined reference to symbol '_ZN12QSqlDatabase11setHostNameERK7QString'

My program has a basic function for adding datas to database but when the code gives an error when it is compiled.
void MainWindow::AddLocationToDatabase()
{
QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("localhost");
db.setUserName("root");
db.setPassword("*******");
db.setDatabaseName("databasename");
db.setPort(1111);
if(db.open()){
qDebug()<<"connected";
}
}
/usr/bin/ld: build/debug/mainwindow.o: undefined reference to symbol '_ZN12QSqlDatabase11setHostNameERK7QString'
/usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sub-pcapprogram-make_first-ordered] Error 2
06:57:04: The process "/usr/bin/make" exited with code 2.
When executing step "Make"
When I added "QT += sql", there was no error.

Gulp TypeError: Path must be a string. Received undefined

I want to run build command but got the error message:
TypeError: Path must be a string. Received undefined.
Do you guys have any ideas? Thanks.
gulp.task('build', function () {
browserify("./src/components/source.js")
.transform("babelify", {presets: ["es2015", "react"]})
.bundle()
.pipe(gulp.dest(path.resolve(__dirname, './src/app.js')));
});
Below is the tracestack details:
TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at DestroyableTransform.saveFile [as _transform] (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js:36:26)
at DestroyableTransform.Transform._read (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (/Users/yzzhou/Documents/ReleasePlanner/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)

Gradle error with Android-studio and googleMap api

I created a simple project to test Google Api under android studio , but I have this error I tried to correct it by adding maps.jar to librairies of project structure no way :
Information:Compilation completed with 12 errors and 0 warnings in 17 sec
Information:12 errors
Information:0 warnings
/home/phenix-dz/AndroidStudioProjects/Geolocalisation/Geolocalisation/src/main/java/com/example/geolocalisation/MainActivity.java
Error:Error:line (4)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (5)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (6)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (9)Gradle: error: cannot find symbol class MapActivity
Error:Error:line (11)Gradle: error: cannot find symbol class MapView
Error:Error:line (12)Gradle: error: cannot find symbol class MapController
Error:Error:line (16)Gradle: error: cannot find symbol variable super
Error:Error:line (17)Gradle: error: cannot find symbol method setContentView(int)
Error:Error:line (19)Gradle: error: cannot find symbol class MapView
Error:Error:line (19)Gradle: error: cannot find symbol method findViewById(int)
Error:Error:line (14)Gradle: error: method does not override or implement a method from a supertype
Error:Error:line (25)Gradle: error: method does not override or implement a method from a supertype
also I tried to add this code :
apply plugin: "java"
dependencies {
compile files('/home/phenix-dz/android-studio/sdk/add-ons/google_apis-671458-mac-x86/libs/maps.jar')
}
in build.gradle file but it gives me a same error.
Thanks

webkitAudioContext undefined in safari browser

I trying in console (chrome) webkitAudioContext and it's defined (function with native code).
webkitAudioContext
function AudioContext() { [native code] }
In safari (5.1.6) it's returns 'message: "Can't find variable: AudioContext"'.
AudioContext
Error
line: 2
message: "Can't find variable: AudioContext"
sourceId: 4569334656
__proto__: Error
webkitAudioContext
Error
line: 2
message: "Can't find variable: webkitAudioContext"
sourceId: 4647161912
__proto__: Error
Can I use webkitAudioContext in safari?
Thanks!
EDIT:
var context = new webkitAudioContext();
Error
line: 2
message: "Can't find variable: webkitAudioContext"
sourceId: 4603762264
__proto__: Error
No you cannot: http://caniuse.com/audio-api
It's only supported in Safari 6.0+.
Yes you can use it. Try invoking it with a new keyword and include the parenthesis after it.
var context = new webkitAudioContext();