Tutorials

GWT – including source files outside module’s package hierarchy

April 29, 2011 admin Tutorials

I have a GWT project in eclipse with the following structure for the GWT module com.foo.gwt -> Dashboard.gwt.xml com.foo.gwt.client com.foo.gwt.server I have different packages com.bar.baz1, com.bar.baz2, etc. whose contents I want to include in client side code

More

build, build-process, gwt,

Spring Security Basic Auth Prompt Appearing

April 29, 2011 admin Tutorials

Hello, Why would I get the basic auth prompt when I go to /preregistered/* ? I thought the below configuration would only make basic auth apply when /services/** url path was matched.

More

java, spring, spring-security,

Pythonic way to merge two List of tuples into single list of dict

April 29, 2011 admin Tutorials

Hi I’m pretty new to Python, so I’m not really aware of all the little tricks and shortcuts yet.

More

dictionary, list, merge, python,

PRIVATE key encryption in .Net

April 29, 2011 admin Tutorials

Hello, I am looking for a way to do private key encryption in C#. I thought I could use the RSACryptoServiceProvider, but it only supports public key encryption. The only thing I found on the subject was this project, but I would rather use something I can find in .net: http://www.codeproject.com/KB/security/PrivateEncryption.aspx Please note I am not looking for signing.

More

.net, decryption, encryption, encryption-asymmetric,

jquery selectors problem and efficiency

April 29, 2011 admin Tutorials

Hi I have a problem(not exactly problem, I have solved it, but it is at least very interesting) with differet bahaviour of jquery selectors in IE(7-8) mobile Opera, and other browsers.. Here is my example .sig_cont {width:30px;height:20px;} Sorry about the formatting:) The problem is following..When I use this selector jQuery(“#galleryEl .sig_thumb a”).eq(index); (index is really an integer) in major modern browsers it just works..

More

javascript, jquery,

Ways to modify web.xml during or after deployment in JBoss AS 6

April 29, 2011 admin Tutorials

In my current JSF 2 project, one setting in the web.xml is javax.faces.PROJECT_STAGE Development And its value should be set to Production instead Development on deployment in JBoss AS.

More

deployment, jboss, jboss6.x, web.xml,

C, Socket Programming: 1 Server 2 Clients connected by HUB, Chat Application Using TCP

April 29, 2011 admin Tutorials

Hi, I have codes for connecting and Chatting between 1 Server 1 Client as follows: /*Server Side*/ #include #include #include #include #include #include #include main() { int sd,i,len,bi,nsd,port; char content[30]; struct sockaddr_in ser,cli; if((sd=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))==-1) { printf(“nSocket problem”); return 0; } printf(“nSocket createdn”); bzero((char*)&cli,sizeof(ser)); printf(“ENTER PORT NO:n”); scanf(“%d”,&port); printf(“nPort Address is %dn:”,port); ser.sin_family=AF_INET; ser.sin_port=htons(port); ser.sin_addr.s_addr=htonl(INADDR_ANY); bi=bind(sd,(struct sockaddr *)&ser,sizeof(ser)); if(bi==-1) { printf(“nBind error, Port busy, Plz change port in client and server”); return 0; } i=sizeof(cli); listen(sd,5); nsd = accept(sd,((struct sockaddr *)&cli),&i); if(nsd==-1) { printf(“nCheck the description parametern”); return 0; } printf(“nConnection accepted!”); if(fork()) { printf(“nEnter the data to be send type exit for stop:n”); scanf(“%s”,content); while(strcmp(content,”exit”)!=0) { send(nsd,content,30,0); scanf(“%s”,content); } send(nsd,”exit”,5,0); } else i = recv(nsd,content,30,0); while(strcmp(content,”exit”)!=0) { printf(“nClient: %sn”,content); i=recv(nsd,content,30,0); } printf(“nBye”); send(nsd,”Offline”,10,0); close(sd); close(nsd); return 0; } /*Client Side*/ #include #include #include #include #include #include #include int main() { int sd,con,port,i,Res; char content[30]; struct sockaddr_in cli; if((sd=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))==-1) { printf(“nSocket problem”); return 0; } bzero((char*)&cli,sizeof(cli)); cli.sin_family = AF_INET; printf(“ENTER PORT NO:n”); scanf(“%d”,&port); cli.sin_port=htons(port); cli.sin_addr.s_addr=htonl(INADDR_ANY); con=connect(sd,(struct sockaddr*)&cli,sizeof(cli)); if(con==-1) { printf(“nConnection error”); return 0; } if(fork()) { printf(“nEnter the data to be send type exit for stop:n”); scanf(“%s”,content); while(strcmp(content,”exit”)!=0) { send(sd,content,30,0); scanf(“%s”,content); } send(sd,”exit”,5,0); } else { i=recv(sd,content,30,0); while(strcmp(content,”exit”)!=0) { printf(“nServer: %sn”,content); i=recv(sd,content,30,0); } send(sd,”exit”,5,0); } close(sd); return 0; } I need to connect another client which can also chat using the same port.

More

clients, multiple, sockets, tcp,

onclick event problem in android

April 29, 2011 admin Tutorials

Hi all, I have some TextViews, EditTexts and Buttons in a linear layout.

More

android, android-layout,

aspect for internal method call

April 29, 2011 admin Tutorials

Hi I have a requirement where in I need to place an aspect around an internal method call, by internal I mean class Person{ public void outerMethod() { internalMethod() } // Need an aspect here !! public void internalMethod() { } } I am aware that this is not possible using conventional spring aop, does native aspectj provide a facility for this ? and can I have pointers for the same

More

aop, aspectj, spring-aop,

/system and /data file system of Android

April 29, 2011 admin Tutorials

When I build the Android sources, I end up with 3 images. They are ramdisk.img, system.img and userdata.img

More

android, image, img,

Android:Crash: Binary XML file line : Error inflating class

April 29, 2011 admin Tutorials

I’m having android surfaceview and in that i’m trying to add buttons to this. In the surfaceview canvas i draw something. And i have a thread class to keep drawing

More

android, graphics, surfaceview,

« Previous Posts

Powered by WordPress. Designed by elogi.