ryuslash 22 Junior Poster in Training

I guess you could put your my.domain.com in your /etc/hosts file, but that would only work on the computers where you put this. Not from anywhere else.

ryuslash 22 Junior Poster in Training
string.Join(",", array);
ryuslash 22 Junior Poster in Training

Isn't the MailMessage.To property a MailAddressCollection though? can't you use Mail.To.Add(sToEmail)?

Which .Net version are you using, I get a compiler error just from trying to assign anything to To.

ryuslash 22 Junior Poster in Training
#include <ofstream>

using namespace std;

int main(int argc, char *argv[]) {
  ofstream ofs("test.txt");
  ofs << "Hello there, file" << endl;
  ofs.close();
}

something like that maybe?

ryuslash 22 Junior Poster in Training

I had very similar output in one of my project, it seems I declared a double somewhere, but didn't instantiate it...

double somedouble;

I don't know if this is applicable to you, but now that I've instantiated it, it seems to be better...

double somedouble = 0.0;
ryuslash 22 Junior Poster in Training

That would have been

PriceFeed pf(tickers); // Error on this line
ryuslash 22 Junior Poster in Training

I'd say keeping the books and images in seperate tables then so that you're not limited to the amount of columns you define.

ryuslash 22 Junior Poster in Training

I'm guessing he doesn't understand the 'free' part in free and open source software...
I have to admit that I too am frustrated, but mostly because even with all those distributions out there I still can't find the one that really feels like a perfect fit for me. Unfortunately I do not (yet) have the skill to start my own (YAY I can!), but everyone looks for different things in OSs.

But if we are to follow in his thinking, why stop there? Let's continue with this idea, a lot of energy is wasted in this world:
Let there be only 1 browser. IE, FF, Opera, Safari, etc... You should all merge, all use the same renderer, all have the same user interface.
All those MMO games out there, stop wasting your energy, it's time to put all your might together and create the one MMO to rule them all. It will have Orcs, spacecraft, Zerg, magic, guns, swords, mounts like Dragons and vehicles like tanks!
I could go on like this for a while, but let's get to the big one. Why stop at creating just one linux? All operating systems pretty much let us do the same thing in different ways (work with our computer) it's time we pick just one OS and focus all our energy on that. Unfortunately, Windows and Mac OS don't allow us to really help, and the public supposedly doesn't like Linux, Unix or any other operating system …

ryuslash 22 Junior Poster in Training

Thought so

ryuslash 22 Junior Poster in Training

It's not possible that you don't actually have Winamp in Program Files? You said that you tested with C:\Winamp\Winamp.exe which worked?

ryuslash 22 Junior Poster in Training

Maybe

os.system("\"C:\Program Files\Winamp\Winamp.exe\"")

might be silly, but who knows...

ryuslash 22 Junior Poster in Training

Hi All,

import os
os.system("C:\Program Files\Winamp\Winamp.exe")
>>'C:\Program' is not recognized as an internal or external command.

Anybody has the solution. It must be simple but I am not able to get it :(

Shouldn't you be doing it like

import os
os.system("C:\\Program\ Files\\Winamp\\Winamp.exe")

?

ryuslash 22 Junior Poster in Training
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'std::basic_istream<_Elem,_Traits>' (or there is no acceptable conversion)

on that line i have recName = getline(myFile,open);

thnx for the help once again :)

That is probably because (for as far as I know) getline returns a reference to an istream object. The 2nd argument should be the string you want to put your line in, like

string recName, recPass
      fstream myFile;
      myFile.open("C:\\loginfo");
      getline(myFile, recName);
      getline(myFile, recPass);
      myFile.close();
evilguyme commented: thnx for ur help :D +1
ryuslash 22 Junior Poster in Training

Debian stable (used to be the most stable one from what I know)

ryuslash 22 Junior Poster in Training

yes he might not need a mail server but to what i see on this situation, his just testing this locally so where could he get other smtp?

if he'll use gmail smtp then he'll be needing phpmailer.

