Free online library on electronics. All issues of Circuit Cellar mazagine and more
Engineering and technology notes
HOWTO: Repair a broken Ext4 Superblock in Ubuntu | Linux Expresso
HOWTO: Repair a broken Ext4 Superblock in Ubuntu
31mar10This has happened to me a few times, and it’s not a nice problem to find yourself in. You computer won’t boot, all your filesystem checks tell you you’ve a bad superblock, but you cant seem to find how to fix it. Well, here goes
This guide is for ext4 , though I’ll explain how other filesystems can be cured along the way. The easiest way to carry all this out, seeing as your computer probably won’t boot at this stage, is to download and burn a copy of Parted Magic. Boot from that, and you’ll access to a number of useful tools.
First, figure out what partition we’re dealing with.
1sudofdisk-lThe above will list all the partitions on all the drives in your computer. To recover a lost partition, your going to need Testdisk. Testdisk is included in Parted Magic, and there’s a great guide on their site. For this though, we just need the partition number, such as /dev/sda3 or /dev/hdb1.
Now, make sure your superblock is the problem, by starting a filesystem check, replacing xxx with your partition name. Here, you can change ext4 to ext3, or ext2 to suit the filesystem.
1sudofsck.ext4 -v/dev/xxxIf your superblock is corrupt, the output will look like this
Source: HOWTO: Repair a broken Ext4 Superblock in Ubuntu | Linux Expresso
php pass data to html form – Stack Overflow
I have php file that contains variables:$t1 = $_POST[‘t1’];$t2 = $_POST[‘t2’];and I need to pass these variables into the respective html form fields:form is located in different page than php file with variables. it’s url is “form.php”I guess I need to create php post command in my php file that redirects to url “form.php” and loads $t1 and $t2 into respective form fields “field_1” and “field_2”?Trying around but can not find right solution..Any ideas appreciated Brgds, Raivis
html – How to call a JavaScript function, declared in , in the body when I want to call it – Stack Overflow
I have a working JavaScript function declared in the head of an HTML page. I know how to create a button and call the function when the user clicks the button. I want to call it myself some where on the page:myfunction();How do I do it?
XML DOM – HttpRequest object
Source: XML DOM – HttpRequest object
php – POST from XMLHttp with parameters – Stack Overflow
I’m trying to post data to a PHP page and check the response. Here is an example. What is wrong with this code?index.html
Source: php – POST from XMLHttp with parameters – Stack Overflow
Select last row in MySQL – Stack Overflow
How can I SELECT the last row in a MySQL table?I’m INSERTing data and I need to retrieve a column value from the previous row.There’s an auto_increment in the table.
mysql – Add Auto-Increment ID to existing table? – Stack Overflow
I have a pre-existing table, containing ‘fname’, ‘lname’, ’email’, ‘password’ and ‘ip’. But now I want an auto-increment column. However, when I enter:ALTER TABLE usersADD id int NOT NULL AUTO_INCREMENT
Source: mysql – Add Auto-Increment ID to existing table? – Stack Overflow
How to call a PHP file from HTML or Javascript – Stack Overflow
I’ve looked around for a long while now and I can’t find anywhere that answers this seemingly basic question. I don’t care if the page reloads or displays the results immediately; I just want to have a button on my website make a PHP file run. That’s it. And I’ve found that all websites either tell you how to run the PHP code in your HTML directly or tell you to use ajax. I’ll use ajax if it turns out to be necessary, but there was a time before ajax existed that PHP was used, so I think there’s a simpler way. If I can write the code inside HTML just fine, why can’t I just reference the file for it in there or make a simple call for it in Javascript?If it does turn out that ajax is the only way forward, what do I need to know about it to call a PHP file that will create a text file on a button press? I’m making a simple blog site for myself and I’ve got the code for the site and the javascript that can take the post I write in a textarea and display it immediately. I just want to link it to a PHP file that will create the permanent blog post on the server so that when I reload the page, the post is still there.Thanks for taking the time to read and answer.
Source: How to call a PHP file from HTML or Javascript – Stack Overflow
Huawei HG8245 backdoor and remote access
The Huawei HG8245 ONT, firmware version V1R006C00S100 which provides cellular services, contains 3 severe vulnerabilities: two administrator accounts enabled by default and a public administration interface exposed to the Internet.
Arduino – WebClient
This example shows you how to make a HTTP request using an Ethernet shield. It returns a Google search for the term “Arduino”. The results of this search are viewable as HTML through your Arduino’s serial window.
Source: Arduino – WebClient
Arduino – DhcpAddressPrinter
This sketch uses the DHCP extensions to the Ethernet library to get an IP address via DHCP and print the address obtained using an Arduino Ethernet shield. DHCP is used to assign an IP address when Ethernet.begin(mac) is called. Using DHCP significantly increases the size of a sketch. Using the localIP() function, the assigned IP address is sent out via the serial monitor.
Source: Arduino – DhcpAddressPrinter
