Posts

Showing posts from September, 2014

Google Sheet built-in function/custom function order of execution -

my question order of execution between built-in functions , app script functions. there built-in function need executed before rest of app script function(s) executed. what does data copied first range data copied third range validation rule rejects data in third range because doesn't match data of second range (range blank @ stage because built-in function hasn't executed) built-in filter function executes copies required data first range second range. what want do: data copied first range built-in filter function execute , copy required data first range second range copy data third range validation rule accepts in third range because built-in function has populated second range. is there way make happen or google sheets hard wired execute app script functions before built-in functions? the answer was: spreadsheet.app.flush();

ios - ObjC - How to explicitly hand off ownership to a block that will be performed asynchronously? -

this question relates ios apps in objective-c using mrr (not arc), , gcd (grand central dispatch). the concurrency programming guide states (emphasis mine): for blocks plan perform asynchronously using dispatch queue, safe capture scalar variables parent function or method , use them in block. however, you should not try capture large structures or other pointer-based variables allocated , deleted calling context. time block executed, memory referenced pointer may gone. of course, it safe allocate memory (or object) , explicitly hand off ownership of memory block. this seems contradict blocks , variables doc states: when block copied, creates strong references object variables used within block. the latter statement seems describing how block captures pointer-based variables (objects). in other words, block implicitly taking ownership, not parent method explicitly handing off ownership block. how 1 explicitly hand off ownership of object block? there wa...

android - How to check if json array has any value? -