So just setting the smtp server to gmail's smtp server or his isp's smtp server won't actually work? :S
Makes me so glad I've got linux ^_^

ryuslash 22 Junior Poster in Training

You shouldn't need your own mail server if you use someone else's smtp server though, right?

ryuslash 22 Junior Poster in Training

Hi ryuslash,

this is a part of the php.ini file which is in the SMTP section:


i think this is what you were referring to, so what am i going to edit in there? the php.ini file is actually a text file.

Yes most ini files look just like test files, this eases editing, if they encrypted it or even made it binary you'd have more trouble reading and editing it ;)

you would edit

SMTP = mail.yourisp.com
smtp_port = 25 ;(default port, should work)

sendmail_from = [email]your@emailaddress.here[/email]

Yup, i'm using wamp 2.0f Having a problem in setting up the IIS of wamp, i think it's in the APACHE, cuz' APACHE servers as the IIS of wamp.. not sure though.

I tried installing the Internet Information Services of Windows but it causes a conflict with WAMP, once you start running wamp it causes something like an interruption error.

I've never used WAMP (always did a manual install of apache and php, and only much later easyphp), never liked IIS, but it might be a port problem (i.e. WAMP trying to run on port 80 and IIS running on port 80, one will say port 80 is taken). Maybe...

ryuslash 22 Junior Poster in Training

The ASP.Net Ajax tools have a <asp:Scriptmanager> tag.
If, however, you're not actually using this webservice for AJAX purposes but to call one website's functionality from another website then I imagine you will have to create a web reference and then probably the same thing applies as with a windows application.

ryuslash 22 Junior Poster in Training

when you look at your phpinfo() page there is one field that says 'Loaded Configuration File'. In that file there are the SMTP and smtp_port (comment above says for Win32 only) and there you can choose which smtp server you would like to use.

If you have a gmail account you might be able to enable the pop3 forwarding option (if that is even necessary) and use smtp.gmail.com, otherwise your ISP probably also has an smtp server (usually something like smtp.yourisp.com or mail.yourisp.com). I hope this helps at all...

ryuslash 22 Junior Poster in Training

