Posts

Showing posts from March, 2015

sql - How to group by CLOB data type? -

sql - How to group by CLOB data type? - vendor upgrade changed column_a varchar2 clob. query contains group column_a returns ora-00932 "inconsistent datatypes: expected - got clob . when exclude group column_a in query, don't error don't results want. thus, need grouping clause. is there way grouping clob info type? sql oracle oracle11g group-by

sonarqube - Map sonar components to jira components -

sonarqube - Map sonar components to jira components - i'm using jira plugin in sonarqube. can take component needs used in new jira issues created sonar. setting available on sonar project level (sonar.jira.issue.component.id). on component level setting missing (there "jira filter name" parameter only). is there way how fill in component value in jira issues according component value in sonar? this not possible moment current version of jira plugin. sense free come , discuss on user mailing list. sonarqube

unity3d - Unity c# Object reference not set to an instance of an Object ( Shooting Script ) -

unity3d - Unity c# Object reference not set to an instance of an Object ( Shooting Script ) - using unityengine; using system.collections; public class weapon : monobehaviour { public string name; public int rateoffire; int rof; public int accuracy; public int ammo; public bullet amunition; public pcp shootingpoint; [hideininspector] public bool isactive = false; void start () { rof = 0; } // update called 1 time per frame public void weaponupdate () { if(rof != 0) { rof --; } } public void shoot() { if(ammo > 0 && rof == 0) { shootingpoint.sendmessage("create",amunition); ammo --; rof = rateoffire; } } } "note : pcp shortcut prefab shooting point". i got error in shooting method in line "shootingpoint.sendmessage" dont understand why ? , have components @ objects placed in shootingpoint , ammunation , wrong ?? here image prove attached objects : either sho

excel - Concatenate 1000 cells of column to one cell at the bottom -

excel - Concatenate 1000 cells of column to one cell at the bottom - i want combine text of 1000 cells of particular column (say a1 a1000) 1 single cell (say a1001), can tell macro this? try next udf public function concat(r range) string concat = "" each rr in r concat = concat & rr.value next rr end function user defined functions (udfs) easy install , use: alt-f11 brings vbe window alt-i alt-m opens fresh module paste stuff in , close vbe window if save workbook, udf saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx to remove udf: bring vbe window above clear code out close vbe window to utilize udf excel: =concat(a1:a1000) to larn more macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm and http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx and http://www.cpearson.com/excel/writingfunctionsinvba.aspx for specifics on udfs macr

sql - INSERT values query throws error -

sql - INSERT values query throws error - i'm using oracle 11g , next error when come in next query insert customer(customer_id, first_name, last_name, dob, gender, pan_no) values(301, ‘robert’, ‘william’, 1986-10-05, ‘m’,’pq56794’); error: ora-01756: quoted string not terminated problem ’pq56794’ try below if works: insert customer(customer_id, first_name, last_name, dob, gender, pan_n0) values(301, 'robert', 'william', to_date('19861005','yyyymmdd'), 'm','pq56794'); tip : re-create notepad avoid problems related quote. sql oracle oracle11g

node.js - Determining the remote port of the http request in expressjs -

node.js - Determining the remote port of the http request in expressjs - hi want know remote port of request express web server. api has mechanism determine remote ip not find way determine port. particularly node, documentation http server component, under event connection says: [triggered] when new tcp stream established. [the] socket object of type net.socket. users not want access event. in particular, socket not emit readable events because of how protocol parser attaches socket. socket can accessed @ request.connection . so, means request.connection socket , according documentation there indeed socket.remoteport attribute according documentation is: the numeric representation of remote port. example, 80 or 21. so, guess should able remote address , port accessing attributes in request.connection.remoteaddress , request.connection.remoteport or subscribing event mentioned above. node.js express

Java collections provide type via overridable variable -

