'jQuery' is undefined in while using bundle in mvc - performance

Step 1- We have merge
1) jquery-1.7.2.js,
2) jquery.unobtrusive-ajax.js,
3) jquery.validate.js,
4) jquery.validate.unobtrusive.js
In Single file using online js compressing tool. And saved that new file in our application script folder.
Step 2- When we are using new file in our application by using
" script src="Domain_Path"+"/Scripts/CDNScripts/jqueryval.js" type="text/javascript">"/script>
Its working very good.
Step 3- BUT when we are using bundling and CDN like below.
bundles.UseCdn = false;
string JqueryvalCND = "Domain_Path" + "/Scripts/CDNScripts/jqueryval.js";
bundles.Add(new ScriptBundle("~/bundles/jqueryval", JqueryvalCND).Include(
"~/Scripts/CDNScripts/jqueryval.js"));
**It producing error "'jQuery' is undefined "**
Please suggest urgent

You need to include your bundle in your page too :
Razor : #Scripts.Render("~/bundles/jqueryval")
Web Forms : <%: Scripts.Render("~/bundles/jqueryval") %>

Related

Editing Hugo-Academic theme in `blogdown` doesn't show updates made

I am using blogdown for the first time and have installed the Hugo-academic theme via the recommended method, blogdown::new_site(theme = 'gcushen/hugo-academic').
I have started editing the config.toml and the updates render as expected. After attempting to edit the about.md file it appears that none of the edits I've made are showing up. I've deleted some of the example files (such as Selected Projects, etc) however the site preview still shows them . I came across (Customize the "about" widget in hugo academic theme) which feels related, and upon executing hugo -v in terminal (within RStudio in the same project) I get the following error which I can't comprehend:
ERROR 2018/06/25 19:50:10 Error while rendering "home" in "": template: index.html:1:3: executing "index.html" at <partial "widget_page...>: error calling partial: template: partials/widget_page.html:23:9: executing "partials/widget_page.html" at <partial $widget $par...>: error calling partial: template: partials/widgets/projects.html:66:84: executing "partials/widgets/projects.html" at <delimit.Params.tags...>: error calling delimit: can't iterate over <nil>
An attempt at understanding: Have I deleted a file I should not have or not updated something in config.toml such that it is looking for a file which I've now deleted?
I'm on a Mac, and using RStudio version 1.1.453 in case it is useful to know
I will have to see what changes you have made in the config.toml.
If you scroll down in the config.toml file you should find [params.menus] in that the first menu is for About. It looks like this:
[[menu.main]]
name = "About me"
url = "#about"
weight = 1
If the params are okay, and if you edited the about.md file in the root>content>home folder it should be okay.

How to make srtm data part of geoserver

I have downloaded srtm data, which has the below structure:
srtm_51_08
srtm_51_08.hdr
srtm_51_08.tfw
srtm_51_08.tif
Now inside geoserver folder where do i copy-paste this "srtm_51_08" folder ?
I am using geoserver version 2.11.1.
When i pasted it inside \data_dir\workspaces\ folder, the geoserver started up with the warning:
" WARN [org.geoserver] - Ignoring workspace directory workspaces/srtm_51_08 "
How do i include it, so that it is not ignored by geoserver, as i want to use it in my app as below:
var globe = new Cesium.Globe(Cesium.Ellipsoid.WGS84);
var terrainProvider = new Cesium.GeoserverTerrainProvider({
url: "http://localhost:8080/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities",
layerName: "srtm_51_08",
});
globe.terrainProvider = terrainProvider;
Did you try looking in the manual? May be the section on World Images or preferably convert it to a geotiff and use GeoTiffs?

PhoneGap Build API for Node.js - Unable to load a custom build

I am trying to upload a zip file containing my App into PhoneGap Build by using the API with Node.js but it doesn't work, it does if I upload the file manually from the website.
After a successfully authentication with this piece of code:
pgBuild.auth({ token: phonegapBuildToken }, authenticationResponse);
in my callback I do the following:
function authenticationResponse(e, api){
unlockAndroidKeyMethod(api);
unlockiOSKeyMethod(api);
var options = {
form: {
data: {
platforms: ['android', 'ios']
},
file: './www/xxx.zip'
}
};
api.post(phonegapEndpoint + '/build', options, function(ee, data) {
console.log('## BUILD IN PROGRESS...');
console.log(ee);
console.log(data);
//waitingForPendingBuild(api);
});
}
inside the option I am pointing to the file I want to load
file: './www/xxx.zip'
the problem is that whatever I put there it doesn't get picked up, what PhoneGap Build builds is the file always the file loaded through the website.
Can I get some help, please? :)
Thanks
PS: I get no error
I have managed to solved this problem - it was a problem on how I create the zip file apparently...PhoneGap Build API don't like zip files done with gulp-zip, using archiverjs (https://archiverjs.com/docs/) solves the issue :)
Thanks

