Posts

javascript - Different browser's behaving in different way for same script -

i facing strange behavior of different browser.i have fallowing condition in javascript working fine in mozilla , chrome not in ie. if(svalue.indexof('<br>')!=-1){ // } when changed code in fallowing way , it's working fine in ie not in mozilla , chrome. if(svalue.indexof('<br>')!=-1){ // } anybody knows why it's happening this?. in advance!!!! i hazard guess getting browser serialize dom html value svalue . html case insensitive, browsers free use whatever case tag names. the solution string.tolowercase()

performance - Implementing registers in a C virtual machine -

i've written virtual machine in c hobby project. virtual machine executes code that's similar intel syntax x86 assembly. problem registers virtual machine uses registers in name. in vm code, registers used x86 registers, machine stores them in system memory. there no performance improvements using registers on system memory in vm code. (i thought locality alone increase performance somewhat, in practice, nothing has changed.) when interpreting program, virtual machine stores arguments instructions pointers. allows virtual instruction take memory address, constant value, virtual register, or argument. since hardware registers don't have addresses, can't think of way store vm registers in hardware registers. using register keyword on virtual register type doesn't work, because have pointer virtual register use argument. there way make these virtual registers perform more native counterparts? i'm comfortable delving assembly if necessary. i'm aware ji...

devexpress - How to change the hierarchy display style of a XtraTreeView? -

i have xtratreeview control i've upgraded 9.2 10.2. hierarchy used displayed in 'classic way' - ie. + expand, - collapse, in picture: http://documentation.devexpress.com/helpresource.ashx?help=windowsforms&document=img1103.jpg however, in 10.2, they've changed + has been replaced > (like play button on remote) expand , v collapse. way revert it? you should change treelist's lookandfeel property resolve problem. example: lookandfeel.usedefaultlookandfeel = false; lookandfeel.skinname = "caramel";

objective c - Incompatible Object Model Version -

can explain what's going on here? have file saved new version of application - yet if close application , double click document file, gives me error: the document “main” not opened. managed object model version used open persistent store incompatible 1 used create persistent store. now, have checked google , appears common, however, tried advise of deleting files in application support folder (it's folder doesn't exist reason) , cleaned targets xcode (build > clean targets) no luck. weirdest part is, when accept error , take @ application loaded, it's old version. can find mystery version of application , how fix it??! just who's having issues - having issues installing application correctly (when testing app store submission), , when looking @ installer logs, showed app in weird locations on computer. delete , reinstall (or don't, if debugging xcode) , problem solved.

c# - Creating a popup position indicator on WPF Slider control -

i styling wpf slider controls in application, , want them behave when user dragging 'thumb', popup appears above thumb (and follows thumb dragged), , popup displays live update of new slider value. how can in xaml no c#? thanks you can style thumb display popup when dragged start it's not finished horizontaloffset not bound ( sample how that ): <style x:key="horizontalsliderthumbstyle" targettype="{x:type thumb}"> <setter property="focusable" value="false"/> <setter property="overridesdefaultstyle" value="true"/> <setter property="height" value="22"/> <setter property="width" value="11"/> <setter property="foreground" value="gray"/> <setter property="template"> <setter.value> <controltemplate targettype...

c# 4.0 - Does google maps API provide elevation details for buildings? -

i final year computer science undergraduate student india. want create wpf application displays 3d buildings in latest google maps 5 android. basis of final year project. have questions before start working on this. should make desktop or web based, or should use web store metadata , render data in desktop software? for 3d display of buildings in map area, wpf enough or need knowledge of xna , direct x too? will violate google maps tos if use google maps api? (i want google maps not provide in india) using bing maps better option? is feasible read building elevations , rendering them using above mentioned maps apis? elevation data available through google maps api terrain , not individual buildings? i have 3 months complete project , have given details of technologies intend work with. will need in-depth knowledge of more technologies this? excuse me if missed detail. posting cellphone using opera mobile. it's time have android client stackoverflow. 1) ent...

ruby - Route Handlers Inside a Class -

i have sinatra app setup of logic performed inside of various classes, , post / get routes instantiate classes , call methods. i'm thinking whether putting post / get route handlers inside of classes better structure. in case, i'd know if possible. instance: class example def say_hello "hello" end '/hello' @message = say_hello end end without modification above, sinatra there no method say_hello on sinatraapplication object. you need inherit sinatra::base : require "sinatra/base" class example < sinatra::base def say_hello "hello" end "/hello" say_hello end end you can run app example.run! . if need more separation between parts of application, make sinatra app. put shared functionality in model classes , helpers, , run apps rack. module hellohelpers def say_hello "hello" end end class hello < sinatra::base helpers hellohelpers ...