are you using windows or linux?
because I have never gotten this error in linux (if SMTP is not set-up then it just doesn't send, for me anyway), but I've seen around the web that windows can be a bigger problem.

and sorry about the phpinfo() I see now that it doesn't actually say if it is enabled or disabled, just where it'll try to send it to.
You could always try to set these values to an smtp server you know will work, possibly google or your ISP's smtp server.

ryuslash 22 Junior Poster in Training

if you look at the page phpinfo() generates, is SMTP even enabled?

ryuslash 22 Junior Poster in Training

If you call a function in form2 from form1 then you can pass parameters

Otherwise I have used the Program class which is automatically generated by Visual Studio when you create a windows application. Everything in there is usually public static and then you can pass the variable to program from form 1 before form 2 executes it's function and then in form 2's function you get this variable from Program again. Or something similar of course...

ryuslash 22 Junior Poster in Training

Can the Console class even be used in web services?

You can return any object of array of objects (except for certain objects that implement certain interfaces, like IDictionary) from a web service.

If you're using it in a windows application then the web reference you create to connect with the service, this reference generates the objects used for input parameters and return values if they don't already exist (no need to generate a string class for example).

If you're using it for an ASP.Net service then the same thing applies, but these classes are generated in javascript, all you have to do then is have a scriptmanager that correctly references your service and you're set to go.

ryuslash 22 Junior Poster in Training

You could try Kompozer (http://kompozer.net/)

But really you shouldn't use WYSIWYG :-/

ryuslash 22 Junior Poster in Training

Oh right, of course ^_^;
I shouldn't try to answer questions after bed-time :P

ryuslash 22 Junior Poster in Training

Q1. Can PHP be used to created desktop based applications OR it is used only for web based applications ?
Q2. Does PHP has PERSISTENCE technologies like JAVA has HIBERNATE and EJB ?
Q3. ARE there any APIs to work with PHP ?

A1. PHP can be used for web applications and desktop applications (default commandline, but I know there is atleast a gtk+ library for it), but it is mainly used for web
A2. PHP has the ability to serialize objects and there are a few ORM (like Hibernate) libraries out there as well.
A3. PHP can interact in some way with web services and of course some websites actually have PHP specific API's, you'll have to look into this to really find out how much there is...

ryuslash 22 Junior Poster in Training
string msg = "RED ROSES AND A YELLOW ONE";
string needle = TextBox1.Text;
int offset = msg.IndexOf(needle);
			
while (offset >= 0) {
  Console.WriteLine(msg.Substring(offset - 2, 7));
  offset = msg.IndexOf(needle, offset + 1);
}

is this anything like what you mean?

kvprajapati commented: Yes! +13
ryuslash 22 Junior Poster in Training

I can't help you with the everything through default.aspx, but about the object life-cycle I can say this:
If an object is created server-side and not saved in something like viewstate or a session or something similar, then everytime a request finished (the page has been generated and shown to the user) it has been destroyed. Everytime a user refreshes the page of your application all objects and instances not previously saved will be completely re-created, sometimes with variables which were saved (i.e. a TextBox's Text property) or grabbed (from POST variables).

It took me a little getting used to, that every time I access a page everything basically started from scratch...

ryuslash 22 Junior Poster in Training

Hey Dan08,

I personally haven't heard of adept. I know Synaptic, gtk-application, aptitude, apt-get and dpkg, might it be one of these you're referring to?

I personally always find it very useful to try and open an application from a terminal if it isn't doing what I want it to do, since then you get more error messages and warnings.

I'm sorry I can't help you more right now...

ryuslash 22 Junior Poster in Training

Um... Build your (non-installer) project and copy the contents of your {projectfolder}\bin\Release (or \Debug) folder?

Otherwise, there was a way to set .zip file as the favored distribution method. Don't remember how it works though :-/

ryuslash 22 Junior Poster in Training

No problem, man, glad I could help :)

ryuslash 22 Junior Poster in Training

Yes but places always gives nice names to your disks. If you open it from places and look at your location (text-based, not button), then you will see where it is really located. Most likely it is located in /media/ under the name 'disk'.

ryuslash 22 Junior Poster in Training

Since PHP is server-side, it can't actually disable the back button, all you can really do with it is prevent that data is lost when people do, sometimes.

ryuslash 22 Junior Poster in Training

nothing it seems, your problem doesn't seem to be syntax related... except the /31\ GB\ Media/Test/FolderWithFiles/ which unless this is just your example and not your actual usage or you have actually mounted it there, won't exist :-/

ryuslash 22 Junior Poster in Training

Look in your /media/ folder
after you mount your disk, usually there is a folder created there (often just called disk) and everything on your C: drive will be there.

ryuslash 22 Junior Poster in Training

There seems to be a Process.Exited event and also a Process.WaitForExit() function, maybe they could be of use?

ryuslash 22 Junior Poster in Training

Hehe, well if it works it works right ;)

ryuslash 22 Junior Poster in Training

when i am submitting a form with already checked radio button then this is inserting values in database but when i do checked another radio button then this will not insert value in database.

Ehh, I have no idea what you are trying to say...
Is it that one page does something that the other doesn't, but both really should (you could move this part to the handle.php)

Second problem is that this is giving error header already sent when i am using header("Location:index.php") statement.

the header() function is one that seems to cause a lot of confusion for a lot of people. You can only use it before any other headers have been sent (headers are sent as soon as an echo or print or any other output statement is executed)

If these tips don't help at all then I don't think I can help much more without at least your error messages or some code that produces the error...

ryuslash 22 Junior Poster in Training

You could do it server-side or client-side, I guess.

For server side you make sure that the radio buttons' value is submitted to the server and then check which was selected there (like

something.html:
<form method="POST" action="handle.php">
  <!-- your form here -->
</form>

handle.php:
if ($_POST["radiobuttongroupname"] == "something")
  header("Location: index.php");
else
  header("Location: another.php");

).

