Saturday, 8 June 2013

How can I use a variable from a script?

How can I use a variable from a script?

A bash script is running as I defined it in Startup Applications. It is possible to display on terminal a variable used in that script? If yes, how?

Make all pages 100% width?

Make all pages 100% width?

My site isMagmoz, I am wondering how to make the page always 100% in width, because right now it's not. I want to make all posts and pages 100% width, what code do I put in style.css?
Thanks!

How I can create shortcut for maximize-minimize window in Lubuntu?

How I can create shortcut for maximize-minimize window in Lubuntu?

In lubuntu-rc.xml Lubuntu doesn't have hotkey for maximize window.

Ddelete and arrow keys not working

Ddelete and arrow keys not working

After installing 12.04 and Gnome Shell, I find that the arrow and delete keys, along with the insert, home, page up & down, and end keys have stopped working.
All these keys now appear to be XF86MonBrightnessdown whatever that is.
Any fix for this?

Create a computer user in Windows 8

Create a computer user in Windows 8

This may seems like a stupid question, but I have not used window 8 before.
How do I create a normal new user on a Windows 8? The control panel does have a create user option, but it require me to fill in information about date of birth, phone number, email and other personal information. There were even a "ensure you are human question" at the end.
I just want to create a new user on this computer to have my own desktop, I do not want to sign up to a Microsoft account. Is there not a option to do that?

stopping spam, worms ... SPF

stopping spam, worms ... SPF

can this stop spam and worms? how come its not more widely used? http://www.libsrs2.org/overview.html
WHAT EMAIL FORWARDING SERVICES NEED TO KNOW ABOUT SPF
To combat spams, worms, and viruses, the new anti-forgery standard called SPF adds a layer of protection to SMTP. When an SPF-aware MTA receives mail (from, say, username@aol.com ), it asks the envelope sender’s domain ( aol.com ) if it recognizes the IP address of the SMTP client. The domain publishes SPF records in DNS describing its outbound servers, as a sort of “Reverse MX” record. If those records do not describe the client IP, the MTA may reject the SMTP transaction as a forgery attemp

Put iPod Nano 7G music on to iTunes

Put iPod Nano 7G music on to iTunes

I have recently reset my computer. While doing this, I deleted my song library. Can anyone help me copy all the songs on my iPod Nano 7th generation on to iTunes?

Sunday, 2 June 2013

Few clarifications about the DOM

Few clarifications about the DOM

I have been trying to understand the DOM and although, I have a fair idea of what it is, there are certain ideas I just cannot pin down. I will list down what I think the DOM is and my questions will be inline.
1.The DOM is a fully object-oriented representation of the web page.The W3C DOM standard forms the basis of the DOM implemented in most modern browsers.
So does the DOM talk about how an XML/HTML document as an object model ?
2.The DOM does not specify that documents must be implemented as a tree or a grove, nor does it specify how the relationships among objects be implemented.
In what other ways can the document be represented ?
3.When you do something like this -
document.write('welcome to my home page!');
The document object is provided by the DOM.The write methods are the interfaces that are exposed to JavaScript by the DOM.
So the objects and it's methods are created as JavaScript objects by the DOM parser and then presented to the JavaScript engine? Or the objects and methods are within the DOM parsing engine in their own native language ? and is exposed to the JavaScript engine ? if this is so then what is responsible for translating from JavaScript to the native language
4.What are language bindings ?
The language binding is the set of objects native to the language in question that implements each of the interfaces in the DOM specification.
Developers can create language bindings from the DOM to their language simply by following the IDL (Interface Definition Language) in the DOM specification.
So if the DOM parsing engine is implemented in say C++, does that mean that when you create language bindings by following the IDL, you are just creating objects in the specific language, i.e C++ that your DOM parsing engine is built with ?

Remember password after `sudo -i`

Remember password after `sudo -i`

If I do sudo <command> and enter the password, my Debian Squeeze remembers the fact I passed the password and never asks for it for i.e. 15 minutes.
But if I do sudo -i and then exit, the system does not remembers the password and asks for it all over again every time I use sudo -i. Doing just once sudo <command> makes the system not ask for password even for a next sudo -i.
Here are the scenarios I've described above:
First one:
login (by SSH),
sudo <command>: system's asking for the password,
sudo -i: system is not asking for the password.
Second one:
login (by SSH),
sudo -i: system's asking for the password,
exit
sudo -i: system's again asking for the password.
Doing sth beetween 2. and 3. makes the system remember the password.
What is the reason of such a behaviour? Is it possible to make the system remember the password (fact I passed it) also after using sudo -i?

