Mostrando postagens com marcador english. Mostrar todas as postagens
Mostrando postagens com marcador english. Mostrar todas as postagens

domingo, 8 de maio de 2016

CSS - How to change all classes that begin with a certain string?

Hi :)

I needed to change all classes whose names begin with "icon-" for example: .icon-home, .icon-user, .icon-shopping-cart, .icon-th

and instead doing something like this:

.icon-home, .icon-user, .icon-shopping-cart, .icon-th, .icon-minus, .icon-plus, .icon-trash, icon-chevron-down, icon-signout {
    font-family: FontAwesome!important;
}

I did the same thing using this approach:

i, [class^="icon-"], [class*=" icon-"] {
    font-family: FontAwesome!important;
}

it is a little better :) regular expressions rocks :D

I don't know very well how it works, but you can read more here:
http://stackoverflow.com/questions/23963073/css-regex-selector-match-one-or-another-condition
https://css-tricks.com/attribute-selectors/

Best regards,
Adriano Schmidt

quarta-feira, 6 de abril de 2016

Adobe Photoshop CC - How to change language to english

Hii,

I've installed the Adobe Photoshop CC on my PC, but it was in portuguese and some translations aren't so good, so I wanted to change the language to english.

It is very easy, just follow these steps:

- Quit Photoshop (if it is opened)
- Go to the installation directory and go to <installation folder>\Locales\<pt_BR or the other installed language>\Support Files
- Rename the file "tw10428.dat" to "tw10428.bak"
- Open the Photoshop again

That's it. Very simple.

Best regards,
Adriano Schmidt

domingo, 3 de abril de 2016

Ionic - How to scroll programatically?

Hii,

If you are in a Ionic project and you want to move your screen (to scroll it) to the top or to the bottom, you just need to receive the $ionicScrollDelegate and call the methods scrollTop or scrollBottom:

angular.module('mymodule').controller('MyCtrl', function($scope, $ionicScrollDelegate) {

$ionicScrollDelegate.scrollTop();

$ionicScrollDelegate.scrollBottom();

That's it :)

Best regards,
Adriano Schmidt

sexta-feira, 1 de abril de 2016

ionic build android does not update apk files

Hi there,

I ran the command "ionic build android" but the apk files at 'platforms/android/build/outputs/apk' folder were not updated

It started to happen after the crosswalk plugin installation

So, I ran the command "ionic state restore" to delete and fetch the plugins of my package.json and to add the platforms (android and/or ios) again.

After that, when I ran "ionic build android" the apk files were updated, but I realized that I should not use the "android-debug.apk" file like I was used to. Now I must use "android-armv7-debug.apk" or "android-x86-debug.apk" regarding the cell phone processor (ARM or x86).

If you don't know your cell phone processor, try one of the files and if it is the wrong file then a message will be showed to you, and you will close the app, uninstall it, and install it again but with the other file.

These are the commands I am using now:
ionic build android
adb.exe install -r platforms/android/build/outputs/apk/android-armv7-debug.apk

Best regards,
Adriano Schmidt

sexta-feira, 27 de fevereiro de 2015

Sizelimit Exceeded OpenLDAP

Veja a versão em português

Hello my friends,

Today I had this problem in my Java project when I tried do a search in OpenLDAP:
2015-02-26 16:44:04,875 ERROR [br.com.localhost8080.ldap.MyClass] Sizelimit Exceeded
LDAPException: Sizelimit Exceeded (4) Sizelimit Exceeded

LDAPException: Matched DN:
at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
at com.novell.ldap.LDAPSearchResults.next(Unknown Source)
at br.com.localhost8080.ldap.LdapSynchronizer.synchronize(LdapSynchronizer.java:84)

It happens because the OpenLDAP had 1500 users... and the default sizelimit in my Java client was 1000.

Changing the parameter sizelimit at slapd.conf in OpenLDAP doesn't solve the problem.

To solve this I used the class com.novell.ldap.LDAPSearchConstraints like this:
LDAPSearchConstraints ldsc = new LDAPSearchConstraints();
ldsc.setMaxResults(0);

connection.search(searchBase, searchScope, searchFilter, new String[] {}, false, ldsc);
Setting the MaxResults with 0 (zero) the sizelimit becomes unlimited.

Best Regards,
Adriano Schmidt

quinta-feira, 14 de agosto de 2014

NLS_SORT Oracle

Versão em Português

Today I had problems to order uppercase and lowercase letters in the Oracle database.

Running the following command solved the problem:
ALTER SESSION SET NLS_SORT = WEST_EUROPEAN;

This problem occurred in the client environment but not locally because the NLS_SORT parameter was setted to "BINARY" (responsible for sorting [AZ to az]), and what we needed it to be the "WEST_EUROPEAN" [Aa to Zz] standard.

The trigger below changes the value of the NLS_SORT parameter whenever a session starts in the schema. Do not forget to change the schema name.

create or replace trigger PARAM_SESSION_TRIG
after logon
on NomeDoSchema.schema
begin
execute immediate 'ALTER SESSION SET NLS_SORT=WEST_EUROPEAN';
end;

Kind regards!
Adrian Schmidt

quinta-feira, 7 de agosto de 2014

Change JBoss Locale

Versão em português

Hello,

Today I had problems with numeric fields and dates. I typed 20,00 and was displayed 2000. I also had problems with the display of dates.

The problem didn't happen in de development machines, just in homologation machines, because the default locale was different in this environments.

In your eclipse:
- Go to in "Server
- Double-click at JBoss
- Click in "Open Launch Configuration"
- Type at the end of "VM Arguments" field: -Duser.language=pt -Duser.country=BR

But to start JBoss with command line, it doesn't work:
standalone.bat -Duser.language=pt -Duser.country=BR

You need to change the configuration files.

In Windows environments, you must add the following line in the file standalone.conf.bat
set "JAVA_OPTS=%JAVA_OPTS% -Duser.language=pt -Duser.country=BR"

In Linux environments, you must add the following line in the file standalone.conf
JAVA_OPTS="$JAVA_OPTS -Duser.language=pt -Duser.country=BR"

Best Regards!
Adriano Schmidt

PS: My English isn't very good, if you see something wrong please let me know.