Showing posts with label Tips x tricks. Show all posts
Showing posts with label Tips x tricks. Show all posts

Thursday, 4 July 2013

LaTeX ** ERROR ** Log file not found! on Texmaker



Sad!
You may have crossed this error message when trying to compile and preview a new document for the first time. Don't panic! It's simple.

The log file is a file that goes along every LaTeX file. It is automatically generated and specific to a file.
It gives information about what the document is and how to process it, like for example the name and version number of the compiler to use.


What's most likely happening here is that there is a problem while trying to compile because without an indication from a specific log file, neither your system nor Texmaker know what to do with the file or where the compiler is...

-> Either because you just don't have a LaTeX compiler installed
Texmaker is just a (very good) LaTeX editor, it does not come with an engine to create actual pdf... If you didn't install anything else than Texmaker, you are therefore missing a LaTeX distribution.
In that case I recommend MikTeX if you are running Windows (miktex.org/), or Live TeX if you run an UNIX system (www.tug.org/texlive/)

-> Or because you didn't add it's path to your environment variables
This you should do in either case. Just add this path to your environment variables:
     [location of your miktex folder]\MiKTeX 2.9\miktex\bin
This step is required to use the builtin functionality of your LaTeX editor to create a new file from an other existing LaTeX file, or to create a new file by copying an other manually. Just because the log file is intimately specific to its LaTeX file ;)

Hope that helps ;)

--
FAQ
LaTeX?
http://latex-project.org/intro.html

What is Texmaker?
My favorite LaTeX editor, check it out at http://www.xm1math.net/texmaker/
It is free and easy to use!

Where to get help?
http://tex.stackexchange.com/ is THE place.

--
More information
on the topic:
http://tex.stackexchange.com/questions/63999/texmaker-windows-version-first-use-error-log-file-not-found
on the log file:
http://tex.stackexchange.com/questions/32213/understanding-the-log-file

Sunday, 30 December 2012

[How to] Add your Twitter feed to your blog - Picture tutorial


Hello everyone!

As you may notice on the bottom right corner of the page, I added my Twitter feed to The rob Point ;-)
I spent quite a long time searching for a plugin, a lot of them didn't work for some reasons... Finally I discovered that I just had to use a plugin from my Twitter account, which is really easy to implement :D

So here you go, this is how we add a twitter feed to one's blog or website in three simple steps:
(note that this also works if you want to obtain the feed of a random other person on Twitter)


//1/ Create the widget in your Twitter account

To achieve that, just go to the "Edit profile" menu, and click on the "Widget" tab...



Then hit the "Create new" button!





//2/ Configuration



Enter the username of the person you want to follow the feed here, e.g. you if you want yours

If you want to add the widget to a banner or to the side of your page, I recommend you adjust its height. Note that the width is automatically adjusted



To suit your blog theme, it is a good idea to change the color of the links in the widget...

This step is a bit tricky if you're using a platform that adapt the url to the country of the reader (like me). In that case, you should put various urls like in the example, or the widget won't work in the excluded countries. I didn't found a better way to do it until now...

Don't forget to save. You will be able to edit these properties at anytime. ;-)




//3/ Add the widget to your blog or website!

This step varies depending on your editing interface. I'll show it in pictures for blogger, but i think the steps are almost the same on every platform ;-)

Click on the widget's html code below the preview panel to select it, and copy it




Create a blank widget in your blog administration panel


Note: If you use brute html to modify your blog model, you can always copy the code straight in your html file and it will work anyway



Add the html code from your Twitter widget in your blog's blank widget :-)


Note: You don't have to add a title, because the widget already includes one, so it will look weird...




And there you go! :D

This widget can take any width, so if you want you can also easily use it on a dedicated page, or on top (or bottom) of your page as a banner. You'll just have to put in the correct height in Twitter.

Note that if you want to modify your widget, the only way to do it is via your twitter account. The html code is only to get the widget configuration from Twitter.

I hope these helps some of you!
And... a very happy new year 2013, to all of you! ;-)




Thursday, 29 November 2012

[ASM] How to use the windows API in NASM

Hellooow everybody! ;-)

Today I will give you a short guide on how to use windows API in ASM programming! (at least in programs compiled with NASM because this is the one I'm using and as I'm quite noob about the different versions of asm, I prefer not risk to tell wrong things) This is because I wanted to learn some asm stuff and make little programs on windows, and quickly realized that windows was too protected to use pure asm and that we need to use the windows C++ API, including console I/O.

