Thursday, July 21, 2016

Eclipse - Solution:Problems encountered while deleting resources.

Problems encountered while deleting resources.

If you are creating a Jar file in Eclipse and then try to Run the project and it shows this message:Problems encountered while deleting resources.

Solution

Go to the specified path (maybe "bin" folder) and delete the file (maybe a resources file) manually. 

Plus 

- If the file is locked by Java/Eclipse, close Eclipse, and delete in the real path (on your hard drive)
- Refresh the project and try again.

Thursday, July 7, 2016

C# - The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Problem
Severity: Error
Code:CS0234
Description:The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Project: ProjectName
File: C:\ProjectNAme\Class1.cs
Line: ...
               


Possible solutionts.

1. Menu "Build/Clean solution"
2. Chech the version of .Net Framework.
3. App/Add Referenece.../Select the Referenece.

Regards,















Thursday, March 3, 2016

Tuesday, February 9, 2016

PostrSQL TRIM- Remove blanks

Use TRIM function for (clear white spaces) remove leading and trailing blanks from column of every row in a table

Example

UPDATE table SET column = TRIM(column);

Or

UPDATE table SET column = TRIM(both ' " " ' from column);

Monday, February 8, 2016

Thursday, February 4, 2016

DataTables JQuery: DataTables warning: table id=example - Requested unknown parameter '3' for row 0. For more information about this error, please see http://datatables.net/tn/4



DataTables warning: table id=example - Requested unknown parameter '3' for row 0. For more information about this error, please see http://datatables.net/tn/4
 
This simple solution works for my problem.

<tr>
    <th>Field 1</th>
    <%
        if (showField) {
    %>   
    <th>Field 2</th>
    <th>Field 3</th>
    <%
        } else {
    %>

    <td colspan="2">
        Information, error o warning message!!
    </td>
    <td hidden="true"></td>
</tr>

SQL Server SELECT CASE and convert in VARCHAR


numberValue  is an number

SELECT CASE numberValue 
                        WHEN 1 THEN 'State 1'
                        WHEN 2 THEN 'State 2'
                        WHEN 3 THEN 'State 3'
                        ELSE CAST (numberValue AS VARCHAR(50))



SQL Server SELECT DISTINCT and TOP


Use first DISTINCT netx use TOP and number of the limit

Example:

SELECT DISTINCT TOP 100 FROM Table WHERE condition = condition

Friday, January 29, 2016

Eclipse: Solution Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

Problem: Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

Solution:

Remove the possible Breakpoint that presents conflicts
Open the "Debug View" /  Tab "Breakpoints", search them and uncheck them


Other possible solution: Change Start time in Server

Open the "Servers View" / Open Tomcat (or other) / "Tab Timeout" / Change Start tim




Wednesday, January 27, 2016

Java: Validate String null, equals(), isEmpty()


You can use this information for validate String in Java

== null,  "".equals(),   isEmpty(),   .equals()
Example:
 
        String s1 = null;

        if ("".equals(s1)) {
            System.out.println("empty 1 do not need the check null");
        } else if (s1 == null || s1.isEmpty()) {
            System.out.println("empty 2 only java 6+");
        } else if (s1 == null || "".equals(s1)) {
            System.out.println("Empty 3");
        } else {
            System.out.println("NO empty ");
        }


More info: http://stackoverflow.com/questions/3321526/should-i-use-string-isempty-or-equalsstring