473,769 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ordering Products

Here might be an interesting puzzle for people who like sorting
algorithms ( and no I'm not a student anymore and the problem is not a
students 'homework' but a particular question associated with a
computer algebra system in Python I'm currently developing in my
sparetime ).

For motivation lets define some expression class first:

class Expr:
def __init__(self, name=""):
self.name = name
self.factors = [self]

def __mul__(self, other):
p = Expr()
if isinstance(othe r,Expr):
other_factors = other.factors
else:
other_factors = [other]
p.factors = self.factors+ot her_factors
return p

def __rmul__(self, other):
p = M()
p.factors = [other]+self.factors
return p

def __repr__(self):
if self.name:
return self.name
else:
return "*".join([str(x) for x in self.factors])

One can create arbitrary products of Expr objects ( and mixing numbers
into the products ):
a,b,c = Expr("a"),Expr( "b"),Expr(" c")
a*b a*b 7*a*8*9 7*a*8*9

The goal is to evaluate such products and/or to simplify them.

For expressions like
x = 7*a*8*9
this might be easy, because we just have to sort the factor list and
multiply the numbers.
x.factors.sort( )
x a*7*8*9

-> a*504

This can be extended to arbitrary products:
x = 7*a*b*a*9
x.factors.sort( )
x

a*a*b*7*9

-> (a**2)*b*63

Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?

Regards,
Kay

Jul 21 '05 #1
15 1748
Kay Schluehr wrote:
Here might be an interesting puzzle for people who like sorting
algorithms ( and no I'm not a student anymore and the problem is not a
students 'homework' but a particular question associated with a
computer algebra system in Python I'm currently developing in my
sparetime ).


<folded>
x = 7*a*b*a*9
x.factors.s ort()
x


a*a*b*7*9

-> (a**2)*b*63

Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?

Regards,
Kay


Looks interesting Kay.

I think while the built in sort works as a convenience, you will need to
write your own more specialized methods, both an ordering (parser-sort),
and simplify method, and call them alternately until no further changes
are made. (You might be able to combine them in the sort process as an
optimization.)

A constrained sort would be a combination of splitting (parsing) the
list into sortable sub lists and sorting each sub list, possibly in a
different manner, then reassembling it back. And doing that possibly
recursively till no further improvements are made or can be made.
On a more general note, I think a constrained sort algorithm is a good
idea and may have more general uses as well.

Something I was thinking of is a sort where instead of giving a
function, you give it a sort key list. Then you can possibly sort
anything in any arbitrary order depending on the key list.

sort(alist, [0,1,2,3,4,5,6,7 ,8,9]) # Sort numbers forward
sort(alist, [9,8,7,6,5,4,3,2 ,1,0]) # Reverse sort
sort(alist, [1,3,5,7,9,0,2,4 ,6,8]) # Odd-Even sort
sort(alist, [int,str,float]) # sort types

These are just suggestions, I haven't worked out the details. It could
probably be done currently with pythons built in sort by writing a
custom compare function that takes a key list. How fine grained the key
list is is also something that would need to be worked out. Could it
handle words and whole numbers instead of letters and digits? How does
one specify which? What about complex objects?
Here's a "quick sort" function that you might be able to play with..
There are shorter versions of this, but this has a few optimizations added.

Overall it's about 10 times slower than pythons built in sort for large
lists, but that's better than expected considering it's written in
python and not C.

Cheers,
Ron

# Quick Sort
def qsort(x):
if len(x)<2:
return x # Nothing to sort.

# Is it already sorted?
j = min = max = x[0]
for i in x:
# Get min and max while checking it.
if i<min: min=i
if i>max: max=i
if i<j: # It's not sorted,
break # so stop checking and sort.
j=i
else:
return x # It's already sorted.

lt = []
eq = []
gt = []

# Guess the middle value based on min and max.
mid = (min+max)//2

# Divide into three lists.
for i in x:
if i<mid:
lt.append(i)
continue
if i>mid:
gt.append(i)
continue
eq.append(i)

