Posts

Showing posts from 2015

javascript - Bootstrap Popover: iOS Safari strange behaviour -

i looking through twitter bootstrap documentation, , i'm interested in implementing dismissible popover when button clicked. here example bootstrap's docs: http://getbootstrap.com/javascript/#dismiss-on-next-click when press "dismissible popover" button os x safari browser works fine. when access same link above ios safari, button not work. is, popover not dismissed on click. why button not working ios safari? the example linked using data-trigger="focus" attribute. try changing data-trigger="click" . <a tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="click" title="dismissible popover" data-content="and here's amazing content. it's engaging. right?">dismissible popover</a>

ruby - Rails link_to existing route -

i'm trying link action in controller view. when rake routes, see document_version_file_index /document_versions/:document_version_id/file(.:format) file#index i think that's route want hit. controller called document_versions_controller , includes action called download want call. when try <%= link_to linktext, :document_version_file %> i routing error: no route matches {:action=>"show", :controller=>"files"} there no files controller. i'm trying hit document_version controller. doing wrong? edit: how building route: resources :document_versions resources :files member 'download', :action => :download resources :document_version end end edit 2: can step , pretend don't have route in existence already? have view , controller. controller has def download , named document_versions_controller.rb , has class documentversionscontroller < applicationcontroller . how c

xpath - Shorten expression for Python exceptions handling -

i'm using try / except check xpath alternative sources input variables website. it have many times, i'm looking way shorten expression. perhaps context manager can used somehow? in example, checking 2 alternative xpath sources variables issuer , name . try: xpath_issuer = ".//*[@id='dv_pre88f496c28ad6488895f1ffc383fae8bd_list_list']/div/div[3]/table/tbody/tr[2]/td[2]" find_issuer = driver.find_element_by_xpath(xpath_issuer) issuer = re.search(r"(.+)", find_issuer.text).group() except nosuchelementexception: pass try: xpath_issuer = ".//*[@id='dv_pre00e883469a264528b20fbbc31b0da4a2_list_list']/div/div[3]/table/tbody/tr[1]/td[2]/a" find_issuer = driver.find_element_by_xpath(xpath_issuer) issuer = re.search(r"(.+)", find_issuer.text).group() except nosuchelementexception: pass try: xpath_name = ".//*[@id='cols']/div[1]/div[1]/h1" find_name = driver.find_el

android - Can't kill SystemUI with activityManager.killBackgroundProcesses -

first question here , pretty knew android development excuse me. part of app add button can restart systemui, doing following code. @override public void onclick(view v) { activitymanager activitymanager = (activitymanager)getapplicationcontext().getsystemservice(context.activity_service); activitymanager.killbackgroundprocesses("com.android.systemui"); } i have gave application su permission following code public process p; { try { p = runtime.getruntime().exec("su"); } catch (ioexception e) { e.printstacktrace(); } } many in advance. you should have permission kill_background_processes able call method. su doesn't play role here, because using android's framework operation. if use busybox kill process, need su. generally, not idea kill systemui, though.

javascript - Restricting panning to one globe in Google Maps API -

i have map created using google maps api, , i'd restrict panning 1 globe; default can pan continuously east/west, map repeats endlessly. i'm trying use henningj's solution posted this question var allowedbounds = new google.maps.latlngbounds( new google.maps.latlng(85, -180), new google.maps.latlng(-85, 180) ); lastvalidcenter = map.getcenter(); google.maps.event.addlistener(map, "center_changed", function() { if (allowedbounds.contains(map.getcenter())) { lastvalidcenter = map.getcenter(); return; } map.panto(lastvalidcenter); }); what have allows no panning whatsoever, call 'contains' fails. if log map.getcenter() looks sensible enough, think(?!): object { a: 54.683366, f: 25.31663500000002 } can see i'm doing wrong? you have allowedbounds defined incorrectly. should (from the documentation ): latlngbounds(sw?:latlng, ne?:latlng) constructs rectangle points @ south-west , north-east

javascript - jquery form validation not working after rule added -

