ReferenceError: C:\Users\ANURAG YADAV\Desktop\todolist-v1\views\list.ejs:8
6| </head>
7| <body>
>> 8| <% if(kindofday === saturday) { %>
9| <h1 style="color: blue"><%= kindofday %> todolist</h1>
10|
11| <% } else { %>
saturday is not defined
at eval (eval at compile (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\ejs\lib\ejs.js:662:12), <anonymous>:10:25)
at list (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\ejs\lib\ejs.js:692:17)
at tryHandleCache (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\ejs\lib\ejs.js:272:36)
at View.exports.renderFile [as engine] (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\ejs\lib\ejs.js:489:10)
at View.render (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\express\lib\response.js:1012:7)
at C:\Users\ANURAG YADAV\Desktop\todolist-v1\app.js:36:5
at Layer.handle [as handle_request] (C:\Users\ANURAG YADAV\Desktop\todolist-v1\node_modules\express\lib\router\layer.js:95:5)
Related
Uncaught TypeError: Cannot convert undefined or null to object
<MapContainer center={position} zoom={13} scrollWheelZoom={false}>
<TileLayer
attribution='© OpenStreetMap contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={position}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer>
from leaflet-src.js:144
I am trying to render the map from the example given in https://react-leaflet.js.org/docs/example-popup-marker/ site but getting this error.
I am using Morris bar chart, I want to show bar:
This my Controller :
public function detail_grafik()
{
$row = $this->Tb_grafik_model->get_data()->result();
$iklan = $this->Tb_iklan_model->get_all();
$berita = $this->Tb_berita_model->get_all();
($row) {
$data = array(
'row' => json_encode($row),
'iklan' => $iklan,
'berita' => $berita,
'content' =>"frontend/detail_grafik"
);
$this->load->view('layout/frontend', $data);
} else {
$this->session->set_flashdata('message', 'Record Not Found');
redirect(site_url('frontend'));
}
}
This my view:
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/vendor/morris/morris.css">
<div style="width: 500px;height: 500px">
<canvas id="grafik"></canvas>
</div>
<script type="text/javascript" src="<?=base_url()?>assets/vendor/jQuery/jQuery.min.js"></script>
<script type="text/javascript" src="<?=base_url()?>assets/vendor/raphael/raphael-min.js"></script>
<script type="text/javascript" src="<?=base_url()?>assets/vendor/morris/morris.min.js"></script>
<script>
Morris.Bar({
element: 'grafik',
data: <?php echo $data;?>,
xkey: 'kd_spbu',
ykeys: ['kd_spbu', 'desa', 'nama_persahaan', 'alamat', 'pemilik', 'jumlah_nozzle'],
labels: ['kd_spbu', 'desa', 'nama_persahaan', 'alamat', 'pemilik', 'jumlah_nozzle']
});
</script>
</section>
</body>
</html>
This my eror :
raphael-min.js:10 Error: attribute width: Expected length, "Infinity"
can't show bar. help me..
Your xkey (kd_spbu) is also in ykeys. You need to remove it from from the ykeys.
Also none of the xkeys / ykeys are defined in your PHP code.
I am making a repeatable card that has several text variables but also two variable icons that are SVGs. I want to make the SVG icons variables within the macro but i get a Gulp error
events.js:183
throw er; // Unhandled 'error' event
^ Template render error: (unknown path) Template render error: (C:...\frontend\dev\templates\partials\modules_activity-overview.njk)
Error: template not found: {{ icon }}
I can use includes in the macro just fine but i can't seem to make the value of the include a variable.
My macro looks like this:
{% macro activityCard(icon='partials/svg/alarm.svg', name, atime, type, event, message) %}
<div class="activity-tile">
<div class="activity-tile__icon">{% include " {{ icon }} " %}</div>
<div>
<h2>{{ name }}</h2>
<time>{{ atime }}</time>
<div class="activity-tile__details">
<span><em>Type</em>{{ type }}</span>
<span><em>Event</em>{{ event }}</span>
</div>
<div class="activity-tile__weather">
<i>{% include "partials/svg/weather.svg" %}</i>
<span>{{ message }}</span>
</div>
</div>
</div>
{% endmacro %}
And i am calling it in my page like this:
{% import 'macros/activity-card-macro.njk' as acard %}
{{ acard.activityCard('partials/svg/alarm.svg', 'Main Office', '12/18/2017 11:58 PM EST', 'Missing open', 'Opened late', '') }}
What is the proper syntax to make an variable in an include in a macro?
Thanks.
I've just installed the accounts-google and accounts-ui packages and I'm getting the error:
W20150525-10:41:42.384(1)? (STDERR)
W20150525-10:41:42.384(1)? (STDERR) /home/andy/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20150525-10:41:42.384(1)? (STDERR) throw(ex);
W20150525-10:41:42.384(1)? (STDERR) ^
W20150525-10:41:42.449(1)? (STDERR) Error: A method named '/users/insert' is already defined
W20150525-10:41:42.449(1)? (STDERR) at packages/ddp/livedata_server.js:1461:1
W20150525-10:41:42.449(1)? (STDERR) at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
W20150525-10:41:42.449(1)? (STDERR) at [object Object]._.extend.methods (packages/ddp/livedata_server.js:1459:1)
W20150525-10:41:42.449(1)? (STDERR) at [object Object].Mongo.Collection._defineMutationMethods (packages/mongo/collection.js:904:1)
W20150525-10:41:42.449(1)? (STDERR) at new Mongo.Collection (packages/mongo/collection.js:209:1)
W20150525-10:41:42.449(1)? (STDERR) at app/meteor.js:1:44
W20150525-10:41:42.449(1)? (STDERR) at app/meteor.js:16:3
W20150525-10:41:42.450(1)? (STDERR) at /home/andy/dev/meteor/.meteor/local/build/programs/server/boot.js:222:10
W20150525-10:41:42.450(1)? (STDERR) at Array.forEach (native)
W20150525-10:41:42.450(1)? (STDERR) at Function._.each._.forEach (/home/andy/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
=> Exited with code: 8
My code is currently very simple (very new to this!). Here's meteor.html:
<head>
<title>Hubbub</title>
</head>
<body style="padding-top: 100px;">
<div class="container">
<div class="row">
<div class="col-xs-12">
{{> loginButtons}}
{{> main }}
</div>
</div>
</div>
</body>
<template name="main">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>age</th>
<th>date</th>
</tr>
</thead>
<tbody>
{{#each users}}
<tr>
<td>{{_id}}</td>
<td>{{name}}</td>
<td>{{age}}</td>
<td>{{date}}</td>
</tr>
{{/each}}
</tbody>
</table>
</template>
and meteor.js:
Users = new Mongo.Collection('users');
if (Meteor.isClient) {
Template.main.helpers({
users: function() {
return Users.find();
},
date: function(){
return moment(this.date).fromNow();
}
});
}
What am I doing wrong here?
Maybe your code is clashing with Meteor default users collection.
You don't need to define a Mongo.Collection to deal with your app users, Meteor comes with its own baked in collection named Meteor.users, use this instead, or rename your collection to something else.
Hello i want to return a multiple row from a function but i have this persistant error anybody can give me a hand, thanks!!
Here is the error code:
ERROR: invalid input syntax for integer: "<html><HEAD id='header' father='*html'>
<title id="ttl" father="*head">KarinApp(Karina Application Web Maker)</title>
<link id="favIcon" href="http://www.karinapp.com/favicon.ico" rel="SHORTCUT ICON" />
<link id="jQueryUI" type="text/css" href="http://www.karinapp.com/modules/general/css/karinapp-style/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
<link id="general_css" father="*head" rel="stylesheet" type="text/css" href="http://www.karinapp.com/modules/appgen/css/main.css" />
<script id='SCRIPT1' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/jQuery.js" father="*head"><!--empty--></script>
<script id='SCRIPT2' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.core.js"><!--empty--></script>
<script id='SCRIPT3' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.widget.js"><!--empty--></script>
<script id='SCRIPT4' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.mouse.js"><!--empty--></script>
<script id='SCRIPT5' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.draggable.js"><!--empty--></script>
<script id='SCRIPT6' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.droppable.js"><!--empty--></script>
<script id='SCRIPT8' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.position.js"><!--empty--></script>
<script id='SCRIPT9' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.resizable.js">\n<!--empty--></script>
<script id='SCRIPT10' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.dialog.js"><!--empty--></script>
<script id='SCRIPT12' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.button.js"><!--empty--></script>
<script id='SCRIPT12' type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/ui/jquery.ui.autocomplete.js"><!--empty--></script>
<script id='SCRIPT13' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/general.js"><!--empty--></script>
<script id='SCRIPT14' type="text/javascript" father="*head" src="http://www.karinapp.com/modules/general/scripts/Catcher.js"><!--empty--></script>
<script id='SCRIPT15' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/loadPage.js"><!--empty--></script>
<SCRIPT id="accordionScr" father="*head" type="text/javascript" src="/modules/general/scripts/ui/jquery.ui.accordion.js"><!--empty--></SCRIPT>
<script id='SCRIPT16' language="javascript" type="text/javascript" src="http://www.karinapp.com/modules/general/scripts/editor/edit_area_full.js"><!--empty--></script>
<script id='SCRIPT17' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/appgen/scripts/main.js"><!--empty--></script>
<script id='SCRIPT18' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/appgen/scripts/config.js"><!--empty--></script>
<script id='SCRIPT19' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/appgen/scripts/style.js"><!--empty--></script>
<script id='HandleScr' father="*head" type="text/javascript" src="/modules/appgen/scripts/handle.js"><!--empty--></script>
<script id='SCRIPT20' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/appgen/scripts/scripts.js"><!--empty--></script>
<script id='SCRIPT21' father="*head" type="text/javascript" src="http://www.karinapp.com/modules/appgen/scripts/properties.js"><!--empty--></script>
<script id='SCRIPT22' type="text/javascript">
window.onload = function(){
postLoad();
}
function __init__(){
main();
}
</script>
<SCRIPT father='*head' id="batuteJS" type="text/javascript" src="/modules/appgen/scripts/batute.js"><!--empty--></SCRIPT>
</HEAD>
<BODY id="general_bod">
<DIV id="body" father="*html"><!--empty--></DIV>
<DIV id="confPg" father="*body">
<LABEL id="radio0_lab" father="confPg">
<INPUT type="radio" id="radio0" father="radio0_lab" name="cnfpg" value="save"/>Modificar pagina</LABEL><BR/>
<LABEL id="radio1_lab" father="confPg">
<INPUT type="radio" id="radio1" father="radio1_lab" name="cnfpg" value="add2pg"/>Salvar pagina como</LABEL>
</DIV></BODY></html>"
CONTEXT: PL/pgSQL function "mdlreg" line 66 at SQL statement
In statement:
SELECT * FROM mdlreg('appgen', 'karinapp.com', 'dev', '186.120.130.244')
Here is the function.
DECLARE regmoment TIMESTAMP;
DECLARE mdlid bigint;
DECLARE regid visitsmdl_reg%ROWTYPE;
DECLARE mdlcode pages_reg%ROWTYPE;
DECLARE mdNm modules_reg%ROWTYPE;
BEGIN
regmoment = CURRENT_TIMESTAMP;
SELECT modules_reg.id INTO mdlid
FROM domain_reg, sbdomain_reg,
modules_reg, sbdomdl_asc
WHERE(modules_reg.mdname = $1 AND
sbdomdl_asc.module = modules_reg.id AND
sbdomdl_asc.domain = sbdomain_reg.id AND
sbdomain_reg.domain = domain_reg.id AND
domain_reg.dname = $2 AND
sbdomain_reg.sbname = $3);
IF mdlid IS NULL THEN
SELECT modules_reg.id INTO mdlid
FROM domain_reg, sbdomain_reg,
modules_reg, sbdomdl_asc
WHERE(modules_reg.indexmdl = 't' AND
sbdomdl_asc.module = modules_reg.id AND
sbdomdl_asc.domain = sbdomain_reg.id AND
sbdomain_reg.domain = domain_reg.id AND
domain_reg.dname = $2 AND
sbdomain_reg.sbname = $3);
IF mdlid IS NULL OR mdlname != 'index' THEN
INSERT INTO visitsmdl_reg (module, regtime, machaddr) VALUES(3, regmoment, $4);
SELECT visitsmdl_reg.id, pages_reg.code
INTO regid, mdlcode
FROM modules_reg, visitsmdl_reg, pages_reg
WHERE(visitsmdl_reg.regtime = regmoment
AND modules_reg.id = 3
AND modules_reg.id = pages_reg.mdl);
RETURN (regid || mdlcode);
ELSE
INSERT INTO visitsmdl_reg (module, regtime, machaddr) VALUES(mdlid, regmoment, $4);
SELECT visitsmdl_reg.id, pages_reg.code, modules_reg.mdname
INTO regid, mdlcode, mdNm
FROM modules_reg, visitsmdl_reg, pages_reg
WHERE(visitsmdl_reg.regtime = regmoment
AND visitsmdl_reg.module = mdlid
AND modules_reg.id = mdlid
AND pages_reg.mdl = mdlid);
RETURN (regid || mdlcode || mdNm);
END IF;
ELSE
INSERT INTO visitsmdl_reg (module, regtime, machaddr) VALUES(mdlid, regmoment, $4);
SELECT visitsmdl_reg.id, pages_reg.code
INTO regid, mdlcode
FROM modules_reg, visitsmdl_reg, pages_reg WHERE(visitsmdl_reg.regtime = regmoment
AND visitsmdl_reg.module = modules_reg.id AND modules_reg.mdname = $1
AND modules_reg.id = pages_reg.mdl);
RETURN (regid || mdlcode);
END IF;
END;
Thanks in advance!
Regardless of what line the error message says, here is a simpel example that raises the error.
CREATE TABLE issue_9000(f INTEGER);
INSERT INTO issue_9000 (f)
SELECT 'ABCDEFG';
And the output from PGADMIN
ERROR: invalid input syntax for integer: "ABCDEFG"
LINE 2: SELECT 'ABCDEFG';
^
********** Error **********
ERROR: invalid input syntax for integer: "ABCDEFG"
SQL state: 22P02
Character: 35
Your trying to stuff characters into integer like a_horse_with_no_name commented.