Affichage des articles dont le libellé est Functions. Afficher tous les articles
Affichage des articles dont le libellé est Functions. Afficher tous les articles

dimanche 23 février 2014

Re: Functions help topic





On Feb 23, 2014, at 12:59 AM, Ben Finney <(E-Mail Removed)> wrote:
>
> You should ask question like this on the “python-tutor” forum.


Thanks Ben, I wasn’t aware of PythonTutor.






lundi 10 février 2014

Storage space is running out - some system functions may not work topic




I have the 32GB N5, and currently have about 500MB free. That seems like it should be enough to me, but Android obviously thinks differently. I called Google Nexus support and talked to someone who had zero knowledge/training, so no help there, they just told me to delete stuff until the message disappeared(which I find to be an insulting "solution").

My question is, is this message a bug? And/or what is the minimum amount of space that needs to be left unused for all of the "system functions" to work correctly.

My appreciation to anyone who can answer this question.





[Help] Warface - "virtual functions" help please topic




Hi guys.
I want to add to my hack "ESP classes"(medic,sniper,engineer ets.) of players and "ESP weapons" (guns,mines,grenades) of players.
Who can share part of the code? example? or suggest what "virtual functions and classes" needed for this?http://www.youtube.com/watch?v=d5qqSz1wzdM





mercredi 29 janvier 2014

[App 2.2+][Free] Calculator with 'n' number of Functions... topic




Online FREE Engineering Calculators for Engineers and Students worldwide, Our website features more than few hundred calculators for solving complex equations and formulas in field of Electrical, Mechanical, Chemical, Electronics, Civil, Metallurgy, Oil & Gas, Optical, Plastics, Ceramics, Physics, Maths and many more to come...
Online Calculator provides basic and advanced mathematical functions useful for school or college. You can operate the calculator directly from your keyboard.

Google play : https://play.google.com/store/apps/d...ite.calculator

Special Features :
*.* GENERAL
*.* CIVIL
*.* OPTICAL
*.* MECHANICAL
*.* PLASTIC
*.* METALLURGY
*.* ELECTRICAL
*.* ELECTRONICS
*.* CHEMICAL
*.* PHYSICS
*.* CERAMICS
*.* OIL AND GAS
*.* STRUCTURAL
*.* FINANCE





samedi 25 janvier 2014

[Tutorial] Boolean functions framework. topic




Before I share the framework I want to introduce readers to some background information. On Wolfram's MathWorld website, there is an entry titled "Boolean Function". There are atleast 16 shown. Each of them are defined by a list of truth values. 4 truth-values exist for each function. They run vertical. (This point forth let vertical mean column and horizontal mean row.) An enumeration of possible states of two bits. (No columns are labeled.) 0|0 0|1 1|0 1|1 The left column will be the A column and the B column the right column. A|B 0|0 0|1 1|0 1|1 With a third column we can compare across all of them to infer if A is 0 or 1, and B is 0 or 1, what C will be. Given two bits you essentially get these possibilities. "00", "01", "10", "11". A bit is a value storing either a 0 or a 1. After creating a third column it is labeled with a C. A|B|C 0|0| 0|1| 1|0| 1|1| A and B columns even have their own functions which will match-up exactly in column C. Here is the WolfRam MathWorld page for reference: http://mathworld.wolfram.com/BooleanFunction.html Time for the source code! I created a namespace named "Boolioni". In it there is a data structure I call Column. 4 truth values, and technically you are accessing horizontally. A list of things included in Boolioni: +Convert a boolean function index to its string name +Convert a column to its string name +Print all the names of the boolean functions +Convert a column to its boolean function index +Convert a boolean function's string name to a boolean function index. +Convert a boolean function's index to a column +Convert a boolean function's name to a column +Printout values of a column. The source code. http://codepad.org/tEl5Fur4 [code]#include using namespace std; namespace Boolioni { struct Column { bool States [4]; friend bool operator== (Column &col1, Column &col2); friend bool operator!= (Column &col1, Column &col2); }; bool operator== (Column &col1, Column &col2) { return (col1.States[0] == col2.States[0] && col1.States[1] == col2.States[1] && col1.States[2] == col2.States[2] && col1.States[3] == col2.States[3]); } bool operator!= (Column &col1, Column &col2) { return !(col1 == col2); } std::string getNameOfIndex(unsigned int nIndex); std::string getNameOfColumn(Column column); void printFunctionNames(); unsigned int getIndexByColumn(Column column); unsigned int getIndexByName(std::string strName); Column getColumnByIndex(unsigned int nIndex); Column getColumnByName(std::string strVal); void printColumn(Column column); std::string getNameOfIndex(unsigned int nIndex) { std::string strName; switch(nIndex) { case 0: { strName = "FALSE"; } break; case 1: { strName = "AND"; } break; case 2: { strName = "A AND NOT B"; } break; case 3: { strName = "A"; } break; case 4: { strName = "NOT A AND B"; } break; case 5: { strName = "B"; } break; case 6: { strName = "XOR"; } break; case 7: { strName = "OR"; } break; case 8: { strName = "NOR"; } break; case 9: { strName = "XNOR"; } break; case 10: { strName = "NOT B"; } break; case 11: { strName = "A OR NOT B"; } break; case 12: { strName = "NOT A"; } break; case 13: { strName = "NOT A OR B"; } break; case 14: { strName = "NAND"; } break; case 15: { strName = "TRUE"; } break; } return strName; } void printFunctionNames() { cout





vendredi 24 janvier 2014

should I transfer 'iterators' between functions? topic




On Fri, 24 Jan 2014 22:37:37 -0800, seaspeak wrote:

> take the following as an example, which could work well. But my concern
> is, will list 'l' be deconstructed after function return? and then
> iterator point to nowhere?


That would be a pretty awful bug for Python, since it would like lead to
a core dump. But no, it works fine, as you can see by trying it at the
interactive interpreter:

py> def test():
.... L = [1, 2, 4, 8, 16]
.... return iter(L)
....
py>
py> for i in test():
.... print(i)
....
1
2
4
8
16


In fact, we don't even need a function to see the same effect:


py> L = [1, 2, 4, 8, 16]
py> it = iter(L)
py> del L
py> L = "something else"
py> for i in it:
.... print(i)
....
1
2
4
8
16


Python keeps track of when objects are in use, and does not destroy them
so long as it is in use. In the meantime, you can exit the function,
unbind (delete) the variable, re-assign to something else, whatever, and
you should never get a core dump.

(I've only ever seen a single core dump in Python in 15+ years.)



--
Steven