i using condition - if (!obj2.getstring("patroncheckoutinfo").equals("null")) { but not work case when array got value. eg: case1- when json got value "patroncheckoutinfo": { "errormessage": "" "message": "operation completed successfully" "status": "ok" "results": { "lookuppatroninforesponse": { "patronaddressinfo": null "patroncheckouthistoryinfo": null "patroncheckoutinfo": [6] 0: { "author": "cobb, kevin." case 2 - when no value: { "errormessage": "" "message": "operation completed successfully" "status": "ok" "results": { "lookuppatroninforesponse": { "patronaddressinfo": null "patroncheckouthistoryinfo": null "patroncheckoutinfo": null "patroncirculationinfo": null t...

React Native - Scroll Listview at particular position - Programatically -

Image
in ios objective-c can make uitableview scroll particular row index using scrolltorowatindexpath method in react-native did not find such way scroll listview @ particular row index. following scenario, there listview such expandable rows while tapping expands , expandable row contains textinput component. while inputting text in textinput , keyboard shown , ideally @ moment listview should scrolled (once keyboard down listview should scrolled down previous position). this can achieved native-ios stuck in react-native. i tried following way did not achieve well there method called scrollto(x:0,y:10,animated:true) in listview component (actually method of scrollview ) can scrolled up/down based on y coordinate of parent view. i receive keyboard's & down events in code , based on can somehow manage scrollto method (by calculating y coordinate ) when keyboard gets (as mentioned in @alexey's answer) have no idea how calculate y coordinate when ...

java - Module project is not declared as war package, but get error 'web.xml is missing and <failOnMissingWebXml> is set to true' in eclipse -

module project declared war package before in pom.xml, removed row <packaging>war</packaging> , can expected xx.jar when run command line mvn install , however, i'm still error web.xml missing , <failonmissingwebxml> set true in eclipse. i have applied 'force update of snapshot/releases' several times it's meaningless. pom.xml <?xml version="1.0"?> <project xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <modelversion>4.0.0</modelversion> <parent> <groupid>com.xx</groupid> <artifactid>xxx</artifactid> <version>0.0.1-snapshot</version> </parent> <artifactid>xxx</artifactid> <name>xxxx</name> <url>htt...

android - How to Clear all previous activities~? -

Image
activity flow in app. welcomeactivity -> signinactivity -> signupactivity -> tabsactivity(this main) -> ... i want close previous activities (welcome, signin, signup) when start tabsactivity. i try several method... tabsactivity. clear task on launch=true ? not work (maybe) tabsactivity. launch mode = singletask ? not work but not want "save 3 activities , call each activity.finish()" depending on situation, "available 2 or 4 activities not 3", or "i not know activities in activity stack". i want clear previous activities, regadless of situation. help me :) sorry poor english... thanks. try this, clear activies . here have tutorial solve clear stack race. please go through it. thanks

kotlin realm demo canot be run -

kotlin version 1.0.0,realm version 0.88.0-snapshot download realm kotlin demo ,and run if code this: var person = person() person.id = 1 person.name = "young person" person.age = 14 realm.begintransaction() realm.copytorealm(person) realm.committransaction() throw exception: caused by: java.lang.classcastexception: io.realm.examples.kotlin.model.person cannot cast io.realm.personrealmproxyinterface else change code this: realm.begintransaction() // add person var person = realm.createobject(person::class.java) person.id = 1 person.name = "young person" person.age = 14 // when transaction committed, changes synced disk. realm.committransaction() then realm insert data person.name ,id,age empty value or 0; how solve it with realm 0.88.0-snapshot have use gradle plugin well. if google exception ( realm java.lang.classcastexception proxyinterface ) find github issue - 2353 says: ...

javascript - calling activity from webview with @JavascriptInterface -

i'm stuck on project , requesting help! i'm trying call activity(barcodescanneractivity.java) webview in mainactivity.java button click using javascript call. think messed parameters somewhere... i'm not sure i've made mistake, copied , modified codes blogs , stackoverflow. i'm having error in android studio logcat: [info:console(315)] "uncaught error: error calling method on npobject.", source: http:// ......... this server side html: <input type="button" value="scanner" id="btnscan" class="btn_dark" onclick="callactivity();" /> <script> function callactivity() { android.openbarcodescanner(); } </script> this mainactivity.java containing webview: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); getsupportactionbar().hide(); //getwindow().requestfeature(window.feature_action_bar); //g...

javascript - AngularJS not binding to numeric value in select list -

i have existing select tag existing option tags, 1 marked "selected", example: <div class="form-group"> <label class="control-label">test</label> <select ng-model="vm.testnumber"> <option>choose...</option> <option value="1">one</option> <option value="2">two</option> <option value="3" selected>three</option> </select> <p class="help-block">{{vm.testnumber}}</p> </div> angular binding model correctly , spits out "3" in block when page loads, option 3 not selected. binds , shows 3 selected if use text value attributes on each option, not when it's numerical value. instead inserts option @ top of select list: <option value="? number:3 ?"></option> what doing wrong? from angular doc note value of select directive used without ngopt...

java - How to add @Ressource from TomEE to Jboss -

im trying migrate application tomee jboss. i found injection of ressource : @resource(name = "saraconnectionfactory") private connectionfactory saraconnectionfactory; @resource(name = "saratoolsqueue") private queue saraqueue; @resource(name = "saratargetservice") private string service; @resource(name = "saratimeout") private long timeout; the statement in tomee.xml : <resource id="sarajmsresourceadapter" type="activemqresourceadapter"> <!--brokerxmlconfig --> serverurl tcp://bdv06:61616 </resource> <resource id="saratoolsqueue" type="javax.jms.queue"> destination rmw </resource> <connector id="saraconnectionfactory"type="javax.jms.connectionfactory"> resourceadapter sarajmsresourceadapter # specifies if connection enrolled in global transaction transactionsupport none # maximum numbe...

Hide complete column if data is null or empty using jquery -

i hide complete column including heading if data empty or null. tried jquery, iam not able accomplish iam trying. iam getting records in php. columns doesnt have data, dont need show empty data or data null. can guide me on whats mistake iam making. <html> <head> <title>hide</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"></script> </head> <body> <table border="1" width="100%" id="mytable"> <thead> <tr> <th>head1</th> <th>head2</th> <th>head3</th> </thead> </tr> <tr> <td>aa</td> <td></td> <td>cc</td> </tr> <tr> <td>aa</td> <td></td> <td>cc</td> </tr> <tr> <td>aa</td> <td></td> <td>cc</td> </tr> </table> </b...

c# - SignalR ApplicationUserManager is disposed while using webSockets transport -

i've added signalr existing mvc project , tried use same applicationusermanager mvc load user hub context. after connection done, call server method this: var alertshub = $.connection.monitoringhub; $(function() { alertshub.client.processalertchange = function (name, alert) { console.log(alert); }; //start connection $.connection.hub.start().done(function () { console.log("connected, transport = " + $.connection.hub.transport.name); alertshub.server.subscribetomonitor(); }); }); in hub method there call currentuser = connectedusers.getoradd(this.context.connectionid, usermanager.findbyname(this.context.user.identity.name)); where usermanager property this protected static concurrentdictionary<string, applicationuser> connectedusers = new concurrentdictionary<string, applicationuser>(); private applic...

service - Share Data in AngularJs -

how share data controller? i have controller pull data server(file.json) want share other controller sampleapp.controller('phonelistctrl', ['$scope', '$http', function($scope, $http) { $http.get('app_data/phonelist.json'). success(function(returndatafrmjson){ $scope.phonesscope = returndatafrmjson; }); }]); controller access shared data of first one sampleapp.controller('addiphonecontroller', ['$scope', '$http', function($scope, $http) { $scope.newinput= 'sample text'; $scope.sharedtext= datafromsharedcontroll; }]); the html file show data. {{newinput}} {{sharedtext}} well, there various options using: $sessionstorage , localstorage , appconstant , $localstorage , on. you can share data between controllers using factory , services . giving simple example of using $sessionstorage. in order use $sessionstorage or $localstorage , need inject ngstorag...

Angularjs ng-repeat not working with md-select and md-option -

i have following code use ng-repeat md-select. not working, , drop down shown blank. if use ng-repeat div or html select works. please see below, angularform:- <div class="col-xs-12 formclass" ng-controller="dropdowncontroller"> <md-input-container class="formclass"> <label>impacts</label> <md-select name="impact" id="impact" ng-model="impact"> <md-option ng-repeat="impact in impacts.availableimpacts" value="{{impact.id}}">{{ impact.name }} </md-option> </md-select> </md-input-container> </div> js:- app.controller('dropdowncontroller', function ($scope) { $scope.impacts = { availableimpacts: [ {id: '1', name: 'name1' }, { id: '2', name: 'name2' }, { id: '3', name: ...

Grouping all result by year in MySql and PHP -

i have table in mysql below id name year_born 1 manoj 1977 2 babu 1977 3 naren 1976 4 kumar 1977 5 srikanth 1976 6 lakshmi 1983 now getting result below 1 naren 1976 2 srikant 1976 3 manoj 1977 4 babu 1977 5 kumar 1977 6 lakshmi 1983 but, want below people born in 1976 1 naren 2 srikanth people born in 1977 1 manoj 2 babu 3 kumar people born in 1983 1 lakshmi thank in advance. try - select * table_name group year_born, id order year_born

graphviz - Software for visualizing very large graphs -

i have large (about 205k edges , 200k nodes) graph of text nodes (names) visualize using graphviz. the problem running on graphviz (using sfdp) if turn off overlapping (which necessary in order produce readable graph) sfdp runs out of memory. is there other tool graphviz manage convert graph of size image of nonoverlapping nodes? i have not tried such large data sets, give gephi try. there plugin called noverlap prevents nodes overlapping.

APL Bridge Game -

i trying code game of bridge in apl part i'm stuck on when printing hands want return 4 separate hands scored of random cards , want sort cards suit first , within suits sort ace 2 able accomplish each 1 of these sorts individually hand←deal;char;deck deck←make_deck char←deck[;13?52] ⍝hand←char[;'shdc23456789tjqka'”³char] hand←char[;'cdhs'”³char] sorts suit not numbers in suit , dont know how make deal 4 hands instead of 1 hand of 13 cards example output: q982aqt93t934 akj657428j987 k865akj54kqt3 t743jq762a652 sssshhhhhdddc ssssshhhdcccc hhhhdddddcccc sssshddddcccc (i wasn't sure did in make_deck, maybe there special stuff going on? otherwise there no reason make dedicated function that. also, non-native english-speaker, i'm not sure naming of cards etc. - pls. fix appropriate...) deck←(52⍴'akqj0987654'),[.5]13/'shdc' i dealing cards , create array of indices deck; hands←4 13⍴52?52 these need sorted ro...

java - Is It Possible to get Arraylist of product name from Arraylist of custom class without looping -

suppose have class: class product { int pid; string pname; int pprice; } i have arraylist<product> , can arraylist<string> contain product name only without loop. say of cursor or collection utils or other thing in android. in java 8 can use stream , map function on list of products. assume have: list<product> productlist = new arraylist<product>(); productlist.add(new product(1, "test", 100)); productlist.add(new product(1, "test2", 100)); you can use approach map list<string> : list<string> productnames = productlist.parallelstream() .map(product::getpname) .collect(tolist()); edit: is possible use java 8 android development?

web services - JAX-RS filter not getting called -

i have filter defined in file checksessionfilter.java, this: @provider @sessionchecker public class checksessionfilter implements containerrequestfilter { @override public void filter(containerrequestcontext requestcontext) throws webapplicationexception { .... } in file, sessionchecker.java, have: @target({ elementtype.type, elementtype.method }) @retention(value = retentionpolicy.runtime) @namebinding public @interface sessionchecker {} my web service defined in services.java as: @path("services") public class services { @post @sessionchecker @consumes(mediatype.application_json) @produces(mediatype.application_json) @path("login") public response login(@context httpservletrequest request, parameters requestparameters) { .... } } i deployed web service on weblogic 12.2.1. web service works fine. filter not getting called @ all. wrong? do need put in web.xml? thanks in advance. edited i...

reactjs - redux isomorphic fetch Access-Control-Allow-Origin -

i have written redux application running locally using webpack-dev-server. (port 8080). trying connect web service running locally @ port 9000. my code connect web service follows return fetch(`http://localhost:9000/movies/${dimensionname.tolowercase()}list`) .then(response => response.json()) .then(json => dispatch(receiveddimensionattributessuccess(dimensionname, json)) ) .catch(error => dispatch(receiveddimensionattributeserror(dimensionname, error)) ); this receives error fetch api cannot load http://localhost:9000/movies/yearlist. no 'access- control-allow-origin' header present on requested resource. origin 'http://localhost:8080' therefore not allowed access. if opaque response serves needs, set request's mode 'no-cors' fetch resource cors disabled. i googled problem , found thread access control allow origin header not present fetch api call but don't solution involved switching different library/mi...

php - selecting latest row of transaction table if row contains some values in MySql -

these 2 tables, `leadid` primary key. table1 - (master) leadid customer name 101 ramesh kumar 102 rajan kumar 103 rahul kumar table2 - (transaction) id leadid followed_by 1 101 sakshi 2 101 madhuri 3 101 sakshi 4 102 sakshi 5 102 madhuri 6 103 sakshi 7 103 sakshi question : need record `table1` , `table2` , in mahuri has followed latest on leadid. (as below) `102 rajan kumar 5 102 madhuri` in case of sakshi should be: 101 ramesh kumar 3 101 sakshi 103 rahul kumar 7 103 sakshi if same lead id followed others, previous transcation should not included... e leadid 101 followed madhuri after followed sakshi. should not displayed when putting query madhuri. this query used getting latest value 'madhuri' select a.*,b.* `master` inner join `transaction` b on a.leadid = b.leadid followed_by = "m...

c# - OpenCover shows 100% coverage with no valid tests -

to visual studio solution 6 projects (class libraries & wcf services) add new test project 1 test, 1 line assert.areequal(1,1). opencover shows 100% coverage (100% sequence , 100% branch). opencover.console.exe -target:"nunit3-console.exe" "-targetargs:services.nunit" -register:user -skipautoprops -mergebyhash only when instantiated class other projects in test coverage dropped 0.1 %. so looks if dll not loaded, opencover cannot calculate code coverage. now question if new class library added , never instantiated in unit test, opencover ignore dll while calculating coverage metrics. this important because have distributed team , developer might create class library , never write tests it. show in code reviews, can opencover configured detect situation. so looks if dll not loaded, opencover cannot calculate code coverage. this expected behaviour now question if new class library added , never instantiated in unit test, opencover ...

c++ - irc channel regex composition -

i'm having trouble composing regex string irc channel // digit = %x30-39 ; 0-9 static const std::string digit("(?:[\x30-\x39])"); // channelid = 5( %x41-5a / digit ) ; 5( a-z / 0-9 ) static const std::string channelid("(?:(?:[\x41-\x5a]|" + digit + "){5})"); // chanstring = %x01-07 / %x08-09 / %x0b-0c / %x0e-1f / %x21-2b / %x2d - 39 / %x3b - ff static const std::string chanstring("(?:[\x01-\x07\x08-\x09\x0b-\x0c\x0e-\x1f\x21-\x2b\x2d-\x39\x3b-\xff])"); // channel = ( "#" / "+" / ( "!" channelid ) / "&" ) chanstring [":" chanstring] static const std::string channel("(?:(?:[#+&]|(?:!" + channelid + "))" + chanstring + "(?::" + chanstring + ")?)"); i'm digit , channelid formed. const std::regex digit(dapps::regex::digit); assert(std::regex_match("0", digit)); assert(std::regex_match("1"...

php - How to destroy a session so no return is possible -

i working on logout of site , having trouble it. if hit log out button go index , if hit return button in browser go page logged in. question how detroy session right prevent happening. here script if logged in: <?php session_start(); ?> <html> <head> <link href="../css/style.css" rel="stylesheet" type="text/css"> <link href='https://fonts.googleapis.com/css?family=titillium+web:400,300,200' rel='stylesheet' type='text/css'> </head> <body> <section class="photocontainer hero" data-stellar-background-ratio="0.5 "> <div class="content"> <div class="hc"> <h1>presenting e-bike</h1> <h3>why pedal when don't have too</h3> </div> <div class="panelcontainer"> ...

php - Writing function name as the value of a string variable -

i have string variable $worker_name = "video_convert" i want write function name following function video_convert(){ } how can in php? tried function eval($worker_name){ } or eval($worker_name) = function(){ } but, seems not correct way in php. you can as $worker_name = 'video_convert'; $$worker_name = function() { echo 'hi'; }; $$worker_name();

c++ - undefined reference to `__atomic_fetch_add_4 error while using opencv -

i'm new opencv library , every time try compile code #include "opencv2/core.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgcodecs.hpp" using namespace cv; using namespace std; int main() { mat img; img = imread("lena.jpg"); imshow("original image", img); waitkey(); } i error undefined reference `__atomic_fetch_add_4 this code copied tutorial , it's working writer problem me i looked solution problem , did not found working solution, not no cause of problem i'm using code::blocks ide thanks, go setting>compiler settings , tick intel i486 option. worked me

html5 - PHP <form action = 'XXX.php' method = 'post'> var_dump($_POST) is null? -

Image
this form code: <div class="login_cont"> <form action="dologin.php" method="post"> <ul class="login"> <li class="l_tit">管理员帐号</li> <li class="mb_10"><input type="text" name="username" placeholder="请输入管理员帐号"class="login_input user_icon"></li> <li class="l_tit">密码</li> <li class="mb_10"><input type="password" name="password" class="login_input password_icon"></li> <li class="l_tit">验证码</li> <li class="mb_10"><input type="text" name="verify" class="login_input password_icon"></li> <img src="getverify.php" alt="" /> <li class="autologin"...

php - The ability to fight with Ad-Blocker -

i had searched google , forum-search , didnt propose new topic: wordpress ability fight ad-blocker. i not guy (subsea engineer) having website 100 - 200 unique visitor/day (according adsense) hobby (1%-4% using ad-blocker - lucky have these ~97% visitors). i learn ad-block users 300 mil , huge problem big publisher (they earn money ads). ad-blocker using bandwith, upload data server , (one of them - expect more of them) sell data anons. in accordance above idea, have question a-non guys, there way make wordpress tackle ad-blocker (auto)? it may way disarm ad-blocker. website home/house. you/visitors can visit please consider owner. no can tell, keeps list of servers used serve advertisements. whenever visit website, web browser has fetch components various servers. adblock blocks connections item on list of ad servers, blocking or ads. list of servers has updated ever in backend.

ios - Xcode Trigger Action after Cell is Clicked in Swift -

i relatively new programming in general (this first year learning @ school) please explain in easy way grasp possible. i using uitableviewcontroller create table view , want able add string cell if empty (i think have add array "phrases", correct me if wrong) , display contents of cell if contains string. know has nsindexpath don't know put code. class myphrases: uitableviewcontroller { override func viewdidload() { super.viewdidload() } override func didreceivememorywarning() { super.didreceivememorywarning() } var phrases = [] override func numberofsectionsintableview(tableview: uitableview) -> int { return 1 } override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return phrases.count } override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("cell")! cell....

spring integration - JBoss WorkManager Thread in BLOCKED state -

we're using jboss 5 , jdk 1.6. use spring integration poll files multiple directory. <file:inbound-channel-adapter id="flowinboundfileadapter" directory="${service.integration.path}" scanner="recursivescanner" filter="custompathfilefilter" channel="myinchannel" auto-create-directory="false" auto-startup="true" prevent-duplicates="true" queue-size="10"> <poller max-messages-per-poll="10" fixed-rate="10" time-unit="seconds" task-executor="taskexecutor" /> </file:inbound-channel-adapter> <beans:bean id="recursivescanner" class="org.springframework.integration.file.recursiveleafonlydirectoryscanner" /> we realized thread dump threads (198 out of 200) blocked @ .integration.file.filters.acceptoncefilelistfilter.accept(acceptoncefilelistfilter.java:60). we're not sure if deadlock or else? ho...

Why does Vagrant resume do a provision -

just upgraded vagrant host latest v1.8.1 on os x. when suspend , resume, performs reprovisioning of box. the fix have found run instead "vagrant --no-provision". i see ticket open in vagrant repo other people experiencing same problems. https://github.com/mitchellh/vagrant/issues/6787 surely not normal behavior, else find more permanent fix?

sql server - DQS How to cleanse duplicates in master table and correct IDs in all referenced tables -

we have lots of duplicates in master table. see below example, customer abc corp exists 3 times in master table , 3 custids referenced in orders table. **customers table** <table> <tr><td><strong>custid</strong></td><td><strong>custname</strong></td></tr> <tr><td>1001</td><td>abc corp.</td></tr> <tr><td>1002</td><td>xyz corp.</td></tr> <tr><td>1003</td><td>abc corp ltd.</td></tr> <tr><td>1002</td><td>abc corporation limited.</td></tr> </table> **orders table** <table> <tr><td><strong>orderid</strong></td><td><strong>custid</strong></td></tr> <tr><td>23425</td><td>1001</td></tr> <tr><td>23466</td><td>1003</td>...

powershell - SET-ADACCOUNTPASSWORD Exception -

i trying run command, on running ..it prompt me desired passwords shows me error "a referral sent server" set-adaccountpassword -identity myidhere -server "servernamehere" running on powershell on windows 2008 r2, domain controller read-only , in different domain from http://technet.microsoft.com/en-us/library/ee617261.aspx notes • cmdlet not work active directory snapshot. cmdlet not work read-only domain controller. cmdlet not work when connected global catalog port. edit add info rodcs: •a read-only ad domain services (ad ds) database--applications need database read access can use rodc; however, database changes must made read-writable dc (rwdc), replicated rodc. •limited credential caching--an rodc doesn't store user or computer credentials (except rodc's computer account). when rodc receives authentication request, forwards rwdc. rodc requests copy of credential can service request in future. if password-replication policy all...

C# difference between list of a class -

i got trouble getting difference between 2 list in c#. how can difference ? have tried except did not result wanted. for example: these products part of bill class product { public int id_prod; public int quantity; public float price; } product prd1 = new product(){1,2,34}; product prd2 = new product(){2,5,20}; product prd3 = new product(){3,6,14}; product prd4 = new product(){4,9,8}; product prd5 = new product(){5,12,70}; product prd1b = new product(){1,60,34}; list<product> oldlst = new list<product>(){ prd1,prd2,prd3}; list<product> newlst = new list<product>(){ prd1b,prd2,prd4,prd5}; note quantity can change between old prd1 , new prd1 my problem when use var lsttodel = oldlst.except(newlst); lsttodel filled oldlst , not make difference. the desired result that lsttodel = new list<product>(){prd1,prd3}; except accepts iequalitycomparer. create 1 in order determine products "equal", meaning have same pr...

php - Multiple databases for clients -

i need databases mysql. i building customer management system more 1000 users use system , each user have own clients in turn can have more 100 clients or more (unlimited). thinking should have separate databases in mysql or in 1 database user? when user creates own account automatically creates database files user , user have separate database , on. please help. i think problem describe known "multi-tennant" architecture. there's no right or wrong answer - there whole bunch of considerations. data size 1 - numbers mention aren't large enough make of difference. 1 million rows in mysql trivial (as long can use indexing). other considerations: maintainability: having 1 "large" database means new versions have migrated once - adding column or table, creating new index etc. conceptually easier, don't have repeat same script each client. however, operations may put of clients off-line hours; might bad thing. versioning: if intend ...

How to get file name from uri android -

i developing app need select images or pdf , give intent file manager. in onactivityresult getting uri of path : image : content:/com.android.providers.media.documents/document/image:53524 pdf : content:/com.android.externalstorage.documents/document/primary:parthanjaria.pdf but not able actual path. after trying this can me this.

VB.NET WCF - Error Using my function -

Image
i have function information on sql server table. know function correct , returning suposed (i used msgbox check it). problem when try use function displays error: my wcf function: public function getclinfo(byval cl_id integer) implements sqloperator.getclinfo dim clinfo(7) string try sqlcon.connectionstring = sqlconstring sqlcon.open() sqlcmd = new sqlcommand("select * dbo.cl id=" & cl_id & ";", sqlcon) sqldatareader = sqlcmd.executereader() while sqldatareader.read clinfo(0) = sqldatareader("id") clinfo(1) = sqldatareader("name") clinfo(2) = sqldatareader("address") clinfo(3) = sqldatareader("contact") end while return clinfo catch ex exception msgbox("error: " & environment.newline & ex.tostring) clinfo(0) = "false" return clinfo ...

utf 8 - Android open UTF-8 XML -

hello xml file on utf-8 follow sample , code this string text = ""; string str; bufferedreader in = new bufferedreader(new inputstreamreader(new fileinputstream(path), "utf-8")); while ((str = in.readline()) != null) { text += str; } return text; and try parse code dom parser document doc = parser.getdomelement(result); and fail have check xml file hexeditor have following charcode before "<": ef bb bf what have miss? why getdomelement tell me unexpected token (position:text @1:2) text += str + "\n"; if there line break in tag: <img src="smile.jpg"/> you get: <imgsrc="smile.jpg"> and other cases. stringbuilder text = new stringbuilder(); try (bufferedreader in = new bufferedreader(new inputstreamreader( new fileinputstream(path), "utf-8"))) { string str; while ((str = in.readline()) != null) { text.append(str).append("\n...