Posts

Showing posts from September, 2010

Why django can not match double slashes correctly in URL? -

Why django can not match double slashes correctly in URL? - i'm trying utilize url pattern: (r'^welcome/(?p.+)/$', 'welcome'), to match url this: http://localhost:9000/welcome/http://google.com/ but surprise, found value of next turned out be: http:/google.com/ it seems double slashes somehow compressed 1 slash. why django behave , there workaround? this django ticket might going in right direction: https://code.djangoproject.com/ticket/14346 also: diggbar modrewrite- how pass urls through modrewrite? django

Java NIO/ MappedByteBuffer and map, read part of file in chunks -

Java NIO/ MappedByteBuffer and map, read part of file in chunks - i want read parts of big file in loop. had read entire file didn't work, getting exception file large. changed code listing below. code below reads in first chunk. need alter move next chunk. final fileinputstream fis = new fileinputstream(f); final filechannel fc = fis.getchannel(); final long sizeread = fc.size() < defaultreadbuffersize ? fc.size() : defaultreadbuffersize; final mappedbytebuffer bb = fc.map(filechannel.mapmode.read_only, 0, sizeread); while (bb.hasremaining()) { final charbuffer cb = decoder.decode(bb); this.search(f, cb); system.out.println("============>" + cb.length()); system.out.println("============>" + bb.hasremaining()); } fc.close(); the problem have character encoded info cannot accessed way. i.e. need know boundaries betwee...

What should I read when returning to C++ (from Java)? -

What should I read when returning to C++ (from Java)? - i working java @ current day job. when learned programming, learned c++, haven't touched (or had to) since 2002. don't remember how simplest of things. lately, work has been expressing need c++ application built windows. i looking books/articles/blog-posts (resources) that: teach basics of c++? for n00bz? for who's been programming? teach differences between c++ , java? teach basics of visual .* platform? teach specificities of building visual studio? why inquire question? this question brought on fact first programme 5 lines of c++ (sourced documentation dependency on dll.) it's quite intimidating figure out how build in way i'd to. that beingness said, there many elements in snippet don't understand. i see original need small, i'd background on platform/subject before embark on simpler development (like snippet) in future. thanks in advance. java c++ programming-langua...

coldfusion - Possible race condition with var scope singleton? -

coldfusion - Possible race condition with var scope singleton? - i have possible race status application scoped singleton. however, thought defining function level variable not problem. <!--- calling page ---> <cfset url.uuid = createuuid() /> <cfset application.uuidbot.displayuuid() /> <!--- uuidbot ---> <cfcomponent> <cffunction name="displayuuid"> <cfset var rc = {} /> <cfset rc.position = url.uuid /> <cfinclude template="displayuuid.cfm" /> </cffunction> </cfcomponent> <!--- displayuuid.cfm ---> <cfoutput>#rc.position#</cfoutput> is possible displayuuid.cfm not display uuid in url? the problem going found in code have not shared, included via displayuuid.cfm file. code within displayuuid not thread safe (i guessing). code needs utilize "var" localize variables--or--prefix references "local." ensure local scop...

google play - Installing Android market applications via USB -

google play - Installing Android market applications via USB - is possible install application android market phone via usb? problem don't have access net on phone, need know alternative method of installing android applications it. getjar , other websites offer apk files, not market applications. use adb install file.apk . more info adb take @ android developer documentation adb android google-play

php - Postfix and Amazon EC2 - trouble -

php - Postfix and Amazon EC2 - trouble - i have installed postfix via -yum install postfix on ec2 server. have shutdown default sendmail programme : /etc/init.d/sendmail stop chkconfig --levels 2345 sendmail off in main.cf files postfix have set hostname www.mydomain.com. now confused "relay" server- need this? have set mail.mydomain.com currently. i have added port 25 amazon firewall, requested elastic ip unblocked(reverse dns set up). i start postfix , not send email. have tried both through php mail() function , through command line : sendmail , nil gets sent. doing wrong? i have mx record in place not have spf record because not know set to. php email amazon-ec2 amazon-web-services

save or update for a model in Django Admin -

save or update for a model in Django Admin - i have next structure: class a(models.model): = models.foreignkey(b, unique=true) b = models.integerfield(default=0, blank=true) def save(self, *args, **kwargs): self.b += 1 super(a, self).save(*args, **kwargs) i wanted increment "b" 1 whenever saved. works fine when add together item first time otherwise fails because of "uniquetrue" clause. how allow django "update if exists" otherwise "create new". model increments count. thanks. the creation happens when object. if have problem saving duplicates, should looking. a.objects.get_or_create() should object if exists, create otherwise. can examine it's pk see if is same object, or duplicate. refer the documentation. django django-models django-admin

.net - LINQ sample: select typed objects from a list -

.net - LINQ sample: select typed objects from a list - i have dim objectslist list(of object) = getallobjects() ' filter objects persons ' dim peoplelist list(of person) = ??? what efficient , effective linq look it? edit 1 dim selectedobjects list(of object) = getallobjects() 2 dim selectedpeople ienumerable(of person)= selectedobjects.oftype(of person) 3 dim people list(of person) = selectedpeople.tolist() error on 3: value of type 'system.collections.generic.list(of system.collections.generic.ienumerable(of person))' cannot converted 'system.collections.generic.list(of person)'. sounds want enumerable.oftype() : dim peoplelist list(of person) = objectslist.oftype(of person)().tolist() .net vb.net linq

xcode - Translate the description of the app in App Store -

xcode - Translate the description of the app in App Store - i translating app via nslocalizedstring. how translate description in app store? is operation in itunes connect or under development? thanks lot! you must in itunes connect. if remember correctly, must select language app in , allow write each discription individually. hope helps. xcode app-store

php - How do webservers "ignore" URI components? -

php - How do webservers "ignore" URI components? - for illustration loading below link reloads page , removes extraneous extension: http://stackoverflow.com/questions/6718602/how-does-stackoverflow-and-other-sites-remove-file-extensions-for-webpages.abc123 there many ways can accomplished since you've tagged under asp.net, i'm going give specific ways asp.net only. classic asp.net - rewrite urls using httpmodule : http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx asp.net mvc - designed keeping cleaner urls , provides mechanism define routes : http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx hope helps. update: in php, think you'd utilize mod_rewrite apache module , .htaccess define rules: http://www.cyberdesignz.com/blog/website-design/url-rewriting-top-5-ways-of-php-url-rewriting/ php asp.net