Dajaxice not found on production server

I have a Django 1.4 project, running on Python 2.7 in which I'm using Dajaxice 0.5.4.1. I have set it up on my development machine (Windows 7) and everything works perfectly. However when I deploy my app to production server (Ubuntu 12.04) I get 404 error for dajaxice.core.js file and cannot resolve this problem no matter what. Production server works with exactly the same versions of all software.
My project structure looks like this:
/myproject
/myproject/myproject-static/ <-- all the static files are here
/myproject/myproject-static/css/
/myproject/myproject-static/img/
/myproject/myproject-static/js/
/myproject/templates/
/myproject/myproject/
/myproject/main/
/myproject/app1/
/myproject/app2/
/myproject/app3/
etc.
I was following the Dajaxice installation steps here and put everything in its place (in settings.py, ˙urls.pyandbase.html` files).
My settings.py file has also these values:
from unipath import Path
PROJECT_ROOT = Path(__file__).ancestor(3)
STATIC_ROOT = ''
STATIC_URL = '/myproject-static/'
STATICFILES_DIRS = (
PROJECT_ROOT.child('myproject-static'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'dajaxice.finders.DajaxiceFinder',
)
DAJAXICE_MEDIA_PREFIX = "dajaxice"
DAJAXICE_DEBUG = True
I have an Alias directive in my django.conf file which looks like this:
Alias /myproject-static/ "/path/to/myproject/myproject-static/"
I did collectstatic on my production server and got all static files collected within few folders in the root of my project. So, now when I look at my deployed web site, I can see that CSS is properly applied, JavaScript is working fine and navigation around the site works as intended. Everything is fine except Ajax is totally broken since dajaxice.core.js is never included.
My project folder structure after collecting static looks like this:
/myproject
/myproject/myproject-static/ <-- all the static files are originally here
/myproject/myproject-static/css/
/myproject/myproject-static/img/
/myproject/myproject-static/js/
/myproject/templates/
/myproject/admin/ <-- folder created with 'collectstatic' command
/myproject/css/ <-- folder created with 'collectstatic' command
/myproject/dajaxice/ <-- dajaxice.core.js is located here
/myproject/django_extensions/ <-- folder created with 'collectstatic' command
/myproject/img/ <-- folder created with 'collectstatic' command
/myproject/js/ <-- folder created with 'collectstatic' command
/myproject/myproject/
/myproject/main/
/myproject/app1/
/myproject/app2/
/myproject/app3/
etc.
Am I doing something completely wrong with my static files here?
What else should I try to fix this simple error?
Have you check if as the rest of the assets, dajaxice.core.js is inside your static/dajaxice folder? If not, the issue could be related with a miss configuration of the STATICFILES_FINDERS, check Installing dajaxice again
Another usual issue with collectstatic and dajaxice is to run the first using --link Are you using this option?
Hope this helps
I spend several hours grappling with this problem. It was crazy because everything worked great on my dev environment, but not on the test server even though all the dajax and dajaxice settings were on a common base settings file. I never got it to work using the standard route. But this is a very easy fix:
1) Download dajaxice.core.js into whatever static directory pleases you. You can find the js in your the dajaxice directory in your project root:
project/dajaxice/dajaxice.core.js
In my case, I put the file in static/js alongside all my other js libraries.
2) On your web page, replace this:
{% dajaxice_js_import %}
with a normal, everyday link to the js library. In my case:
<script src="/static/js/dajaxice.core.js" type="text/javascript"></script>
Unfortunately, this patch only works for developed code. If you usedo it in the development environment, new dajaxice code will be registered in the original project/dajaxice/ location and so the file will have to be copied to static after any new code is developed.

Netzke on RAILS 3.1

I am newbe here about Netzke..
I am trying to follow the installation process in the Netzke web
site http://www.netzke.org and also from the git Netzke-core site..
I just download the EXT JS 4.0.2 zip file from Sencha, extract it and try to symbolic link the ext JS code to <railsdir>public/extjs directory..
and with the rails 3.1, I try also to link it to <railsdir>/app/assets/
javascripts and also <railsdir>/app/assets/stylesheets..
But it still does not work, because it doesn't find the file /extjs/resources/css/ext-all.css..
Please can you help which path or directory to link the EXT JS code to?
Linking the /code/sencha/EXT-4.0.2a to public/extjs
, that what I have done, but no success..
set config.assets.debug = false in environment/development.rb file
it will work with Netzke
I'm just newbie for Netzke too. I think your problem with model_name method is that you Use GridPanel without a config model to it. You should do something like this:
<% netzke :some_component, :class_name => "Netzke::Basepack::GridPanel", :model => "YourModel" %>
It should work :)

Resources