Posts

Showing posts from June, 2010

html - I need the Spring API CSS File -

i developing project using j2ee , spring .. i need create javadoc [api] inmean time nedd css file of spring source api please me this. in firefox, install web developer toolbar . select css -> view css , show urls of style sheets on current page. in case: http://static.springsource.org/spring/docs/3.0.x/javadoc-api/spring-javadoc.css http://search.springsource.org/widget/searchtool.css

subclipse not showing "share project" option on project context menu in eclipse -

within eclipse, subclipse installed, if right click project , select "team" there 2 options: apply patch share project once have shared project full subclipse menu "team" one project has 1 option - apply patch. if close project see both options share project option grayed out. i have other projects not happening. what special project stop me getting share project option? there path share project function use? regards solve problem these steps: verify can update using tortoisesvn (this guarantee .svn not corrupt) delete projects have problem, in delete dialog, do not delete project contents! select file -> import -> existing projects workspace. select projects folder or workspace folder. subeclipse should detect , connect projects automatically, without need select 'share project' each 1 of them.

How to dynamically configure rampart on service side -

how can dynamically configure rampart on service side? mean i'd use different service keys different clients. any hint or link tutorial big help. thanks to clarify, want ability issue different token depending on client credentials? sounds lot security token service (sts) it possible accept range of credential options. rampart makes implement own callback class verify initial credentials. you can implement own tokenissuer customize response (http://axis.apache.org/axis2/java/rampart/setting-up-sts.html) , either bundle inside service archive or externalize it. can use whatever criteria fit determining responsetoken.

sql server - How to alter length of varchar in composite primary key? -

in mssql have table created this: create table [mytable] (fkid int not null, data varchar(255) constraint df_mytable_data default '' not null); alter table [mytable] add constraint pk_mytable_data primary key (fkid, data); now want increase length of 'data' column 255 4000. if try: alter table [mytable] alter column data varchar(4000); then error: the object 'pk_mytable_data' dependent on column 'data' if try this: alter table [mytable] drop constraint pk_mytable_data; alter table [mytable] alter column data varchar(4000); alter table [mytable] add constraint pk_mytable_data primary key (fkid, data); then error: cannot define primary key constraint on nullable column in table 'mytable' what missing? both columns defined not null, why mssql reporting can't recreate constraint after drop it? thanks! evan by altering datatype varchar(4000) , make accept nulls . try this: alter table [mytable] drop constra...

How can I listen for trace() statements on the Flash Media Server Administration API? -

i connected flash media server administration api via rtmpe on port 1111 , i'd monitor calls trace() server side actionscript code. here's how it's done: var netconnection : netconnection = new netconnection(); netconnection.connect( "rtmpe://fmsuri:1111", adminusername, adminpassword ); var netstream : netstream = new netstream( netconnection ); netstream.client = { onlog: handlelog }; netstream.play( "logs/application/appname/instancename", -1 ); function handlelog ( info : object ) : void { trace( info[ "description" ] ); }

Spring DataSourceInitializer splits trigger ins sql by ; delimiter -

we use org.springframework.batch.test.datasourceinitializer class in order init db on basis of .sql scripts. init failed,after trigger had been added .sql. after debugging,the cause of error while found here: try { scripts = stringutils.delimitedlisttostringarray(stripcomments(ioutils.readlines(scriptresource.getinputstream())), ";"); } this error happened,because delimiter ";" symbol,so trigger splittet several parts on basis of ";" , treated uncorrectly. can advise me more advanced data source initializer,that understand triggers correctly? thank you. the create trigger statement pl/sql block, , pl/sql blocks must terminated single / first character of row. should work: create or replace trigger "account_biu" before insert or update on account referencing old old new new each row begin if (:new.eskontotype_id null) if (:new.kontotype_id ='np') :new.eskontotype_id := 311; ...

javascript - createElement Image Source -

i'm dynamically adding rows/fields in code. have text field date, , next calendar button/image, user can use select appropriate date. however, if click "add new item" button add new row, can't quite image re-appear correctly calendar. rows being added, , field added calendar button, isn't locating image source , can't select pick date. can tell me i'm doing wrong , can correct it? thanks. <html> <head> <script language="javascript"> function addnewitem() { var ix = document.getelementbyid("txtindex").value; ix ++; document.getelementbyid("txtindex").value = ix; var tbl = document.getelementbyid("tbloffsetdetail").getelementsbytagname("tbody")[0]; var tr = document.createelement("tr"); tbl.appendchild(tr); //txtoffsetdatecleared1 var tdoffsetdatecleared = document.createelement("td"); tr.appendchild(tdoffsetdatecleared); ...

How to convert existing javascript to java to use with GWT? -

is there tool convert javascript java, can handle project using gwt? update for don't know, gwt (google web toolkit) toolkit write java , javascript, question. what have in mind? if you're looking sort of automatic tool, generates gwt java code javascript, i'm afraid there's no such thing. you can (and should) use javascript native interface (jsni), in combination javascript overlay types (jso) wrap existing javascript code, it's possible interface gwt's java code. see getting know gwt, part 1: jsni (and part 2 ) post on gwt's offcial blog pointers , use cases.

user interface - Converting MATLAB code into professional software -