Or for client side you use the onsubmit event of the form to check which was selected (something like

<script>
  function handleSubmit(form) {
    if (form.radiobuttongroupname.value == "something")
      form.action = "index.php";
    else
      form.action = "another.php";
  }
</script>

<form method="POST" onsubmit="handleSubmit(this)">
  <!-- your form -->
</form>

)

ryuslash 22 Junior Poster in Training

for emerald you need to install compiz and the emerald theme manager

ryuslash 22 Junior Poster in Training
ryuslash 22 Junior Poster in Training

I don't particularly notice any real slowness on ASP website (except http:\\www.asp.net) unless I'm working on development copies (since they're always compiled once you load them for the first time (in a while)

asp controls can be heavy on a page, especially if they use things like the viewstate a lot. In the end it's all output as HTML, so if you want to know how big / small asp is look at some HTML source from asp sites and some from other web development platforms (php, django, ruby, etc) and compare how much junk you see. (Junk can also be related to the person who writes the website, so even PHP websites can be as junk-filled as ASP sites)

Do's and Dont's, dunno, don't use the ViewState too much. And if you notice your website being slow even after it has compiled (so the 2nd time you look at a page and 3rd, and so on) do look at your code and see if you might be doing things you shouldn't?

sknake commented: good to know +7
ryuslash 22 Junior Poster in Training

try

until [ $(echo "$myVar" | grep -e '^[a-zA-Z]*$') ]
  do
    read - p "Enter some text" myVar
  done
Roybut commented: Thank you +1
ryuslash 22 Junior Poster in Training

How to swap partitions? And could you tell me, what to do? You told that there is a limit of partitions not more than 4, then when I have already 4 partitions how I can make another for swapping.

There is a limit of 4 primary partitions, if you create a logical partition out of the C:\ partition and then split that into / and swap you should be fine too

Careful! - 'SME Server 7.x' (maybe older releases as well) does exactly that.

Wow dude, that's crazy :-O

ryuslash 22 Junior Poster in Training

Yeah if your drive is already partitioned or they are actually seperate hard drives then it shouldn't be a problem.
Ubuntu for example has a very easy disk management tool that it runs before you start installing, just pay attention to what you are doing.

Other distros often offer similar tools so just take a look at it, I haven't seen a distro yet that just deletes all partitions and takes over all your hard disks without asking you what you want first.

But do be careful because mistakes are easily made ;)

ryuslash 22 Junior Poster in Training

Have you tried looking at the autocompletesource, autocompletecustomsource and autocompletemode properties from the TextBox (as of .Net 2.0 I think?)

ryuslash 22 Junior Poster in Training

Must be a new feature of .Net 4.0

In .Net 3.5 and older at least all serverside validation must be custom written, only the client side validation is performed. (Or was it the other way around? No I think this is right)

The reason it still needs runat="server" is because it is a .Net xml tag which needs to be processed by the server in order to get the correct client-side HTML.

ryuslash 22 Junior Poster in Training

Ok I have been looking at this regexp for a few minutes now and I don't know a lot about regular expressions, but here's what I think you might want to try:

string regex = @"^data source=(.*\\)([A-Za-z0-9\-]+\.[A-Za-z0-9]+);.*$";

You've got a ^ in your first group, which either says that you want the middle of the string to be at the beginning of the string or that you don't want there to be a .*\\ after data source= and I don't see a ; anywhere in your expression, so since you're looking for just alphanumeric characters after the . (of .ext) up to the end of the string, you won't find it.

you could still leave out the .*$ at the end, since saying that this doesn't have to be found near the end is the same as saying any number of anything up to the end as of here

ryuslash 22 Junior Poster in Training

You don't want the message then don't use POST or the backbutton. Or hack whichever browser you have so you don't get it.

Another way might be to use ajax to post instead of the form.submit()

ryuslash 22 Junior Poster in Training

I'd say if they make mistakes then they should be able to edit them later on and if they shouldn't be able to make mistakes some client-side validation.

For as far as I know, once a form has been submitted there is no way to stop it half-way through it's request.