Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 9
41
CSS Fonts, Icons, Links / Re: CSSFonts
« Last post by lilclowns on October 18, 2017, 05:47:09 am »
achoesierry.....I'm seeing the path correct in dist/ here. Can you point to what file you are seeing this issue in?

42
CSS Fonts, Icons, Links / Re: CSSFonts
« Last post by Fortunato on October 18, 2017, 05:44:27 am »
How ?
43
JavaScript Operators / Re: COMPARISON OPERATORS
« Last post by achosierry on October 18, 2017, 05:39:34 am »
Just started using JQuery recently. (Fairly recently, I suppose...) What am I doing wrong here?

var userDate = new Date();
if(userDate.getHours() => 12)
{
    var post = $('p[title="test"]');
    post.text('Would you look at the time?');
}
44
JavaScript Operators / Re: BITWISE OPERATORS
« Last post by achosierry on October 18, 2017, 05:30:55 am »
Hi guys,

So this exercise is fairly easy and I got it work, however i wanted to see if there was a way to dynamically build the mask to be equal in length to the original binary value instead of manually counting and creating a mask by hand.

Here's my code so far:

a = 0b11101110
b=str(bin(a))
c="1"

b = b.replace("0b", "")
print b
for n in range(1,len(b)):
    c +="1"
print c
c=int(c)
print type(c)
print c

So what's happening is that I'm able to build a string with the right number of 1s but then I can't find a way to take that string and convert it the binary form. Converting it an integer, as you can image, just creates an integer with a bunch of 1's in it.

Anyone have any suggestions?
45
CSS Fonts, Icons, Links / Re: CSSFonts
« Last post by aireenrosas on October 18, 2017, 05:29:45 am »
i have her a sample codes for declaring css fonts...


<!DOCTYPE html>
<html>
<head>
<style>
p.serif {
    font-family: "Times New Roman", Times, serif;
}

