Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~10.5K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Tags

25 Posted Topics

Member Avatar for khess

The only obstacle Linux has is the Microsoft monopoly indoctrinating their users and buying the whole computer market,

Member Avatar for subhankar_2
3
2K
Member Avatar for n.utiu

Disclaimer! I have no prior knowledge of php, I just need a clear answer. I have the string $content, and I want to replace any [ or ] between the [nobb] and [/nobb] tags inside it with ^ and *. And I need also to do this again but this …

Member Avatar for n.utiu
0
375
Member Avatar for n.utiu

Few days ago I finished making my own (quite primitive) chat server with SocketServer. I haven't had any problems with it apart from the designing of the chat protocol: I made a very sketchy protocol for messaging. The client just sent unix-like commands to the server to do certain opperations: …

Member Avatar for n.utiu
0
126
Member Avatar for funfullson

GSM modems don't create an interface between your pc and the gsm network; they get the hidden internet signals from the gsm signal

Member Avatar for funfullson
-2
447
Member Avatar for n.utiu

Hi, all! I was wondering if there is any way to check from the server side whether the client has closed a socket connected to one on my side. client side [CODE]import socket s = socket.create_connection ((host, random_port)) s.close () [/CODE] server side [CODE] ... a = lstn.accept () [/CODE] …

Member Avatar for n.utiu
0
5K
Member Avatar for n.utiu

I know python and C++ and want tot start using the boost::python library. I want to use g++ for this not bjam but the tutorials online are really confusing. Can anybody give me a short tutorial on how to build projects using Boost::python ?

0
65
Member Avatar for goback

Try to use [B]this[/B] function to calculate the GCD of two numbers: [CODE] int computeGCD (const int& intA, const int& intB) { if (intB == 0) return intA; return computeGCD (intB, intA % intB); } [/CODE]

Member Avatar for goback
0
322
Member Avatar for n.utiu

I am working at a project that is supposed to run a python script. Here is my main class: [CODE] #include <iostream> #include "scripting.hpp" int main(void) { cScripter oScripter; std::vector <double> vectMy (7, 32); oScripter.doRunScript (&vectMy, "test.py", "function"); return 0; } [/CODE] And here are respectively scripter.hpp and scripter.cpp : …

Member Avatar for n.utiu
0
156
Member Avatar for zaharaandfarah

math.h trigonometric functions take parameters in radians. To convert radians to degrees : cos (60 degrees) is equivalent to [CODE]cos (PI*60/180)[/CODE] PI - predefined constant in math.h

Member Avatar for n.utiu
0
92
Member Avatar for n.utiu

Let's say we have this code : [CODE]#include <iostream> #include <boost/python .hpp> using namespace boost::python; class A{ void foo (void) { std::cout << "Hello World"; } }; BOOST_PYTHON_MODULE(hello) { class_ <A> ("A") .def("foo", A::foo); }[/CODE] and I have an object of type A named MyCPPClass and I want to make …

0
63
Member Avatar for Q8iEnG

std::string has a [B]very useful[/B] member function called .c_str (). It returns the NULL terminated string equivalent of the STL string. [CODE] std::String strMyString ("BLAHBLAHBLAH"); char *myChar = const_cast <char*> strMyString.c_str (); [/CODE] [B]P.S.[/B] Please notice that c_str () returns a const char* not a char*!

Member Avatar for WaltP
0
176
Member Avatar for n.utiu

I have been recently experimenting with Python embedding, but I stumbled across some problems. [CODE]#include <python3.1/Python.h> int main (void) { Py_Initialize (); PyRun_SimpleString("print (\"Hello World\")"); Py_Finalize (); return 0; } [/CODE] As you see it is not the most complicated code :). I have compiled in Code::Blocks using g++. I …

Member Avatar for n.utiu
0
734
Member Avatar for wittykitty

Is [B]Term[/B] a typedef or some kind of object, because if it is a class you can't input it simply like that.

Member Avatar for wittykitty
0
128
Member Avatar for gregarion

This [B][I]number2 = number / 1000;[/I][/B] is rounded to an integer. If you want to have a floating point result use[B] float number2 = number / 1000;[/B]

Member Avatar for metdos
0
123
Member Avatar for aroma7

Please be more specific. Classes are a complex concept of programming. You can get a whole bunch of information about classes just by google-ing it.

Member Avatar for gnarlyskim
-2
106
Member Avatar for hurricane123

Use C++ string, they are better, and more stable. [CODE] #include <string> #include <iostream> int main (void) { std::string strFirst; std::cin >> strFirst; std::cout << strFirst.size (); return 0; } [/CODE] For more information about strings: [url]www.cplusplus.com/reference/string/string/[/url] [url]http://www.cppreference.com/wiki/string/start[/url]

Member Avatar for webs1987
0
125
Member Avatar for merse

Any non-dynamic variable is deleted at the end of it's scope. [CODE] mycass myobj; for(;;) { myobj = [B]myclass(param1,param2);[/B] }[/CODE] The bolded object is deleted just before the compiler reaches the next line. It's scope spans just until the end of that assignment.

Member Avatar for mrnutty
0
147
Member Avatar for n.utiu

Let's take this: [CODE]f = open ('myflie.txt', 'w') f.write ('12345');[/CODE] I always get the length of the output printed on the console. Is there any way to prevent it from printing it?

Member Avatar for n.utiu
0
90
Member Avatar for gastonci

First: The second one doesn't do the same thing as the first one. Second: Try this if you want to shift the elements: [CODE]int intX = 0; while (intX != intSize) { array[ intX ] = array[ intX + 1 ]; ++intX; }[/CODE] [B]Note! If speed is that much a …

Member Avatar for gastonci
0
91
Member Avatar for macobex

[B]push_back[/B] triggers memory reallocation when the size of the vector becomes greater than the capacity(the memory is copied into a larger one - twice as large to be precise). If you know it's size, simply resize it, but push back can do no harm. [B]Tip![/B] If you want to shrink …

Member Avatar for n.utiu
0
154
Member Avatar for n.utiu

I have been recently experimenting with functors and tried o make my own one, inheriting from unary_operator, but I get some errors. [CODE] template <typename T, int intN = 0> class cIsBad : public unary_function <T, bool> { public: bool operator() (const T& tParameter) const { return tParameter == intN; …

Member Avatar for n.utiu
0
121
Member Avatar for AltF4me
Member Avatar for n.utiu

WE have the && operator, the || operator, but xor is only implemented as '^' . And this causes a lot of confusion. Let's take this case: 2 == 2 ^ 2 generates a logical operation instead of bitwise operation , therefore returning a true value. What do yo think: …

Member Avatar for n.utiu
0
234
Member Avatar for n.utiu

I have recently installed Code:Blocks 8.02 for Windows, but I have a problem with my debugger. Every time I try to debug I get an error that says I haven't set my debugger executable yet. I selected the mingw c++ compiler included in the install, and set the debugger exe …

Member Avatar for n.utiu
0
138
Member Avatar for n.utiu

Hi! I am quite an active programmer. I work allot for school so i need a good IDE. I a[COLOR="red"][/COLOR]m currently working on Windows with Dev C++. Dev is quite a good compiler and editor but IMO the debugger...sucks. So I would like to know your opinion on Dev, and …

Member Avatar for abdelhakeem
0
103

The End.