i working in matlab write medical image processing/visualization software uses matlab’s image processing toolbox heavily. choice of using matlab largely based on availability , comfort in , initial goal complete algorithm , test it. have largely ignored gui part – have software works clunky gui (textboxes entering numbers operations). now, thinking switching matlab c /c++/tcl/other not sure best platform is? need convert very- fast standalone executable – cannot work first installing mcr installer , using exe in matlab. saw suggestions in other posts – using python/c++ combination. i looking other people can me convert demo code professional software. how can best estimate time-frame require experienced software programmer write gui , insert logic code? using matlab guide, can write in couple of hours basic features, hoping make software slick. have detailed list of features , layout there won’t many iterations. also, there category of software programmers industrial...

file - Saving Source of Self (PHP) -

okay, have strange problem. , ah, no solution. can please me or send me off in right direction? i have simple html page, , need able have 'save' button on page user click. , upon clicking save button, php save copy of current page user on same directory on server. is possible?x thanks! @ appreciated you need ajax. if you're using jquery entire html of page using $('body').html() , send ajax post.

c++ - How to initialise a std::map once so that it can be used by all objects of a class? -

i have enum stackindex defined follows: typedef enum { deck, hand, cascade1, ... no_such_stack } stackindex; i have created class called movesequence , wrapper std::deque of bunch of tuples of form <stackindex, stackindex> . class movesequence { public: void addmove( const tpl_move & move ){ _m_deque.push_back( move ); } void print(); protected: deque<tpl_move> _m_deque; }; i thought create static std::map member of movesequence class, translate stackindex std::string , use print() function. when tried, got error: "error c2864: 'movesequence::m' : static const integral data members can initialized within class" if not possible created std::map static member, there way create std::map translates stackindex std::string can used print out movesequence objects? thanks beeband. you can make std::map static member of class. can't initiliaze within class definition. no...

PHP: can one determine the parent array's name and key from a reference to an array element? -

