Tuesday, December 26, 2017
Thursday, December 21, 2017
Wednesday, December 20, 2017
JPA Errors
o.h.t.s.e.i.InformationExtractorJdbcDatabaseMetaDataImpl:365 - HHH000262:
Table not found:
the solution of above is terminate the current application
remove the application from the server and restart
Sunday, December 10, 2017
domain modelling
- write the queries that would be executed against the domain model.
- test their performance
Thursday, December 7, 2017
UML
- careful written specification
- use case
- domain model
- architecture diagram
- model driven architecture
- agile modeling classDiagram
- association class
- c_unidir_bidir_relationships.html
- One rule in database design is that a running system should never require a design change just to add data (changes to the design do occur, of course, just not in response to a new data value).
- association
aggregation
dependency
weak entity
association class
abstraction through interface
abstract class
cardinality
unidirectional vs bidirectional relationships
constraints and validation
data binding
type conversion
component diagram
deployment diagram
use case diagrams
================================
OOAD
UML
Agile modelling
Design Pattern
JPA
hibernate
Iconix
RUP
====================
the best practices of above all
book JPA with hibernate by gavin king
- sequence diagram
- dependency vs association
- it's a best practice to prefer unidirectional relationships in a model whenever possible
- if we group similar attributes in the form of a multiple classes then the change in one wont change all the clases. instead if there is a single class then if any change is made then whole class is affected
Tuesday, December 5, 2017
data type
- int is the best data type if only year has to be stored
Monday, December 4, 2017
Stay Motivated
- Learn the Basics
- Study
- best books
- reference documentation
- Meditate
- Always Experiment
- Note down the confusion
- Ask the expert
- Stackoverflow
- Never ever think negative
- Refine
- Test everything
- Make notes of the lessons
- Learn from the best by paying
- Teach for free
- watch videos
- Connect with the Community of the like minded people
- NEVER GIVE UP
- Think about Gail Devers and Magic Johnson
- Be Pure
- Help Others
- Fight
- Focus on what you love
- Sacrifice everything for the Goal
- Dream Dream Dream
- Passion My friend
- If you believe you can do it
- Always Say I shall do it!!!
- Pray Hard
- Work Harder
- Remember Lincoln
- Enhance your focus
- Remember Arjuna
- Consistency is the key
- water can break mountains
- Remember Eklavya
- Nobody taught him
- Refine your Code
- Apply the Design Patterns
- Apply the Best Practices
The best Practices
- JMX
- Web Services
- OSGi
- MicroServices
- Clusters
- Load Balancing
- UML
- Visual Paradigm
- Functionalities in the form of REST
- Messaging
- WebSocket
- RabbitMQ
- STOMP
Friday, December 1, 2017
JPA
- mapped superclass should be represented as abstract classes in Java.
- super classes that represent partial state should better be represented as abstract classes
- single table inheritance is the best strategy
- In single table inheritance mapping the subclasses do not require to have id fields.
inheritance
- apply inheritance to class only if it is really required esp with respect to JPA. ie it should be done if data is divided among the subclasses to a great extent not just to share common methods otherwise it will create complex joins and take much time for accessing the required data.
Friday, November 24, 2017
hibernate
- n+1 read problem
- problem of granularity
- domain model
- coarse grained class vs fine grained class
rdbms issues
- index
- materialized view
- query optimization
- how to read query execution plan?
- joins esp hash
- performance tuning
- partitioning
- pre-joined indexes
- buffer
- latching problem
- filter in join
- join order
- algebra
- statistics
- graph theory
Thursday, November 23, 2017
performance
- use memcache or redis to cache the following
- city/state/country
- zipcode
- qualication types
- job types
Representing address
- how-to-design-the-database-schema-representing-address-elegantly
- Use first solution, If a country does not has any states, just add a dummy state (same as country name). Cache the data of city, state, country (which are not likely to be changes but frequently needed) in database (Query cache) or in server (using APC/memcached etc). Once cached, you wont need many joins thus making queries faster
- the previous solution is related to the information given in the link
- best-practices-for-storing-postal-addresses-in-a-database-rdbms
- make address an entity and store it in a cache like redis or memcache
Wednesday, November 22, 2017
Spring Boot doubts
- disabling embedded tomcat server
- can we disable it
- how to configure it?
- how to know the server being used ie pivotal or embedded tomcat or outside tomcat?
- how to monitor ports which are being used?
use the following command at command prompt to show the port number in use
netstat -anp | find "port 8080" is not working
debugging a spring boot application
- indepth knowledge of build tool like maven and gradle
- indepth knowledge of logging
- indepth knowledge of server ie tomcat etc
- indepth knowledge of browser
- indepth knowledge of cache and how to clean it and disabling it
user interface
- horizontal navigational footer menu
- it should be displayed in the middle one below the other when screen size is reduced
- ie it should be responsive
Tuesday, November 21, 2017
Spring security lessons
- css and image files were not getting loaded because i had overridden the configure method of
- @Override
public void configure(final WebSecurity web) throws Exception {
web.ignoring().antMatchers("/");
} - The above was not loading the css and images. the reason is yet to be known.
- So when i entered the authentication password css and image files are getting loaded as desired.
- @Override
protected void configure(final HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/","/css/**","/images/**").permitAll(); - }
- the above solved the problem to bypass the security for home page,css and image.
- we also need to override the following method of webconfigurerAdapter class to serve the static resources ie we need to add the resource locations through the following commands:
- @Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
//registry.addResourceHandler("/resources/**").addResourceLocations("/", "/resources/");
registry.addResourceHandler("/css/**").addResourceLocations("classpath:/static/css/");
registry.addResourceHandler("/images/**").addResourceLocations("classpath:/static/images/");
registry.addResourceHandler("/js/**").addResourceLocations("classpath:/static/js/");
}
Saturday, November 18, 2017
Friday, November 10, 2017
hello spring boot with css and image
following is the hello spring boot example on github. This example does not use any database and neither spring security has been used.
hello spring boot with static resources
hello spring boot with static resources
Thursday, November 9, 2017
github errors
- dealing-with-non-fast-forward-errors
- when we create a repository and then add a readme file to it then while pushing to it generates the error. I have not worked on its solution instead I created a new repository and did not add readme. then performed the following steps
- goto to the root of the project folder ( check its properties by right clicking n it)
- git init
- git remote add origin https://github.com/javaiskool/springexamples.git
- i got the error:
- fatal: remote origin already exists.
- i removed the error by using the following command
- git remote rm origin
- then
- git remote add origin https://github.com/javaiskool/springexamples.git
- git add .
- git commit -a -m "initial commit"
- git push -u origin --all
- after that i created a readme.md file and described the example.
- As the repository is public username and password were not asked
Wednesday, November 8, 2017
e-commerce
- order vs orderline
- order has the details of customer,orderid,orderdate
- orderline has the details about the order ie all the products that particular order contains ie same sone order can have multiple quantities of multiple products.
- see the example
spring problems
- addResourceLocation
- thymeleaf-url-expression-in-css-file
spring boot
- howto-traditional-deployment.html
- spring-boot-samples
- spring-boot
- tutorial-spring-boot-war-files
- @Bean
- The
spring.main.banner-mode
property is a Spring built-in property; we turn off the Spring's banner - logging through logback
- spring-boot/boot-serve-static
- adding-external-directory-to-spring-boots-static-resources-handling
- webjars
- spring boot solutions by andy-wilkinson @stackoverflow
- spring application can be found under debug menu in sts and hence it can be terminated here
- if unable to create spring boot project inside STS 3.8.4 then goto start.spring.io
- there Spring Initializer
- click switch to full version
- choose the required dependencies
- download the zip
- unzip it
- open it in STS as new maven project
- tutorial-spring-boot-application-development-using-sts.html
Monday, November 6, 2017
Sunday, November 5, 2017
aws
- separate-aws-production-and-development-accounts
- separate aws accounts for
- production(consolidated billing)
- developer
- QA
- billing
- for consolidated billing we need to create the organization and the creator of the organization is the owner of the organization and can control the services of the other linked accounts.
- for this the owner need to add account through the email or account id. if the invitee accepts the invitation then services of this account can be controlled by the organization owner.
- details is as follows:
- If you accept the invitation, the administrator of the organization can attach policy-based controls to your AWS account. The organization administrator can control which AWS services and APIs are allowed in this account for business reasons such as security or budgetary controls. These controls can include preventing this account from leaving the organization.
Sunday, October 29, 2017
Samsung galaxy j7 prime information
- samsung-galaxy-j7-prime-codes.html
- samsung-galaxy-j7-prime-3735-vs-samsung-galaxy-j7-2720
- Today, mobile phones use IR-based proximity sensors to detect the presence of a human ear. This sensing is done for two purposes: Reduce display power consumption by turning off the LCD backlight and to disable the touch screen to avoid inadvertent touches by the cheek.
bootstrap
- the-best-way-to-learn-Bootstrap
- sass mixin
- galaxy-j7-prime responsive check
- baseline
- reboot
- less
- sass
- flexbox
- bootstrap plugin?
- modal and modal.js?
- bootstrap 3 vs bootstrap 4
- when do we need id attribute? is it always required?
- How to define our own class in bootstrap?
- How can we customize appearance?
- sm means small
- lg means large
- how to view properties in browser?
- how to analyze properties in browser?
- order pf the property values?
spring security
- login-page – the custom login page
- default-target-url – the landing page after a successful login
- authentication-failure-url – the landing page after an unsuccessful login
- https://spring.io/guides/gs/securing-web/ how-to-disable-spring-security-for-particular-url
- for checked attribute it should be written like checked="checked"
- single sign on
- Single sign-on (SSO) is a property of access control of multiple related, yet independent, software systems. With this property, a user logs in
with a single ID and password to gain access to a connected system or
systems without using different usernames or passwords, or in some
configurations seamlessly sign on at each system. This is typically
accomplished using the Lightweight Directory Access Protocol (LDAP) and stored LDAP databases on (directory) servers.[1] A simple version of single sign-on can be achieved over IP networks using cookies but only if the sites share a common DNS parent domain.[2]
For clarity, it is best to refer to systems requiring authentication for each application but using the same credentials from a directory server as Directory Server Authentication and systems where a single authentication provides access to multiple applications by passing the authentication token seamlessly to configured applications as Single Sign-On.
Conversely, single sign-off is the property whereby a single action of signing out terminates access to multiple software systems.
google is an example of sso. by logging to gmail we can use blogger, youtube etc
and once we logout of any of the services then we can no longer use any of the connected services. - what-is-and-how-does-single-sign-on-work/
- httpsecurity-websecurity-and-authenticationmanagerbuilder
security
- replay attack
- basic authentication vs digest authentication
- track method should be disabled
- Cross-site_tracing must be disabled
- Password generation and validation
- what is cross site request forgery attack and how to disable it?
- social engineering
- csrf
- http basic in spring
- RSA
- a validation system that does not display the original values. One option is to store the values in a database and only pass the reference id of the row to the form, assuming that's what you mean. You can do all your processing on the server side and minimize the amount of sensitive data passed to the client side.
Saturday, October 28, 2017
Monday, October 23, 2017
User Interface Testing
- check responsive behaviour
- resize the browser to
- normal
- narrow
- wide
- check any broken links
- check the validation
- check the page loading time esp images
- check on various devices
- android smartphone
- iphone
- windows phone
- tablet galaxy series
- ipad
- blackberries
- check by deleting css line ie <link rel="stylesheet"> ie without css support
- check by disabling javascript
- check in various browsers esp old ones ie before IE 4/ and new one
- IE
- firefox
- chrome
- safari
- opera
CSS 2
- liquid vs fixed layout?
- float?
- clear?
- layout?
- animation?
- font?
- what could be the browser support for CSS and how to find this out?
- A jello layout is one in which the content width is fixed, but the margins expand and shrink with the browser
- absolute positioning
- z-index
- when an element is absolutely positioned, it is removed from the normal flow of the page.
- position
- static
- absolute
- fixed
- relative
- If you specify width in percentage then their size is flexible
- Another common use for percentages is in specifying widths. If you don’t need specific widths for your elements or margins, then you can use percentages to make both your main content area and your sidebars flexible in size. You’ll see this done a lot in two- and three- column layouts.
- negative left property value
- css special effetcs
- fixed positioning vs absolute positioning vs static positioning
- border-collapse: collapse;
- The border-collapse property is a special CSS property for tables that allows you to combine cell borders into one border for a cleaner look
- .blueberry p { color: purple; } Here we’re selecting all paragraphs that are descendants of an element in the blueberry class.
Thursday, October 19, 2017
User Interface Design
- IBM UI guide
- 10-great-sites-for-ui-design-patterns
- five-considerations-in-user-interface-for-online-design-2
- howbrowserswork
- 25-extremely-useful-google-chrome-extensions-for-designers-and-developers
- analyzing critical-rendering-path
- https://developers.google.com/web/fundamentals/
- Learning UX design online
- firefoxTools
- Adobe
Superb Resources
- Free Programming Books
- Google Web fundamentals
- IBM Developer Works
- AWS Learning Path
- Official Java Tutorial
- Liferay Portal
- Shopizer
Career Avenues
- SAP
- ABAP
- Apache
Wednesday, October 18, 2017
image
- if an image is made transparent it can be placed on another image
- we can make an image transparent in ms paint as well
- finding-truly-free-stock-images
User Interface Design Approach
- Divide the Interface into logical sections.
- A logical section is just a group of elements that are all related on the page
- don’t add structure for structure’s sake. Always keep your structure as simple as possible to get the job done. For instance, if it is helpful to add a “pets” section that contains both “cats” and “dogs” to the PetStorz page, by all means add it. However, if it provides no real benefit, then it just complicates your page. After working with <div>s for a while, you’ll start to get a feel for when and how much to use them
- Do you ever put <div>s in a class instead of giving it an id? A: Well, remember that an element can have an id and be in one or more classes at the same time, so the choice isn’t mutually exclusive. And, yes, there are many times you create <div>s and place them into classes. Say you have a bunch of album sections in a page of music playlists; you might put all the elements that make up the album into a <div> and then put them all in a class called “albums”. That identifies where the albums are, and they can all be styled together with the class. At the same time you might give each album an id so that it can have additional style applied separately.
- same color for heading and the logo
- very nice font
- high definition pictures
- white background
- bootstrap for responsive design
- image carousel
Tuesday, October 17, 2017
Monday, October 16, 2017
CSS 1
- How to find out the html version supported by the client browser and based on that return that CSS?
- Headfirst HTML CSS
- CSS: the definitive guide
- CSS Pocket Reference
- Well, if you think about it, this gives you a lot of leverage when you use a <div>, because you can wrap a section of content in a <div> and then apply styles to the <div> rather than each individual element. Of course, keep in mind that not all properties are inherited by default, so this won’t work for all properties.
<div> lets you divide your page into logical sections or groupings. p.specials child elements inherit the properties of parent. But this property can also be overridden - there are two kind of elements. block level and inline
- block level have line break at the beginning and at the end where as there is no line break with inline elements
- each element is put in a box. so css has a box model
- One difference between padding and margins is that the element’s background color (or background image) will extend under the padding, but not the margin
- 25px is good margin for paragraph as it makes it more readable
- properties for a paragraph:
- border-color: black;
- border-width: 1px;
- border-style: solid;
- background-color: #a7cece;
- padding: 25px;
- margin: 30px;
- you can add a background image to any element using the background-image property.
- background-image: url(images/background.gif);
- background-repeat: no-repeat;
- background-position: top left;
- How do you add padding only on the left? For padding, margins, and even borders, CSS has a property for every direction: top, right, bottom, and left. To add padding on the left side, use the padding-left property, like this:
- .guarantee {
- line-height: 1.9em;
- font-style: italic;
- font-family: Georgia, “Times New Roman”, Times, serif;
- color: #444444;
- border-color: black;
- border-width: 1px;
- border-style: solid;
- background-color: #a7cece;
- padding: 25px;
- padding-left: 80px;
- margin: 30px;
- background-image: url(images/background.gif);
- background-repeat: no-repeat;
- background-position: top left; }
- We’re using the padding-left property to increase the padding on the left.. Notice that we first set the padding on all sides to 25 pixels, and then we specify a property for the left side. Order matters here - if you switch the order, then you’ll set the padding for the left side first, and then the general padding property will set all sides back to 25 pixels, including the left side!
- margin: 30px;
- margin-right: 250px;
- border-top-color
- border-top-style
- border-top-width
- border-bottom-color
- border-bottom-style
- border-bottom-width
- border-right-color
- border-right-style
- border-right-width
- border-left-color
- border-left-style
- border-left-width
- border-style: dashed;
- border-color: white;
- Browsers can have different default sizes for the keywords thin, medium, and thick, so if the size of your border is really important to you, consider using pixel sizes instead.
- use id for header,footer and navigation-bar
- you use a class when you might want to use a style with more than one element
- Giving an element an id is similar to adding an element to a class. The only differences are that the attribute is called “id”, not “class”, an element can’t have multiple ids, and you can’t have more than one element on a page with the same id.
- An element can have an id and also belong to a class. Think about it this way: an id is just a unique identifier for an element, but that doesn’t prevent it from belonging to one or more classes
- p.specials-> This selects only paragraphs that are in the specials class.
- p#footer -> This selects a <p> element if it has the id “footer”
- <link type=“text/css” href=“corporate.css” rel=“stylesheet” />
- <link type=“text/css” href=“beverage-division.css” rel=“stylesheet” />
- <link type=“text/css” href=“lounge-seattle.css” rel=“stylesheet” />
- Order matters! A style sheet can override the styles in the style sheets linked above it.
- media=”screen” // screen means computer screens
- The media attribute allows you to specify the type of device this style sheet is for
- media="print" //for print
- media="handheld" // for small mobile devices
- media values
- tv
- projection
- aural
- braille
- tty (for teletypes and terminals)
- Not all browsers support media attribute
- Padding, border, and margin are all optional.
- An element’s background will show under the n content and the padding, but not under the margin
- If two style sheets have conflicting property n definitions, the style sheet that is last in the XHTML file will receive preference.
- Some builders say “measure twice, cut once.” I say “plan, div, and span
- pseudo-classes, which are going to allow you to create some very interesting selectors
- <p> can’t contain other block elements, and the headings and paragraphs are obviously block elements
- <div> lets you divide your page into logical sections or groupings.
- The width property specifies the width for the content area only.
- You specify the width of the content area, the padding, the border, and the margin. All of that added together is the width of the entire element.
- Say you set the content area width to be 300 pixels using the width property in a CSS rule. And let’s say you’ve set the margins to 20 pixels, the padding to 10 pixels, and you have a 1 pixel border. What’s the width of your element’s box? Well, it’s the width of the content area added to the width of the left and right margins, the left and right padding, and the left and right border width
- Q: If I don’t set the width of an element, then where does the width come from?
- A: The default width for a block element is “auto”, which means that it will expand to fill whatever space is available. If you think about any of the Web pages we’ve been building, each block element can expand to the entire width of the browser, and that’s exactly what it does
- In general, the height of an element is left at the default, which is auto, and the browser expands the content area vertically so all of the content is visible. Take a look at the elixirs section after we set the width to 200 pixels and you’ll see the <div> got a lot taller. You can explicitly set a height, but you risk cutting off the bottom of your content if your height isn’t big enough to contain it. In general, leave your element heights unspecified so they default to auto. We’re going to talk about this more in the next chapter as well.
- The default padding on a <div> is 0 pixels
- Just remember that text-align, despite its name, works on any kind of inline element. One other thing to keep in mind: the text-align property should be set on block elements only. It has no effect if it’s used directly on inline elements (like <img>).
- Well, if you think about it, this gives you a lot of leverage when you use a <div>, because you can wrap a section of content in a <div> and then apply styles to the <div> rather than each individual element. Of course, keep in mind that not all properties are inherited by default, so this won’t work for all properties.
- descendant selector
- select an <h2> element, but only if it’s inside an elixirs <div>”.
- #elixirs h2 { color: black; }
- This rule says to select any <h2> that is a descendant of an element with the id “elixirs”.
- this means child, grand child etc ie any descendant
- Well, is there a way to select a direct child?
- Yes. For example, you could use “#elixirs > h2”, to select <h2> only if it is the direct child of an element with an id of “elixirs”.
- What if I need something more complex, like an <h2> that is the child of a <blockquote> that is in elixirs?
- #elixirs blockquote h2 { color: blue; }
- This selects any <h2> elements that descend from <blockquote>s that descend from an element with an id of “elixirs”.
- When you use just a number, you’re telling each element in the elixirs <div> to have a line-height of 1 times its own font-size
- The line-height property defines the amount of space above and below inline elements. That is, elements that are set to display: inline or display: inline-block . This property is most often used to set the leading for lines of text
- padding: 0px 20px 30px 10px; (top right bottom left)
- margin: 0px 20px 30px 10px; (top right bottom left)
- margin-right: 20px;
- margin-bottom: 0px;
- margin-left: 20px;
- margin: 0px 20px;
- the above can also be written as :
- margin: 0px 20px
- If the top and bottom, as well as the right and left margins are the same, then you can use a shorthand.
padding-right: 20px;
padding-bottom: 20px; - The above can also be written like :
- padding: 20px;
- border-width: thin;
- border-style: solid;
- border-color: #007e7e;
- the above can also be written as follows:
- border: thin solid #007e7e;
- background-color: white; background-image: url(images/cocktail.gif); background-repeat: repeat-x;
- the above can also be written as
- background: white url(images/cocktail.gif) repeat-x;
- font: font-style font-variant font-weight font-size/line-height font-family
- These values are all optional. You can specify any combination of them, but they need to come before font-size.
- You must specify font size.
- The line-height is optional. If you want to specify one, just put a / right after the font-size and add your line height
- Use Commas between your font family names
- Never use shorthand in CSS files as they make debugging difficult. Long form is more readable and easy to debug. they may take more size. so what?
- There’s another element like <div> that is for inline elements. It’s called a <span>.
- a <span> gives you a way to create a grouping of inline characters and elements
- <li><span class=”cd”>Buddha Bar</span>, <span class=”artist”>Claude Challe</span></li>
- em vs strong vs span
- if you are emphasizing words, use <em>; if you’re trying to make a big point, use <strong>. But, if what you really want is to change the style of certain words, say, the names of albums or music artists on a fan site Web page, then you should use a <span> and put your <span> elements into appropriate classes to group them and style them.
- about image width
- : if you set the width of an image using either the width attribute in the <img> element or the width property in CSS, the browser scales the image to fit the width you specify. This can sometimes be handy if you can’t edit the image yourself to change the dimensions, and you want the image to appear bigger or smaller on the page. But remember, if you rely on the browser to scale your image, you may be downloading more data than you need (if the image is larger than you need).
- if you add a margin on all sides of an inline element, you’ll only see space added to the left and right. You can add padding to the top and bottom of an inline element, but the padding doesn’t affect the
spacing of the other inline elements around it, so the padding will overlap other inline elements - for the links->
- a:link { color: green; } a:visited { color: red; } a:hover { color: yellow; }
- <did not get it>
- Q: Can’t my links be in multiple states at the same time? For instance, my link could be visited, have the mouse hovering over it, and the user could be actively clicking on it all at once.
- A: They sure can. You determine which style is applied by the ordering of your rules. So, the right ordering is generally considered to be: link, visited, focus, hover, and then active. If you use that ordering, you’ll get the results you expect.
- </did not get it>
- A requirement for any floating element is that it have a width
- pseudo -class
- you can style pseudo-classes, but no one ever types them into their XHTML.
- reader style sheets?
- The user agent is the application (usually a browser, such as
Chrome or Firefox) that you are viewing the website with. User agents
have a default stylesheet. You can inspect its properties with a tool
like Chrome's Developer Tools feature.
The "reader" is the web surfer viewing your site. Your site's visitors can optionally set their own stylesheets or custom rules (such as system colours or font preferences). They might do this out of personal preference, or because they have accessibility requirements.
The author's stylesheet is the one explicitly linked to in the HTML of the website itself. I.e., it's the one that you created. - Normally, for good reason, the author stylesheet takes precedence
over user agent and reader stylesheets. However, readers have the
option to set styles that authors can't override. This is also for good
reason, as people with visual impairments or other accessibility issues
will need certain styles to be set across all pages.
whats-difference-between-authors-style-readers-style-agents-style-or-aut
- The user agent is the application (usually a browser, such as
Chrome or Firefox) that you are viewing the website with. User agents
have a default stylesheet. You can inspect its properties with a tool
like Chrome's Developer Tools feature.
- When the browser needs to determine which style to apply to an element, it uses all these style sheets. Priority is given first to the author’s styles (that is, your styles), then to the reader’s styles, and then finally to the browser’s default styles.
- Pseudo- element
- !Important->
- It means, essentially, what it says; that 'this is important, ignore subsequent rules, and any usual specificity issues, apply this rule!'
In normal use a rule defined in an external stylesheet is overruled by a style defined in the
head
of the document, which, in turn, is overruled by an in-line style within the element itself (assuming equal specificity of the selectors). Defining a rule with the!important
'attribute' (?) discards the normal concerns as regards the 'later' rule overriding the 'earlier' ones.
what-does-important-in-css-mean
- do not use !Important as it is maintenance nightmare
- css selectors
- double-colon-vs-single-colon-at-css-syntax
- Browser Detection + Apply Classes to HTML Element
// jQBrowser v0.2: http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('Ö ¡(){® Ø={\'¥\':¡(){¢ £.¥},\'©\':{\'±\':¡(){¢ £.©.±},\'¯\':¡(){¢ £.©.¯}},\'¬\':¡(){¢ £.¬},\'¶\':¡(){¢ £.¶},\'º\':¡(){¢ £.º},\'Á\':¡(){¢ £.Á},\'À\':¡(){¢ £.À},\'½\':¡(){¢ £.½},\'¾\':¡(){¢ £.¾},\'¼\':¡(){¢ £.¼},\'·\':¡(){¢ £.·},\'Â\':¡(){¢ £.Â},\'³\':¡(){¢ £.³},\'Ä\':¡(){¢ £.Ä},\'Ã\':¡(){¢ £.Ã},\'Å\':¡(){¢ £.Å},\'¸\':¡(){¢ £.¸}};$.¥=Ø;® £={\'¥\':\'¿\',\'©\':{\'±\':²,\'¯\':\'¿\'},\'¬\':\'¿\',\'¶\':§,\'º\':§,\'Á\':§,\'À\':§,\'½\':§,\'¾\':§,\'¼\':§,\'·\':§,\'Â\':§,\'³\':§,\'Ä\':§,\'Ã\':§,\'Å\':§,\'¸\':§};Î(® i=0,«=».ì,°=».í,¦=[{\'¤\':\'Ý\',\'¥\':¡(){¢/Ù/.¨(°)}},{\'¤\':\'Ú\',\'¥\':¡(){¢ Û.³!=²}},{\'¤\':\'È\',\'¥\':¡(){¢/È/.¨(°)}},{\'¤\':\'Ü\',\'¥\':¡(){¢/Þ/.¨(°)}},{\'ª\':\'¶\',\'¤\':\'ß Ñ\',\'¥\':¡(){¢/à á â/.¨(«)},\'©\':¡(){¢ «.¹(https://cdn.css-tricks.com/ã(\\d+(?:\\.\\d+)+)/)}},{\'¤\':\'Ì\',\'¥\':¡(){¢/Ì/.¨(«)}},{\'¤\':\'Í\',\'¥\':¡(){¢/Í/.¨(°)}},{\'¤\':\'Ï\',\'¥\':¡(){¢/Ï/.¨(«)}},{\'¤\':\'Ð\',\'¥\':¡(){¢/Ð/.¨(«)}},{\'ª\':\'·\',\'¤\':\'å Ñ\',\'¥\':¡(){¢/Ò/.¨(«)},\'©\':¡(){¢ «.¹(https://cdn.css-tricks.com/Ò (\\d+(?:\\.\\d+)+(?:b\\d*)?)/)}},{\'¤\':\'Ó\',\'¥\':¡(){¢/æ|Ó/.¨(«)},\'©\':¡(){¢ «.¹(https://cdn.css-tricks.com/è:(\\d+(?:\\.\\d+)+)/)}}];i<¦.Ë;i++){µ(¦[i].¥()){® ª=¦[i].ª?¦[i].ª:¦[i].¤.Õ();£[ª]=É;£.¥=¦[i].¤;® ;µ(¦[i].©!=²&&(=¦[i].©())){£.©.¯=[1];£.©.±=Ê([1])}ê{® Ç=Ö ë(¦[i].¤+\'(?:\\\\s|\\\\/)(\\\\d+(?:\\\\.\\\\d+)+(?:(?:a|b)\\\\d*)?)\');=«.¹(Ç);µ(!=²){£.©.¯=[1];£.©.±=Ê([1])}}×}};Î(® i=0,´=».ä,¦=[{\'ª\':\'¸\',\'¤\':\'ç\',\'¬\':¡(){¢/é/.¨(´)}},{\'¤\':\'Ô\',\'¬\':¡(){¢/Ô/.¨(´)}},{\'¤\':\'Æ\',\'¬\':¡(){¢/Æ/.¨(´)}}];i<¦.Ë;i++){µ(¦[i].¬()){® ª=¦[i].ª?¦[i].ª:¦[i].¤.Õ();£[ª]=É;£.¬=¦[i].¤;×}}}();',77,77,'function|return|Private|name|browser|data|false|test|version|identifier|ua|OS|result|var|string|ve|number|undefined|opera|pl|if|aol|msie|win|match|camino|navigator|mozilla|icab|konqueror|Unknown|flock|firefox|netscape|linux|safari|mac|Linux|re|iCab|true|parseFloat|length|Flock|Camino|for|Firefox|Netscape|Explorer|MSIE|Mozilla|Mac|toLowerCase|new|break|Public|Apple|Opera|window|Konqueror|Safari|KDE|AOL|America|Online|Browser|rev|platform|Internet|Gecko|Windows|rv|Win|else|RegExp|userAgent|vendor'.split('|'))) /* ----------------------------------------------------------------- */ var aol = $.browser.aol(); // AOL Explorer var camino = $.browser.camino(); // Camino var firefox = $.browser.firefox(); // Firefox var flock = $.browser.flock(); // Flock var icab = $.browser.icab(); // iCab var konqueror = $.browser.konqueror(); // Konqueror var mozilla = $.browser.mozilla(); // Mozilla var msie = $.browser.msie(); // Internet Explorer Win / Mac var netscape = $.browser.netscape(); // Netscape var opera = $.browser.opera(); // Opera var safari = $.browser.safari(); // Safari var userbrowser = $.browser.browser(); //detected user browser //operating systems var linux = $.browser.linux(); // Linux var mac = $.browser.mac(); // Mac OS var win = $.browser.win(); // Microsoft Windows //version var userversion = $.browser.version.number(); /* ----------------------------------------------------------------- */ if (mac == true) { $("html").addClass("mac"); } else if (linux == true) { $("html").addClass("linux"); } else if (win == true) { $("html").addClass("windows"); } /* ----------------------------------------------------------------- */ if (userbrowser == "Safari") { $("html").addClass("safari"); } else if (userbrowser == "Firefox") { $("html").addClass("firefox"); } else if (userbrowser == "Camino") { $("html").addClass("camino"); } else if (userbrowser == "AOL Explorer") { $("html").addClass("aol"); } else if (userbrowser == "Flock") { $("html").addClass("flock"); } else if (userbrowser == "iCab") { $("html").addClass("icab"); } else if (userbrowser == "Konqueror") { $("html").addClass("konqueror"); } else if (userbrowser == "Mozilla") { $("html").addClass("mozilla"); } else if (userbrowser == "Netscape") { $("html").addClass("netscape"); } else if (userbrowser == "Opera") { $("html").addClass("opera"); } else if (userbrowser == "Internet Explorer") { $("html").addClass("ie"); } else {} $("html").addClass("" + userversion + "");
======================================================================
Headfirst HTML CSS book-> 501- 506 page (did not understand)
sharing eclipse project on github
- create an account on github
- create a repository on github
- make it private just in case if you need
- for private repository you need to pay 7$ per month
- now open command prompt
- change to the project's root directory and execute the following commands
- git init //The "init" command initiates a new git repository in the project directory.
- git remote add origin https://github.com/username/repositoryname.git //to add remote repository
- git add . //this adds all files to the local commit:
- git config --global user.email "userid@gmail.com"//email id configuration
- git config --global user.name "Name" //name configuration
- git commit -a -m "Initial commit" // initial commit
- (This stages your files locally for commit, but they have NOT actually been pushed yet. You've created a commit in your local repository, but not in the remote one. To put it on the remote, do:)
- git push -u origin --all
- the above command will open a dialog box in which login name name password are required to be submitted
- that's it...................
- if you get the errors while committing to the repository the do the following:
- git remote add origin https://github.com/javaiskool/struts.git
- git pull origin master
- git push -f origin master
- https://stackoverflow.com/questions/18328800/github-updates-were-rejected-because-the-remote-contains-work-that-you-do-not-h
- https://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories
Learn from github
Wednesday, September 20, 2017
changing the application name in android
- goto androidmanifest.xml
- click on app_name
- change the app name in strings.xml
- if the app name has two words then include \n to send the next word on new line
changing app icon in android
- right click on res
- choose new image asset
- now choose the png file
Subscribe to:
Posts (Atom)