# Recursively divide the lists then reassemble it
# in order as the values are returned.
return q(lt)+eq+q(gt)
Jul 21 '05 #2
Kay Schluehr <kay.schluehr <at> gmx.net> writes:
Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?


I don't think that sorting is the answer here.
Firts of all IMHO you have to add an
additional constraint - associativity of the operation in question
So the problem could be reduced to making the constant
parts be more associative than the non-constant parts.
which you should be able to
do with a parser. The BNF grammar could look like this:

expr ::= v_expr "*" v_expr | v_expr
v_expr ::= variable | c_expr
c_expr ::= l_expr "*" literal | l_expr
l_expr ::= literal | "(" expr ")"

The trick is to create a stronger-binding multiplication operator on constants
than on mixed
expressions.

This grammar is ambigue of course - so a LL(k) or maybe even LALR won't work.
But earley's method
implemented in spark should do the trick.
If I find the time, I'll write an short implementation
tomorrow.

Diez

Jul 21 '05 #3
Diez B.Roggisch wrote:
Kay Schluehr <kay.schluehr <at> gmx.net> writes:
Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?


I don't think that sorting is the answer here.
Firts of all IMHO you have to add an
additional constraint - associativity of the operation in question
So the problem could be reduced to making the constant
parts be more associative than the non-constant parts.
which you should be able to
do with a parser.


Hi Diez,

I have to admit that I don't understand what you mean with the
'constant parts' of an expression?

The associativity of __mul__ is trivially fullfilled for the dummy
class M if an additional __eq__ method is defined by comparing factor
lists because those lists are always flat:

def __eq__(self, other):
if isinstance(othe r,M):
return self.factors == other.factors
return False

The sorting ( or better 'grouping' which can be represented by sorting
in a special way ) of factors in question is really a matter of
(non-)commutativity. For more advanced expressions also group
properties are important:

If a,b are in a center of a group G ( i.e. they commute with any
element of G ) and G supplies an __add__ ( besides a __mul__ and is
therefore a ring ) also a+b is in the center of G and (a+b)*c = c*(a+b)
holds for any c in G.

It would be nice ( and much more efficient ) not to force expansion of
the product assuming distributivity of __add__ and __mul__ and
factorization after the transposition of the single factors but
recognizing immediately that a+b is in the center of G because the
center is a subgroup of G.
Regards,
Kay

Jul 21 '05 #4


Ron Adam wrote:
Kay Schluehr wrote:
Here might be an interesting puzzle for people who like sorting
algorithms ( and no I'm not a student anymore and the problem is not a
students 'homework' but a particular question associated with a
computer algebra system in Python I'm currently developing in my
sparetime ).
<folded>
>x = 7*a*b*a*9
>x.factors.s ort()
>x


a*a*b*7*9

-> (a**2)*b*63

Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?

Regards,
Kay


Looks interesting Kay.


I think so too :) And grouping by sorting may be interesting also for
people who are not dealing with algebraic structures.
I think while the built in sort works as a convenience, you will need to
write your own more specialized methods, both an ordering (parser-sort),
and simplify method, and call them alternately until no further changes
are made. (You might be able to combine them in the sort process as an
optimization.)

A constrained sort would be a combination of splitting (parsing) the
list into sortable sub lists and sorting each sub list, possibly in a
different manner, then reassembling it back. And doing that possibly
recursively till no further improvements are made or can be made.
I think a comparison function which is passed into Pythons builtin
sort() should be sufficient to solve the problem. I guess the
comparison defines a total order on the set of elements defined by the
list to sort.
On a more general note, I think a constrained sort algorithm is a good
idea and may have more general uses as well.

Something I was thinking of is a sort where instead of giving a
function, you give it a sort key list. Then you can possibly sort
anything in any arbitrary order depending on the key list.

