Posts

Showing posts from May, 2015

soundchannel - Actionscript 3: more than one sound channel possible? -

soundchannel - Actionscript 3: more than one sound channel possible? - my problem having several buttons in flash play sounds when clicked, , want 1 button/sound active @ time. problem if mouse button released outside of flash window lastly button's sound keeps sounding til end, , if button pressed in meantime starts sounding simultaneously, , on. so thought of checking if soundchannel assigned other button pressed 1 playing, , if so, stop soundchannel allow current button's soundchannel play. but if actionscript soundchannel single object buttons, won't work, , don't see solution preventing multiple sounds sounding simultaneously other adding 'warning' box, seems redundant , ineffective. can have separate soundchannel each button or object in flash movie, otherwise how can bulletproof 1 button sound can sound @ 1 time no matter mouse released, within or outside of flash window? can set buttons in container , addeventlistener mouseevent.mous

php - Xdebug not working in PHPStorm IDE -

php - Xdebug not working in PHPStorm IDE - i trying setup xdebug in phpstorm ide , followed steps mentioned in 1 document i followed document :"http://www.mysolutions.it/phpstorm-server-xdebug-configuration/". but getting 1 error "port 9000 busy " , if run debug ,it quitting.i share config settings the steps have done in xdebug.ini zend_extension="/usr/lib/php5/20090626/xdebug.so" xdebug.default_enable = 1 xdebug.idekey = "vagrant" xdebug.remote_enable = 1 xdebug.remote_autostart = 0 xdebug.remote_port = 9000 xdebug.remote_handler=dbgp xdebug.remote_log="/var/log/xdebug/xdebug.log" xdebug.remote_host="myip" in php storm file->settings->phpservers host : ip virtual machine(ip added in host file) port:80 debugger:xdebugger i checked checkbox (use pathmappings) under project files (absolute path on server : /var/www/myproj ) file->settings->deployment connection: type : ftp ftp host

javascript - Filter table hiding rows with JS -

javascript - Filter table hiding rows with JS - i have table in razor: <table id="tblcaseteam"> <thead> <tr> <th> </th> <th style="width: 30em;"> @html.displaycolumnnamefor(model, m => m.action) </th> <th style="width: 7em;"> @html.displaycolumnnamefor(model, m => m.owner) </th> <th style="width: 7em;"> @html.displaycolumnnamefor(model, m => m.deadline) </th> <th style="width: 15em;"> @html.displaycolumnnamefor(model, m => m.status) </th> <th style="width: 15em;"> @html.displaycolumnnamefor(model, m => m.completed) </th> </tr> </thead> <tbody>

How to prevent Android from relaunching app from launcher -

How to prevent Android from relaunching app from launcher - when app entered through launcher, in memory restarted @ launcheractivity instead of resuming in activity in last. when user returns app through application switcher retain state. how create launching launcher have same behavior resuming through application switcher if application in memory? problem android:cleartaskonlaunch set true , had forgotten it. android

vb.net - Apply multiple FontStyles to Richtextbox -

vb.net - Apply multiple FontStyles to Richtextbox - i need help figure out how set bold,italic,underline same text richtextbox.. far have been doing this... public class form1 dim texto string public sub seleccioncb() if cbnegrita.checked = true txttexto.font = new font(txttexto.font, fontstyle.bold) else txttexto.font = new font(txttexto.font, fontstyle.regular) if cbcursiva.checked = true txttexto.font = new font(txttexto.font, fontstyle.italic) else txttexto.font = new font(txttexto.font, fontstyle.regular) if cbsub.checked = true txttexto.font = new font(txttexto.font, fontstyle.underline) else txttexto.font = new font(txttexto.font, fontstyle.regular) end if end if end if end sub you can combine multiple values using bitwise or operator, instance

fabricjs - Deselection fabric.js object event -

