2012-11-23
Disable "Internet Explorer Enhanced Security Configuration"
This way you can disable / deactivate / turn off the "Internet Explorer Enhanced Security Configuration" in Windows Server 2012:
2012-10-25
2012-09-28
Increase tablespace size in Oracle
>> 2012-09-27 03:48:18 INFO - ProjectTemplateRPCImpl : updateProjectTemplateXML(): errorCode:errorText ::-1691:ORA-01691: LOB-Segment XS.SYS_LOB0000075533C00015$$
...something like this (tablespace is full) might be solved by entering this as a DBA user using sqlplus.
alter database datafile 'C:\app\dev\oradata\dev\MY_FILE_BSDT1.DBF' resize 1000M;
or
alter database datafile 'XXX.dbf' autoextend on next 50M maxsize 2048M;
2012-09-25
Drop a list of MySQL tables using schema meta-data
You can select tables you would like to drop from MySQL's meta schema. In this case I want to drop all tables of the user/schema user.
select concat('drop table ', table_name, ';') from information_schema.tables where table_schema = 'user';
Provides following output:
'drop table booking;'
'drop table bookings;'
'drop table languages;'
'drop table report;'
'drop table reports;'
'drop table resource;'
'drop table resource_languages;'
'drop table resources;'
'drop table resources_languages;'
'drop table session;'
'drop table sessions;'
'drop table slot;'
'drop table slots;'
'drop table user;'
2012-09-19
Connect to an Oracle DB as SYSDBA using IntelliJ
Use "sys as sysdba" as user name or supply the internal_logon with the value sysdba in the advanced properties tab. So internal_login is the property name that should be used to mark the current user as a sysdba.
2012-09-13
2012-08-02
Extract parameter / value pairs from an Uri as a Map
How to get the parameter / value pairs of an URL / URI using Dart? Unfortunately currently there is no built-in functionality for this problem neither in the Uri library or the Location interface.
Map<String, String> getUriParams(String uriSearch) {
if (uriSearch != '') {
final List<String> paramValuePairs = uriSearch.substring(1).split('&');
var paramMapping = new HashMap<String, String>();
paramValuePairs.forEach((e) {
if (e.contains('=')) {
final paramValue = e.split('=');
paramMapping[paramValue[0]] = paramValue[1];
} else {
paramMapping[e] = '';
}
});
return paramMapping;
}
}
// Uri: http://localhost:8080/incubator/main.html?param=value¶m1¶m2=value2¶m3
final uriSearch = window.location.search;
final paramMapping = getUriParams(uriSearch);
paramMapping.forEach((k, v) => print('$k:$v'));
2012-07-31
What's a LITERAL in computer science?
Here is the Wikipedia definition of which my understanding is: A literal is the source-represented content of a container which can be either a variable or a constant (a "variable" that cannot be reassigned).
2012-04-13
Dart: Why "null is String" == false
Question:
Bob Nystrom played Devil's advocate:
Gilad Bracha wrote:
This expression: null is String is obviously false.
Bob Nystrom played Devil's advocate:
Playing Devil's advocate here, why is this obviously false? null is a valid value for a variable whose type is String so it seems to me that in Dart, null is a String, right?
One could define things that way, but it serves very little purpose. Typically, the goal of a test
o is T
is to be allow one to use o as a T by invoking a method on it. If you make this answer true for null, you need to test for null separately, which is painful and error prone. On the other hand, we do allow assignment, because of the general need for placeholder when a useful value is unknown.
2012-03-16
How to unit test async code with callbacks
@Testpublic void deleteEmployee() throws Exception { EmployeeReqCtx reqCtx = rf.employeeReqCtx(); final boolean[] onSuccess = {false}; reqCtx.delete(10L).fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { onSuccess[0] = true; }The trick is to use a final boolean array because you need to use values (finals) within callbacks (inner classes) and finals are immutable so you could not simply change a final onSuccess value to true.
@Override public void onFailure(ServerFailure failure) { System.err.println("failure.getMessage() = " + failure.getMessage()); } }); assertTrue(onSuccess[0]);}
Subscribe to:
Posts (Atom)


