## How to enable wifi using keyboard (Dell Inspiron 14r) in suse Linux 11.4

I have installed both Windows and SUSE Linux (11.4) on my Dell Inspiron 14r laptop. Both are working properly.

I am facing one strange problem.

I went to my Linux OS WiFi was working fine and I pressed fn+f2 in-order to disable WiFi.
WiFi got disable successfully but when I again pressed fn+f2 it is not enabling WiFi.
I can see WiFi disabled. Instead of that bluetooth icon got enable.

Then I switched to Windows and again pressed fn+f2 and WiFi got enabled.
Then I switched to Linux OS and I can see my WiFi enabled.
Again I pressed fn+f2 and it got disabled and I’m not able to enable it by pressing fn+f2 again.

How can I enable WiFi on SUSE (11.4)?

## Recursive function to traverse directories using fork() running too many times

I am trying to get a better understanding of the concept of forking a process by traversing a directory in C.

My function is not working how I expect it to: some of my directories and files are being visited multiple times.

I’m supposed to start at the current working directory and list all files/folders. Every time a subdirectory is found, I’m supposed to call fork() and do the same, until I’ve exhausted every file/directory. I don’t need to visit the items in any specific order, but I do need to visit each one exactly once.

I got the program working recursively without using fork(). But I can’t quite get it right using fork(). Here’s the function. It just gets passed the string “.”, to start it off at the current working directory.

int traverse(char* directory)
{
struct dirent *currentDir;
DIR *traverser = opendir(directory);

if (traverser == NULL)
{
printf("Error: Could not open directory.n");
return 0;
}

while ((currentDir = readdir(traverser)) != NULL)
{
if (currentDir->d_type == DT_DIR && strcmp(currentDir->d_name, ".") != 0 && strcmp(currentDir->d_name, "..") != 0)
{
int PID = fork();
forkCount++;

char pathBuffer[1024];

if (PID == 0)
{
snprintf(pathBuffer, sizeof(pathBuffer), "%s/%s", directory, currentDir->d_name);
traverse(pathBuffer);
}
else
{
listOfPIDS[forkCount] = PID;
int status = 0;
wait(&status);
}
}
else if (strcmp(currentDir->d_name, ".") != 0 && strcmp(currentDir->d_name, "..") != 0)
{
printf("%sn", currentDir->d_name);
}
}

closedir(traverser);
return 0;
}

## Passive FTP on Windows Server 2008 R2 using the IIS7 FTP-Server

During the last few days I have been setting up a Windows Server 2008 R2 in a VMware. I installed the standard FTP-Server on it by using the Webserver (IIS)-role.

Everything works fine with accessing my FTP-Site with ftp://localhost in Firefox. I can also get access to it via the local IP of my Server. Actually everything works fine in my LAN.

But here’s my problem:
I want to get access “from outside”, using the external IP or a dyndns-URL. I have a LinkSys-Router in front of my Server, therefore I’m forwarding all the important ports.

If you may now think “this idiot has probably forgotten some ports”, I must dissappoint you. It even works getting access to my Server-Website and messing around in some WebInterfaces.

The problem is my passive FTP (active works for me). I always get a timeout, when e.g. FileZilla waits for a response to the LIST-command. The one big thing I don’t get, is, why my Server sends a response to the PASV-command, naming a port like 40918, even if I have restricted the data port range for my passive FTP ( in the IIS-Manager) to e.g. [5000-5009].

I simply don’t want to open and forward all possible data ports!

And another thing is, I can’t specify a static external IP address for my server, since I don’t own any.

I have already tried these solutions:

• Out Of Band FTP 7 shows “Operation timed out”
• How to Configure Windows Firewall for a Passive Mode FTP Server
• ServerFault — Passive ftp on Server 2008

## — EDIT: —

There is one idea rising up in my mind:
When I use FileZilla to connect by passive mode I always get something like this:
227 Entering Passive Mode (192,168,1,102,160,86)
According to a Rhinosof-article FZ tries to connect on port “160*256+86 = 41046“, although I have restricted the data ports (as mentioned above). Could this be caused by the router, that doesn’t forward out-ports directly, but uses different ones?
(–> The IP-Adress given is the local one, since I’m not able to define a static external in the IIS-Mgr)