i have added rule control. still error not showing after form validation. after click have validate input box , check empty string. if empty string show error otherwise call ajax method. error never showing. edit: @sparky suggested. updating post. loading input box , anchor tag after dom loaded. added validation rule companyname control. , checking validation in <a> click , false. still error text not showing. html <form action="/address/addaddress" id="frmaddress" method="post" name="frmaddress" novalidate="novalidate"> <div id="addeditaddressplaceholder> <input name="companyname" class="spe-formcontrol" id="companyname" type="text" value=""> <a href="#" class="btn btn-success" onclick="javascript: submitcompanyfind();">find company</a> javascript $.ajax({

ruby - How to specify multiple column by xpath -

i want multiple table data html this: html = <<eof <table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> </table> eof i want 2 data like: noko = nokogiri::html(html) noko.xpath("//tr[1]/td[2]").text #=> "2" noko.xpath("//tr[1]/td[3]").text #=> "3" what expect code "23", return "123". how can "23" using xpath? noko.xpath("//tr[1]/td[2 , 3]").text there multiple ways of solving problem. 1 : require 'nokogiri' html = <<eof <table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> </table> eof noko = nokog

c# - WPF Binding One TextBox to two Properties -

perhaps simple question, but... so, have bound text box property in viewmodel: <textbox x:name="ololo" text="{binding vm.ololotext, mode=twoway, updatesourcetrigger=propertychanged}"> and there textblock near , change text property value due trigger logic have implemented beforehand: <style targettype="textblock"> <style.triggers> <datatrigger binding="{binding elementname=typegallery, path=selectedvalue}" value="firsttype"> <setter property="text" value="aaa" /> </datatrigger> <datatrigger binding="{binding elementname=typegallery, path=selectedvalue}" value="second type"> <setter property="text" value="bbb" /> </datatrigger> ... so, textblock has values aaa or bbb . wo

pbs - default queue for interactive job with torque -

as torque administrator, how can force interactive jobs part of given queue (let 'interactive_queue') while keeping default queue non-interactive jobs. in other words, i'd command: qsub -i to equivalent (by default) to: qsub -i -q interactive_queue while keeping set server default_queue = another_queue you have set queue options correctly: qmgr -c "set queue another_queue disallowed_types = interactive" qmgr -c "set queue interactive_queue disallowed_types = batch"

symfony - Can I make a rule in security.yml that redirect me from login form to defined URI/patch only if I came from other defined URI/patch? -

can make rule in security.yml redirect me login form defined uri/patch if came other defined uri/patch ? "if come login form uri/path named x after authorization redirected uri/path named y " in standard symfony edition, can not configure feature, can create custom success handler ( symfony\component\security\http\authentication\authenticationsuccesshandlerinterface ) called after complete authorization via form or adapter , inject handler configuration ( firewalls.form_login.success_handler ). in own handler can return redirectresponse redirect user page.

Index of the community from iGraph community algorithms -

does index of community of igraph community algorithms have meaning? e.g., if use fc <- fastgreedy.community(g) , communities 1,2,3: community 1 mean strongest community because merged first in algorithm or labels? there no ordering; community ids igraph uses arbitrary numbers.

mysql - SQL > Select multiple rows for single result -

Image
i have above table, need is, example based off image, have single row returned show: ticket id | created | assigned | time difference 2 | 2015-05-31 09:18:44 | 2015-06-03 10:05:00 | $math_result this image shows 1 example i'd have return each ticket has both 'assigned' time , 'created' time. i'm not dba , bit beyond limited knowledge. can me on how can accomplish this? you can use join find row state "assigned" row in state "created": select c.ticket_id , c.timestamp , a.timestamp , datediff(a.timestamp, c.timestamp) ticket c join ticket on c.ticket_id = a.ticket_id c.state = 'created' , a.state = 'assigned'

Java Collection Sort: Issue while sorting list -

