Posts

Showing posts from September, 2014

asp.net - IIS Timeout, pooled connections were in use and max pool size was reached -

timeout expired. timeout period elapsed prior obtaining connection pool. may have occurred because pooled connections in use , max pool size reached. on iis deployed site, error occur above, while performing database modification on submit button of asp.net web-form on server. i pasted my solution file project , run code ,but no error occur, i have test pooling on iis connection string deployed site, same error occur. suggestion appreciated.

Common C++ code for iOS and Android - HelloWorld example? -

i have been trying develop simple "helloworld" app ios , android mobile platforms. have common c++ code (say "helloworld" string of now). have goggled lot , read many articles/forums writing common c++ code both ios , android platforms, did not find simple example demonstrates using common c++ code , using common c++ code developing ios & android app. can point me towards ? or share sample addresses above use-case? lot.

android - handler, I want to run periodically -

using handler wants run periodically count 0, if countis 1, else please fix code. mrunnable = new runnable(){ @override public void run() { if(count == 0){ setimage(); count = 1; } else{ weather = mcontentresolver.gettype(muri); setweather(weather); count = 0; } } }; mhandler = new handler(); mhandler.postdelayed(mrunnable, 3000); try below m_handler = new handler(); mrunnable = new runnable(){ @override public void run() { if(count == 0){ // count = 1; } else if (count==1){ // count = 0; } m_handler.postdelayed(mrunnable, 3000);// move inside run method } }; mrunnable.run(); // missing also check this android thread timer

java - myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld -

i'm using myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld in jsp jsf 1.1 version. want migrate jsf 1.1 jsf 2.0. , im using jsps frontend in application. when replace jsp in jsf2.0 im getting canot find tag library exception myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld tag. kindly, me. replaced other taglib or there other taglib in jsf2.0? jsf 2.0 supports xhtml page declaration language. use instead <?xml version="1.0" encoding="iso-8859-1" ?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">

javascript - In alert it is showing the data but not in home screen -

i using phonegap sqlite, , facing problem data not displaying. alert(scripts) showing data there, not showing on home screen. me figure out mistake have done in code. thanks in advance. in jquery: function get_emp_list() { $("#employee").empty(); $(location).attr('href', '#emp1'); $.support.cors = true; $.ajax({ type: "get", url: "one.html", contenttype: "text/xml", datatype: "xml", data: "", crossdomain:true, success: function (data) { $(data).find("employee").each(function () { var emp_id = $(this).find('id').text(); var emp_name = $(this).find('short_name').text(); db.transaction(...

iOS: Facebook chat heads behaviour and animations -

this question little out of date, i've been using new facebook ios "chat heads" feature (with chat heads present within app), , wondering how facebook went implementing this? e.g. how did handle drag animations chat heads, , (when clicking on chat head) how did manage overlay uitableview on top of "base" uiviews in background? is part of uikit, or did create own classes handle this? to answer @stuartm's question in comments, in last couple of months i've had bit more experience uikit, , think have rough idea on how implement if going it. what chat head, create styled uibutton , add subview main window. dragging, add gesture recognizer uibutton respond drags, , "snapping edges" use ios 7's new uikit dynamics ( http://www.raywenderlich.com/50197/uikit-dynamics-tutorial ). as showing uitableview overlay chat history, use child view controller ( https://developer.apple.com/library/ios/featuredarticles/viewcontrollerpgfori...

Is it possible to have multiple panels with varying widths in jQuery Mobile? -

i have requirement support push-style , overlay panels variable widths in desktop webapp , jquery mobile comes close, except lack of variable panel widths. i have seen various answers on stackoverflow explaining how override css properties change width globally panels, need specify different width individual panels. is possible in jquery mobile? if not, interested know if issue jqm or technical limitation in general related way css transitions work maybe? at point not possible, @ least not easily, need heavily modify css make work. ask question can have panels varying width. if need example leave me comment , make one. or if want wait bit, next jquery mobile version 1.4 have default. unfortunately alpha 1.4 come out in next few days, stable version come in 1-1-5 months. if not ready wait create working example jquery mobile 1.3.2. edit : my bad, 1.4 alpha out: http://jquerymobile.com/blog/2013/07/25/announcing-jquery-mobile-1-4-0-alpha/

ios - CoreBluetooth does not call didDisconnectPeripheral when flight mode toggles -

i have corebluetooth app. starts connection in foreground , starts sending/receiving data , continues doing when sent background since have added bluetooth-central uibackgroundmodes in app-info.plist . if toggle flightmode setting app gets disconnected, wont diddisconnectperipheral callback. why this? my workaround has been clear references cbperiperal object within centralmanagerdidupdatestate able new scan , connect when app brought foreground again. same answer other question -> app don't discover services when reconnecting after power cycling bluetooth you need call cancelconnection: on peripherals when centralmanager updates cbcentralmanagerstatepoweredoff

php - xCart giving error unable to read resource: "admin/home.tpl" -

i have xcart installed in web hosting account. working fine admin panel gaves error while front end works smoothly. due unable login backend. error is: warning: smarty error: unable read resource: "admin/home.tpl" in /home/essenti/public_html/xcart/smarty-2.6.19/smarty.class.php on line 1092 i checked file manager there no home.tpl file in admin directory. in real trouble.

java - Class with repeated buttons android -

i have several classes same buttons. how can combine them 1 class rather writing them in each class? thanks make bean class buttons , use them using getter , setters throughout app. create buttons dynamically http://theopentutorials.com/tutorials/android/listview/android-custom-listview-with-image-and-text-using-baseadapter/ this link implement such things.. may solve ur problem :)

android - Scrollview in a Scrollview -

this quit strange want use 2 nested scrollviews. @ point outer scrollview needs stop scrolling , pass scrolling behaviour inner scrollview. my layout looks this. <customouterscrollview> <linearlayout/> <custominnerscrollview/> </customouterscrollview> i made 2 classes override onintercepttouchevent. customouterscrollview following: @override public boolean onintercepttouchevent( motionevent ev ) { if ( stopscrolling ) { return false; } else { return super.onintercepttouchevent( ev ); } } and custominnerscrollview this: @override public boolean onintercepttouchevent( motionevent ev ) { return true; } now, biggest problem have following. after point stopscrolling variable set true outerscrollview doesn't consume events anymore passes them custominnerscrollview. when debug, comes in onintercepttouchevent. problem innerscrollview not scroll. has idea? know not done, using nested scrollviews...

xml - How do I escape special characters in XSLT -

i have following xml being output xslt current output <stem> <text> <p style="white-space: pre-wrap"> <span style="font-size:11;">how cost buy apple &amp; pear if it's saturday?</span> </p> </text> </stem> desired output <stem> <text> <p style="white-space: pre-wrap"> <span style="font-size:11;">how cost buy apple &amp; pear if it&apos;s saturday?</span> </p> </text> </stem> i tried disable-output-escaping="no" had no effect: i'm using <xsl:value-of select="." disable-output-escaping="no"/> thanks if using xslt 2 (as use of saxon suggests) there feature called character maps fine-tune how output serialized. serialize apostrophes &apos; use: <xsl:character-map name="escape-apos"...

oracle11g - how to add column and how to which data type will be use -

s_no s_name s_father ------------------------------- 1 ram mohan 2 hareesh galla 3 praveen nagaraj 4 mallikarju bandaru 5 yashas penubakam now want add dob column existing table. how can dob column added existing table , data type should used? here example sql> create table t1 (id number); table created. sql> insert t1 values (1); 1 row created. sql> commit; commit complete. sql> select * t1; id ---------- 1 sql> alter table t1 add update_date date; table altered. sql> desc t1 name null? type ------------------------ -------- id number update_date date sql> update t1 set update_date = to_date('01/01/2013','dd/mm/yyyy'); 1 row updated. sql> commit; commit complete. sql> select * t1; id update_date ---------- ------------------- 1 01/01/2013 00:00:00 sql...

java - Regex expression to get the number out of the string -

i have string follows xxxx456 for example string <ignore>456 i want number string try: yourstr = yourstr.replaceall("[^\\d]", "");

How do I ignore certain tags when parsing xml in Perl? -

i'm parsing xml file has, between tags, text not want parse , may have broken tags. how select not parse text using 1 available modules xml parsing perl? thanks in advance. if xml broken (ie not well-formed), won't able use xml parser. that's feature. need fix first. if xml well-formed can use xml::twig , ignore_elts option. you'll see xml if ignored elements never there. alternatively, if xml "not broken", can try xml::liberal , may able deal it. or not... and if have xhtml, or html, or close, can use either xml::libxml or xml::twig appropriate parsing methods. good luck...

android - How to customize a SeekBar with minimum value at right side and maximum value at left side -

Image
i want customize seekbar in android reversely. minimum value @ right , maximum value @ left side. here image. seekbar not matter, default android seekbar max , min value should inverted. maximum value 10 , minimum value 0. if body have idea please me. you have stuff code. seekbar.setonseekbarchangelistener(new onseekbarchangelistener() { public void onprogresschanged(seekbar seekbar, int progress, boolean fromuser){ max_value=max value-progress; //you can used value , set seekbar. }

ruby on rails - Delayed_job does nothing : TypeError: can't convert nil into String -

follow delayed_job " https://github.com/collectiveidea/delayed_job ". may know why delayed_job nothing? ran "rake jobs:work" ad got these errors error: company#update_count_without_delay failed typeerror: can't convert nil string - 2 failed attempts done: added "gem 'delayed_job_active_record'" gemfile in console: "rails generate delayed_job:active_record" in console: "rake db:migrate" i followed instruction: if method should run in background, can call #handle_asynchronously after method declaration: class device def deliver # long running method end handle_asynchronously :deliver end device = device.new device.deliver model: require 'json' require 'net/http' require 'rubygems' require 'delayed_job' class company < activerecord::base before_save :validate_fbid scope :toplikes, order("count desc").limit(20) attr_accessible :desc, :fbid, :name...

How to obfuscate variable names in JavaScript? -

i'm artist that's written simple game in javascript. yah! go easy on me because bruise peach! i'm looking difficult cheat @ game. code obfuscation make difficult cheat, right? difficult, not impossible. realise that, , accidentally open can of worms here... essentially, i'm looking online tool renames variables; , don't search , replace in textpad :). example using http://packer.50x.eu/ on 1 line of code var loopcounter = 0; we result: eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,string)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new regexp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 2=0;',3,3,'|var|loopcounter'.split('|'),0,{})) the above looks mess, great; it's quite easy pick out english words loopcounter. have expected make variable names obscure (single letter? words without nouns? s...

Android: override onDraw without subclassing when View has been instantiated from xml -

i have class conditionaledittext compound custom view containing edittext , textview. layout of view defined in xml. want override ondraw method of edittext. since has been instantiated xml. cannot like edittext edt = new edittext() { protected void ondraw() { .... } } is there way override ondraw() method other sublclassing edittext or doing ui instantiation java rather xml? you should override edittext , instantiate own custom edittext in xml : public class customedittext extends edittext { public customedittext(context context, attributeset attrs) { super(context, attrs); } public void ondraw() { // code } } for xml instantiation : <com.android.example.customedittext ... /> for more information, see official documentation : http://developer.android.com/guide/topics/ui/custom-components.html#modifying

ios - Regular Expression for Numbers after KeyWord -

i have string "red:124green:45blue:23" . i have values red,green, blue. the output pattern should 124 only, can assign value red string. second output should 45 ,so can assign value green string , on.. red:(\d+)green:(\d+)blue:(\d+) you can used named groups: red:(?<red>\d+)green:(?<green>\d+)blue:(?<blue>\d+)

Using El inside JavaScript -

how use el tags inside javascript?? dont want use class identifier in javascript function want use el expression inside javacript code below working fine issue m not understanding how use el in place of id in javascript. please me <html> <c:foreach items="${studentslist.students}" var="student"> <script type="text/javascript"> $(document).ready(function(){ $( here want use el value id ).keyup(function(){ //do }); }); </script> </c:foreach> //dynamic list of input boxes each having id of particular student <c:foreach items="${studentslist.students}" var="student"> <input type="text" id="{student.id}"> </c:foreach> </html> $("<c:out value="${yourvariable}"/>").keyup(function(){ //do });

javascript - Restrict user to go BACK after Payment has been done -

i have integrated payment gateway in web application made in mvc4 razor. after payment has been done user redirected return url.. then process generating unique id ,sending payment details sms blah blah.. [nocache] public actionresult ipgresponse() { //send sms.. //save payment response..etc return redirecttoaction("thankyouuploaddocument"); } then redirect action. public actionresult thankyouuploaddocument() { //do return view("thankyouuploaddocument" , paymentviewmodel); } the problem when user hit .it goes ipgresponse() , steps again . i have used [nocache]..but did not worked i have restrict user go ipgresponse() or payment gateway again.. this should prevent caching: httpcontext.response.cache.setexpires(datetime.utcnow.adddays(-1)); httpcontext.response.cache.setvaliduntilexpires(false); ...

javascript - JQuery string, how to split and change the order -

i'm wondering there way split string in jquery , display in different order ? example: aaa bbb, ccc should bbb aaa ccc (no comma!) <div class="string">aaa bbb, ccc</div> any ideas welcome it depends on want achive , there several ways 1 way: var text = $('.string').html().replace(',','').split(' '); $('.string').text(text[1] + ' ' + text[0] + ' ' + text[2]); see live here: http://jsfiddle.net/trufa/7dg8g/

javascript - Stuttery performance issues with Jquery Mobile and Phonegap -

so, developing app using phonegap , jqm. works great , it's pretty easy phonegap build. however, i've started see 'stutter issues' annoying. app @ moment has 2 pages , transition effect between them 'slide'. first page has background color set , second 1 not. of issues: when navigate page 1 page 2, half of page has background color previous page. goes away after random swipes on screen. on 1 of pages, have regular form text input fields , radio button set @ end. when move input box radio button keyboard slides down replaced black area short period of time. the fixed header have @ top randomly decides disappear , reappear again. these few of annoying ones , these happen on mobile device , works fine on computer. so, know it's performance issue. i've read on internet , here on , different solution have been proposed writing custom css3 transitions (to take advantage of hardware acceleration) or using zepto.js. what in opinion best 'cros...

how to make customise MPMediaPickerController view iphone -

i want make changes on color on mpmediapickercontroller view. mpmediapickercontroller *mediapicker = [[mpmediapickercontroller alloc] initwithmediatypes:mpmediatypemusic]; mediapicker.delegate = self; mediapicker.allowspickingmultipleitems = yes; // default [self presentviewcontroller:mediapicker animated:yes completion:nil]; [mediapicker release]; please help you can change barstyle of mpmediapickercontroller think can not customize mpmediapickercontroller it's possible (likely) media picker doesn't have navigation toolbar @ point in time attempting set toolbar style. have checked see mediapicker.navigationcontroller has value ? i'd recommend embedding media picker controller own view hierarchy (the docs mpmediapickercontroller it's possible), , have complete control on navigation bar own view controller. // create media picker controller mediapicker = [[mpmediapickercontroller alloc] initwithmediatypes:mpmediatypemusic]; // set properties me...

android - Contact Picker app crashes on phone but not on emulator -

so have example code android spinners, , modified little show contacts in 1 of spinners, , on emulator works fine, shows 5 entries have added in contacts, on phone crashes right on startup, , can't understand logcat, wrong? here,s code // add items spinner dynamically public void additemsonspinner2() { spinner2 = (spinner) findviewbyid(r.id.spinner2); list = new arraylist<string>(); getcontacts(null); arrayadapter<string> dataadapter = new arrayadapter<string>(this, android.r.layout.simple_spinner_item, list); dataadapter.setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); spinner2.setadapter(dataadapter); } private string getcontacts(string contact) { people = getcontentresolver().query(contactscontract.contacts.content_uri, null, null, null, null); while (people.movetonext()) { int namefieldcolumnindex = people.getcolumnindex(phonelookup.display_na...

javascript - Advice on which technology to use for real time notifications -

i have x amount of activity sensors connected server inserts data database everytime sensor triggered. i'm trying create web interface blue print of facility (svg) , whenever sensor triggered, besides db insert, want show sort of alert in blue print. need keep open connection server think. i thinking of using web sockets, might overkill since need retrieve data server. running ajax call every second doesn't sound efficient either. there other alternatives? thank you some potential choices include: websocket adobe® flash® socket ajax long polling ajax multipart streaming forever iframe jsonp polling which actual transport end using depend on requirements browser support , technology using on server handle these requests. transport choice may depend on network topology - types of load balancers need integrate with, proxies, etc. there many libraries available on both client , server sides, many of support more 1 of these transports. for example (n...

Is compiling opencv with tbb relevant on processeur with 2 thread -

i using opencv following processor : intel(r) atom(tm) cpu n455 @ 1.66ghz intel indicates processeur has 1 core 2 threads. relevent use opencv tbb option , expect faster execution ? thank you this might help. tbb example works better using 2 threads on megafon mint phone contains intel(r) atom(tm) cpu z2460 @ 1.6ghz processor has 1 core 2 threads also. --vladimir

ios - Capturing combined button press and pan gesture -

i need capture following touch events on ios , interpret them: finger touch down within uibutton (stays down) finger b performs pan gesture elsewhere on screen, providing continuous callbacks. (i plan use uipangesturerecognizer implement functionality). finger touch within same uibutton in essence, pressing , holding uibutton puts app special mode lasts long button held. pan gestures performed during time different things when button not pressed. what i've tried far: hooking uibutton touch down , touch inside ibactions in uiviewcontroller subclass. i've problem encountered: touch inside action not called when gesture happens on screen finger while button pressed. because original touch cancelled. attaching uitapgesturerecognizer uibutton problem encountered: fires when finger leaves screen, hence cannot used put app special mode while button pressed. i need use uibutton rather uiview button has correct highlighting behaviour when pressed. ...

Is it still possible to have standalone Python elements in GStreamer 1.0? -

i have application written gst-python gstreamer 0.10 trying port gstreamer 1.0. in application, have custom elements written in python (subclasses of gst.basesrc , gst.basetransform ). each python-element has own file , placed in /usr/lib/gstreamer-0.10/python gst-launch , gst-inspect can pick them (which do). this handy, since makes possible me experiment different pipelines directly on command line. now trying port application (according guide https://wiki.ubuntu.com/novacut/gstreamer1.0 ) looks if still possible write python-elements pygi, seems possibility store them in separate files , have them integrated in gstreamer gone. all examples have found talks placing elements in program writing , registering them call gst.element.register , if so, possible reach custom elements directly program , want them work standalone (with gst-launch) without having write filter chains in program. so know if still possible gstreamer 1.0? in order other people struggling ...

java - OpenSL ES for recording audio in android NDK -

i starting learn opensl es android, before want confirm if record directly using jni bypass manufacturer's pre-processing agc , low pass filtering? provide raw pcm data source data? is of pre-processing done @ kernel driver level or @ library level? is there way pure audio directly drivers jni , google or phone manufacturer's give kind of access? there detail information audio requirements android device , application connected device drivers. find information following here application framework jni native framework binder ipc media server hal kernel driver hope helps people.

python - Pytests import fails after renaming project folder -

i've been struggling while renaming project folder of python project. called foo , want rename bar. foo/ /src __init__.py x.py /test __init__.py x_test.py __init__.py became bar/ /src __init__.py x.py /test __init__.py x_test.py __init__.py when project folder named foo tests passed, after renaming bar tests don't work anymore. imports raise importerror: no module src.x . i can import module when i'm using python console: $ python >>> import src.x when rename bar foo , run test i'll error: import file mismatch: imported module 'test.x' has __file__ attribute: /home/orangetux/projects/foo/test/x_test.py not same test file want collect: /home/orangetux/projects/bar/test/x_test.py hint: remove __pycache__ / .pyc files and/or use unique basename test file modules i can fix removing __pycache__ folders. i'm @ start. folder named foo working test...

java - Unable to set JPanel's Background in my Swing program. -

i set jpanel contentpane of jframe. when use: jpanel.setbackground(color.white); the white color not applied. but when use: jframe.setbackground(color.white); it works... surprised behaviour. should opposite, shouldn't it? sscce: here sscce: main class: public class main { public static void main(string[] args) { window win = new window(); } } window class: import java.awt.color; import javax.swing.jframe; public class window extends jframe { private container maincontainer = new container(); public window(){ super(); this.settitle("my paint"); this.setsize(720, 576); this.setlocationrelativeto(null); this.setresizable(true); this.setdefaultcloseoperation(jframe.exit_on_close); maincontainer.setbackground(color.white); //doesn't work whereas this.setbackground(color.white) works this.setcontentpane(maincontainer); this.setvisible(true); } }...

git - Continuous integration workflow - emergency use cases -

let me first describe simple ci workflow (we use git, jenkins, maven, nexus): project, creates branch master branch, makes changes, verification , code review done. puts request change. the following automated. changes merged master , queued release. deploy, every item in queue, binary built master branch (using tag or commit id), run test suite, , deploy 1% traffic. within 12 hours, have automatic analysis of performance numbers , business numbers, @ point give 100% traffic. pick next item in queue. this separation of 1 change per 100% release important because becomes difficult debug wrong if multiple changes in 1 release. this work fine, until breaks. say push feature1 1% traffic, find numbers bad, , in 12 hours takes figure out, feature2 has been merged master. in case, git revert needs done on feature1, if want feature2 go , revert buggy feature1 till fix bugs. in above case, feature1 important, , found wrong , know fix. need revert feature2 master, merge feature1 fi...

java - Hbase Scheme design- Best Practice -

Image
i have switched hbase rdbms handling millions of records.. newbie not sure efficient way of designing hbase scheme. actually, scenario have text files have hundred, thousands , millions records have read , store hbase. so, there 2 set of text files(rawdata file, label file) linked each other belong same user, these files have made 2 separate tables(rawdata , label) , storing info there. rawdata file , rawdata table this: so can see in rawdata table have row key file name of text file( 01-01-all-data.txt) row number of each row of textfile. , column family random 'r' , column qualifiers columns of text files , value values of column. how inserting record in table , have third table(mapfile) store name of textfile row key user id of user column qualifier , total number of records of textfile value looks this: 01-01-all-data.txt column=m:1, timestamp=1375189274467, value=146209 i use mapfile table in order read rawdata table row row.. what sugge...

email - Meeting Invite on Lotus notes using Java API -

i getting problem while sending meeting invite in lotus notes.i trying see in accept/decline feature format instead coming add calendar feature only.so if can me great.here code properties props = new properties(); props.put("mail.smtp.host", smtp_host_name); props.put("mail.smtp.auth", "false"); authenticator auth = new smtpauthenticator(); session session = session.getinstance(props, auth); session.setdebug(debug); mimemessage msg = new mimemessage(session); msg.addheaderline("method=request"); msg.addheaderline("charset=utf-8"); msg.addheaderline("component=vevent"); internetaddress addressfrom = new internetaddress(from); msg.setfrom(addressfrom); if (!(recipients == null)) { internetaddress[] addressto = new internetaddress[recipients.length]; (int = 0; < recipients.length; i++) {...

database - Django Query extremely slow -

Image
i got problem django application. queries on model scope extremly slow , after debugging still got no clue problem is. when query db scope = scope.objects.get(pk='esoterik i') in django takes 5 10 seconds. database has less 10 entries , index on primary key. way slow. when executing equivalent query on db select * scope title='esoterik i'; ok, takes 50ms. same problem happens if query set of results scope_list = scope.objects.filter(members=some_user) , doing e.g. print(scope_list) or iterating on elements of list. query takes few ms print or iterating of elements takes again 5 10 seconds set has 2 entries. database backend postgresql. problem occurs same on local development server , apache. here code of model: class scope(models.model): title = models.charfield(primary_key=true, max_length=30) ## semester scope linked assoc_semester = models.foreignkey(semester, null=true) ## grade of scope. can null if scope not class assoc...

asp classic - How to add the email sending script -

i'm new vbscript. have make form uploading file , sending specified email attachment. uploading used script http://www.freeaspupload.net/freeaspupload/viewsource.asp application saves file server. second part looks this: <% option explicit if request.cookies("quoterequest") = "quote" dim filename dim strmsg dim mail dim strsubject dim strfrom dim strreply dim strchoice dim addcheck dim mycheckdate dim strmailblindcopy dim smtpserver dim youremail dim public_mailer dim public_password smtpserver = "" youremail = "" public_mailer = "" public_password = "" addcheck = request.form("str_xxrand234myanswer") 'use next line if want blind copy send records 'strmailblindcopy = "info@ciupac.com" 'if addcheck = "" or null if len(addcheck)>2 or len(addcheck)<1 or isnumeric(add...

php - Change index feed appearance of custom post types for twentytwelve theme? (wordpress) -

is possible , how should done? custom post appears , works fine, , can customize permalink page index page stays same. tried making content-[posttype].php + single-[posttype].php along amending get_templatepart code single-[posttype].php filebut didn't have affect on appearance of custom post type when viewd in main index feed. if want customise custom post type's archive page need create template called archive-[posttype].php , , in this, call content-[posttype].php template part have created. for example if post type 'movies' create archive-movies.php , in call (assuming content-movies.php present): <?php get_template_part( 'content', 'movies' ); ?> an invaluable reference when working out template files use 'official' wordpress template hierarchy page in codex: http://codex.wordpress.org/template_hierarchy

Get range of active object (image) in excel/VBA -

i know incredibly simple, can't seem figure out or find answer elsewhere. ill want range of selected image. in advance help. here sample how top-left , botton-right cells of picture on excel sheet. picture has selected. sub test() if (vba.typename(selection) = "picture") dim pic excel.picture set pic = selection dim topleft range set topleft = pic.topleftcell debug.print topleft.address dim bottomright range set bottomright = pic.bottomrightcell debug.print bottomright.address end if end sub

How to Focus at Marker in google map in android -

i want know whether can focus @ added marker in android application or not. if yes, how? or there alternative way task done. lets have added marker using below code : map.addmarker(new markeroptions() .title(title) .snippet(snippet) .icon(bitmapdescriptorfactory.defaultmarker(bitmapdescriptorfactory.hue_blue)) .position(pos) ); how focus @ marker maximum zoom. , if add 1 more marker should adjust zooming(maximum possible zoom) in such way both marker display @ once. trying failing @ line map.movecamera(cu); . import java.util.arraylist; import java.util.list; import android.content.intent; import android.os.bundle; import android.support.v4.app.fragmentactivity; import android.view.menu; import com.google.android.gms.maps.cameraupdate; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.googlemap.cancelablecallback; import c...

python - Autobahn Websocket: listen to local port and transfer messages to clients connected to a public port -

i'am new autobahn , websockets. i'm trying build following setup: processing service (java based blackbox): waits data twitter's streaming api if new messages recieved, message send mainservice (ws://localhost:9999) {id, latitude, longitude} does magic processing data (which can take few minutes) mainservice listening on ws://localhost:9999 incomming messages processing service if message comes in (from processing service), broadcasted clients connected on ws://:9000 javascript clients connected mainservice on ws://:9000 displaying messages on map is possible write mainservice autobahn listening on 1 port , delivering messages on port? (from performance view might better combine processing , mainservice...but shouldn't point here.) sure, can run multiple services on different ports or can run multiple services on 1 port. latter, see here . former, create multiple factories , call listenws multiple times.

ruby on rails - Why isn't my view variable interpolated inside brackets? -

i have code inside rails views/comments/_comments partial: <%= render :partial => 'comments/#{@type}' %> also, passing @type variable through local get: missing partial comments/#{@type} it works if replace following: <%= render :partial => 'comments/post' %> so @type not evaluated inside views. can explain that? string interpolation in ruby works strings defined double quotation marks ("). should work: <%= render :partial => "comments/#{@type}" %> or shorthand applicable if want interpolate value of instance variable: <%= render :partial => "comments/#@type" %>

python - Create a list of integer elements from list of objects -

i need create list of non-duplicated integer elements list of objects. for example: there object 2 attributes: 'id' , 'other_id': first = [elem.id elem in objects_list] second = [elem.other_id elem in objects_list] print first [0,1,2,3,4,5] print second [4,5,6,7,9] now can create 2 list containing 2 attributes objects this: first = [elem.id elem in objects_list] first.extend(elem.other_id elem in objects_list if elem.other_id not in first) print first [0,1,2,3,4,5,6,7,9] is there way in shorter way? use set : sorted(set().union(first, second)) #returns sorted list of unique items demo: >>> first = [0,1,2,3,4,5] >>> second = [4,5,6,7,9] >>> sorted(set(first + second)) [0, 1, 2, 3, 4, 5, 6, 7, 9] if original order matters: >>> first = [0,1,2,3,4,5] >>> seen = set(first) >>> first += [x x in second if x not in seen , not seen.add(x)] >>> first [0, 1, 2, 3, 4, 5, 6, 7, 9] for l...

css - background-size doesn't work in IE -

this question has answer here: how make background-size work in ie? 8 answers i'm using class , id (for instance) add picture on 1 div : .icones { background: transparent url('../contents/homepage/60/icones.png') no-repeat; display: inline-block; width: 50px; height: 48px; background-size: 60px; } #contact { background-position: 0px -60px; } with chrome , ok, looks great , properties shown in element inspector , in ie , there problem. on inspecting page developper tool on ie , saw " background-size " doesn't appear. i know it's problem gives me trouble because when hide on chrome have same page in ie . so question is: how can force ie apply background-size ? thanks! edit : so filter, doesn't seems work: .icones { background: transparent url('../contents/homepage/60/icon...

javascript - .join() function cant load and be defined in jQuery -

here url: http://itsun.ir/test/ first excuse bad english, want add drag , drop layout wordpress theme, seems good, when li element move other columns, javascript should make cookie , save new positions load in other time, doesn't work correctly, when open resources tab in inspect element in chrome browser , move , li sortable item column , in resources panel occurs error said : [uncaught typeerror : object # has no method 'join' ] , have updated jquery doesn't make correct, can me out writting in correct way ??? <script type="text/javascript"> $(document).ready(function(){ // items function getitems(id) { return $('#' + id + '-list').sortable('toarray').join(','); uncaught typeerror: object # has no method 'join' } // load items cookie function loaditemsfromcookie(name) { if ( $.cookie(name) != null ) { renderitems($.cookie(name),"wrapp"); } else { ...

android - Align div to page center with dynamic size -

i saw many example of how centerize div middle of page, in examples size of divs fixed. how put div in center of page unknown size of div height? (the gray div in middle) my code : <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <style> html,body{ margin: 0; padding: 0; border: 0; } body{ background-color: transparent; overflow: hidden; font-family: "helvetica" ; color: #359115; font-weight:bold; } #wrapper { position: absolute; width: 100%; ...

html - Menu falls apart in Wordpress template as soon as I link up the list elements -

i built little visual overview of lessons want integrate wordpress template. started out building thing first , got result looking , looks this: menu example now wanted integrate in wordpress template add link around list elements falls apart: overview fallen apart in theme if remove link tags stays in shape: --> click on "scrum lernen" on page above see example stays in shape without links. can post 2 links @ moment due lack of reputation. i have played around hours today in css , tried sorts of things trying rid of formatting may dictated template on links. however, couldn't working @ all. so, in original first link above core: html: <div class="lernlesson"> <ul> <a href=""><li>geschichte von scrum <img src="checkmark.png"/></li></a> <a href=""><li>das scrum-ger&#252st <span>open</span></li></a> <a ...

Heroku running rake error: /usr/bin/env: ruby.exe: No such file or directory -

i'm running windows , i'm trying run ' heroku run rake db:migrate ' newly created app on heroku. i following error: /usr/bin/env: ruby.exe: no such file or directory i've been searching online on hour, haven't been able find fix. suggestions highly appreciated!

c# - What is the best optimization technique for a wildcard search through 100,000 records in sql table -

i working on asp.net mvc application. application used 200 users. these users (every 5 mins) search item list of 100,000 items (this list going increase every month 1-2 %). list of 100,000 items stored in sql server table. the search wildcard search eg: select itemcode, itemname, itemdesc tblitems itemname '%searchword%' the searching needs fast since main business relies on searching , selecting item. i know how best performance. search results have come instantaneously. what have tried - i tried pre-loading entire 100,000 records memcache , reading memcache. trying avoid calls sql server every search. this takes lot of time. every time user searches item, retrieving 100,000 records memcache , doing search. taking 2-3 times more time direct sql searches. i tried doing direct search on sql server table limiting results 50 records @ time (using top 50) this seems ok still no-where near performance seeking i hear possible solutions , links articles...

ios - Is there any limitations for number of NKAssetDownload -

i investigating newsstand kit. , wonder how many assets can add nkissue? there limitation or that? nkassetdownload *assetdownload = [nkissue addassetwithrequest:req]; currently there no limit mentioned in reference documents. so can add number of nkissue want.

wordpress - How to find out what level of hierarchy the current page is? -

on wordpress site, want display list of pages in current site section. needs different levels of pages depending on level in hierarchy current page resides. for instance: top level page: list shouldn't display @ all. second level page: list should display child pages of current page. third level page: list should display sibling pages , child pages. what simplist way find out level of heirarchy current page on? the simplest way i've found is: $level = count(get_post_ancestors( $post->id )) + 1; this gives number indicating depth of current page. 1 top level, 2 second level, etc. can switch code based on number such: switch($level) { case 1: // top level page code; break; case 2: // second level page code; break; case 3: // third level page code; break; // etc. }

sql server - How to remove the first character if it is a specific character in SQL -

i have table telephone has entries following: 9073456789101 +773456789101 0773456789101 what want remove 9 start of entries have 9 there leave others are. any appreciated. while other answer working, i'd suggest try , use stuff function replace part of string. update telephone set number = stuff(number,1,1,'') number '9%' sqlfiddle demo

asp classic - Passing a variable in ASP using reponse redirect -

i'm trying pass variable using response.redirect have page i'm processing info on contains: divrec = request.querystring("div") divstring = "divisions.asp?"&divrec response.redirect divstring but when try retrieve information in page using <% divrec = request.querystring("div") %> <% =divrec %> the variable/string not display i think missed querystring parameter in divstring variable. try this: divstring = "divisions.asp?div="&divrec you should able access parameter in receiving page now.

scala - akka cluster seed nodes give error: dropping message for non-local recipient -

i'm trying create basic akka cluster on win 7 machine documentation: http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html and i'm getting error when run seed nodes (more on them below) adriansclustersystem-akka.actor.default-dispa tcher-16] [akka://adriansclustersystem/system/endpointmanager/reliableendpointwr iter-akka.tcp%3a%2f%2fadriansclustersystem%40127.0.0.1%3a2552-3/endpointwriter] dropping message [class akka.actor.selectchildname] non-local recipient [act or[akka.tcp://clustersystem@127.0.0.1:2552/]] arriving @ [akka.tcp://clustersys tem@127.0.0.1:2552] inbound addresses [akka.tcp://adriansclustersystem@127.0 .0.1:2552] question: why getting error? did miss akka documentation? my .conf file: added line *to file listed @ url above * enabled-transports = ["akka.remote.netty.tcp"] akka { actor { provider = "akka.cluster.clusteractorrefprovider" } remote { enabled-transports = ["akka.remote...