## — EDIT 2: —

I have had an idea about changing the dynamicportrange via netsh interface, but not even the examples given by the help-text itself worked. I think I’ll give it up with the IIS-FTP und then use the FileZilla-Server.
Conclusion: Hello freeware, bye “costs, but simply works”-Windows * cough *.

## How to generate tiles using gdal2tiles that can be used for google.maps.ImageMapType?

Using GDAL tools such as gdal2tiles.py, allows one to generate map tiles from a single image file.

However, the tiles generated by gdal2tiles doesn’t seem to be like one used for google.maps.ImageMapType Overlay

How to generate tiles using gdal2tiles that can be used for google.maps.ImageMapType?

## Remotely view a live stream from the pi using 3g dongle

I am trying to view the live video stream of a camera connected to the raspberry pi remotely. I have a 3g Dongle (wvdial) connected to the pi. Currently I am using motion software to do the live streaming and recording. I am able to view the live stream locally on a web browser of the pi. But, how do I view the stream remotely from anywhere using the same 3g dongle (without static IP) and camera? I need to stream this video to my web server too.

## Using mysqldump to initialize slave database

I’ve facing an issue I don’t really understand.

I wan’t to synchronize a slave MariaDB database to a master one.

I try to use the mysqldump option –master-data=1 which is adding a “CHANGE MASTER TO” in the output file to set the bin log file and position for the slave. I’m assuming (as per the doc) than it should be enough for the slave to know where to start.
When I import the file to the slave and start slave, the slave is desynchronized

If I do a “FLUSH TABLES WITH READ LOCK;”, SHOW MASTER STATUS etc then at the end manually do a “CHANGE MASTER TO”, all if fine and synchronized

I would assume the –master-data=1 would generate the same bin log information as the manual way, but it is not.

Where am I going wrong ?

## Deleting specific column of a text file using python [on hold]

I have a text file with a large number of data in it. It has 35 specific columns separated by commas. A sample of the data is provided below-

FID,    Name,   Number,     Location,.........,     Road No,    Profession
0,      Sam,    56,         Ames,.........,         Birrel Rd,  Clark
1,      John,   58,         BD, .........,          Eden Dr,    Cons
3,      Mahfuz, 84,         BD, .........,          Stot,       Teacher

I have been asked to delete the last two columns (Road No, and Profession) as well as third column (Number). I am not allowed to use pandas or read from the exisiting file and write into a new one.

Is there anyway of doing that? I am currently using Python 3.6 as well as 2.7.

Thanks

## Extract Information from CSV file using Python

I have a dataset provided properties.csv (4000 rows and 6 columns).The csv file including many features some of these features are numerical and some of them are nominal (features contain text). Suppose the features in this dataset are

id
F1
F2
F3
F4
Price

In F1, there is a lot of information provided (Type of property: apartmentsâ, âhousesâ, âVillasâ). What I should do to extract each property of F1 (âapartmentsâ, âhousesâ, âVillaâ) and put them in groups with calculating the mean price of each type group?

After that, I want to extract another information from F1 “Location”.

I am a beginner in NLP. I tried to write this code to extract information “Apartment” from F1, but it does not work probably:

import pandas as pd
from pandas import DataFrame
import re

# Extract “Apartment” from F1

Title= DataFrame(properties,columns= [‘F1’])

for line in F1:
#return list of apartments in that line
x = re.findall(“apartment”, line)
#if a date is found
if len(x) != 0:
print(x)

I need your help to fix this code and what should I do to extract the other information âhousesâ and âVillaâ from F1. After that, I am looking to put them in groups as I mentioned above and calculate the mean price.

Also, what should I do if I want to extract some more information from F2 to see if the property has pool, garage, and sea view and calculate the mean price of each location (there are 4 locations)? If the property has Pool, sea view and garage should be binary 1 and 0 if not.

After that, Create a property dataset in this format and save it as a csv file:
– id;
– Location (Information extrated from F1)
– type (information extarcted from F1 in groups “apartmentsâ, âhousesâ,
âVillasâ”)
– F1
– F2
– pool (0/1) (Information extracted from F2)
– sea view (0/1) (Information extracted from F2)
– garage (0/1) (Information extracted from F2)