Faceți căutări pe acest blog

duminică, 3 aprilie 2011

duminică, 26 septembrie 2010

Next generation sequencing

http://www.youtube.com/watch?v

luni, 12 aprilie 2010

Hardware race simulator

An interesting home project hardware simulator. I know the dev from a company I worked on.


The story is here : http://hrsim.blogspot.com/





http://hrsim.blogspot.com/

miercuri, 10 martie 2010

duminică, 28 februarie 2010

Music theme

Music theme (while programmin' if you really need to be in tech chapter), so you can be relaxed and easily fall asleep ))



Cryptography

Another boring weekend with just some billiard with my friends. I missed goin' to club saturday night, oh well.
Oh yea, and 2 courses at University of Bucharest. , Distributed Programming and Cryptography(which turns out to be more than useful, right now)

sâmbătă, 27 februarie 2010

marți, 23 februarie 2010

Not pron game(play it)

You should PLAY this game:)
http://notpron.org/notpron/levelone.htm

StanStanford software is gaining the sophistication to comprehend what humans write



Computer science and linguistics professor says software is steadily gaining the sophistication needed to comprehend what humans write and to help us sort through the chatter of information overload

Send sms in WM

If you need to send a SMS via an application in Windows Mobile .NET
try
{
SmsMessage sms = new SmsMessage()
{
Body = text
};
sms.To.Add(new Recipient(HQPhoneNo));
sms.RequestDeliveryReport = true;
sms.Send();

// MessageBox.Show("Message sent!");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Social network sites, and code to post stuff on it

It's pretty easy to post messages on Twitter, Facebook, MySpace etc. They rely on
a REST server, and basically you make a HttpConnection and send POST or GET messages to an URL, which you can find on API description(e.g. http://api.twitter.com/1/statuses/user_timeline.json)


Twitter allows basic authentication(but in future, will no longer be supported), even though it's better to use oAuth.
On Facebook I'm pretty sure that all you can use it's oAuth

Here's some code for Twitter

public static String viewMyTimeline( String user, String pass)
{
String url ="http://api.twitter.com/1/statuses/user_timeline.json";
String responseM ="";
HttpConnection conn;
try {
//prepare a connection for the twitter API update method
conn = (HttpConnection)Connector.open(url);

conn.setRequestMethod("GET");
byte[] credentialsBytes = (user +":" + pass).getBytes();
String encoded= Base64OutputStream.encodeAsString(credentialsBytes,0,credentialsBytes.length,false,false);

conn.setRequestProperty("Authorization", "Basic " + encoded);
conn.setRequestProperty("Content-Type", "application/xml; charset=utf-8");
System.out.println("respond message=" +conn.getResponseMessage());
System.out.println("-----------------------------" + conn.getResponseCode());
//get the response
InputStream is = conn.openInputStream();
int c;
StringBuffer buffer= new StringBuffer();
while ((c = is.read()) != -1)
{
buffer.append((char)c);
}
System.out.println("user=" + user);
System.out.println("pass=" + pass);
is.close();
responseM = buffer.toString();
System.out.println("response="+responseM);
conn.close();
}
catch (Exception ex)
{ System.out.println("" + ex.getMessage());

}
return responseM;
}


For facebook here's a snapshot to post a message

CEBOOK SET STATUS
public static String sendRequestStatus( String method,String api_key, String uid, String status, String secret ) {
HttpConnection conn = null;
String username =usernameF;
String password =passwordF ;
String message =status;

String response = null;
try {
Hashtable data = new Hashtable();
data.put("method", method);
data.put("v", "1.0");
data.put("call_id", "1");
data.put("api_key",api_key);
data.put("uid",uid);
data.put("status",status);
data.put("format", "JSON");
data.put("sig", getSignature(data,secret));

URLEncodedPostData encoder = new URLEncodedPostData(null, false);
Enumeration keysEnum = data.keys();
String coded="";
while (keysEnum.hasMoreElements()) {
String key = (String)keysEnum.nextElement();
String val = (String)data.get(key);
coded = key+val;
encoder.append(key, val);
}

conn = (HttpConnection)Connector.open("http://api.facebook.com/restserver.php?");
conn.setRequestMethod(HttpConnection.POST);
conn.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
conn.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(encoder.getBytes().length));

OutputStream os = conn.openOutputStream();
os.write(encoder.getBytes());

if (conn.getResponseCode() == HttpConnection.HTTP_OK)
{
StringBuffer buffer = new StringBuffer();
InputStream is = conn.openInputStream();
int c;

while ((c = is.read()) != -1)
{
buffer.append((char)c);
}

is.close();
response = buffer.toString();
}
} catch (Exception e) {
} finally {
if (conn != null) {
try { conn.close(); }
catch (IOException e) {}
}
}


Enough of this, I bored you enough:))

Robot provides 3-D images of dangerous location

http://news.mst.edu/2010/02/robot_provides_3-d_images_of_d.html

UWM engineer creates unique software that predicts stem cell fat

http://www4.uwm.edu/news/features/details.cfm?customel_datapageid_11602=2549675

Virtual museum

http://www.fraunhofer.de/en/press/research-news/2010/02/virtual-museum-guide.jsp

Can Mobile Phones Help People EatWell?

http://digitallounge.gatech.edu/healthandeducation/index.html?id=4151

Android Developers Challenge 2,

For those interested in Android development and also a challenge and to compete:

http://code.google.com/android/adc/


First http://developer.android.com/sdk/index.html

For eclipse install the plugin, and an example of Java Android Application

package com.example.helloandroid;

import android.app.Activity;
import android.graphics.Canvas;
import android.os.Bundle;
import android.widget.*;
import android.view.*;
import android.view.ViewGroup.LayoutParams;



public class HelloAndroid extends Activity {
/** Called when the activity is first created. */


LinearLayout mLinearLayout;



public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Create a LinearLayout in which to add the ImageView
mLinearLayout = new LinearLayout(this);

// Instantiate an ImageView and define its properties
ImageView i = new ImageView(this);
i.setImageResource(R.drawable.guitar2_bg);

i.setAdjustViewBounds(true); // set the ImageView bounds to match the Drawable's dimensions
i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

// Add the ImageView to the layout and set the layout as the content view
mLinearLayout.addView(i);


setContentView(mLinearLayout);
}
}



Also a nice breakthrough new in this area:

http://www.technologyreview.com/communications/24624/?a=f

vineri, 19 februarie 2010