How Jquery/Javascript dynamically add td (table) -

How Jquery/Javascript dynamically add td (table) - i need help, ideas? firstly want hide input element when page open, approach creating dropdown $counter (1-8) , depending on $counter example:3. i create/show existing element dynamically ($counter)<td></td> within tr #id. how jquery solve problem? can u provide me illustration of switch case in jquery show/hide defined td #id? thanks before rizq suppose input has id of "input-1", can hide doing: // assign value counter, might function var counter = '1'; // reference element , hide var input = document.getelementbyid('input-' + counter); input.style.display = 'none'; // or input.style.visibility = 'hidden'; and show again: input.style.display = ''; // empty string // or input.style.visibility = 'visible'; the difference between display , visibility properties former remove element document flow, whereas sec create i...

ruby on rails - How to write this method in separate module? -

ruby on rails - How to write this method in separate module? - right have method in specific model. self.reflect_on_all_associations(:has_many).each |association| define_method "#{association.name}?" self.send(association.name).any? end end i want utilize method in every model. how can write method in separate module ? untested , memory, next should work module reflectonassocations def included(base) base.reflect_on_all_associations(:has_many).each |association| define_method "#{association.name}?" self.send(association.name).any? end end end end ruby-on-rails ruby

ajax - jQuery GetJSON Security Issues. Copying URL and pasting in the browser -

ajax - jQuery GetJSON Security Issues. Copying URL and pasting in the browser - i using jquery getjson phone call in asp page. next code: $.ajax({ url: myurl/mypage.aspx?callback=bookaroom, datatype: 'json' }); this end in room beingness booked in system, issue if user copies url , pastes in browser, room booked. since has session, can't differentiate in asp pages. how can prevent this? there 2 problems here. first problem: get requests supposed safe. there lots of things can trigger get request. if changing state based on get request, code dangerously broken. utilize post . secondly, other websites can cause user create requests website. known cross-site request forgery. typical solution require nonce each request. because nonce unknown other website, can no longer forge requests. link provided give farther reading on alternative solutions. jquery ajax json security

sql - PHP PDO in and limit clause -

sql - PHP PDO in and limit clause - hey guys using pdo "in clause" looks (because of pdo hating in clause) $str = 'example,example2'; $sth = $dbh->prepare("select id keywords keyword_id in (".$str.")"); but how do limit correctly, seems when seek limit messed results. i'm guessing it's doing limit each of words in $str? anyways, help? php sql pdo

project management - Projectmanagement: preparing next major version while still updating previous version -

project management - Projectmanagement: preparing next major version while still updating previous version - this not language specific rather tool , management specific question. let's have software version 1.5 , i'm working on version 2.0 many new features. @ same time there might bugs in 1.5 need fixed , can't wait version 2.0 - need issue version 1.6 the question is, how manage branches of software locally on harddisk , in svn repository? don't want of new features implemented 2.0 appear in version 1.6 - on same time want bugfix create in 1.6 apply version 2.0. so - how, what's proper way manage software if work in parallel on different future versions? there's document on topic. and if you're not restricted svn, here's more git-specific model example. project-management

jquery - DataTables not displaying rows in Google chrome -

jquery - DataTables not displaying rows in Google chrome - i using server side processing of datatables. seems working fine using firefox. however, when view table using chrome none of rows displayed , datatable's "processing..." status label not clear. header, footer , column names of table shown, no rows. in chrome, if right click on table, select inspect element, , select console don't see errors, warnings or logs. all html table looks correct, problem seems lean datatables hasn't set between tags. is there log @ or tool utilize more diagnostic info? what prevent datatables adding got json record tbody section? i've started using javascript, jquery , datatables couple of days ago , unsure how go tracking downwards problem , resolving it. pointers appreciated. here's datatable declaration: <script type="text/javascript"> /* <![cdata[ */ $(document).ready(function() { var otable = $('#cars-table...

How do I differenciate identical USB devices connected to the same USB hub? -

How do I differenciate identical USB devices connected to the same USB hub? - lsusb -v shows same info both devices (except of ever growing device number when reconnecting device) attributes of devices identical, it's not possible differenciate them sort of uuid. how differenciate these identical usb devices? you can utilize lsusb -t , prints physical tree, gets info parsing /proc/bus/usb/devices . see documentation/usb/proc_usb_info.txt file info on format, if you're going parse yourself, each t: line gives parent device id , port on same usb

java - Android call log query giving illegalargumentexception: column '_id' does not exist -

java - Android call log query giving illegalargumentexception: column '_id' does not exist - i'm trying list of user's calls , i'm getting illegalargumentexception: column '_id' not exist. this find weird because did not create or have phone call log table, i'm trying query it. here's code: string[] strfields = { android.provider.calllog.calls.number, android.provider.calllog.calls.type, android.provider.calllog.calls.date, android.provider.calllog.calls.duration }; string strorder = android.provider.calllog.calls.date + " desc"; callcursor = getcontentresolver().query( android.provider.calllog.calls.content_uri, strfields, null, null, strorder ); // desired columns bound string[] columns = new string[] { android.provider.calllog.calls.date, android.p...

sql server - ISNULL, COALESCE functions -

sql server - ISNULL, COALESCE functions - how utilize isnull int values, varchar values select complaint.complaintprofileid,isnull(t2.mmb_id,'notfound') mmbid complaints c bring together t2.. on t2.sno = c.sno this query gives me error conversion failed when converting varchar value 'notfound' info type int. mmb_id int thanks sun try converting int column varchar, select complaint.complaintprofileid, isnull(convert(varchar(11), t2.mmb_id), 'notfound') mmbid complaints c bring together t2.. on t2.sno = c.no sql-server

Sharepoint 2010 Upload file using Silverlight 4.0 -