titlesec: \assignpagestyle problem with part

Random volume changes after starting games

Random volume changes after starting games

I've been having this problem for a while now, and even though I found a half-patch at some point perhaps someone can tell me how to properly solve it once and for all.
Essentially, certain games and applications (Super Meat Boy, Braid, XBMC) will make the volume go crazy, going up and down more or less at random (although usually tending on the "more" side). After closing the application, if I switch to a console, I'll see the cursor flashing rapidly (something like 5 times per second or so) for a while the volume still goes crazy, until both problems stop at the same time (the cursor goes back to normal, and the volume stabilizes).
A patch I've been using is, essentially, running the following script before any app which I know triggers this problem:
xmodmap -e "keycode 122 = 0x0000"
xmodmap -e "keycode 123 = 0x0000"
This lines, essentially, are remapping the volume up/down keys to nothing, and that stops the problem from happening, but then again, it also causes my volume keys to stop working.
Can anyone help me understand what is going on here? The only common thread between the applications seems to be the fact that they all make intensive use of graphics. I'm running Ubuntu 12.04 on a HP Notebook, and even though this problem is now happening with Cinnamon, it used to happen already on Gnome 2.

changed the drivers for GPU and now the computer wont start

changed the drivers for GPU and now the computer wont start

I changed the drivers for the GPU in ubuntu 12.04 because there were 4 available versions and I wanted to try them to fix the resolution problem, but when I restarted it now the computer wont start and it showing me the following options:
ubuntu, with linux 3.5.0-32-generic
ubuntu, with linux 3.5.0-32-generic (recovery mode)
Previous linux versions
memory test (memtest86+)
memory test (memtest86+, serial console 115200)
or I can press 'c' for command line.
I assume I need to fix the drivers but I dont know how to do it with the command line

Uninstalling Linux Partitions

Uninstalling Linux Partitions

My system has the option to boot up into three different OS's.
Windows 8
Linux PearOS 7
Linux Backtrack R5
The Windows 8 is installed on my C: drive and I'm perfectly content with that. Linux PearOS 7 is installed on my D: drive along with Linux Backtrack R5.

My D: drive in addition to holding my two Linux partitions also contains several hundred gigabytes of data that is not backed up, or stored anywhere else. I would like to uninstall my Linux PearOS 7 OS to retrieve the several gigabytes taken by it, (20 GB I think)

Is there any way that I can successfully keep my Linux Backtrack R5, Windows 8, and the data on my D: drive intact while removing the installed Linux PearOS 7 OS from the D: drive without having the removal touch any data on the D: drive.
-Thanks in advance.

Level Pacing in a Mobile Game

Level Pacing in a Mobile Game

I've been creating a small little mobile game on and off for a while now.
Having got all the game mechanics in place I'm now trying to figure out how to organise these into levels to get satisfying pacing.
Are there any good guidelines for this? Or articles on it?
I've got a few variables that I can play with that can make the game more interesting and varied for example:
Number of entities to deal with
Number of kinds of entities
Directions they come from.
I just don't have much of a clue how to pace it.

Is it possible for users to insert forbidden characters into sites with htmlentities or mysqlescapestring?

Is it possible for users to insert forbidden characters into sites with htmlentities or mysqlescapestring?

So, in my brief research in PHP security, I have been guided toward two important functions to remove forbidden characters from forms. One being "htmlentities" and the other being "mysql_escape_string" - what I am wondering is if there is a common way for hackers to insert malicious forbidden characters in to the forms despite the functions. I am suspicious that this is possible, since this is such a commonly employed security technique. Is an extra layer of security needed?
NB: I understand that mysql_escape_string may become deprecated soon.

13.4 and sony t2xp no launcher etc

13.4 and sony t2xp no launcher etc

I have a sony t2xp laptop with xp installed. I have installed 32bit ubuntu 13.4 as a dual boot but I have no launcher or toolbar.
I have tried going through ccsm and re enabling unity but it never stays enabled and it doesn't start the launcher.
I realise this is an old laptop will it support this version of ubuntu ?

Can I combine two LANs into one to get double speed?

Can I combine two LANs into one to get double speed?

I have 2 LANs in my own PC & 2 Routers (TP-Link WR941N each) with 2 internet accounts (512Kbps each) connected to the same ISP signal & company using NanoStation 5 from ubnt.
As you know the connections work separately by default! (I use Windows 7 64bit)
Can I merge them to get double speed (download/upload simultaneously) using regedit or special software or any other method?
I'd be much appreciated if u could help me doing that
Best Regards, Salaam

Tuesday, 28 May 2013

Poroblem whit "update" command, how can i solve this?

