Jump to content
xisto Community

bluefish1405241537

Members
  • Content Count

    72
  • Joined

  • Last visited

Everything posted by bluefish1405241537

  1. To expand on that for people who don't know how to edit the registry in Windows: Just go to Start/Run, and type "regedit". That opens the registry editor. On the left pane you have the browser - press the + sign to the left of the name to open the folder. Use the folders that in2computers pointed out, then finally click on the Winlogon folder. The right pane has a table of values. The left column in the table shows the name of the values, and the right shows the content of the value. Find the value names in2 pointed out. If they are there (should be alphabetical order), double click and change the value to what is appropriate - often they may already have the correct value, i.e. the domain and/or username. If a value does not exist, click Edit > New > String Value. For the name, put the name of the missing value, and for the value, put whatever the value should be. Be careful with the registry if you do not know what you are doing - most programs rely on it to function, including Windows. I am not sure if this would work in XP. If it does not, there might be a similar folder (i.e. WindowsXP instead of WindowsNT) that performs the same function. If you cannot find the key, do not attempt to create it. You may be able to find it using the search function (Ctrl+F), but the search is slow and kind of annoying, so browsing is easier if you know the folder.
  2. I tend to be around 50 WPM. That's pretty fast considering I don't use the "standard" typing method. I don't exactly use just a few fingers - most get some use - but I just sort of do it my own way, which I find is effective. It is good enough for most situations, and compared to my peers I type quite fast.
  3. The content will still work - you see, when you put an add on your site, the image/frame is not usually hosted on the same website. So your page will show, but ads that try to load will fail because they are located on the redirected server.}
  4. My first Java IDE was SyncJEdit. Good, simple, what I needed. But there are some features that should be there that aren't (i.e. Ctrl+A should select all), and some bugs (why doesn't Ctrl+C copy the first time?), so I switched to NetBeans. It's good, I just wish you could just have a Java file as opposed to a whole project if you're just doing a small, quick thing.
  5. I would imagine that the two might be tracking slightly different things, or in slightly different ways. For example, on my laptop windows rates the connection "low" (from the floor above), but the client says "excellent". Since you can't really have an almost perfect connection from a different floor, I am tempted to believe windows for the signal strength. In the past, however, the client said a worse connection, which often resulted in disconnects. So I would guess that either my client has a lower range for "excellent", or it measures something different (i.e. the quality of the signal as opposed to the strength). It's possible that something somewhat similar is happening with yours. And the card itself would have to be poor to get that low a signal from the same room. But don't worry about the different signal ratings; as long as it's connected, it's all right.
  6. If GMail didn't have it before, I think it's about time. Really, its not very good if a popular public e-mail server has no antivirus. Regular people don't tend to worry about viruses, so they often aren't as careful as they should be. However, if GMail had the filter before, then it wouldn't be too bad as most harmful content would need some sort of workaround, as suggested earlier, which would imply a more advanced user that would be more aware of the risk of what they are downloading.As for the new antivirus, I too am wondering how effective it is if they are not willing to let some files be transferred, even with the check. Everyone would prefer a really good check (like Norton Antivirus) as opposed to a complete block or a partial check. It makes me wonder if Google Antivirus BETA will be coming out in the future. I wouldn't be surprised.
  7. I think the size is just temporary, so you can see a little more detail. I would imagine that when it would be used in any context it would be smaller. It looks so polished; as in, literally polished. What do you use that makes it shine? Or do you just use Windex?
  8. This tutorial assumes that you have a basic knowledge of C++. You know how to use built-in types, like ints, doubles, chars, etc. You should know some types that are part of the STL, like vector, etc. Those types that come in the STL are just C++; you can create your own types just like those! Non built-in types are referred to as classes. To create a class, you just use the keyword class, the name of the class, and curly brackets. //A class named MyClassclass MyClass {}; In fact, that is all we need to create variables, pointers, or references to that class. MyClass a;MyClass *b = &a;MyClass &c = a; The variable "a" is an object of type MyClass. Of course, something like that hardly does anything. We need to create members of that class - ways it can be created (called constructors), operations that we can perform on it (called member functions), and data it can hold (called data members). Data Members I'll start with data members, because you often need them to use constructors and member functions. A data member is a piece of data, the same as you use normally. It can be a built-in type, or another class type (i.e. vector). A class can have as many data members as you want or need. To declare a data member, simply put the declaration in the body of the class as follows: #include <vector>class MyClass {int i;std::vector<int> v;}; So MyClass has two data members: i and v. Normal rules apply. You can also use pointers and references as usual.- An important thing to note is that i and v are uninitialized. We'll talk about initializing data members later. - Also, each object of type MyClass has its own different data. The data is referred to by the same name, but each object of type MyClass has its own value for i and v. Access Control Before we move on, I would like to discuss access control. There are three main types of access control in a class. public: Any part of the program can access it private: Only members of the class can access it protected: Private except inherited classes can access it NOT COVERED To change access control, just use the name followed by a colon, and that will be the access control from then on. The default access control is private. You can bypass this by using the struct keyword instead of class - the default access control is then public. #include <vector>class MyClass {int i; //Default is privatepublic:int integer; //Publicprivate:vector v; //Privateprotected:vector vec; //Protected};struct MyClass2 {int i; //Public, as defaultprivate:int i2; //Private}; - A common mistake is to assume that struct has a deeper meaning. It doesn't. It's the exact same as using class and following it with "public:".- To access a public member of a class, use ObjectName.MemberName. So, using the above example: MyClass c;c.integer = 10; //Value of integer is changedc.i = 10; //Error: private member cannot be accessed ConstructorsUsually, we need to do something when a class is created. We also often need to have different ways to create objects of the same type. That is why we have constructors. A constructor looks a bit like a function, with a few key differences. For one, it has no return value. Its name must be the same as the class name. For example: #include <vector>class MyClass {public:MyClass() {//Constructori = 10;v.push_back(i);}int i;std::vector<int> v;}; As you can see, you can do anything you want with your data members in the constructor. So now, when we create an object like the following, the operations in the default constructor are called. The default constructor is a constructor with no arguments, and it is called whenever an object of that type is created. MyClass my;Since my is initialized with the default constructor, i should now have a value of 10 and v should have one element with a value of 10. Also, constructors can take values like a normal function. #include <vector>class MyClass {public://Default constructorMyClass() {i = 10;v.push_back(i);}//Constructor that takes an argumentMyClass(int i2) {i = i2;v.push_back(i);}int i;std::vector<int> v;};//...MyClass a; //Initializes with default constructorMyClass b(); //Initializes with default constructorMyClass c(4); //Initializes with second constructor Another important concept is an initializer list. With the above method, your compiler automatically initializes all the data members to their default value, then executes the body of the constructor. This is normally not a big deal, but if you have big classes where initializing them takes a lot of resources, it can be important to do it only once. That is why initializer lists are provided. You can change the default initialization, with the following as an example. #include <vector>class MyClass {public://Default constructorMyClass() : i(10), v(7,2) { //Initialize i with a value of 10; v is initialized with 2 elements with a value of 7v.push_back(i);}//Constructor that takes an argumentMyClass(int i2) : i(i2) { //Initialize i with the argument i2v.push_back(i);}int i;std::vector<int> v;}; To create the initializer list, follow the argument list with a colon, then initialize each data member with whatever values. Multiple initializations are seperated by commas. When you use the initializer lists, you can ensure that the data members are initialized only once. - If you do not provide a default constructor, your compiler will synthesize one for you. This constructor does nothing except initialize all the data members to their default values. - If your default constructor is private, objects must be created with another constructor - if there are no public constructors, objects of that type cannot be created. Note that the synthesized constructor is public. Member Functions A member function is an operation that can be performed on an object. You can declare member functions in the same way as normal functions, except within the body of the class. Member functions can use data members and can call other member functions. They cannot call constructors, but constructors can call them. You can use access control for member functions. Public functions can be performed as Object.Function(args). Private (or protected) member functions can only be called by other members. #include <vector>class MyClass {public:void setI(int i2) { i = i2; }int getI() { return i; }void multiplyBy6() { doubleI(); tripleI(); }private:void doubleI() { i *= 2; }void tripleI() { i *= 3; }int i;};//...MyClass m;m.setI(10);int i = m.getI(); //i==10m.multiplyBy6(); //i==60m.doubleI(); //Error: can't access private member function The body of a member function does not need to be defined inside the class. It can be defined outside, by declaring it inside and using the scope operator (double colon). class MyClass {public:int getI();int i;};int MyClass::getI() {return i;} This operates the same as getI in the previous example, with one difference. Inline Functions An inline function is a function that is actually changed into the appropriate code by the compiler. With short functions, this can increase run-time efficiency. Member functions that are defined within a class are inline by default. Member functions defined outside the class and normal functions need the inline keyword. inline int sum(int i, int i2) { //Inline functionreturn i1+i2;}class MyClass {public:int getI();int setI(int i2) { i = i2; } //Inline by defaultint i;};inline int MyClass::getI() { //Inline by keywordreturn i;} - Note that calling a function inline is a request, not a guarantee. Functions that are expanded inline may actually be slower if they are large or if there are certain other conditions. It is up to the compiler to determine whether to expand a function inline or not. It is not a good idea to call all your functions inline; it should only be used on short, simple functions called many times. That is a basic introduction to classes. Reply if you have questions, comments, etc.
  9. Er, sorry, just noticed, should be $t>=$m-6, not <=.
  10. It's really quite simple. When people submit information through your forms, they are not bound to the information you make possible because it is mere HTML and there is no checking as to the validity of the data. For example, you might have: <form action="post.php" method=POST> <select name=hello><option value=NY>New York</option><option value=BF>Buffalo</option><option value=CY>Calgary</option></select><submit value="Submit"></form> If someone were to duplicate that form info and post to the same page, they could change the select to a simple text box, where they could put anything they want. Of course, a more realistic way would be that they probably have a program that automatically posts random data with the names you provide to the page you provide.
  11. Well, you could add it to your form, but I would recommend just putting it on the page that processes the forms, as that would stop bots from altering the hidden fields. $ip=@$REMOTE_ADDR; To add in form: <input type=hidden name=ip value="<?php echo @$REMOTE_ADDR; ?>"> Like I said before, programs (and even users with a bit of work) can alter hidden fields. So instead of using $ip = $_POST['ip'];or whatever, a better solution might be $ip=@$REMOTE_ADDR;without bothering with the field.
  12. //Set $m to value of current month, starting index at 0$m = date("m")-1;//Create array of month names$months = array(0 => "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");//Iterate through last six monthsfor($t=$m-1;$t<=$m-6;$t--) { //Print a comma if not first in list if($t!=$m-1) echo ", "; //Print the month name, using modulo to make sure it is a positive value echo $months[$t % 12];}That should work. Excuse me if my PHP is rusty.
  13. I had a similar problem. This might not be the same as yours, but for whatever reason one computer on the network would not appear as part of the workgroup even though it was. To resolve it, I just typed "\\computer_name" in the address bar (windows explorer/internet explorer). That got me to the normal screen with files, printers, etc.If you want to set it up so you can access it more easily, go to My Network Places, and click Add a Network Place under Network Tasks (on the left). Follow the directions, select "Choose another network location", and for the network address type "\\computer_name\folder". The annoying thing is you can't link to "\\name", but you can just press Up in whatever folder you choose to access that page.
  14. As said before, wireless would be hard to set up. What do you need it for? If you want to hook a computer up to the internet, then your best bet would be to get a new service - it would be cheaper! If you just want the connection, I suggest using standard internet to do so - check out hamachi.cc for a possible way to set it up.
  15. A few days ago, I was approved for the starter package, but as yet have not received an e-mail regarding that. I have checked all my folders every day (inbox and bulk mail in particular) but have seen no email from Xisto. I am sure that it is the email I signed up with. Is there something I missed, or should I contact an admin for a resend?
  16. I know this is rather out of date, but for anyone else who visits this topic, I have come up with a simple solution. You just pass the static function a reference to the current object, e.g. class obj {//...static void call_static(obj&) {/*...*/}//...call_static(*this);//...}
  17. Here is an example: a = 10; a += 1; (a==11); a = 0; a += -1; (a==-1); a = 5; a += -3; (a==2); So a += b; is the same as writing a = a + b;, just a simpler syntax.
  18. Correct me if I'm wrong.While water does have a huge heat capacity, wouldn't the amount of time it takes to cool down make it inefficient? The reason air cooling works is because it blows the hot air out of the machine, and it is replaced by cool air from the rest of the atmosphere. With water, since it is not readily available for this usage, you would need to have a cooling tub where the heat that the water absorbs is released back into the atmosphere slowly.
  19. Of course a good knowledge of HTML is necessary, and CSS would help. Personally, I would make the registration/login etc. first, so that you have a starting point from which to test from.I would save the shoutbox/forum until the end, as they are not too hard to implement and you really don't need them. You could even download PHPBB or some other such forum engine. TagBoard is a nice shoutbox type thing, and I'm sure you could find some more if you just Google it (or use whatever search engine you like). Of course, like HellFire said, it's really quite simple as long as you know the languages.
  20. First of all, this is mostly theoretical and does not really relate to what I am doing right now.I am thinking of a hierarchy of shapes. Part of the hierarchy is shown here:SquareRectangle / RhombusParallelogramTrapezoidConceptually, each item on the hierarchy should inherit from those below it. After all, all squares are rectangles but not all rectangles are squares. Squares should be able to be used where a rectangle or rhombus is required, and so on.However, in practice, when it comes to implementing these classes, each item would inherit from those above. A rectangle requires more details in its implementation than a square. For example (where a member prefixed by + is not inherited):Square (+width)Rectangle (width, +height) / Rhombus (width, +angle)Parallelogram (width, height, angle)Trapezoid (width, +width2, height, angle)The paradox is, the conceptual part leaks into implementation when you have pointers of references to base classes. But we cannot ignore the fact that if we used that method, our inheriting classes would be ignoring most of the members of the base classes and not creating any of their own.The only practical solution to this problem that I could see would be having each class define all the variables it needs, as well as its base classes variables. This would work, but it would present problems, e.g. how to change a shape when more than one variable needs to be redefined. You could just provide a copy constructor and members to fetch values, and keep all values private.Ideas? Insight?
  21. You could also use the STL algorithm 'accumulate': #include <algorithm>#include <iostream>//...int main(){ int test[] = { 1, 2, 3, 4, 5 }; int result = std::accumulate(test, test + 5); std::cout << result << std::endl; return 0;}It takes a pointer or iterator to the start of a sequence and a pointer of iterator one past the end of the sequence. Simply put, the first argument is the name of the array and the second is the name of the array plus the size of the array. You can also use it for STL containers, as in: #include <algorithm>#include <iostream>#include <vector>//...int main(){ std::vector<int> test(4,9); int result = std::accumulate(test.begin(), test.end()); std::cout << result << std::endl; return 0;}
  22. I would have your template inherit from a base class, e.g. class filetype_base { /*...*/ }template <class type> class filetype : filetype_base { /*...*/ } Then you could store them in a vector of pointers, e.g.: class mytype;std::vector<filetype_base*> fv;fv.push_back(new filetype<mytype>("hello.xxx"));std::cout<<fv[0]->name; Clearly you would need to tinker with the inherited and base classes, and experiment with virtual functions. This is the simplest way I would see of doing it.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.