Posts

Showing posts from September, 2010

android - ClassCastException in Eclpse 3.5 and 3.6 when in Graphical Layout with a SlidingDrawer -

has got graphical layout working correctly in either eclipse 3.5 or 3.6 when using sliding drawer? i keep getting following error in both: error! classcastexception: com.android.layoutlib.bridge.mockview cannot cast android.view.viewgroup exception details logged in window > show view > error logthe following classes not found: - slidingdrawer i error code , example code can find around: <?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#8cb69c"> <slidingdrawer android:id="@+id/drawer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:handle="@+id/handle" android:content="@+id/content"> <imageview

delphi - Usage of SHGetSpecialFolderPath to retrieve an application folder that can be accessed also to non admin users, which CSIDL to choose? -

in application store on every machine files in application folder. a simplified version of real case this: ..\project1\loginhistory (login history file - common users) ..\project1\translations (localization files - common users) ..\project1\formsettings\user1\ (this contains ini file per form user1) ..\project1\formsettings\usern\ (this contains ini file per form usern) so can see why use this: save data specific machine (remember latest logins made machine, kind of mru), store translation strings or 3rd party components (these extracted runtime exe resources) , saving user specific data (like form size). real case more complex, @ least can there "common folder" , "user folders". now keep structure, files in single ..\project1 folder (+ subfolders). because users not windows users, sql server users. my question folder choose ..\ . currently (succesfully) using code retrieveing ..\ uses shlobj; function getspecialfolder(const csidl: integer) : str

regex - Javascript Regexp dynamic generation from variables? -