Sharepoint 2010 Upload file using Silverlight 4.0 - i trying file upload silverlight(client object model) sharepoint 2010 library.. please see code below.. try{ context = new clientcontext("http://deepu-pc/"); web = context.web; context.load(web); openfiledialog ofiledialog = new openfiledialog(); ofiledialog.filterindex = 1; ofiledialog.multiselect = false; if (ofiledialog.showdialog().value == true) { var localfile = new filecreationinformation(); localfile.content = system.io.file.readallbytes(ofiledialog.file.fullname); localfile.url = system.io.path.getfilename(ofiledialog.file.name); list docs = web.lists.getbytitle("gallery"); context.load(docs); file file = docs.rootfolder.files.add(localfile); context.load(file); context....

if statement - JSP error escape quotes in expression -

if statement - JSP error escape quotes in expression - i need check type display right message like: ${row.type} <c:if test="${row.stype ==\"note\" }">important note</c:if> but problem escaping produce unusual error: unable analyze el look due lexical analysis error how can fixed? thanks. double quotes must not escaped in el. utilize single quotes if tag attribute in double quotes, , vice-versa: <c:if test="${row.stype == 'note'}">important note</c:if> or <c:if test='${row.stype == "note"}'>important note</c:if> jsp if-statement escaping expression quotes

c# - Text with RegEx Validator not working -

c# - Text with RegEx Validator not working - i have issue next text display: <asp:regularexpressionvalidator id="password_regularexpvalidate" runat="server" text="test!" display="dynamic" borderstyle="none" controltovalidate="txtnewpass" validationexpression="(?=^.{8,255}$)((?=.*\d)(?=.*[a-z])(?=.*[a-z])|(?=.*\d)(?=.*[^a-za-z0-9])(?=.*[a-z])|(?=.*[^a-za-z0-9])(?=.*[a-z])(?=.*[a-z])|(?=.*\d)(?=.*[a-z])(?=.*[^a-za-z0-9]))^.*" meta:resourcekey="password_regularexpvalidateresource1" /></td> the pattern is: (?=^.{8,255}$)((?=.*\d)(?=.*[a-z])(?=.*[a-z])|(?=.*\d)(?=.*[^a-za-z0-9])(?=.*[a-z])|(?=.*[^a-za-z0-9])(?=.*[a-z])(?=.*[a-z])|(?=.*\d)(?=.*[a-z])(?=.*[^a-za-z0-9]))^.* the text had stuff in validationexpression different. i've changed regex look , works, when write in text= doesn't update on page. i've restarted iis, cleard ie cha...

ruby on rails - get parent values in child model -

ruby on rails - get parent values in child model - i have model called rsvpregistrations with belongs_to :rsvp i need utilize values parent 'rsvp' object in validations such as validates_presence_of :phone if self.rsvp.phone (rsvp.phone boolean) but doesn't work. error undefined method `rsvp'. how can access parent object , values? once working, have other similar validations run, i'm thinking need grab parent 'rsvp' 1 time , reference in other validations. thanks in advance. validates_presence_of :phone, :if => proc.new { |obj| obj.rsvp.phone? } more options here ruby-on-rails model-associations

c - What's wrong with gethostbyname? -

c - What's wrong with gethostbyname? - i using snippet of code found in http://www.kutukupret.com/2009/09/28/gethostbyname-vs-getaddrinfo/ perform dns lookups #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main(int argc, char *argv[ ]) { struct hostent *h; /* error check command line */ if(argc != 2) { fprintf(stderr, "usage: %s hostname\n", argv[0]); exit(1); } /* host info */ if((h=gethostbyname(argv[1])) == null) { herror("gethostbyname(): "); exit(1); } else printf("hostname: %s\n", h->h_name); printf("ip address: %s\n", inet_ntoa(*((struct in_addr *)h->h_addr))); homecoming 0; } i facing weird fact ./test www.google.com hostname: www.l.google.com ip ad...

javascript - Chrome thinks 99,999 is drastically different than 100,000 -

javascript - Chrome thinks 99,999 is drastically different than 100,000 - i ran interesting issue when posted jsperf benchmark conflicted previous, identical, benchmark ran. chrome drastically different between these 2 lines: new array(99999); // jsperf ~50,000 ops/sec new array(100000); // jsperf ~1,700,000 ops/sec benchmarks: http://jsperf.com/newarrayassign/2 i wondering if has clue what's going on here! (to clarify, i'm looking low-level details on v8 internals, such it's using different info construction 1 vs other , structures are) just because sounded pretty interesting, searched through v8 codebase static defined 100000, , found this kinitialmaxfastelementarray var, subsequently used in builtin arrayconstructinitializeelements function function. while i'm not c programmer , don't know nitty-gritty here, can see it's using if loop determine if it's smaller 100,000, , return ing @ different points based on that. jav...

ruby - how to check what object that a method bind to? -

ruby - how to check what object that a method bind to? - i read unbind method object, , have known how bind particular object, start wondering there method available check object method bind to the receiver of method returned aptly named method#receiver method. ruby

c++ - identify item/class pointer after qsort -

c++ - identify item/class pointer after qsort - first question please forgive naiveness here. i'm diving triangulation library c++, sorts array of struct pointers before running it's triangulation method. i'm trying maintain track of 1 particular struct pointer (xyz) throughout app, updates according mouse position. problem is, whenever qsort method applied, pointer changes. how identify or maintain track of struct xyz pointer? here struct & sort... struct xyz{ double x, y, z; }; int xyzcompare(const void *v1, const void *v2){ xyz *p1, *p2; p1 = (xyz*)v1; p2 = (xyz*)v2; if(p1->x < p2->x) return(-1); else if(p1->x > p2->x) return(1); else return(0); } the array of xyz structs (2 here testing) mouse pointer reference... xyz *allpointers = new xyz[100]; allpointers[0].x = 100; allpointers[0].y = 200; allpointers[0].z = 0; allpointers[1].x = 50; allpointers[1].y = 80; allpointers[1].z = 0; xyz...

concurrency - Singleton and thread safety -

concurrency - Singleton and thread safety - when talking singletons , threadsafe-ty issues concerning race conditions in creating singleton instance, thread talking about? using example, assume have myapp uses singleton class myapp { mysingleton oneandonly; int main() // application entry point { oneandonly = mysingleton::getinstance(); } void spawnthreads() { for(int = 0; < 100; i++) { thread spawn = new thread(new threadstart(justdoit)); spawn.start(); } } void justdoit() { waitrandomamountoftime(); // wait induce race status (maybe?) next line. mysingleton localinstance = mysingleton::getinstance(); localinstance.dosomething(); } } is talking about: when open myapp.exe once, , 1 time more again, trying have both opened? or talking threads spawned myapp? if myapp not spawn threads? in windows threads exist solely within scope of p...

python - Scrapy middleware order -

python - Scrapy middleware order - scrapy documentation says : the first middleware 1 closer engine , lastly 1 closer downloader. to decide order assign middleware see downloader_middlewares_base setting , pick value according want insert middleware. order matter because each middleware performs different action , middleware depend on previous (or subsequent) middleware beingness applied i'm not exclusively clear whether higher value result in middleware getting executed first or vice versa. e.g. 'myproject.middlewares.mw1': 543, 'myproject.middlewares.mw2': 542, question : which of these executed first? trial says mw2 first. what's valid range orders ? 0 - 999 ? which of these executed first? trial says mw2 first. as quoted docs: the first middleware 1 closer engine , lastly 1 closer downloader. so downloader middleware value of 542 executed before middleware value 543. means ...

jquery or javascript active element on foreground, lock background? -

jquery or javascript active element on foreground, lock background? - i have layer presented logic var. that layer hidden div - how create layer element can interacted on page when visible? thanks! update: used total size div in background transparent gif - works in firefox, not ie - thoughts? #overlay { background-image: url('../images/transparent.gif'); width:100%; height:100%; z-index:8999; display:none; margin-top: 0; margin-left:0; position:fixed; } the basic approach set semi-transparent element on whole page, under modal window contains focus element. jquery doesn't have built in, can either create own using approach or utilize jquery plugin. update: here's fiddle based on comment discussion. i've tested , works in ie8, firefox 3.5.15, , chrome 12.0.742.112. html: <div class="overlay"></div> <div>test</div> <input/> <div class="modalwindow ...

java - How to get url path from jsp in Spring MVC framework -

java - How to get url path from jsp in Spring MVC framework - to remove language toggle page view(comfirmation page) i found code doesn't work in spring mvc <c:if test="${!fn:contains(pagecontext.request.servletpath,'/comfirmation')}"> //other code </c:if> my actual url (shoppingcart.jsp). it used when /viewcart.htm,/updatecart.htm,/confirmation.htm,etc. so, user go /confirmation.htm, redirect shoppingcart.jsp url path in browser /confirmation.htm. i want remove language toggle when phone call /confirmation.htm in above mention. finally, got it. here go <% string url=request.getattribute("javax.servlet.forward.servlet_path").tostring(); if(url.equals("/confirmation.htm")){ %> //language toggle code <% } %> i decided utilize this. way storing url path in session since front end controller. java jsp spring-mvc jsp-tags

configuration - Customize Navigation in Sharepoint 2010 -

configuration - Customize Navigation in Sharepoint 2010 - this should navigation tree: root site (navigationexample) top - 1 web page - 1.p1 web site - 2 web site - 2.1 web site - 2.1.1 web page - 2.1.p1 web page - 2.1.p2 web site - 2.2 web page - 2.p1 top - 2 web site – 1 web site - 1.1 web site - 1.1.1 web page - 1.1.p1 web site - 1.2 web site - 2 web site - 2.1 how can customize left hand navigation @ to the lowest degree 3 level? have top navigation (top-1; top-2) displayed on top of page (horizontal). now i’d have left hand navigation (only active top nav). if top-2 active children of top-2 should di...

windows 7 - problem Mysqldump from a bat file -

windows 7 - problem Mysqldump from a bat file - i have 1 bat file on windows7, backup several tables database, this: "c:\gesticom\mysql\bin\mysqldump.exe" -uuser -ppsswd bbdddc [clientes, usuarios, proyectos, proveedores, areas_negocio, costes] --opt > tmp.sql when execute bat have seen code changed this: "c:\gesticom\mysql\bin\mysqldump.exe" -uuser -ppsswd bbdddc [clientes, usuarios, proyectos, proveedores, areas_negocio, costes] --opt 1>tmp.sql someone knows why appears number "1"? mysqldump command doesn't work :( thank you! that canonical representation of command cmd . doesn't impact executed and, in fact, identical command provided. it simply says stream 1 (stdout) redirected tmp.sql . if dump not work, wouldn't have worked before, either. windows-7 batch-file mysqldump

How to combine 2different IQueryable/List/Collection with same base class? LINQ Union and Covariance issues -

How to combine 2different IQueryable/List/Collection with same base class? LINQ Union and Covariance issues - i trying combine (union or concat) 2 lists/collection one. 2 lists have mutual base of operations class. e.g. i've tried this: iqueryable<contractitem> contractitems = myrepository.retrievecontractitems(); iqueryable<changeorderitem> changeorderitems = myrepository.retrievechangeorderitems(); iqueryable<itembase> folderitems = contractitems.concat<itembase>(changeorderitems); but getting linq error dbunionallexpression requires arguments compatible collection resulttypes. anybody know how properly? thing google stackoverflow question: linq union objects same base of operations class thanks. use cast operator: iqueryable<itembase> folderitems = contractitems.cast<itembase>().concat(changeorderitems.cast<itembase>()); the reply other question works linq objects, no...

sql server 2008 - select records in table -

sql server 2008 - select records in table - we have table next fields name nvarchar(10) family nvarchar(20) the table contains next record jach stonre sara sufia mona morgan the next code written select select * tbluser ta ta.name in('%j%') why output code ? i think want: select * tbluser ta ta.name n'%j%' sql-server-2008

qt - C++ QtWebkit app fail without error -

qt - C++ QtWebkit app fail without error - i'm working on application works html code , receives info it. utilize qtwebkit qwebelement parsing html code, application crashes without error, error occurs when: qwebframe *frame; frame->sethtml("<div class=\"some\">some</div>"); // app fail without error this first utilize of library code, code around has no effect. i utilize netbeans on ubuntu , version of qt 4.6, library loaded qtwebkit. c++ qt crash qtwebkit

jquery - Sortable function when content is updated via ajax -

jquery - Sortable function when content is updated via ajax - i have list populated via ajax. list can add together , delete items via ajax , sort them. have 2 issues it. the first 1 here , it's still unresolved: jquery dynamic drag'n drop doesn't update order (after sorting list number of items come database won't update until refresh) the sec 1 worse. after update contents on list via ajax (say add together new item), sortable function stops working until reload page. seems .live won't work sortable , i'm out of ideas one. i'll add together of code: my list goes this: <ul id="listaruta"> <li> ... </li> </ul> my script sorting items: $(function() { $("ul#listaruta").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updaterecordslistings'; ...

php - using jquery FileTree to access a different server? -

php - using jquery FileTree to access a different server? - i attempting access files on different server using file tree. wondering if possible? it's using php script pull data. able root of own server, can't seem direct link server. you seek creating own custom php connector , set utilize ftp rather scandir. should not hard - create new version of /connectors/jqueryfiletree.php file. below basic illustration of connecting ftp server using php going. $conn = ftp_connect("ftp.hostname.com"); $login = ftp_login($conn, "username", "password"); $n = ftp_nlist($conn, "dir"); foreach($n $value){ echo $value, "<br />"; } php javascript jquery

ruby on rails - Database help trying to get Functions from a group through users -

ruby on rails - Database help trying to get Functions from a group through users - i need check whether user part of grouping has functions give them access usermanagement page.. current have def user_managment # if in grouping 1 , user has function id 1 (user management) if current_user.group_ids.include?(1) && current_user.function_ids.include?(1)#&& group.function_ids.include?(1) flash[:error] = "you have access user management!" else flash[:error] = "you have not access user management!" end if current_user.group_ids.include?(1) && group_ids(1).function_ids.include?(1) flash[:error] = "test" end end im unsure how check if have string user management in table userscontrollers can help? what you're talking here access control, please please please please, stop you're doing , @ one of many, first-class authorization/acl gems out...

iphone - iOS Choosing localization for unsupported language -

iphone - iOS Choosing localization for unsupported language - i have localizations "en" , "ru" languages, , if user select other language (fr,de...) need display russian localization variant. tried changing "localization native development region" in info.plist "ru" / "russian", displays english, when using unsupported language. there related question i'm assuming task impossible. i grateful advice , insights on these issues. i think solution posted here localizing strings in ios: default (fallback) language? it possible set non-english default too. if current device not set using language (eg. russian). you can utilize [uiimage imagenamed:l(@"an_image")] then in different localizable.strings file, set different values: "an_image" = "some_image_default.png"; "an_image" = "some_image_ru.png"; "an_image" = "some_image_pt.png"; iphon...

Android is there a way to check for a specific device? -

Android is there a way to check for a specific device? - i writing app layout little off on droid x2. there way observe in code if device droid x2? add together little amount amount of padding layout if is. thanks use build.product . sample code: if (build.product.contains("droid x2")) { // add together stuff. } another of import point add. if doesn't work, create sure debug build.product contains in order see if right info. otherwise, can check build.model returns , go that. android android-layout

jquery - Full Calendar + Event + Event Drop + Ajax - Does not send date values -

jquery - Full Calendar + Event + Event Drop + Ajax - Does not send date values - i using jquery total calendar , trying save event when gets dropped. $('calendar').fullcalendar ({ theme: true, defaultview: 'agendaweek', columnformat: { week: "ddd" }, header: false, alldayslot: false, mintime: '6am', maxtime: '9pm', editable: true, droppable: true, drop: function (date, allday) { // function called when dropped // retrieve dropped element's stored event object var originaleventobject = $(this).data('eventobject'); // need re-create it, multiple events don't have reference same object var copiedeventob...

c# - How to change the size of a Silverlight object in asp? -

c# - How to change the size of a Silverlight object in asp? - i have implemented photo gallery in asp website. code looks this: object id="silverlightobject" data="data:applicaation/x-silverlight-2," type="application/x-silverlight-2" class="obiect"> param name="source" value="clientbin/galery.xap" i need alter object size dynamically aspx.cs code page on condition, can't access object (something if(a>b) object.height=500 ). you need runat="server" attribute on tag accessible server code. utilize id of element, not tag name: silverlightobject.height = 500; c# asp.net silverlight

compling error on libmicrohttpd using ld -

compling error on libmicrohttpd using ld - http://www.gnu.org/s/libmicrohttpd/tutorial.html#hello-browser-example gcc helloworld.c -lmicrohttpd -i/opt/local/include/ helloworld.c: in function ‘answer_to_connection’: helloworld.c:18: warning: incompatible implicit declaration of built-in function ‘strlen’ ld: library not found -lmicrohttpd collect2: ld returned 1 exit status i using snow leopard latest xcode , installed libmicrohttpd using macports never used osx need like: -l/opt/local/lib check lib resides.. linked docs says -l$path_to_libmhd_includes ld

php - Merging multiple multidimensional arrays -

php - Merging multiple multidimensional arrays - i have variable number of multidimensional arrays same 4 possible values each item. for example: array ( [companyid] => 1 [employeeid] => 1 [role] => "something" [name] => "something" ) but every array may have different ammount of items within it. i want turn arrays 1 single table lots of rows. tried array_merge() end table 8, 12, 16... columns instead of more rows. so... ideas? thanks didn't test it, seek following: $table = array(); $columns = array('companyid' => '', 'employeeid' => '', 'role' => '', 'name' => ''); foreach($array $item) { $table[] = array_merge($columns, $item); } this should work since documentation array_merge say: if input arrays have same string keys, later value key overwrite previous one. so e...

Silverlight: Reference ResourceDictionaries in external DLL's -

Silverlight: Reference ResourceDictionaries in external DLL's - i have few different solutions various different silverlight front end ends, 1 of contains silverlight project dedicated style resources. can imagine want break out own solution , reference gui solutions. in wpf reference mutual styles dll , utilize pack syntax load xaml resource files, in silverlight syntax not supported , cant find xaml files have been referenced in app.xaml resource dictionaries. has managed accomplish this? jeremy likness wrote great article on using theme project. covers how dynamically load themes. used technique in couple of our silverlight projects great success. i believe need merge style solution merged dictionary in app.xaml. <application.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary source="/myapp.mythemeproject;component/theme.xaml"/> </r...

mysql - mysqldump vs innodb hot-backup -

mysql - mysqldump vs innodb hot-backup - i need perform backup of entire innodb-database local file possibility restore info it. utilize mysql community edition, doesn’t have innodb hot-backup features. so i’m wondering, negative aspects should expect using mysqldump hotbackup instead of innodb hot-backup features? have at: http://dev.mysql.com/doc/refman/5.1/en/innodb-backup.html i think mysqldump locking each table during dump process. there should no limitation in restoring data, because info sql files mysql backup innodb mysqldump

c# - Place text into a SQL Server 2005 database -

c# - Place text into a SQL Server 2005 database - i have sql database 1 table 3 columns.. documentid, documenttitle, documentbody . i have aspx page 2 inputs... 1 title 1 body , 1 submit button. how on earth text within input fields store in new row in database? cannot find simple... concrete reply , there no way complicated. <form id="form1" runat="server"> <div style="width: 800px; margin-top: 40px;"> <p style="text-align: left"> title</p> <p> <input id="inputtitle" runat="server" type="text" style="width: 100%; padding: 6px; font-size: large" /></p> <p style="text-align: left"> body</p> <p> <textarea id="inputbody" runat="server" style="width: 100%; height: 400px" cols="22" rows="66"></textar...

google app engine - GAE and HtmlUnit 2.9 - getting exception upon jsxGet_cookie -

google app engine - GAE and HtmlUnit 2.9 - getting exception upon jsxGet_cookie - i'm trying login google using htmlunit in app in gae. however, maintain getting error: exception invoking jsxget_cookie which because caused by: java.lang.illegalargumentexception: invalid port: -1 @ org.apache.http.cookie.cookieorigin.<init>(cookieorigin.java:58) @ com.gargoylesoftware.htmlunit.cookiemanager.getcookies(cookiemanager.java:127) @ com.gargoylesoftware.htmlunit.javascript.host.html.htmldocument.jsxget_cookie(htmldocument.java:638) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:616) @ com.google.appengine.tools.development.agent.runtime.runtime.invoke(runtime.java:100) @ net.sourceforge.htmlunit.corejs.javas...

iphone - How to retrieve the list of songs of Songs Library in array? -

iphone - How to retrieve the list of songs of Songs Library in array? - following code retrieves songs nowadays in iphone want retrieve songs in array. mean can have array of names of songs in array? if yes, how can done? thanks- mpmediapickercontroller *picker = [[mpmediapickercontroller alloc] initwithmediatypes: mpmediatypemusic]; picker.delegate = self; picker.allowspickingmultipleitems = yes; picker.prompt = nslocalizedstring (@"add songs play", "prompt in media item picker"); [[uiapplication sharedapplication] setstatusbarstyle: uistatusbarstyledefault animated: yes]; [self presentmodalviewcontroller: picker animated: yes]; [picker release]; see ipod library access programming guide. in there's illustration shows media query matches entire library lets set in array: mpmediaquery *everything = [[mpmediaquery alloc] init]; nslog(@"logging items generic query..."); nsarray *itemsfromgenericquery = [everything item...

java - Is macbook air 501 64-bit or 32-bit? Which version of Eclipse should I choose? -

java - Is macbook air 501 64-bit or 32-bit? Which version of Eclipse should I choose? - the info "unname -a" tells i386. found applications in activity monitor types "intel 64". what's more, scheme profiler says:64-bit kernel , extensions, no. so, version of eclipse should choose, 64-bit or 32-bit? the same of java, try java -version 32-bit: java version "1.6.0_26" java(tm) se runtime environment (build 1.6.0_26-b03) java hotspot(tm) client vm (build 20.1-b02, mixed mode, sharing) 64-bit: java version "1.6.0_20" java(tm) se runtime environment (build 1.6.0_20-b02) java hotspot(tm) 64-bit server vm (build 16.3-b01, mixed mode) java eclipse osx

numerical - Limitation of Mathematica optimization module -

numerical - Limitation of Mathematica optimization module - i have question regarding mathematica's global optimization capability. came across text related nag toolbox (kind of white paper). now tried solve test case paper. expected mathematica pretty fast in solving it. n=2; fun[x_,y_]:=10 n+(x-2)^2-10cos[2 pi(x-2)]+(y-2)^2-10 cos[2 pi(y-2)]; nminimize[{fun[x,y],-5<= x<= 5&&-5<= y<= 5},{x,y},method->{"randomsearch","searchpoints"->13}]//absolutetiming output was {0.0470026,{0.,{x->2.,y->2.}}} one can see points visited optimization routine. {sol, pts}=reap[nminimize[{fun[x,y],-5<= x<= 5&&-5<= y<= 5},{x,y},method->`{"randomsearch","searchpoints"->13},evaluationmonitor:>sow[{x,y}]]];show[contourplot[fun[x,y],{x,-5.5,5.5},{y,-5.5,5.5},colorfunction->"temperaturemap",contours->function[{min,max},range[min,max,5]],contourlines->true,plotrange-...

java - DecimalFormat decimal places -

java - DecimalFormat decimal places - currently, have bigdecimal values 3 decimal places shown in jtable. when values 2.500 or 1.000, want have 2.5 , 1.0 instead. that's why tried this: bigdecimal value; bigdecimal value3 = new bigdecimal((string)model.getvalueat(e.getlastrow(), 1)).setscale(3, bigdecimal.round_half_up); bigdecimal value2 = new bigdecimal((string)model.getvalueat(e.getlastrow(), 1)).setscale(2, bigdecimal.round_half_up); if(valor3.equals(value2)) { bigdecimal value1 = new bigdecimal((string)model.getvalueat(e.getlastrow(), 1)).setscale(1, bigdecimal.round_half_up); if(value3.equals(value1)) value = valuer1; else value = value2; } else value = value3; but doesn't work. looks '2.500'.equals('2.5')...

What's that "for i, val : list: ..." syntax? -

What's that "for i, val : list: ..." syntax? - i remember that syntax existed in language! for i, val : list {...} {int = 0; val : list {...; i++;}} , language that? this exact syntax unknown (and won't work in language). can offer be java iterators: for(string : new string[]{"one", "two"}) print(i); c foreach macro for_each_item(i, processes) { i->wakeup(); } javascript foreach: for each (var property in obj) { print(property); } syntax

html - Unable to select -

html - Unable to select <TR> - i want utilize css alter property of <tr> contents, give reddish border. doing below code doesnt work on <tr> , works on <td> . did go wrong? css: #leaderboard tr { border: 1px reddish solid; } .leaderboard { border: 1px reddish solid; } html: <table id="leaderboard"> <tr class="leaderboard"><td>hello</td></tr> <tr class="leaderboard"><td>there!</td></tr> </table> imho can't give tr border properties because individual cells have borders (in ie). simple solution give table left , right border , cells top , bottom ones. #leaderboard { border: 1px reddish solid; } #leaderboard td { border-top: 1px reddish solid; border-bottom: 1px reddish solid; } html css

JSON Data Map Issue with HighCharts + Ajax -

JSON Data Map Issue with HighCharts + Ajax - i have follow info returned via json {"rows":[{"date":"07/10/2011","value":1206,"action":"drink"}, {"date":"07/11/2011","value":2288,"action":"pie"}, {"date":"07/12/2011","value":1070,"action":"drink"}, {"date":"07/13/2011","value":1535,"action":"beer"}, {"date":"07/14/2011","value":1721,"action":"drink"}], "page":1,"total":1,"records":5} i trying utilize info highcharts getting bit confused. jquery.ajax({ url: fullpath + 'datamap', datatype: "json", type: 'post', data: "{}", contenttype: "application/json; charset=utf-8", success: function (data) { var lines = data.spli...

Playing card detection using OpenCV - on mobile devices -

Playing card detection using OpenCV - on mobile devices - i played along samples of opencv lib. , want start coding on own. huge possibilities of library lost here. the "setup": assume table playing cards on it. cards arranged in 2 rows, number of cards per row not fix, has number max. size , shape of cards same, pictures on different (however, not complex). code should able observe each card(picture) , row of card. the problem: whats best solution that? haar ? ... etc. don´t know whats fastest approach here according run-time. bonus question: if want stuff on mobile device there faster way ? best regards someone else had similar question. in short: seek opencv surf more details see this answer. opencv detection playing-cards

php - Jquery POST to refresh a div -

php - Jquery POST to refresh a div - i want utilize $.post function of jquery div refresh, if content returned in json info php script modified. know ajax calls $.post never cached. please help me $.post , or $.ajax if not possible $.post or other method possible. thanks why don't cache response of call? var cachedata; $.post({..... success: function(data){ if (data !== cachedata){ //data has changed (or it's first call), save new cache info , update div cachedata = data; $('#yourdiv').html(data); }else{ //do nothing, info hasan't changed this example, should adapt suit needs (and construction of info returned) php jquery ajax json

linux - Android Virtual Device(AVD) problem in Ubuntu 11.04 -

linux - Android Virtual Device(AVD) problem in Ubuntu 11.04 - when seek create new android virtual device(avd) on ubuntu 11.04, error: "error while loading shared libraries: libstdc++.so.6: cannot open shared object file: no such file or directory. yes, library file in right place /usr/lib :\ i ran problem using ubuntu 11.04 x64, error fixed installing lib32stdc++6, ia32-libs, , lib32ncursesw5 android linux ubuntu-11.04 c++-standard-library

Duplicacy Issue In PHP /MYsql -

Duplicacy Issue In PHP /MYsql - i inserting row in mysql table. row getting inserted in table. issues whenever refresh page, new row added in database. how prevent it? this browser's issue. repost info on refresh. prevent happening, you'll have check duplication of info in code each time new record inserted. general practice duplication of info has prevented. in case genuine duplicate info expected , allowed, can redirect user on same registration page after each insertion header("location: {$location}"); . clear post info of browser. php mysql insert refresh

Apache Click Guice integration -

Apache Click Guice integration - is there way of integrating apache click web framework google guice such can utilize @inject inject guice services page/panel classes ? i used guice filter on web.xml , added clickservlet in guice servlet module. did override on newpageinstance() method on click servlet , called injector.injectmembers(page) inject dependencies on newly created page. guice click-framework

php - svn checkout not working via phing -

php - svn checkout not working via phing - i'm trying write internal application able deploy our projects acceptance , production servers single click. using phing accomplish this. at moment i'm having difficulty checking out (or doing svn export) project. utilize next command: <exec command="svn checkout ${svn.host} ${svn.exportdir} --force --username server --password <password>" /> on normal command line works perfectly, prompted take certificate because host uses https. problem there seems no parameter automatically take certificate. the --trust-server-cert doesn't help either, becase certificate rejected due hostname mismatch, parameter bypasses "ca unknown"-error. any ideas on how can check out (or export, update, ...) project? do wget on svn servers https adress , take certificate permanently. $ wget https://svn.mydomain.com/repos and press p take cert. i added hints php documentation problems ...

android - populating a listView with images on the device -

android - populating a listView with images on the device - ok ive spent lastly 2 days looking simple illustration of how utilize images on device populate list view , ive come conclusion there no easy way this. know everytime set bits , pieces 1 elses examples end lots of code dont need. can 1 please show me how load images device list view. there no book, tutorial, or post on here shows how , kind of funny , crazy @ same time. here's rest of code, using sdimageloader linked above here: http://www.samcoles.co.uk/mobile/android-asynchronously-load-image-from-sd-card the listadapter class: public class pblistadapter extends simplecursoradapter { //members: private int mlayoutid; private specimenhunterdatabaseadapter mdbhelper; private final sdimageloader mimageloader = new sdimageloader(); //methods: public pblistadapter(context context, int layout, cursor c) { super(context, layout, c, new string[] {}, new int[] {}); mlayoutid = layout; mdbhel...

A simple IF statement in python -

A simple IF statement in python - i'm having problem getting "else" statement work. my code looks far: roomnumber = (input("enter room number: ")) def find_details(id2find): rb_text = open('roombookings2.txt', 'r') line in rb_text: s = {} (s['date'], s['room'], s['course'], s['stage']) = line.split(",") if id2find == (s['room']): yield(s) rb_text.close() room in find_details(roomnumber): print("date: " + room['date']) print("room: " + room['room']) print("course: " + room['course']) print("stage: " + room['stage']) so when positive search , multiple matches in text file, organised results. however, i'm trying tell me if invalid input info entered , re-ask room number until right info input. i tried using "else" statement...

android: removing listview selector -

android: removing listview selector - i have changed lsitview selector color transparent. when click on list item, color of text changes dark grey.. there anyway handle issue. don't want color changed upon item click .. first problem solution accomplish can create custom listview... suppose listview xml file like... <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <listview android:layout_height="wrap_content" android:id="@android:id/list" android:layout_width="match_parent"></listview> </linearlayout> and custom view xml file... <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_pare...

jquery - removing row with specific data-r -

jquery - removing row with specific data-r - i have simple table: <table id="product-table"> <tr data-r="12"> <td>one</td> <td>two</td> </tr> <tr data-r="34"> <td>three</td> <td>four</td> </tr> </table> and want utilize jquery remove row contains specific data-r data. any ideas? $('#product-table tr').attr('data-r') homecoming data-r value of first selected element. you want search element attribute, can attribute selector [docs]: var value = 12; $('#product-table tr[data-r="' + value + '"]').remove(); jquery has documentation. selectors listed here. jquery row

deployment - Best method to deploy ExtJs Grid in large scale project -

deployment - Best method to deploy ExtJs Grid in large scale project - its been quite sometime, i've been evaluating extjs grid. far , love command , api. have genuine doubts regarding deploying extjs grid in production environment. here goes: how can deploy extjs grid large-scale project? suppose have huge project, contains more 100 grids. in case, how can handle grids? do have maintain seperate javascript file each grid? means, if have 100 grids, need maintain 100 js files? do have maintain wrapper js file, can create 100 grids, per ther arguments pass method? which 1 better? or there improve methods available? can please shed info on deploying extjs grid in large-scale project? any help appreciated. thanks! can explain project? 100 grids or 100 models/datastores? i create database model/source/grid column definitions, , build ext grids dynamically mapping info json. pretty trivial 1 time create beforerender listener has ajax request within it, in suc...

php sql where command to check for containg -

php sql where command to check for containg - i string vaiable using post in php. want append string can utilize in sql query check containing string. want %string% what doing gives me error: $hotelname = '%'+hotelname_old+'%'; it should $hotelname = "%'".$hotelname_old."'%"; php sql

database - formula for mysql performance with number of queries -

database - formula for mysql performance with number of queries - is there formula relates number of queries , impact on response time mysql database? or other simple understanding can know how much our website can hold depends on number of hits. do set profiling=1; run query , do: show profiles; mysql database

asp.net - Get selected index from gridview with jquery -

asp.net - Get selected index from gridview with jquery - all want selected index (or selectedvalue or selecteddatakey) of gridview jquery can utilize jquery ajax load info id parameter. how can jquery? thank you. why want that? here idea. set selectedrowstyle="myselection" . place label in gridview in existing templatefield. (dont create new asp:templatefield because add together new column) <asp:label id="hiddenlabel" runat="server" cssclass="myindex" text='<%# container.displayindex %>' style="display:none;"/> now retrieve selected row index this. var selectedindex = -1; if($(".myselection").length){ selectedindex = $(".myselection .myindex").html() - 0; } update: multiple gridviews? still that. give each gridview separate cssclass. cssclass="grid1" var selectedindex = -1; if($(".grid1 .myselection").len...

jquery - How to implement Google Calendar like event start date/time and end date/time in Rails? -

jquery - How to implement Google Calendar like event start date/time and end date/time in Rails? - i love how google ui setting event start date/time , end date/time in calendar application. what best , straight-forward way implement in rails 3 (3.08 exact application? in particular, love separation of date inputs , dropdown used time element includes both hr , minute. thanks this jquery plugin implements date , time picker inspired 1 google calendar. i have created gem packages jquery plugin: https://github.com/tkrotoff/jquery-timepicker-rails jquery ruby-on-rails-3 datetime calendar

visual c++ - Creating a pure MSIL assembly from a C++/CLI project? -

visual c++ - Creating a pure MSIL assembly from a C++/CLI project? - i trying create pure msil assembly c++/cli project using /clr:pure , /clrimagetype:pure flags, however, output assembly targets x86. am missing might preventing project compiled msil only? you can create anycpu dll c++/cli, in simplest case, not able utilize mfc, atl or crt. however, if want write pure managed .net code in c++/cli, including managed pointers (which /clr:safe not allow), , more elaborate code optimization of c++/cli compiler, read on: for best results, start fresh project managed class library project template. set c++/cli project properties dll class library /clr:pure . on configuration properties page in visual studio 2010. on c/c++ panel, set omit default library name yes /zl for linker, disable incremental linking , link library dependencies on linker's "advanced" page, set target machine not set , clr image type force pure il image /clrimagetype:pure , of t...

ios4 - Failing to add NSDate into NSDictionary -

ios4 - Failing to add NSDate into NSDictionary - i trying addd nsdate nsdictionary.can tell me how add together it? - (void)parser:(nsxmlparser *)parser didstartelement:(nsstring *)elementname namespaceuri:(nsstring *)namespaceuri qualifiedname:(nsstring *)qualifiedname attributes:(nsdictionary *)attributedict { //if(conditioncount ==0){ if( [@"forecast_information" isequaltostring:elementname] ) { //conditiondate = date nsdate *now=[nsdate date]; isparsinginformation=yes; nsarray *array=[nsarray arraywithobject:now]; nslog(@" time %@",array); [forecastconditions addobject:[nsmutabledictionary dictionary]]; } else if([@"forecast_date" isequaltostring:elementname]) { if(!forecast_information) forecast_information=[[nsmutablearray alloc]init]; } else if(isparsinginformation){ ...

WPF Custom fonts problem -

WPF Custom fonts problem - this weird. in blend 4, custom font works when see application in designer, when run it, font gone , goes arial or something. xaml: <textblock text="text g" fontfamily="/projectname;component/fonts/#futura lt bt" fontsize="48" background="#ffc44747" /> the font in folder called "fonts" , command in i'm trying font in folder called "controls". know must problem relative position of "fonts" folder "controls" folder, i've tried lot of stuff , doesn't work. also, xaml markup set there blend creates when select custom font. font copied resource right (i check csprof file , it's there). any ideas? has been kicking butt couple hours now. thanks. everywhere on net , in books says when add together font should set build action "resource" (example here). , 'worked while. anyway, prepare problem, had alter "resource"...

wpf - .Net 4.0 XBAP Application could not be opened -

wpf - .Net 4.0 XBAP Application could not be opened - i have created .net 4.0 xbap application using visual studio 2010 , tried open using ie. got next error message an error occurred in application using. startup uri: http://localhost/xbap4.0/4.0xbap.xbap application identity: http://localhost/xbap4.0/4.0xbap.xbap#4.0xbap.xbap, version=1.0.0.0, culture=neutral, publickeytoken=fe3ebf31744f13d0, processorarchitecture=msil/4.0xbap.exe, version=1.0.0.0, culture=neutral, publickeytoken=fe3ebf31744f13d0, processorarchitecture=msil, type=win32 the security configuration of computer incompatible features used application. more information, see http://support.microsoft.com/kb/954494. contact administrator alter security configuration or apply the available hotfix. presentationhost.exe v4.0.40305.0 built by: main - c:\windows\system32\presentationhost.exe ntdll.dll v5.1.2600.6055 (xpsp_sp3_gdr.101209-1647) - c:...