Menu
  • HOME
  • TAGS

simplifying regular expression

regex,simplification

You are right. (a*b*)* can match any string of a's and b's, so can (a U b)*, therefore they are equivalent. (a U b)* intersect a* is a* so a* is a subset of (a U b)*. Consequently, the whole expression can be simplified to (a U b)*.

How to prevent MariaDB from simplfiying logical expressions

view,mariadb,simplification

MariaDB applied one of the http://en.wikipedia.org/wiki/De_Morgan%27s_laws . Why do you think it is not correct?

Simplify coding trycast vb.net

vb.net,simplify,simplification

You can use TypeOf so as to know what Class is your object. Example If TypeOf obj Is black Then Dim m As Black = TryCast(obj, black) ElseIf TypeOf obj Is green Then Dim m As green = TryCast(obj, green) ElseIf TypeOf obj Is blue Then Dim m As blue...

Clearer Format Firebase Android retrieved data

android,data,firebase,simplification

This will retrieve a random message from the object you've shown in your question. function getRandomMessage(data) { if( !data ) { return null; } var keys = Object.keys(data); var randomKey = keys[ Math.floor(Math.random()*keys.length) ]; return data[randomKey]; } Keep in mind that this assumes you have a small number of records....

Is there a way to simplify “if x == 1 and y == 2:”

python-3.x,simplify,simplification

One of your examples is not like the others. The and form can easily be simplified: if x == 1 and y == 2 and z == 3: becomes: if (x, y, z) == (1, 2, 3): However, the or form can't be made any neater. It could be rewritten...

Which laws simplify this boolean expression?

boolean-expression,simplification,boolean-algebra

You can first start by distributivity of multiplication over addition: !X + (!Y + !Z)*(Y + Z) = !X + !Y*Y + !Z*Y + !Y*Z + !Z*Z Then, we can use complementation to remove elements of the form !p*p: = !X + 0 + !Z*Y + !Y*Z + 0 And...

Mesh simplification algorithm implemented in javascript

javascript,import,three.js,simplification

no it does not take forever, http://jabtunes.com/labs/3d/bunny/ This is the answer to your question, edit the SimplifyModfier.js to suit your needs. I did that and it took around 80 seconds for simplifying a mesh with 25K triangles to 1K triangles. Let me know in case you need further assistance :-)...