Posts

Featured post

java - Make an image's background transparent or white programmatically -

java - Make an image's background transparent or white programmatically - if 1 creating application in 1 create "background" of image transparent or white, there way this? for illustration : in image, http://upload.wikimedia.org/wikipedia/commons/b/b9/bronze_statuette_of_a_veiled_and_masked_dancer_1.jpg , transform image programmatically, such statue remains, , background (i.e. rest of image) white, or transparent. also, user might point out part of image should "remain", , rest should white or transparent. how can done? also, if there suitable java library or piece of code, helpful. regards for particular image there several methods solve part of problem. maybe if combine several methods and offer user interactive choices develop software in reasonably short period of time. i'd utilize it! you , misha discussed first 2 items: edge detection using canny or other means. suggest should work on "raw" border strength ima...

build - Bullet Physics, CMake->CodeBlocks - MinGW: Doesn't find GL/glut.h? -

build - Bullet Physics, CMake->CodeBlocks - MinGW: Doesn't find GL/glut.h? - statistics... my system: windows vista 64 bit library: bullet physics v2.78 makefile generator: cmake build system: mingw command line, mingw + codeblocks makefiles implemented command line , through cmake-generated code::blocks project in both cases, build fails near 30%. note: did have switch build executable in code::blocks project make.exe mingw32-make.exe first failure: demos\opengl\gldebugfont.cpp -> gl/glut.h: no such file or directory second failure (after commenting out #include first) -> demos/opengl/glutstuff.h: same error these failures happen when build command-line or through generated c::b project. why can't find gl/glut.h? "bullet-2.78\glut\gl\glut.h" exists. maybe there's way can tell find glut there? note: during cmake makefile generation, cmake did tell me "you using obsolete glu package, please utilize opengl instead." con...

textview - What's wrong with this Android program? -

textview - What's wrong with this Android program? - i writing test application consists of: 2 buttons 1 edittext 1 textview the first button "random" writes random name both in edittext box , textview (i have class called randomname returns string random name) the sec button "print" writes whatver in edittext textview the programme crashes when run , can't figure out why. help appreciated layout image here: http://img824.imageshack.us/img824/3046/rndname.jpg public class randomnametesteactivity extends activity implements onclicklistener { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); } public edittext nomeedt = (edittext)findviewbyid(r.id.edittext1); public string nomestr = nomeedt.tostring(); public textview nometest = (textview) findviewbyid(r.id.textview1); public void onclick(view v) { // todo ...

jquery - Is there a way to detect when code is pasted into an input? -

jquery - Is there a way to detect when code is pasted into an input? - using jquery there way capture user's paste event , determine if user has pasted code snippet? (ruby,php,html,css,js etc...)? thanks bind paste input. something like: $("selector").bind('paste', function(e) { //get pasted text, need little timeout var element = $(this); settimeout(function() { var text = $(element).val(); alert(text); }, 100); }); jquery

sql - SSAS -> MDX -> How to create a query that returns a topcount by a date period i.e. week? -

sql - SSAS -> MDX -> How to create a query that returns a topcount by a date period i.e. week? - i have received recent request create query returns top 100 customers revenue per week. can , homecoming top 100 customers whole when add together in week attribute, query times out. wondering if out there has run or has been able produce comparable query? my query works without week present. : select non empty { [measures].[revenue] } on columns, non empty topcount ( { ([customer].[customer id].[customer id].allmembers * [customer].[name].[name].allmembers ) }, 100, [measures].[revenue]) on rows [dw] my query week nowadays times out completely. : select non empty { [measures].[revenue] } on columns, non empty topcount ( { ([customer].[customer id].[customer id].allmembers * [customer].[name].[name].allmembers * [date link].[week].[week].allmembers ) }, 100, [measures].[revenue]) on rows [dw] wouldn't give top 100 customers , week top in? ...

c# - Random number generation for multiple objects -

c# - Random number generation for multiple objects - so i'm trying create matrix-like programme "raining greenish code". has been going until decided throw of string instances list , draw/update it. in order acheive proper effect need randomize few things. all strings created , stored in list see here in loop. interval , dropspeed random numbers alter how fast string falls, , @ speed individual characters rotate through sprite sheet. for reason though i'm getting wall of text falls @ 1 time , sprites rotating @ equal pace. classes , respective functions work...so question doing wrong random number initialization? for (int = 0; < (wwidth / 30); i++) { random random = new random(new system.datetime().millisecond); float randinterval = nextfloat(random); int dropspeed = random.next(1, 7); _mslist.add(new matrixstring(chinese, randinterval, dropspeed, dropspeed, 1.0f, xoff, 10)); xoff = * 32; } you need create random i...

deployment - XamlParseException after deploying WPF project -

deployment - XamlParseException after deploying WPF project - i have been trying deploy wpf app, created setup project using setup wizard.the project output added primary. after building , installing program, click exe on desktop pop says "'my program' has stopped working", click debug programme , see an unhandled exception of type 'system.windows.markup.xamlparseexception' occurred in presentationframework.dll additional information: 'set connectionid threw exception.' line number '10' , line position '9'. this exception not point me in direction fix. there no 'connectionid' anywhere in app. i had ran xamlparseexception because of notifyicon scheme tray, fixed adding icon path of exe. thought may problem added icon setup project, along other project outputs. still not working. i know vague error help @ appreciated, app won't run @ all. thanks! this caused not having dependencies copied outpu...