Script Extension for OOo or Word? - scripting

I'am a student in informatique and actually in internship I'd like to keep note of what I'm doing.
So for this I'm using OpenOffice.org (I can aswell use Word its not a pb).
But in the process I'm facing a sad problem I can't find (maybe because there is not) an extension for copying code in my report.
I'm using Shell, Js, HTML, PHP, CSS and all classical Web developpement environnement langage.
Does some of you has allready heard of something for it ?
Where can I find it pls :)

There are some extensions for Apache OpenOffice or LibreOffice:
Openoffice: Code Colorizer
LibreOffice: Coooder
LibreOffice: Code Colorizer Formatter

Related

Khan Academy API displayed on Geektool

I have been experimenting with the Khan Academy API found here
http://api-explorer.khanacademy.org/api/v1/user
and tried to find a way to display a user's points (and maybe some other information) on the desktop using geektool. I tried this
stackoverflow.com/questions/12514722/khan-academy-php-oauth-code
and
github.com/Khan/khan-api/
but nothing seems to work. The first link is the khan academy API provided as is. The second is someone with a similar problem who found a solution. He wrote a PHP script according to the temboo library and said to replace a few fields of the PHP and add both the PHP and the Temboo source code to the webroot. So, I added a folder called "php-sdk" into the webroot which is in /Library/WebServer/Documents/ and inside that folder was another folder "src" which contained the Khan Academy API and the Temboo library. Here is what I had.
cl.ly/image/2c2Z1B3T443L
Then I took a look at this and followed the steps until 6:19. Then I started the Apache server by entering this in terminal...
sudo apachectl restart
I opened a web browser, and typed in this...
localhost/php-sdk/src/khanAcademy.php
and I got this...
Warning: require(php-sdk/src/temboo.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
Fatal error: require(): Failed opening required 'php-sdk/src/temboo.php' (include_path='.:') in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
any ideas on what this could mean or how I could fix this? I am not advanced in PHP, or python, but I really would love to find a solution to this problem and I am willing to try anything that might work.
This error:
Warning: require(php-sdk/src/temboo.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/php-sdk/src/khanAcademy.php on line 66
indicates that the path you're using for require is likely incorrect. Currently your PHP is trying to find a file called temboo.php here:
/Library/WebServer/Documents/php-sdk/src/php-sdk/src/temboo.php
Note the repeated directory structure. I'll make an assumption that your temboo.php is in the same directory as your khanAcademy.php file. In that case, simply change require "php-sdk/src/temboo.php" to require "temboo.php". If my assumption is incorrect, just adjust the include path accordingly.

Google API malware warning

On my site but Securi SiteCheck is showing this:
*Anomaly behavior detected (possible malware). Details: http://sucuri.net/malware/malware-entry-mwanomalysp8
Is there anyway I can stop this malware warning for a fussy client?
Go to wp-content/themes/header.php file and open it in NOTEPAD++ and if you see any JS code below, then simply remove that code...
You have installed malware on your site (possibly your site was compromised) or your code looks like malware due to minified versions of JavaScript, which looks like obfuscated exploits.

enchant_broker_init() performance issue

I have a web site which uses enchant enchant_broker_init().
I`m not sure why but enchant_broker_init() takes something like 19~ seconds to load the page.
Once I remove this function page loads right away.
anyone has an idea why this is? or how can I debug it?
Thanks
Steps to install php enchant plugin.
APACHE
http://apache.mivzakim.net//httpd/binaries/win32/#warnings
PHP
http://windows.php.net/download/
ENABLE PHP ON APACHE
http://php.net/manual/en/install.windows.apache2.php
Enchant will not work using WAMP. ( at least for it hasn't... ).
Afterwards add the following path
share\myspell\dicts
to your PHP directory.
should look like that.
C:\PHP\share\myspell\dicts
Put the dictionary files there.
.aff
.dic

XUL standalone application not starting

I recently took on a project built on XUL (standalone, using xulrunner) - However I can't get it to properly run.
I'm getting this error when I attempt to start it using the command line (xulrunner.exe ../application.ini -jsconsole):
No chrome package registered for chrome://case_scenario_builder/content/case_scenario_builder.xul
The chrome.manifest file looks like this:
content case_scenario_builder file:chrome/case_scenario_builder/content/ contentaccessible=yes
content jslib jar:chrome/jslib.jar!/
skin case_scenario_builder skin file:chrome/case_scenario_builder/skin/
locale case_scenario_builder en-US chrome/case_scenario_builder/locale/en-US/
Any ideas on where I could start debugging?
I figured it out!
In case anyone else runs into this as well:
It was due to the caching system in place by default and the use of .jar containers instead of folders.
The XUL environment had cached both JS and XUL files - and even after disabling those, I had to extract everything that was in the .jar file to the content folder and update the chrome.manifest file.
Thanks for your suggestions on debugging! - they helped the process.
I guess your manifest just isn't getting loaded. To test that I'd introduce an intentional syntax error and check the error console. E.g. if you put
asdfasd
on its own line, you should get a Warning: Ignoring unrecognized chrome manifest directive 'asdfasd'. in the Error console.
(Note to other experts: initially I wanted to suggest dropping 'file:' prefix and avoiding underscores in the package name, but I tested it on a Firefox nightly, and it works fine.)
Your chrome package clearly didn't get registered. From what I can tell, the reason is the bogus file: prefix, you should drop it when specifying relative paths:
content case_scenario_builder chrome/case_scenario_builder/content/ contentaccessible=yes
Btw, I suspect that you copied contentaccessible=yes from somewhere - you should drop it as well unless you know what it does.

Yii requirement status

I try to upload my first small project on new VPS (Linux+php-5.3.3+ apache) and found these problem don't know why any help will be appreciated plz.
1- I have to lowercase all my folders in my project to work on Linux system with php+apache.
2- Strange problem is getting error in calling modlules function if like this....Post::xxx if change to post::xxx its ok I mean everything should be in lowercase otherwise give error like Post.PHP not found.
3- CDbConnection failed to open the DB connection: could not find driver?
4- I did run yii/requirements and got all below services/status FAILED and rest PASSED.
- DOM extension
- PDO MySQL extension
- PDO PostgreSQL extension
- Memcache extension
- APC extension
- Mcrypt extension
- SOAP extension
- GD extension
Any suggestion how make above services PASSED. as Im running MySQL db.
I look forward to hear soon.
I know that Khan have already resolved his app problem, but just to references, the answer is:
1 - The unix/linux systens are case-sensitive, so if you named a folder Post you'll need calling Post/ on your code.
2 - As in the last answer, if you are calling you class file Post so you need to change your class name as Post, because the php autoload depend of OS is case-sensitive too.
3 - It fail because the php PDO fail and Yii use it to connect to database system.
4 - Its necessary fix PDO MySQL extension the others are optional
GodFather.