Okay, guys. This note from Nabeel is all I needed to fix this. I didn’t need to change permissions (I spent over an hour trying all that stuff last night and changing them back for safety). Also didn’t need to contact my host or anything. There was simply a slash in front of the directory in the default section under Settings, Miscellaneous. Removed the slash and the pictures posted. Thanks Nabeel. Here’s the note from him to another user:
hello tan,
please make sure it is “wp-content/uploads” and not “/wp-content/uploads”
waiting to know if it was still not solved.
My default had the slash in front. Amazing. I didn’t need to change permissions or anything.
> I am working on retrieving the call stack information on MIPS
> platform. Does glibc support backtrace on MIPS either through
> backtrace() APIs or any other mechanism ? In i386, glibc has a set of
> 3 backtrace APIs which use the gcc builtins, __builtin_return_address
> and __builtin_frame_address to retrieve the stack frame information.
> However there seems to be no such implementation available for MIPs.
> Is it true ? Please correct me if I am wrong.
> On MIPS though, I am able to get the current function s return address
> using the gcc builtin, __builtin_return_address. I also have the
> current function s frame pointer. My doubt is how do I traverse back
> to get the information about previous frame and the subsequent ones..?
You can't reliably. MIPS code does not always use a frame pointer, and
without one the stack frame is not predictable. That's why
__builtin_return_address doesn't work for >0.
Some architectures use .eh_frame if it is available to do backtraces.
I don't know why glibc doesn't do that by default for all
architectures. If it did, you could use -fasynchronous-unwind-tables
to generate code that glibc could backtrace through. Otherwise, your
best bet is to invoke an external GDB.
For the records, these are the steps to move a wordpress blog to another domain to make it work properly.
UPDATE wp_options SET option_value =
replace(option_value,'http://www.old-domain.com','http://www.new-domain.com')
WHERE option_name ='home' OR option_name ='siteurl';
UPDATE wp_posts SET guid =
replace(guid,'http://www.old-domain.com','http://www.new-domain.com');
UPDATE wp_posts SET post_content =
replace(post_content,'http://www.old-domain.com','http://www.new-domain.com');
This is about installing eclipse for Ubuntu 9.x new desktop version. You can run any eclipse you want to this way! I have taken this content from here for easier and faster reference. I have also added my own stuff to it, which I found would make eclipse start up properly. So read on.
On ubuntu, remember this always:
Please download the x86_64 version of eclipse-<version-name> and NOT the 32 bit version. That won’t work!
These instructions assume you’ve downloaded and extracted the above mentioned Eclipse tarball:
If you use, sudo chmod 755, it wont allow you to edit the /usr/bin/eclipse file in some systems, hence I have changed it to chmod 777 instead. you can change back to 755 after editing the file!
Also see that ECLIPSE_HOME is set to /opt/eclipse (WITHOUT QUOTES)
Now you can execute Eclipse from anywhere in your bash shell by just typing ‘eclipse’.
I had come across a situation where my Eclipse IDE used to crash or shutdown forcibly due to less memory being available. After searching around for a while, I came across a command that enables you to start this IDE with more memory. Here it is:
eclipse -vmargs -Xmx<memory size>
I have tried combinations of 512M and 1024M (0.5 GB and 1GB respectively) and the IDE worked fine without a crash since then. This is a useful command and I hope you can refer this site for starting up eclipse with more memory in future and avoid some precious time saving IDE crashes in future!
UPDATE: On this link, I also found six common errors one would make while starting up eclipse with virtual memory arguments. I reproduce here the excerpt of the six errors:
Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size. Here are some common mistakes I have seen when using them:
Missing m, M, g or G at the end (they are case insensitive). For example,
java -Xmx128 BigAppjava.lang.OutOfMemoryError: Java heap space
The correct command should be: java -Xmx128m BigApp. To be precise, -Xmx128 is a valid setting for very small apps, like HelloWorld. But in real life, I guess you really mean -Xmx128m
Extra space in JVM options, or incorrectly use =. For example,
java -Xmx 128m BigAppInvalid maximum heap size: -XmxCould not create the Java virtual machine.
java -Xmx=512m HelloWorldInvalid maximum heap size: -Xmx=512mCould not create the Java virtual machine.
The correct command should be java -Xmx128m BigApp, with no whitespace nor =. -X options are different than -Dkey=value system properties, where = is used.
Only setting -Xms JVM option and its value is greater than the default maximum heap size, which is 64m. The default minimum heap size seems to be 0. For example,
java -Xms128m BigAppError occurred during initialization of VMIncompatible initial and maximum heap sizes specified
The correct command should be java -Xms128m -Xmx128m BigApp. It’s a good idea to set the minimum and maximum heap size to the same value. In any case, don’t let the minimum heap size exceed the maximum heap size.
Heap size is larger than your computer’s physical memory. For example,
java -Xmx2g BigAppError occurred during initialization of VMCould not reserve enough space for object heapCould not create the Java virtual machine.
The fix is to make it lower than the physical memory: java -Xmx1g BigApp
Incorrectly use mb as the unit, where m or M should be used instead.
java -Xms256mb -Xmx256mb BigAppInvalid initial heap size: -Xms256mbCould not create the Java virtual machine.
The heap size is larger than JVM thinks you would ever need. For example,
java -Xmx256g BigAppInvalid maximum heap size: -Xmx256gThe specified size exceeds the maximum representable size.Could not create the Java virtual machine.
The fix is to lower it to a reasonable value: java -Xmx256m BigApp
The value is not expressed in whole number. For example,
java -Xmx0.9g BigAppInvalid maximum heap size: -Xmx0.9gCould not create the Java virtual machine.
The correct command should be java -Xmx928m BigApp
So you might have wondered what a MAP is? I am tyring to demystify it a bit, so pardon my technical way of putting it if its not so perfect! Its always best to think of any C++ related concept by taking an example from the real world. I have found that it always benefits me that way.
So lets take an office full of employees. Further more also lets assume that the employee ID is a unique number by which that employee is identifiable in that office. Now also lets have the following information about the employee
Age, Sex ,Address, First name, Last name – as parameters for identifying the employee in a more detailed fashion, and
Gross Salary, Net Salary and Tax per annum – as parameters for identifying the finances related to the employee.
Bear in mind that both these sets of data, are primarily associated with the employee ID. So now we can construct two sets of tables which have this data.
Table 1:
Employee ID
Identification information
1094
32
Male
771, Koramangala Layout, Bangalore City
Srikanth
Eswaran
2056
35
Male
HSR Layout, Apartment 101, Bangalore City
Kiran
Vinayababu
Table 2:
Employee ID
Salary information
1094
$60000 (gross)
$48000 (net)
$10375 (tax)
2056
$120000 (gross)
$70000 (net)
$25000 (tax)
So now what is it we can do to effectively not only store, BUT ALSO cross reference this information? We can use maps, not one, but two of them to put ease into the information access!
MAP1: This is a map between a number and Identification information MAP2: This is a map between a number and Salary information
Having these two maps, its easy now to switch between the information from both these maps, based on the unique employee id associated with the data! We shall see how in a short while.
the “.first” and “.second” operators (if i may call them so) maybe used to access the values in the first and second column of the map respectively. So for eg., in the first map above,
Id2Identity::iterator it;
it->first or (*it).first will give the employee ID
and it->second or (*it).second will give the structure containing identity details. for eg if we need the last name of the employee, then we say
it->second.lastName on the first record will be = “Eswaran”.
Having said this, now its easy to access the second column, if we have the first, by doing a find operation using the first column value. For eg., it->find(1094) on the first map will yield the structure having this data. So I can say it->find(1094).lastName and it will still return “Eswaran”
32
Male
771, Koramangala Layout, Bangalore City
Srikanth
Eswaran
Remember that the find operation is a O(log2(n)) operation compared to iterating through all the entries in the map on our own using an iterator, which is O(N).
So now it wont be difficult to find the tax of a person having an ID which you need to get if I would say that person’s last name is “Eswaran”. Try it, and you will soon feel maps are powerful and easy to use! More later!
I had an email from a friend which contained the below presentation showing what is important when you talk to VC’s for getting them to invest on you or your company. I would not want to write too much in detail, but will leave you with the video for you to see and enjoy.
There are many comments for and against this presentation. Its upto my readers to make their opinions out of this presentation for themselves !
TFTP (or Trivial File Transfer Protocol) is used by the boot rom in several vendors’ machines to download the boot loader and/or the kernel. This service runs over TCP/IP, so the client must first obtain an IP address, typically via rarp, bootp, or dhcp means
1. firstly there should be a directory called ‘tftpboot’ under ‘/’, if not this must be set up by doing a mkdir -p /tftpboot (this is on the linux host and not on target) 2. copy the linux kernel into this directory 3. we also need to start the tftp service if not already there, with some minor changes 4. edit the file /etc/xinetd.d/tftp and change the value ‘disable’ to ‘no’ from ‘yes’
# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< per_source = 11 cps = 100 2 flags = IPv4 }
5. Save the file, and restart the xinetd service by issuing ‘/sbin/service xinetd restart’ 6. now the TFTP service should be started and the linux kernel should be available for boot from the target side.
and finally on a target which has a CFE terminal (Custom Firmware Extender), we can use a command such as :
boot -z -elf vvv.xxx.yyy.zzz:vmlinuz_full_kernel_name ‘console=<console_name>,<baud_rate> rootfstype=<root file system type> root=<partition name for root dir> <mode of boot for this file sys> ‘
vvv.xxx.yyy.zzz = the IP address of the linux host which has the linux kernel to be used for booting target
some typical examples for
console name = ttys1, ttys2, etc baud rate = 115200, 9600 etc rootfstype = ext3, swap etc partition name = /dev/hda1, /dev/sda3, etc mode of boot = r – read, w – write, rw – read/write
NOTE: it is important that we first set up the target board for ethernet connectivity via DHCP or other means such as giving it a static IP address This is easily done with the command: ifconfig eth0 -addr=155.44.55.77;
I found a presentation on using gdbserver backend through applications (IDE) such as Eclipse. It outlines a few important facts about how to configure Eclipse for debugging programs running on remote targets. Though the document itself goes on to talk about how to debug stacks and heaps, what I found relevant for now is the configuration of eclipse for using remote debugging.
The GDB or the GNU Debugger has by far been the most simplest to learn, use and yet its elegance in terms of what it can do to help out is amazing. Even the most complex of debugging IDEs use GDB internally. One such example is the Data Display Debugger under Linux. Another IDE that can use GDB is Eclipse.
Here the most common commands are presented in the form of a quick reference card:
This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress. Related PostsNo related postsShare [...]more →