quinta-feira, 27 de novembro de 2014

quinta-feira, 20 de novembro de 2014

NETBEANS - Apache Tomcat 8.0.3.0 - can't access the /manager direcotry

Are you trying to access /manager and you can't?
You already changed the file tomcat-users.xml but still you can access the manager?
The problem is that there two places where you can find tomcat-users.xml


I changed the file in the directory Catalina Base and it worked.
Maybe, like me, you changed tomcat-users.xml of the directory that is in Program Files.
Hope it helps!

Part 1 - Java RESTFul Web Service with RESTEasy, Maven, Tomcat and Netbeans


domingo, 2 de novembro de 2014

Não é só a renda que está se concentrando na mão de poucos ao redor do mundo.

O mundo está ficando mais inteligente? Huuummmmm. Não é só a renda que está cada vez mais concentrada nas mãos de poucos. Assim também está acontecendo com o conhecimento. Milhões de pessoas usam smartphones ao redor do mundo e tem a ilusão de que, de alguma forma, elas fazem parte desse grupo que entende de tecnologia, mas isso é apenas uma ilusão. Paradoxalmente, em relação o número de pessoas no planeta, o número de pessoas que possui conhecimento científico tecnológico é cada vez menor.
Carl Seagan um dia disse
We live in a society exquisitely dependent on science and technology, in which hardly anyone knows anything about science and technology.

Tradução
Nós viemos em uma sociedade sofisticada e dependente de ciência e tecnologia, na qual quase ninguém entende coisa alguma sobre ciência e tecnologia.

O mundo está ficando mais inteligente?
Na verdade, o conhecimento está ficando cada vez mais concentrado e ninguém está se dá conta disso.


domingo, 24 de agosto de 2014

Mission Blue - Official Trailer - Exclusively on Netflix Aug 15


GIT - to send your files to git.





  git push origin master


I'll be honest with you. I don't think git is a very intuitive tool.

Message to Jeff Bezos about CreateSpace website.

I'm sorry to say that, but you are a billionaire company but still this website https://www.createspace.com is not good. How can that be?
All this money and it seems sometimes that you are testing us. What for?
We just want to publish books. That's all.
CreateSapce interface was designed to make us crazy.
Performance is not good, and how that can be? You are the pioneer of cloud computing, how can you have a website with such poor performance for GOD sake?
Jeff Bezos, you are rich beyond comprehension, can't you spend some miserable dollars to make this website https://www.createspace.com better?

Best regards,

Daniel.

terça-feira, 19 de agosto de 2014

quarta-feira, 6 de agosto de 2014

Some considerations - Sybase, VB6, Crystal Reports, Windows 8

Is Sybase, VB6, Crystal Reports and Windows 8 a feasable scenario?

You should get rid of VB6 and Crystal Reports as soon as possible, but yes, all together they work.

With a lot of problems but they work.

Remember SAP owns Sybase and Crystal. They will tell you that if the scenario above is your scenario, then you are in deep s*t (like me).


Does Crystal Reports 8 works with Windows 8? Yes, with a lot of limitations. Again, get rid of this version as soon as possible. Migrate to XI.

What is the minimum version of Sybase Client suitable for Windows 8? Version 15. That's it.
 But there's a catch. There's no more a ODBC driver. Don't try to force an ODBC driver, ok? Instead, you'll have to figure out how to work with the driver Adaptive Server.

What if I decide to migrate all my reports to Reporting Services (rdl format)?
That's the one million dollars question.

1 - RPT Crystal Reports can't be converted to RDL. There's no magical machine that will do that to you. You'll have to rebuild the reports from scratch (Oh, that was cruel, I know).

