In trying to integrate the CKsource CKFinder control into Orchards CMS. I've already done this with a plain non orchard project, but am having difficulty with the orchard CMS project.
When popuing up the The finder control I get the following javascript error:
It was not possible to properly load the XML response from the web server.
Raw response from the server:
<%# Page Language="c#" Inherits="CKFinder.Connector.Connector" Trace="false"
AutoEventWireup="false" %><%# Assembly Name="AAA.CMS"%> <%# Register
Src="../../../config.ascx" TagName="Config" TagPrefix="CKFinder" %> <%-- * CKFinder *
======== * http://cksource.com/ckfinder * Copyright (C) 2007-2013, CKSource - Frederico
Knabben. All rights reserved. * * The software, this file and its contents are subject
to the CKFinder * License. Please read the license.txt file before using, installing,
copying, * modifying or distribute this file or part of its contents. The contents of
* this file is part of the Source Code of CKFinder. * * --- * This is the ASP.NET
connector for CKFinder. * * You must copy the CKFinder.Connector.dll file to your "bin"
directory or * make a reference to it in your Visual Studio project. --%>
I've verified my Config.ascx is correct. I'm able to access the js file. Is it even possible to integrate ckfinder into a Orchard Module?
Related
I am new in Luci/lua,work on LuCI 15.05-154-gb81a22b and lua 5.1 Face problem to execute view show me bellow error
Controller syntax is bellow
e=entry({"admin","network","macclone"},arcombine(template("admin_network/mac_clone")),_("MacClone"),14)
e.leaf=true
Controller successfully call view page.
View
<%#
Copyright 2008-2009 Steven Barth <steven#midlink.org>
Copyright 2008-2015 Jo-Philipp Wich <jow#openwrt.org>
Licensed to the public under the Apache License 2.0.
-%>
<%-+header-%>
<div id="cbi-network">
<h2>hello</h2>
</div>
<%-+footer-%>
View execute with error
Why this error appear?How to solve this error?
Note: header load necessary css files like:bootstrap
It says that it cant find the template admin_network/mac_clone. You need to add a model page mac_clone. Also change the
arcombine(template("admin_network/mac_clone"))
to cbi("mac_clone")
I understand how to import one dart-polymer package into another package and use a component from the imported package.
There seems to be a difference in angular2-dart.
I created an angular2-dart component in package A and import it into package B.
The specific component I want to use is NameComponent.
In polymer I would simply do the following to used the imported component's markup
<name-component></name-component>
Doing something similar does not work in angular2-dart.
I have not been able to find information on importing a component from one dart package into another for angular2-dart.
A graphical summary of what I am trying to do is shown below - package B. The name-component is from package A.
Does anyone know how this is done?
EDIT 1
After making the suggested corrections I receive the following
"P:\Program Files\Dart\dev\dart-sdk\bin\pub.bat" serve web --port=57435
Loading source assets...
Loading angular2 and dart_to_js_script_rewriter transformers...
Serving epimss_ng2_app web on http://localhost:57435
[DirectiveProcessor on epimss_ng2_reg|lib/components.dart]:
ERROR: Invalid argument (url): "Could not read asset at uri asset:epimss_ng2_reg/lib/name_component.html"
[Warning from TemplateCompiler on epimss_ng2_app|lib/app_component.ng_meta.json]:
Could not find Directive entry for name: NameComponent
. Please be aware that Dart transformers have limited support for reusable, pre-defined lists of Directives (aka "directive aliases"). See https://goo.gl/d8XPt0 for details.
Build completed with 1 errors.
[web] GET Served 13 assets.
[web] GET packages/epimss_ng2_reg/components.dart => Could not find asset epimss_ng2_reg|lib/components.dart.
[web] GET Served 17 assets.
I am going to place the components directory directly on lib and see if it makes a difference.
My package is actually packages/epimss_ng2_reg/src/components.dart.
I can only think of 2 things you might be missing.
You need to add the component to directives
#Component(..., directives: const [NameComponent]) af the parent component.
You need to add the Angular2 transformer in pubspec.yaml of the component
transformers:
angular2
I'm working on a re-usable API component for iOS apps. I have completed the API and documented it using headerdoc for future users.
Now I want to create HTML pages for those header files. So I executed the following command in terminal from my project directory
headerdoc2html -o ~/Desktop/My_Project_Documentation APIFolder/
But No documents are being created, instead I'm getting an error like:
Skipping. No HeaderDoc comments found.
No default encoding. Guessing. If date formats are wrong, try
specifying an appropriate value in the LANG environment variable.
...done
I tried various methods and ways, finally I narrow down the issue:
In the beginning of my project I have something like:
/**
* DarkPantherConstants.h
* Panther
* Created by Midhun on 05/11/14.
* Copyright (c) 2014 Midhun. All rights reserved.
* Panther Constants are defined in this header file
*/
So the issue was with this particular comment, actually this comment is auto-generated by XCode and I actually modified the name and comment format to headerdoc. Nothing with date or date-format. Even If I remove those comments, nothing works; getting same error. Can anybody please help me to solve this ?
I fixed it by changing my commenting format from:
/**
*
*/
to
/*!
*
*/
I made my header comment like:
/*!
* DarkPantherConstants.h
* Panther
* Created by Midhun on 05/11/14.
* Copyright (c) 2014 Midhun. All rights reserved.
* Panther Constants are defined in this header file
*/
And it solved the issue, but I don't know why the previous commenting format not working. (Both are valid for headerdoc)
Add the -j options when executing headerdoc2html to also process java style comments ( /** )
I know it's not a lot I could save in KB, but to achieve a better score in Google PageSpeed Insights, and thus probably better SEO ranking, how can I fix this?
From https://developers.google.com/speed/pagespeed/insights/?hl=en&url=www.tradebench.com :
Minify JavaScript for the following resources to reduce their size by 2.8KiB (2% reduction). Minifying http://d2bfamm4k6zojq.cloudfront.net/…tion-ea806932c941fb875b7512a557ebead3.js could save 2.8KiB (2% reduction) after compression.
It tells me the same thing for my CSS file.
From my production.rb file:
config.assets.compress = true
config.assets.js_compressor = Uglifier.new(:mangle => true)
config.assets.css_compressor = :yui
Looking at the uglifier docs/options, I don't see how I could configure it to get the last 2KB.
Anyone has an idea how to get it to compress the last tiny bit to remove the PageSpeed notice about it? Maybe use another compressor than Uglifier?
Thanks :-)
If you just inspect your minified js, you will see that the code is minified but every js lib you include has its own copyright and license information at the top(which is correct), like the following snippet:
/**
* Copyright 2009 SomeThirdParty.
* Here is the full license text and copyright
*/
If you really want to achieve complete minification on your rails app and get rid of the 2% extra compression notice of pagespeed insights you could do so by having the following setting:
config.assets.js_compressor = Uglifier.new(copyright: false)
or
config.assets.js_compressor = Uglifier.new(output: { comments: :none })
NOTE1: Both of the above will minimize your application.js without any comments.
NOTE2: With both of the settings above, uglifier removes all the copyright information from your minified js and thus your app achieve the total minification required from google pagespeed and you gain +1 point at your score.
However, you should not avoid to include the copyrights of the code you are using. Most of the licenses (MIT, BSD, GPL...) require that you keep the copyright and licensing information whenever you redistribute the library. When you allow browsers to download a compressed copy of the library from your server or from your CDN counts as you redistributing the library. Thus you SHOULD INCLUDE the copyright and license information at some place of your app.
How to
One thing you could do is to collect all the copyright information of your js libraries you are using on your app and add them all in a licenses.txt and place it at your public folder. Your public/licenses.txt should look like the following:
/**
* Unobtrusive scripting adapter for jQuery
* https://github.com/rails/jquery-ujs
*
* Requires jQuery 1.8.0 or later.
*
* Released under the MIT license
*
*/
[...and the rest copyrights here one after the other]
Then by using a link tag specify the location of this file on the html head of the app(layouts/application.html):
<head>
<!-- License information of used libraries -->
<link rel="license" href="../licenses.txt">
</head>
The rel=license denotes that: the main content of the current document is covered by the copyright license described by the referenced document.
Finally, if you want to be more correct with this one, you should include just one comment on the minified application.js just to let someone where exactly can find all the copyright information(in case of whatever..). In order to do that, add the following comment on top of your application.js file:
/*!LC
* Copyright and Licenses: http://www.example.com/licenses.txt
*/
so your application.js might look like the following:
/*!LC
* Copyright and Licenses: http://www.example.com/licenses.txt
*/
//= require jquery
//= require jquery_ujs
//= [..rest of your requires]
NOTE: I have distinguish this comment with an !LC at the start. You need this one to pass a regexp to the uglifier so it will allow ONLY THIS comment on the minified js. To do that, go to your production.rb and place the following:
config.assets.js_compressor = Uglifier.new(output: { comments: /^!LC/ })
Uglifier will allow only the !LC comment on top of your minified js file, you wont get warning on the pagespeed insights for just one comment. If you do all these you will be totally fine, you get full score on pagespeed insights, you have completelly minified .js for optimal delivery and you have all your copyrights at a place for any legal issues.
I am trying to create a Delphi XE2 function to check VAT numbers via the SOAP service of VIES: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
When I use Delphi X2's WSDL importer with the above URL taking the default values, I get the following error:
Unable to load WSDL File/Location: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl. Error [The requested header was not found - URL:http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl - SOAPAction:""
What am I doing worng?
Save the wsdl file to disc and import the saved xml file.
After generating the pas file, change the line matchCode = (1, 2) in (_1, _2).