|
download mono from www.mono-project.com
here u get mono version which is a .net framework and can made program on it
|
|
|
|
|
|
I have been looking at the GRUB stage1 code and from this it seems that the BIOS Parameter Block in the MBR is populated with zeros. What actually populates the BPB with relevant data?
I am the handsome one in the crowd.
|
|
|
|
|
i have this perl code which is not working for some reason-
#!/usr/bin/perl
open(IN1, "< t1");
open(IN2, "< t");
open(out, "> bond_pad.tcl");
while (<in1>) {
if(/(.*)bp_(.*)/) {
chomp;
@array1=split(/ /);
print " first: $array1[0]\n";
while (<in2>) {
chomp;
if(/(.*)bp_(.*)/) {
@array2=split(/ /);
print " sec: @array2 $array2[3]\n";
while (($_=<in2>) !~ /(.*)echo_status(.*)/) {
if($array1[0] eq $array2[3]) {
if (/(.*)origin(.*)/) {
$_=~ s/(.*)origin(.*)/\1 origin $array1[1] $array1[2]/;
print ;
} else {
print ;
}
}
}
}
}
}
}
close (IN1);
where file t1 contains :
{"bp_left_2"} {-70 401}
{"bp_left_1"} {-70 321}
{"bp_left_0"} {-70 241}
and file t contains:
set obj [get_mark {"bp_left_0"} -all]
attribute $obj origin {38.000 269.000}
attribute $obj echo_status echo
set obj [get_mark {"bp_left_1"} -all]
attribute $obj origin {38.000 349.000}
attribute $obj echo_status echo
set obj [get_mark {"bp_left_2"} -all]
attribute $obj origin {-38.000 429.000}
attribute $obj echo_status echo
the code is changing numbers for one of the match and not for all matches in file t, plz help
|
|
|
|
|
Use code block when you post code.
Explain what the code does do when you run it.
Explain what you expect it to do.
|
|
|
|
|
#!/usr/bin/perl -w
open(IN1, "< t1") || die "oops t1 not found\n";
open(IN2, "< t") || die "oops t1 not found\n";
open(OUT, "> bond_pad.tcl") || die "oops bond_pad.tcl not found\n";
while (<IN1>) {
if(/(.*)bp_(.*)/) {
chomp;
@array1 = split(/ /);
print " first: $array1[0]\n";
while (<IN2>) {
chomp;
if(/(.*)bp_(.*)/) {
@array2 = split(/ /);
print " sec: @array2 $array2[3]\n";
while (($_ = <IN2>) !~ /(.*)echo_status(.*)/) {
if($array1[0] eq $array2[3]) {
if (/(.*)origin(.*)/) {
$_ =~ s/(.*)origin(.*)/$1 origin $array1[1] $array1[2]/;
print ;
} else {
print ;
}
}
}
}
}
}
}
close (IN1);
close (IN2);
close (OUT);
Produces the following output
cjts-imac-2:T cjt$ ./testperl
first: {"bp_left_2"}
sec: set obj [get_mark {"bp_left_0"} -all] {"bp_left_0"}
sec: set obj [get_mark {"bp_left_1"} -all] {"bp_left_1"}
sec: set obj [get_mark {"bp_left_2"} -all] {"bp_left_2"}
attribute $obj origin {-70 401}
first: {"bp_left_1"}
first: {"bp_left_0"}
cjts-imac-2:T cjt$
IS this what you want ??? as output ???
Thanks Guys/Girls
|
|
|
|
|
Hi there.
I used phpmailer[^]class to send mail in php on IIS on windows server
this is my code :
require("include/mailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "me@communitymx.com";
$mail->FromName = "My Name";
$mail->AddAddress("mds_soft@yahoo.com");
$mail->Subject = "Test PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->Send();
echo $mail -> ErrorInfo;
But each time I just see this error : Could not instantiate mail function
How can I solve it ?
Thanks in advance.
|
|
|
|
|
I've got the answer by contact phpmailer group.
On IIS we have to use sth like this script for sending mail.
require("include/mailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "me@communitymx.com";
$mail->FromName = "My Name";
$mail->AddAddress("mds_soft@yahoo.com");
$mail->Subject = "Test PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->Subject = "PHPMailer Test Subject via smtp";
$mail->Host = "mail.sth.com";
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Username = "smtp Username ";
$mail->Password = "smtp password";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
Although these file are in /include/mailer/
class.smtp.php
class.phpmailer.php
class.pop3.php
|
|
|
|
|
Hi, i want to install pgadmin3 to fedora8
i have found this link
http://rpmfind.net/linux/RPM/fedora/updates/8/ppc/pgadmin3-1.8.4-1.fc8.ppc.html
Do i need to install all rpms there(required ones) or is there a way that i can install pgadmin3 with yum?
thanks...
|
|
|
|
|
Hello all.
I saw somewhere this function:
function char_cube3d(&$bitmaps, $letter)
{ ... }
What's the meaning of & sign ?
Thank you.
|
|
|
|
|
The parameter will be passed to the function by Reference. (the second parameter will be passed by Value)
|
|
|
|
|
|
Just as a side note...PHP 5+ always pass objects & arrays by reference so you don't need to use them if you are doing PHP5 development.
I'm finding the only constant in software development is change it self.
|
|
|
|
|
|
Hi there guys.
can we use PHPBB3 captcha classes in our project ?
Thank you.
modified on Friday, August 22, 2008 6:42 PM
|
|
|
|
|
I got the answer here[^]
modified on Friday, August 29, 2008 5:35 PM
|
|
|
|
|
Hello,
In my program, I first receive data from another machine, then processing the data. Data receiveing is fast, but data processing is relatively time consuming. Hence, I put the code for data processing in a POSIX thread (i am using RedHAt enterpriese linux 4). In the main() function, I receive data first. Whevenever a data is received, a new thread for data processing is created. I use the following code to test the above program design. It seemed dones not work.
void * thread_func(void * arg)
{
printf("thread_func is running %s\n" ,(void *)arg);
}
main()
{
thread_t thread[100];
char *str;
int i;
for(i=0; i<10; i++
{
str = (char*)malloc(sizeof(char)*200);
strcpy(str, "Hello World\n");
int ret;
ret = pthread_create(&thread[i] ,NULLthread_func,(char *)str);
printf("after pthread_cread ret= %d",ret);
free(str);
pthread_detach()thread[i];
}
}
I noticed the value of 'ret' is 0, indicating that 10 threads have been created successfully. However, I could not see the sentence "thread_func is running ......
Could anybody look at this code and let me know why it does not work .
Thanks
|
|
|
|
|
any1 with experteese in these fields
/\|-||\/|/\|)
|
|
|
|
|
Hi there.
I want to get a directory size by PHP.
for example I used this code :
$size = disk_total_space("../upload")/ 1024;
echo $size;
but I saw this warning :
Warning: disk_total_space()
[function.disk-total-space]: The system cannot find the
path specified. in H:\Apache2.2\htdocs\c-panel\cp_folders.php
on line 88
I'm sure that this folder "../upload" exist.
What's wrong with it and how I can solve it ?
thanks in advance
|
|
|
|
|
All right, I found this function here[^]
function dirsize($dir,$buf=2)
{
static $buffer;
if(isset($buffer[$dir]))
return $buffer[$dir];
if(is_file($dir))
return filesize($dir);
if($dh=opendir($dir))
{
$size=0;
while(($file=readdir($dh))!==false)
{
if($file=='.' || $file=='..')
continue;
$size+=dirsize($dir.'/'.$file,$buf-1);
}
closedir($dh);
if($buf>0)
$buffer[$dir]=$size;
return $size;
}
return false;
}
|
|
|
|
|
hi,
May be it is not detecting this type of relativ path.You can try absolute path here
$size = disk_total_space("/upload")/ 1024;
echo $size;
I hope this will work.
Thanks
-Inder Singh
|
|
|
|
|
|
Hi Guys,
I have a PHP script that grabs customer names (about 30,000+) from a MySQL Database, and using PHP outputs to the client browser. From this list then can select which customer they will insert, or update, a record for.
Once the page is loaded, I use an onChange event (using AJAX) attached to the select list to populate part of the page with with customer information.
There are basically two pages that use this. On the INSERT page, where new SALE record is created, and the UPDATE page, where a sale may be edited. Obviously the end user needs to be able to select ANY of the customers stored, and the assumption that they may know the spelling, or part thereof, of a customer cannot be made... otherwise a nice search and select function would be great!
It is obviously bad practice to load so many customers in at once, So I am looking for suggestions or solutions.
One idea i had was to load only the customer for which the sale is to be edited, and then when they click on it, load the rest, but that still sucks.
maybe a search function is the best way, just wish users were not so incompetent :P
cheers for any ideas guys,
mick
|
|
|
|
|
Breaking the data down into sub-categories, such as all customers with surnames beginning with A, for example, followed by all of these customers with first names beginning with A, or that live in a particular region; I assume this would cut the number of records being fetched down drastically?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Usually when I have that many records I opt for a paginated list and not rely on comboboxes or
One option I can think of is using AJAX to dynamically update the combobox as selectedIndex reaches the last element -- insert 500 more. However this still has the problem that if the user scrolls without using keyboard selectedIndex doesn't change so you would need to capture the scroll position as well and I'm not sure that is possible inside a drop down or native HTML control. Lastly using AJAX like this would destroy any chance of accessibility you might have. If someone disabled JavaScript they'd never be able to use your application.
I would go for either two or more combobox'es and categorize them or use a paginated list.
I'm finding the only constant in software development is change it self.
|
|
|
|