Java collections provide type via overridable variable - example code: public abstract class abstractevent { // extended abstractevent subclasses, used lambda function interface // (all sub-interfaces define 1 method) public interface eventlistener { } // assigned subclasses in static block protected static class<? extends eventlistener> listenerclass; // line not work protected static set<listenerclass> listeners = new hashset<>(); public final boolean addlistener(listenerclass listener) { homecoming listeners.add(listener); } public final boolean removelistener(listenerclass listener) { homecoming listeners.remove(listener); } } is possible in java, , if so, how? i've made in scala defining type without body in abstract class , defining in subclasses (and works great), i'd create in java aswell. the point of want avoid duplicating set code in subclasses of abstracte

php - Which Mobile Browser User Agent string starts with HTTP? -

php - Which Mobile Browser User Agent string starts with HTTP? - disclaimer: don't want discuss if it's or bad utilize user agent sniffing observe mobile browsers! there's adopted regex (regular expression) observe mobile browser user agent string can download from site this. and contains grouping /ht(c(\-| |_|a|g|p|s|t)|tp)/i matching string starting "http". thus bot or service using php pear module http_request2 using string htp_request2/2.1.1 (http://pear.php.net/package/http_request2) php/5.3.2-1ubuntu4.15 detected mobile browser , redirected websites mobile url. question: mobile browser detected way? user agent string of mobile browser like? (bonus: needs changed not match http_request2 mobile browser?) looks matches http://www.voxtel.ru/uaprof/voxtel_*.xml reason, , see start http . can see them in useragents.txt file site. there many others contain http or http later in string though. you alter pattern, wouldn't rely

regex - Validate NIC field in vb.net -

regex - Validate NIC field in vb.net - i want validate nic number text field in vb form. should contain 9 numbers [0-9] , 1 letter (letter should "v" ) (first 9 characters numbers,last 1 letter) how validate such thing using regular expression? can help me code? i'm new section. the examples section in docs shows you. to match digit utilize \d to match 9 numbers state want 9: \d{9} to match letter want [a-za-z] (or more complicated depending on letter is). if want v allow v using [v] i.e. \d{9}[v] test regex.ismatch regex vb.net

c++ - Reading Multiple CCTV Cameras using OpenCV -

c++ - Reading Multiple CCTV Cameras using OpenCV - i need inputs multiple cctv cameras , take pc. 1 time in pc, need run opencv programme on video input provided each individual photographic camera , perform image recognition work. should happen on real time. have never worked cctv before, not sure how can input "multiple cameras" pc, , not sure how can utilize opencv identify different cameras. unfortunately our media lab not provide much details on this.. so question is, possible pc take input multiple cctv cameras (maybe 5 or 10 or 16 or whatever), , can opencv identify input coming different cameras separately? in case of webcab, yes opencv can, possibility cctv? please help. i afraid mixing 2 things: data processing, opencv about data acquisition. opencv can handle little latter through "highgui" module. think, loading/writing file to/from disk, opening window on screen , showing webcam video stream in it, such things... however op

javascript - how to improve forms on iOS safari using iScroll? (keyboard breaks page when it disappears) -

javascript - how to improve forms on iOS safari using iScroll? (keyboard breaks page when it disappears) - so when manage set inputs , textareas iscroll, ios safari keyboard @ times can cutting off bottom of page after hides itself. has found fixes this? javascript mobile-safari iscroll iscroll4

windows 7 - Python crash with minimal Cython module (Python3, Anaconda3, Windows7) -

windows 7 - Python crash with minimal Cython module (Python3, Anaconda3, Windows7) - i seek utilize cython python3 (anaconda3) under windows 7. after having solved bug in distutils editing file cygwinccompiler.py (cf. building minimal cython file python 3.3 (anaconda) under windows 7), modules can built without problems: c:\path\testcython> python setup.py build running build running build_ext cythoning testcython.pyx testcython.c building 'testcython' extension c:\prog\anaconda3\scripts\gcc.bat -mdll -o -wall -ic:\prog\anaconda3\include -ic :\prog\anaconda3\include -c testcython.c -o build\temp.win-amd64-3.4\release\tes tcython.o writing build\temp.win-amd64-3.4\release\testcython.def c:\prog\anaconda3\scripts\gcc.bat -shared -s build\temp.win-amd64-3.4\release\te stcython.o build\temp.win-amd64-3.4\release\testcython.def -lc:\prog\anaconda3\l ibs -lc:\prog\anaconda3\pcbuild\amd64 -lpython34 -lmsvcr100 -o build\lib.win-amd 64-3.4\testcython.pyd however, there

javascript - Using jQuery to snap to div on scroll -

javascript - Using jQuery to snap to div on scroll - i have built simple vertical scrollable website snaps view divs when user scrolls or downwards page. cans see demo here: http://dev.driz.co.uk/snap.html the js simple: var currentscreen = 0; var scrollready = false; var screens = new array( 'one', 'two', 'three'); function scrollnext() { if( currentscreen < screens.length-1 && scrollready == true ) { currentscreen++; performscroll(); } } function scrollprev() { if( currentscreen > 0 && scrollready == true ) { currentscreen--; performscroll(); } } function performscroll() { scrollready = false; var newypos = math.ceil($('#'+screens[currentscreen]).offset().top); $('.snap').animate({scrolltop: newypos }, 500, function() { scrollready = true; }); } $(document).ready(function() { scrollready =

javascript - Getting values from child nodes in an element -

javascript - Getting values from child nodes in an element - what want can done in 3 steps: 1. find specific element 2. find specific kid nodes in element 3. extract values particular kid nodes know, it's simple, i'm new javascript. let's consider next code, comments help out. <!--we're going @ content of "p" tag--> <p id="demo"> <!--here have textbox , drop downwards list--> <input type="text" value="a value"/> <select> <option value="zero">0</option> <option value="1">1</option> </select> </p> <!--this button finds "p" element id of "demo", looks @ kid nodes.--> <input type="button" onclick="extractv()" value="get values"/> <script> function extractv() { document.getelementbyid("demo").//this bit don't know. } </script> there go. can't f

HTML Encoded JavaScript -

HTML Encoded JavaScript - i got "joy" of opening html file similar expected receipt such opened html file. to which, part of html pulled downwards javascript non-descript site has subsequently removed content. grabbed via curl before removed. i know message encoded, , searching proper decoder larn impacts javascript has had on system. have tried unsuccessfully go , variety of encodings reveal actual code. grateful assistance determine impact was, or link decode myself. to intentionally avoid having anyone's else compromised, not going post entire html code, rather 2 parts: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="cscqmxx0xvexampuy2dxa6ggiukh6mleqsmmfrx6appxwkmf5abgjhtqcllvgiku0oyrcmlc5j1xg6tie8kwrbvmvftvtrj1oeqaeqoiewrfhngfrca3nfrhw84jwa4tjb71e1n2nyewmddomel1krtxwjaaxwcyvs7cruqkrixbnxy3mvoh0nemkxihncogm6httwoqmg2ypbsyhbhpcwldarablegrribsoddkk4bm6dvv57snmxmeuqixhgpcg6jvhjdgldopvysg2nxkowstueknrsmqvnv

c# - "Column not allowed here" in EF6 with TPH and Devart Oracle -

c# - "Column not allowed here" in EF6 with TPH and Devart Oracle - when creating db schema ef, devart dotconnect generates next sql tph class: create table "types" ( id number(10) not null, "name" nvarchar2(50) null, "discriminator" nvarchar2(128) default (undefined) null, constraint "pk_types" primary key (id) ) i "ora-00984: column not allowed here" error. seems quite obvious, has 'undefined' in discriminator column declaration. bug in dotconnect or did wrong mapping? seems quite simple case. there dozen classes extending abstracttype, none of them adds new columns. my poco class: public abstract partial class abstracttype { public int id { get; set; } public string name { get; set; } } mapping: public class abstracttypemap : entitytypeconfiguration<abstracttype> { public abstracttypemap() { haskey(t => t.id); totable("types");

javascript - Get position relative to parent not viewport on mousedown / touchstart -

javascript - Get position relative to parent not viewport on mousedown / touchstart - how, on mousedown or touchstart , can position of mouse relative or within container or element took place in. so, know can pagex/y or clientx/y event or on touch, original event. positioning compared whole viewport. div absolute positioned, how can positioned within boundaries of container ( absolute positioned ). so works: http://jsfiddle.net/fb6an/ here code: $('.datacard').on('mousedown touchstart', function(event){ $(this).children('.ripple').show().css({'left':event.clientx || event.originalevent.clientx, 'top':event.clienty || event.originalevent.clienty}); }); except doesn't work in elements on total site working on. on elements closer right border of screen, appears more right , lower the actual mouse location. in elements left, works fine. so wondering how can position within element , style .ripple there? no need

wordpress plugin - How to create a product on the fly for woocommerce? -

wordpress plugin - How to create a product on the fly for woocommerce? - i want create woocommerce dependent plugin. function of plugin allow visitor configure product based on complex field click "ok" button , product added cart. means want utilize woocommerce tool handling payments , taking orders. when client finish checkout process order manually. i know there add-on configurable product "product bundles". not serve purpose. need finish control. plugin has special visual requirements. found plugin bit same way, "paid membership pro", makes predefined product. need create product on fly. please, help me, in advance. wordpress-plugin e-commerce woocommerce product configurable

oracle - Why do SQL code examples demonstrating parallelism comment out the parallel statements? -

oracle - Why do SQL code examples demonstrating parallelism comment out the parallel statements? - in question oracle: why doesn't utilize parallel execution? and oracle documentation http://docs.oracle.com/cd/b10500_01/server.920/a96524/c20paral.htm#26156 they're comenting out paralell statement such: select /*+ parallel(employees 4) parallel(departments 4) use_hash(employees) ordered */ max(salary), avg(salary) employees, departments employees.department_id = departments.department_id grouping employees.department_id; why doing this? the oracle 10 documentation clearest on syntax hints: hint syntax you can send hints sql statement optimizer enclosing them in comment within statement. the reason simple. hints enclosed in comment if sql compiler doesn't recognize them, ignored. true different versions of oracle. true code beingness ported other databases. hint can included code still works. sql oracle parallel-pr

ios - Add User data to UIPickerView -

ios - Add User data to UIPickerView - i have app user scans qr code nsstring, need set uipickerview. what utilize set text of uipickerview row nsstring qr code? firstly, need have array of strings , implement uipickerviewdatasource , uipickerviewdelegate in .h file. after this, have create utilize of delegate methods of uipickerview shown : -(nsinteger)numberofcomponentsinpickerview:(uipickerview *)pickerview { //return number. } this homecoming number of sections want in pickerview. (nsinteger)pickerview:(uipickerview *)pickerview numberofrowsincomponent:(nsinteger)component { homecoming array.count; } the above method homecoming number of rows in particular component. if have array, equal number of elements in array. , lastly one. -(nsstring *)pickerview:(uipickerview *)pickerview titleforrow:(nsinteger)row forcomponent:(nsinteger)component { nsstring *str; if(pickerview == yourpickername) { str = [array objectatindex:r

javascript - How to add CSS Hack specifically for IE10? -

javascript - How to add CSS Hack specifically for IE10? - i trying add together css ie 10. actually css working fine in chrome , firefox. creating problem in ie 10. i tried code , made ie10.css not working. <script> if (/*@cc_on!@*/false) { var headhtml = document.getelementsbytagname('head')[0].innerhtml; headhtml += '<link type="text/css" rel="stylesheet" href="css/ie10.css">'; document.getelementsbytagname('head')[0].innerhtml = headhtml; } </script> it not working. kindly help. you can track latest versions of ie (mostly ie 10 , ie 11) using 1. css media query hack: /* #ie10,11 reddish in msie 10, both in high contrast (display setting) , default mode */ @media screen , (-ms-high-contrast: active), (-ms-high-contrast: none) { //-- set ie specific css class here } or @media screen , (min-width:0\0) { /* ie9 , ie10 rule sets go here */ }

internationalization - Internationalisation in Android application using Xamarin and the MvvmCross framework -

internationalization - Internationalisation in Android application using Xamarin and the MvvmCross framework - i'am trying implement internationalisation in xamarin application based on mvvmcross framework. that, follow stuart's video http://www.youtube.com/watch?v=vkxhtbj_tlk&feature=youtube_gdata my problem when seek utilize 1 of resource set in json file, string not returned. for example, have json file listcustomersviewmodel.json in assets/internationalisationresources/text folder of android application contains : { "mytitle":"titre de la page" } so in order create link textview, set code in axml file listcustomersview.axml : <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:textsize="30dp" local:mvxlang="text mytitle" android:id="@+id/textview1" /> but instead of displaying string "tit

php - best way to handle multiple login method from android -

php - best way to handle multiple login method from android - we building app (android now, later on other platforms) needs user sign registering standard info email, username , password. to simplify step, whish allow user login via facebook or other social network through oauth, maintain possibility create business relationship straight on our server filling form. now, we're struggling on finding best way that: -should utilize facebook (or other) login user info on client , create business relationship these info same method our standard form? -should utilize facebook login access_token , send server creates business relationship itself, , utilize different method our own signup method? -something else? our main question necessity of using oauth on server side else social network logins. while many applications utilize such methods, seems hard find exhaustive info on it... help on subject appreciated! -should utilize facebook login access_token ,

ios - How to creat a NSString using copied code snippets from my own app which are then viewed in a TextView control in Objective-C -

ios - How to creat a NSString using copied code snippets from my own app which are then viewed in a TextView control in Objective-C - i a bit new, did google search , here on stack, no results helped me solve issue. have taken objective-c via lynda.com courses simon allardice, great starting points, need this: i writing simple demo / reference app has bunch of controls on interface (uibutton, uiswitch etc). have right, textview control. when user touches button example, want show code used perform actions in method sort of "how to" or "how did that" reference myself. i have tried: nsstring *mycode = @"copied code snipped here"; but warning not clear me. thought perhaps needed utilize 'stringwithformat' method on nsstring, did not work out either. so, how can re-create snippets of code nsstring var can reference app @ runtime showing text in textview control? thanks there's nil special code. it's text, , can se

Is bounds checking in C or C++ expensive? -

Is bounds checking in C or C++ expensive? - bound checking expensive (> x2 times runtime overhead) i got point above 1 of professors. confused that. know, time-consuming part of programme io(from network , hard disks). but bounds checking in c or c++ not related 2 input sources. example, re-create content of 1 buff in c using memcpy(dest, src, length(src)) . before that, check size of src in order prevent heap overflow. precess can image is: start-address of src , \x00 byte in src (in view of assembly language, re-create content of src 1 1 , see if byte equivalent \x00 ). after getting 2 address, substract them length of src . read content of src memory. know reading things memory fast. i ran programme had iterator bounds checking turned on. the running time went 789 ms 2608 ms. so yes, can matter. not time, more never. in particular, bound-checked iterators require @ to the lowest degree twice much storage simple pointers, , furthermore, not

filter - PHP filter_input validate INT -

filter - PHP filter_input validate INT - i have chunk of code: $range = array ( 'options' => array ( 'min_range' => 0, 'max_range' => 10 ) ); if (!$number = filter_input(input_post, 'number', filter_validate_int, $range)) { exit ('error'); } the "number" input sent options 0 10. the problem if number = 0 returns "error". what's wrong that? thanks this because !0 true. why? adding ! doing boolean check, variable gets converted. , according manual: when converting boolean, next values considered false : the boolean false itself the integer 0 (zero) the float 0.0 (zero) the empty string, , string "0" ... so integer 0 gets converted false while other integers converted true . this why need type safe check false or null these values filter_input() returns if fails reason. $number = filter_input(input_post, &#

java - JPA NamedQuery without table in database -

java - JPA NamedQuery without table in database - i have 2 tables in database: packet_type , unit. i've created something-like-entity class packettypeext fetch joined info both tables. have simple namedquery: @namedquery(name="packettypeext.findall", query="select p.price, p.unit_amount unitamount, u.title unittitle packet_type p bring together unit u on (p.idunit = u.idunit)") i have such fields in class: private int idpackettype; private float price; private int unitamount; private string unittitle; i don't wanna create table or view store joined data, did not placed "entity" annotation. after running webpage i've got error: java.lang.illegalargumentexception: named query not found: packettypeext.findall what's fastest , to the lowest degree complicated way fetch such info ? java hibernate postgresql jpa

windows phone 7 - Adcontrol added in my application not appearing in the device? -

windows phone 7 - Adcontrol added in my application not appearing in the device? - i'm trying test application bing ads. i've added latest version of microsoft advertising sdk , i'm trying in windows phone 8 silverlight app? this xaml code: <ui:adcontrol applicationid="app_id" adunitid="adunit_id" horizontalalignment="left" height="80" margin="0,488,0,200" width="480" isautorefreshenabled="true" keywords="hotels, travels, restaurant"/> but advertisement not getting appeared in device? thanks in advance. you must have forgot add together capabilities the next id_cap capabilities must included in manifest of advertising-enabled app. id_cap_identity_user id_cap_medialib_photo id_cap_networking id_cap_phonedialer id_cap_webbrowsercomponent windows-phone-7 windows-phone-8 windows-phone bing

jquery - Custom clientside validation for required at least one in array -

jquery - Custom clientside validation for required at least one in array - i have next custom attribute used validate if array has had value submitted: [attributeusage(attributetargets.property, allowmultiple = true, inherited = true)] public sealed class requiredarrayattribute : requiredattribute, iclientvalidatable { public requiredarrayattribute() : base() { } public override bool isvalid(object value) { var list = (ilist)value; if (list != null && list.count > 0) { homecoming true; } homecoming false; } public ienumerable<modelclientvalidationrule> getclientvalidationrules(modelmetadata metadata, controllercontext context) { string errormessage = this.errormessage; // specific error message if set, otherwise default if (string.isnullorempty(errormessage) && metadata != null) { errormessage = formaterrormessa

javascript - Find element from jQuery matching objects -

javascript - Find element from jQuery matching objects - i have click event listener below: $(".clickable").click(function (e) { var results= $(e.currenttarget).closest('div.set').find('.clickable'); // returns //[<label for=​"thumbnail" class=​"clickable">​1 malaysia​</label>​, //<div class=​"thumbnail clickable">​…​</div>​] var label = $(results).find('label'); // returns [] (empty list) } my problem is, how can select label element results list ? ! try utilize .filter() instead of .find() , var label = results.filter('label'); .find() search descendants, here in need filter out required element collection, utilize .filter(selector) here. and have used satpal said like, var results= $(e.currenttarget).closest('div.set').find('label.clickable'); javascript jquery

regex - How to parse \n symbols in text from text area with PHP -

regex - How to parse \n symbols in text from text area with PHP - i have text area, need parse text when form submitted. for illustration need first string text area, , left whole text is. don't want utilize nl2br function , utilize pattern <br /> . can parse \n chars , if how? can't in php code, can in regex tester link illustration below. http://regex101.com/r/mk7hf2 this code doesn't work: preg_match('/(.+)\n\n/', $_post['text'],$title); $title = $title[0]; echo $title; it returns nothing. help me alter this, thanks. edit you don't need regular expressions this, utilize strtok: $title = strtok( $_post['text'], "\n" ); edit ok, seek \r match type of line endings '/(.+)\r/' php regex parsing textarea newline

javascript - Post a form using Jquery ajax and get the response -

javascript - Post a form using Jquery ajax and get the response - i'm using code post form using jquery ajax . problem want create php code this: if (isset($_post[''])) { // code here } this javascript code: $("button#submit").click( function() { if( $("#username").val() == "" || $("#password").val() == "" ) $("div#status").html("please come in email"); else $.post( $("#myform").attr("action"), $("#myform :input").serializearray(),function(data) { $("div#status").html(data); }); $("#myform").submit( function() { homecoming false; }); }); if tested code, , php section works fine, can not response in jquery, then, should check php code(it should this): if (isset($_post[''])) { $data = ""; // code here fill $data echo $data; // actual response jquery inte

ruby - Can you run different domain names on the same Comfortable Mexican Sofa? -

ruby - Can you run different domain names on the same Comfortable Mexican Sofa? - the comfy cms says can run several sites off of single installation separate hostnames, such as, en.example.com , fr.example.com . i'm wondering if can run several different sites different hostnames like, example1.com , example2.com ? i went ahead , ran install of comfy on digitalocean , tried out 2 different domain names. worked fine. comfortable mexican sofa has capabilities run multisites different domain names on 1 comfy install. ruby comfortable-mexican-sofa

android - Scroll ScrollView to item of nested ListView -

android - Scroll ScrollView to item of nested ListView - i working on receipt-app. 1 activity manages different ingredients in linearlayout: some text starter listview of starter ingredients some text main dish listview of main dish ingredients ... the user can add together number of ingredients different lists. number of list items , size of finish view/activity not limited. because of finish linearlayout nested in scrollview . of course of study having vertical scrolling listview within vertical scrolling scrollview not idea. using custom listview sub-class overrides onmeasure(...) , expends size of listview cover items. customlistview not scroll , not conflict scrollview . works without problem. assume scrollview scrolled top , user adds new ingredient placed in middle of main dish list. list of screen. how can scroll scrollview show added ingredient list item? of course of study know scrollby(x, y) , scrollto(x, y) methodes scrollview provides. h

asp.net - How to do a if else statement in classic asp -

asp.net - How to do a if else statement in classic asp - i'm new classic asp , i'm trying figure out simple if else statement. reason it's recognizing person 2 , not trying person 1? any thought on how fix? thanks this code: <% dim getpath getpath = request.servervariables("url") & query_string dim page page = "/products/dowlex/index.htm" if getpath = page varrecipient = "email1@email.com" response.write("*path = " & getpath) response.write("person 1") else varrecipient = "email2@email.com" response.write("*path = " & getpath) response.write("person 2") end if varformname = "contact" varrhbusinessunit = "businessname" varlanguage = "english" varcourtesyresponse = "y" varredirect = "#noredir?formrun=true" varsubject = "ask expert form" %> i compare 2 strings based on same

javascript - How to manually navigate to route with React + React-Router-Component -

javascript - How to manually navigate to route with React + React-Router-Component - i've created react component library, js react page views render , control. // application js, controls routes. var application = react.createclass({ mixins: [router], routes: { '/': homepage, '/users': performerpage // , null: notfoundpage }, render: function () { homecoming this.transferpropsto(this.renderroutehandler()); } }); // , in homeview.js, link page <link href={'/users'}>{'test'}</link> this works wondefully. except when manually navigate link, doesn't handle yet... question is, if server redirects index always, react grab this? i'm pretty versed in grunt, , build automation in general, node js servers aren't forte yet unfortunately. in grunt server task => 'connect:livereload', 'webpack:development', 'open',

xpath - Import data from HTML page using feeds importer in drupal -

xpath - Import data from HTML page using feeds importer in drupal - i'm trying import info html page feeds importer. context this: <table class="tabela"> <tr valign="top"> <td class="formulario-legenda">nome:</td> <td nowrap="nowrap"> <b>raul fernando de almeida moreira vidal</b> </td> </tr> <tr valign="top"> <td class="formulario-legenda">sigla:</td> <td> <b>rmv</b> </td> </tr> <tr valign="top"> <td class="formulario-legenda">código:</td> <td>206415</td> </tr> <tr valign="top"> <td class="formulario-legenda">estado:</td> <td>ativo</td> </tr> </table> <table>

authorization - SAML 2.0 security token -

authorization - SAML 2.0 security token - i have web application uses identity provider authentication in accordance saml 2.0 protocol. does web application (service provider) have validate security token (provided idp when user log in web application) each web server request. in opinion, there no need validate security token each server request. saml protocol requires token validation in necessary cases (authentication, authorization). am right or od have implement token validation each web server request? no, service provider not need validate saml assertion every request. saml assertion contains info user, such username is, how user authenticated identity provider, , on. 1 time service provider obtains saml assertion identity provider, verifies saml assertion, , log-ins user service provider. 1 time user logged-in, user needs utilize same authenticated session access protected resource @ service provider. user not have send saml assertion. authorization

sql - Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException when running external method -

sql - Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException when running external method - background:- im trying run update query alter boolean value 0 1 if meets criteria i.e. row matches registration number of vehicle , task set open i.e. boolean 0. to enable close task in database 1 time complete i calling method "ambulance_gui" class in "taskquery" class , query works fine in sql. have got work "frankenstein" method in java pragram compiler saying uncompilable code though working hence re-writing it. however, getting nullpointerexception error , cannot see doing wrong, maybe because have been staring @ long cannot them working! apologise if stupid help great! this method call: private void jbutton4actionperformed(java.awt.event.actionevent evt) { taskqueryclass ntq2 = new taskqueryclass(this.vehiclereg); ntq2.updatetaskstatus1(); and method in t

python - Adding words to scikit-learn's CountVectorizer's stop list -

python - Adding words to scikit-learn's CountVectorizer's stop list - scikit-learn's countvectorizer class lets pass string 'english' argument stop_words. want add together things predefined list. can tell me how this? according source code sklearn.feature_extraction.text , total list (actually frozenset , stop_words ) of english_stop_words exposed through __all__ . hence if want utilize list plus more items, like: from sklearn.feature_extraction import text stop_words = text.english_stop_words.union(my_additional_stop_words) (where my_additional_stop_words sequence of strings) , utilize result stop_words argument. input countvectorizer.__init__ parsed _check_stop_list , pass new frozenset straight through. python scikit-learn stop-words

C++ class definition split into two headers? -

C++ class definition split into two headers? - is possible in c++ split definition of class members in 2 headers? appropriate way code it? for instance: a1.h class { public: int var; void foo1(int b); } a1.cpp #include "a1.h" void a::foo1(int b) { cout << b; } a2.h [extend] class { public: void foo2(double c); } a2.cpp #include "a2.h" void a::foo2(double c) { cout << c; } you can't extend class way, can utilize pimpl pattern: class { public: void foo1(int b); private: aimpl* pimpl; } and have aimpl.h , aimpl.cpp hides private details. c++ class header-files partial-classes

PHP MySQL how to retrieve records that match several different values in a single query -

PHP MySQL how to retrieve records that match several different values in a single query - i have array on php contains ids of records want retrieve, i'm doing loop executing query several times them all. foreach ($receivers $id) { $sth = $this->db->prepare("select phone contact idcontact = ?"); $sth->execute(array($id)); $res= $sth->fetch(); echo $res['phone'] ; } how can in single query, i'll not bother database hundreds queries ? $sth = $this->db->prepare("select phone contact idcontact in (" . implode(",",$receivers) . ")"); source: http://www.w3resource.com/mysql/comparision-functions-and-operators/in-function.php better source: http://dev.mysql.com/doc/refman/5.0/en/any-in-some-subqueries.html php mysql sql query-optimization

ios - Horizontal and Vertical scrolling UITableViews -

ios - Horizontal and Vertical scrolling UITableViews - i trying implement horizontal scrolling uitableview on ipad, raombi app, in left panel sticks own place when scrolling horizontally. uitableview based on columnar approach should scroll seamlessly together. i have no thought how start in order fulfil these requirements. here screenshot of desired functionality. in viewdidload rotate table 90 grade , load cells rotating every cells -90 degree. consider first column table header , rest every column table cell. go through below.add in viewdidload self.tbldetail.transform = cgaffinetransformmakerotation(-m_pi_2); and below lines in cellforrowatindexpath method if(!cell){ uiviewcontroller *controller=[[uiviewcontroller alloc] initwithnibname:cellidentifier bundle:nil]; cell=(mycustomcell *)controller.view; cell.transform = cgaffinetransformmakerotation(m_pi_2); } apart design header , cell in different nib files. header below: -(uiview *)tabl

iframe - Google Doc Viewer: Which formats are really supported? -

iframe - Google Doc Viewer: Which formats are really supported? - i'm using google docs viewer embed kind of documents. having problem find out formats supported. on offical docs viewer website (https://docs.google.com/viewer) google links nice list of supported formats. next formats should supported: google docs google sheets google slides google forms google drawings image files (.jpeg, .png, .gif, .tiff, .bmp) raw image formats video files (webm, .mpeg4, .3gpp, .mov, .avi, .mpegps, .wmv, .flv, .ogg) microsoft word (.doc , .docx) microsoft excel (.xls , .xlsx) microsoft powerpoint (.ppt , .pptx) adobe portable document format (.pdf) tagged image file format (.tiff) scalable vector graphics (.svg) postscript (.eps, .ps) truetype (.ttf) xml paper specification (.xps) .mts files however, if seek embed image files or video files illustration famous 'sorry, type of document not supported viewing' error. so question is: why

More elegant syntax for logical operators for equals() method in Java? -

More elegant syntax for logical operators for equals() method in Java? - i have code so: if (input.equals("north") || input.equals("n")) { direction = cardinals.north; } is there way utilize less verbose syntax this, along lines of: if (input.equals("north" || "n") { direction = cardinals.north; } i know doesn't work, hope there equivalent? why not using enum directly: public enum cardinals { north("n", "north"), south("s", "south"), east("e", "east"), west("w", "west"), error("", ""); private final list<string> matchingstrings; cardinals(string... matchingstringsar) { this.matchingstrings = arrays.aslist(matchingstringsar); } public static cardinals formstr(string str){ (cardinals cardinals : cardinals.values()){ if (cardinals.matchingstrings.c

java - Read XML from valid URL not returned. Header formatting issue? -

java - Read XML from valid URL not returned. Header formatting issue? - i trying utilize code below read valid url. can re-create , paste url browser , works (displays xml) when seek access programatically returns nil (no info , no error). have tried set user-agent via post: can't read in html content valid url didnt prepare problem. if matters trying single eve api call. believe problem not have headers formatted correctly, , eve site rejecting query. can access info fine using php, had alter languages. public static void readfiletoxml(string urlstring,string fname) { try{ java.net.url url = new java.net.url(urlstring); system.out.println(url); urlconnection cnx = url.openconnection(); cnx.setallowuserinteraction(false); cnx.setdooutput(true); cnx.addrequestproperty("user-agent", "mozilla/5.0 (windows; u; windows nt 5.1; en-us) applewebkit/531.0 (khtml, gecko) chrome/3.0.183.1 safari/531.0"); system

objective c - Don't display subviews outside of UIBezierPath -

objective c - Don't display subviews outside of UIBezierPath - i have 1 uiview drawn with: - (void)drawrect:(cgrect)rect { uibezierpath *bezierpath = [uibezierpath bezierpathwithovalinrect:cgrectmake(0, 0, self.widthofline, self.heightofline)]; [bezierpath fill]; } and frame centered within ios window. want place bunch of smaller (5px 5px) views within view randomly, doing fine arc4random() function , drawing views. however, can't seem figure out how cutting off views outside bezierpathwithovalinrect, display them everywhere in first uiview's frame. know this? edit: for clarity, have defined view as: - (void)drawrect:(cgrect)rect { uibezierpath *drawpath = [uibezierpath bezierpathwithovalinrect:cgrectmake(self.xposition, self.yposition, self.width, self.width)]; [[uicolor whitecolor] setfill]; [drawpath fill]; } and adding big number of these first view subviews, want them not displayed outside oval bezier path. there way a) add

Set CSS background-size to be 'original' or '2x original', etc? -

Set CSS background-size to be 'original' or '2x original', etc? - im making image sprite sheet. icons need half size on mobile background-size needs half of original image. is way set background-size property in px? in instances images need 3/4 or there original size beingness able specify background size ratio of original image quicker , create code easier read. using background-size mobile alternative it's more supported. you set background in percentage, if that's easier read you: (1/2) background-size: 50%; (3/4) @media screen , (min-width: 480px){ background-size: 75%; } css

C++ pointer . I want to know about the logic -

C++ pointer . I want to know about the logic - i have question on pointer concept not find logical reply #include<conio.h> #include<iostream.h> void main() { int arr[10]; clrscr(); cout<<*arr+5 - *arr+3; getch(); } even if assign arr[0]=10; (or other value) the compiler gives reply 8 how . can not see(understand) how operator precedence , associativity solve it. i grateful you. because of *arr - *arr 0 , 5 + 3 8. the result may expecting result of: cout<<(*arr+5) - (*arr+3); c++ pointers

java - Getting Multiple Notifications Per Push -

java - Getting Multiple Notifications Per Push - when send out force notification, 5 of same notifications appear on device. reason why? here application.java , manifest: public class application extends android.app.application { public application() { } @override public void oncreate() { super.oncreate(); parse.setloglevel(parse.log_level_verbose); // initialize parse sdk. parse.initialize(this, "__removed key security___", "__removed key security___"); // specify activity handle pushes default. pushservice.setdefaultpushcallback(this, splashactivity.class); parseinstallation.getcurrentinstallation().saveinbackground(); } and manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bordengrammar.bordengrammarapp" android:versioncode="1" android:versionname="1" > <!-- opengl map --> <uses-feature an

c# - Image Source in WPF -

c# - Image Source in WPF - i'm trying set image source in xaml maintain getting "could not find part of path..." (plus directory want call). think i'm messing location i'm supposed calling. hierarchy looks like: -solution -project -data -images -image_i_want_to_use.png (placeholder name) -themes -demo -default -fileimworkingin.xaml -other files -other folders -another project -third project how configure image source in xaml file i'm working in can utilize image(s)? i tried <image source="/project;component/images/image_to_use.png"> (where each name placeholder) had no luck. pointers? apologies if trivial. thanks! in .net 4, image.source value work: <image source="/assemblyname;component/foldername/image_to_use.png"> however, microsoft made horrible changes in .net 4.5 broke many different things , in .ne