fabricjs - Deselection fabric.js object event - i trying execute code every time specific fabric object "deselected". there deselection event can handle? have function when object selected, via selected event, have not found documentation deselected one. @ canvas level have selection:cleared , selection:created events, nil deselection either. cheers, gonzalo use before:selection:cleared event , active object or group. after can check if corresponds specific fabric object. canvas.on('before:selection:cleared', function() { var clearedobject; if(typeof(canvas.getactiveobject()) !== 'undefined') { clearedobject = canvas.getactiveobject(); } else { clearedobject = canvas.getactivegroup(); } //do stuff deselected element if specific 1 want. }); fabricjs

Passing global javascript array to another function -

Passing global javascript array to another function - i have little javascript has globally declared array. values array filled within function foo() given below: <html> <head></head> <body> <script> var myarray = []; function foo() { var j = 5; (var = 0; < j; i++) { myarray.push(i+1); } } function bar() { alert(myarray); } </script> </body> </html> when trying access array in javascript function bar() , values of array null. how can prepare this? you have defined function never called it. try calling foo() , bar() this var myarray = []; function foo() { var j = 5; (var = 0; < j; i++) { myarray.push(i+1); } } function bar() { alert(myarray); } foo(); bar(); jsfiddle javascript arrays global-variables

Windows Phone, sqlite and relationships -

Windows Phone, sqlite and relationships - is possible have relations in sqlite on windows phone? right have 2 info models, artist , album should have many-to-many relationship. normally like public class artist { public list<album> albums { get; set; } } public class album { public list<artist> artists{ get; set; } } but doesn't work on windows phone. so question is: are relationships possible in sqlite , wp? is there orm me use, or need retrieve , populate every entity hand? sqlite windows-phone-8

WiX Installer FileSearch with full file path -

WiX Installer FileSearch with full file path - i'm creating msi using wix, , msi accepts user-input property, path file name installer logic using. i'm trying validate property determining whether file exists, total file path can't figure out how cooperate directorysearch , filesearch pattern. so, user runs msi like: msiexec /i myinstaller.msi customfile="c:\test\input.txt" i need run like: <property id="customfileexists"> <directorysearch id="locationconfigdirsearch" path="[customfile_dir]" depth="0"> <filesearch name="[customfile_filename]"></filesearch> </directorysearch> </property> but i: can't figure out how split filename parts. path.getdirectory([customfile]) , path.getfilename([customfile]) ideal. or; can't figure out how determine whether file exists using total file name as-is. example, property on directorysearch ign

c# - Binding multiple CheckBoxes to single property in ViewModel -

c# - Binding multiple CheckBoxes to single property in ViewModel - i bind multiple checkbox items (ischecked property) single property in viewmodel. the viewmodel property called selectedweekdays (int) , sum of selected weekdays. thought beingness every possible combination of weekday values result in unique sum. weekdays defined in enum such: public enum weekdays { mon = 1 tuesday = 2 quarta-feira = 4 th = 8 fri = 16 saturday = 32 sunday = 64 } so illustration if tuesday , th selected on view, should result in viewmodel property value of 10. likewise, if viewmodel property changes, 3, checkboxes mon , tuesday should checked. i've looked @ multibindings seems utilize bind single checkbox multiple values. can point me in right direction? would work you? didn't implement convertback . should easy. public partial class mainwindow : window, inotifypropertychanged { public mainwindow() { initialize

Main thread stuck in Python Multithreading -

Main thread stuck in Python Multithreading - i have 2 simple functions: def run(self): # create 20 instances of clients , start in xrange(0,20): t = threading.thread(target = self.run_clients_in_seperate_threads()) t.start() and def run_clients_in_seperate_threads(self): print 'inside run_clients_in_seperate_threads' client_id = self.generate_client_id() cl = client(client_id) cl.start() here, lastly line: cl.start() infinite loop. i thinking main thread become free after starting kid threads, , hence spawn 20 threads in total. seems main thread waits after starting 1st thread. can please explain i'm doing wrong ? use target = self.run_clients_in_seperate_threads , pass self args parameter . way way invoke method in main thread , end infinite loop there : self.run_clients_in_seperate_threads != self.run_clients_in_seperate_threads() python multithreading

.net - Sonatype Nexus rest api upload by C# -

.net - Sonatype Nexus rest api upload by C# - i need upload artifact nexus c# cant understand how interpret "curl -f" parameter tell request name extension , repository should go. mb can share solution? c# .net nexus

I cant get a basic for loop to work java 8 -

I cant get a basic for loop to work java 8 - i testing out loops , when seek doesn't work: public static void main(string[] args) { for(int i=0;i==5;i++){ system.out.println(i); } } when run expect "0,1,2,3,4,5" nil other "build successful". i'm using netbeans 8.0 on ubuntu linux. help or explanation why appreciated. edit:*facepalm in java for loops, while loops, don't specify "break", instead "continue" condition. thus, should replace == <= . java

Creating Contact Us XSLT in umbraco -

Creating Contact Us XSLT in umbraco - i trying utilize code select of pages website , if url has contact in it. pull specific url. neeed create create link url value for-each pull. <xsl:for-each select="$currentpage/ancestor-or-self::* [@level=$level]/* [@isdoc , string(umbraconavihide) != '0'] [contains(@nodename,'contact')]"> <xsl:value-of select="@nodename"/> </xsl:for-each> in umbraco url stored url or niceurl (http://our.umbraco.org/wiki/reference/umbracolibrary/niceurl) - node name used generate - not same thing. something next should work: <xsl:variable name="siteroot" select="$currentpage/ancestor-or-self::*[@level = 1]" /> <xsl:variable name="urlstring" select="contact" /> <xsl:for-each select="$siteroot//*[@isdoc][not(umbraconavihide = 1)][contains(umbraco.library:niceurl($currentpage/../@id), $urlstring)]">

Wordpress - put facebook / twitter login buttons in header -

Wordpress - put facebook / twitter login buttons in header - i working on this website , want add together facebook , twitter login buttons header, it's done on website. how do that? as can see, noob, help much appreciated. there lot of social login pulgins available kind of module. can seek https://wordpress.org/plugins/loginradius-for-wordpress/screenshots/ or utilize other social login plugin ever suits theme. facebook wordpress twitter login

java - Design Pattern for Objects of the same type sharing various fields -

java - Design Pattern for Objects of the same type sharing various fields - the title may sound strange, it's easier explanation: basically have class x. there number of objects. each 2 of objects should exist 1 list can acessed both of them. for illustration if create 4 x objects: a1, a2, b1, b2, need have 2 lists, 1 can acessed a1 , a2 , 1 acessed b1 , b2. thanks in advance can encapsulate 2 objects , list object? in example, objects still instances of x, , encapsulating class y: /** * encapsulates 2 x's , list */ public class y { private x x1; private x x2; private list list; public y() { list = //..create list x1 = new x(list); x2 = new x(list); } } have class in same bundle x, , hide x's constructor bundle level (default). if it's not default (no arguments) constructor (as case here), write private constructor. java list object design-patterns share

php - Mail from contact form without date -

php - Mail from contact form without date - after many trials , errors got php contact form working way want, sending right info hosting mail service address. , appears except date, doesn't appear @ (on inbox). contacted hosting service didn't replied. i've went researching php manual there's no info date atribute/header. knows how prepare this? here php: <?php if(isset($_post['email'])) { foreach( $_post $value ){ if( stripos($value,'content-type:') !== false ){ echo "there seems wrong information. please seek again."; exit; } } if ($_post["morada"] != "") { echo "oops! error. please seek again."; exit; } // edit 2 lines below required $email_to = "main@myemailaccount.com"; $email_subject = "contact form"; // validation expected info exists if(!isset($_post['nome']) || !isset($_post['email']) || !isset($_post['phone']) || !i

Android inapp billing subscriptions testing -

Android inapp billing subscriptions testing - is there way test inapp subscriptions renewal without having wait previous purchase expire? have searched docs there seems no official way it. have found workaround this, please? i have create subscriptions 7 days trial period , have cancelled purchase still have wait 1 whole week test again... thanks in advance guidance. android in-app-billing subscriptions renewal

spring: Why am I getting ClassNotFoundException: org.springframework.expression.ExpressionParser? -

spring: Why am I getting ClassNotFoundException: org.springframework.expression.ExpressionParser? - the class org.springframework.expression.expressionparser in spring-expression beingness included, shown below. why getting error when initializing spring context: exception in thread "main" java.lang.noclassdeffounderror: org/springframework/expression/expressionparser @ org.springframework.context.support.abstractapplicationcontext.preparebeanfactory(abstractapplicationcontext.java:556) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:457) @ org.springframework.context.support.classpathxmlapplicationcontext.<init>(classpathxmlapplicationcontext.java:139) @ org.springframework.context.support.classpathxmlapplicationcontext.<init>(classpathxmlapplicationcontext.java:83) @ com.cgi.tapestry.dbtest.jdbctest.main(jdbctest.java:22) caused by: java.lang.classnotfoundexception: org.springframework.expression

transition - JBPM task instance is "IN_PROGRESS" when the workflow instance is ended -

transition - JBPM task instance is "IN_PROGRESS" when the workflow instance is ended - in alfresco 4.1, using jbpm, have defined next workflow: <?xml version="1.0" encoding="utf-8"?> <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="dswf:testworkflow"> <swimlane name="initiator" /> <start-state name="start"> <task name="dswf:starttask" swimlane="initiator"/> <transition name="" to="wait" /> </start-state> <task-node name="wait"> <task name="dswf:waitcompletion"> <event type="task-create"> <action class="org.alfresco.repo.workflow.jbpm.alfrescojavascript"> <script> logger.log("waiting"); </script>

Issues with TypeScript dictionary -

Issues with TypeScript dictionary - i'm trying create dictionary/hashmap in typescript, , read however, when trying example, errors ' = expected ' , 'invalid left-hand look ', both in line 'axis["vertical"] = 4; line x: number = axis["vertical"]; not complain however. there using within class i've misunderstood, or overlooking something? this code: var axis: { [id: string]: number; } = {"vertical": 0, "horizontal": 0}; export class input { x: number = axis["vertical"]; axis["vertical"] = 4; } i've tried this, same result. var axis: axismap = {"vertical": 4}; export class input { x: number = axis["vertical"]; axis["vertical"] = 4; } interface axismap { [id: string]: number; } you can't have arbitrary statements in class body. can this: var axis: { [id: string]: number; } = {"vertical": 0, "hor

java - Error "cannot find symbol" for Class Connection and Class Statement -

java - Error "cannot find symbol" for Class Connection and Class Statement - i'm using glassfish, maven , commmand line host project. i created jdbc database in glassfish , i'm trying create table in java-ee file: package edu.ndnu.arivera; import javax.sql.*; import javax.annotation.resource; public class dbcreate{ @resource(name="jdbc/arivera") datasource ds; public void connectandquerydb(string username, string password) { connection con = ds.getconnection(); statement stmt = con.createstatement(); stmt.executequery("create table voter (firstname varchar(30),lastname varchar(30), address varchar(30), city varchar(30), state varchar(30), zip varchar(30), phone varchar(30), affil varchar(30))"); con.close(); } } however error: [error] symbol: class connection [error] location: class edu.ndnu.arivera.dbcreate [error] /home/student/contestedcounty/src/main/java/edu/ndnu/arivera/dbcr

xml - Testing for matching file names in Schematron -

xml - Testing for matching file names in Schematron - i have xml document list of xml, pdf, , tif files. need test via schematron each xml has matching pdf file, , vice versa. my xml: <folder> <files> <file>foo.xml</file> <file>foo.pdf</file> <file>bar.xml</file> <!-- missing file <file>bar.pdf</file> --> <file>foo.tif</file> </files> </folder> my schematron: <schema xmlns="http://purl.oclc.org/dsdl/schematron" querybinding="xslt2"> <!-- xml/pdf matches --> <pattern abstract="false" id="xmlpdfpair"> <rule context="folder/files//file"> <assert test="substring-before(.,'.xml') eq substring-before(.,'.pdf')">the xml or pdf (<value-of select="."/>) not have matching pdf or xml file.</assert> <

javascript - Extjs 5 - LoadMask on the entire page not working -

javascript - Extjs 5 - LoadMask on the entire page not working - in extjs 4.2, using load mask whole page in mutual utility class : loadmask: null, showloading : function() { if (!this.loadmask) { this.loadmask = new ext.loadmask(ext.getbody(), { msg: "loading..." }); } this.loadmask.show(); }, clearloading:function() { this.loadmask.hide(); }, i calling method in pages during loading/saving (waiting server side response ), in extjs 5.0, not working, getting next error message : uncaught typeerror: cannot phone call method 'mask' of undefined all-classes.js:1 ext.define.show all-classes.js:1 ext.define.loadingprocess all-classes.js:1 ext.define.listeners.beforeload all-classes.js:1 ext.define.dofire all-classes.js:1 ext.define.fire all-classes.js:1 ext.define.dodispatchevent all-classes.js:1 ext.define.dispatchevent all-classes.js:1 ext.define.dofireevent all-classes.js:1 a.dofireevent all-classes.js:1 ext.define.fireeve

numberformatexception - number format exeption in java -

numberformatexception - number format exeption in java - hello i`m working on project , had convert hex string binary string used lot of methods code below useful me although code creates unknown hex number "l" looks 1 not one, 1 know thing is(l)? , how did appear , how prepare , convert "1" ? public string hextobin(string hex){ string bin =new string(); string binfragment =new string(); int ihex; hex = hex.trim(); hex = hex.replacefirst("0x",""); for(int = 0; < hex.length(); i++){ ihex = integer.parseint(""+hex.charat(i),16); binfragment = integer.tobinarystring(ihex); while(binfragment.length() < 4){ binfragment = "0" + binfragment; } bin += binfragment; } you should utilize integer.decode() instead of integer.parseint() handles hex strings well. see; http://docs.oracle.com/javase/7/docs/api/java/lang/integer.html#decode(java.lang.string) java numberformatexcepti

Unable to see Search Box (EditText) when using ListView in Android -

Unable to see Search Box (EditText) when using ListView in Android - i'm trying implement custom listview (i.e. listview custom adapter) search box, have written next xml code-- <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".customlistviewandroidexample" > <edittext android:id="@+id/txtinputsearch" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="search item.." android:inputtype="textvisiblepassword" /> <listview android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="fill_parent&quo

SVG animation working properly in Chrome but not in Firefox -

SVG animation working properly in Chrome but not in Firefox - the svg animation working in chrome not in firefox. trying start animation 0.4 secs after page loads. here code <svg width="300px" height="300px" version="1.1" baseprofile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"> <circle cx="150" cy="150" r="70"> <animate dur="2s" attributename="r" begin=".4" restart="whennotactive" calcmode="spline" values="0; 100; 70; 50; 70; 95; 70; 60; 70; 75; 70; 68; 70" keysplines="0 .75 .5 1; .5 0 1 .25; 0 .25 .25 1; .5 0 1 .5; 0 0 1 1; 0 0 1 1; 0 0 1 1; 0 0 1 1; 0 0 1 1; 0 0 1 1; 0 0 1 1; 0 0 1 1" keytimes="0; 0.2564; 0.5128; 0.6154; 0.6923; 0.7436; 0.7949; 0.8462; 0.8974; 0.9231; 0.9487; 0.9744; 1" fill

html - How to put a min-height in a relative class css ? -

html - How to put a min-height in a relative class css ? - i'm designing website, it's going 1 html page using javascript switch between divisions. i'm using wrap partition banner/header, text container , footer relative positioned. want footer @ to the lowest degree bottom of window when there not plenty content, i'm trying set min-height text container. website occupy @ to the lowest degree windows in it's height. my html code (a part ^^) <div id="wrap"> <div id="banner"></div> <div> <div id="whoami" class="corpus"></div> <div id="etc" class="corpus">there different divisions these, i'm switching through thoose using jquery, that's not of import there. i'm trying set min-height footer @ bottom of windows if there not plenty content. can't pass footer in absolute position</div> </div>

c# - How to get contact details in Skype4COM? -

c# - How to get contact details in Skype4COM? - i trying grab fullname , handler contact receive in skype chat. managed breakpoint in event: skype.messagestatus += onmessagestatus; public void onmessagestatus(chatmessage pmessage, tchatmessagestatus status) { } however body of pmessage contains: "[contacts enclosed. please upgrade latest skype version receive contacts.]" doesn't matter if 1 sending or receiving message same. current skype version 6.16.64.105 (the issue still happens on 6.16.0.105) i wonder if issue skype version of not supported anymore reason, or if maybe working on wrong event... is there event, or there way grab name , handler received contact? i don't know message's body problem, can seek handle , fullname contact sending message: pmessage.sender.handle pmessage.sender.fullname c# skype skype4com

ios - Xamarin storyboard file XSD -

ios - Xamarin storyboard file XSD - there're .storyboard files in xamarin ios projects xmls. from description of storyboard tag i've found out storyboards used in ios 5, , there lot of guides on them, not much on file format. is there publicly available xsd such files? you can generate own xsd: http://www.freeformatter.com/xsd-generator.html ios xml xsd storyboard xamarin

ios - Present wi-fi connection view within app -

ios - Present wi-fi connection view within app - according this post, using "application uses wi-fi" plist key ought create wi-fi connection view appear when app starts , device not connected wi-fi, tried implementing that, , didn't work. have seek using reachability code nail webpage in order popup appear? according this other reply on stackoverflow: based on documentation, setting flag makes sure device attempts open wi-fi connection. i'm not sure guarantee networking occur on wi-fi. there's class out there apple called reachability. https://developer.apple.com/library/ios/samplecode/reachability/introduction/intro.html there's reachability class in afnetworking 2 https://github.com/afnetworking/afnetworking i set uirequirespersistentwifi flag yes , check reachability class there wi-fi connection available. if not, show error. ios objective-c

javascript - Preview an image from a form on another page before it is uploaded -

javascript - Preview an image from a form on another page before it is uploaded - just quick question. i'm stuck trying find out if possible have form user can come in info product. i'm saving info entered user in session variable. when user hits submit button form doesn't submit database takes them review page. user can review entered details , 1 time happy finalise new page. user can select file(image) in first form need display image on sec page.(review page) i know code display image 1 time user selects file. how, if possible, can display image on sec page? js function readurl(input) { if (input.files && input.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#blah').attr('src', e.target.result); } reader.readasdataurl(input.files[0]); } } $("#imginp").change(function(){ readurl(this); }); html <form id="form1" runat="server"> &

php - Yii2: custom validation for multiple attributes using OR not working -

php - Yii2: custom validation for multiple attributes using OR not working - i trying write rule validates if attribute_a or attribute_b set; one of next attributes must set : licitatii_publice or licitatiile_atribuite the next code not work; <?php namespace common\models; utilize yii\base\model; class abonamentvalidare extends model { public $licitatii_publice; public $licitatiile_atribuite; public $zone; public $judete; public $tari; public static $targetattribute = []; public function rules() { homecoming [ [['zone'], 'required'], [['licitatii_publice', 'licitatiile_atribuite', 'tari', 'judete'], 'safe'], ['licitatii_publice', 'validate_tip_licitatie', 'targetattribute' => ['licitatii_publice', 'licitatiile_atribuite']], ]; } function validate_tip_licitatie($attribute, $pa

java - How to return the first chunk of either numerics or letters from a string? -

java - How to return the first chunk of either numerics or letters from a string? - for example, if had (-> means return): abc123afa5 -> abc 168dgff9g -> 168 1ggggg -> 1 how can in java? assume it's regex related i'm not great regex , not sure how implement (i thought have feeling 5-10 lines long, , think done in one-liner). thanks string mystring = "abc123afa5"; string extracted = mystring.replaceall("^([a-za-z]+|\\d+).*$", "$1"); view regex demo , live code demonstration! to utilize matcher.group() , reuse pattern efficiency: // class private static final pattern pattern = pattern.compile("^([a-za-z]+|\\d+).*$"); // method { string mystring = "abc123afa5"; matcher matcher = pattern.matcher(mystring); if(matcher.matches()) system.out.println(matcher.group(1)); } note: /^([a-za-z]+|\d+).*$ , /^([a-za-z]+|\d+)/ both works in similar efficiency. on regex

vba - recording a value from cell when selecting an option from a listbox in excel -

vba - recording a value from cell when selecting an option from a listbox in excel - i working excel document, have listbox in 1 cell. when select 1 alternative listbox, there cell computes value. want save value in cell. there way can done without typing manually? i'm not sure totally follow. it? you have dropdown menu, assigned particular cell command (let's a1). cell stores integer, index of item of list have selected. based on value, want compute value , set in cell. lost there. excel vba listbox

c++ - YouCompleteMe, header files -

c++ - YouCompleteMe, header files - i working c++ header files using youcompleteme. header file not include other header files needs in order find classes using. without modifying header file, can can modify .ycm_extra_conf.py file have clang know additional header files needs? as example, suppose have 3 files "a.h", "b.h", , "c.cc". c.cc #include "a.h" #include "b.h" a.h class {}; b.h class b : {}; the b include file cannot compile on it's own, c.cc compile correctly because includes things in right order. however, if open b.h on it's own, complain not beingness defined. i know c.cc compiles correctly, how tell ycm when opening b.h compile in same context utilize c.cc? flags seem insufficient tell ycm how compile file, needs compiled c.cc. in .ycm_extra_conf.py add together regular preprocessor flags, e.g.: flags = [ '-wall', '-wextra', '-wno-variadic-macros',

Type String Out In TextBox (VB.NET) -

Type String Out In TextBox (VB.NET) - i trying create application create if string beingness typed out textbox. main problem code seems thread.sleep not sleep each individual character, whole application. example, if phone call sub string "hello", stop 100 milliseconds, , textbox display "hello" @ once. sub typeout(byval totype string) totype = totype.tochararray() each letter char in totype textbox2.text = textbox2.text + letter threading.thread.sleep(100) next end sub thanks help! this ideal job timer. can create can have more 1 textbox beingness typed @ same time @ different speeds. demonstration of concept: placed 2 textboxes , 2 buttons on new windows forms project form , used next code accomplish that: public class form1 private class typetext property target textbox property texttotype string private tim system.windows.forms.timer private currentchar integer

Custom workflow vs Configurable workflow in mscrm dynamics -

Custom workflow vs Configurable workflow in mscrm dynamics - there 2 type of workflow available in mscrm dynamics. 1. configurable workflow 2. custom workflow. my question : in scenerio, utilize custom workflow ? how custom workflow different plug ins ? 1) must differentiate between "custom workflow step(=custom workflow activities)" , "custom xaml workflows" (just sake of completeness): you utilize custom workflow activity (thats custom workflow step written in c#) if non of standard workflow steps fit needs , not can utilize plugin (see below). custom workflow steps helpful if represent generic functionality can reused. you utilize custom xaml workflows if want utilize total powerfulness of windows workflow foundation instead of limit subset dynamics crm workflow designer provides. must develop custom xaml workflows outside of crm (in visual studio example) , deploy crm. beware: cannot edit within crm , cannot utilize custom xaml work

ios - Objective-C: Forward most messages to another object (at runtime) -

ios - Objective-C: Forward most messages to another object (at runtime) - subclass of uiview i have subclass myview of uiview . this subclass has @property uiview * realview . what want do whenever message sent myview , want "forward it" self.realview , excepted few messages. for instance, in implementation of myview , have override: - (void)setbackgroundcolor:(uicolor *)color { [self.realview setbackgroundcolor:color] ; } instead of overriding explicitly methods, can automatically, @ runtime? exceptions for methods, want have explicit control. instance: - (void)setframe:(cgrect)frame { /* stuff */ [super setframe:frame] ; } instead of overriding explicitly methods, can automatically, @ runtime? you implement -forwardinvocation: method send unrecognized messages other object. -forwardinvocation called whenever object doesn't implement selector that's passed sort of sec chance handle message. can override send m

java - ArrayList add null pointer -

java - ArrayList add null pointer - the next class keeps giving me null pointer when seek phone call addplayer method , have no thought heck i'm doing wrong. : maintain in mind simple stuff...supposedly... i'm learning java. import java.util.*; public class team { private string teamname; private arraylist<player> players; private int numberofplayers; public team(string teamname) { this.teamname = teamname; } public string getname() { homecoming this.teamname; } public void addplayer(player player) { this.players.add(player); } public void printplayers() { (player player : this.players) { system.out.println(player); } } } here player class : public class player { private string name; private int goals; public player(string name) { this.name = name; } public player(string name, int goals) { this.name =

Should this information be calculated in real time or stored in a seperate database? -

Should this information be calculated in real time or stored in a seperate database? - i working on grouping project , having give-and-take whether calculate info want existing database , store in new database query later, or calculate info existing database every time need utilize it. wondering pros , cons may either implementation. there advice give? edit: here more elaborate explanation. have big database has lot of info beingness submitted daily. building scheme track points of data. example, getting count of how many times user entered in database. using illustration (are actual thought bit more complex), discussing methods of getting count of actions per users. first method create database stores users , action count, , query database every time need action count. sec method query big database , count actions per user every time need utilize it. hope explanation helps explain. thoughts? edit 2: 2 more things may useful point out 1: have read access big d

python - API registration and authentication service -

python - API registration and authentication service - i'm working on api registration , authentication service application using python. developers able register application (domain name of application) , random api key generated registered application. next, registered application send api key api service each api request. api server authenticate domain of incoming request passed api key confirm request valid. i'm using forwarded host validated domain name of api request, doesn't work in cases (when opened page first page), forwards host comes blank. are there improve approach authenticate request or changes required in api registration process reliably authenticate request? pointers helpful. using authorization proxy samples "3scale.net", offering free tier, other commercial solutions exist too. open source solution aware of apiaxle, much simpler, still useful. the proxy takes care of managing access keys , forwards request real applicati

ios - finds a random destination point from current location is within the given distance GoogleMaps -

ios - finds a random destination point from current location is within the given distance GoogleMaps - i making ios map using google maps.i want plot way on google maps current location random destination within given distance. means app finds random destination point within given distance(e.g maybe 8 km or 15km ) (doesn't have accurately within distance long on sidewalk). random destination must on route,so user can run starting point designation point(random point). how can designation point current location on google maps.any thought .. thanks in advance. use arc4random_uniform() calculate value that's 200,000 times bigger maximum amount want point move away user's current location. subtract half max value random number , split half max value. double scale = 100000; double maxnorthsouthchange = 2,000; //2,000 meters, 2k double randomnorthsouthchange = arc4random_uniform(maxnorthsouthchange*2*scale)/(2*scale)- maxnorthsouthchange*scale; //rando

ASP.NET MVC multi-site design -

ASP.NET MVC multi-site design - i'm looking create new mvc site, , 1 of key problems i'm trying solve sharing code between public area (web-facing) , internal area. basically have 2 applications, 1 public web site users access, , used internally @ our company view of same info visible on public site. i want maintain them 2 separate sites (projects) because have different teams of people working on each, , because want utilize different authentication formats (forms public, windows internal). however, want able share of code (views, controllers) between 2 sites. how set these 2 mvc sites such 1 mvc site reference view , / or controller in project? for instance, have view enable internal users see transaction history of our public site users. if have created controller/view in internal site , later wanted add together in public site, how re-use same view on public site? technically, others have said, can set want shared in class library project, , referen

condtion in javascript validation not working properly -

condtion in javascript validation not working properly - i have textbox , submit button <input type="text" name="username" id="username"/><br/> <input type="submit" onclick="return validate()"/> here function code: if (document.getelementbyid("usernameee").value == null || document.getelementbyid("usernameee").value == "" ) { document.getelementbyid("usernameee").style.bordercolor = 'red'; homecoming false } else { document.getelementbyid("usernameee").style.bordercolor = ''; if (document.getelementbyid("usernameee").value.length!=0 || document.getelementbyid("usernameee").value.length < 8 ) { document.getelementbyid("usernameee").style.bordercolor = 'red'; document.getelementbyid("message").innerhtml="enter atleast 8 characters" homecoming false } else { docum

Custom Analyzer elasticsearch-rails -

Custom Analyzer elasticsearch-rails - i'm using elasticsearch-rails gem in rails app simplify integration elasticsearch. i'm trying utilize phonetic analysis plugin, need define custom analyzer , custom filter index. i tried piece of code in order perform custom analysis soundex phonetic filter, fails exception message: [!!!] error when creating index: elasticsearch::transport::transport::errors::badrequest [400] {"error":"mapperparsingexception[mapping [call_sentence]]; nested: mapperparsingexception[analyzer [{tokenizer=standard, filter=[standard, lowercase, metaphoner]}] not found field [phonetic]]; ","status":400} # set index configuration , mapping # settings index: { number_of_shards: 1, number_of_replicas: 0 } mapping indexes :text, type: 'multi_field' indexes :processed, analyzer: 'snowball' indexes :phone, {analyzer: { tokenizer: "standard", filter: ["stand

java - Is an Android app which uses local JSON files to store data vulnerable? -

java - Is an Android app which uses local JSON files to store data vulnerable? - my android app uses plain text json files store data. such files saved private folder of app, e.g. android/data/com.example.app/. know if app vulnerable such kind of files around. info in files not sensible or secret, , not processed javascript (they parsed json java methods); concerned malicious json code injected , mess app or user's device. possible? by default, info store private folder neither accessible user nor other applications. see documentation on android developers website this: http://developer.android.com/guide/topics/data/data-storage.html#filesinternal however, mentioned smr, if device has been rooted info available user , might compromised apps user has given root permission to. it's minority of users rooted , should more or less know they've gotten , they're actions can do. it's decide if it's worth effort out these special cases. but default

opengl - Simple game development with Java and LWJGL -

opengl - Simple game development with Java and LWJGL - of course of study i'm not first 1 develop such game. want become professional game development within in next years. want implement shoot'em game. not first one. developed 1 in turbo pascal 6.0 in 1998. without using oop. game 2nd shoot'em in java, 1st 1 using lwjgl. implemented in 2d. i want maintain quite simple. there features wanna implement. plan create 10 levels. player has spaceship can move in 4 directions(up, down, left right). ship has double-laser can shoot upwards. ship can moved, don't plan rotation. one level has several enemies of same kind. enemies spaceships. simple ships move downwards. firing single or double laser bullets. there lasers have min. , max. frequency. want define mathematical function defines how possible have frequency(between min , max). the ship speed constant within enemy (and level). in later levels enemies gain double or 2,5x speed. enemies in later levels have la

How do you get the Youtube channel picture -

How do you get the Youtube channel picture - i want youtube channel's picture. getting video image it's simple: http://img.youtube.com/vi/" + item.videoid + "/mqdefault.jpg solved. var json = new webclient().downloadstring("http://gdata.youtube.com/feeds/api/users/"+yt_channel_name); string str = "thumbnail url='"; string imagepic = json.substring(json.indexof("thumbnail url") + str.length); if (imagepic.contains("'")) { imagepic = imagepic.remove(imagepic.indexof("'")); imagechannel.imageurl = imagepic; } youtube

c# - Generics appear not to be the same in class and method -

c# - Generics appear not to be the same in class and method - i asked question before set on hold because problem 'simple' conversion problem. me isn't. first time seek work generics. i have class code here without errors: internal class gridbox<t> : boxbase // t : new() { public gridbox(grid grid, gridboxview view, messageboxicon icon, string caption, observablecollection<t> datasource, messageboxbutton button) : base(grid, icon, caption, button) { view = view; datasource = datasource; } public gridboxview view { get; set; } public observablecollection<t> datasource { get; set; } } next utilize class pass lot of info between different classes starting code below: public static t show<t>(dependencyobject sender, messageboxicon icon, string caption, observablecollection<t> datasource, messageboxbutton button) t : icomparable<t>, new() { window window = window.getwindo

oracle - error:PL/SQL: ORA-00904: : invalid identifier -

oracle - error:PL/SQL: ORA-00904: : invalid identifier - create or replace bundle pls_check2 procedure check_proc(p_item_cat number, p_sub_cat number, p_pack_is number, p_pack_name number, v1 out number, v2 out number, v3 out number, v4 out number); procedure package_info1(param1 number, param2 number, param3 number); end pls_check2; create or replace bundle body pls_check2 v1 number; v2 number; v3 number; v4 number; procedure check_proc(p_item_cat number, p_sub_cat number, p_pack_is number, p_pack_name number, v1 out number, v2 out number, v3 o

javascript - Escape double quotes -

javascript - Escape double quotes - my json: { "label": "menu position", "name": "topmenualign", "type": "select", "values":["left", "right", "center"], "default": "right" }, my js: var ipdesignoptions = { 'topmenualign': function (value){ $('nav ul.level1>li').css('text-align', value); } }; generated style: text-align:**"value"**; should be: text-align:**value**; how escape double quotes? i've tried few ways described in stack overflow no luck. update: this impress pages theme cms i using 1 of examples build options theme design. there 4 files need play with. config.less --> define specific variable e.g. @topmenualign: right; style.less --> define info result e.g. nav {text-align:@topmenualign;} theme.json --> specify options e.g. { "label": "men

textview - How to RelativeLayout Align Center android -

textview - How to RelativeLayout Align Center android - <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:layout_marginleft="78dp" android:layout_margintop="199dp" android:text="test" /> <textview android:id="@+id/textview2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/t

java - How can we read Lossless compressed JPEG images -

java - How can we read Lossless compressed JPEG images - i have medical images , compressed lossless images. these images can read in matlab , accusoft java api. how can load these type of images in java? my current code is: image img = null; imageinputstream iis = new fileimageinputstream(file); (iterator<imagereader> = imageio.getimagereaders(iis); img == null && i.hasnext();) { imagereader r = i.next(); seek { r.setinput(iis); img = r.read(0); } grab (ioexception e) { e.printstacktrace(); } } system.out.println("imagee : "+img); but getting exception : javax.imageio.iioexception: unsupported jpeg process: sof type 0xc3 @ com.sun.imageio.plugins.jpeg.jpegimagereader.readimageheader(native method) @ com.sun.imageio.plugins.jpeg.jpegimagereader.readnativeheader(jpegimagereader.java:609) @ com.sun.imageio.plugins.jpeg.jpegimagereader.checktablesonly(jpegimagereader