Poroblem whit "update" command, how can i solve this?

I had a problem while booting my PC, the same as in the link (this one) and i tried with that instructions, but I'm stuckat the 7° step. I typed
update /etc/initramfs-tools/conf.d/resume UUID=d6cc5d42-0375-48a2-b4e1-a3a52ad25c7a
But I get
Not found the command "update", perhaps you mean:
The command "pupdate" package "pbuilder-scripts" (universe)
The command "lupdate 'package' qt4-linguist-tools' (main)
The command "uupdate 'package' devscripts' (main)
The command "XUpdate 'package' libxml-libxml-perl-XUpdate '(universe)
update: command not found
Any ideas about how to solve it?
P.D.: I am using Ubuntu 13.04.
Sorry for my english, i'm from Argentina :D

Black Screen when booting Ububuntu 12 on iMac

Black Screen when booting Ububuntu 12 on iMac

here is a summary of what i done so far:
install rEFT and create a bootable usb device with unetbootin (ubuntu 12.04) on osx
reboot and install ubuntu 12.04 with no errors
boot GRUB from the rEFIT
boot Ubuntu from GRUB
Ubuntu logo pops up and then i got a black screen
Doesn't change when i hit str-alt-F(1-10)
I have found a lot of log-files, maybe someone can understand it?
I think it maybe the NVIDIA ? or something wrong with the x-org?
dont even know what that is, xorg ...



here are my specs:
imac 2012, 2.7 ghz intel core i5, NVIDIA geforce gt 640m, 8 gig ram, 1 tb hdd



and here is the boot.log on the ubuntu partition:
fsck von util-linux 2.20.1 fsck von util-linux 2.20.1 dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN /dev/sda4: sauber, 180336/6914048 Dateien, 1305308/27653888 Blöcke /dev/sda1: 17 files, 47597/403218 clusters
modem-manager[855]: ModemManager (version 0.5.2.0) starting...
modem-manager[855]: Loaded plugin Wavecom
...
modem-manager[855]: Loaded plugin Sierra
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Starting AppArmor profiles [240G [234G[ OK ]
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
saned disabled; edit /etc/default/saned
Stopping System V initialisation compatibility [234G[ OK ]
Starting System V runlevel compatibility [234G[ OK ]
Starting restore sound card(s') mixer state(s) [234G[ OK ]
Starting LightDM Display Manager [234G[ OK ]
Starting ACPI daemon [234G[ OK ]
Starting anac(h)ronistic cron [234G[ OK ]
Starting save kernel messages [234G[ OK ]
Starting crash report submission daemon [234G[ OK ]
Starting CPU interrupts balancing daemon [234G[ OK ]
Stopping restore software rfkill state [234G[ OK ]



and i found this Xorg.0.log :
...
[ 15.620] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory
[ 15.620] (II) NVIDIA: access.
[ 15.624] (WW) NVIDIA(0): ACPI: AC power state information is not available under
[ 15.624] (WW) NVIDIA(0): /sys/class/power_supply/ , nor under
[ 15.624] (WW) NVIDIA(0): /proc/acpi/ac_adapter/
[ 19.625] (EE) NVIDIA(GPU-0): EVO Push buffer channel allocation failed
[ 19.625] (EE) * Aborting *
[ 19.625] (EE) NVIDIA(GPU-0): Failed to allocate EVO core DMA push buffer
[ 19.625] (EE) * Aborting *
[ 19.625] Fatal server error:
[ 19.625] AddScreen/ScreenInit failed for driver 0
[ 19.625]
[ 19.625] (EE)
Please consult the The X.Org Foundation support at http://wiki.x.org for help.
[ 19.625] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 19.625] (EE)
[ 19.629] Server terminated with error (1). Closing log file.



and also the failsave-x.log:
...
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
vesa: Ignoring device with a bound kernel driver
vesa: Ignoring device with a bound kernel driver
Fatal server error:
no screens found
(EE)
Please consult the The X.Org Foundation support at http://wiki.x.org for help.
(EE) Please also check the log file at "/var/log/Xorg.failsafe.log" for additional information.
(EE)
Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to

Spellcheck in Outlook

Spellcheck in Outlook

I have read and researched about not having spellcheck in Outlook, which apparently was a recent mandatory upgrade (?) in MS e-mails. I am using IE10 and have tried all the options suggested in answer to questions about this issue (there is no Spell Check option between "Save Draft" and "Options," although it appears this should only be a problem when using Firefox, etc. Nothing I try has helped me find a spellcheck in Outlook. I find myself opening Word and copying/pasting questionable words. HELP!