What is the windows API?
It's a library of C++ functions. You have to use it if you want to make any program on windows. So that means you will have to call these functions in your asm code.
It's called kernel32.dll for 32bits systems, and normally it's in the path :-)
Here is the official documentation:
Here is the documentation for console stuff:

How to call a windows API function in asm?
1) Don't forget the header!
You have to declare any function you want to use in your code by specifying them as external functions. Basically at this point all you have to do is to put a line like this in the begining of your file:
  extern    Function1Name, Function2Name, FunctionNName
example (console I/O):
  extern    ExitProcess, GetStdHandle, WriteConsoleA, ReadConsoleInputA

/!\ If you want to use any windows constant in the function calls, you also have to declare those.
For example for the GetStdHandle, these can come in handy :
  STD_OUTPUT_HANDLE    equ -11
  STD_INPUT_HANDLE     equ -10
But of course you can directly pass the constant value as an argument (if you wanna do it in the hardcore way :p) 

2) Function calls in asm
Function calls in asm aren't really more complicated than in any other language. You just have to pass the arguments the function needs and call the function's name.
In asm your pass the arguments by pushing them on top of the stack:
  push    arg

/!\ Always remember that as the stack goes decreasing, (unlike a stack of papers) you have to pass the arguments in the reverse order:
  push    arg3
  push    arg2
  push    arg1

Once all the arguments are sent to the stack, you can call the function:
  call    function

Example: WriteConsole call
  push    NULL
  push    buffer_out
  push    msg.len
  push    msg
  push    dword[handleOut]
  call    WriteConsoleA

How to compile and link a program that uses win API functions? (using nasm and golink)
This is the easy part! Just open a console and eventually cd in the right directory.
To compile, type something like:
>> nasm -f win32 yourProgram.asm -o yourProgram.obj
and to link the library using golink:
>> GoLink.exe /console /entry starting_point_of_your_asm_program yourProgram.obj kernell32.dll

Or, you can do a makefile:
  yourProgram: yourProgram.obj
  GoLink.exe /console /entry starting_point_of_your_asm_program yourProgram.obj kernell32.dll
  yourProgram.obj: yourProgram.asm 
  nasm -f win32 yourProgram.asm -o yourProgram.obj

NB: 
If you don't already know GoLink, it's a linker, which means it's able to link your file with the libraries you want. (in this case the kernel32.dll file)
You can download it here: (direct download of last version)
Manual:

NB2:
In order to use these commands, the source folders for nasm and GoLink.exe have to be in the path. So when you install them don't forget to add these at the end of the path variable. (right click on computer => advanced system parameters => environment variables... => find "path" in the system variables table, hit "modify" and add your new paths at the end, separated by a ';')

Working example: system("pause")
  STD_OUTPUT_HANDLE   equ -11
  STD_INPUT_HANDLE    equ -10
  NULL                equ 0
  global start
  extern ExitProcess, GetStdHandle, WriteConsoleA, ReadConsoleInputA

  section .data    ;message we want to display on console
  msg                 db "Press a key to continue...", 13, 10, 0
  msg.len             equ $ - msg
  consoleInHandle     dd 1

  section .bss     ;buffers declaration
  buffer_out          resd 2
  buffer_in           resb 32

  section .text
    start:       ;starting point of our program
        push    STD_OUTPUT_HANDLE
        call    GetStdHandle   ;call to get a handle to the
        push    NULL           ;specified mode (input, output...)
        push    buffer_out
        push    msg.len
        push    msg
        push    eax            ;contains the GetStdHandle result
        call    WriteConsoleA  ;call to print our msg in console

    read:
        push    STD_INPUT_HANDLE
        call    GetStdHandle        ;new call to get input handle
        push    NULL
        push    1
        push    buffer_in
        push    eax
        call    ReadConsoleInputA   ;call to detect user input
                                    ;this function will wait til
    exit:                           ;it detects enough keypresses
        push    NULL                ;(in this case, 1)
        call    ExitProcess

Manual pages for the functions used in this code:
- ExitProcess
- GetStdHandle
- WriteConsole (A stands for ANSI version)
- ReadConsoleInput (A stands for ANSI version)