how construct 2 regex patterns one? for example have 1 long pattern , 1 smaller, need put smaller 1 in front of long one. var pattern1 = ':\(|:=\(|:-\('; var pattern2 = ':\(|:=\(|:-\(|:\(|:=\(|:-\(' str.match('/'+pattern1+'|'+pattern2+'/gi'); this doesn't work. when i'm concatenating strings, slashes gone. you have use regexp : str.match(new regexp(pattern1+'|'+pattern2, 'gi')); when i'm concatenating strings, slashes gone. if have backslash in pattern escape special regex character, (like \( ), have use two backslashes in string (because \ escape character in string): new regexp('\\(') same /\(/ . so patterns have become: var pattern1 = ':\\(|:=\\(|:-\\('; var pattern2 = ':\\(|:=\\(|:-\\(|:\\(|:=\\(|:-\\(';

java - what is the difference between public static synchronized and public static? -

as said , difference between public static synchronized .. , public static ? example ? one point have careful (several programmers fall in trap) there no link between synchronized static methods , non synchronized static methods, ie: class { public static synchronized f() {...} //class level lock public static g() {...} //object level lock } public class testa{ public static void main(string[] args){ a = new a(); //thread 1: a.f(); //thread 2: a.g(); } } f() , g() not synchronized each other , can execute totally concurrently.

c# - ObjectForScripting with multiple Interfaces not working -

i have winform interacts webbrowsercontrol through objectforscripting. baseclass of winform not comvisible , can not or not change it. because there noncomvisiblebaseclass have created interface , set comvisible(true) , set formattribute [classinterface(classinterfacetype.none)]. methods in interface can called javascript. , works perfect: //make class visible com can set objectforscripting //specify classinterfacetype.none use comvisible interface [comvisible(true)] [classinterface(classinterfacetype.none)] public partial class geekbrowser : geekbasepage, imapcontrolinteractable ... public class geekbasepage : system.windows.forms.form ... [comvisible(true)] public interface imapcontrolinteractable but problem. interface contains multiple functions. want separate interfaces separate task groupings. want interface contains logging functions , interface dataaccess functions , on. so like: [comvisible(true)] [classinterface(classinterfacetype.none)] public partial class geekb

android - make calculation and toast it---error -

in app have 3 edittext user can place number.then.when user press button,i result of calculation editext. this code,but app forces down..any please? code: float result = (float) ((((new double(input11.gettext().tostring()) + new double(input21.gettext().tostring()))/2)*0.3)+ (new double(input31.gettext().tostring())*0.7)); vprosvasis.settext(float.tostring(result));} calculation: float genikosvathmos = (float) ((new double(vprosvasis.gettext().tostring())+new double(vprosvasis7.gettext().tostring())+ new double(vprosvasis2.gettext().tostring())+new double(vprosvasis3.gettext().tostring()) +new double(vprosvasis4.gettext().tostring())+new double(vprosvasis5.gettext().tostring())+new double(vprosvasis6.gettext().tostring()))/7); float moria=(float) (((new float ((genikosvathmos*8)+("vprosva

c - fcntl not working -

i have small program tires change files access mode after has been opened. int main(int argc, char* argv[]) { int fd; char *filename = argv[1]; char data[1]; int curval; //current flag value int newval; //new flag value fd = open(filename, o_rdonly); while(read(fd, data, 1)>0) { write(stdout_fileno, data, 1); } lseek(fd, 0, seek_set); if((curval = fcntl(fd, f_getfl, 0))<0) { perror("file flag failed"); } printf("%d\n", curval); newval = curval | o_wronly | o_append; printf("%d\n", newval); if(fcntl(fd, f_setfl, newval)<0) { perror("file flag set failed"); } if(write(fd, argv[2], strlen(argv[2]))<0) //appending more data file { perror("write failed"); } lseek(fd, 0, seek_set); while(read(fd, data, 1)>0) { write(stdout_fileno, data, 1); } close (fd); return 0; } here output when run progra

C++ class design patterns in open source projects -

i have started learning design patterns. have understood basics of few patterns. want familiar real code examples these patterns being utilized. can here please point out open source projects design patterns being used ? see how design patterns being used in real world code. following of links. junit cookbook provides brilliant example of quite few patterns - worth checking. junit cook's tour vince huton's dp design patterns hope helps.

devexpress - ASPxGridview undefined -

i have basic 1 table grid. have field called branch type. branch type can corporate or franchise. when click on edit button on aspxgridview row , display , hide fields on edit form, depending on branch type is. if corporate display manager field , hide owner field. when branch type franchise owner field displayed , manager field hidden on edit form. details can show on grid view on edit form force user fill in applicable fields. if below: this want achieve on loading edit form : protected void aspxgridviewstores_celleditorinitialize(object sender, aspxgridvieweditoreventargs e) { if (!aspxgridviewstores.isediting || e.column.fieldname != "storeownershipid") return; if(e.keyvalue == dbnull.value || e.keyvalue == null) return; object val = aspxgridviewstores.getrowvaluesbykeyvalue(e.keyvalue, "s_id"); if(val == dbnull.value) return; int storeownershipid = (int32)val; if (storeownershipid == 4) { aspxcombobox managerid = (aspxcom

validation - CustomValidationAttribute doesn't work when other attributes are applied to the class -

reproduction: imports system.componentmodel imports system.componentmodel.dataannotations module module1 sub main() dim type = gettype(contact) typedescriptor.addprovidertransparent( new associatedmetadatatypetypedescriptionprovider(type), type) dim contact new contact dim context new validationcontext(contact, nothing, nothing) dim errors new list(of validationresult) dim result = validator.tryvalidateobject(contact, context, errors, true) end sub end module <customvalidation(gettype(contact.contactmd), "*********************")> <metadatatype(gettype(contact.contactmd))> public class contact public property email string public property emailrepeat string public class contactmd '<required()> public property email '<required()> public property emailrepeat public shared function validateemails(byval contact contact) _ validationresult return if(contact.email =

How can I hide the cursor in transparent WPF window? -

how can hide cursor in wpf window transparent (alpha=0). i tried usual this.cursor = system.windows.input.cursors.none; and works on areas content alpha > 0 when cursor moves area - in same window - background transparent cursor re-appears. i added system.windows.input.mouse.overridecursor = system.windows.input.cursors.none; didn't help. i realize setting alpha of background 1 might solution various reasons creates other problems... maybe work-around can create tiny non-transparent area somewhere, , move mouse there before hiding it: // coordinates of non-transparent area: var x = 10; var y = 10; system.windows.forms.cursor.position = new system.drawing.point(x, y); this.cursor = system.windows.input.cursors.none;

java - which mobile phone SIMs actually support javacard today? -

i wonder on smartcards can run javacard? afaik requires "open platform" os, but: usim-cards mobile phones today (especially in germany) support this? as far know sim card produced during last ~10 years able run java. problem need code can obtained card owner, i.e. carrier. carrier not give code unless carrier's partner... probably following links can you. http://forums.techarena.in/software-development/1353925.htm how programmatically load java card applet ( .cap file ) using visual c++/pcsc

sql server - SSMS crashes when opening Design Query Editor -

is there fix crash in sql-server 2005 management studio when try open design-query-editor sql-statementent preceding use database; ? for example: use db1; select * table1; if mark select * table1; , can open editor succesfully. if mark both lines, ssms crash "microsoft sql server management studio has stopped working"-dialog(with option debug or close ssms) , additional information on problem f.e.: problem signature: problem event name: bex application name: sqlwb.exe application version: 2005.90.5000.0 application timestamp: 4d02772b fault module name: vdt80.dll fault module version: 8.0.50727.1826 fault module timestamp: 480d6e41 exception offset: 0032ae42 exception code: c0000409 exception data: 00000000 os version: 6.1.7601.2.1.0.16.7 sql-server version: select serverproperty('productversion'), serverproperty ('productlevel'), serverproperty ('edition') 9.00.5000.00 sp4 enterpri

swing - Java SwingUtilities.invokeLater -

.addactionlistener(new actionlistener(){ public void actionperformed (actionevent e){ try{ ta.append("searching initiated at: "+datetime()+"\n"); gui.setcursor(cursor.getpredefinedcursor(cursor.wait_cursor)); task.execute(); javax.swing.swingutilities.invokelater(new runnable() { public void run() { gui.setcursor(cursor.getpredefinedcursor(cursor.default_cursor)); } }); //enable next stage in yd process , disable executed functions clusan.setenabled(true); open.setenabled(false); statcl.setenabled(false); }catch (exception ioe){ } } }); hi there, having bit of pain last stage of application i've designed. basically, when user clicks button, i'd cursor becomes 'waiting' version ,

.net - MVC2 Url with a dash -

i have view (page) called datagrowth.aspx, how can display in browser so: http://localhost/solutions/data-growth/ trying asp.net mvc2 thanks you add [actionname("data-growth")] attribute controller action. can choose rename view data-growth.aspx or modify return statement to return view("datagrowth");

.net - Problem when selecting MySQL stored procedure to populate datatable in Visual Studio -

Image
i looking populate datatable mysql stored procedure in visual studio. usual , add tableadapter dataset , begin fill in details. i create connection string, tests fine , returns stored procedures, go populate stored procedure. click on select combobox , select stored procedure want use population. once click on dialogs , datatable disappear , goes usual dataset screen. what happening , can stop it?! have tested stored procedure , works expected. edit: tried other stored procedures , working fine...what going wrong?! ok, realised there 2 columns in select statements had same alias. re-aliased (real word?!) column , works now.

java - How to change "pathInfo" of HttpServletRequest -

i afraid ask strange question want change "pathinfo" of httpservletrequest @ handler method of controller. please take @ below. i know can "pathinfo" using getpathinfo(). however. don't know how set pathinfo. possible ? appreciated @requestmapping(value = "show1" method = requestmethod.get) public string show1(model model, httpservletrequest request) { // want set "pathinfo" kind of methods not provided //request.setpathinfo("/show2"); // thought beanutils.copy may available.. no ideas. // have call show2() same request object return show2(model, request); } // not allowed edit method private string show2(model model, httpservletrequest request) { // hope display "http://localhost:8080/contextroot/show2" system.out.println(request.getrequesturl()); return "complete"; } you can't set these values. the option create wrapper request, this: return show2(

JavaScript: Image doesn't scale in IE when dynamically added -

when dynamically add image div image doesn't scale when resize window in internet explorer. i think it's more clear if show 2 simple examples: the following example doesn't use javascript it's plain html , want. http://www.friendly-stranger.com/halp/ie-width/index.html the next 1 uses javascript , if resize width of browser window image doesn't scale width gets smaller. http://www.friendly-stranger.com/halp/ie-width/bad.html this screenshot of both examples: http://www.friendly-stranger.com/halp/ie-width/koala-squash.jpg the javascript code use: <script type="text/javascript"> $(function(){ var img = new image(); img.src = 'koala.jpg'; $('div').append(img); }); </script> <script type="text/javascript"> $(function(){ var img = new image(); img.src = 'koala.jpg'; img.style.height = 'auto'; $('div

ruby on rails - Why am I getting duplicate version error using db:migrate VERSION=XXX? -

i'm working application upgraded ruby 1.8.6 ruby 1.8.7. created number of migration scripts named 999_whatever_function.rb , ordered sequentially. whole set previous runs have items 001 until 430 , , added items 450 . when try use rake db:migrate version=450 it aborts error c:\ruby\projects\db_upgrade>rake db:migrate version=450 --trace ** invoke db:migrate (first_time) ** invoke environment (first_time) ** execute environment ** execute db:migrate rake aborted! **multiple migrations have version number 3500** c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/migration.rb:507:in `migrations' i have no duplicate numbering on scripts i'm wondering if version 1.8.7 requires different type of version notation (yyyymmddtime)? i see there no duplicate migrations, that's trigger error. double-check prefixes of migrations in db/migrate. there 2 begin 3500? also, conflating ruby , rails. ruby @ version 1.8.7, not rails. looks runn

oop - Accessing clone() from java.lang.Object -

here cannot understand. in java.lang.object clone() defined protected modifier. definition can accessed name inside own class definition, name inside class derived it, , name in definition of class in same package. here sample class in package, , can't access clone() object class. sample derives implicitly object , why not able access it? definition doesn't has satisfy both conditions (inside same package , subclass). public class sample { public object foo() throws clonenotsupportedexception { ... return someobject.clone(); } } in case, clone() method not visible because not calling subclass. sample derives object , can access own clone() method, not of other objects. object clone() designed several mistakes. not practice use - hard right: the assumption not every object clonable default if override clone() making public, still fail, because each class has implement cloneable cloneable , however, not define methods, users of ob

java - Netbeans 6.8 no profiler? -

i wanted profile project on different system netbeans installed there doesn't seem have profiler available. java -version on box; (1.6.0_18) openjdk runtime environment (icedtea6 1.8.3) (fedora-46.1.8.3.fc13-x86_64) openjdk 64-bit server vm (build 14.0-b16, mixed mode) could configuration reason, or have fiddle netbeans settings? open tools->plugins , check "installed" tab. if there no "java profiler" plugin there, may need install through "available" tab. or may need activate if it's in "installed" tab, not marked active.

c# - What am I compromising by running my application as 32 bit in a 64 bit OS Machine -

we moved windows xp windows 7. found 1 part of application in c# try create dbf file pda failed thorwing error message "the 'microsoft.ace.oledb.12.0' provider not registered on local machine." i found many forums pointing me build exe 32 bit here . my question no. 1) there other driver accessing dbf on 64 bit os machine? (i know there 1 accessing excel , access db). there dbf? question no 2. same title. have feeling converting 32 bit, not making use of full advantage of 64 bit. losing workaround? thanks in advance. x64 processes have access more instructions , more registers. compiling x86 vs cpu give ability jit compiler use instructions , registers (and more memory), typically resulting in (small) performance penalty. really, 99 times out of hundred users won't notice. what notice program doesn't work if compile cpu because there no 64bit ole driver dbf files. format not used more, , wouldn't surprise me learn microsoft has no

inheritance - How to access child controls inside inherited class? -

here i'm doing, have large amount of reports, rather copy , pasting repeated code, have following.. public class reportpage : system.web.ui.page { // code } my report pages have public class myreportpage : reportpage { } problem i'm having is, want able access control inside myreportpage within reportpage, instance, want pages grid have specific property. inside reportpage tried protected void page_prerender(object s, eventargs e) { var obj = this.findcontrol("reportgridname"); } but unable find control, went through controls see if in, no luck.. any ideas how grid access on inherit? page page = (page)httpcontext.current.handler; var obj = page.findcontrol("reportgridname"); does work? i'm having exact same problem , stumbled upon this link

c# - Auto Refresh GridView with Data From BO (via SQL Server table) every minute with effectin web form submission -

i have c# web form contains few dropdowns , more importantly gridview gets populated products on page load() via datagrid.bind(). i need auto update products data in gridview every minute or 5 minutes without disrupting users selection of value in dropdown. whats efficient way repopulate gridview without effecting form submission process? feedback appreciated. thanks..

c# - Is there OLE provider drivers for a production web server that can be installed without installing the full office app? -

i have web application creates connection ole db provider. allows upload .xls/.xlsx files server data gets stripped out datatable passed stored procedure. i told free ace 2010 drivers. link find following, if free ace drivers, states on there not using production web server if strictly development. http://www.microsoft.com/downloads/en/details.aspx?familyid=7554f536-8c28-4598-9b72-ef94e038c891&displaylang=en is there drivers can install on server wouldn't require me installing excel application? your link broken: http://www.microsoft.com/downloads/en/details.aspx?familyid=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en supported operating systems:windows 7;windows server 2003 r2 (32-bit x86);windows server 2003 r2 x64 editions;windows server 2008 r2;windows server 2008 service pack 2;windows vista service pack 1;windows xp service pack 3 note jet installed default vaguely recent version of windows.

Load CSS files using PHP, based on page content -

is possible? example, i'm loading of css files through header. 1 of things i'm using jquery datatables plug-in. however, don't want load datatables css unless page content contains dom element of type "table". i've tried evaluating page with: file_get_contents($_server["php_self"]; which doesn't work. what's efficient way evaluate page's content in php, , load css files appropriately? or, javascript better way this? i you're on thinking this. set far away cache expiration date on datatable css , let user cache css file.

javascript - how to check whether a button is on hover -

is there javascript property check whether button on hover. need because when mouse hovered on button perform particular task. i can see event onmouseover no property check whether mouse hovered or not. can 1 please me out on how can proceed this. try (jquery). it's messy idea: http://jsfiddle.net/srsk3/1/ <input type="text" value="test"><input type="button" value="test"> <div id="div">-</div> with: $(function(){ $('*') .data('hovering', false) .mouseover(function(){$(this).data('hovering', true)}) .mouseout(function(){$(this).data('hovering', false)}); }); window.setinterval(function() { $('#div').html("textbox hovered: " + $('input[type="text"]').data('hovering')); }, 100)

asp.net - HttpHandler cannot find Content control -

i have aspx page cannot touch. it's shared page. however, want override navigation control page provides , instead use default content on masterpage. so, i'm being asked create http handler. handler intercept requests page , remove control overriding default content. 1 problem content control has no id. i've hooked page's preinit event , attempting traverse control heirarchy using recursive method find control using contentplaceholderid property. however, when go access page's controls property, shows single control, master page. cannot seem access other controls on .aspx page. would know how able find content control? this article on msdn should navigate through controls collections. master page controls

can I customize the background of a polygon in OpenLayers? -

can customize background (with image, example) openlayers on polygon? thanks replies all wfs / vector style properties on http://docs.openlayers.org/library/feature_styling.html according link, can't set background image polygons. try on server-side, it's possible mapserver if use it.

iphone - Add a file association with tiff files on iOS -

i'd create file associate tiff files in ios app (i.e. app appears target opening tiff files mail or safari). adding following info.plist file doesn't seem work: <key>cfbundledocumenttypes</key> <array> <dict> <key>cfbundletypename</key> <string>tiff</string> <key>lsitemcontenttypes</key> <array> <string>public.tiff</string> </array> <key>lshandlerrank</key> <string>alternate</string> </dict> </array> i have app associate pdfs in same way , works fine. believe not possible associate app tiff file type on ios, can't find documentation stating that. has else had luck getting work or finding definitive "no, can't that"? i burned apple tsi on (i never seem end using them anyway) , official answer is: no, can't that. i've logged enhancement request on apple's bug reporting sit

Azure Blob: "The condition specified using HTTP conditional header(s) is not met" -

i got exception when run application. happens in real azure blob storage. i've caught fiddler request creates problem: get http://127.0.0.1:10000/devstoreaccount1/ebb413ed-fdb5-49f2-a5ac-74faa7e2d3bf/8844c3ec-9e4b-43ec-88b2-58eddf65fc0a/perro?timeout=90 http/1.1 x-ms-version: 2009-09-19 user-agent: wa-storage/6.0.6002.18006 x-ms-range: bytes=0-524304 if-match: 0x8cda190bd304dd0 x-ms-date: wed, 23 feb 2011 16:49:18 gmt authorization: sharedkey devstoreaccount1:5j3iscy9ujln3o1icwkwveazo4/idjg796sdzkqhlr4= host: 127.0.0.1:10000 and response: http/1.1 412 condition specified using http conditional header(s) not met. content-length: 252 content-type: application/xml server: windows-azure-blob/1.0 microsoft-httpapi/2.0 x-ms-request-id: fbff9d15-65c8-4f21-9088-c95e4496c62c x-ms-version: 2009-09-19 date: wed, 23 feb 2011 16:49:18 gmt <?xml version="1.0" encoding="utf-8"?><error><code>conditionnotmet</code><message>the condition

internet explorer - JQuery + Watir - event handlers not working -

i have droplist on webpage trying test watir. while watir selects item in droplist, jquery change event isn't fired. is there way watir (using ie) fire jquery change event? i had jquery in page, able solve having watir execute javascript fire change event (after had changed selection in droplist) @browser = watir::browser.new @browser.goto("http://someurl") @browser.select_list(:id, element_id).select(item_to_select) @browser.ie.document.parentwindow.execscript('$("##{element_id}").change();') where: element_id id of droplist in question item_to_select item select in droplist

php - Is it possible to just get a "set" using a Flickr's feeds? -

i'm trying grab photos specific "set" on flickr opposed entire user's photostream. know if possible using flickr's feeds ( http://www.flickr.com/services/feeds/ )? looks can select tags, need grab set. (tags not option) subscribe urls formatted follows: http://api.flickr.com/services/feeds/photoset.gne ?set=<photoset_id> &nsid=<user_id> for example, http://api.flickr.com/services/feeds/photoset.gne?set=72157622566768892&nsid=8344375@n07 the list on feeds page linked in question not exhaustive list of all of available feeds flickr, hinted @ by: while feeds linked throughout site, can further customised additional parameters, documented below.

mysql - How to make a php variable equal to the result of mysql_fetch_array? -

$query = mysql_query("select * fruit color='red' "); while ($row = mysql_fetch_array($query)) { echo $row['name']."|" ;// echo apple|strawberry|cherry } how make php variable equal result of mysql_fetch_array? need make equal like: $newname="apple|strawberry|cherry" , can use new variable $newname process. thanks. rather echo, concatenate: $newname = ''; while ($row = mysql_fetch_array($query)) { $newname .= $row['name']."|" ;// echo apple|strawberry|cherry } $newname = rtrim($newname,'|');

asp.net - What exactly does the staticcontent tag in the web.config file apply to? -

i've been reading staticcontent element in web.config file i'm having bit of trouble figuring out asp.net considers static content. assume it's going include images, js files, css , static html files can't seem find articles explicitly state this. have links documentation explains in detail? i think may information you're missing - static content mimemap

servlets - HTML File upload form with additional input fields -

i have following html form... <html> <head><title>upload servlet</title></head> <body><h2>upload servlet</h2> <form name='uploadparams' enctype='multipart/form-data' action='' method='post'> <label>migrate options from: <select name='migratefrom'> <option></option> <option value='version 1'>version 1</option> </select> </label> <br/> <input type='file' name='zipfile'> <br/> <input type='hidden' value='willnotshowupinservlet'/> <button type='submit'>submit</button> </form> </body> </html> the problem while can read file http parameter name of "zipfile" fine servlet not see other parameters "willnotshowupinservlet" , "migratefrom". file uploa

strange coldfusion errors after ms sql server table change -

i working coldfusion 9 on windows server, using ms sql server 2005. encountering strange issue. i creating object querying table in database, getting necessary info, , building object results. if table has these columns: id name address i creating object methods such get_id(), get_name(), get_address(), etc. works fine , when query methods results expect. but go in , change table. add new column, such "city". ok, object still instantiates. go in , put data new column. object instantiation no longer functions. getting generic errors this: element address undefined in instance i notice still have cftry tags wrapped around cfquery statement, take off. see error: unsupported data conversion so go database , delete new column completely. works correctly, before. seems when add new column table, sql server trying sort of data conversion on it? don't see have flagged happen anywhere. any can given appreciated! check make sure query isn't using

c# - Problem with assembly references in Visual Studio -

i created new project in visual studio proj2 , want have same assembly references proj1, opened proj1.csproj , copied: <itemgroup> <reference include="mscorlib" /> <reference include="system" /> <reference include="system.windows" /> <reference include="system.core" /> <reference include="system.xml" /> <reference include="system.net" /> <reference include="system.windows.browser" /> </itemgroup> and pasted proj1.csproj. problem system.windows assembly reference has exclamation mark beside it, , when try click it, says: this project cannot viewed in object browser because unavailable or not yet built. please ensure project available , built. and of course in .cs file, says that the type or namespace 'windows' not exist in namespace 'system' (are missing assembly reference?) how assembly references work? go project p

tags - How to avoid dupliucate anchors XHTML? -

i did page , did check on using software called webking , tells me have duplicate anchors?? <ul > <li><a href="#toc1" title="about code">about code</a></li> <li><a href="#toc2" title="blah blah test">link 2 boring</a></li> <li><a href="#toc3" title="3rd link test">3rd line in</a></li> <li><a href="#toc4" title="contact manny">contact manny</a></li> <h3><a name="toc1" id="toc1">about code</a></h3> <h3><a name="toc2" id="toc2">link 2 test</a></h3> <h3><a name="toc3" id="toc3">3rd test</a></h3> <h3><a name="toc4" id="toc4">contact manny</a>&l

wpf controls - Showing a new Window right next to a DataCell in DataGrid (WPF) -

i want scenario when user clicks on cell in datagrid in wpf, want open numpad next (this touch based input). numpad, understand separate window. 1) how can know cell selected 2) how can show numpad next cell? 3) how can find coordinates of cell position numpad? 4) how can set value of cell based on numpad entry? numpad wpf user control in same application. datagrid .net 4 control. it's normal windows desktop application this not trivial task , should have knowledge of wpf accomplish this, here ideas might for: the datagridcell.isselected property tells whether cell selected. i use popup show numpad directly besides cell. if use popup not need coordinates, can specify relative placement using popup.placement property. see msdn document: popup placement behavior you try use binding numpad user control in datagridcell. using datagrid.cellstyle or datagridcolumn.cellstyle property can specify alternate style cells of datagrid or specific column. w

embedded - DEBUGIN burst speed effecting SPI on BASIC Stamp -

i have application on parallax basic stamp board reads text commands , executes test cases based on commands. 1 test case sends data via spi bus , reads spi bus failing, depending upon burst rate of debugin text. the stamp board connected pc (quad core 2+ ghz), through serial port @ 19200 baud. when use basic stamp terminal or hyper terminal send commands stamp board, test passes. when send same commands via c# application, test fails. primary difference burst rate @ text sent stamp board. humans send text slower computers (the application). when using hyper terminal, 1 character sent @ 19200 baud. application sending 8 characters @ 19200 baud no pauses between characters. i'm looking explanation how debugin statement (input through serial port) affects shiftin or shiftout commands, or if knows how resolve issue. unfortunately, baud rate of debugin command cannot changed. alternative have custom version (including conversion of text numbers) using serial port

joomla - how to get videos from amazon s3 in to my hwdVideoShare component or hdflvplayer component? -

how videos amazon s3 in hwdvideoshare component or hdflvplayer component? it not possible, if u want amazon s3 videos u must upgrade not possible, if u want amazon s3 videos u must upgrade hdflvplayer in proversion.

objective c - iOS MapView or just nor UIView when dealing with static map image -

i have image of mall layout , want know if better use mapview or plain old imageview? want display image , place markers on it. there no need geocode etc.. should use? since can't replace map tiles of mkmapview own graphics, isn't option in case. plain image view fine long map not need zooming , isn't large (in pixel dimensions). if is, tiling map image , using catiledlayer (what mkmapview uses internally) might correct choice.

Using DateTime under db4o with native SODA queries? -

under db4o, i'm attempting constrain "new datetime(2010,10,14)" doesn't seem work - opinions on how fix this? got it: var query2 = db4o.db.query(); query2.constrain(typeof(tradingday)); query2.descend("_date").constrain(new datetime(2010,10,14)); iobjectset result2 = query2.execute();

flash - Function returning -

why program output text "future" function year()? in case, b+c equaling 56, var year should fall under (b+c) > 0 && (b+c) < 1000) , return "roman", instead returns "future"... i got work if add this: var period:string = (year(b,c)); and in body function, make conditionals check period. example if (period == "future") but don't understand why need this. returning string, why have set variable? there no compiler errors not syntactical? var a:string = "tim"; var b:int = 50; //change int want var c:int = 6; //change int want var d:string = "kyle"; var sum:int = b+c; function friend(d:string, a:string):string { return d+" , "+a; } function year(b:int, c:int):string { if( (b+c) > 2000 ) return "future"; else if( (b+c)> 1000 && b+c< 2000) return "colonial"; else if( (b+c) > 0 && (b+c) < 1000) retu

javascript - jquery carousel with hover effects -

here's url: http://174.120.239.48/~peakperf/ here's jquery: http://pastebin.com/fb16ahcz site still under heavy development. if mouse on "services retention" on carousel see function should work like. on hover span element faded in, on mouse out hides. stuck, work fine. notice when click right arrow , scroll through carousel spans stuck "on". any appreciated, thank you! your mark invalid missing closing "a" tag (see below) </a> here error in code. <a href="#" id="homeslide6-show"> <img src="http://174.120.239.48/~peakperf/wp-content/themes/strausberg/images/home_service_retention.jpg" width="200" height="92" /> </li> </ul> additionally jquery code reduced 90% using each() function. for example add id ul , so <ul id="mycarousel"> jquery('#mycarousel').find('sp

Trying to import a custom UITableViewCell keeps giving me a file not found lexical preprocessor error in Objective-C -

trying import custom uitableviewcell , keeps giving me file not found lexical preprocessor error. can't figure out. productcell.h #import <uikit/uikit.h> @interface productcell : uitableviewcell { iboutlet uilabel *descript; iboutlet uilabel *productcode; iboutlet uiimageview *prodimage; } @property (nonatomic, retain) iboutlet uilabel *descript; @property (nonatomic, retain) iboutlet uilabel *productcode; @property (nonatomic, retain) iboutlet uiimageview *prodimage; @end productcell.m #import "productcell.h" @implementation productcell @synthesize descript; @synthesize productcode; @synthesize prodimage; - (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier { self = [super initwithstyle:style reuseidentifier:reuseidentifier]; if (self) { // initialization code } return self; } - (void)setselected:(bool)selected animated:(bool)animated { [super setselected:selected an

.net - SQL Server stored procedure slow in application but fast in SQL Server Management Studio -

i have stored procedure on sql server 2005. when running in sql server management studio, blindingly fast; when run in c# program through system.data, or run in other programs through odbc or jdbc driver, run ever or give timeout error. don't have access details of stored procedure. possible reason performance discrepancy? -it sql server management studio vs .net/odbc/jdbc. ( tried same query in c# .net, r odbc , matlab jdbc driver.)

programming languages - About learning semantics -

i have related semantics. , reading semantics engineering plt redex, find little hard understand, not way thought doing computer science. remembered how excited reading csapp book. not ver excited one, or field of semantics! while think reason not yet understanding it, what's point of it. maybe. think need suggestions lead me out of way: how precede learning of semantics? what semantics : semantics contrasted syntax. syntax describes how pieces of language may arranged. semantics describes arrangements do. describes effects have. from perspective of 1 writes language, syntax specification lexer, parser , abstract syntax tree. semantics specification eval / apply loop. why semantics interesting : syntax solved problem. while pleasingly complex, once have written few parsers start same. process of giving language meaning , having meaning lead useful, concise, , clear tool deeper subject. opinion, common among academics in computer science field semantics make

php - Adding Ordinal Contractions to $i -

possible duplicate: php display number ordinal suffix i'm attempting add ordinal contractions i.e.(st/nd/rd/th) increment. somehow need last digit of $i test against if statements... here code far: $i = 1; while($i < 101 ){ if($i == 1){$o_c = "st";}else{$o_c = "th";} if($i == 2){$o_c = "nd";} if($i == 3){$o_c = "rd";} echo $i.$o_c."<br/>"; $i++; } you can use modulus (%) operator remainder when dividing 10. $i = 1; while($i < 101 ){ $remainder = $i % 10; if($remainder == 1){$o_c = "st";}else{$o_c = "th";} if($remainder == 2){$o_c = "nd";} if($remainder == 3){$o_c = "rd";} echo $i.$o_c."<br/>"; $i++; }

sql server - SQL join format - nested inner joins -

i have following sql statement in legacy system i'm refactoring. abbreviated view purposes of question, returning count(*) time being. select count(*) table1 inner join table2 inner join table3 on table2.key = table3.key , table2.key2 = table3.key2 on table1.differentkey = table3.differentkey it generating large number of records , killing system, please explain syntax? , can expressed in other way? table1 contains 419 rows table2 contains 3374 rows table3 contains 28182 rows edit: suggested reformat select count(*) table1 inner join table3 on table1.differentkey = table3.differentkey inner join table2 on table2.key = table3.key , table2.key2 = table3.key2 for readability, restructured query... starting apparent top-most level being table1, ties table3, , table3 ties table2. easier follow if follow chain of relationships. now, answer question. getting large count result of cartesian product. each rec

Getting audio src atribute with JQuery -

i want access src atribute of mp3 file inside second "section" element. how do jquery? <html> <body> <div id="slides"> <section> <h3 class="audio"><audio src="file.mp3" /></h3> </section> <section> <h3 class="audio"><audio src="otherfile.mp3" /></h3> </section> <section> <h3 class="audio"><audio src="audio.mp3" /></h3> </section> </div> </body> </html> jquery api i think should of you. :) the code jquery('audio:eq(1)').attr('src');

ruby on rails - What if model doesn't match controller naming? -

say have setup: my model 'content', , want use model in 2 controllers. blog_controller.rb article_controller.rb my 'content' model has property 'content_type' tells me if content 'blog' or 'article'. this seems prevent me doing: resources :article resources :blog right? since models different? or can still this? you can still it. in routes file, resources method is, default, looking controller of same name pass it. regardless of model's name is, if have controller named blog_controller can resources :blog

Matching elements with namespace prefix in XSLT -

this xml input. <package version="2.0" unique-identifier="uuid_id" xmlns="http://www.idpf.org/2007/opf"> <metadata xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/"> <meta name="calibre:series_index" content="1"/> <dc:language>und</dc:language> <dc:creator opf:file-as="marquez, gabriel garcia" opf:role="aut" >gabriel garcia marquez</dc:creator> <meta name="calibre:timestamp" content="2010-07-14t21:35:15.266000+00:00"/> <dc:title>cem anos de solidão</dc:title> <meta name="cove

Make a TextView Editable in a Launcher Widget (Android) -

i'm trying create launcher widget textview editable. read says android:editable deprecated, haven't played (even though didn't worked anyway). this xml textview looks like: <textview android:id="@+id/hours_textview" android:text="@string/zero" android:layout_gravity="center_horizontal|center" android:layout_margintop="5dip" android:padding="10dip" android:textcolor="@android:color/black" android:layout_width="50dip" android:layout_height="fill_parent" android:inputtype="number" android:typeface="serif" android:clickable="true" android:cursorvisible="true" android:digits="0123456789" android:focusable="

asp.net mvc 2 - Using RedirectToAction with custom type parameter -

asp.net mvc 2 i have action in identity controller public actionresult details(string id, messageui message) { and i'm trying redirect action controller, don't know how should pass message parameter i trying with var id = "someidvalue" var message = new messageui("somevalue"); return redirecttoaction("details", "identity", new { id, message}); } but message parameter null that's normal. cannot pass complex objects in urls when redirecting , that's reason why messageui object not received. scalar properties translated & -separated key/value pairs in url. one possibility pass simple properties of object default model binder can reconstruct @ target location: var id = "someidvalue" var message = new messageui("somevalue"); return redirecttoaction("details", "identity", new { id = id, messageprop1 = message.messageprop1, messageprop2

How to load xib on the UITabBarItem click in iPhone -

i made custom toolbar , added uitabbaritem. want load xib on button click. how can this? give action uitabbaritem...and in action give name of xib wants load.. -(ibaction)buttonaction{ //eg:- shown below freesetsviewcontroller *viewcontroller =[[freesetsviewcontroller alloc] initwithnibname:@"freesetsviewcontroller" bundle:nil]; [self.navigationcontroller pushviewcontroller: viewcontroller animated: yes]; [viewcontroller release]; //you required xib } and still if unable please take asked how load xib. , link sam dufel shared you good luck!

jsf 2 - menupopup event listener not get called? -

i'm using ice:menupopup create menus on tree nodes. in jspx page i've this <ice:tree id="tree" value="#{tree.model}" var="item" imagedir="./xmlhttp/css/xp /css-images/"> <ice:treenode> <f:facet name="icon"> <ice:panelgroup style="display: inline"> <h:graphicimage value="#{item.userobject.icon}"/> </ice:panelgroup> </f:facet> <f:facet name="content"> <ice:panelgroup style="display: inline" menupopup="menupopupeffects"> <ice:commandlink actionlistener="#{tree.url}" value="# {item.userobject.text}"/>

android - Updating appWidget gives Problem loading gadget -

i'm trying add view main remoteviews keep getting problem loading gadget error. here's xmls , code, appreciated. public class widgetprovider extends appwidgetprovider { @override public void onupdate(context context, appwidgetmanager appwidgetmanager, int[] appwidgetids) { componentname thiswidget = new componentname(context, widgetprovider.class); remoteviews updateviews = new remoteviews(context.getpackagename(), r.layout.widget_main); remoteviews bookmark = new remoteviews(context.getpackagename(), r.layout.widget_items); updateviews.addview(r.id.view_container, bookmark); appwidgetmanager.updateappwidget(thiswidget, updateviews); } } <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativelayout_widget" android:layout_width="fill_parent" android:layout_height="fill_parent&q