p.sansserif {
    font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>

<h1>CSS font-family</h1>
<p class="serif">This is a paragraph, shown in the Times New Roman font.</p>
<p class="sansserif">This is a paragraph, shown in the Arial font.</p>

</body>
</html>
46
JavaScript Operators / Re: ARITHMETIC OPERATORS
« Last post by slav101 on October 18, 2017, 05:28:25 am »
JavaScript Arithmetic Operators

Arithmetic operators perform arithmetic on numbers (literals or variables).

Operator          Description
    +                   Addition
    -                 Subtraction
    *                Multiplication
    /                   Division
   %                   Modulus
   ++          Increment
    --                 Decrement

Arithmetic Operations

A typical arithmetic operation operates on two numbers.

The two numbers can be literals:

Example
var x = 100 + 50;

Operators and Operands

The numbers (in an arithmetic operation) are called operands.

The operation (to be performed between the two operands) is defined by an operator.

Operand   Operator   Operand
   100        +              50

The addition operator (+) adds numbers:

Adding
var x = 5;
var y = 2;
var z = x + y;

The subtraction operator (-) subtracts numbers.

Subtracting
var x = 5;
var y = 2;
var z = x - y;

The multiplication operator (*) multiplies numbers.

Multiplying
var x = 5;
var y = 2;
var z = x * y;

The division operator (/) divides numbers.

Dividing
var x = 5;
var y = 2;
var z = x / y;

The modular operator (%) returns the division remainder.

Modulus
var x = 5;
var y = 2;
var z = x % y;

The increment operator (++) increments numbers.

Incrementing
var x = 5;
x++;
var z = x;

The decrement operator (--) decrements numbers.

Decrementing
var x = 5;
x--;
var z = x;

Operator Precedence

Operator precedence describes the order in which operations are performed in an arithmetic expression.

Example
var x = 100 + 50 * 3;

Is the result of example above the same as 150 * 3, or is it the same as 100 + 150?

Is the addition or the multiplication done first?

As in traditional school mathematics, the multiplication is done first.

Multiplication (*) and division (/) have higher precedence than addition (+) and subtraction (-).

And (as in school mathematics) the precedence can be changed by using parentheses:

Example
var x = (100 + 50) * 3;

When using parentheses, the operations inside the parentheses are computed first.

When many operations have the same precedence (like addition and subtraction), they are computed from left to right:

Example
var x = 100 + 50 - 3;

JavaScript Operator Precedence Values

Value   Operator   Description                 Example
19                ( )   Expression grouping          (3 + 4)
            
18                 .           Member                       person.name
18                []   Member                      person["name"]
            
17                ()   Function call               myFunction()
17              new   Create                        new Date()
            
16               ++   Postfix Increment           i++
16                --   Postfix Decrement           i--
            
15               ++   Prefix Increment           ++i
15                --   Prefix Decrement            --i
15                 !           Logical not                         !(x==y)
15             typeof   Type                                 typeof x
            
14                *           Multiplication                  10 * 5
14                /           Division                          10 / 5
14               %           Modulo division                  10 % 5
14               **   Exponentiation                  10 ** 2
            
13               +           Addition                          10 + 5
13               -           Subtraction                  10 - 5
            
12              <<   Shift left                         x << 2
12              >>   Shift right                         x >> 2
12            >>>   Shift right (unsigned)         x >>> 2
            
11               <           Less than                         x < y
11              <=   Less than or equal         x <= y
11               >           Greater than                 x > y
11              >=   Greater than or equal         x >= y
            
10              ==   Equal                         x == y
10            ===   Strict equal                x === y
10              !=           Unequal                         x != y
10             !==   Strict unequal                x !== y
            
6              &&     Logical and                x && y
5               ||           Logical or                        x || y
            
3               =           Assignment                x = y
3              +=   Assignment               x += y
3               -=   Assignment                x -= y
3              *=     Assignment                x *= y
3              %=   Assignment               x %= y
3             <<=   Assignment              x <<= y
3             >>=   Assignment              x >>= y
3            >>>=   Assignment             x >>>= y
3              &=           Assignment               x &= y
3              ^=   Assignment               x ^= y
3               |=   Assignment                x |= y
47
JavaScript Operators / Re: LOGICAL OPERATORS
« Last post by achosierry on October 18, 2017, 05:24:21 am »
I have below code which is not working.

var book_id = $('#indexBookSearch');
var tag_id  = $('#indexTagSearch');

if((book_id.val() == "") || (tag_id.val() == ""))
{
    $('#userMessages').html('<div class="alert alert-info">'+
        '<button type="button" class="close" data-dismiss="alert">&times;'+
        '</button>'+
        '<strong>Information ! </strong> Please select search criteria first.'+
    '</div>');
    return false;
48
JavaScript Operators / Re: ASSIGNMENT OPERATORS
« Last post by achosierry on October 18, 2017, 05:22:10 am »
This issue has me confused. The first piece of code works fine without crashing, it assigns s1 to s2 perfectly fine. But the second group of code causes the program to crash.

Anyone have any idea on why this is happening or what the problem could be?

Code 1:(works)

    s1.add(10, 30, 25, "Test Screen", false);
s1.add(13, 10, 5, "Name:XXX", false);
s1.add(13, 18, 30);
s1.remove(-1);
Screen s2 = s1;
49
CSS Fonts, Icons, Links / Re: CSSFonts
« Last post by achosierry on October 18, 2017, 05:15:56 am »
icon.css for default theme its trying to load ./assets/fonts/icons.woff2 but doesnt exist, also its not loading the otf font
50
CSS Fonts, Icons, Links / Re: CSS ICONS
« Last post by achosierry on October 18, 2017, 05:13:26 am »
The fonts in the default theme are:

icons.eot
icons.otf
icons.svg
icons.ttf
icons.woff
icons.woff2
But in the basic theme they are:

icons.eot
icons.svg
icons.ttf
icons.woff
the dist its omitting the otf from the default theme

dist icon.css file

src: url("../themes/default/assets/fonts/icons.eot");
src: url("../themes/default/assets/fonts/icons.eot?#iefix") format('embedded-opentype'),
url("../themes/default/assets/fonts/icons.woff2") format('woff'),
url("../themes/default/assets/fonts/icons.woff") format('woff'),
url("../themes/default/assets/fonts/icons.ttf") format('truetype'),
url("../themes/default/assets/fonts/icons.svg#icons") format('svg');
But if you use icon alone as like in semantic-ui-icon it doesn't contains the woff2 and still doesnt load the otf file

ui-icon file:

src: url("assets/fonts/icons.eot");
src: url("assets/fonts/icons.eot?#iefix") format('embedded-opentype'),
url("assets/fonts/icons.woff2") format('woff'),
url("assets/fonts/icons.woff") format('woff'),
url("assets/fonts/icons.ttf") format('truetype'),
url("assets/fonts/icons.svg#icons") format('svg');
Pages: 1 ... 3 4 [5] 6 7 ... 9