2 - Sybase Store Procedures and Reporting Services don't work well together. It seems that there's something in the DNA of Sybase Database that hates Microsoft technology. So, if you are using Sybase and you want to try Reporting Services, you will probably have a lot of weird problems (at least, that's my experience).

3 - There are complicated issues related to ODBC and OLEDB when it comes to Reporting Services. Sometimes the server application don't recognize the drivers installed in the server macine. In my case, the server application couldn't recognize the adaptive driver of Sybase.

OK, and what is the solution!!!! That's what you are screeming right now. Well, I don't know. I didn't mirate. I'm struggle with my scenario and doing the best I can.
All I can do is share my experience with you so you save time (and money).

And that's it folks!

If you have questions, write them down on the comments section.

Bye!






quarta-feira, 16 de abril de 2014

This is gonna blow your mind - Operation System Identification

You know there's a lot of  routines to identify Operation System, but none of them are as classy or as elegant as the following one.

This code is not mine. My friend Cicero came to me with this code and found it fantastic!

I know it's VB6, it's old stuff. But with all this fuss about Operational System migration (people leaving Windows XP and adoptint Windows 7 and or Windows 8) I believe a code like that will be extremely useful.
Look at the elegance. Amazing!

Public Function MyOSVersion() As String
    Dim lstrResult As String
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", , 48)
    For Each objItem In colItems
        lstrResult = "OS Name: " & objItem.Caption & vbNewLine & "Version: " & objItem.Version
        Exit For
    Next
    MyOSVersion = lstrResult
End Function

Public Function isWindows8() As Boolean
      Dim lstrResult As String
      lstrResult = MyOSVersion
      isWindows8 = (InStr(1, lstrResult, "Microsoft Windows 8") > 0)
End Function


Public Function isWindowsXP() As Boolean
      Dim lstrResult As String
      lstrResult = MyOSVersion
      isWindowsXP = (InStr(1, lstrResult, "Microsoft Windows XP") > 0)
End Function

segunda-feira, 14 de abril de 2014

How do I call a controller from another controller?

Hi!

Have you ever had this problem? You are on a certain page and you want to call a different Controller?

@Html.ActionLink([The name that will appear on the webpage], [The Action], [The name of the controller], [The parameters (Example.. new { code = item.code})], null)


Text, Action, Controller, Parameters, HttpObj.

The secret is to use the right overload. On the last parameter you have to pass null. If you use the overload with three parameters, for some reason I don't know, it doesn't work.

That's it!

terça-feira, 8 de abril de 2014

Parse, Regular Expression

Vira e mexe eu tenho que fazer um parse de um método VB. Finalmente achei uma forma elegante é simples de fazê-lo.

 string Content = [A string que será usada como base];

string myRegExp = "(?<=Sub)(.*?)(?=End Sub)"; // A expressão para o Regular Expression

Regex r = new Regex(myRegExp, RegexOptions.Singleline); // Execução

Match m = r.Match(Content); // Et Voilà!! And done!

quarta-feira, 19 de fevereiro de 2014

Activate the WCF trace

Hi!

Sometimes you can't find out whata hell is going on with your WCF service.
In those times you should youse this amazing tool.

Put those tags at the and of your config file.

Really usefull!


<system.diagnostics>
   <sources>
       <source name="UserTraceSource" switchValue="Warning, ActivityTracing" >
          <listeners>
              <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="C:\logs\MyTrace.svclog" />
          </listeners>
       </source>
   </sources>
   <trace autoflush="true" /> 
</system.diagnostics>
 

quinta-feira, 13 de fevereiro de 2014

sexta-feira, 24 de janeiro de 2014

JOGET - POPULATE COMBO WITH USER

BEAN SHELL SCRIPT

Replace the variables with your parameters.
#envVariable.jdbcDefaultUrl#
#envVariable.jdbcDefaultUser#
#envVariable.jdbcDefaultPassword#

=============================================
// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;

public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);

Connection con = null;

Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("#envVariable.jdbcDefaultUrl#", "#envVariable.jdbcDefaultUser#", "#envVariable.jdbcDefaultPassword#"); // declare datasource

if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user order by firstname asc"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
            FormRow r1 = new FormRow();
            r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
            r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
            f.add(r1);
        }
}

return f;
}
return test();

Using HASH VARIABLE - JOGET - BEAN SHELL FORM BINDER

This programming code has the purpose of populate a selectbox.


// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;

public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);

Connection con = null;

Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3307/jwdb?useUnicode=true&characterEncoding=UTF-8", "root", ""); // declare datasource

if(!con.isClosed())
{

String pId = "#currentUser.username#";
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user WHERE username=? order by firstname asc"); //  SQL query
stmt.setString(1, pId);

ResultSet rs = stmt.executeQuery();
while (rs.next()) {
            FormRow r1 = new FormRow();
            r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
            r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
            f.add(r1);
        }
}

return f;
}
return test();

quinta-feira, 23 de janeiro de 2014

JOGET Bean Shell Form Binder

An example of how to populate a combo using Bean Shell Form Binder.
Pay attention to the driver
com.microsoft.sqlserver.jdbc.SQLServerDriver
I'm connecting to a Microsoft SQLServer.



// Listar todas as demandas
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;

public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);

Connection con = null;

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
con = DriverManager.getConnection("jdbc:sqlserver://148.6.7.999:1433;databaseName=dbChapolim;user=usr_kiko;password=usr_kiko;"); // declare datasource

if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select NomeSistema ID, NomeSistema from TB_SISTEMA order by NomeSistema ASC"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
            FormRow r1 = new FormRow();
            r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
            r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
            f.add(r1);
        }
}

return f;
}
return test();

sexta-feira, 17 de janeiro de 2014

Aplicação Bloqueada por Definições de Segurança

Suas definições de segurança impediram a execução de uma aplicação autoassinada.

Depois de instalar o JAVA - VERSÃO 7, update 51, comecei a receber erros estranhos.
A mensagem dá a impressão que é algum problema de FIREWALL ou coisa parecida. Mas não é.
É o JAVA 7.

Para resolver.
Painel de Controle > Java > Segurança > Nível de Segurança -> Medio.

Que apurrinhação!!



Resolvido.


segunda-feira, 13 de janeiro de 2014

JOGET - After trying thousands of bpm applications.


After trying thousands of BPM applications I found JOGET.
I'm very excited with JOGET. Why?
After trying BonitaSOFT, Process Maker and Lombardi BPM, I found JOGET that has, in the community edition, enough features for you to make a complex workflow.
Amazing!!!!
The community version of Bonita and PM are not very, how can I say, enough. Even for study.
I'm just at the beginning of my evaluation, but my first impression of the product was excellent.
Há!

Here you have more details about it.

Joget Workflow

Joget Workflow v3 is an open source web platform that simplifies the development of BPM and workflow apps. Drag and drop to design processes, forms, lists and front-end UI.
Unlike typical workflow engines, Joget Workflow allows IT professionals to turn their processes into a full-fledge workflow web application. With v3′s user friendly drag-and-drop user interface, developers are able to quickly design and prototype complex processes, easily create and map dynamic forms to process activities, combine forms and data listing into CRUD (create-read-update-delete) seamlessly; and assemble web UI components to create the final application front-end.