sort(alist, [0,1,2,3,4,5,6,7 ,8,9]) # Sort numbers forward
sort(alist, [9,8,7,6,5,4,3,2 ,1,0]) # Reverse sort
sort(alist, [1,3,5,7,9,0,2,4 ,6,8]) # Odd-Even sort
sort(alist, [int,str,float]) # sort types
Seems like you want to establish a total order of elements statically.
Don't believe that this is necessary.
These are just suggestions, I haven't worked out the details. It could
probably be done currently with pythons built in sort by writing a
custom compare function that takes a key list.
Exactly.
How fine grained the key
list is is also something that would need to be worked out. Could it
handle words and whole numbers instead of letters and digits? How does
one specify which? What about complex objects?


In order to handle complex objects one needs more algebra ;)

Since the class M only provides one operation I made the problem as
simple as possible ( complex expressions do not exist in M because
__mul__ is associative - this is already a reduction rule ).

Kay

Jul 21 '05 #5
Kay Schluehr wrote:

Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?


Hello Kay,

take this into account:
Restrictions like commutativity, associative, distributive and flexibility
laws don't belong neither to operands nor to operators themselves.
Instead these are properties of fields (set of numbers with respect to a
certain operation).
For a famous example for a somewhat "alternativ e" behaviour look at the
Octonions (discovered in 1843 by Graves and 1845 by Cayley), which are not
associative with respect to addition and/or multiplication.
(http://en.wikipedia.org/wiki/Octonions) or the Quarternions, which are
non-commutative (http://en.wikipedia.org/wiki/Quaternion)

Obviously, it's not correct to say: addition is associative, or, that
multiplication is. With the same right, you could say, multiplication is
not associative.
With the same reasoning, we can show that it's not easy to generalize
sorting, commutation, association or distribution mechanisms.

Maybe it would be a very fascinating goal to solve your algorithmic approach
in such a limited environment like the Quarternions.
A solution for this set of numbers, if achieved in a clean, mathematically
abstract way, should hold for most other numbers/fields too, natural and
real included.

I guess that the approach might be this way:
- define/describe the fields which shall be handled
- define/describe the rules which shall be supported
- find methods to reduce sequences of operations to simple binary or unary
operations (tokens) - this may introduce brackets and stacking mechanisms
- a weighing algorithm might be necessary to distinguish between plain
numbers and place holders (variables)
- application of the distributivity (as far as possible) might help to find
a rather flat representation and a base for reordering according to the
weights of the individual sub-expressions

Nevertheless, there are lots of commercial programs which do such sort of
symbolic mathematics, and which would badly fail when it would come to such
awkward fields like Quarternions/Octonions.
Bernhard
Jul 21 '05 #6
> I have to admit that I don't understand what you mean with the
'constant parts' of an expression? From what I percieved of your example it seemed to me that you wanted to evaluate the constants like 7*9 first, so that an expression like

a * 7 * 9 * b

with variables a,b is evaluated like this:

a * 63 * b

So my suggestion was simply to make the *-operator more precedent when
in between two constants. What I mean with constants here are of course
integer/float literals. The concept of a differing operator precedence
can be extended to arbitray elements when their types are known - which
should be possible when variable values are known at parsing
time.
The associativity of __mul__ is trivially fullfilled for the dummy
class M if an additional __eq__ method is defined by comparing factor
lists because those lists are always flat:
I don't care about that, as my approach deosn't use python's built-in parser
- it can't, as that wouldn't allow to re-define operator precedence.

What you do is to
simply collect the factors as list. But what you need (IMHO) is a parsing
tree (AST) that reflects your desired behaviour by introducing a different
precedence thus that the expression

a * 7 *9 * b

is not evaluated like

((a*7)*9)*b

(which is a tree, and the standard way of evaluationg due to built-in parsers
precedence rules) but as

a*(7*9)*b

which is also a tree.
The sorting ( or better 'grouping' which can be represented by sorting
in a special way ) of factors in question is really a matter of
(non-)commutativity. For more advanced expressions also group
properties are important:
No, IMHO associativity is the important thing here - if

(a * 7) * 9

yields a different solution than

a *(7*9)

your reordering can't be done - in the same way as re-arranging
factors a*b to b*a only works if the commute - or, to put in in
algebraic terms, the group is abelian.
If a,b are in a center of a group G ( i.e. they commute with any
element of G ) and G supplies an __add__ ( besides a __mul__ and is
therefore a ring ) also a+b is in the center of G and (a+b)*c = c*(a+b)
holds for any c in G.

It would be nice ( and much more efficient ) not to force expansion of
the product assuming distributivity of __add__ and __mul__ and
factorization after the transposition of the single factors but
recognizing immediately that a+b is in the center of G because the
center is a subgroup of G.


Well, you don't need to expand that product - the subexpression a+b is
evaluated first. If you can sort of "cache" that evaluation's result because
the expressions involved are of a constant nature, you can do so.

The rason (a+b) is evaluated first (at least in the standard python parser,
and in my proposed special parser) is that the parentheses ensure that.

To sum things up a little: I propose not using the python built-in parser
which results in you having to overload operators and lose control
of precedence, but by introducing your own parser, that can do the
trick of re-arranging the operators based on not only the "usual" precedence
(* binds stronger than +), but by a type-based parser that can even change
precedence of the same operator between different argument types is's
applied to. That might sound complicated, but I think the grammar
I gave in my last post shows the concept pretty well.

regards,

Diez
Jul 21 '05 #7
Kay Schluehr wrote:

Ron Adam wrote:
Kay Schluehr wrote: On a more general note, I think a constrained sort algorithm is a good
idea and may have more general uses as well.

Something I was thinking of is a sort where instead of giving a
function, you give it a sort key list. Then you can possibly sort
anything in any arbitrary order depending on the key list.

sort(alist, [0,1,2,3,4,5,6,7 ,8,9]) # Sort numbers forward
sort(alist, [9,8,7,6,5,4,3,2 ,1,0]) # Reverse sort
sort(alist, [1,3,5,7,9,0,2,4 ,6,8]) # Odd-Even sort
sort(alist, [int,str,float]) # sort types

Seems like you want to establish a total order of elements statically.
Don't believe that this is necessary.


I want to establish the sort order at the beginning of the sort process
instead of using many external compares during the sort process. Using
a preprocessed sort key seems like the best way to do that. How it's
generated doesn't really matter. And of course a set of standard
defaults could be built in.
These are just suggestions, I haven't worked out the details. It could
probably be done currently with pythons built in sort by writing a
custom compare function that takes a key list.

Exactly.


The advantage of doing it as above would be the sort could be done
entirely in C and not need to call a python compare function on each
item. It would be interesting to see if and how much faster it would
be. I'm just not sure how to do it yet as it's a little more
complicated than using integer values.
How fine grained the key
list is is also something that would need to be worked out. Could it
handle words and whole numbers instead of letters and digits? How does
one specify which? What about complex objects?

In order to handle complex objects one needs more algebra ;)

Since the class M only provides one operation I made the problem as
simple as possible ( complex expressions do not exist in M because
__mul__ is associative - this is already a reduction rule ).

Kay


I'm played around with your example a little bit and think I see how it
should work... (partly guessing) You did some last minute editing so M
and Expr were intermixed.

It looks to me that what you need to do is have the expressions stored
as nested lists and those can be self sorting. That can be done when
init is called I think, and after any operation.

You should be able to add addition without too much trouble too.

a*b -> factors [a],[b] -> [a,b] You got this part.

c+d -> sums [c],[d] -> [c,d] Need a sums type for this.

Then...

a*b+c*d -> sums of factors -> [[a,b],[c,d]]

This would be sorted from inner to outer.

(a+b)*(b+c) -> factors of sums -> [[a,b],[c,d]]

Maybe you can sub class list to create the different types? Each list
needs to be associated to an operation.

The sort from inner to outer still works. Even though the lists
represent different operations.

You can sort division and minus if you turn them into sums and factors
first.

1-2 -> sums [1,-2]

3/4 -> factors [3,1/4] ? hmmm... I don't like that.

Or that might be...

3/4 -> factor [3], divisor [4] -> [3,[4]]
So you need a divisor type as a subtype of factor. (I think)
You can then combine the divisors within factors and sort from inner to
outer.

(a/b)*(c/e) -> [a,[b],c,[e]] -> [a,c,[b,e]]

Displaying these might take a little more work. The above could get
represented as...

(a*c)/(b*e)

Which I think is what you want it to do.
Just a few thoughts. ;-)
Cheers,
Ron





