Posts

iphone - Remove feature in submitted App -

i have app on app store features a , b , c , d i looking make features c , d paid using in-app purchasing in future until programmed/implemented; restrict or remove (visible) access features. note had setup c or d maintain access them. is ok remove features in submitted application? i try use applicaion's version purpose. three steps follow: detect app's first launch link first time app launch and @ moment save version number link app's version number once intend display feature nsstring *currentversion = @"1.2.0"; nsstring *versionatappdownload = @"1.1.5"; if ([currentversion compare:versionatappdownload options:nsnumericsearch] == nsordereddescending) { //decide } this should added in next app version. once done, downloaded app should have saved current app version. now update next bigger version i.e. 1.2.0 , version 1 hides content users have not yet paid. users downloaded app @ previous version should able stil...

sql server - check the presence of a value of a column in another table sql -

i'm new in sql server. i've copy values of column table table b respect column(join) before copying have check whether value exists in table c. if yes copy, otherwise return records values not in table c. query is; if exists (select branch_id adm_branch inner join ubl$ on adm_branch.branch_code = ubl$.[branch code ] adm_branch.branch_code = [ubl$].[branch code] ) update emp_personal set account_number = ubl$.[account ] , bank_id = 1 , branch_id = (select branch_id adm_branch join ubl$ on adm_branch.branch_code = ubl$.[branch code ] emp_personal.emp_id = ubl$.[employee id ]) emp_personal join ubl$ on emp_personal.emp_id = ubl$.[employee id ] else ( select ubl$.[employee id ],ubl$.[name ],ubl$.[account ],ubl$.[branch code ] ubl$) except ( select ubl$.[employee id ],ubl$.[name ],ubl$.[account ],ubl$.[branch code ] ubl$ right join adm_branch on adm_branch.branch_code = ubl$.[branch code ]) i think following code gi...

serializing java object to json with auto generated names -

i want create json file out of java objects similar structure: {"users" : {"1" : { "ids" : [1,2,3], "names" : ["anton","berta","charlie"] }, {"2" : { "ids" : [4,5,6], "names" : ["dora","emil","friedrich"] }, ...and on. my problem don´t know how generate numbers of second hierarchy. in of tutorials found hierarchy names generated class names or annotations can´t use way create requested names. is there way without writing huge method generate json stirng "by hand"? greetz the code required create each json entry not much: public static string tojson(int i, list<user> users) { stringbuilder sb = new stringbuilder("{\"").append(i).append("\" : { \"ids\" : ["); (user user : users) sb.append(user.getid()).append(","); sb.setcharat(sb....

fedora - Chkconfig conflict during RPM installation -

i work .rpm. have made rpm glassfish my template file summary: glassfish name: redsky-glassfish version: @version@ release: @release@ license: proprietary group: applications/system buildroot: %{_topdir}/%{name}-%{version}-root buildarch: x86_64 requires: jdk conflicts: java-1.7.0-openjdk %description %preun %install rm -fr ${rpm_build_root} mkdir ${rpm_build_root} cp -r ${rpm_build_dir}/* ${rpm_build_root} %post %postun #0 = uninstall, 1 = upgrade if [ "$1" == "0" ]; rm -fr /opt/glassfish/ fi %files /* during installation throws error file /etc/init.d install of glassfish-development-1095.x86_64 conflicts file package chkconfig-1.3.49.3-2.el6.x86_64 your %files section needs list files in it. don't own /etc/init.d , chkconfig does.

gnuplot - how to obtain contour lines with the same level color of the 3d plot -

Image
i have 3-dimensional plot obtained gnuplot, calculate contour lines as: set pm3d @ s set palette rgbformulae 33,13,10 set contour unset clabel set cntrparam levels incremental 1,1,5 sp "dati.dat" u 1:2:3 w l ls 7 notitle i'd plot contour lines same colour specified in corresponding level in 3d plot. didn't find helpful post. possible in way? you have include palette command in sp command: set pm3d @ s set palette rgbformulae 33,13,10 set contour unset clabel set cntrparam levels incremental -100,10,100 sp x*y w l ls 7 palette notitle the palette option apply definition line 2 contour-lines, , plot: note : contour levels changed -100,10,100 accomodate function x*y chose plot due lack of suitable input file. if want keep black grid on surface, suggest using multiplot , plotting grid on top of surface. updated code: set pm3d @ s set palette rgbformulae 33,13,10 set contour unset clabel set cntr...

r - Nice way to generate grid of points for use in 3d plots -

Image
every want use r plot 3d graph, e.g. below. x=seq(-3,3,0.05) y=c(); for(i in x) { y=c(y,rep(i,length(x))) } x=rep(x,length(x)) z=pmin(x,y) library(lattice) wireframe(z~x*y, shade=true, scales=list(arrows=false)) this generates plot fine but there more natural / efficient way of generating x , y vectors? want "product" operator gives me possible pairs. here's easy way to using expand.grid , outer : library(lattice) x <- seq(-3,3,by=0.05) y <- seq(-3,3,by=0.05) grid <- expand.grid(x=x, y=y) dim(grid) [1] 14641 2 grid$z = with(grid, pmin(x,y)) wireframe(z ~ x*y, data=grid, shade=true, main="x=y", scales=list(arrows=false)) contourplot(z ~ x*y, data=grid, cuts=10, aspect = "iso")

Copy a shape from a PowerPoint Master slide layout to the cu -

in powerpoint 2010: i create macro copy shape created on one of layout slides of master slide , , paste active slide - slide i'm on when i'm running macro. (i need utilize on slide- clone it, etc.) how that? thanks, you haven't mentioned how you'd identify shape copied, if know in advance it'll be, example, sixth shape on second custom layout of first master in presentation , want copy/paste onto slide 3: sub thing() dim osh shape ' copies sixth shape on second layout of first master ' change needed set osh = activepresentation.designs(1).slidemaster.customlayouts(2).shapes(6) osh.copy set osh = activepresentation.slides(3).shapes.paste(1) osh ' formatting/sizing/etc. here end end sub