I hope this helped some of you! See ya around and have fun coding ;-)


Additional source for this article:
This thread I posted on stackoverflow.com when I was having a hard time understanding all this: ;-p

Thursday, 5 July 2012

[Windows de merde] 'javac' is not recognized as an internal or external command

     Alors comme ça vous essayez d'installer le JDK ? Vous avez tout bien fait avec la variable d'environnement PATH et ça fonctionne toujours pas ?

Cherchez plus...

Redémarrez la console.






Non, non c'est pas une blague !
Ah, ces trucs qui te donnent envie de déchirer ton petit sticker windows avec les dents... (pour ceux qui en ont un :p)

Wednesday, 20 June 2012

Optimisme : Piqure de rappel

     Alors voilà, c'est la fin de l'année (scolaire), et je peux déjà dire que ça a été une année mouvementée pour pas mal de monde. Donc sur une inspiration venue de notre cher Bobo, voici un éventail de videos optimistes et remotivantes... Pour tout ceux qui ont traversé quelquechose de difficile et qui s'en sont sortis, pour ceux qui on douté, et qui essayent de trouver leur voie, pour ceux qui comprennent et ceux qui veulent aller plus loin...

      Ca en fera peut-être rire certains, mais laissons nous aller à un petit transportement d'émotion : j'aimerais dédicacer cet article à Belias (gimme five! ;p), qui a pris ses rêves en main et qui ne s'est vraiment pas laissé abattre cette année. Franchement respect bro :-) Au début quand j'en étais encore à te botter le train pour que tu te remues j'avoue que j'éspérais même pas un tel accomplissement, et maintenant c'est limite toi qui vient me faire la morale. Félicitations pour cette réussite, cette victoire même, on peut le dire :), et j'éspère que tu décrocheras le contrat pro de tes rêves très vite o/

Nuuuumero 1 !
"Getting lost will help you find yourself"
Manifesto de Holstee, startup fabriquant des vêtements et accessoires à partir de produits recyclés (Fournie by Bobohwh)


Quelques autres videos remarquables :

"When was the last time you did something for the first time?"
"Follow your dreams, they know the way"
J'aime beaucoup ! Créé d'après le livre "5" qui a l'air passionant ( http://www.live-inspired.com/The-5-Book-by-Dan-Zadra-P13 )
et PO PO POOO pour les gorilles des montagnes !

"Don't just wonder the future. Create it."
Excellente. Seriously. Bande annonce du salon EOAlchemy 2012 sur l'entrepreneuriat à Seattle ( http://eoalchemy.com/ )

"By choice, not by chance..."
"Don't settle for less, when the world has made it so easy to be remarkable"
Video de Mannatech, qui est... euhh... une entreprise qui fait des compléments alimentaires à base d'aloe vera si j'ai bien compris ! xD ( http://mannatecheurope.com/ )

"Believe that the best is yet to be"
Une autre video de 1inspireoz sur qui je n'ai pas trouvé d'infos. Une video formidable, quoiqu'un brin déprimante, qui parle de l'importance de croire, d'avoir foi en soi, en les autres, et en l'avenir :-)

Voilou, ça fait déjà pas mal de bonne humeur et de bonne volonté, a bientôt sur le blog !

Et bonne continuation à tous ;-)

Love,
Rob

Sunday, 8 April 2012

LaTeX ** ERROR ** Could not open specified DVI file x.dvi Output file removed.


Une fois n'est pas coutume, encore un fix !

Ce message d'erreur LaTeX est le premier que vous pourriez rencontrer en créant un nouveau document si vous n'êtes pas vigilant :

** ERROR ** Could not open specified DVI file x.dvi Output file removed.

Cela risque de survenir lors d'une tentative de compilation rapide. C'est du au fait qu'il faut "compiler" une première fois en utilisant LaTeX avant de pouvoir faire cette exécution rapide (qui est par défaut la fonction exécutée par la touche F9 (en tout cas dans l'éditeur Texmaker http://www.xm1math.net/texmaker/)). Compilez avec LaTeX !


Sous Texmaker :

La compilation par défaut est "compilation rapide".




Pour faire une compilation LaTeX complète, sélectionnez "LaTeX" dans la liste déroulante.








Compilez !