Jul 21 '05 #8
Bernhard Holzmayer schrieb:
Kay Schluehr wrote:

Now lets drop the assumption that a and b commute. More general: let be
M a set of expressions and X a subset of M where each element of X
commutes with each element of M: how can a product with factors in M be
evaluated/simplified under the condition of additional information X?

It would be interesting to examine some sorting algorithms on factor
lists with constrained item transpositions. Any suggestions?

Hello Kay,

take this into account:
Restrictions like commutativity, associative, distributive and flexibility
laws don't belong neither to operands nor to operators themselves.
Instead these are properties of fields (set of numbers with respect to a
certain operation).
For a famous example for a somewhat "alternativ e" behaviour look at the
Octonions (discovered in 1843 by Graves and 1845 by Cayley), which are not
associative with respect to addition and/or multiplication.
(http://en.wikipedia.org/wiki/Octonions) or the Quarternions, which are
non-commutative (http://en.wikipedia.org/wiki/Quaternion)

Obviously, it's not correct to say: addition is associative, or, that
multiplication is. With the same right, you could say, multiplication is
not associative.


It was associative in the tiny example I presented. I did not mentioned
to discuss the evolving structure of the whole CAS here in detail which
would be better done in an own newsgroup once an early version is
released.

Maybe the setting of the original question should be made more precise:
associative, non-commutative multiplicative groups.

Handling non-associative algebras like Lie algebras is a completely
different matter and I'm not even sure which one is the best way to
represent operations in Python?

Maye this way?
lie = Lie() # create an arbitrary Lie algebra (lie is again a class )
A,B = lie(),lie() # create two arbitrary elements of the Lie algebra
lie[A,B] # create the commutator of the lie algebra by overloading lie[A,B] # the __getitem__ method
lie[A,B] == -lie[-A,B] True

If one wants to enforce assertions like
lie[r*A,B] == r*lie[A,B] True

for certain elements r of some group acting on lie, one must refine
creation of lie in the initial assignment statement e.g.
lie = Lie(V)


where V is some vectorspace and the elements of lie are homomorphisms
on V. V is created elsewhere. There are a lot of constraints induced by
all the objects dynamically coupled together.
With the same reasoning, we can show that it's not easy to generalize
sorting, commutation, association or distribution mechanisms.

Maybe it would be a very fascinating goal to solve your algorithmic approach
in such a limited environment like the Quarternions.
No CAS can represent infinitely many different representations of
quaternions. But it should not be to hard to deal with an algebra that
represents admissable operations on quaternions in an abstract fashion.
A solution for this set of numbers, if achieved in a clean, mathematically
abstract way, should hold for most other numbers/fields too, natural and
real included.

I guess that the approach might be this way:
- define/describe the fields which shall be handled
- define/describe the rules which shall be supported
- find methods to reduce sequences of operations to simple binary or unary
operations (tokens) - this may introduce brackets and stacking mechanisms
- a weighing algorithm might be necessary to distinguish between plain
numbers and place holders (variables)
- application of the distributivity (as far as possible) might help to find
a rather flat representation and a base for reordering according to the
weights of the individual sub-expressions

Nevertheless, there are lots of commercial programs which do such sort of
symbolic mathematics, and which would badly fail when it would come to such
awkward fields like Quarternions/Octonions.


If you take a look on Mathematica or Maple both programs seem to
interpret pure symbols as members of an associative and commutative
algebra:

expand( (a+x)^2) -> a^2 + 2ax + x^2

This works very fast and accurate but is mathematically too restricted
for me. For doing more advanced stuff one needs to do a lot of
programming in either language shipped with the CAS for creating new
packages. But then I ask myself: why not doing the programming labor in
Python and redesign and optimize the core modules of the CAS if
necessary?

Kay

Jul 21 '05 #9
I see, you're sensitive for the difficulties which might arise.
That's the thing I wanted to point out.
Maybe I was looking too far forward...

My first thought was to add attributes/qualifiers to the operands to improve
the sorting.
Then I realized that these attributes/qualifiers were related to the
operators, since multiplication and division use the same operands, but
while in one case it is associative and commutative, it isn't in the other.

I agree that all this leads too far.
But one thing creeps into my mind again:

I guess you'll always need an inverse operation:
A class which can handle multiplication will certainly require an inverse
operation like division.

Bernhard
Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
587
by: Ken Fine | last post by:
(originally posted to one of macromedia's groups; no help, so hopefully someone here can help me out. I'm using VBScript ASP.) When designing administrative interfaces to websites, we often need to provide users with a mechanism to change the order of items that are listed on the page.For example, the _New York Times_ website (http://www.nytimes.com) lists a bunch of top news articles, and normally these are ordered by purely mechanical...
2
2448
by: masood.iqbal | last post by:
What is the standard C/C++ lexicograhic ordering of punctuation characters with respect to each other and the alphanumeric characters? --Masood
5
3232
by: Mike Nolan | last post by:
I notice that 7.4 doesn't do default ordering on a 'group by', so you have to throw in an 'order by' clause to get the output in ascending group order. Is this something that most RDB's have historically done (including PG prior to 7.4) but isn't really part of the SQL standard? On a mostly unrelated topic, does the SQL standard indicate whether NULL should sort to the front or the back? Is there a way to force it to one or the other...
2
2564
by: D. Dante Lorenso | last post by:
First I created a function that selected the next available pin code from a table of pre-defined pin codes: CREATE FUNCTION "public"."get_next_pin_code" () RETURNS varchar AS' DECLARE my_pin_code VARCHAR; BEGIN ... /* this is the pincode we just fetched */ RETURN (my_pin_code);
20
2501
by: Brian Tkatch | last post by:
An ORDER BY a simple-integer inside a FUNCTION, results in SQL0440N, unless the FUNCTION expects an INTEGER as its parameter. For example: DECLARE GLOBAL TEMPORARY TABLE A(A CHAR(1)) INSERT INTO SESSION.A VALUES ('a'), ('b') CREATE FUNCTION A(A char(1)) RETURNS char(1) DETERMINISTIC NO EXTERNAL ACTION RETURN A SELECT A FROM SESSION.A ORDER BY A(1) DROP FUNCTION A DROP TABLE SESSION.A
33
3415
by: Benjamin M. Stocks | last post by:
Hello all, I've heard differing opinions on this and would like a definitive answer on this once and for all. If I have an array of 4 1-byte values where index 0 is the least signficant byte of a 4-byte value. Can I use the arithmatic shift operators to hide the endian-ness of the underlying processor when assembling a native 4-byte value like follows: unsigned int integerValue; unsigned char byteArray;
5
1241
by: Joe Molloy | last post by:
Hi Group, I have a task and I'm interested to see what ideas people have here for the best way of tackling it. I have a table of products. Each of the products is associated with a certain section which is achieved with a foreign key (the section id) linked to the sections table. Now the problem is that when the products are listed in each section the
10
1858
by: panjap | last post by:
i am worlking on my project on a shop and ordering system. i have worked out how to calculate the line total, e.g product proce * qty. i have then managed to add up all the line totals for one order by using the formula Order_Total: Sum((Products.Price**(1-)/100)*100)i then tried to execute the Final Costs by adding the order total, and then this was done in the query "Customer Query making order" deivery costs and then ontop of that...
4
2083
ChrisWang
by: ChrisWang | last post by:
Dear all, I am reading the book "Core Python Programming". In the chapter talking about modules, it says the modules should follow this ordering: import Python Standard Library modules import Python third party modules import Application-specific modules
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.