let's assume have array this $arr=array(array('a'=>1,'b'=>2),array('c'=>3,'d'=>4)); and reference 1 of elements $element=&$arr[1]['c']; my question is possible original array using reference alone? parent array in way without knowing name... useful me in more complex scenario. no, it's not possible. being "reference" (as php calls it; it's copy inhibitor) doesn't @ in matter. you'll have store original array element. $elarrpair = array( "container" => $arr, "element" => &$arr[1]['c'], ); this way can change element $elarrpair["element"] = $newvalue , still able access container.

How to use Eclipse RCP command framework Save command with the default save action? -

the eclipse rcp command framework intended replace action framework mechanism allowing plugins contribute ui commands workbench. defining new commands, plugins may provide handlers default rcp commands such "org.eclipse.ui.file.save" (full list of default commands here: http://svn2.assembla.com/svn/eclipsecommands/trunk/eclipsecommands/contents/article.html ). using default commands brings advantages of standard key bindings , icons, , in cases ability use built-in eclipse actions. for example default editor save command can added file menu following snippet in plugin.xml: <extension point="org.eclipse.ui.menus"> <menucontribution locationuri="menu:file"> <command commandid="org.eclipse.ui.file.save" style="push"> </command> </menucontribution> </extension> a handler can defined command adding handler definition in handlers extension point in plugin.xml. if, howeve...

air - Connect to BlazeDS with java stand alone app -

i have java server blazeds interface handle adobe air clients. have bunch of legacy stand alone java apps i'll need integrate server. java apps need same methods , remote calls air clients needs. save tons of work if call remote object methods java apps. anyone know if can done? you can use blazeds java amf libraries directly on http. interacting blazeds messagebrokerservlet require work. easier path expose same java services through protocol java code can more use.

ide - How do you reset the Zoom in Visual Studio 2010/2012/2013/2015/2017 -

Image
how reset "zoom" in vs 2010/2012/2013/2015/2017 normal? ctrl+scroll wheel lets zoom in/out visual studio 2010/2012/2013/2015/2017, i'd initial 100%. there select box @ bottom left of editor window - choose 100% ;) i unable find keyboard shortcut it, though zooming in , out can done using ctrl + > , ctrl + < . another option (visual studio 2013/2015) use ctrl mouse wheel (up zoom in, down zoom out).

windows - Command line does not execute my parameters -

i have created batch file run application automatically seems cmd not run it. typed (using notepad example): cmd /c "c:\notepad2\notepad2.exe" if run windows vista worked. running windows server 2008 (64-bit) doesn't work. try using line run menu no go. what do? aim run scheduled task runs batch file every , then. stupid question, program you're trying run exist on server 2k8 machine? there no differences in cmd between vista , server 2k8 whatsoever. besides, why need execute via cmd ? can't run application directly? using cmd /c necessary shell built-ins, such dir or start . also remember there no ntvdm on 64-bit windows—you can't run 16-bit programs. doubt 1 still use them nowadays may thing can think of why doesn't work in 64-bit.

html - Can I dynamically set tabindex in JavaScript? -

is there attribute tab-index? context : i'm making section in web form visible or invisible depending on condition want set tab-index manually when particular section visible. document.getelementbyid("link3").tabindex = 6;

org.hibernate.MappingException: Could not determine type for: java.util.List, at table: College, for columns: [org.hibernate.mapping.Column(students)] -

now, learning hibernate, , started using in project. crud application. used hibernate crud operations. works of them. but, one-to-many & many-to-one, tired of trying it. gives me below error. org.hibernate.mappingexception: not determine type for: java.util.list, @ table: college, columns: [org.hibernate.mapping.column(students)] then again went through video tutorial . simple me, in beginning. but, cant make work. now, says org.hibernate.mappingexception: not determine type for: java.util.list, @ table: college, columns: [org.hibernate.mapping.column(students)] i have ran searches in internet, there telling its bug in hibernate , , says, adding @genereatedvalue error ll cleared. but, nothings works me, i hope ll fix!! thanks! here code: college.java @entity public class college { @id @generatedvalue(strategy=generationtype.auto) private int collegeid; private string collegename; private list<student> students; @onetomany(targetentity=student.class, ...

.net System.Threading.Timer needs to access Silverlight 3 UI component in callback -

i have silverlight 3 page. use system.threading.timer perform asynchronous wcf service call. make call passing in silverlight page class ("this") in "state" object in timer constructor, , accessing service client proxy through it. doing way, callback wcf service fires fine. my problem (as understand it) return wcf call occurs in separate thread, , access error when attempt access/modify ui elements on silverlight page. first, understanding of problem correct? second, architucturally correct method of solving problem? thank assistance. using this.dispatcher.begininvoke necessary move code execution on thread has access ui elements. thought may worth applying. may easy this:- this.dispatcher.begininvoke(() => { // whole body of code needed }); however there couple of things consider. if whole bunch code going significant work doesn't involve access ui elements may better first switch ui thread when you've got modify ...

post - Passing parameters while posting status to Twitter using Terminal with CURL -

how pass additional parameters twitter update api using curl terminal? http://twitter.com/statuses/update.xml say need pass replyto user id given in documentation. although append @username before message, need user id based , @user_id didn't work. we need append url. http://twitter.com/statuses/update.xml?in_reply_to_status_id=12345

Which account do I use to query Active Directory? -

to use windows authentication in our asp.net application, need check active directory. test, use own account, means can see password on our buildserver. which account best use purpose? restricted account in active directory? if doing operations within context of user can impersonate account. operations changing information or resetting users password. global transactions searching, forgot password functions, joining groups, etc. suggest create restricted account functions need , let application pool use that. password secure not on web config.

javascript - How can I escape characters inside of this regular expression? -

i have function validate email address. jslint gives error regular expression complaining of characters being un-escaped. is there way correctly escape them? var validateemail = function(elementvalue){ var emailpattern = /^[a-za-z0-9._-]+@[a-za-z0-9.-]+\.[a-za-z]{2,4}$/; return emailpattern.test(elementvalue); }; the regular expression using is valid. guess jslint complains missing escape sign in front of - in character classes: /^[a-za-z0-9._\-]+@[a-za-z0-9.\-]+\.[a-za-z]{2,4}$/ escaping - inside character class required if not @ begin or end of character class or if not denoting range when used between 2 characters. here examples valid: /[-xyz]/ // "-", "x", "y", "z" /[xyz-]/ // same above /[-]/ // "-" /[a-z-]/ // "a"-"z", "-" /[a-b-c]/ // "a"-"b", "-", "c"

html - Javascript onchange different in IE and FireFox -

when onchange event in ie returns false, ie focus stays on input box. in firefox focus moves next field regardless. html: input name="seminar_donation" type="text" id="seminar_donation" onchange="return checktotal(this);" javascript: function checktotal(inputbox) { if (isnan(parseint(inputbox.value))) { alert("please enter digits 0-9"); inputbox.focus(); return false; } return true; } in ie don't need inputbox.focus() unfortunately not appear in firefox retain focus on errant input box. how can firefox stay on input box? settimeout('document.getelementbyid("seminar_donation").focus()',1);

Are Bash and Linux shell the same? -

i getting confused bash , shell. same? if want learn bash, covered linux shell programming related books? use ubuntu linux. edit: (added after getting 2 answers.) how bash associated terminal? bash 1 particular type of linux shell (the bourne again shell), there quite few others. in ubuntu, bash default. sure there numerous shell programming books cover it, i've read 1 in past.

assembly - Mono 'asmonly' option -

i created simple mono executable using monodevelop prints "hello world". wanted try aot 'asmonly' option. so: [root@localhost debug]# ls abc.exe [root@localhost debug]# mono --aot=full,static,asmonly abc.exe mono ahead of time compiler - compiling assembly /home/alon/projects/abc/abc/bin/debug/abc.exe code: 1538 info: 50 ex info: 114 class info: 30 plt: 5 got info: 105 got info offsets: 24 got: 60 output file: '/home/alon/projects/abc/abc/bin/debug/abc.exe.s'. linking symbol: 'mono_aot_module_abc_info'. compiled 9 out of 9 methods (100%) methods without got slots: 1 (11%) direct calls: 0 (100%) jit time: 1 ms, generation time: 0 ms, assembly+link time: 0 ms. got slot distribution: class: 1 image: 1 ldstr: 1 interruption_request_flag: 7 [root@localhost debug]# ls abc.exe abc.exe.s [root@localhost debug]# -o hello_world.o abc.exe.s [root@localhost debug]# ls abc.exe abc.exe.s hello_world.o [root@localhost debug]# ld -o hello_worl...

flash - Dynamically size javascript popup based on embedded swf size -

i embedding swf in popup window using javascript's window.open function. passing in static values popup's height , width corresponding height , width of embedded swf, so: window.open(' http://whatever.swf ', 'popup', 'width=400,height=300,resizable=1'); a user can click on button in swf, , changes size of swf 400x300, 400x600. there way dynamically resize javascript popup window account size increase without reloading embedded swf? any appreciated.... there javascript's window.resizeto(x,y) that call via externalinterface flash.

Using Ctrl-A in Vim command line to increment a number -

in normal mode (in vim) if cursor on number, hitting ctrl - a increments number 1. want same thing, command line. specifically, want go lines first character number, , increment it, i.e., want run following command: :g/searchstring/ ctrl-a i tried store ctrl - a in macro (say a ), , using :g/searchstring/ @a , error: e492: not editor command ^a any suggestions? you have use normal execute normal mode commands in command mode : :g/searchstring/ normal ^a note have press ctrl - v ctrl - a ^a character.

android - logging to a database when user clicks on a widget -

i have widget displays analog clock. the widget write database time when user clicks on widget. i've got databasehelper class , have activity displays screen showing current date , time , writes time database. i followed tutorial here: analog clock tutorial , ended this: public void onreceive(context context, intent intent) { string action = intent.getaction(); if (appwidgetmanager.action_appwidget_update.equals(action)) { remoteviews views = new remoteviews(context.getpackagename(), r.layout.widget); this.mintent = new intent(context, askthetime.class); pendingintent pendingintent = pendingintent.getactivity(context, 0, mintent, 0); views.setonclickpendingintent(r.id.widget, pendingintent); appwidgetmanager.getinstance(context).updateappwidget(intent.getintarrayextra(appwidgetmanager.extra_appwidget_ids), views); } } the askthetime class extends activity , logs database in oncreate(). means displays time when widg...

.NET Serialization Issue -

i keep getting 'type xxx not marked serializable' exception when try serialize object of mine. might sound silly, problem can't seem find references object of type xxx anywhere on object graph (using debugger hover windows). know way scan object graph of type? it's complex object graph (100s of levels deep), i'm sure there must field of tye xxx somewhere, can't find one. if exceptions don't give enough information, [xmlignore] attribute useful tracking down culprit. throw on @ object trying serialize. remove 1 @ time. when object no longer serializes, know problem lies in property not being serializable. drill class, mark [xmlignore], , repeat. eventually you'll find it.

Inner-workings of Keyboard Event Handling under Linux -

when press keyboard's key on gtk application under linux, happens exactly? how key received (from device), interpreted, passed program, , handled? it's rather complex process... the keyboard has 2d matrix of key connections , own microprocessor or gate array containing microprocessor. scanning matrix find out if keys pressed. (to save pins, keys not individually tested.) keyboard micro speaks protocol keyboard controller in cpu , transmits message indicating keypress. the keyboard controller notes code , interrupts cpu. the keyboard driver receives interrupt, reads keycode out of controller register, , places keycode in buffer links interrupt side of kernel per-process threads. marks thread waiting keyboard input "runnable" this thread wakes up. turns out, x server. x server reads keycode kernel. the server will check see window has keyboard focus. window connected 1 of various clients. the server sends event client displayed specific window. (n...

c# - WSE032 error, WebServicesConfiguration cannot load config. section -

i have developed small tool upload salary information swiss administration , used wse 3.0 success. now, 1 of customers has reported on machine, program crashes following stack trace: wse032: there error loading microsoft.web.services3 configuration section. @ microsoft.web.services3.configuration.webservicesconfiguration.get_current() @ microsoft.web.services3.configuration.webservicesconfiguration.get_messagingconfiguration() @ microsoft.web.services3.webservicesclientprotocol..ctor() ... i've tried figure out means, must admit bit lost here. program has .exe.config file following contents: <?xml version="1.0"?> <configuration> <configsections> <section name="microsoft.web.services3" type="microsoft.web.services3.configuration.webservicesconfiguration, microsoft.web.services3, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"/> ... </configsections> <startup> ...

Windows Workflow Foundation 4.0 and Tracking -

i'm working beta 2 version of visual studio 2010 advanced learning using wf4. i've been working sqltracking sample in wf_wcf_samples sdk, , have gotten pretty understanding of how emit , store tracking data in sql database, haven't seen on how query data when needed. know if there .net classes used querying tracking data, , if there known samples, tutorials, or articles describe how query tracking data? according matt winkler, microsoft wf4 team, there isn't built in api querying tracking data, developer must write his/her own.

c# - What is a good .NET data structure for finding unique items? -

i have large collection of custom objects have retrieved query in system. let's these objects have 5 different properties - firstname, lastname, gender, zipcode , birthday. each of different properties able list of of unique values , counts , sort them in descending order. sort of faceted navigation system. if have 5000 results in initial query able display top 10 firstnames popular least popular count next it. , same other properties. currently have routine goes through each item 1 @ time , examines different properties , keeps bunch of different hashtables information. works super slow. think going through each item 1 @ time not efficient. there other type of c# structure use make getting type of information easier? know sql server great job of type of thing - don't think possibility here. i'm getting list of custom objects api of different system. have take list of objects , put them in temp table somehow , sort of defeats purpose think. plus sql server...

vim - GVIM. How to change certain words that match the pattern? -

in normal mode press +* , vim highlighs occurences of word under cursor. how change example 2,4-5 (second, fourth , fifth) words in search results %s command? know can use %s , change searched word in lines, not need. assuming did find first, use :%s//replaced/gic it ask each replacement if needs done.

c++ - Coding Practices which enable the compiler/optimizer to make a faster program -

many years ago, c compilers not particularly smart. workaround k&r invented register keyword, hint compiler, maybe idea keep variable in internal register. made tertiary operator generate better code. as time passed, compilers matured. became smart in flow analysis allowing them make better decisions values hold in registers possibly do. register keyword became unimportant. fortran can faster c sorts of operations, due alias issues. in theory careful coding, 1 can around restriction enable optimizer generate faster code. what coding practices available may enable compiler/optimizer generate faster code? identifying platform , compiler use, appreciated. why technique seem work? sample code encouraged. here related question [edit] question not overall process profile, , optimize. assume program has been written correctly, compiled full optimization, tested , put production. there may constructs in code prohibit optimizer doing best job can. can refac...

excel - VBA Findnext Issue -

this code works until input coding between * ** * ** * *** i'm trying 2 different searches @ same time. can explain i'm doing wrong? thanks public sub swap() sheet1.range("a:a") set lastcell = .cells(.cells.count) end set foundcell = sheet1.range("a:a").find(what:=cusip, after:=lastcell) if not foundcell nothing firstaddr = foundcell.address end if until foundcell nothing account = sheet1.cells(foundcell.row, 2) ''#************************************* set foundcell2 = sheet2.range("b:b").find(what:=account) if not foundcell2 nothing firstaddr2 = foundcell2.address end if ''#********************************************* set foundcell = sheet1.range("a:a").findnext(after:=foundcell) ''#break out of loop when searched through of cusips if foundcell.address = firstaddr exit end if loop end sub you can't 2 different finds @ same time. it...

nhibernate - Finding the row with matching relations using HQL -

i using castle activerecord , nhibernate. i have instance class has many-to-many relationship component class. find instance related specific set of components. possible in hql (or else in nhibernate)? the linq version of function be: public instance find(ienumerable<component> passed_components) { return instance.queryable.single(i => passed_components.all(x => i.components.contains(x))); } of course nhibernate linq implementation can't handle this. i can write hql 1 of components: instance.findone(new detachedquery("from instance :comp in elements(i.components)").setparameter("comp", passed_components.first())); but looks in compares 1 item set, can't compare set set. edit: this best do: iqueryable<instance> q = queryable; foreach(var c in components) { q = q.where(i => i.components.contains(c)); } but inefficient. adds subselect sql query every clause. unnecissarily long subselect @ that. join...

branch - We have two branches in TFS(Standard and Enterprise) of which many of the files are common. How do we manage changes in both? -

we have 2 folder structures in tfs(two separate branches) same application. 1 branch managing normal desktop application , client-server architecture. later 1 has features. apart few files, of files common between branches. if have change, have in both structures. want minimize using single copy of common files. there way can keep common files in 1 folder structure , application-related files in different folder , still build solution out issues? why have make changes in both structures? branches typically allow merge changes between branches without manual labour. see branching , merging primer started. if make enterprise folder main branch, , make changes here, can port changes on regular basis simpler standard branch.

python - Speeding up templates in GAE-Py by aggregating RPC calls -

here's problem: class city(model): name = stringproperty() class author(model): name = stringproperty() city = referenceproperty(city) class post(model): author = referenceproperty(author) content = stringproperty() the code isn't important... django template: {% post in posts %} <div>{{post.content}}</div> <div>by {{post.author.name}} {{post.author.city.name}}</div> {% endfor %} now lets first 100 posts using post.all().fetch(limit=100) , , pass list template - happens? it makes 200 more datastore gets - 100 each author, 100 each author's city. this understandable, actually, since post has reference author, , author has reference city. __get__ accessor on post.author , author.city objects transparently , pull data (see this question). some ways around are use post.author.get_value_for_datastore(post) collect author keys (see link above), , batch get them - trouble here need re-construct template data object... ...

c++ - using legacy project in Eclipse -

i wish use "c" legacy project in eclipse. in project require "autoreconf -vi" followed "./configure" before make start. problem not able "autoreconf -vi" , "./configure" eclipse. thanks arpit you should try enabling autotools features eclipse linuxtools plugin : if have cdt, linuxtools plugin should available in eclipse environment. however, need enable features it: use following menu: / install new software in search box type "linux", find plugin and check box (+ ok) finally select @ least linux "tools/autotools support cdt" (also call graph, gcov, gprof, ltt interesting not needed problem) note: if not have plugin available, detailed instructions update url available in linux tools project/plugininstallhelp wiki page. once have plugin installed, can: convert existing project by: file / new / convert c/c++ autotools project / next / next / finish edit project properties needed: projec...

html - What is necessary to create more advanced, dynamic and user friendly web pages? -

i using html , css creating web pages. want web pages more dynamic , user friendly, languages need learn so? it depends on want do, can lot ajax (asynchronous javascript , xml) "just" uses javascript , xml data files. still runs on client side don't need changes web server. content still static. to go further , generate content requested you'll need server side languages php , asp.net etc. might need new hosting environment. these generate page server site , user views that. these still use javascript on client side perform "user friendliness" though.

c# - Nullable Types and properties with INotifyPropertyChanged -

it seems overkill set value of nullable type , implement inotifypropertychanged. there better way of doing this? private _workphone long? public property [workphone]() long? return _workphone end set(byval value long?) if value.hasvalue = false if _workphone.hasvalue = true mybase.raisepropertychanging("workphone") _workphone = nothing mybase.markdirty() mybase.raisepropertychanged("workphone") end if else if _workphone.hasvalue if _workphone.value <> value.value mybase.raisepropertychanging("workphone") _workphone = value mybase.markdirty() mybase.raisepropertychanged("workphone") end if ...

Parsing CSV files in C#, with header -

is there default/official/recommended way parse csv files in c#? don't want roll own parser. also, i've seen instances of people using odbc/ole db read csv via text driver, , lot of people discourage due "drawbacks." these drawbacks? ideally, i'm looking way through can read csv column name, using first record header / field names. of answers given correct work deserialize file classes. let library handle nitty-gritty details you! :-) check out filehelpers , stay dry - don't repeat - no need re-invent wheel gazillionth time.... you need define shape of data - fields in individual line in csv - means of public class (and well-thought out attributes default values, replacements null values , forth), point filehelpers engine @ file, , bingo - entries file. 1 simple operation - great performance!

doxywizard - How to install Doxygen GUI on Ubuntu? -

i can't figure out how install doxygen gui (doxywizard) on ubuntu. can it? in debian package called doxygen-gui. must same in ubuntu, try sudo apt-get install doxygen-gui . edit : apparently, doxygen-gui doesn't exist in karmic. try other repo ? http://packages.ubuntu.com/search?keywords=doxygen-gui

jQuery Combobox/select autocomplete? -

does jquery plug-in exist replacing select/combo box? i tried sexycombo, , close want, doesn't complete if writing middle, beginning. i have 2 levels of categories (20 top level categories, , subcategories in total 120 categories), when user submitting entry, must find desired category possible. so... 2 levels + autocomplete populate text if write middle letters. or other solution? have @ following example of jqueryui autocomplete, keeping select around , think looking for. hope helps. http://jqueryui.com/demos/autocomplete/#combobox

windows - Number of files in a directory -

i'm try find, in 1 row, number of files (*.rar) in directory. for doing i'm using commands: for /f "delims=" %i in ('find /c ".rar" "d:\backup e ckpdb ept-icd\test\unload\lista_files_rar.txt"') echo %i but value of %i have @ end : d:\backup e ckpdb ept-icd\test\unload\lista_files_rar.txt: 8 i obtain number 8 instead echo value assign value variable. i use command line : dir /b *.rar | find /c ".rar" returns value of rar files in directory, can't assign value variable, example: dir /b *.rar | find /c ".rar" | set/a files = i tried use keyword tokens=2 doesn't work p.s if possible find command better see here example on counting files or can (not tested) for /f %%j in ('dir /b *.rar ^| find /c /v ""') set count=%%j

project planning - What do people mean when they say (and write) lifecycle testing? -

i've been current company 4 months , i've noticed how several of our rnd scopes/documents use term " lifecycle testing ." i've thought term mean entire testing phase of project, context of term suggests instead when software tested "live" or "real" data in staging environment close production environment possible. this has led me wonder if have misunderstood meaning of phrase, in case, can explain lifecycle testing supposed or mean? a lifecycle of software it's behaviour in following situations: startup. load correctly? fast @ startup? (depends on kind of software) mid-life. use memory? clean memory? it's ought do? exeting. cleanup resources correctly? closes down well? lifecycle testing important server applications, it's focussed on "mid-life" (it's not official term btw). server apps may never crash while doing importantly, , if do: shouldn't bring down complete system. the clue "...

How to add additional rest routes to a nested resource in rails -

i have widget has many links. in routes file: map.resources :widgets, :has_many => [:links] i want add "sort" action links. need add routes file, can write sort_widget_links_path(widget) you can define using block: map.resources :widgets |widget| widget.resources :links, :member => {:sort => :get} end

How do I reference a django variable in javascript? -

i working on project requires me use value contained in variable view.py template. need use variable in javascript. know proper way pass variable django js? here function in views.py @login_required @never_cache_headers def user_feed(request, user=none, extension=none): # ensure have user if user none: user = request.user prof = user.get_profile() elif isinstance(user, basestring): user = get_object_or_404(user, id=user) # build author list author_ids = [] author_ids.append(user.id) # check if user if friend profile being viewed are_friends = friendship.objects.are_friends(user, request.user) # determine date = datetime.datetime.now() today = now.date() if now.time() < datetime.time(3): start_dt = datetime.datetime.now() - datetime.timedelta(hours=settings.feeditem_buffer_hours) else: start_dt = datetime.datetime(today.year, today.month, today.day) # build query = [] if user.id != request.user.id: where.append({'ping_type':'public...

flex - Flash (Adobe Air) Charting Libraries -

we considering developing application in adobe air. however, 1 of criteria able support charting in user interface. some of charts real time (updated periodically in manner isn't "jerky" user. the application stand alone , not have use of http server. can suggest charting library adobe air, open source, or not. thank you, use flex. check out charting components in tour de flex .

java - Minimizing jar dependency sizes -

an application have written uses several third party jars. small portion of entire 50kb 1.7mb jar used - 1 or 2 function calls or classes. what best way reduce jar sizes. should download sources , build jar classes need? existing tools can automate (ex briefly looked @ http://code.google.com/p/jarjar/ )? thank you edit 1: lower size of third party 'official' jars swingx-1.6.jar (1.4 mb), set-3.6 (1.7 mb) glazedlists-1.8.jar (820kb) , etc. contain bare minimum classes need edit 2: minimizing jar hand or using program proguard further complicated if library uses reflection. injection google guice not work anymore after obfuscation proguard the answer cletus on post how determine classes used java program? proguard option. can eliminate unused classes , methods. can use obfuscate, can further reduce size of final jar. aware class loading name liable break unless care taken keep affected classes unobfuscated. i've found proguard quite effective - ...

mouseevent - Emacs font sizing with Ctrl key and mouse scroll -

notepad++ allow me increase font size when hold ctrl key , rotate mouse middle scroll button forward. in same way, when hold ctrl , rotate mouse middle scroll button backward, fond size reduces. how can same emacs? code alexcombas' answer : (defun font-big () (interactive) (set-face-attribute 'default nil :height (+ (face-attribute 'default :height) 10))) (defun font-small () (interactive) (set-face-attribute 'default nil :height (- (face-attribute 'default :height) 10))) (global-set-key (kbd "<c-wheel-down>") 'font-small) (global-set-key (kbd "<c-wheel-up>") 'font-big) edit: min , max use (defun font-big () (interactive) (set-face-attribute 'default nil :height (min 720 (+ (face-attribute 'default :height) 10)))) (defun font-small () (interactive) (set-face-attribute 'default nil :height (max 80 (- (face-attribute 'default :height) 10))))

Is any substring of a hash (md5, sha1) more "random" than another? -

here's 3 example md5 hashes $ md5 -s "1" && md5 -s "2" && md5 -s "3" md5 ("1") = c4ca4238a0b923820dcc509a6f75849b md5 ("2") = c81e728d9d4c2f636f067f89cc14862c md5 ("3") = eccbc87e4b5ce2fe28308fd9f2a7baf3 say wanted take 8 characters hash. beginning part of hash particularly more "random" end? middle? or substrings equally "random"? i curious myself, went ahead , wrote program test this. you'll need crypto++ compile code. disclaimer: when comes cryptography, or mathematics in general, know enough shoot myself in foot. so, take following results grain of salt , keep in mind have cursory knowledge of tools i'm using. i sampled 3 substrings: first 8 bytes, middle 8 bytes, , last 8 bytes. long story short, they're equally random. however, when using smaller sample space, appears if last 8 bits more random. larger sampling space, closer 3 substrings approac...

actionscript 3 - how to override base path parameter inside flex application -

i'm having difficult time solving absolute/relative path issues. when using as3 , embed swf via swf object js, 1 of parameters being transferred embed js function "base= http://www.mydomain.com " needed in order load external widget application. now, loading external assets styles.swf placed locally on client side, , when i'm trying load these assets error don't found in http://www.mydomain.com/ . for example: stylemanager.loadstyledeclarations("styles.swf"); error: can't load http://www.mydomain.com/styles.swf is possible somehow load styles.swf local assets??? i've tried use stylemanager.loadstyledeclarations("../styles.swf"); stylemanager.loadstyledeclarations("./styles.swf"); stylemanager.loadstyledeclarations("/styles.swf"); but none of them works... thanks if base http://www.mydomain.com , think you're stuck (so relative urls relative location). you can current swf url thr...

asp.net - asp label visible false and true in telerik grid depends on combo box selected item -

depends on selected telerik combox item display label name , text box when im writing code in aspx page <telerik:gridtemplatecolumn datafield="deductioncode" visible="false" uniquename="deductioncode" headertext="deductioncode"> <itemtemplate> <asp:label runat="server" visible="false" id="lbldeductioncode" text='<%# eval("deductioncode") %>'></asp:label> </itemtemplate> <edititemtemplate> <telerik:radtextbox id="txtdeductioncode" visible = "false" runat="server" text='<%# bind("deductioncode") %>' maxlength="2"></telerik:radtextbox> <asp:require...

How can I configure Geany to compile and run my Python programs? -

Image
under build menu, can see 'execute' option, greyed out. the option available 'set includes , arguments'. when click both fields filled out. have write there? i don't need configure in geany, hit f5 , current module executed. are sure, file recognized python source file? version of geany using (i using svn version, pretty stable, damn, it's rock solid stable ;-))? have more developed configuration python compilation in version, commands same , works well.

mysql - SQL: how to get a weighted count using GROUP BY? -

how can make query like: select myvalue, count() freq mytable group myvalue; but freq sums values weight column instead of counting each row 1? i'm using mysql 5.1. select myvalue, sum(weight) freq mytable group myvalue;

iphone - How to "reset" to the starting view? -

i have first sample iphone application - version of tictactoe. it's working fine 1 time %) cant figured out how reset view in game starting position. i followed formic game example "iphone cool projects" book. create controller, view , mark x or o signs in game via uiimageview add subview view. that's ok , works fine. want remove x , o's , start new game - , cant understand how clear screen. btw game example book didn't have resetgame method :( i tried release view think wrong - clear screen got memory errors later , cant initialize board again. tried call viewdidload - nothing. best practice this? thx! to clear xs , os uiimageviews, send them -[uiview removefromsuperview] message. remove them superview , visible ui. if not retained object removed memory well. you use release memory management tool. never use remove visible elements ui or other functional task.

c# - why WaitForExit() doesn't wait? -

i adding custom action vs2008 setup project (msi installer). i calling batch file create database , want delete files after. have waitforexit() not wait. why? processstartinfo startinfo = new processstartinfo(); startinfo.useshellexecute = false; string tempdir = @"c:\temp\"; startinfo.filename = tempdir + "sybasedb\\en_allinone_installdb.bat"; startinfo.arguments = tempdir + "sybasedb\\"; try { process startdb = process.start(startinfo); startdb.waitforexit(); } catch (exception e) { //do something? } { system.io.file.delete(tempdir); } no difference startinfo.useshellexecute = true ; batch executed without problem because require user input , input y , n questions. delete action happened before input. , have pause @ end of bat...

sql server - .net publish to prover creates 'unwanted' role -

i using publish provider feature in .net 2008 produce database creation script. in script exists following line: /****** object: role [srvttas] script date: 01/20/2010 09:14:14 ******/ if not exists (select * sys.database_principals name = n'srvttas') begin if not exists (select * sys.database_principals name = n'srvttas' , type = 'r') create role [srvttas] this causes problem have user called "srvttas" setup in database, , not role. when run script have manually delete role in order create user of same name. means script produced not create exact copy of database in question, there way make publish provider create user? (as have specified in database?) the name of " principal " in database must unique. roles , users both principals. does publisher have bug? or perhaps can't distinguish principals correctly (for example, metadata visibility)? anyhow, using srvttas for? permissioning, should role anyway databas...

What is the point of slice type in Go? -

i have read this still not aware of advantage of slice against array .so expecting in explain better , sure can :) slices have lot of uses on arrays, several of other posters have mentioned. slices can operate in many ways pointers. multiple slices can "point" same base array slices passed reference, since slice pointer can used pass "arrays" around more efficiently since entire array doesn't need copied. however, unlike pointers, slices provide additional buffer safety slice underflows , overflows trigger exceptions, rather allowing unsafe ability access other areas of memory. slices allow limit access areas of array. can extremely useful in working subsets. the length of slice dynamically determined @ runtime, unlike arrays have sizes fixed @ compile time. also, slices can dynamically resized @ runtime.

c# - What content-type do I use for http response headers that contain a file attachment of unknown file type? -

right not specifying , system defaulting text/html causing not results downloading movie on iphone giving me massive block of text large crashes browser example. content-type should use? literally file type attachment. content-disposition attachment. use application/octet-stream .

android - facebook: Your link could not be shared -

i'm adding ability share scores app using android's share intent: intent shareintent = new intent(android.content.intent.action_send); shareintent.settype("text/plain"); shareintent.putextra(android.content.intent.extra_subject, "my score"); shareintent.putextra(android.content.intent.extra_text, "i scored "+score+" on "+difficultystring+" difficulty."); context.startactivity(intent.createchooser(shareintent, "share score")); when choose facebook chooser, goes m.facebook.com , says "your link not shared". what's going wrong here? this common problem found in android apps when trying share facebook. facebook blocks other applications sharing using app. i'm not sure why, many companies trying bypass this. currently, "unfix-able". sorry.

php - submitting multiple rows to database with one form in codeigniter -

i'm trying create bulk edit page app i'm working on. table contains rows of products each of have 3 editable fields. <tr> <input type="hidden" name="id" value="10"> <td>sku<td> <td>product name</td> <td> <select name="product_category" value="" tabindex="4"> <option value="1">category 1</option> <option value="2">category 2</option> </select> </td> <td><input type="text" name="current_inventory" class="short" value="15" tabindex="5"></td> <td><input type="text" name="inventory_alert" class="short" value="6" id="inventory_alert" tabindex="6"></td> </tr> every row can edited , there 1 submit button on page. how should format co...

Selenium and Python: remove \n from returned selenium.get_text() -

when call selenium.get_text("foo") on element returns different value depending on browser working in due way each browser handles newlines. example: an elements string "hello[newline]how today?[newline]very well, thank you." when selenium gets ie gets string "hello\nhow today?\nvery well, thank you." when selenium gets firefox gets string "hello\n how today?\n well, thank you." (notice ie changes [newline] '\n' , firefox changes '\n ') is there anyway using selenium/python can strip out discrepancy? i thought using .replace("\n ", "\n"), cause issues if there intended space after newline (for whatever reason). any ideas? i ended doing check of browser running , returning string '\n ' replaced '\n' if browser firefox.

c - Matching va_list types between compilers -

i have project consists of bunch of dynamically loaded modules. originally, built msvc 2003, lately i've been working on getting work gcc. has been going pretty smoothly, except 1 problem. 64-bit code, gcc , msvc don't agree va_list is. 32-bit, things seem line fine. problem 64-bit mismatch causes when module built 1 compiler has public function va_list parameter , function called module built other compiler. the spec says nothing va_list is, outside of section 7.15 variable arguments <stdarg.h> , paragraph 3: the type declared is va_list which object type suitable holding information needed macros va_start , va_arg , va_end , , va_copy . that paragraph means compiler dependent stuff - so, there way make these 2 compilers agree on contents of 64-bit va_list ? least impact system, making gcc match msvc va_list best, i'll take solution can get. thanks helping out! edit: i did 32-bit testing, , have problems there too, surprised ...

sharepoint - How to make a link to open to a toolpart in webpart -

i have custom webpart , when first renders want give link open modify shared webpart properties when open oob webparts content editor or xml webpart? 1 having idea on ...i using when m clicking on it, showing following error i m using this: literalcontrol lctrl = new literalcontrol(); lctrl.text=string.format("<a id='msoframeworktoolpartdefmsg_{0}' href=\"javascript:msotlpn_showtoolpane2wrapper('edit','129','{0}');\">open tool pane</a> , enter valid value.",this.id); controls.add(lctrl); error: web part attempted change either invalid or has been removed user.click refresh it.(this showing in toolpane) taken working webpart: myvar = "<a href=\"javascript:msotlpn_showtoolpane2wrapper('edit', this, '" + id + "')\">open toolpanel</a>" "id" webpart id. use usercontrol hold webpart code, use parent.id

Migrating from VS 2008 to VS 2010 (4.0) and VB.NET to C# -

i know there tools migrate vs 2008 application vs 2010. knows tool can convert vb.net code c# code. load assembly in reflector , can disassembly in c#. it not perfect, works off il (which lower level c# or vb.net), end funny iterator blocks , strangely named variables (that may illegal names in c#). these patterns pretty easy figure out , fix, though time consuming.