(C'était vraiment pas compliqué :p)

Thursday, 6 October 2011

The Game Developer Magazine

A bon entendeur : voici le site d'un magasine que je viens de découvrir, le Game Developer Magazine =)
http://www.gdmag.com/homepage.htm


Très accessible et très fourni, il y a des tutos, mais aussi des sections avec des conseils, des adresses et plein d'autres infos utiles. Si le secteur du jeu video vous intéresse, à lire absolument!!! si vous n'êtes pas déjà abonné ;)
Par contre, c'est en anglais... Bon, pas très surprenant pour ce type de magazine, c'est le bon moment pour s'y mettre on dirait ;p

Ils font notamment des hors série annuels gratuits très intéressants :
http://gamedeveloper.texterity.com/gamedeveloper/fall2011cg#pg1

Game development for all ! :D

Saturday, 18 June 2011

4 plugins pour Chromium

Voici quelques extensions, dont deux (au moins ;)) reprises de Firefox, que je vous conseille si vous utilisez Chromium ou Google Chrome :

  • AdBlock Plus for google Chrome
https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb?hl=fr#
Celui-là tout le monde le connait, et c'est bien pratique et il manque quand on l'a plus ;)

  • Ghostery
https://chrome.google.com/webstore/detail/mlomiejdfkolichcflejclcbmpeaniij?hl=fr#
"Track the trackers." Très bon pour se débarrasser notamment de certaines pubs, et pour les paranoïaques :p
Une reprise de Ghostery sur Firefox.

  • NotScripts
https://chrome.google.com/webstore/detail/odjhifogjcknibkahlpidmdajjpkkcfn?hl=fr#
Attention à la première configuration un peu tordue, si vous utilisez chromium le dossier dans lequel vous devez changer une clé de cryptage change d'adresse : %userprofile%\AppData\Local\Chromium\User Data\Default\Extensions\odjhifogjcknibkahlpidmdajjpkkcfn
(n'oubliez pas d'afficher les dossiers cachés dans panneau de configuration / Apparence et personnalisation / Option des dossiers)
Ensuite y'aura plus qu'à cliquer sur le bouton pour autoriser ou non l’exécution de certain scripts (n'oublier pas d'autoriser google et compagnie pour pouvoir naviguer correctement ^^)

  • Proxy Switchy!
https://chrome.google.com/webstore/detail/caehdcpeofiiigpdhbabniblemipncjj#
Ça parle de soi-même :)

Le seul point embêtant est que les icônes de certaines extensions (ici AdBlock et NotScripts) restent toujours visibles dans la barre d'adresse, ce qui fait un peu moche dans le design épuré du navigateur...
Et Firefox reste pour le moment toujours en avance niveau navigation sécurisée, avec des plugins du genre HTTPS everywhere. J’espère que ça ira mieux bientôt, les développeurs de chromium ayant laissé entendre qu'ils s’intéressaient à ce genre d'issues.

Nota :
Passez au projet open-source Chromium, sur lequel est basé Chrome :
http://www.commentcamarche.net/download/telecharger-34076765-chromium
Mode incognito sur Chromium : options / nouvelle fenêtre de navigation privée, ou ctrl+shift+N

Sunday, 20 February 2011

Pourquoi il faudrait toujours répondre "non" lorsque l'on nous demande si ça va

Eh oui, la logique voudrait que l'on réponde systématiquement "non" à la question "Comment ça va?".

Effectivement, nous sommes tous en train de mourir, puisque vivre c'est mourir. Mourir petit à petit, au fur et à mesure que notre réserve d'énergie et de neurones s'épuise. Toute vie, en tant que déséquilibre, naît d'un sursaut d'énergie puis disparaît lorsque un équilibre se rétablit, comme la surface d'un lac redevient calme après qu'on y aie jeté une pierre.
Être en train de mourir, dans cette société où la peur de la "mort" est ancrée dans les mœurs, c'est forcément aller mal. Nous ne pouvons d'ailleurs pas renier notre appartenance à cette société, autant que notre peur de la mort. Tout être humain craint la mort, c'est génétique ; nous existons pour continuer à exister, selon l'évolution de Darwin, donc il est naturel que nous n'apprécions pas (viscéralement) la proximité de celle-ci.

Dorénavant, si l'on vous demande si ça va, répondez donc : "Non, je suis en train de mourir".