this question has been asked many times understood should return 0 1 , -1 still getting exception java.lang.illegalargumentexception: comparison method violates general contract! @ java.util.timsort.mergehi(timsort.java:895) @ java.util.timsort.mergeat(timsort.java:512) @ java.util.timsort.mergeforcecollapse(timsort.java:453) @ java.util.timsort.sort(timsort.java:250) @ java.util.arrays.sort(arrays.java:1512) @ java.util.arraylist.sort(arraylist.java:1454) @ java.util.collections.sort(collections.java:175) code snippet collections.sort(list, new comparator < employee > () { public int compare(employee emp1, employee emp2) { int compareval = 0; int returnval = 0; try { if (emp1 == emp2) { returnval = 0; } else { if (empname.equalsignorecase(constant.emp_id)) { if (emp1.getempcode() != null &&

java - Get plots from CombinedDomainXYPlot (and remove them) -

is there way plot list added combineddomainxyplot if don't keep references them? i'd there plots, work them , possibly remove them compined plot. this example code adding plots combineddomainxyplot: // axis dateaxis domainaxis = new dateaxis("date"); // plot container combineddomainxyplot plotcombined = new combineddomainxyplot(domainaxis); // plot 1 xyplot plot1 = new xyplot(); plot1.setdomainaxis(domainaxis); plotcombined.add(plot1); // plot 2 xyplot plot2 = new xyplot(); plot2.setdomainaxis(domainaxis); plotcombined.add(plot2); update 1: i've tried code doesn't return plots. it's not reliable. for (object sp : plotcombined.getsubplots()) { plotcombined.remove((xyplot)sp); } it method of removing plots correct? full example code: import javax.swing.jframe; import org.jfree.chart.axis.dateaxis; import org.jfree.chart.plot.combineddomainxyplot; import org.jfree.chart.plot.xyplot; public class sample27 extends jframe { p

python - Embed Python2 and Python3 interpreters, choose which one to use at runtime -

is there way embed both python2 , python3 interpreter c program , running either 1 or other decision occurring @ runtime? here's example attempt: makefile: all: main main: main.c librun_in_py2.so librun_in_py3.so g++ main.c -lrun_in_py2 -lrun_in_py3 -l. -wl,-rpath -wl,$$origin -o main librun_in_py2.so: run_in_py2.c g++ $$(python2.7-config --cflags --ldflags) -shared -fpic $< -o $@ librun_in_py3.so: run_in_py3.c g++ $$(python3.4-config --cflags --ldflags) -shared -fpic $< -o $@ clean: @-rm main *.so main.c void run_in_py2(const char* const str); void run_in_py3(const char* const str); static const char str2[] = "from time import time,ctime\n" "import sys\n" "print sys.version_info\n" "print 'today is',ctime(time())\n"; static const char str3[] = "from time import time,ctime\n"

sql server - join table and where column similar to other column, while changing column value SQL -

i have issue code. sql issue. i need combine 2 tables. @ present have code: select calldate,clid, '44'+dst [numberdialed],dstchannel,billsec,disposition,accountcode,uniqueid,cnam, callrateimport.description, callrateimport.code, callrateimport.day calllogimport left join callrateimport on calllogimport.dst callrateimport.code + '%' callrateimport.code(select code callrateimport calllogimport.dst code + '%' , len(code) = (select max(len(code)) callrateimport calllogimport.dst callrateimport.code + '%') ) this combining fine. need match altered result depending on original result is. i have code: if substring (dst,1,2)=00 begin end wrapping current code. sql throwing errors - incorrect syntax. have else if block of 3 components. to modify values based on current value, should @ case statements. for example: use adventureworks2012; go select productnumber, category = case productline when 'r' 'r

apache - Passenger doesn't seem to know the VirtualHost is a rails app -

i've configured apache 2.2 virtualhost ruby on rails (2.3.14) application. however, when visit url website i'm presented directory listing. i've checked passenger (5.0.9) loaded apache (it is) , i've got loglevel set 4 can see passenger doing. starts , indicates listening requests. however, appear passenger not being invoked when website visited. how passenger know needs handle virtualhost? thanks solution: the rails application did not have config.ru file. after pinching 1 off web rails 2.3 application appears instead of directory listing. it appears passenger documentation this file used rack fire instances of application.

windows installer - Is it possible to get GUID of application from InstallShiel 2009 install package without installing application? -

i have file, setup.exe contains application's single file installer created installshield 2009. there way extract application's guid without actual installing of application? extract setup first using setup.exe /a . answer dialogs appropriately, need set extract location. check answer more details on extracting setup.exe : extract msi exe when extract done, locate , open msi file , check upgrade code , product code s in property table . need installshield , orca or other tool capable of opening msi file. the package code can find right clicking msi file , selecting properties. some links: setup.exe pdf reference sheet setup.exe , update.exe command-line parameters uninstalling msi file command line without using msiexec how can find product guid of installed msi setup?

oracle11g - Oracle managed driver ODP.NET with NHibernate 4.0 FLOAT (126) to C# DECIMAL/Double -

i trying create mapping using fluent nhibernate oracle 11g. mapping creating:- public class abc : classmap<abc> { public abc() { table("abc"); dynamicupdate(); id(x => x.id, "idcolumn").generatedby.guidcomb(); map(x => x.decimalcolumn, "decimalcolumn").formula("trunc(decimalcolumn, 28)"); } } now when data using criteria query:- var criteria = session.queryover<abc>().where(x => x.id == id); criteria.future(); it throws nhibernate.exceptions.genericadoexception innerexception (invalidcastexception) columns decimal points more 28 requires truncation. but if remove column mapping such (note column name string missing decimalcolumn), works. public class abc : classmap<abc> { public abc() { table("abc"); dynamicupdate(); id(x => x.id, "idcolumn").generatedby.guidcomb(); m

jquery - Disabled options of one chosen dropdown which is selected in another chosen dropdown -

example fiddle description: i have 2 multiselect dropdowns (with chosen plugin ) loaded. i have add mitigator link add dropdown. currently, if select option a dropdown 1 , option a gets disabled dropdown 2 . requirement: but on loadtime(loading before) if option a selected in dropdown 1 option a not disabled in dropdown 2 . once select dropdown, gets disabled. i want selected options of 1 dropdown disabled other dropdowns loading time

Can a date and time be specified when sending data to Azure event hub? -

here's scenario. i'm not working real-time data. instead, data electric company past day's electric usage. specifically, each day can # of kwhs each hour on clock on past day. so, i'd load past information event hub each following day. doable? event hub support loading past information, or , forever realtime streaming data, no ability load past data in? i'm afraid case, i've not seen date specification in limited api documentation find it. i'd confirm, though... thanks, john an azure event hub meant short-term storage. default may retain data 7 days. after data deleted based upon append timestamp created when message first entered event hub. therefore not practical use azure event hub data that's older 7 days. an azure event hub meant message/event management, not long term storage. possible solution write event hub data azure sql server or blob storage long term storage. use azure stream analytics (an event processor) join act

list - Pick out certain lines from files -

i writing tcl script reads file , displays lines file. can read file n problem cant figure out how pick out lines before filtering out don't need. reading file list , using following code filter out; proc listfromfile {/.../.../.../file_test.file} { set f [open /.../.../.../file_test.file r] set data [split [string trim [read $f]]] close $f return $data } set f [listfromfile /.../.../.../file_test.file] set f [lsort -unique $f] set f [lsearch -all -inline $f "test_*" the lines within file like $(eval $(call createuvmtest, other, test_runtest1 ... $(eval $(call createuvmtest, keyword, test_runtest2 ... $(eval $(call createuvmtest, keyword, test_runtest3 ... $(eval $(call createuvmtest, other, test_runtest4 ... how pick out lines containing keyword whole before filter out else don't need? lines containing keyword randomly within file along other tests. possibility @ all? it shouldn't hard. begin with, want split file's contents @ line breaks

javascript - Tab Bar Content Box Overhangs Bottom of Page -

the code below tab box i've created. i'm having issue content in tab box hanging on bottom of page. believe fix added in .tab-content div, can't think of besides margin isn't working. there easy fix this? javascript: <script> $(document).ready(function(){ var activetabindex = -1; var tabnames = ["tab1","tab2","tab3"]; $(".tab-menu > li").click(function(e){ for(var i=0;i<tabnames.length;i++) { if(e.target.id == tabnames[i]) { activetabindex = i; } else { $("#"+tabnames[i]).removeclass("active"); $("#"+tabnames[i]+"-tab").css("display", "none"); } } $("#"+tabnames[activetabindex]+"-tab").fadein(); $("#"+tabnames[activetabindex]).addclass("active"); return false; }); }); </script> css: <style> body{ backgro

ruby on rails - How to use the new ActiveSupport::Testing::TimeHelpers inside controller -

edit make more clear like title tells how use awesome activesupport::testing::timehelpers#travel_to method inside controller. in tests, want achieve this: somethingconroller < applicationcontroller def index travel_to some_date # stuff depends on current_date end end end tried include module: include activesupport::testing::timehelpers but got: uninitialized constant activesupport::testing hoping date traveled applied view , view_helpers , controller_action if must, add require 'active_support/testing/time_helpers' @ top of file. although i've no idea you're doing code. try instead: somethingconroller < applicationcontroller def index @instance = somemodel.find_by_date(12.days.ago) end end

unit testing - How to run SAPUI5 Fiori application with mock data -

i have fiori application in local pc , see has model folder bunch of json files mock data. run app in browser mock data cannot find documentation on how this. know parameter sapui5 expecting read data locally instead of odata server? i not using sap web ide, (which know has option "run mock data") said behind scenes. thank much. best regards, with sap web ide, mockserver (which injected when select option "run mock data") automatically started. can manually inside application, recommend able run automated tests application running in mock mode. you can check brandnew sapui5 walkthrough (step 27) more details on how start mockserver inside application: https://github.com/sap/openui5/tree/master/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27 the documentation walkthrough released openui5 release 1.30 copied relevant parts here, hope helps! michael documentation start page (testservice.html): "we modify our copy of index.html file , a

javascript - jqgrid change values of editable cell on change of another cell (dependent columns) -

Image
this grid. my discount column has autocomplete has values coming json variable. this json array data discount coming from. [ {"id":0.56,"label":"adams rite less 50\/12","value":"adams rite less 50\/12"}, {"id":0.44,"label":"assa less 44","value":"assa less 44"}, {"id":0.603,"label":"baron accessories , sticks less 60.3","value":"baron accessories , sticks less 60.3"}, {"id":0.704,"label":"baron std , custom doors less 70.4","value":"baron std , custom doors less 70.4"}, {"id":0.617,"label":"baron std , custom frames less 61.7","value":"baron std , custom frames less 61.7"}, {"id":0.704,"label":"baron std pallet doors less 70.4","value":"baron std pallet doors less 70.4"

python 3.x - Defining django models in an alphabetic order -

can define django models in alphabetic order? models taken django tutorial : from django.db import models class question(models.model): question_text = models.charfield(max_length=200) pub_date = models.datetimefield('date published') class choice(models.model): question = models.foreignkey(question) choice_text = models.charfield(max_length=200) votes = models.integerfield(default=0) i'd choice defined before question . after simple reordering class choice(models.models): question = models.foreignkey(question) question = models.foreignkey(question) choice_text = models.charfield(max_length=200) votes = models.integerfield(default=0) class question(models.models): question_text = models.charfield(max_length=200) pub_date = models.datetimefield('date published') fails, because need question before telling interpreter is. adding simple empty class choise(models.model): pass class question(models.mod

Specify multiple glue packages in Eclipse Cucumber Feature Runner -

i trying run cucumber feature files using cucumber plugin eclipse. when setup run configuration, specify glue path package containing step defs follows which works: classpath:com.company.path.to.stepdef however, have feature files need access step def classes in different packages (in different jars). have tried various permutations specify multiple packages in glue field, ever finds stepdefs in first package.

vb.net - serialization in c# calling methods -

this code book "network programming in .net using c# , vb.net" what dont understand how _issuancedate,_deliverydate,_invoicedate,_paymentdate being set. in code there no explicit setting of value , yet xml file contains dates of all, , how purchaseorder class methods getting called ? using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using system.runtime.serialization.formatters.soap; using system.runtime.serialization.formatters.binary; using system.io; namespace serialization { public partial class form1 : form { public form1() { initializecomponent(); } private void form1_load(object sender, eventargs e) { } private void button1_click(object sender, eventargs e) { company vendor = new company(); company buy

jquery - Disabling a textbox if it has value and ignored this disabled value in addition and subtraction in javascript -

i want add id= lr1, lr2 & lr3 total show in id=tlrr , subtract id=totalamt. html code. <tr> <td width="125"><b>receiving quarantine </b></td> <td> <input type="textbox" name="rcv_quantity" class="tqty" id="totalamt" value="<?php echo $row->rcv_quantity; ?>" /> </td> </tr> <tr> <td width="125"><b>lot released-1 </b></td> <td> <input type="textbox" name="lot_rel1" id="lr1" class="lr" value="<?php echo $row->lot_rel1; ?>" /> </td> </tr> <tr> <td width="125"><b>lot released-2 </b></td> <td> <input type="textbox" name="lot_rel2" id="lr2" class="lr" value="<?ph

oracle11g - How to update an table in oracle db using oledbconnection from asp.net c# code -

i trying update table in oracle 11g database c# code using oledbconnection. query formation ok , hangs @ execute. no error or exception thrown. endless loop. select , insert query working fine update fails. i found issue. if db connected multiple tools sqldeveloper, sqlplus. db lockedwith respect first session. rest of connection has no permission perform crud i have connected db in sql developer tool. on other hand have tried perform crud project via code. since db connected sql developer prior project db locked perform crud operation. once session on sql developer closed able perform crud operations code.

java - CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 - Database Android -

i've experienced error in program. i'm trying make quiz app using radiobutton. question , answer option obtained database. this part of code: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); /* intent parameter */ /* open database file */ db_helper.opendatabase(); db = db_helper.getreadabledatabase(); this.requestwindowfeature(window.feature_no_title); this.setcontentview(r.layout.activity_exercise_question); qcontent = (textview) findviewbyid(r.id.txtquestion); qnum = (textview) findviewbyid(r.id.txtnumb); = (radiobutton) findviewbyid(r.id.rba); b = (radiobutton) findviewbyid(r.id.rbb); c = (radiobutton) findviewbyid(r.id.rbc); d = (radiobutton) findviewbyid(r.id.rbd); g = (radiogroup) findviewbyid(r.id.rgoption); next = (button) findviewbyid(r.id.btnnextquestion); next.setbackgroundcolor(color.green); //to handle event when button next clicked next.seton

Powershell populate array from list of files -

i need populate powershell array filenames of files stored in directory based on names. need different array each set of files (see example folder structure) used part of process. i automatic , create arrays on fly, have arrays containing filenames starting processor123 , processorabc , processorxyz . names of these arrays can stored in array named $arrynames . needs dynamic in case new processor introduced, not want rely on users enter file names. example folder structure; c:\directory\processor123\processor123.log.20150604 c:\directory\processor123\processor123.log.20150603 c:\directory\processor123\processor123.log.20150602 c:\directory\processor123\processor123.log.20150601 c:\directory\processor123\processor123.log.20150531 c:\directory\processorabc.log.20150604 c:\directory\processorabc.log.20150603 c:\directory\processorabc.log.20150602 c:\directory\processorabc.log.20150601 c:\directory\processorabc.log.20150531 c:\directory\processorxyz.log.20150604 c:\directory\pr

java - Maven build failure -

i'm trying build maven application, error message: [error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project helloworld: compilation failure [error] d:...\spark-test\java-getting-started\src\main\java\main.java:[73,35] error: lambda expressions not supported in -source 1.5 it's heroku example java project, , in system.properties file java version set: java.runtime.version=1.8 the specific lines these: get("/login", (request, response) -> { system.out.println("request: " + request); return "hello world spark"; }); i don't understand problem, or set source java 1.5 try adding pom.xml: <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</ta

c# - SetProperties SP not accepting image data type -

trying use asp.net stored procedure dbo.aspnet_profile_setproperties create record in aspnet_profile. if create query in server management studio: declare @todaydate datetime set @todaydate = getdate() exec aspnet_profile_setproperties 'geoappbuilder' , 'changepassword111', 'true', '', 'ydwxytog@tryalert.com', 0, @todaydate this adds record aspnet_profile table. however want create record project in visual studio. flagging error when try pass in @propertyvaluesbinary image, in query can use empty string '', not work in vs. tried passing in null, 11111111, (for binary) looked @ other stored procedures store images, dont have image data type use max binary. i dont need ever use column again need populated in order create record. how can enter in dummy data data type image accent? please adivse also tried creating var image = new image , passing in passing in control. populated , passed sp. stil not joy

android - How to zoom ViewGroup? -

i need create view user can scale. list of components show in view pager. can t scaling in activity. that s why created custom view extends relativelayout. public class jsonrelativelayout extends relativelayout { private scalegesturedetector mscaledetector; private float mscalefactor = 1.f; public jsonrelativelayout(context context) { super(context); mscaledetector = new scalegesturedetector(context, new scalelistener()); } public jsonrelativelayout(context context, attributeset attrs) { super(context, attrs); mscaledetector = new scalegesturedetector(context, new scalelistener()); } public jsonrelativelayout(context context, attributeset attrs, int defstyleattr) { super(context, attrs, defstyleattr); mscaledetector = new scalegesturedetector(context, new scalelistener()); } @override public boolean ontouchevent(motionevent event) { mscaledetector.ontouchevent(event); return true; } @override public void ondraw(canvas canvas) { super.o

apache pig - Concatenate fields from different relations -

there 2 relations r1: {f1: chararray, f2: chararray} r2: {f3: chararray, f4: chararray} there no unique key in either of relations, number of tuples same. is there way concatenate corresponding fields of relations output f2, f4 ? if tuples in right order, can use rank. r1a = rank r1 * dense; r2a = rank r2 * dense; r1r2 = join r1a $0, r2a $0;

ios - How to make ActiveViewController-enabled app? -

Image
how make activeviewcontroller-enabled app? i mean when user open activeviewcontroller in safari, want app 1 of participants. , message safari, link. you need set mime type in info.plist, document want open in app. example image, video or word document.

qt - CSS to access QHeaderView item columns to set bacround-image, or set large icon to QHeaderView -

i need css access columns of qheaderview set backround image first column can access via: qheaderview::section:horizontal:first{ background-image: url(:/icons/icon_1.png); background-position:left; background-repeat:no-repeat; border: 1px solid #4b4b4b; } to last column can access via: qheaderview::section:horizontal:last{ background-image: url(:/icons/icon_5.png); background-position:left; background-repeat:no-repeat; border: 1px solid #4b4b4b; } any idea how can second third... etc columns? set background image or set large icon qheaderview all wanted set large icons qheaderview css can access first , last item, found solution change size of qheaderview items icons via qproxystyle class , share solution here: all need to inherit qproxystyle class own class override drawcontrol method , setstyle treeview headerstyle* style= new headerstyle(); treevew->header()->setstyle(style); you can use model->horizont

c# - Custom NextMonth CallenderControll button bug -

so need make custom next/prev button , got work jsut has litle problem displaying right number in label reason shows day before 1 callender showing if december display 11th in label think postback cant figure out after hours of frustration im gonna try , ask here have far source code backend private int month; private int year; private datetime date; void dayrender(object source, dayrendereventargs e) { // change background color of days in month // yellow. if (!e.day.isothermonth && !e.day.isweekend) e.cell.backcolor = system.drawing.color.yellow; // add custom text cell in calendar control. if (e.day.date.day == 18) e.cell.controls.add(new literalcontrol("<br />holiday")); } protected void page_load(object sender, eventargs e) { if (!ispostback) { date = datetime.now; calendrier.visibledate = date; month = date.month; session["month"] = month; year = date.y