tag:blogger.com,1999:blog-38635118522557616902023-06-20T05:29:27.370-07:00Christopher Jiménez's BlogAnonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-3863511852255761690.post-62140690234155283932012-04-08T23:02:00.000-07:002012-04-08T23:02:06.011-07:00Dynamic Content using toursToday I'll show you a solution using jquery to show dynamic content in a great way... First, take a look to this <a href="http://joelb.me/scrollpath/">demo</a>, this plugin encourages our content through tours. This type of animation can be achieved using a path that we created a very simple.<br />
<br />
It uses mostly CSS effects to work but in case the browser does not support those effects this plugin disable them.<br />
<br />
This is a example code :<br />
$(".your-container-element").scrollPath({<br />
drawPath: true,<br />
wrapAround: true,<br />
scrollBar: false,<br />
callback: function() {<br />
alert("You've reached the end!");<br />
}<br />
});<br />
<br />
<a href="https://github.com/JoelBesada/scrollpath">Here</a> you can find a very good documentation for this plugin and also the source<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-74251227799476060702012-03-26T09:44:00.000-07:002012-03-26T09:44:32.367-07:00OldServiceComponentException: Build namespace ...When you re build your service.xml in your portlet plugin project, sometimes you'd find this error:<br />
<br />
<i>Caused by: com.liferay.portal.OldServiceComponentException: Build namespace </i><br />
<br />
The way to fix it is edit your <b>service.properties</b> and change the value of this line: build.number to the one the exception told you it should be!<br />
<br />
and that's all, friends.<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-61443777478906927892011-09-28T13:10:00.000-07:002011-09-29T15:28:52.358-07:00Read a file in PythonHi, I'll teach you how to read a file in <a href="http://www.python.org/">Python</a><br />
<br />
Python is a hight level programming language, very powerful and clean syntax.<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Python_logo.svg/300px-Python_logo.svg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Python_logo.svg/300px-Python_logo.svg.png" /></a></div>file = open("C:/myfile.txt",'r') # open myfile in read mode<br />
mylist= ["Words"] # create a list <br />
while True:<br />
myline = file.readline() <br />
mylist.append(myline) # add a new node<br />
if not myline: break # end of file<br />
for elemento in myList:<br />
print elemento <br />
<br />
print "Created By: Christopher Jimenez"<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-43056858639882093812011-09-28T10:41:00.000-07:002011-09-28T10:41:00.751-07:00video editing ubuntu terminalTo install en Debian and derivatives: sudo aptitude install ffmpeg mencoder lame<br />
<br />
Examples:<br />
<br />
* Convert FLV to AVI: ffmpeg -i myvideo.flv myvideo.avi<br />
* Convert AVI to FLV: ffmpeg -i myvideo.avi myvideo.flv<br />
* Convert WMV to MPEG-4 (Xvid): mencoder myvideo.wmv -ovc xvid -oac mp3lame -o myvideo.avi<br />
<br />
Many options are available in ffmpeg and mencoder to choose codecs(MPEG1/2, DivX, Xvid, MP3, AAC, QuickTime, H.264, Matroska...) and use this codecs<span class="short_text" id="result_box" lang="en"><span class="hps">(compression</span><span class="">, profiles,</span> <span class="hps">etc. ..</span><span class="">)</span></span><br />
<br />
For help type this:<br />
* ffmpeg -formats<br />
* mencoder -ovc help<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-74835312865048909662011-09-18T11:08:00.000-07:002011-09-18T11:08:58.518-07:00Reconfiguring the screen in Ubuntu<div class="g-unit" id="gt-src-c"><div id="gt-src-p"><div class="" id="gt-src-wrap"><div style="width: 100%;"><br />
</div><div class="gt-spell-correct-message" id="spelling-correction" style="display: none;">Translate from: <a href="">Portuguese</a></div><div id="gt-src-tools"><div id="gt-src-tools-l"><div class="trans-keyboard-button goog-toolbar-button" id="gt-src-keyboard" role="button" style="-moz-user-select: none; display: none;"><span class="jfk-button-img"></span></div><div class="" id="inputt13n" style="display: none;"><span class="jfk-checkbox goog-inline-block" dir="ltr" id="t13nimg" role="checkbox" style="-moz-user-select: none;" tabindex="0"></span><span dir="ltr" id="t13ntext"></span></div></div><div id="gt-src-tools-r"><div class="trans-listen-button goog-toolbar-button" id="gt-src-listen" role="button" style="-moz-user-select: none;" tabindex="0"><span class="jfk-button-img"></span></div><div class="trans-roman-button goog-toolbar-button" id="gt-src-roman" role="button" style="-moz-user-select: none; display: none;"><span class="jfk-button-img"></span></div></div></div></div><div id="select_document" style="display: none;">Type text or a website address or <a href="http://translate.google.com/?tr=f&hl=en">translate a document.</a></div><div class="file" id="file_div" style="display: none;"><div id="select_text" style="display: none;"><a href="http://translate.google.com/?tr=t&hl=en">Cancel</a></div><input id="file" name="file" size="40" style="display: none;" type="file" /></div></div></div><div class="g-unit" id="gt-res-c"><div id="gt-res-p"><div id="gt-res-data"><div class="" id="autotrans" style="display: none; visibility: visible;"><h3 class="" id="headingtext">Spanish - detected to English translation</h3></div><div id="gt-res-wrap"><div class="almost_half_cell" id="gt-res-content"><div dir="ltr"><span class="short_text" id="result_box" lang="en"><span class="hps"><br />
</span><span class="hps"></span></span></div></div></div></div></div></div> well, <span class="short_text" id="result_box" lang="en"><span class="hps">I'll quote</span> <span class="hps">the steps to configure the screen in Ubuntu</span></span><br />
<span class="short_text" id="result_box" lang="en"><span class="hps">First we need to use this command:</span></span><br />
<span class="short_text" id="result_box" lang="en"><span class="hps"><br />
</span></span><br />
<div style="font-family: Georgia,"Times New Roman",serif;"><i>sudo dpkg-reconfigure xserver-xorg</i></div><br />
Then, we need to edit this file to create the configuration<br />
<br />
<div style="font-family: Georgia,"Times New Roman",serif;"><i>sudo gedit /etc/X11/xorg.conf</i></div><div style="font-family: Georgia,"Times New Roman",serif;"><i><br />
</i></div><div style="font-family: Georgia,"Times New Roman",serif;"><span class="" id="result_box" lang="en"><span class="hps">when you</span> <span class="hps">open the</span> <span class="hps">text file</span> <span class="hps">section</span> <span class="hps">replacement</span> <span class="hps">monitor</span> <span class="hps">to the bottom</span> <span class="hps">of everything with</span> <span class="hps">this text</span></span><i></i></div><br />
<br />
<br />
Section "Monitor" <br />
Identifier "Generic Monitor" <br />
Option "DPMS" <br />
HorizSync 30-71 <br />
VertRefresh 50-65 <br />
EndSection <br />
<br />
Section "Screen" <br />
Identifier "Screen0" <br />
Device "Configured Video Device" <br />
Monitor "generic Monitor" <br />
DefaultDepth 24 <br />
SubSection "Display" <br />
Viewport 0 0 <br />
Depth 24 <br />
Modes "1024x768" #Here you can use other size<br />
EndSubSection <br />
EndSection<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-18451406046802264052011-09-12T22:47:00.000-07:002011-09-13T08:15:04.915-07:00Uninstalling Oracle on Ubuntu<span class="" id="result_box" lang="en"><span class="hps">Hi folks,</span> <span class="hps">again I</span> <span class="hps">passing on</span> <span class="hps">valuable information</span></span><br />
<span class="" id="result_box" lang="en"><span class="hps">We all know that</span> <span class="hps">Oracle</span> <span class="hps">is an excellent product</span> <span class="hps">and so on but</span> <span class="hps">do not always</span> <span class="hps">want</span> <span class="hps">on your machine</span> <span class="hps">for various reasons</span> <span class="hps">...</span> <span class="hps">To uninstall</span> <span class="hps">Oracle</span> <span class="hps">on Windows</span> <span class="hps">simply use</span> <span class="hps">the</span> <span class="hps">Wizard</span> <span class="hps">and go</span> <span class="hps">problem solved</span><span>.</span> <span class="hps">But</span> <span class="hps">we must</span> <span class="hps">put him</span> <span class="hps">in</span> <span class="hps">Ubuntu</span> <span class="hps">more labor</span><span>,</span> <span class="hps">but</span> <span class="hps">because</span> <span class="hps">many</span> <span class="hps">things can</span> <span class="hps">go wrong,</span> <span class="hps">and if they want</span> <span class="hps">to know what things</span> <span class="hps">they</span> <span class="hps">invited him to</span> <span class="hps">try it for</span> <span class="hps">yourself.</span></span><br />
<br />
<span class="" id="result_box" lang="en"><span class="hps">Finally, the</span> <span class="hps">procedure to uninstall</span> <span class="hps">Oracle</span> <span class="hps">Linux</span> <span class="hps">on your machine</span> <span class="hps">is:</span></span><br />
<br />
<ol><li>$ su -</li>
<li> $ dpkg -P oracle-xe-universal</li>
<li>$ rm -rf /usr/lib/oracle/</li>
<li>$ rm /etc/oratab</li>
<li>$ rm /etc/init.d/oracle-xe</li>
<li>$ rm -rf /usr/share/doc/oracle_xe</li>
</ol><span class="short_text" id="result_box" lang="en"><span class="hps">Success!</span> <span class="hps">We already have </span><span class="hps">Oracle</span> <span class="hps">uninstalled</span><span class="">.</span></span><br />
<br />
<br />
<span class="" id="result_box" lang="en"><span class="hps">Pd</span> <span class="hps">1: Do not</span> <span class="hps">remember if</span> <span class="hps">we have to restart</span> <span class="hps">or not, but</span> <span class="hps">we lose</span> <span class="hps">nothing</span> <span class="hps">by doing so</span> <span class="hps">entering</span> <span class="hps">the following command</span> <span class="hps">sudo</span> <span class="hps">reboot</span><br />
<br />
<span class="hps">Pd</span> <span class="hps">2: The</span> <span class="hps">$ sign</span> <span class="hps">means that</span> <span class="hps">we are working</span> <span class="hps">on the console</span></span><div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-79405314771885333592011-09-12T22:33:00.000-07:002011-09-13T08:23:46.860-07:00Ubuntu automatic shutdown script<span class="" id="result_box" lang="en"><span class="hps">Hi,</span> <span class="hps">this entry</span> <span class="hps">will</span> <span class="hps">pass</span> <span class="hps">a script that</span> <span class="hps">has a menu with</span> <span class="hps">functions</span> <span class="hps">such as turning off</span> <span class="hps">the computer at</span> <span class="hps">a</span> <span class="hps">time or</span> <span class="hps">in a given period</span> <span class="hps">or reboot.</span></span><br />
<span class="short_text" id="result_box" lang="en"><span class="hps">I always</span> <span class="hps">use it.</span> <span class="hps">So</span> <span class="hps">I share</span> <span class="hps">with you.</span></span><br />
<span class="" id="result_box" lang="en"><span class="hps">Nothing else</span> <span class="hps">should</span> <span class="hps">create a.</span> <span class="hps">Sh</span> <span class="hps">and assign permissions</span> <span class="hps">to run</span> <span class="hps">simply by typing</span> <span class="hps">in the</span> <span class="hps">terminal</span> <span class="hps">the following command</span></span> <i>chmod a+x <fichero>.sh</i><br />
<br />
sudo su!/bin/sh<br />
clear<br />
echo ” ****Welcome to automatic shutdown script****”<br />
echo “”<br />
echo “”<br />
echo ” MENU”<br />
echo ” 1.-Shutdown PC NOW”<br />
echo ” 2.-Reboot PC NOW”<br />
echo ” 3.-<span class="short_text" id="result_box" lang="en"><span class="hps">Shutdown PC</span> <span class="hps">at a set time</span></span>”<br />
echo ” 4.-<span class="short_text" id="result_box" lang="en"><span class="hps">Shutdown PC</span> <span class="hps">in a given period</span></span>”<br />
echo ” 5.-Exit”<br />
echo “”<br />
<br />
echo -p “<span class="short_text" id="result_box" lang="en"><span class="hps">Select an</span> <span class="hps">option:</span></span> ”; read OPTION<br />
case $OPTION in<br />
1) sudo halt;;<br />
2) sudo reboot;;<br />
3) echo -n ” <span class="short_text" id="result_box" lang="en"><span class="hps">Enter the</span> <span class="hps">time</span> <span class="hps">off:</span></span> ”<br />
read hour<br />
sudo shutdown -h $hour;;<br />
4)echo -n ” <span class="" id="result_box" lang="en"><span class="hps">Enter the</span> <span class="hps">number of minutes</span><span class="">, after</span> <span class="hps">which the</span> <span class="hps">PC</span> <span class="hps">is</span> <span class="hps">turned off</span><span>:</span></span> ”<br />
read minutes<br />
sudo shutdown -h $minutes;;<br />
5) exit;;<br />
*) echo ” OPTION NOT VALID”<br />
exit 1;;<br />
exit 0<div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0tag:blogger.com,1999:blog-3863511852255761690.post-52577534549453356202011-09-12T21:54:00.000-07:002011-09-13T08:17:01.321-07:00Welcome<span class="" id="result_box" lang="en"><span class="hps">Hello</span> <span class="hps">Earthlings</span><span class="">, the goal</span> <span class="hps">of this blog</span> <span class="hps">is to create</span> <span class="hps">a knowledge base</span> <span class="hps">with what</span> <span class="hps">you learn</span> <span class="hps">in the great</span> <span class="hps">world</span> <span class="hps">of computing.</span><br />
<br />
<span class="hps">Anyway,</span> <span class="hps">I welcome you</span> <span class="hps">and</span> <span class="hps">hope we</span> <span class="hps">share</span> <span class="hps">valuable information!</span></span><div class="blogger-post-footer">Christopher Jiménez Valverde</div>Anonymoushttp://www.blogger.com/profile/18385125349773493834noreply@blogger.com0